All:
Some of the people who dial into to our system will press the pound key
when entering an extension for the directory key. When waitexten gets
that, I get an error messages as, for example 123# doesn't match any
extension.
I was going to use ${EXTEN} to just use the first three numbers, but I'm
not sure how to use this with WaitExten.
so I have
exten => 4349701010,1,Answer()
exten => 4349701010,2,ringing
exten => 4349701010,3,wait(8)
exten => 4349701010,4,Background(asterisk-recording)
exten => 4349701010,5,WaitExten(9,m)
exten =>
4349701010,6,Dial(SIP/100&SIP/123&SIP/132&SIP/134&SIP/149,20)
exten => 4349701010,7,VoiceMail(100 at default,u)
exten => 4349701010,8,Playback(vm-goodbye)
exten => 4349701010,9,Hangup()
Where could I check for the extra # keystroke?
Thanks for your help.
eddie
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Eddie Mikell
Sent: Wednesday, March 23, 2011 3:28 PM
To: asterisk-users at lists.digium.com
Subject: [asterisk-users] using ${EXTEN} with waitexten
All:
Some of the people who dial into to our system will press the pound key
when entering an extension for the directory key. When waitexten gets
that, I get an error messages as, for example 123# doesn't match any
extension.
I was going to use ${EXTEN} to just use the first three numbers, but I'm
not sure how to use this with WaitExten.
so I have
exten => 4349701010,1,Answer()
exten => 4349701010,2,ringing
exten => 4349701010,3,wait(8)
exten => 4349701010,4,Background(asterisk-recording)
exten => 4349701010,5,WaitExten(9,m)
exten =>
4349701010,6,Dial(SIP/100&SIP/123&SIP/132&SIP/134&SIP/149,20)
exten => 4349701010,7,VoiceMail(100 at default,u)
exten => 4349701010,8,Playback(vm-goodbye)
exten => 4349701010,9,Hangup()
Where could I check for the extra # keystroke?
Thanks for your help.
eddie
As I understand it, WaitExten is designed to jump to single-digit extensions
in the same context (at least in 1.4). What you should use here is the Read
command. The output of read is determined by timeout, digit length or #, so
123 and 123# would both evaluate as 123.
Hi
Using ${EXTEN:0:3}
will only return the first 3 digits entered
Ish
On Wed, 2011-03-23 at 16:27 -0400, Eddie Mikell wrote:> All:
>
> Some of the people who dial into to our system will press the pound key
> when entering an extension for the directory key. When waitexten gets
> that, I get an error messages as, for example 123# doesn't match any
> extension.
>
> I was going to use ${EXTEN} to just use the first three numbers, but
I'm
> not sure how to use this with WaitExten.
>
> so I have
>
> exten => 4349701010,1,Answer()
> exten => 4349701010,2,ringing
> exten => 4349701010,3,wait(8)
> exten => 4349701010,4,Background(asterisk-recording)
> exten => 4349701010,5,WaitExten(9,m)
> exten =>
4349701010,6,Dial(SIP/100&SIP/123&SIP/132&SIP/134&SIP/149,20)
> exten => 4349701010,7,VoiceMail(100 at default,u)
> exten => 4349701010,8,Playback(vm-goodbye)
> exten => 4349701010,9,Hangup()
>
> Where could I check for the extra # keystroke?
>
> Thanks for your help.
>
> eddie
>
> --
> _____________________________________________________________________
> -- 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
--
Ishfaq Malik
Software Developer
PackNet Ltd
Office: 0161 660 3062