diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-17 21:28:04 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-03-17 21:28:04 +0000 |
commit | 42822e71ab91b4f3cf0a6cbb15ea60b69a8d3d6f (patch) | |
tree | ced71772c0fb3525fb9208e47647cc5a8241f967 /funcs/func_channel.c | |
parent | b122be2dd675062bfdadfe11876db708524879c4 (diff) |
Add support for the "name" option in the CHANNEL() function.
Review: http://reviewboard.digium.com/r/199/
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182762 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs/func_channel.c')
-rw-r--r-- | funcs/func_channel.c | 7 |
1 files changed, 6 insertions, 1 deletions
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$") <enum name="musicclass"> <para>R/W class (from musiconhold.conf) for hold music.</para> </enum> + <enum name="name"> + <para>The name of the channel</para> + </enum> <enum name="parkinglot"> <para>R/W parkinglot for parking.</para> </enum> @@ -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); |