[Freeswitch-svn] [commit] r8694 - freeswitch/trunk/src/mod/endpoints/mod_sofia

Freeswitch SVN anthm at freeswitch.org
Tue May 27 11:45:23 EDT 2008


Author: anthm
Date: Tue May 27 11:45:22 2008
New Revision: 8694

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c

Log:
save transport string in record route for sticky nat stuff

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	Tue May 27 11:45:22 2008
@@ -2721,8 +2721,11 @@
 
 	if (sip->sip_contact && sip->sip_contact->m_url) {
 		char tmp[35] = "";
-		tech_pvt->record_route = switch_core_session_sprintf(session, "sip:%s@%s:%d",
-															 sip->sip_contact->m_url->url_user, tech_pvt->remote_ip, tech_pvt->remote_port);
+		sofia_transport_t transport = sofia_glue_url2transport(sip->sip_contact->m_url);
+
+		tech_pvt->record_route = switch_core_session_sprintf(session, "sip:%s@%s:%d;transport=%s",
+															 sip->sip_contact->m_url->url_user, tech_pvt->remote_ip, 
+															 tech_pvt->remote_port, sofia_glue_transport2str(transport));
 		switch_channel_set_variable(channel, "sip_received_ip", tech_pvt->remote_ip);
 		snprintf(tmp, sizeof(tmp), "%d", tech_pvt->remote_port);
 		switch_channel_set_variable(channel, "sip_received_port", tmp);



More information about the Freeswitch-svn mailing list