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.
This commit is contained in:
Spencer Thomason 2016-09-08 12:31:12 -07:00
parent 6621bdcdd4
commit d5b5e8c23b
1 changed files with 2 additions and 3 deletions

View 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;