[Asterisk-Users] extensions.conf if/then statement
Jay Milk
jay at skimmilk.net
Tue Dec 14 16:48:56 MST 2004
Google for "asterisk gotoif" -- third match down brings you to
http://www.voip-info.org/wiki-Asterisk+cmd+GotoIf
> -----Original Message-----
> From: VCI Help Desk [mailto:admin at vci.net]
> Sent: Tuesday, December 14, 2004 2:43 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: [Asterisk-Users] extensions.conf if/then statement
>
>
> 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>";
More information about the asterisk-users
mailing list