[Asterisk-cvs] asterisk/doc README.cdr, 1.5, 1.6 README.variables,
1.43, 1.44
kpfleming at lists.digium.com
kpfleming at lists.digium.com
Sun May 15 19:27:14 CDT 2005
- Previous message: [Asterisk-cvs] asterisk/apps app_groupcount.c, 1.14,
1.15 app_setcidname.c, 1.7, 1.8 app_setcidnum.c, 1.8,
1.9 app_setrdnis.c, 1.3, 1.4
- Next message: [Asterisk-cvs] asterisk UPGRADE.txt,1.10,1.11 pbx.c,1.243,1.244
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/asterisk/doc
In directory mongoose.digium.com:/tmp/cvs-serv19151/doc
Modified Files:
README.cdr README.variables
Log Message:
rename SetVar application to Set, deprecate SetVar
Index: README.cdr
===================================================================
RCS file: /usr/cvsroot/asterisk/doc/README.cdr,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- README.cdr 23 Feb 2005 22:48:47 -0000 1.5
+++ README.cdr 15 May 2005 23:32:38 -0000 1.6
@@ -30,7 +30,6 @@
* Authenticate Authenticates and sets the account code
* SetCDRUserField Set CDR user field
* AppendCDRUserField Append data to CDR User field
- * SetVarCDR Set CDR Vars
For more information, use the "show application" command.
You can set default account codes and AMA flags for devices in
@@ -77,7 +76,7 @@
CDR Variables
------------------------------------
-If the channel has a cdr, that cdr record has it's own set of variables which
+If the channel has a cdr, that cdr record has its own set of variables which
can be accessed just like channel variables. The following builtin variables
are available.
@@ -100,11 +99,7 @@
${CDR(uniqueid)} The channel's unique id.
${CDR(userfield)} The channels uses specified field.
-
-In addition, you can set your own extra variables with the application SetVarCDR(var=val)
-or a traditional SetVAR(CDR(var=val) to anything you want.
-
-SetVar(CDR(var)=val) will set the var to all cdr in a stack of cdrs.
+In addition, you can set your own extra variables by using Set(CDR(name)=value).
______________________________
cdr_csv2
Index: README.variables
===================================================================
RCS file: /usr/cvsroot/asterisk/doc/README.variables,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- README.variables 4 May 2005 04:13:31 -0000 1.43
+++ README.variables 15 May 2005 23:32:38 -0000 1.44
@@ -41,23 +41,23 @@
To set a variable to a particular value, do :
- exten => 1,2,SetVar(varname=value)
+ exten => 1,2,Set(varname=value)
You can substitute the value of a variable everywhere using ${variablename}.
For example, to stringwise append $lala to $blabla and store result in $koko,
do:
- exten => 1,2,SetVar(koko=${blabla}${lala})
+ exten => 1,2,Set(koko=${blabla}${lala})
There are two reference modes - reference by value and reference by name.
To refer to a variable with its name (as an argument to a function that
requires a variable), just write the name. To refer to the variable's value,
-enclose it inside ${}. For example, SetVar takes as the first argument
+enclose it inside ${}. For example, Set takes as the first argument
(before the =) a variable name, so:
- exten => 1,2,SetVar(koko=lala)
- exten => 1,3,SetVar(${koko}=blabla)
+ exten => 1,2,Set(koko=lala)
+ exten => 1,3,Set(${koko}=blabla)
stores to the variable "koko" the value "lala" and to variable "lala" the
value "blabla".
@@ -78,7 +78,7 @@
remove from the beginning of the string to the variable name.
;Remove the first character of extension, save in "number" variable
- exten => _9X.,1,SetVar(number=${EXTEN:1})
+ exten => _9X.,1,Set(number=${EXTEN:1})
Assuming we've dialed 918005551234, the value saved to the 'number' variable
would be 18005551234. This is useful in situations when we require users to
@@ -91,7 +91,7 @@
we've dialed 918005551234.
;Remove everything before the last four digits of the dialed string
- exten => _9X.,1,SetVar(number=${EXTEN:-4})
+ exten => _9X.,1,Set(number=${EXTEN:-4})
We can also limit the number of characters from our offset position that we
wish to use. This is done by appending a second colon and length value to the
@@ -99,7 +99,7 @@
variable.
;Only save the middle numbers 555 from the string 918005551234
- exten => _9X.,1,SetVar(number=${EXTEN:5:3})
+ exten => _9X.,1,Set(number=${EXTEN:5:3})
The length value can also be used in conjunction with a negative offset. This
may be useful if the length of the string is unknown, but the trailing digits
@@ -108,7 +108,7 @@
previous example).
;Save the numbers 555 to the 'number' variable
- exten => _9X.,1,SetVar(number=${EXTEN:-7:3})
+ exten => _9X.,1,Set(number=${EXTEN:-7:3})
If a negative length value is entered, it is ignored and Asterisk will match
to the end of the string.
@@ -127,14 +127,14 @@
For example, after the sequence:
-exten => 1,1,SetVar(lala=$[1 + 2])
-exten => 1,2,SetVar(koko=$[2 * ${lala}])
+exten => 1,1,Set(lala=$[1 + 2])
+exten => 1,2,Set(koko=$[2 * ${lala}])
the value of variable koko is "6".
And, further:
-exten => 1,1,SetVar(lala=$[1+2]);
+exten => 1,1,Set(lala=$[1+2]);
will not work as you might have expected. Since all the chars in the single
token "1+2" are not numbers, it will be evaluated as the string "1+2". Again,
@@ -143,7 +143,7 @@
and, further:
-exten => 1,1,SetVar,"lala=$[ 1 + 2 ]";
+exten => 1,1,Set,"lala=$[ 1 + 2 ]";
will parse as intended. Extra spaces are ignored.
@@ -242,9 +242,9 @@
Example of use :
-exten => s,2,SetVar(vara=1)
-exten => s,3,SetVar(varb=$[${vara} + 2])
-exten => s,4,SetVar(varc=$[${varb} * 2])
+exten => s,2,Set(vara=1)
+exten => s,3,Set(varb=$[${vara} + 2])
+exten => s,4,Set(varc=$[${varb} * 2])
exten => s,5,GotoIf($[${varc} = 6]?99|1:s|6)
___________________________
- Previous message: [Asterisk-cvs] asterisk/apps app_groupcount.c, 1.14,
1.15 app_setcidname.c, 1.7, 1.8 app_setcidnum.c, 1.8,
1.9 app_setrdnis.c, 1.3, 1.4
- Next message: [Asterisk-cvs] asterisk UPGRADE.txt,1.10,1.11 pbx.c,1.243,1.244
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list