]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
sigh
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 5 Oct 2006 14:45:56 +0000 (14:45 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 5 Oct 2006 14:45:56 +0000 (14:45 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2980 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c

index 99579cbc46f6742021b8592cacd358e18bc899aa..acc0b96c0653f8f3f9d4d46928c99d42604741c8 100644 (file)
@@ -1729,13 +1729,15 @@ static void sip_i_state(int status,
        switch_channel_t *channel = NULL;
        private_object_t *tech_pvt = NULL;
        switch_core_session_t *session = sofia_private ? sofia_private->session : NULL;
-       
+       const char *replaces_str;
+
        tl_gets(tags, 
                        NUTAG_CALLSTATE_REF(ss_state),
                        NUTAG_OFFER_RECV_REF(offer_recv),
                        NUTAG_ANSWER_RECV_REF(answer_recv),
                        NUTAG_OFFER_SENT_REF(offer_sent),
                        NUTAG_ANSWER_SENT_REF(answer_sent),
+                       SIPTAG_REPLACES_STR_REF(replaces_str),
                        SOATAG_LOCAL_SDP_STR_REF(l_sdp),
                        SOATAG_REMOTE_SDP_STR_REF(r_sdp),
                        TAG_END()); 
@@ -1821,12 +1823,14 @@ static void sip_i_state(int status,
 
                                if (match) {
                                        nua_handle_t *bnh;
-
+                                       sip_replaces_t *replaces;
+                                       
                                        switch_channel_set_variable(channel, "endpoint_disposition", "RECEIVED");
                                        switch_channel_set_state(channel, CS_INIT);
                                        switch_set_flag_locked(tech_pvt, TFLAG_READY);
                                        switch_core_session_thread_launch(session);
-                                       if (sip->sip_replaces && (bnh = nua_handle_by_replaces(nua, sip->sip_replaces))) {
+
+                                       if (replaces_str && (replaces = sip_replaces_make(tech_pvt->home, replaces_str)) && (bnh = nua_handle_by_replaces(nua, replaces))) {
                                                sofia_private_t *b_private;
 
                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Processing Attended Transfer\n");