[asterisk-users] Problem with dialplan -> gotoif ?

Leif Madsen leif.madsen at asteriskdocs.org
Tue Sep 22 06:57:56 CDT 2009


Alex Samad wrote:
>                     4. GotoIf([${DIALSTATUS} = CHANUNAVAIL]?pt:ok) [pbx_config]

> i believe i have captured the relevant logging from the console. my problem is with  Gotoif statement
> 
>     -- Executing [s at dial-sipmnf-sippt-pstn:4] GotoIf("DAHDI/1-1", "[BUSY = CHANUNAVAIL]?pt:ok") in new stack
>     -- Goto (dial-sipmnf-sippt-pstn,s,5)
> 
> 
> from my understanding BUSY != CHANUNAVAIL, therefor it should have jumped to ok which is s,9.
> 
> What have I missed !

You have missed the leading $ in front of the $[...] portion.

Add the $, and things should start working as you expect.

Leif Madsen.
http://www.leifmadsen.com
http://www.oreilly.com/catalog/asterisk



More information about the asterisk-users mailing list