[Asterisk-Dev] 'Variable variables' in the dialplan SOLVED

Ryan Courtnage ryan-lists at voxbox.ca
Sun Dec 19 12:43:08 MST 2004


On Sun, 2004-19-12 at 11:51 -0700, Ryan Courtnage wrote:
> Hi all,
> 
> I believe I found a bug regarding the use of 'variable variables' in
> extensions.conf.  I'd like to run by the list before I file:
> 
> ---extensions.conf---
> [globals]
> OUT = ${OUT_1}
> OUT_1 = ZAP/g0
> 
> [outgoing]
> exten => _NXXXXXX,1,Dial(${OUT}/${EXTEN},,)
> ---------------------
> 
> In this example, ${OUT} should be "ZAP/g0".  However, when Asterisk
> starts (or is restarted), the value for ${OUT} is null.  Only after
> issuing a 'reload' will ${OUT} contain the expected value of "ZAP/g0".

JT had the right diagnosis.  Reversing the order of the global
definitions corrected the problem. ie:

[globals]
OUT_1 = ZAP/g0
OUT = ${OUT_1}

Ryan




More information about the asterisk-dev mailing list