ari: Add a copy operation for stored recordings

This patch adds a new operation for stored recordings, copy. It takes an
existing stored recording and makes a copy of it in the same directory
or a relative directory under the stored recording directory.

/ari/recordings/stored/{recordingName}/copy?destinationRecordingName={copy_name}

This is particularly useful for voicemail-esque applications, which may need to
copy or move recordings around a directory structure.

Review: https://reviewboard.asterisk.org/r/3768/

ASTERISK-24036 #close
Reported by: Sam Galarneau
Tested by: Sam Galarneau


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matthew Jordan
2014-07-18 21:25:59 +00:00
parent 5fa7c03f07
commit 29ca8a873b
7 changed files with 317 additions and 2 deletions

View File

@@ -79,6 +79,19 @@ struct ao2_container *stasis_app_stored_recording_find_all(void);
struct stasis_app_stored_recording *stasis_app_stored_recording_find_by_name(
const char *name);
/*!
* \brief Copy a recording.
*
* \param src_recording The recording to copy
* \param dst The destination of the recording to make
* \param dst_recording If successful, the stored recording created as a result of the copy
*
* \retval 0 on success
* \retval Non-zero on error
*/
int stasis_app_stored_recording_copy(struct stasis_app_stored_recording *src_recording, const char *dst,
struct stasis_app_stored_recording **dst_recording);
/*!
* \brief Delete a recording from disk.
*