FS-11625: [core]: Do not hangup sessions that have transfer or park after bridge set.

This commit is contained in:
Brian West 2019-01-22 16:54:01 -06:00 committed by Mike Jerris
parent 0c73aa82da
commit 96c8cb0473

View File

@ -1259,7 +1259,20 @@ static switch_status_t uuid_bridge_on_soft_execute(switch_core_session_t *sessio
switch_channel_set_state(channel, CS_EXECUTE);
}
} else {
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
int hup = 1;
const char *var;
if (switch_true(switch_channel_get_variable(channel, SWITCH_PARK_AFTER_BRIDGE_VARIABLE))) {
switch_ivr_park_session(session);
hup = 0;
} else if ((var = switch_channel_get_variable(channel, SWITCH_TRANSFER_AFTER_BRIDGE_VARIABLE))) {
transfer_after_bridge(session, var);
hup = 0;
}
if (hup) {
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
}
}
done: