From 16fc1993ef4612fc610eb72e2c769a7ef6b05144 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Tue, 17 Mar 2009 21:28:04 +0000 Subject: Add support for the "name" option in the CHANNEL() function. Review: http://reviewboard.digium.com/r/199/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182762 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- CHANGES | 6 +++++- funcs/func_channel.c | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 25cb357e6..404248b7e 100644 --- a/CHANGES +++ b/CHANGES @@ -12,12 +12,16 @@ --- Functionality changes from Asterisk 1.6.2 to Asterisk 1.6.3 ------------- ------------------------------------------------------------------------------ - *Applications +Applications ------------ * Added progress option to the app_dial D() option. When progress DTMF is present, those values are sent immediatly upon receiving a PROGRESS message regardless if the call has been answered or not. +Functions +--------- + * The CHANNEL() function now supports the "name" option. + ------------------------------------------------------------------------------ --- Functionality changes from Asterisk 1.6.1 to Asterisk 1.6.2 ------------- ------------------------------------------------------------------------------ diff --git a/funcs/func_channel.c b/funcs/func_channel.c index ff8eeb2e5..5cf262154 100644 --- a/funcs/func_channel.c +++ b/funcs/func_channel.c @@ -83,6 +83,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") R/W class (from musiconhold.conf) for hold music. + + The name of the channel + R/W parkinglot for parking. @@ -249,7 +252,9 @@ 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")) + else if (!strcasecmp(data, "name")) { + locked_copy_string(chan, buf, chan->name, 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); -- cgit v1.2.3