mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 07:45:26 +00:00
Correctly handle a transport= parameter passed via destination url to mod_sofia
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6883 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
86da61bc8f
commit
da75a96ec5
@ -701,18 +701,19 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user