Asterisk func eval
Description
EVAL(<variable>)Using EVAL basically causes a string to be evaluated twice. When a variable or expression is in the dialplan, it will be evaluated at runtime. However, if the result of the evaluation is in fact a variable or expression, using EVAL will have it evaluated a second time.
For example, if the variable ${MYVAR} contains "${OTHERVAR}", then the result of putting ${EVAL(${MYVAR})} in the dialplan will be the contents of the variable, OTHERVAR. Normally, by just putting ${MYVAR} in the dialplan, you would be left with "${OTHERVAR}".
Return value
Returns the resulting string.Example
exten => s,1,Set(foo=${EVAL(${MYVAR})})See also
Created by: murf, Last modification: Sun 01 of Aug, 2010 (04:26 UTC) by JustRumours
Featured -
Search:

Page Changes















