[Freeswitch-svn] [commit] r13306 - freeswitch/trunk/src/mod/endpoints/mod_sofia

FreeSWITCH SVN brian at freeswitch.org
Thu May 14 09:56:18 PDT 2009


Author: brian
Date: Thu May 14 11:56:18 2009
New Revision: 13306

Log:
 now pickup, barge-in and various other things will work with SLA is turned on 

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	Thu May 14 11:56:18 2009
@@ -4575,16 +4575,21 @@
 					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));
+				if (sofia_test_pflag(profile, PFLAG_MANAGE_SHARED_APPEARANCE)) {
+					tech_pvt->reply_contact = switch_core_session_sprintf(session, "<sip:%s@%s>", user, host);
+				} 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));
+						}
 					} else {
-						tech_pvt->reply_contact = switch_core_session_sprintf(session, "<%s;transport=%s>", url, sofia_glue_transport2str(transport));
+						switch_channel_hangup(tech_pvt->channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
 					}
-				} else {
-					switch_channel_hangup(tech_pvt->channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
 				}
 			}
 		} else {



More information about the Freeswitch-svn mailing list