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? * What is the "(checkavail)" doing? * What does "s+2" mean? I've tried looking in docs and the wiki but can't figure it out. Thanks! -- John
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? > > * What is the "(checkavail)" doing? > > * What does "s+2" mean? > >I've tried looking in docs and the wiki but can't figure it out. > >Thanks! > >-- John >I have been curious about this as well. I was thinking it may be pseudo code? It seems easy enough to read, so that may be what it is. *shrug* I'd like to know the answer to this as well. Sean
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"> * What does "s+2" mean?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@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 > >
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)I hope the wiki page mentions that the "n" priority is only supported in CVS-HEAD, not 1.0.x. -- Always do right. This will gratify some people and astonish the rest. Mark Twain