]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
now pickup, barge-in and various other things will work with SLA is turned on
authorBrian West <brian@freeswitch.org>
Thu, 14 May 2009 16:56:18 +0000 (16:56 +0000)
committerBrian West <brian@freeswitch.org>
Thu, 14 May 2009 16:56:18 +0000 (16:56 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13306 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia.c

index 09892772c65d1887e74114ec0ecb87991412ff2b..19e11e1cc472ea15b7129cb92536fc023d774673 100644 (file)
@@ -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));
+                               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 {