mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
ARI recordings: Issue HTTP failures for recording requests with file conflicts
If a file already exists in the recordings directory with the same name as what we would record, issue a 422 instead of relying on the internal failure and issuing success. (closes issue ASTERISK-22623) Reported by: Joshua Colp Review: https://reviewboard.asterisk.org/r/2922/ ........ Merged revisions 401973 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -862,6 +862,60 @@ int ast_ari_validate_playback_started(struct ast_json *json);
|
||||
*/
|
||||
ari_validator ast_ari_validate_playback_started_fn(void);
|
||||
|
||||
/*!
|
||||
* \brief Validator for RecordingFailed.
|
||||
*
|
||||
* Event showing failure of a recording operation.
|
||||
*
|
||||
* \param json JSON object to validate.
|
||||
* \returns True (non-zero) if valid.
|
||||
* \returns False (zero) if invalid.
|
||||
*/
|
||||
int ast_ari_validate_recording_failed(struct ast_json *json);
|
||||
|
||||
/*!
|
||||
* \brief Function pointer to ast_ari_validate_recording_failed().
|
||||
*
|
||||
* See \ref ast_ari_model_validators.h for more details.
|
||||
*/
|
||||
ari_validator ast_ari_validate_recording_failed_fn(void);
|
||||
|
||||
/*!
|
||||
* \brief Validator for RecordingFinished.
|
||||
*
|
||||
* Event showing the completion of a recording operation.
|
||||
*
|
||||
* \param json JSON object to validate.
|
||||
* \returns True (non-zero) if valid.
|
||||
* \returns False (zero) if invalid.
|
||||
*/
|
||||
int ast_ari_validate_recording_finished(struct ast_json *json);
|
||||
|
||||
/*!
|
||||
* \brief Function pointer to ast_ari_validate_recording_finished().
|
||||
*
|
||||
* See \ref ast_ari_model_validators.h for more details.
|
||||
*/
|
||||
ari_validator ast_ari_validate_recording_finished_fn(void);
|
||||
|
||||
/*!
|
||||
* \brief Validator for RecordingStarted.
|
||||
*
|
||||
* Event showing the start of a recording operation.
|
||||
*
|
||||
* \param json JSON object to validate.
|
||||
* \returns True (non-zero) if valid.
|
||||
* \returns False (zero) if invalid.
|
||||
*/
|
||||
int ast_ari_validate_recording_started(struct ast_json *json);
|
||||
|
||||
/*!
|
||||
* \brief Function pointer to ast_ari_validate_recording_started().
|
||||
*
|
||||
* See \ref ast_ari_model_validators.h for more details.
|
||||
*/
|
||||
ari_validator ast_ari_validate_recording_started_fn(void);
|
||||
|
||||
/*!
|
||||
* \brief Validator for StasisEnd.
|
||||
*
|
||||
@@ -1112,6 +1166,13 @@ ari_validator ast_ari_validate_application_fn(void);
|
||||
* - application: string (required)
|
||||
* - timestamp: Date
|
||||
* - playback: Playback (required)
|
||||
* RecordingFailed
|
||||
* - cause: string (required)
|
||||
* - recording: LiveRecording (required)
|
||||
* RecordingFinished
|
||||
* - recording: LiveRecording (required)
|
||||
* RecordingStarted
|
||||
* - recording: LiveRecording (required)
|
||||
* StasisEnd
|
||||
* - type: string (required)
|
||||
* - application: string (required)
|
||||
|
Reference in New Issue
Block a user