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
-----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Vieri Sent: Tuesday, July 06, 2010 8:11 AM To: asterisk-users at lists.digium.com Subject: [asterisk-users] IVR 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? <snip> Thanks, Vieri -- #1. You will have to make a custom read to handle # since the "out-of-the-box" read only handles 0-9 and *. #2. No. because the first DTMF will stop the background play -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users