summaryrefslogtreecommitdiff
path: root/res/res_stasis_http_channels.c
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2013-07-03 17:58:45 +0000
committerDavid M. Lee <dlee@digium.com>2013-07-03 17:58:45 +0000
commita75fd32212c35b41143442bd757387fad636177a (patch)
tree461033acf36f4596d8fc9800a1195e12207b3ea2 /res/res_stasis_http_channels.c
parentc4adaf91067559dd5aa90577e181693abade0602 (diff)
ARI - channel recording support
This patch is the first step in adding recording support to the Asterisk REST Interface. Recordings are stored in /var/spool/recording. Since recordings may be destructive (overwriting existing files), the API rejects attempts to escape the recording directory (avoiding issues if someone attempts to record to ../../lib/sounds/greeting, for example). (closes issue ASTERISK-21594) (closes issue ASTERISK-21581) Review: https://reviewboard.asterisk.org/r/2612/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_stasis_http_channels.c')
-rw-r--r--res/res_stasis_http_channels.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/res/res_stasis_http_channels.c b/res/res_stasis_http_channels.c
index ebcc9e880..5343714b1 100644
--- a/res/res_stasis_http_channels.c
+++ b/res/res_stasis_http_channels.c
@@ -765,11 +765,11 @@ static void stasis_http_record_channel_cb(
if (strcmp(i->name, "maxSilenceSeconds") == 0) {
args.max_silence_seconds = atoi(i->value);
} else
- if (strcmp(i->name, "append") == 0) {
- args.append = atoi(i->value);
+ if (strcmp(i->name, "ifExists") == 0) {
+ args.if_exists = (i->value);
} else
if (strcmp(i->name, "beep") == 0) {
- args.beep = atoi(i->value);
+ args.beep = ast_true(i->value);
} else
if (strcmp(i->name, "terminateOn") == 0) {
args.terminate_on = (i->value);
@@ -788,8 +788,9 @@ static void stasis_http_record_channel_cb(
switch (code) {
case 500: /* Internal server error */
+ case 400: /* Invalid parameters */
case 404: /* Channel not found */
- case 409: /* Channel is not in a Stasis application, or the channel is currently bridged with other channels. */
+ case 409: /* Channel is not in a Stasis application; the channel is currently bridged with other channels; A recording with the same name is currently in progress. */
is_valid = 1;
break;
default: