res_ari_channels: Add ring operation, dtmf operation, hangup reasons, and tweak early media.

The ring operation sends ringing to the specified channel it is invoked on.
The dtmf operation can be used to send DTMF digits to the specified channel
of a specific length with a wait time in between. Finally hangup reasons
allow you to specify why a channel is being hung up (busy, congestion).

Early media behavior has also been tweaked slightly. When playing media to a channel
it will no longer automatically answer. If it has not been answered a progress indication
is sent instead.

(closes issue ASTERISK-22701)
Reported by: Matt Jordan

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2013-11-01 14:37:00 +00:00
parent de407196b8
commit 26458aa615
7 changed files with 473 additions and 3 deletions

View File

@@ -273,6 +273,31 @@ void stasis_app_control_clear_roles(struct stasis_app_control *control);
*/
int stasis_app_control_continue(struct stasis_app_control *control, const char *context, const char *extension, int priority);
/*!
* \brief Indicate ringing to the channel associated with this control.
*
* \param control Control for \c res_stasis.
*
* \return 0 for success.
* \return -1 for error.
*/
int stasis_app_control_ring(struct stasis_app_control *control);
/*!
* \brief Send DTMF to the channel associated with this control.
*
* \param control Control for \c res_stasis.
* \param dtmf DTMF string.
* \param before Amount of time to wait before sending DTMF digits.
* \param between Amount of time between each DTMF digit.
* \param duration Amount of time each DTMF digit lasts for.
* \param after Amount of time to wait after sending DTMF digits.
*
* \return 0 for success.
* \return -1 for error.
*/
int stasis_app_control_dtmf(struct stasis_app_control *control, const char *dtmf, int before, int between, unsigned int duration, int after);
/*!
* \brief Mute the channel associated with this control.
*