[asterisk-commits] trunk r32018 - /trunk/funcs/func_channel.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Jun 4 04:47:52 MST 2006
Author: oej
Date: Sun Jun 4 06:47:51 2006
New Revision: 32018
URL: http://svn.digium.com/view/asterisk?rev=32018&view=rev
Log:
Make tonezone writeable in CHANNEL() (from my old func_tonezone.c)
Modified:
trunk/funcs/func_channel.c
Modified: trunk/funcs/func_channel.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_channel.c?rev=32018&r1=32017&r2=32018&view=diff
==============================================================================
--- trunk/funcs/func_channel.c (original)
+++ trunk/funcs/func_channel.c Sun Jun 4 06:47:51 2006
@@ -108,7 +108,14 @@
locked_string_field_set(chan, language, value);
else if (!strcasecmp(data, "musicclass"))
locked_string_field_set(chan, musicclass, value);
- else if (!strcasecmp(data, "callgroup"))
+ else if (!strcasecmp(data, "tonezone")) {
+ struct tone_zone *new_zone;
+ if (!(new_zone = ast_get_indication_zone(data))) {
+ ast_log(LOG_ERROR, "Unknown country code for tonezone. Check indications.conf for available country codes.\n");
+ ret = -1;
+ } else
+ chan->zone = new_zone;
+ } else if (!strcasecmp(data, "callgroup"))
chan->callgroup = ast_get_group(data);
else if (!strcasecmp(data, "txgain")) {
sscanf(value, "%hhd", &gainset);
@@ -149,7 +156,7 @@
"R/W musicclass class (from musiconhold.conf) for hold music\n"
"R/W rxgain set rxgain level on channel drivers that support it\n"
"R/O state state for channel\n"
- "R/O tonezone zone for indications played\n"
+ "R/W tonezone zone for indications played\n"
"R/W txgain set txgain level on channel drivers that support it\n"
"R/O videonativeformat format used natively for video\n"
"\n"
More information about the asterisk-commits
mailing list