[svn-commits] irroot: trunk r320772 - in /trunk: CHANGES funcs/func_channel.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed May 25 10:43:35 CDT 2011


Author: irroot
Date: Wed May 25 10:43:28 2011
New Revision: 320772

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=320772
Log:
  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/


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

Modified: trunk/CHANGES
URL: http://svnview.digium.com/svn/asterisk/trunk/CHANGES?view=diff&rev=320772&r1=320771&r2=320772
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Wed May 25 10:43:28 2011
@@ -84,6 +84,7 @@
  * Added STRREPLACE function.  This function let's the user search a variable
    for a given string to replace with another string as many times as the
    user specifies or just throughout the whole string.
+ * Added option to CHANNEL(pickupgroup) allow reading and setting the pickupgroup of channel.
 
 libpri channel driver (chan_dahdi) DAHDI changes
 --------------------------

Modified: trunk/funcs/func_channel.c
URL: http://svnview.digium.com/svn/asterisk/trunk/funcs/func_channel.c?view=diff&rev=320772&r1=320771&r2=320772
==============================================================================
--- trunk/funcs/func_channel.c (original)
+++ trunk/funcs/func_channel.c Wed May 25 10:43:28 2011
@@ -85,6 +85,9 @@
 					<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 @@
 	} 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 @@
 			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")) {




More information about the svn-commits mailing list