[Asterisk-Users] Undocumented "exten" syntax?

Howard Lowndes lannet at lannet.com.au
Thu Mar 17 14:53:02 MST 2005


On Fri, 2005-03-18 at 08:34, Asterisk wrote:
> John Goerzen wrote:
> > Over at http://www.voip-info.org/wiki-Asterisk+tips+911, I see these
> > extensions.conf lines:
> > 
> > exten => s,1,SetVar(SET_EMERG_FLAG=0)
> > exten => s,n(checkavail),ChanIsAvail(${EMERGENCY_TRUNK})
> > exten => s,n,SetGlobalVar(EMERGENCY=1)
> > exten => s,n,SetVar(SET_EMERG_FLAG=1)
> > exten => s,n(dial),Dial(${EMERGENCY_TRUNK}/${EMERGENCY_NUM})
> > exten => s,s+2(trunkbusy),GotoIf($[${EMERGENCY} = 1]?inprogress)
> > 
> > Now, I have several questions:
> > 
> >  * What is the "n" priority and how can they use it for several
> >    different items?  Don't they need an increasing integer there?
> 
> n stands for the next available sequence after the previous one. This is 
>   used so that you can insert a step in the dial plan without having to 
> renumber all the following steps.
> 
> > 
> >  * What is the "(checkavail)" doing?
> > 
> 
> Thats a label. If you use n, you lose the ability to say "goto 102"

You can mix explicit priorities (123) with relative priorities (n)

> 
> >  * What does "s+2" mean?


This priority + 2, thus "n" == s+1

> 
> ok. That's fooled me.
> 
> > 
> > I've tried looking in docs and the wiki but can't figure it out.
> > 
> > Thanks!
> > 
> > -- John
> > 
> > _______________________________________________
> > Asterisk-Users mailing list
> > Asterisk-Users at lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-users
> > 
> > 
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
Howard.
LANNet Computing Associates;
Your Linux people <http://www.lannetlinux.com>
------------------------------------------
"When you just want a system that works, you choose Linux;
when you want a system that just works, you choose Microsoft."
------------------------------------------
"Flatter government, not fatter government;
Get rid of the Australian states."





More information about the asterisk-users mailing list