From e11a32fe80bfec5a0f53adaa1f6bb9e8a68e902a Mon Sep 17 00:00:00 2001 From: Brian West Date: Thu, 4 Jun 2009 16:53:27 +0000 Subject: [PATCH] use user_via if we send a 180 or 183 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13614 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/mod_sofia.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 851e583ee0..7a1e79b366 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -1426,7 +1426,10 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi case SWITCH_MESSAGE_INDICATE_RINGING: if (!switch_channel_test_flag(channel, CF_RING_READY) && !sofia_test_flag(tech_pvt, TFLAG_BYE) && !switch_channel_test_flag(channel, CF_EARLY_MEDIA) && !switch_channel_test_flag(channel, CF_ANSWERED)) { - nua_respond(tech_pvt->nh, SIP_180_RINGING, SIPTAG_CONTACT_STR(tech_pvt->reply_contact), SIPTAG_HEADER_STR(generate_pai_str(session)), TAG_END()); + nua_respond(tech_pvt->nh, SIP_180_RINGING, + TAG_IF(!switch_strlen_zero(tech_pvt->user_via), SIPTAG_VIA_STR(tech_pvt->user_via)), + SIPTAG_CONTACT_STR(tech_pvt->reply_contact), + SIPTAG_HEADER_STR(generate_pai_str(session)), TAG_END()); switch_channel_mark_ring_ready(channel); } break; @@ -1501,6 +1504,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi nua_respond(tech_pvt->nh, SIP_183_SESSION_PROGRESS, NUTAG_AUTOANSWER(0), + TAG_IF(!switch_strlen_zero(tech_pvt->user_via), SIPTAG_VIA_STR(tech_pvt->user_via)), TAG_IF(sticky, NUTAG_PROXY(tech_pvt->record_route)), SIPTAG_HEADER_STR(generate_pai_str(session)), SIPTAG_CONTACT_STR(tech_pvt->reply_contact),