diff options
author | Gregory Nietsky <gregory@distrotech.co.za> | 2011-05-25 15:43:28 +0000 |
---|---|---|
committer | Gregory Nietsky <gregory@distrotech.co.za> | 2011-05-25 15:43:28 +0000 |
commit | e789eb8b2d6d3371ef8d82ac61451a52f0768073 (patch) | |
tree | 0aa7ff9f91b95ffc64b40aebbbfa18cd138eed69 /funcs/func_channel.c | |
parent | 17f9a9154ee86a314cefa60c284794f1c4ce23bd (diff) |
CHANNEL(pickupgroup)
Allow Setting / Reading the pickupgroup of a channel with func_channel.c
(closes issue #19045)
Reported by: irroot
Review: https://reviewboard.asterisk.org/r/1148/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'funcs/func_channel.c')
-rw-r--r-- | funcs/func_channel.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/funcs/func_channel.c b/funcs/func_channel.c index c428a6d61..202036e84 100644 --- a/funcs/func_channel.c +++ b/funcs/func_channel.c @@ -85,6 +85,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") <enum name="callgroup"> <para>R/W call groups for call pickup.</para> </enum> + <enum name="pickupgroup"> + <para>R/W call groups for call pickup.</para> + </enum> <enum name="channeltype"> <para>R/O technology used for channel.</para> </enum> @@ -372,6 +375,9 @@ static int func_channel_read(struct ast_channel *chan, const char *function, } else if (!strcasecmp(data, "callgroup")) { char groupbuf[256]; locked_copy_string(chan, buf, ast_print_group(groupbuf, sizeof(groupbuf), chan->callgroup), len); + } else if (!strcasecmp(data, "pickupgroup")) { + char groupbuf[256]; + locked_copy_string(chan, buf, ast_print_group(groupbuf, sizeof(groupbuf), chan->pickupgroup), len); } else if (!strcasecmp(data, "amaflags")) { char amabuf[256]; snprintf(amabuf,sizeof(amabuf), "%d", chan->amaflags); @@ -457,9 +463,11 @@ static int func_channel_write_real(struct ast_channel *chan, const char *functio ast_channel_unlock(chan); new_zone = ast_tone_zone_unref(new_zone); } - } else if (!strcasecmp(data, "callgroup")) + } else if (!strcasecmp(data, "callgroup")) { chan->callgroup = ast_get_group(value); - else if (!strcasecmp(data, "txgain")) { + } else if (!strcasecmp(data, "pickupgroup")) { + chan->pickupgroup = ast_get_group(value); + } else if (!strcasecmp(data, "txgain")) { sscanf(value, "%4hhd", &gainset); ast_channel_setoption(chan, AST_OPTION_TXGAIN, &gainset, sizeof(gainset), 0); } else if (!strcasecmp(data, "rxgain")) { |