]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4016 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 28 Mar 2012 17:24:19 +0000 (12:24 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 28 Mar 2012 17:24:19 +0000 (12:24 -0500)
src/mod/endpoints/mod_sofia/sofia.c

index a915a61b9963ba2df85d622f2d2bc887171a564c..a8196a2d316641dbab7afd18dd3f102c6744f3f0 100644 (file)
@@ -5033,14 +5033,16 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
                                        }
 
                                        if (sofia_test_pflag(profile, PFLAG_MANUAL_REDIRECT)) {
-                                               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Redirect: Transfering to %s %s %s\n",
-                                                                                 p_contact->m_url->url_user, sip_redirect_dialplan, sip_redirect_context);
+                                               if (!(v = switch_channel_get_variable(channel, "outbound_redirect_info"))) {
+                                                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Redirect: Transfering to %s %s %s\n",
+                                                                                         p_contact->m_url->url_user, sip_redirect_dialplan, sip_redirect_context);
 
-                                               if (switch_true(switch_channel_get_variable(channel, "recording_follow_transfer"))) {
-                                                       switch_core_media_bug_transfer_recordings(session, a_session);
-                                               }
+                                                       if (switch_true(switch_channel_get_variable(channel, "recording_follow_transfer"))) {
+                                                               switch_core_media_bug_transfer_recordings(session, a_session);
+                                                       }
 
-                                               switch_ivr_session_transfer(a_session, p_contact->m_url->url_user, sip_redirect_dialplan, sip_redirect_context);
+                                                       switch_ivr_session_transfer(a_session, p_contact->m_url->url_user, sip_redirect_dialplan, sip_redirect_context);
+                                               }
                                                switch_channel_hangup(channel, SWITCH_CAUSE_REDIRECTION_TO_NEW_DESTINATION);
                                        } else if ((!strcmp(profile->sipip, p_contact->m_url->url_host))
                                                           || (profile->extsipip && !strcmp(profile->extsipip, p_contact->m_url->url_host))