[asterisk-users] GotoIf Problem

Doug Lytle support at drdos.info
Fri Jul 18 11:16:13 CDT 2008


Everybody,

I have a fall though context that, among other things, tests to see if 
someone it trying to pick up a non-existent parked call (Defined from 90 
to 99).  I have the following:

[not-in-service]

exten => _X.,1,Wait(1)
exten => _X.,n,ResetCDR()

; **************************************************
; Check to see if the mis-dialed number was a parking
; slot.  If so, jump to the not-parked context
; **************************************************

exten => _X.,n,GotoIf($["${EXTEN}" = "90"]?not-parked,s,1)
exten => _X.,n,GotoIf($["${EXTEN}" = "91"]?not-parked,s,1)
exten => _X.,n,GotoIf($["${EXTEN}" = "92"]?not-parked,s,1)
exten => _X.,n,GotoIf($["${EXTEN}" = "93"]?not-parked,s,1)
exten => _X.,n,GotoIf($["${EXTEN}" = "94"]?not-parked,s,1)
exten => _X.,n,GotoIf($["${EXTEN}" = "95"]?not-parked,s,1)
exten => _X.,n,GotoIf($["${EXTEN}" = "96"]?not-parked,s,1)
exten => _X.,n,GotoIf($["${EXTEN}" = "97"]?not-parked,s,1)
exten => _X.,n,GotoIf($["${EXTEN}" = "98"]?not-parked,s,1)
exten => _X.,n,GotoIf($["${EXTEN}" = "99"]?not-parked,s,1)

I'd like to move it to just one line, such as:

exten => _X.,n,GotoIf($["${EXTEN}" = "9?"]?not-parked,s,1)

But, I'm not finding a way to do this.  Any suggestions?

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