ARI: Add recording controls

This patch implements the controls from ARI recordings. The controls
are:

 * DELETE /recordings/live/{recordingName} - stop recording and
   discard it
 * POST /recordings/live/{recordingName}/stop - stop recording
 * POST /recordings/live/{recordingName}/pause - pause recording
 * POST /recordings/live/{recordingName}/unpause - resume recording
 * POST /recordings/live/{recordingName}/mute - mute recording (record
   silence to the file)
 * POST /recordings/live/{recordingName}/unmute - unmute recording.

Since this underlying functionality did not already exist, is was
added to app.c by a set of control frames, similar to how playback
control works. The pause/mute control frames are toggles, even though
the ARI controls are idempotent, to be consistent with the playback
control frames.

(closes issue ASTERISK-22181)
Review: https://reviewboard.asterisk.org/r/2697/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
David M. Lee
2013-08-06 14:44:45 +00:00
parent b97d318b7b
commit c790848794
13 changed files with 466 additions and 38 deletions

View File

@@ -87,6 +87,12 @@
"allowMultiple": false,
"dataType": "string"
}
],
"errorResponses": [
{
"code": 404,
"reason": "Recording not found"
}
]
},
{
@@ -103,6 +109,12 @@
"allowMultiple": false,
"dataType": "string"
}
],
"errorResponses": [
{
"code": 404,
"reason": "Recording not found"
}
]
}
]
@@ -124,6 +136,12 @@
"allowMultiple": false,
"dataType": "string"
}
],
"errorResponses": [
{
"code": 404,
"reason": "Recording not found"
}
]
}
]
@@ -134,7 +152,7 @@
{
"httpMethod": "POST",
"summary": "Pause a live recording.",
"notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused.",
"notes": "Pausing a recording suspends silence detection, which will be restarted when the recording is unpaused. Paused time is not included in the accounting for maxDurationSeconds.",
"nickname": "pauseRecording",
"responseClass": "void",
"parameters": [
@@ -146,6 +164,16 @@
"allowMultiple": false,
"dataType": "string"
}
],
"errorResponses": [
{
"code": 404,
"reason": "Recording not found"
},
{
"code": 409,
"reason": "Recording not in session"
}
]
}
]
@@ -167,6 +195,16 @@
"allowMultiple": false,
"dataType": "string"
}
],
"errorResponses": [
{
"code": 404,
"reason": "Recording not found"
},
{
"code": 409,
"reason": "Recording not in session"
}
]
}
]
@@ -189,6 +227,16 @@
"allowMultiple": false,
"dataType": "string"
}
],
"errorResponses": [
{
"code": 404,
"reason": "Recording not found"
},
{
"code": 409,
"reason": "Recording not in session"
}
]
}
]
@@ -210,6 +258,16 @@
"allowMultiple": false,
"dataType": "string"
}
],
"errorResponses": [
{
"code": 404,
"reason": "Recording not found"
},
{
"code": 409,
"reason": "Recording not in session"
}
]
}
]