]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
make invites use the same contact as the gateway when using a gateway to make calls
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 4 Apr 2007 16:44:08 +0000 (16:44 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 4 Apr 2007 16:44:08 +0000 (16:44 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4847 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.h
src/mod/endpoints/mod_sofia/sofia_glue.c

index 4fb5aca37a2be966b9485532a1c6b47edb9386ff..10326be011656a340d44ca09a83692597e0b1b6b 100644 (file)
@@ -888,6 +888,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
                } else {
                        tech_pvt->dest = switch_core_session_sprintf(nsession, "sip:%s", dest);
                }
+               tech_pvt->invite_contact = switch_core_session_strdup(nsession, gateway_ptr->register_contact);
        } else {
                if (!(dest = strchr(profile_name, '/'))) {
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid URL\n");
index 6ec4b9669cdb1d545e5f52699ebf0b66b67a2f8d..05a17e08e66a75b73197275bc73904daf546d592 100644 (file)
@@ -286,6 +286,7 @@ struct private_object {
        char *chat_to;
        char *e_dest;
        char *call_id;
+       char *invite_contact;
        unsigned long rm_rate;
        switch_payload_t pt;
        switch_mutex_t *flag_mutex;
index d4353eb538892a09134b115c3ecd3402a261479f..fd5d52391ec85775fd339b4d8b68d30a1ce08a07 100644 (file)
@@ -472,7 +472,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
                           TAG_IF(!switch_strlen_zero(alert_info), SIPTAG_HEADER_STR(alert_info)),
                           TAG_IF(!switch_strlen_zero(extra_headers), SIPTAG_HEADER_STR(extra_headers)),
                           TAG_IF(!switch_strlen_zero(max_forwards), SIPTAG_MAX_FORWARDS_STR(max_forwards)),
-                          //SIPTAG_CONTACT_STR(tech_pvt->profile->url),
+                          TAG_IF(tech_pvt->invite_contact, SIPTAG_CONTACT_STR(tech_pvt->invite_contact)),
                           SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str),
                           SOATAG_RTP_SORT(SOA_RTP_SORT_REMOTE),
                           SOATAG_RTP_SELECT(SOA_RTP_SELECT_ALL), TAG_IF(rep, SIPTAG_REPLACES_STR(rep)), SOATAG_HOLD(holdstr), TAG_END());