[mod_sofia] don't auto unhold via media format for non-sip

This commit is contained in:
Anthony Minessale 2020-04-13 23:16:27 +00:00 committed by Andrey Volk
parent 5111b6ef73
commit d2ccb93f3e
3 changed files with 3 additions and 1 deletions

View File

@ -1454,6 +1454,7 @@ typedef enum {
CC_IO_OVERRIDE,
CC_RTP_RTT,
CC_MSRP,
CC_MUTE_VIA_MEDIA_STREAM,
/* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */
CC_FLAG_MAX
} switch_channel_cap_t;

View File

@ -160,6 +160,7 @@ void sofia_glue_attach_private(switch_core_session_t *session, sofia_profile_t *
switch_channel_set_cap(tech_pvt->channel, CC_FS_RTP);
switch_channel_set_cap(tech_pvt->channel, CC_RTP_RTT);
switch_channel_set_cap(tech_pvt->channel, CC_MSRP);
switch_channel_set_cap(tech_pvt->channel, CC_MUTE_VIA_MEDIA_STREAM);
switch_channel_set_cap(tech_pvt->channel, CC_QUEUEABLE_DTMF_DELAY);

View File

@ -2114,7 +2114,7 @@ SWITCH_DECLARE(void) switch_ivr_check_hold(switch_core_session_t *session)
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_media_flow_t flow;
if (switch_channel_test_flag(channel, CF_ANSWERED) &&
if (switch_channel_test_flag(channel, CF_ANSWERED) && switch_channel_test_cap(channel, CC_MUTE_VIA_MEDIA_STREAM) &&
(flow = switch_core_session_media_flow(session, SWITCH_MEDIA_TYPE_AUDIO)) != SWITCH_MEDIA_FLOW_SENDRECV) {
switch_core_session_message_t msg = { 0 };