mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-01 11:32:25 +00:00
ARI: Add the ability to download the media associated with a stored recording
This patch adds a new feature to ARI that allows a client to download
the media associated with a stored recording. The new route is
/recordings/stored/{name}/file, and transmits the underlying binary file
using Asterisk's HTTP server's underlying file transfer facilities.
Because this REST route returns non-JSON, a few small enhancements had
to be made to the Python Swagger generation code, as well as the
mustache templates that generate the ARI bindings.
ASTERISK-26042 #close
Change-Id: I49ec5c4afdec30bb665d9c977ab423b5387e0181
This commit is contained in:
@@ -91,7 +91,12 @@ static void ast_ari_{{c_name}}_{{c_nickname}}_cb(
|
||||
#endif /* AST_DEVMODE */
|
||||
|
||||
{{> param_parsing}}
|
||||
{{^is_binary_response}}
|
||||
ast_ari_{{c_name}}_{{c_nickname}}(headers, &args, response);
|
||||
{{/is_binary_response}}
|
||||
{{#is_binary_response}}
|
||||
ast_ari_{{c_name}}_{{c_nickname}}(ser, headers, &args, response);
|
||||
{{/is_binary_response}}
|
||||
#if defined(AST_DEVMODE)
|
||||
code = response->response_code;
|
||||
|
||||
@@ -114,8 +119,14 @@ static void ast_ari_{{c_name}}_{{c_nickname}}_cb(
|
||||
ast_ari_validate_{{c_singular_name}}_fn());
|
||||
{{/is_list}}
|
||||
{{^is_list}}
|
||||
{{^is_binary_response}}
|
||||
is_valid = ast_ari_validate_{{c_name}}(
|
||||
response->message);
|
||||
{{/is_binary_response}}
|
||||
{{#is_binary_response}}
|
||||
/* No validation on a raw binary response */
|
||||
is_valid = 1;
|
||||
{{/is_binary_response}}
|
||||
{{/is_list}}
|
||||
{{/response_class}}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user