]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fix T.38 passthru
authorBrian West <brian@freeswitch.org>
Fri, 17 Sep 2010 20:15:29 +0000 (15:15 -0500)
committerBrian West <brian@freeswitch.org>
Fri, 17 Sep 2010 20:15:38 +0000 (15:15 -0500)
src/mod/endpoints/mod_sofia/sofia.c

index e76a56a4aaaec30dcb86814a53695d5d2ec749a6..e8bbb6f76e13555791ebb5d1becfd533436686a4 100644 (file)
@@ -4109,7 +4109,8 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
                        }
                }
 
-               if (tech_pvt && tech_pvt->remote_sdp_str && switch_stristr("m=image", tech_pvt->remote_sdp_str)) {
+
+               if (sip->sip_payload && sip->sip_payload->pl_data && switch_stristr("m=image", sip->sip_payload->pl_data)) {
                        has_t38 = 1;
                }
                
@@ -4164,12 +4165,12 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
                                        }
                                        
                                        if (status == 200 && sofia_test_flag(tech_pvt, TFLAG_T38_PASSTHRU) && has_t38) {
-                                               switch_core_session_receive_message(other_session, msg);
                                                if (switch_rtp_ready(tech_pvt->rtp_session) && switch_rtp_ready(other_tech_pvt->rtp_session)) {
                                                        switch_rtp_udptl_mode(tech_pvt->rtp_session);
                                                        switch_rtp_udptl_mode(other_tech_pvt->rtp_session);
                                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Activating T38 Passthru\n");
                                                }
+                                               switch_core_session_receive_message(other_session, msg);
                                        } else {
                                                switch_core_session_queue_message(other_session, msg);
                                        }