]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6954: Use channel flags to check for proxy media or bypass media
authorSpencer Thomason <spencer@whiteskycommunications.com>
Thu, 8 Sep 2016 19:31:12 +0000 (12:31 -0700)
committerSpencer Thomason <spencer@whiteskycommunications.com>
Fri, 9 Sep 2016 18:06:35 +0000 (11:06 -0700)
Use channel flags CF_PROXY_MODE or CF_PROXY_MEDIA to determine if to disable
SOA when passing a T38 ReINVITE across legs when in proxy media or bypass media.
These channel flags are set when the sofia profile params inbound-bypass-media or
inbound-proxy-media are enabled as well as when the channel variables bypass_media or
proxy_media are set which should handle a few edge cases better.

FS-6954 #resolve.

src/mod/endpoints/mod_sofia/sofia_glue.c

index acbddcaf736deb8a38f37d7ad419d8b46edf30f4..9296d573578178e494043c809481753d0931fb2a 100644 (file)
@@ -1280,9 +1280,8 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
 
 
        if ((switch_channel_get_private(tech_pvt->channel, "t38_options")) ||  
-               ((sofia_test_flag(tech_pvt, TFLAG_INB_NOMEDIA) ||
-                 sofia_test_flag(tech_pvt, TFLAG_PROXY_MEDIA) ||
-                 switch_true(switch_channel_get_variable(tech_pvt->channel, SWITCH_BYPASS_MEDIA_VARIABLE)) )
+               ((switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MODE) ||
+                 switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MEDIA) )
                        && switch_stristr("m=image", tech_pvt->mparams.local_sdp_str))) {
                sofia_clear_flag(tech_pvt, TFLAG_ENABLE_SOA);
                is_t38 = 1;