]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_sofia] don't auto unhold via media format for non-sip
authorAnthony Minessale <anthm@signalwire.com>
Mon, 13 Apr 2020 23:16:27 +0000 (23:16 +0000)
committerAndrey Volk <andywolk@gmail.com>
Sat, 23 Oct 2021 19:00:31 +0000 (22:00 +0300)
src/include/switch_types.h
src/mod/endpoints/mod_sofia/sofia_glue.c
src/switch_ivr.c

index a1bc0204ec4e37df9a018500e57af166d63c78bf..e978d33f2ddac15f25008cc537ef821a78cbd0ac 100644 (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;
index 074e233aee35e0a4bce28f1c59f5b4c3ba131fd7..68125879ce69f68465477e84e3cccd29bfcb3fc0 100644 (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);
 
 
index ba292376f018b1209a32985e76ca9040b5b62f96..51875e4c2592be4e190140be0811f55292b3528e 100644 (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 };