EVAL(variable)
Using EVAL basically causes a string to be evaluated twice. When a variable or expression is in the dialplanThe core call-routing configuration of Asterisk, written mostly in extensions.conf as contexts, extensions, and priorities that decide how every call is handled. Full definition →, it will be evaluated at runtime. However, if the results of the evaluation is in fact another variable or expression, using EVAL will have it evaluated a second time.
Example: If the MYVAR contains OTHERVAR, then the result of ${EVAL( MYVAR)} in the dialplanThe core call-routing configuration of Asterisk, written mostly in extensions.conf as contexts, extensions, and priorities that decide how every call is handled. Full definition → will be the contents of OTHERVAR. Normally just putting MYVAR in the dialplan the result would be OTHERVAR.
variablerequired
User Notes
Know a tip or gotcha for this topic? Share it below and help others.
Contribute a note
Share a tip, gotcha, or practical example. Keep it under 2000 characters. No questions (use the Asterisk community forums for support). Wrap code in backticks.