switch_file_handle_t *fh;
char buf[4];
int noexit;
+ int playback_controls_active;
};
typedef struct call_control cc_t;
|| dtmf->digit == *cc->profile->prev_msg_key || dtmf->digit == *cc->profile->next_msg_key
|| dtmf->digit == *cc->profile->repeat_msg_key
|| dtmf->digit == *cc->profile->terminator_key || dtmf->digit == *cc->profile->skip_info_key
- || dtmf->digit == *cc->profile->email_key || dtmf->digit == *cc->profile->forward_key)) {
+ || dtmf->digit == *cc->profile->forward_key)) {
+ *cc->buf = dtmf->digit;
+ return SWITCH_STATUS_BREAK;
+ }
+
+ if (!cc->playback_controls_active
+ && (dtmf->digit == *cc->profile->email_key)) {
*cc->buf = dtmf->digit;
return SWITCH_STATUS_BREAK;
}
switch_core_file_seek(fh, &pos, samps, SEEK_CUR);
return SWITCH_STATUS_SUCCESS;
}
- if (!cc->noexit && dtmf->digit == *cc->profile->terminator_key) {
- *cc->buf = dtmf->digit;
- return SWITCH_STATUS_BREAK;
- }
}
break;
default:
*cc.buf = '\0';
memset(&fh, 0, sizeof(fh));
cc.fh = &fh;
+ cc.playback_controls_active = 1;
if (switch_file_exists(cbt->file_path, switch_core_session_get_pool(session)) == SWITCH_STATUS_SUCCESS) {
TRY_CODE(switch_ivr_play_file(session, &fh, cbt->file_path, &args));
}
+ cc.playback_controls_active = 0;
}
if (!*cc.buf && (profile->play_date_announcement == VM_DATE_LAST)) {