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:
Jonathan Rose
2013-10-25 21:28:32 +00:00
parent 7b42a6828a
commit d8a760307e
11 changed files with 264 additions and 22 deletions

View File

@@ -120,6 +120,47 @@
}
}
},
"RecordingStarted": {
"id": "RecordingStarted",
"extends": "Event",
"description": "Event showing the start of a recording operation.",
"properties": {
"recording": {
"type": "LiveRecording",
"description": "Recording control object",
"required": true
}
}
},
"RecordingFinished": {
"id": "RecordingFinished",
"extends": "Event",
"description": "Event showing the completion of a recording operation.",
"properties": {
"recording": {
"type": "LiveRecording",
"description": "Recording control object",
"required": true
}
}
},
"RecordingFailed": {
"id": "RecordingFailed",
"extends": "Event",
"description": "Event showing failure of a recording operation.",
"properties": {
"recording": {
"type": "LiveRecording",
"description": "Recording control object",
"required": true
},
"cause": {
"type": "string",
"description": "Cause for the recording failure",
"required": true
}
}
},
"ApplicationReplaced": {
"id": "ApplicationReplaced",
"description": "Notification that another WebSocket has taken over for an application.\n\nAn application may only be subscribed to by a single WebSocket at a time. If multiple WebSockets attempt to subscribe to the same application, the newer WebSocket wins, and the older one receives this event.",