[Asterisk-Users] Undocumented "exten" syntax?

Scott Nelson sbn at thermeon.com
Thu Mar 17 14:36:38 MST 2005


I groked the answer and it is more than pseudo code, it actually works. 
  I'm using them in my extensions.conf now!

Priority n means 1+last defined priority.  Putting a name inside parens 
defines that name.

So, in the example you sent, checkavail is set to 2, dial is 5, and I 
am not sure what s+2 means if not 7, and that doesn't make sense since 
you will leave 6 undefined.

On Mar 17, 2005, at 3:23 PM, Sean Kennedy 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?
>>
>> * 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
> _______________________________________________
> 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
>
>
--
Scott Nelson
Thermeon Corporation - St. Louis




More information about the asterisk-users mailing list