]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
make from use the external sip ip when it is set instead of the bind ip.
authorMichael Jerris <mike@jerris.com>
Mon, 5 Feb 2007 23:48:12 +0000 (23:48 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 5 Feb 2007 23:48:12 +0000 (23:48 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4127 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c

index c239604abff659185f8de11021ef0e717bb95f8d..a388ccb09f8ab9e263eb8cee93cecff33d974cfb 100644 (file)
@@ -975,7 +975,7 @@ static void do_invite(switch_core_session_t *session)
        if ((tech_pvt->from_str = switch_mprintf("\"%s\" <sip:%s@%s>", 
                                                                                                         cid_name,
                                                                                                         cid_num,
-                                                                                                        tech_pvt->profile->sipip
+                                                                                                        tech_pvt->profile->extsipip ? tech_pvt->profile->extsipip : tech_pvt->profile->sipip
                                                                                                         ))) {
 
                char *rep = switch_channel_get_variable(channel, SOFIA_REPLACES_HEADER);
@@ -1085,7 +1085,7 @@ static void do_xfer_invite(switch_core_session_t *session)
        if ((tech_pvt->from_str = switch_mprintf("\"%s\" <sip:%s@%s>", 
                                                                                                         (char *) caller_profile->caller_id_name, 
                                                                                                         (char *) caller_profile->caller_id_number,
-                                                                                                        tech_pvt->profile->sipip
+                                                                                                        tech_pvt->profile->extsipip ? tech_pvt->profile->extsipip : tech_pvt->profile->sipip
                                                                                                         ))) {
 
                char *rep = switch_channel_get_variable(channel, SOFIA_REPLACES_HEADER);