diff --git a/src/include/switch_types.h b/src/include/switch_types.h index 0af760fecb..637ced38f1 100644 --- a/src/include/switch_types.h +++ b/src/include/switch_types.h @@ -90,7 +90,8 @@ typedef uint8_t switch_byte_t; typedef enum { SMF_NONE = 0, SMF_REBRIDGE = (1 << 0), - SMF_ECHO_BRIDGED = (1 << 1) + SMF_ECHO_BRIDGED = (1 << 1), + SMF_FORCE = (1 << 2) } switch_media_flag_t; typedef enum { diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 3ae9cd51bb..ec63a75cd4 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -2415,7 +2415,7 @@ static void pass_sdp(switch_channel_t *channel, char *sdp) switch_channel_test_flag(other_channel, CF_NOMEDIA) && switch_channel_test_flag(channel, CF_OUTBOUND) && switch_channel_test_flag(channel, CF_NOMEDIA)) { - switch_ivr_nomedia(val, SMF_NONE); + switch_ivr_nomedia(val, SMF_FORCE); } switch_core_session_rwunlock(other_session); diff --git a/src/switch_ivr.c b/src/switch_ivr.c index aac0ab1c2b..aff0ef4586 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -2489,7 +2489,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_nomedia(char *uuid, switch_media_flag status = SWITCH_STATUS_SUCCESS; channel = switch_core_session_get_channel(session); assert(channel != NULL); - if (!switch_channel_test_flag(channel, CF_NOMEDIA)) { + + if ((flags & SMF_FORCE) || !switch_channel_test_flag(channel, CF_NOMEDIA)) { switch_channel_set_flag(channel, CF_NOMEDIA); switch_core_session_receive_message(session, &msg); if ((flags & SMF_REBRIDGE) && (other_uuid = switch_channel_get_variable(channel, SWITCH_BRIDGE_VARIABLE)) &&