mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-06 01:45:11 +00:00
ARI: Add command to indicate progress to a channel
Adds an ARI command to send a progress indication to a channel.
DeveloperNote: A new ARI endpoint is available at `/channels/{channelId}/progress` to indicate progress to a channel.
This commit is contained in:
@@ -401,6 +401,26 @@ void ast_ari_channels_ring_stop(struct ast_variable *headers,
|
||||
ast_ari_response_no_content(response);
|
||||
}
|
||||
|
||||
void ast_ari_channels_progress(struct ast_variable *headers,
|
||||
struct ast_ari_channels_progress_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;
|
||||
}
|
||||
|
||||
if (channel_state_invalid(control, response)) {
|
||||
return;
|
||||
}
|
||||
|
||||
stasis_app_control_progress(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)
|
||||
|
||||
Reference in New Issue
Block a user