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

@@ -343,6 +343,18 @@ static void print_frame(struct ast_frame *frame)
case AST_CONTROL_STREAM_FORWARD:
ast_verbose("SubClass: STREAM_FORWARD\n");
break;
case AST_CONTROL_RECORD_CANCEL:
ast_verbose("SubClass: RECORD_CANCEL\n");
break;
case AST_CONTROL_RECORD_STOP:
ast_verbose("SubClass: RECORD_STOP\n");
break;
case AST_CONTROL_RECORD_SUSPEND:
ast_verbose("SubClass: RECORD_SUSPEND\n");
break;
case AST_CONTROL_RECORD_MUTE:
ast_verbose("SubClass: RECORD_MUTE\n");
break;
}
if (frame->subclass.integer == -1) {