[Asterisk-Users] Extended logic syntax

Muhammad Nasim muhammad at telappliant.com
Thu Oct 23 11:54:17 MST 2003


Hi. Can anyone help me with the following:

[globals]

OFFICEHOURS


....................................
[internal]


exten => *80,2,SetGlobalVar(OFFICEHOURS=100)


exten => *80,2,SetGlobalVar(OFFICEHOURS=200)

....................................

[incoming]

exten => s,1,GotoIf($[${OFFICEHOURS} = 100}]?incoming-officehours:incoming-officehours-off


1. Am I using the right sytanx when I set the global variable OFFICEHOURS

2. Am I using the right syntax when I use the GotoIf, PRoblem is that the GotoIf conditions seems to evaluate to 0 no matter what OFFICEHOURS is set to. The CLI output is as follows:

Executing GotoIf("blabla", "0?incoming-officehours:incoming-officehours-off") in new stack. I am assuming the 0 means the conditional expression is evaluated to false i.e. 0




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20031023/12960a9b/attachment.htm


More information about the asterisk-users mailing list