[asterisk-users] IVR

Vieri rentorbuy at yahoo.com
Tue Jul 6 08:10:50 CDT 2010


How can I match <any_num_of_digits>#<any_num_of_digits> in an IVR?
I want users to be able to type, eg., 123#4567

I tried the following but it hangs up immediately. If I uncomment WaitExten then it hangs up right when the user dials #.

As a side question, can I play a background message while using the Read() command?

[FILTER-validate]
exten => h,1,Hangup()
exten => hang,1,Hangup()
exten => s,1,Set(CANCALL=1)
exten => s,n,Set(LOOPCOUNT=0)
exten => s,n(begin),Set(TIMEOUT(digit)=3)
exten => s,n,Set(TIMEOUT(response)=5)
exten => s,n(repeatme),Background(TEST/FILTER_VALIDATE_1)
;exten => s,n,WaitExten(5,m(default))

exten => _X.#XXX.,1,Playback(one-moment-please)
exten => _X.#XXX.,n,AGI(filter-validate.agi|${EXTEN})
exten => _X.#XXX.,n,GotoIf($["${CANCALL}" = "1"]?outbound,${CANCALL_EXTEN},filterok)
exten => _X.#XXX.,n,Playback(TEST/FILTER_VALIDATE_3)
exten => _X.#XXX.,n,Hangup()

exten => t,1,Hangup()

exten => i,1,Playback(invalid)
exten => i,n,Goto(loop,1)

exten => loop,1,Set(LOOPCOUNT=$[${LOOPCOUNT} + 1])
exten => loop,n,GotoIf($[${LOOPCOUNT} > 2]?hang,1)
exten => loop,n,Goto(FILTER-validate,s,repeatme)


Thanks,

Vieri



      



More information about the asterisk-users mailing list