From ab803ec3422e5377b5aa4769fbcc6b315d167d8b Mon Sep 17 00:00:00 2001 From: Matthew Jordan Date: Tue, 7 Apr 2015 15:21:17 +0000 Subject: ARI: Add the ability to intercept hold and raise an event For some applications - such as SLA - a phone pressing hold should not behave in the fashion that the Asterisk core would like it to. Instead, the hold action has some application specific behaviour associated with it - such as disconnecting the channel that initiated the hold; only playing MoH to channels in the bridge if the channels are of a particular type, etc. One way of accomplishing this is to use a framehook to intercept the hold/unhold frames, raise an event, and eat the frame. Tasty. This patch accomplishes that using a new dialplan function, HOLD_INTERCEPT. In addition, some general cleanup of raising hold/unhold Stasis messages was done, including removing some RAII_VAR usage. Review: https://reviewboard.asterisk.org/r/4549/ ASTERISK-24922 #close git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434216 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- rest-api/api-docs/events.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'rest-api') diff --git a/rest-api/api-docs/events.json b/rest-api/api-docs/events.json index 1aceb71ed..f5e61f9ad 100644 --- a/rest-api/api-docs/events.json +++ b/rest-api/api-docs/events.json @@ -161,6 +161,8 @@ "ChannelVarset", "ChannelTalkingStarted", "ChannelTalkingFinished", + "ChannelHold", + "ChannelUnhold", "EndpointStateChange", "Dial", "StasisEnd", @@ -598,6 +600,28 @@ } } }, + "ChannelHold": { + "id": "ChannelHold", + "description": "A channel initiated a media hold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the hold event." + } + } + }, + "ChannelUnhold": { + "id": "ChannelUnhold", + "description": "A channel initiated a media unhold.", + "properties": { + "channel": { + "required": true, + "type": "Channel", + "description": "The channel that initiated the unhold event." + } + } + }, "ChannelTalkingStarted": { "id": "ChannelTalkingStarted", "description": "Talking was detected on the channel.", -- cgit v1.2.3