[asterisk-users] Range Operator

Doug Lytle support at drdos.info
Mon Oct 9 10:39:09 MST 2006


Douglas Garstang wrote:
> How can I check a number is within a specified range in the dialplan? What's the greater than operator? How would I use a combination of greater than and less than in conjection with GotoIf()?
>
>   

I'm not really sure what _X./_5XXX does.  I thought _X. would match 
anything that would start with a digit. What does the /_5XXX do on that 
same matching string?

Anyway, this is what I have setup to limit the number of calls going to 
our fax using GotoIf()

Doug

; ****************
; Front office FAX
; ****************

exten => 734261xxxx,1,Set(GROUP()=Office_Fax_Max)
exten => 734261xxxx,n,NoOP(Active Calls: ${GROUP_COUNT(Office_Fax_Max)})
exten => 734261xxxx,n,GotoIf($[ ${GROUP_COUNT(Office_Fax_Max)} > 1 
]?734261xxxx,100)
exten => 734261xxxx,n,Set(CALLERID(name)=${DB(dnis/${CALLERIDNUM})})
exten => 734261xxxx,n,Dial(ZAP/37)
exten => 734261xxxx,100,Set(PRI_CAUSE=17)
exten => 734261xxxx,101,Hangup()

Doug

-- 
 
Ben Franklin quote:

"Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."




More information about the asterisk-users mailing list