From a0875bef1883c0fafd805005f0dd8cfc19688b33 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 5 Apr 2007 14:58:07 +0000 Subject: [PATCH] fix contact thing for gateway calls git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4860 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia_glue.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index fd5d52391e..df2f43fdff 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -416,7 +416,10 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session) char *url = sofia_glue_get_url_from_contact(tech_pvt->dest, 1); tech_pvt->nh = nua_handle(tech_pvt->profile->nua, NULL, NUTAG_URL(url), - SIPTAG_TO_STR(tech_pvt->dest_to), SIPTAG_FROM_STR(tech_pvt->from_str), SIPTAG_CONTACT_STR(tech_pvt->profile->url), + SIPTAG_TO_STR(tech_pvt->dest_to), + SIPTAG_FROM_STR(tech_pvt->from_str), + TAG_IF(tech_pvt->invite_contact, SIPTAG_CONTACT_STR(tech_pvt->invite_contact)), + TAG_IF(!tech_pvt->invite_contact, SIPTAG_CONTACT_STR(tech_pvt->profile->url)), TAG_END()); switch_safe_free(url); @@ -472,7 +475,6 @@ 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)), - 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());