From f392bfe38c372e282614aab6efe47524e2376e86 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 21 Oct 2009 19:58:11 +0000 Subject: [PATCH] fix issue with resume-media-on-hold and t38 re-invites git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15187 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 0651191945..c4a5d82d6b 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -3759,7 +3759,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status, if (r_sdp) { sdp_parser_t *parser; sdp_session_t *sdp; - uint8_t match = 0, is_ok = 1; + uint8_t match = 0, is_ok = 1, is_t38 = 0; tech_pvt->hold_laps = 0; if (r_sdp) { @@ -3771,13 +3771,16 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status, goto done; } + if (switch_stristr("m=image", r_sdp)) { + is_t38 = 1; + } + if (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA)) { - if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE)) && (other_session = switch_core_session_locate(uuid))) { switch_core_session_message_t *msg; - if (profile->media_options & MEDIA_OPT_MEDIA_ON_HOLD) { + if (switch_channel_test_flag(channel, CF_PROXY_MODE) && !is_t38 && profile->media_options & MEDIA_OPT_MEDIA_ON_HOLD) { tech_pvt->hold_laps = 1; switch_channel_set_variable(channel, SWITCH_R_SDP_VARIABLE, r_sdp); switch_channel_clear_flag(channel, CF_PROXY_MODE);