add park_after_bridge variable
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10287 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
c5178a5ba1
commit
cf36f64573
|
@ -153,6 +153,7 @@ SWITCH_BEGIN_EXTERN_C
|
|||
#define SWITCH_LOCAL_VIDEO_IP_VARIABLE "local_video_ip"
|
||||
#define SWITCH_LOCAL_VIDEO_PORT_VARIABLE "local_video_port"
|
||||
#define SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE "hangup_after_bridge"
|
||||
#define SWITCH_PARK_AFTER_BRIDGE_VARIABLE "park_after_bridge"
|
||||
#define SWITCH_EXEC_AFTER_BRIDGE_APP_VARIABLE "exec_after_bridge_app"
|
||||
#define SWITCH_EXEC_AFTER_BRIDGE_ARG_VARIABLE "exec_after_bridge_arg"
|
||||
#define SWITCH_MAX_FORWARDS_VARIABLE "max_forwards"
|
||||
|
|
|
@ -939,9 +939,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
|
|||
|
||||
if (!switch_channel_test_flag(caller_channel, CF_TRANSFER) && !a_leg->clean_exit && !inner_bridge) {
|
||||
if ((state != CS_EXECUTE && state != CS_SOFT_EXECUTE && state != CS_PARK && state != CS_ROUTING) ||
|
||||
(switch_channel_test_flag(peer_channel, CF_ANSWERED) && state < CS_HANGUP &&
|
||||
switch_true(switch_channel_get_variable(caller_channel, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE)))) {
|
||||
switch_channel_hangup(caller_channel, switch_channel_get_cause(peer_channel));
|
||||
(switch_channel_test_flag(peer_channel, CF_ANSWERED) && state < CS_HANGUP)) {
|
||||
if (switch_true(switch_channel_get_variable(caller_channel, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE))) {
|
||||
switch_channel_hangup(caller_channel, switch_channel_get_cause(peer_channel));
|
||||
} else if (switch_true(switch_channel_get_variable(caller_channel, SWITCH_PARK_AFTER_BRIDGE_VARIABLE))) {
|
||||
switch_ivr_park_session(session);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue