From d5b5e8c23bf78508f5296b188265496e6f4a6a5d Mon Sep 17 00:00:00 2001 From: Spencer Thomason Date: Thu, 8 Sep 2016 12:31:12 -0700 Subject: [PATCH] FS-6954: Use channel flags to check for proxy media or bypass media 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 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index acbddcaf73..9296d57357 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -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;