ARI: Implement channel hold/unhold.

This puts the channel on hold (rather than queueing a frame from the channel).

(closes issue ASTERISK-21619)

Review: https://reviewboard.asterisk.org/r/2647/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jason Parker
2013-07-01 18:56:21 +00:00
parent f41faf0b7d
commit f820d24db1
3 changed files with 61 additions and 2 deletions

View File

@@ -207,6 +207,32 @@ int stasis_app_control_continue(struct stasis_app_control *control, const char *
return 0;
}
static void *app_control_hold(struct stasis_app_control *control,
struct ast_channel *chan, void *data)
{
ast_indicate(control->channel, AST_CONTROL_HOLD);
return NULL;
}
void stasis_app_control_hold(struct stasis_app_control *control)
{
stasis_app_send_command_async(control, app_control_hold, NULL);
}
static void *app_control_unhold(struct stasis_app_control *control,
struct ast_channel *chan, void *data)
{
ast_indicate(control->channel, AST_CONTROL_UNHOLD);
return NULL;
}
void stasis_app_control_unhold(struct stasis_app_control *control)
{
stasis_app_send_command_async(control, app_control_unhold, NULL);
}
struct ast_channel_snapshot *stasis_app_control_get_snapshot(
const struct stasis_app_control *control)
{