From 7c79dd95a3d5d2e247bfdd380acb9c65f51464ad Mon Sep 17 00:00:00 2001 From: Shashi Kumar Date: Fri, 10 May 2019 22:03:10 +0530 Subject: [PATCH] FS-11837: [Core] Add feature to allow execution of an app on audio change, execute_on_audio_change variable. --- src/switch_core_media.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/switch_core_media.c b/src/switch_core_media.c index bb974db6da..4552ba8d9c 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -722,6 +722,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_process_t38_passthru(switch_co switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "AUDIO RTP REPORTS ERROR: [%s]\n", err); switch_channel_hangup(session->channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION); } + switch_channel_execute_on(session->channel, "execute_on_audio_change"); } switch_core_media_copy_t38_options(t38_options, other_session); @@ -5202,6 +5203,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s } switch_core_media_check_autoadj(session); + switch_channel_execute_on(session->channel, "execute_on_audio_change"); } @@ -8566,6 +8568,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_activate_rtp(switch_core_sessi switch_snprintf(tmp, sizeof(tmp), "%d", a_engine->cur_payload_map->remote_sdp_port); switch_channel_set_variable(session->channel, SWITCH_REMOTE_MEDIA_IP_VARIABLE, a_engine->cur_payload_map->remote_sdp_ip); switch_channel_set_variable(session->channel, SWITCH_REMOTE_MEDIA_PORT_VARIABLE, tmp); + switch_channel_execute_on(session->channel, "execute_on_audio_change"); } }