diff options
author | Joshua Colp <jcolp@digium.com> | 2013-11-13 23:11:32 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2013-11-13 23:11:32 +0000 |
commit | 67b650543c3ea59418bf159323d7244c343f85f6 (patch) | |
tree | 5c7e3cc32898eabb207393983cab28d72f1f6a39 /res/stasis/control.c | |
parent | f6593b4156b0daa0a74f1f04dc062a6b24acab6c (diff) |
res_ari_channels: Add the ability to stop locally generated ringing on a channel.
Using the 'ring' operation it is possible to start locally generated ringback if
the channel is answered. This change adds the ability to stop it by using DELETE.
........
Merged revisions 402804 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/stasis/control.c')
-rw-r--r-- | res/stasis/control.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/res/stasis/control.c b/res/stasis/control.c index 6c61df061..868aff5ea 100644 --- a/res/stasis/control.c +++ b/res/stasis/control.c @@ -341,6 +341,21 @@ int stasis_app_control_ring(struct stasis_app_control *control) return 0; } +static void *app_control_ring_stop(struct stasis_app_control *control, + struct ast_channel *chan, void *data) +{ + ast_indicate(control->channel, -1); + + return NULL; +} + +int stasis_app_control_ring_stop(struct stasis_app_control *control) +{ + stasis_app_send_command_async(control, app_control_ring_stop, NULL); + + return 0; +} + struct stasis_app_control_mute_data { enum ast_frame_type frametype; unsigned int direction; |