[asterisk-commits] branch oej/test-this-branch r10662 - /team/oej/test-this-branch/funcs/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Feb 21 12:28:16 MST 2006


Author: oej
Date: Tue Feb 21 13:28:14 2006
New Revision: 10662

URL: http://svn.digium.com/view/asterisk?rev=10662&view=rev
Log:
New options for func_channel

Modified:
    team/oej/test-this-branch/funcs/func_channel.c

Modified: team/oej/test-this-branch/funcs/func_channel.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/funcs/func_channel.c?rev=10662&r1=10661&r2=10662&view=diff
==============================================================================
--- team/oej/test-this-branch/funcs/func_channel.c (original)
+++ team/oej/test-this-branch/funcs/func_channel.c Tue Feb 21 13:28:14 2006
@@ -73,7 +73,14 @@
 		locked_copy_string(chan, buf, chan->language, len);
 	else if (!strcasecmp(data, "musicclass"))
 		locked_copy_string(chan, buf, chan->musicclass, len);
-	else if (!chan->tech->func_channel_read
+	else if (!strcasecmp(data, "state"))
+		locked_copy_string(chan, buf, ast_state2str(chan->_state), len);
+	else if (!strcasecmp(data, "channeltype"))
+		locked_copy_string(chan, buf, chan->tech->type, len);
+	else if (!strcasecmp(data, "callgroup")) {
+		char groupbuf[256];
+		locked_copy_string(chan, buf,  ast_print_group(groupbuf, sizeof(groupbuf), chan->callgroup), len);
+	} else if (!chan->tech->func_channel_read
 		 || chan->tech->func_channel_read(chan, function, data, buf, len)) {
 		ast_log(LOG_WARNING, "Unknown or unavailable item requested: '%s'\n", data);
 		ret = -1;
@@ -91,6 +98,8 @@
 		locked_string_field_set(chan, language, value);
 	else if (!strcasecmp(data, "musicclass"))
 		locked_string_field_set(chan, musicclass, value);
+	else if (!strcasecmp(data, "callgroup"))
+		chan->callgroup = ast_get_group(data);
 	else if (!chan->tech->func_channel_write
 		 || chan->tech->func_channel_write(chan, function, data, value)) {
 		ast_log(LOG_WARNING, "Unknown or unavailable item requested: '%s'\n",
@@ -114,6 +123,9 @@
 		"R/W	musicclass 		class (from musiconhold.conf) for hold music\n"
 		"R/O	tonezone 		zone for indications played\n"
 		"R/O	videonativeformat 	format used natively for video\n"
+		"R/W	callgroup		call groups for call pickup\n"
+		"R/O	channeltype		technology used for channel\n"
+		"R/O	state			state for channel\n"
 		"\n"
 		"Additional items may be available from the channel driver providing\n"
 		"the channel; see its documentation for details.\n"



More information about the asterisk-commits mailing list