summaryrefslogtreecommitdiff
path: root/main/channel.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 /main/channel.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 'main/channel.c')
-rw-r--r--main/channel.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c
index 9d1ec69c2..3bc5c0a75 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -3029,6 +3029,15 @@ int ast_answer(struct ast_channel *chan)
return __ast_answer(chan, 0);
}
+inline int ast_auto_answer(struct ast_channel *chan)
+{
+ if (ast_channel_state(chan) == AST_STATE_UP) {
+ /* Already answered */
+ return 0;
+ }
+ return ast_answer(chan);
+}
+
int ast_channel_get_duration(struct ast_channel *chan)
{
ast_assert(NULL != chan);