Global variables?

After a struggle with DAHDI - I’ve just upgraded my AsteriskNow server to v1. however incoming calls are failing via my previously working dialplan???

The problem appears to be I’ve two [global] strings one a mobile number and another a list of local snom phone. Depending on certain conditions there is a macro to add the mobile number onto the local snom phone list and set a database variable which is the used in a dial command to ring the extensions.

On checking the CLI with an incoming call the dial string is blank - it appears the macro cannot now ‘see’ the global variables.

Now I haven’t specifically done an include = global in the local context but it worked before

Is this a new ‘feature’ ??

From what version you’ve just upgraded?

And show how’re you using global variables in dialplan


under the
[globals] section I have something like…

in a later context i’m using …
exten => 8722,1,Macro(callgroup)
exten => 8722,2,Dial(${PHONELIST},15,t)

exten => s,n,Set(PHONELIST=${OFFICEPHONES},g)

I’ve tried adding an
exten => s,1,Noop({OFFICEPHONES}) as the first line of the macro and ~OFFICEPHONES is blank…

Did work under previous version - Honest :smile:

By expanding out the ${OFFICEPHONES} in the macro to sip/phone1&sip/… it does work and passes the value PHONELIST back to the calling context…??

It’s seems that nothing serious (at first sight) have changed with global variables since your previous verision…

First, check globals in console: "asterisk -rx ‘core show globals’ "

Second, try using NoOp(${GLOBAL(OFFICEPHONES)}) to access global variable.

Any luck?

I’m having the same issue and although it works again after a ‘dialplan reload’ command, It happens again everytime I restart asterisk.