提交 8f9ddb5a authored 作者: Anthony Minessale's avatar Anthony Minessale

42

上级 3734f4cd
......@@ -978,6 +978,9 @@ static switch_status_t messagehook (switch_core_session_t *session, switch_core_
switch (msg->message_id) {
case SWITCH_MESSAGE_INDICATE_BRIDGE:
case SWITCH_MESSAGE_INDICATE_UNBRIDGE:
if (msg->numeric_arg == 42) {
goto end;
}
if ((caller_session = switch_core_session_locate(msg->string_arg))) {
caller_channel = switch_core_session_get_channel(caller_session);
if (msg->message_id == SWITCH_MESSAGE_INDICATE_BRIDGE) {
......
......@@ -315,6 +315,7 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
if (read_frame_count > DEFAULT_LEAD_FRAMES && switch_channel_media_ack(chan_a) && switch_core_session_private_event_count(session_a)) {
switch_channel_set_flag(chan_b, CF_SUSPEND);
msg.numeric_arg = 42;
msg.string_arg = data->b_uuid;
msg.message_id = SWITCH_MESSAGE_INDICATE_UNBRIDGE;
msg.from = __FILE__;
......@@ -1184,6 +1185,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
}
}
switch_channel_wait_for_flag(peer_channel, CF_BROADCAST, SWITCH_FALSE, 10000, caller_channel);
switch_ivr_parse_all_events(peer_session);
switch_ivr_parse_all_events(session);
msg.message_id = SWITCH_MESSAGE_INDICATE_BRIDGE;
msg.from = __FILE__;
msg.string_arg = switch_core_session_strdup(peer_session, switch_core_session_get_uuid(session));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论