提交 d942d9f4 authored 作者: Anthony Minessale's avatar Anthony Minessale

make eavesdrop indicate display of who you are listening to

上级 c2bcc926
......@@ -1418,7 +1418,7 @@ static switch_status_t listen_file(switch_core_session_t *session, vm_profile_t
cc_t cc = { 0 };
char *forward_file_path = NULL;
switch_core_session_message_t msg = { 0 };
char cid_buf[1024];
char cid_buf[1024] = "";
if (switch_channel_ready(channel)) {
......
......@@ -672,9 +672,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_eavesdrop_session(switch_core_session
uint32_t tlen;
const char *macro_name = "eavesdrop_announce";
const char *id_name = NULL;
switch_codec_implementation_t tread_impl = { 0 }, read_impl = {
0};
switch_codec_implementation_t tread_impl = { 0 }, read_impl = { 0 };
switch_core_session_message_t msg = { 0 };
char cid_buf[1024] = "";
switch_caller_profile_t *cp = NULL;
if (!switch_channel_media_ready(channel)) {
goto end;
......@@ -788,6 +789,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_eavesdrop_session(switch_core_session
msg.message_id = SWITCH_MESSAGE_INDICATE_BRIDGE;
switch_core_session_receive_message(session, &msg);
cp = switch_channel_get_caller_profile(tchannel);
switch_snprintf(cid_buf, sizeof(cid_buf), "%s|%s", cp->caller_id_number, cp->caller_id_name);
msg.string_arg = cid_buf;
msg.message_id = SWITCH_MESSAGE_INDICATE_DISPLAY;
switch_core_session_receive_message(tsession, &msg);
while (switch_channel_ready(tchannel) && switch_channel_ready(channel)) {
uint32_t len = sizeof(buf);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论