From e55965292d165863956b92c80cfffc5295c9258f Mon Sep 17 00:00:00 2001 From: Brian West Date: Thu, 14 May 2009 16:56:18 +0000 Subject: [PATCH] now pickup, barge-in and various other things will work with SLA is turned on git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13306 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 09892772c6..19e11e1cc4 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -4575,16 +4575,21 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_ tech_pvt->reply_contact = switch_core_session_sprintf(session, "<%s>", tech_pvt->to_uri); } } else { - const char *url; - - if ((url = (sofia_glue_transport_has_tls(transport)) ? profile->tls_url : profile->url)) { - if (strchr(url, '>')) { - tech_pvt->reply_contact = switch_core_session_sprintf(session, "%s;transport=%s", url, sofia_glue_transport2str(transport)); - } else { - tech_pvt->reply_contact = switch_core_session_sprintf(session, "<%s;transport=%s>", url, sofia_glue_transport2str(transport)); - } + if (sofia_test_pflag(profile, PFLAG_MANAGE_SHARED_APPEARANCE)) { + tech_pvt->reply_contact = switch_core_session_sprintf(session, "", user, host); } else { - switch_channel_hangup(tech_pvt->channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER); + + const char *url; + + if ((url = (sofia_glue_transport_has_tls(transport)) ? profile->tls_url : profile->url)) { + if (strchr(url, '>')) { + tech_pvt->reply_contact = switch_core_session_sprintf(session, "%s;transport=%s", url, sofia_glue_transport2str(transport)); + } else { + tech_pvt->reply_contact = switch_core_session_sprintf(session, "<%s;transport=%s>", url, sofia_glue_transport2str(transport)); + } + } else { + switch_channel_hangup(tech_pvt->channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER); + } } } } else {