[Freeswitch-svn] [commit] r6883 - freeswitch/trunk/src/mod/endpoints/mod_sofia
Freeswitch SVN
stkn at freeswitch.org
Tue Dec 18 17:06:21 EST 2007
Author: stkn
Date: Tue Dec 18 17:06:20 2007
New Revision: 6883
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
Log:
Correctly handle a transport= parameter passed via destination url to mod_sofia
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Tue Dec 18 17:06:20 2007
@@ -701,18 +701,19 @@
rpid_domain = "cluecon.com";
}
- if (switch_stristr("port=tcp", url)) {
- transport = SOFIA_TRANSPORT_TCP;
+ if ((p = (char *)switch_stristr("port=", url))) {
+ p += 5;
+ transport = sofia_glue_str2transport( p );
} else {
if ((t_var = switch_channel_get_variable(channel, "sip_transport"))) {
- sofia_transport_t t_val;
-
- if ((t_val = sofia_glue_str2transport(t_var)) != SOFIA_TRANSPORT_UNKNOWN) {
- transport = t_val;
- }
+ transport = sofia_glue_str2transport(t_var);
}
}
+ if (transport == SOFIA_TRANSPORT_UNKNOWN) {
+ transport = SOFIA_TRANSPORT_UDP;
+ }
+
if (switch_strlen_zero(tech_pvt->invite_contact)) {
if (sofia_glue_transport_has_tls(transport))
tech_pvt->invite_contact = tech_pvt->profile->tls_url;
More information about the Freeswitch-svn
mailing list