From: Anthony Minessale Date: Thu, 17 Feb 2011 17:32:00 +0000 (-0600) Subject: put transport in the request uri on outbound registers if register_transport is set... X-Git-Tag: v1.2-rc1~187^2~1^2~18^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b62ff799e00a30fb898ddea2633d928d0d24eeb;p=thirdparty%2Ffreeswitch.git put transport in the request uri on outbound registers if register_transport is set and proxy does not already contain a transport param --- diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 825d1bf46e..e9d2cada2e 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -2148,8 +2148,13 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag) if (!zstr(from_domain)) { gateway->from_domain = switch_core_strdup(gateway->pool, from_domain); } + + if (!zstr(register_transport) && !switch_stristr("transport=", proxy)) { + gateway->register_url = switch_core_sprintf(gateway->pool, "sip:%s;transport=%s", proxy, register_transport); + } else { + gateway->register_url = switch_core_sprintf(gateway->pool, "sip:%s", proxy); + } - gateway->register_url = switch_core_sprintf(gateway->pool, "sip:%s", proxy); gateway->register_from = switch_core_sprintf(gateway->pool, "", from_user, !zstr(from_domain) ? from_domain : proxy, register_transport);