mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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
This commit is contained in:
@@ -140,6 +140,22 @@ void ast_ari_channels_ring(struct ast_variable *headers,
|
||||
ast_ari_response_no_content(response);
|
||||
}
|
||||
|
||||
void ast_ari_channels_ring_stop(struct ast_variable *headers,
|
||||
struct ast_ari_channels_ring_stop_args *args,
|
||||
struct ast_ari_response *response)
|
||||
{
|
||||
RAII_VAR(struct stasis_app_control *, control, NULL, ao2_cleanup);
|
||||
|
||||
control = find_control(response, args->channel_id);
|
||||
if (control == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
stasis_app_control_ring_stop(control);
|
||||
|
||||
ast_ari_response_no_content(response);
|
||||
}
|
||||
|
||||
void ast_ari_channels_mute(struct ast_variable *headers,
|
||||
struct ast_ari_channels_mute_args *args,
|
||||
struct ast_ari_response *response)
|
||||
|
@@ -152,6 +152,19 @@ struct ast_ari_channels_ring_args {
|
||||
* \param[out] response HTTP response
|
||||
*/
|
||||
void ast_ari_channels_ring(struct ast_variable *headers, struct ast_ari_channels_ring_args *args, struct ast_ari_response *response);
|
||||
/*! \brief Argument struct for ast_ari_channels_ring_stop() */
|
||||
struct ast_ari_channels_ring_stop_args {
|
||||
/*! \brief Channel's id */
|
||||
const char *channel_id;
|
||||
};
|
||||
/*!
|
||||
* \brief Stop ringing indication on a channel if locally generated.
|
||||
*
|
||||
* \param headers HTTP headers
|
||||
* \param args Swagger parameters
|
||||
* \param[out] response HTTP response
|
||||
*/
|
||||
void ast_ari_channels_ring_stop(struct ast_variable *headers, struct ast_ari_channels_ring_stop_args *args, struct ast_ari_response *response);
|
||||
/*! \brief Argument struct for ast_ari_channels_send_dtmf() */
|
||||
struct ast_ari_channels_send_dtmf_args {
|
||||
/*! \brief Channel's id */
|
||||
|
Reference in New Issue
Block a user