]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
let sofia recover work in some tcp situations
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 23 Jul 2013 18:53:06 +0000 (13:53 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 23 Jul 2013 18:53:06 +0000 (13:53 -0500)
src/mod/endpoints/mod_sofia/sofia_glue.c

index 4b604bf099932bb63f0c362cc8dfe5c84833e0e5..1b1b51438d8f278b48cbac529236e77a101f9ddf 100644 (file)
@@ -2444,7 +2444,6 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
                switch_channel_set_variable(channel, "sip_to_host", sofia_glue_get_host(to_str, switch_core_session_get_pool(session)));
                switch_channel_set_variable(channel, "sip_from_host", sofia_glue_get_host(from_str, switch_core_session_get_pool(session)));
 
-
                if (!(tech_pvt->nh = nua_handle(tech_pvt->profile->nua, NULL,
                                                                                NUTAG_URL(url_str),
                                                                                TAG_IF(call_id, SIPTAG_CALL_ID_STR(call_id)),
@@ -2679,6 +2678,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
                                                  "Local SDP:\n%s\n", tech_pvt->local_sdp_str);
        }
 
+
        if (sofia_use_soa(tech_pvt)) {
                nua_invite(tech_pvt->nh,
                                   NUTAG_AUTOANSWER(0),
@@ -5961,10 +5961,13 @@ int sofia_recover_callback(switch_core_session_t *session)
                tech_pvt->redirected = switch_core_session_sprintf(session, "sip:%s", switch_channel_get_variable(channel, "sip_contact_uri"));
 
                if (zstr(rr)) {
-                       switch_channel_set_variable_printf(channel, "sip_invite_route_uri", "<sip:%s@%s:%s;lr>",
+                       switch_channel_set_variable_printf(channel, "sip_invite_route_uri", "<sip:%s@%s:%s;transport=%s>",
                                                                                           switch_channel_get_variable(channel, "sip_from_user"),
-                                                                                          switch_channel_get_variable(channel, "sip_network_ip"), switch_channel_get_variable(channel, "sip_network_port")
+                                                                                          switch_channel_get_variable(channel, "sip_network_ip"), 
+                                                                                          switch_channel_get_variable(channel, "sip_network_port"),
+                                                                                          switch_channel_get_variable(channel,"sip_via_protocol")
                                                                                           );
+
                }
 
                tech_pvt->dest = switch_core_session_sprintf(session, "sip:%s", switch_channel_get_variable(channel, "sip_from_uri"));