[svn-commits] russell: trunk r182762 - in /trunk: CHANGES funcs/func_channel.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Mar 17 16:28:23 CDT 2009


Author: russell
Date: Tue Mar 17 16:28:04 2009
New Revision: 182762

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=182762
Log:
Add support for the "name" option in the CHANNEL() function.

Review: http://reviewboard.digium.com/r/199/

Modified:
    trunk/CHANGES
    trunk/funcs/func_channel.c

Modified: trunk/CHANGES
URL: http://svn.digium.com/svn-view/asterisk/trunk/CHANGES?view=diff&rev=182762&r1=182761&r2=182762
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Tue Mar 17 16:28:04 2009
@@ -12,11 +12,15 @@
 --- 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  -------------

Modified: trunk/funcs/func_channel.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/funcs/func_channel.c?view=diff&rev=182762&r1=182761&r2=182762
==============================================================================
--- trunk/funcs/func_channel.c (original)
+++ trunk/funcs/func_channel.c Tue Mar 17 16:28:04 2009
@@ -82,6 +82,9 @@
 					</enum>
 					<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>
@@ -249,7 +252,9 @@
 		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);




More information about the svn-commits mailing list