]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add outbound_redirect_fatal
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 20 Apr 2010 21:50:40 +0000 (16:50 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 20 Apr 2010 21:50:40 +0000 (16:50 -0500)
src/mod/endpoints/mod_sofia/sofia.c

index 89940a8cd71f3e786536660fd0732e3f01d2bf5d..8338663e301bd5ccd7a6b1973df20a6cc709c06c 100644 (file)
@@ -3752,6 +3752,12 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
                        char *full_contact = NULL;
                        char *invite_contact;
                        const char *br;
+                       const char *v;
+                       
+                       if ((v = switch_channel_get_variable(channel, "outbound_redirect_fatal")) && switch_true(v)) {
+                               switch_channel_hangup(channel, SWITCH_CAUSE_REQUESTED_CHAN_UNAVAIL);
+                               goto end;
+                       }
 
                        if (!p_contact) {
                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Missing contact header in redirect request\n");