summaryrefslogtreecommitdiff
path: root/funcs/func_channel.c
diff options
context:
space:
mode:
authorJeff Peeler <jpeeler@digium.com>2008-04-21 23:42:45 +0000
committerJeff Peeler <jpeeler@digium.com>2008-04-21 23:42:45 +0000
commit41fd7a6a21fc870f75ceb219d130e0bd6519636c (patch)
tree5ea0c0e4501835ff0a5f3ba5d5857d07de851abb /funcs/func_channel.c
parentf773e294f17bf2460b1dee4b46a78aa8e59fbb68 (diff)
(closes issue #6113)
Reported by: oej Tested by: jpeeler This patch implements multiple parking lots for parked calls. The default parkinglot is used by default, however setting the channel variable PARKINGLOT in the dialplan will allow use of any other configured parkinglot. See configs/features.conf.sample for more details on setting up another non-default parkinglot. Also, one can (currently) set the default parkinglot to use in the driver configuration file via the parkinglot option. Patch initially written by oej, brought up to date and finalized by mvanbaak, and then stabilized and converted to astobj2 by me. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'funcs/func_channel.c')
-rw-r--r--funcs/func_channel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/funcs/func_channel.c b/funcs/func_channel.c
index 42b3c68c9..8388d7fa6 100644
--- a/funcs/func_channel.c
+++ b/funcs/func_channel.c
@@ -84,6 +84,8 @@ static int func_channel_read(struct ast_channel *chan, const char *function,
locked_copy_string(chan, buf, chan->language, len);
else if (!strcasecmp(data, "musicclass"))
locked_copy_string(chan, buf, chan->musicclass, len);
+ else if (!strcasecmp(data, "parkinglot"))
+ locked_copy_string(chan, buf, chan->parkinglot, len);
else if (!strcasecmp(data, "state"))
locked_copy_string(chan, buf, ast_state2str(chan->_state), len);
else if (!strcasecmp(data, "channeltype"))
@@ -110,6 +112,8 @@ static int func_channel_write(struct ast_channel *chan, const char *function,
if (!strcasecmp(data, "language"))
locked_string_field_set(chan, language, value);
+ else if (!strcasecmp(data, "parkinglot"))
+ locked_string_field_set(chan, parkinglot, value);
else if (!strcasecmp(data, "musicclass"))
locked_string_field_set(chan, musicclass, value);
#ifdef CHANNEL_TRACE
@@ -172,6 +176,7 @@ static struct ast_custom_function channel_function = {
"R/O channeltype technology used for channel\n"
"R/W language language for sounds played\n"
"R/W musicclass class (from musiconhold.conf) for hold music\n"
+ "R/W parkinglot parkinglot for parking\n"
"R/W rxgain set rxgain level on channel drivers that support it\n"
"R/O state state for channel\n"
"R/W tonezone zone for indications played\n"