提交 3d535004 authored 作者: Anthony Minessale's avatar Anthony Minessale

send display of caller who left message during vm playback

上级 8b4a8cc3
...@@ -785,7 +785,7 @@ SWITCH_STANDARD_APP(display_function) ...@@ -785,7 +785,7 @@ SWITCH_STANDARD_APP(display_function)
{ {
switch_core_session_message_t msg = { 0 }; switch_core_session_message_t msg = { 0 };
/* Tell the channel to redirect */ /* Tell the channel to change display */
msg.from = __FILE__; msg.from = __FILE__;
msg.string_arg = data; msg.string_arg = data;
msg.message_id = SWITCH_MESSAGE_INDICATE_DISPLAY; msg.message_id = SWITCH_MESSAGE_INDICATE_DISPLAY;
......
...@@ -1417,12 +1417,20 @@ static switch_status_t listen_file(switch_core_session_t *session, vm_profile_t ...@@ -1417,12 +1417,20 @@ static switch_status_t listen_file(switch_core_session_t *session, vm_profile_t
switch_file_handle_t fh = { 0 }; switch_file_handle_t fh = { 0 };
cc_t cc = { 0 }; cc_t cc = { 0 };
char *forward_file_path = NULL; char *forward_file_path = NULL;
switch_core_session_message_t msg = { 0 };
char cid_buf[1024];
if (switch_channel_ready(channel)) { if (switch_channel_ready(channel)) {
args.input_callback = cancel_on_dtmf; switch_snprintf(cid_buf, sizeof(cid_buf), "%s|%s", cbt->cid_number, cbt->cid_name);
msg.from = __FILE__;
msg.string_arg = cid_buf;
msg.message_id = SWITCH_MESSAGE_INDICATE_DISPLAY;
switch_core_session_receive_message(session, &msg);
args.input_callback = cancel_on_dtmf;
switch_snprintf(key_buf, sizeof(key_buf), "%s:%s:%s:%s:%s:%s%s%s", profile->listen_file_key, profile->save_file_key, switch_snprintf(key_buf, sizeof(key_buf), "%s:%s:%s:%s:%s:%s%s%s", profile->listen_file_key, profile->save_file_key,
profile->delete_file_key, profile->email_key, profile->callback_key, profile->delete_file_key, profile->email_key, profile->callback_key,
profile->forward_key, cbt->email ? ":" : "", cbt->email ? cbt->email : ""); profile->forward_key, cbt->email ? ":" : "", cbt->email ? cbt->email : "");
...@@ -1436,6 +1444,7 @@ static switch_status_t listen_file(switch_core_session_t *session, vm_profile_t ...@@ -1436,6 +1444,7 @@ static switch_status_t listen_file(switch_core_session_t *session, vm_profile_t
TRY_CODE(switch_ivr_phrase_macro(session, VM_SAY_MESSAGE_NUMBER_MACRO, input, NULL, &args)); TRY_CODE(switch_ivr_phrase_macro(session, VM_SAY_MESSAGE_NUMBER_MACRO, input, NULL, &args));
play_file: play_file:
if (!*cc.buf && (profile->play_date_announcement == VM_DATE_FIRST)) { if (!*cc.buf && (profile->play_date_announcement == VM_DATE_FIRST)) {
cc.fh = NULL; cc.fh = NULL;
TRY_CODE(switch_ivr_phrase_macro(session, VM_SAY_DATE_MACRO, cbt->created_epoch, NULL, &args)); TRY_CODE(switch_ivr_phrase_macro(session, VM_SAY_DATE_MACRO, cbt->created_epoch, NULL, &args));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论