mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-21 09:10:36 +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:
@@ -62,6 +62,24 @@ const char *stasis_app_stored_recording_get_file(
|
||||
return recording->file;
|
||||
}
|
||||
|
||||
const char *stasis_app_stored_recording_get_filename(
|
||||
struct stasis_app_stored_recording *recording)
|
||||
{
|
||||
if (!recording) {
|
||||
return NULL;
|
||||
}
|
||||
return recording->file_with_ext;
|
||||
}
|
||||
|
||||
const char *stasis_app_stored_recording_get_extension(
|
||||
struct stasis_app_stored_recording *recording)
|
||||
{
|
||||
if (!recording) {
|
||||
return NULL;
|
||||
}
|
||||
return recording->format;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Split a path into directory and file, resolving canonical directory.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user