From 46d98d4a19cffdf77d181a45a6edcd5bc92f211b Mon Sep 17 00:00:00 2001 From: karl anderson Date: Thu, 2 Apr 2015 19:25:25 -0400 Subject: [PATCH] FS-7759 #resolve added a channel var to suppress setting the completed elsewhere cause --- src/mod/endpoints/mod_sofia/mod_sofia.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 89c88c7b43..a90ec9c2ca 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -462,7 +462,8 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session) if ((val = switch_channel_get_variable(tech_pvt->channel, "sip_reason"))) { switch_snprintf(reason, sizeof(reason), "%s", val); } else { - if (switch_channel_test_flag(channel, CF_INTERCEPT) || cause == SWITCH_CAUSE_PICKED_OFF || cause == SWITCH_CAUSE_LOSE_RACE) { + if ((switch_channel_test_flag(channel, CF_INTERCEPT) || cause == SWITCH_CAUSE_PICKED_OFF || cause == SWITCH_CAUSE_LOSE_RACE) + && switch_false(switch_channel_get_variable(channel, "ignore_completed_elsewhere"))) { switch_snprintf(reason, sizeof(reason), "SIP;cause=200;text=\"Call completed elsewhere\""); } else if (cause > 0 && cause < 128) { switch_snprintf(reason, sizeof(reason), "Q.850;cause=%d;text=\"%s\"", cause, switch_channel_cause2str(cause));