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

FreeSWITCH SVN anthm at freeswitch.org
Mon May 4 07:36:11 PDT 2009


Author: anthm
Date: Mon May  4 09:36:11 2009
New Revision: 13226

Log:
MODENDP-217

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

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	Mon May  4 09:36:11 2009
@@ -819,7 +819,13 @@
 			switch_url_encode(path_val, path_encoded + 9, path_encoded_len - 9);
 		} else if (is_nat) {
 			char my_contact_str[1024];
-			switch_snprintf(my_contact_str, sizeof(my_contact_str), "sip:%s@%s:%d", contact->m_url->url_user, url_ip, network_port);
+			if (sip->sip_contact->m_url->url_params) {
+				switch_snprintf(my_contact_str, sizeof(my_contact_str), "sip:%s@%s:%d;%s", 
+								contact->m_url->url_user, url_ip, network_port, sip->sip_contact->m_url->url_params);
+			} else {
+				switch_snprintf(my_contact_str, sizeof(my_contact_str), "sip:%s@%s:%d", contact->m_url->url_user, url_ip, network_port);
+			}
+
 			path_encoded_len = (strlen(my_contact_str) * 3) + 1;
 
 			switch_zmalloc(path_encoded, path_encoded_len);



More information about the Freeswitch-svn mailing list