Merge 723da4b5fc
into 5cb74797fe
This commit is contained in:
commit
cf419eec10
|
@ -155,6 +155,8 @@ SWITCH_BEGIN_EXTERN_C
|
|||
#define SWITCH_CHANNEL_EXECUTE_ON_ORIGINATE_VARIABLE "execute_on_originate"
|
||||
#define SWITCH_CHANNEL_EXECUTE_ON_POST_ORIGINATE_VARIABLE "execute_on_post_originate"
|
||||
#define SWITCH_CHANNEL_EXECUTE_ON_PRE_ORIGINATE_VARIABLE "execute_on_pre_originate"
|
||||
#define SWITCH_CHANNEL_EXECUTE_ON_HOLD_VARIABLE "execute_on_hold"
|
||||
#define SWITCH_CHANNEL_EXECUTE_ON_UNHOLD_VARIABLE "execute_on_unhold"
|
||||
|
||||
#define SWITCH_CHANNEL_EXECUTE_ON_PRE_BRIDGE_VARIABLE "execute_on_pre_bridge"
|
||||
#define SWITCH_CHANNEL_EXECUTE_ON_POST_BRIDGE_VARIABLE "execute_on_post_bridge"
|
||||
|
@ -167,6 +169,8 @@ SWITCH_BEGIN_EXTERN_C
|
|||
#define SWITCH_CHANNEL_API_ON_ORIGINATE_VARIABLE "api_on_originate"
|
||||
#define SWITCH_CHANNEL_API_ON_POST_ORIGINATE_VARIABLE "api_on_post_originate"
|
||||
#define SWITCH_CHANNEL_API_ON_PRE_ORIGINATE_VARIABLE "api_on_pre_originate"
|
||||
#define SWITCH_CHANNEL_API_ON_HOLD_VARIABLE "api_on_hold"
|
||||
#define SWITCH_CHANNEL_API_ON_UNHOLD_VARIABLE "api_on_unhold"
|
||||
|
||||
#define SWITCH_CALL_TIMEOUT_VARIABLE "call_timeout"
|
||||
#define SWITCH_HOLDING_UUID_VARIABLE "holding_uuid"
|
||||
|
|
|
@ -868,8 +868,12 @@ SWITCH_DECLARE(void) switch_channel_mark_hold(switch_channel_t *channel, switch_
|
|||
|
||||
if (on) {
|
||||
switch_channel_set_flag(channel, CF_LEG_HOLDING);
|
||||
switch_channel_execute_on(channel, SWITCH_CHANNEL_EXECUTE_ON_HOLD_VARIABLE);
|
||||
switch_channel_api_on(channel, SWITCH_CHANNEL_API_ON_HOLD_VARIABLE);
|
||||
} else {
|
||||
switch_channel_clear_flag(channel, CF_LEG_HOLDING);
|
||||
switch_channel_execute_on(channel, SWITCH_CHANNEL_EXECUTE_ON_UNHOLD_VARIABLE);
|
||||
switch_channel_api_on(channel, SWITCH_CHANNEL_API_ON_UNHOLD_VARIABLE);
|
||||
}
|
||||
|
||||
if (switch_event_create(&event, on ? SWITCH_EVENT_CHANNEL_HOLD : SWITCH_EVENT_CHANNEL_UNHOLD) == SWITCH_STATUS_SUCCESS) {
|
||||
|
|
|
@ -1555,12 +1555,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_hold(switch_core_session_t *session,
|
|||
}
|
||||
}
|
||||
|
||||
switch_channel_execute_on(channel, SWITCH_CHANNEL_EXECUTE_ON_HOLD_VARIABLE);
|
||||
switch_channel_api_on(channel, SWITCH_CHANNEL_API_ON_HOLD_VARIABLE);
|
||||
|
||||
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_HOLD) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_channel_event_set_data(channel, event);
|
||||
switch_event_fire(&event);
|
||||
}
|
||||
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -1634,6 +1636,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_unhold(switch_core_session_t *session
|
|||
switch_core_session_rwunlock(b_session);
|
||||
}
|
||||
|
||||
switch_channel_execute_on(channel, SWITCH_CHANNEL_EXECUTE_ON_UNHOLD_VARIABLE);
|
||||
switch_channel_api_on(channel, SWITCH_CHANNEL_API_ON_UNHOLD_VARIABLE);
|
||||
|
||||
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_UNHOLD) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_channel_event_set_data(channel, event);
|
||||
|
|
Loading…
Reference in New Issue