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

Freeswitch SVN mikej at freeswitch.org
Thu Mar 13 19:19:56 EDT 2008


Author: mikej
Date: Thu Mar 13 19:19:55 2008
New Revision: 7887

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

Log:
use the record route, luke.

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	Thu Mar 13 19:19:55 2008
@@ -2607,7 +2607,16 @@
 	if (sip->sip_to && sip->sip_to->a_url) {
 		const char *host, *user;
 		int port;
-		sofia_transport_t transport = sofia_glue_url2transport(sip->sip_contact->m_url);
+		sofia_transport_t transport;
+		url_t *transport_url;
+
+		if (sip->sip_record_route && sip->sip_record_route->r_url) {
+			transport_url = sip->sip_record_route->r_url;
+		} else {
+			transport_url = sip->sip_contact->m_url;
+		}
+
+		transport = sofia_glue_url2transport(transport_url);		
 
 		url_set_chanvars(session, sip->sip_to->a_url, sip_to);
 		if (switch_channel_get_variable(channel, "sip_to_uri")) {



More information about the Freeswitch-svn mailing list