]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweak
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 1 Jun 2007 23:48:06 +0000 (23:48 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 1 Jun 2007 23:48:06 +0000 (23:48 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5247 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia.c

index 7bdd5e662781cd8c699742256efe27976a2f7c94..a8646a0c5e0dcabb3dd5b03d94fcd7f9d38c8db6 100644 (file)
@@ -581,8 +581,9 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag)
                                switch_set_flag(gateway, REG_FLAG_CALLERID);
                        }
                        gateway->register_from = switch_core_sprintf(gateway->pool, "sip:%s@%s", username, from_domain);
-                       gateway->register_contact = switch_core_sprintf(gateway->pool, "sip:%s@%s:%d", extension, profile->sipip, profile->sip_port);
-
+                       gateway->register_contact = switch_core_sprintf(gateway->pool, "sip:%s@%s:%d", extension,
+                                                                                                                       profile->extsipip ? profile->extsipip : profile->sipip, profile->sip_port);
+                       
                        if (!strncasecmp(proxy, "sip:", 4)) {
                                gateway->register_proxy = switch_core_strdup(gateway->pool, proxy);
                                gateway->register_to = switch_core_sprintf(gateway->pool, "sip:%s@%s", username, proxy + 4);