]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
put transport in the request uri on outbound registers if register_transport is set...
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 17 Feb 2011 17:32:00 +0000 (11:32 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 17 Feb 2011 17:32:00 +0000 (11:32 -0600)
src/mod/endpoints/mod_sofia/sofia.c

index 825d1bf46e1d6a888373ac5bf7b592a7df05ae82..e9d2cada2e9b4219a7c8082da3fea6df04c6899e 100644 (file)
@@ -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, "<sip:%s@%s;transport=%s>",
                                                                                                                 from_user, !zstr(from_domain) ? from_domain : proxy, register_transport);