? funcs/func_callerid.c ? funcs/func_language.c ? funcs/func_lookup.c ? funcs/func_timeout.c Index: UPGRADE.txt =================================================================== RCS file: /usr/cvsroot/asterisk/UPGRADE.txt,v retrieving revision 1.9 diff -u -r1.9 UPGRADE.txt --- UPGRADE.txt 8 May 2005 17:17:34 -0000 1.9 +++ UPGRADE.txt 15 May 2005 18:13:18 -0000 @@ -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 diff -u -r1.242 pbx.c --- pbx.c 14 May 2005 00:36:55 -0000 1.242 +++ pbx.c 15 May 2005 18:13:20 -0000 @@ -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; Index: apps/app_setcidname.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_setcidname.c,v retrieving revision 1.6 diff -u -r1.6 app_setcidname.c --- apps/app_setcidname.c 21 Apr 2005 06:02:43 -0000 1.6 +++ apps/app_setcidname.c 15 May 2005 18:13:20 -0000 @@ -34,7 +34,9 @@ " SetCIDName(cname[|a]): Set Caller*ID Name on a call to a new\n" "value, while preserving the original Caller*ID number. This is\n" "useful for providing additional information to the called\n" -"party. Always returns 0\n"; +"party. Always returns 0\n" +"SetCIDName has been deprecated in favor of the function\n" +"CALLERID(name)\n"; STANDARD_LOCAL_USER; @@ -46,6 +48,13 @@ char tmp[256] = ""; struct localuser *u; char *opt; + static int deprecation_warning = 0; + + if (!deprecation_warning) { + ast_log(LOG_WARNING, "SetCIDName is deprecated, please use SetVar(CALLERID(name)=value) instead.\n"); + deprecation_warning = 1; + } + if (data) strncpy(tmp, (char *)data, sizeof(tmp) - 1); opt = strchr(tmp, '|'); Index: apps/app_setcidnum.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_setcidnum.c,v retrieving revision 1.7 diff -u -r1.7 app_setcidnum.c --- apps/app_setcidnum.c 21 Apr 2005 06:02:43 -0000 1.7 +++ apps/app_setcidnum.c 15 May 2005 18:13:20 -0000 @@ -35,7 +35,9 @@ " SetCIDNum(cnum[|a]): Set Caller*ID Number on a call to a new\n" "value, while preserving the original Caller*ID name. This is\n" "useful for providing additional information to the called\n" -"party. Sets ANI as well if a flag is used. Always returns 0\n"; +"party. Sets ANI as well if a flag is used. Always returns 0\n" +"SetCIDNum has been deprecated in favor of the function\n" +"CALLERID(number)\n"; STANDARD_LOCAL_USER; @@ -48,6 +50,13 @@ char *opt; int anitoo = 0; char tmp[256]; + static int deprecation_warning = 0; + + if (!deprecation_warning) { + ast_log(LOG_WARNING, "SetCIDNum is deprecated, please use SetVar(CALLERID(number)=value) instead.\n"); + deprecation_warning = 1; + } + if (data) strncpy(tmp, (char *)data, sizeof(tmp) - 1); opt = strchr(tmp, '|'); Index: apps/app_setrdnis.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_setrdnis.c,v retrieving revision 1.2 diff -u -r1.2 app_setrdnis.c --- apps/app_setrdnis.c 21 Apr 2005 06:02:43 -0000 1.2 +++ apps/app_setrdnis.c 15 May 2005 18:13:20 -0000 @@ -33,7 +33,9 @@ static char *descrip = " SetRDNIS(cnum): Set RDNIS Number on a call to a new\n" -"value. Always returns 0\n"; +"value. Always returns 0\n" +"SetRDNIS has been deprecated in favor of the function\n" +"CALLERID(rdnis)\n"; STANDARD_LOCAL_USER; @@ -44,6 +46,13 @@ struct localuser *u; char *opt, *n, *l; char tmp[256]; + static int deprecation_warning = 0; + + if (!deprecation_warning) { + ast_log(LOG_WARNING, "SetRDNIS is deprecated, please use SetVar(CALLERID(rdnis)=value) instead.\n"); + deprecation_warning = 1; + } + if (data) strncpy(tmp, (char *)data, sizeof(tmp) - 1); else Index: funcs/Makefile =================================================================== RCS file: /usr/cvsroot/asterisk/funcs/Makefile,v retrieving revision 1.5 diff -u -r1.5 Makefile --- funcs/Makefile 8 May 2005 18:11:55 -0000 1.5 +++ funcs/Makefile 15 May 2005 18:13:20 -0000 @@ -14,7 +14,8 @@ FUNCS=pbx_functions.so BUILTINS=func_md5.o func_groupcount.o func_strings.o func_cdr.o \ - func_logic.o func_env.o func_db.o + func_logic.o func_env.o func_db.o func_timeout.o func_language.o \ + func_callerid.o STANDALONE_FUNCS=$(filter-out $(BUILTINS),$(patsubst %.c,%.o,$(wildcard func*.c))) Index: funcs/func_groupcount.c =================================================================== RCS file: /usr/cvsroot/asterisk/funcs/func_groupcount.c,v retrieving revision 1.2 diff -u -r1.2 func_groupcount.c --- funcs/func_groupcount.c 8 May 2005 17:17:34 -0000 1.2 +++ funcs/func_groupcount.c 15 May 2005 18:13:21 -0000 @@ -165,3 +165,10 @@ .write = NULL, }; +/* +Local Variables: +mode: C +c-file-style: "linux" +indent-tabs-mode: nil +End: +*/