From: karl anderson Date: Thu, 2 Apr 2015 23:25:25 +0000 (-0400) Subject: FS-7759 #resolve added a channel var to suppress setting the completed elsewhere... X-Git-Tag: v1.6.2~354^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46d98d4a19cffdf77d181a45a6edcd5bc92f211b;p=thirdparty%2Ffreeswitch.git FS-7759 #resolve added a channel var to suppress setting the completed elsewhere cause --- 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));