FS-3634 see if this works

This commit is contained in:
Anthony Minessale 2011-10-25 08:47:01 -05:00
parent 5f8224da8d
commit babe955160
3 changed files with 7 additions and 4 deletions

View File

@ -1189,6 +1189,7 @@ typedef enum {
CF_SIGNAL_DATA,
CF_SIMPLIFY,
CF_ZOMBIE_EXEC,
CF_INTERCEPT,
/* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */
/* IF YOU ADD NEW ONES CHECK IF THEY SHOULD PERSIST OR ZERO THEM IN switch_core_session.c switch_core_session_request_xml() */
CF_FLAG_MAX

View File

@ -489,11 +489,12 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
const char *val = NULL;
val = switch_channel_get_variable(tech_pvt->channel, "disable_q850_reason");
if (!val || switch_true(val)) {
if (cause > 0 && cause < 128) {
switch_snprintf(reason, sizeof(reason), "Q.850;cause=%d;text=\"%s\"", cause, switch_channel_cause2str(cause));
} else if (cause == SWITCH_CAUSE_PICKED_OFF || cause == SWITCH_CAUSE_LOSE_RACE) {
if (switch_false(val)) {
if (switch_channel_test_flag(channel, CF_INTERCEPT) || cause == SWITCH_CAUSE_PICKED_OFF || cause == SWITCH_CAUSE_LOSE_RACE) {
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));
} else {
switch_snprintf(reason, sizeof(reason), "%s;cause=%d;text=\"%s\"", tech_pvt->profile->username, cause, switch_channel_cause2str(cause));
}

View File

@ -1636,6 +1636,7 @@ SWITCH_DECLARE(void) switch_ivr_intercept_session(switch_core_session_t *session
if (bchannel) {
switch_channel_set_state_flag(bchannel, CF_TRANSFER);
switch_channel_set_flag(bchannel, CF_INTERCEPT);
switch_channel_set_state(bchannel, CS_PARK);
}