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:
Sven Kube
2025-07-30 14:24:07 +02:00
parent 8bfa3be27f
commit 71b538e79f
6 changed files with 172 additions and 2 deletions

View File

@@ -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)