[Asterisk-Users] extensions.conf if/then statement

VCI Help Desk admin at vci.net
Tue Dec 14 13:43:18 MST 2004


    Can someone explain to me how to read this? This is an excerpt from
http://lists.digium.com/pipermail/asterisk-dev/2003-May/000653.html   I had
it working the way I wanted at one time but I never really understood the
first statement. It's some sort of if/else but I'm not familar with this
method.

; is this a forwarded call (->5) or a direct call (->2)
exten => 8500,1,gotoif,$[${RDNIS}]?${EXTEN}|5:${EXTEN}|2

    I believe this is similar to the following PHP statement - which I can
get to do what I want but I don't really understand the syntax.

print "<option value=AcctStartTime". ($_GET[searchfield]=='AcctStartTime'?'
selected':'') ."> Login Time</option>";


      Bill




More information about the asterisk-users mailing list