From 76776ff217a3d47a4c37d1bdf5c1fe19557897aa Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 20 Apr 2010 16:50:40 -0500 Subject: [PATCH] add outbound_redirect_fatal --- src/mod/endpoints/mod_sofia/sofia.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 89940a8cd7..8338663e30 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -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");