From: Michael Jerris Date: Mon, 15 Jan 2007 03:52:39 +0000 (+0000) Subject: if we define ext-sip-ip in the profile for config, use it for the profile url. This... X-Git-Tag: v1.0-beta1~1356 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2099ef174f32772512874b0499ce831663dac76;p=thirdparty%2Ffreeswitch.git if we define ext-sip-ip in the profile for config, use it for the profile url. This does not yet use stun, or have any method for determining on a call by call basis if a call needs to use the internal or external. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3961 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 4b16c79e19..d7a9f14ad9 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -4952,8 +4952,11 @@ static switch_status_t config_sofia(int reload) if (!profile->sipdomain) { profile->sipdomain = switch_core_strdup(profile->pool, profile->sipip); } - - snprintf(url, sizeof(url), "sip:mod_sofia@%s:%d", profile->sipip, profile->sip_port); + if (profile->extsipip) { + snprintf(url, sizeof(url), "sip:mod_sofia@%s:%d", profile->extsipip, profile->sip_port); + } else { + snprintf(url, sizeof(url), "sip:mod_sofia@%s:%d", profile->sipip, profile->sip_port); + } profile->url = switch_core_strdup(profile->pool, url); } if (profile) {