[Freeswitch-branches] [commit] r4161 - freeswitch/branches/anthonyl/fs-branch/src/mod/endpoints/mod_sofia

Freeswitch SVN anthonyl at freeswitch.org
Thu Feb 8 04:53:57 EST 2007


Author: anthonyl
Date: Thu Feb  8 04:53:56 2007
New Revision: 4161

Modified:
   freeswitch/branches/anthonyl/fs-branch/src/mod/endpoints/mod_sofia/mod_sofia.c

Log:
make bindurl udp or tcp secific


Modified: freeswitch/branches/anthonyl/fs-branch/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/branches/anthonyl/fs-branch/src/mod/endpoints/mod_sofia/mod_sofia.c	(original)
+++ freeswitch/branches/anthonyl/fs-branch/src/mod/endpoints/mod_sofia/mod_sofia.c	Thu Feb  8 04:53:56 2007
@@ -5052,7 +5052,11 @@
 				}
 				if (profile->extsipip) {
 					snprintf(url, sizeof(url), "sip:mod_sofia@%s:%d", profile->extsipip, profile->sip_port);
-					snprintf(bindurl, sizeof(url), "sip:mod_sofia@%s:%d", profile->sipip, profile->sip_port);
+					if (profile->transport_udp && profile->transport_tcp) {
+                        snprintf(bindurl, sizeof(url), "sip:mod_sofia@%s:%d", profile->sipip, profile->sip_port);
+                    } else {
+                         snprintf(bindurl, sizeof(url), "sip:mod_sofia@%s:%d;transport=udp", profile->sipip, profile->sip_port, profile->transport_udp ? "udp":"tcp");
+                    }
 					profile->url = switch_core_strdup(profile->pool, url);
 					profile->bindurl = switch_core_strdup(profile->pool, bindurl);
 				} else {



More information about the Freeswitch-branches mailing list