Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv17164
Modified Files:
UPGRADE.txt pbx.c
Log Message:
add dialplan functions for Caller ID, language and timeouts (bug #4219, with
mods)
Index: UPGRADE.txt
===================================================================
RCS file: /usr/cvsroot/asterisk/UPGRADE.txt,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- UPGRADE.txt 8 May 2005 17:17:34 -0000 1.9
+++ UPGRADE.txt 15 May 2005 17:45:29 -0000 1.10
@@ -59,6 +59,33 @@
DBGet(foo=family/key) SetVar(foo=${DB(family/key)})
DBPut(family/key=${foo}) SetVar(${DB(family/key)}=${foo})
+* The application SetLanguage has been deprecated in favor of the
+ function LANGUAGE().
+
+ SetLanguage(fr) SetVar(LANGUAGE()=fr)
+
+ The LANGUAGE function can also return the currently set language:
+
+ SetVar(MYLANG=${LANGUAGE()})
+
+* The applications AbsoluteTimeout, DigitTimeout, and ResponseTimeout
+ have been deprecated in favor of the function TIMEOUT(timeouttype):
+
+ AbsoluteTimeout(300) SetVar(TIMEOUT(absolute)=300)
+ DigitTimeout(15) SetVar(TIMEOUT(digit)=15)
+ ResponseTimeout(15) SetVar(TIMEOUT(response)=15)
+
+ The TIMEOUT() function can also return the currently set timeouts:
+
+ SetVar(DTIMEOUT=${TIMEOUT(digit)})
+
+* The applications SetCIDName, SetCIDNum, and SetRDNIS have been
+ deprecated in favor of the CALLERID(datatype) function:
+
+ SetCIDName(Joe Cool) SetVar(CALLERID(name)=Joe Cool)
+ SetCIDNum(2025551212) SetVar(CALLERID(number)=2025551212)
+ SetRDNIS(2024561414) SetVar(CALLERID(RDNIS)=2024561414)
+
Queues:
* A queue is now considered empty not only if there are no members but if
Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.242
retrieving revision 1.243
diff -u -d -r1.242 -r1.243
--- pbx.c 14 May 2005 00:36:55 -0000 1.242
+++ pbx.c 15 May 2005 17:45:29 -0000 1.243
@@ -231,6 +231,7 @@
"Set absolute maximum time of call",
" AbsoluteTimeout(seconds): Set the absolute maximum amount of time
permitted\n"
"for a call. A setting of 0 disables the timeout. Always returns
0.\n"
+ "AbsoluteTimeout has been deprecated in favor of
SetVar(TIMEOUT(absolute)=timeout)\n"
},
{ "Answer", pbx_builtin_answer,
@@ -283,6 +284,7 @@
"(and thus control would be passed to the 'i' extension, or if it
doesn't\n"
"exist the call would be terminated). The default timeout is 5
seconds.\n"
"Always returns 0.\n"
+ "DigitTimeout has been deprecated in favor of
SetVar(TIMEOUT(digit)=timeout)\n"
},
{ "Goto", pbx_builtin_goto,
@@ -366,6 +368,7 @@
"amount of time, control will pass to the 't' extension if it exists,
and\n"
"if not the call would be terminated. The default timeout is 10
seconds.\n"
"Always returns 0.\n"
+ "ResponseTimeout has been deprecated in favor of
SetVar(TIMEOUT(response)=timeout)\n"
},
{ "Ringing", pbx_builtin_ringing,
@@ -425,6 +428,7 @@
"For some language codes, SetLanguage also changes the syntax of some\n"
"Asterisk functions, like SayNumber.\n"
"Always returns 0.\n"
+ "SetLanguage has been deprecated in favor of
SetVar(LANGUAGE()=language)\n"
},
{ "SetVar", pbx_builtin_setvar,
@@ -5253,9 +5257,17 @@
static int pbx_builtin_setlanguage(struct ast_channel *chan, void *data)
{
+ static int deprecation_warning = 0;
+
+ if (!deprecation_warning) {
+ ast_log(LOG_WARNING, "SetLanguage is deprecated, please use
SetVar(LANGUAGE()=language) instead.\n");
+ deprecation_warning = 1;
+ }
+
/* Copy the language as specified */
if (data)
strncpy(chan->language, (char *)data, sizeof(chan->language)-1);
+
return 0;
}
@@ -5564,8 +5576,14 @@
static int pbx_builtin_atimeout(struct ast_channel *chan, void *data)
{
+ static int deprecation_warning = 0;
int x = atoi((char *) data);
+ if (!deprecation_warning) {
+ ast_log(LOG_WARNING, "AbsoluteTimeout is deprecated, please use
SetVar(TIMEOUT(absolute)=timeout) instead.\n");
+ deprecation_warning = 1;
+ }
+
/* Set the absolute maximum time how long a call can be connected */
ast_channel_setwhentohangup(chan,x);
if (option_verbose > 2)
@@ -5575,6 +5593,13 @@
static int pbx_builtin_rtimeout(struct ast_channel *chan, void *data)
{
+ static int deprecation_warning = 0;
+
+ if (!deprecation_warning) {
+ ast_log(LOG_WARNING, "ResponseTimeout is deprecated, please use
SetVar(TIMEOUT(response)=timeout) instead.\n");
+ deprecation_warning = 1;
+ }
+
/* If the channel is not in a PBX, return now */
if (!chan->pbx)
return 0;
@@ -5588,6 +5613,13 @@
static int pbx_builtin_dtimeout(struct ast_channel *chan, void *data)
{
+ static int deprecation_warning = 0;
+
+ if (!deprecation_warning) {
+ ast_log(LOG_WARNING, "DigitTimeout is deprecated, please use
SetVar(TIMEOUT(digit)=timeout) instead.\n");
+ deprecation_warning = 1;
+ }
+
/* If the channel is not in a PBX, return now */
if (!chan->pbx)
return 0;
_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs