[asterisk-users] [Extensions.conf] Interval + discrete extension?

Steve Edwards asterisk.org at sedwards.com
Wed May 28 13:58:54 CDT 2008


On Wed, 28 May 2008, Tilghman Lesher wrote:

> On Wednesday 28 May 2008 13:13:14 Vincent wrote:
>>
>> 	We currently offer extensions 1-4, but we also need to add extension
>> 9 so people can call an operator.
>>
>> Is this the right way to add extension 9?
>>
>> 		exten => _[1-4,9],1,Verbose(${CALLERID(name)} - ${CALLERID(num)})
>
> You don't need the comma in there: _[1-49] is enough.

Since "9" is for a different purpose than "1-4" you may want to start with 
a separate exten like:

; call an operator
 	exten = 9,1,			verbose(...)
 	exten = 9,n,			dial(${OPERATOR},gr)
 	exten = 9,n,			playback(nbdy-avail-to-take-call)
 	exten = 9,n,			hangup()

You're going to need to "break out" "9" at some point. I find it makes the 
dialplan more "robust" when you don't code in dependencies. I prefer my 
code "dead obvious."

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000



More information about the asterisk-users mailing list