Michael Kamleitner
2007-Apr-25 04:21 UTC
[asterisk-users] dialplan / problem with extension-length > 1
hi community, I'm new to this list & asterisk in general, so let me first say thx to everybody involved in providing such great tools & ressources!! I'm currently trying to implement a simple voicebox-system. for demonstration purposes, I've successfully connected my cellphone via bluetooth using the current chan_cellphone-patch on the current SVN-version of asterisk. everything seems to work fine so far (great patch!) what I want to achieve: * incoming call arrives * asterisk/cellphone answers * caller is greeted (playback of my-intro) * caller enters an extension * caller is directly forwarded to the voicemail of entered extension here's my dialplan for this scenario: [demo] exten => s,1,Answer ; Answer the line exten => s,n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds exten => s,n(restart),BackGround(my-intro) ; Play a congratulatory message exten => s,n,WaitExten(5) ; Wait for an extension to be dialed. exten => 1,1,Voicemail(1001,u) exten => 2,1,Voicemail(1002,u) ... exten => 9,1,Voicemail(1009,u) exten => 10,1,Voicemail(1010,u) exten => 11,1,Voicemail(1011,u) now basically this seems to work - when I'm calling in, I can press 1-9 and am connected to the right mailbox. however, apparantly this is only working for extension with a length of 1! when I try to enter f.e. "11", asterisk seems to get only the first digit and forwards mit to extension "1". somehow it seems only the first digit is processed correctly... I've no idea if this is a basic misunderstanding of the concept (sorry, newbie...), or maybe just a particular problem I'm having with the cellphone (however I tried both nokia 6630 & nokia n73 with the same results). any help greatly appreciated, thx again! michael -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070425/ff311ad9/attachment.htm
Robert Lister
2007-Apr-25 06:01 UTC
[asterisk-users] dialplan / problem with extension-length > 1
On Wed, Apr 25, 2007 at 01:21:40PM +0200, Michael Kamleitner wrote:> hi community, > > I'm new to this list & asterisk in general, so let me first say thx to > everybody involved in providing such great tools & ressources!! > > I'm currently trying to implement a simple voicebox-system. > for demonstration purposes, I've successfully connected my cellphone via > bluetooth using the current chan_cellphone-patch on the current SVN-version > of asterisk. everything seems to work fine so far (great patch!) > > what I want to achieve: > > * incoming call arrives > * asterisk/cellphone answers > * caller is greeted (playback of my-intro) > * caller enters an extension > * caller is directly forwarded to the voicemail of entered extensionI think waitexten is only for getting one (optional) digit at a time, for building IVR menus and things like that. If the thing you want entering is non-optional or more than one digit, you may be better off using the Read() command. See: http://www.voip-info.org/wiki/view/Asterisk+cmd+Read Example of: exten => start,1,Read(agent,agent-user); Plays the sound file "please enter your agent number, followed by the hash key" and puts the result into the variable ${agent} You can also set the maximum number of digits to read, and a timeout, etc. Rob -- Robert Lister - London Internet Exchange - http://www.linx.net/ robl@linx.net - tel: +44 (0)20 7645 3510 - RL786-RIPE
Barton Fisher
2007-Apr-25 07:03 UTC
[asterisk-users] dialplan / problem with extension-length > 1
Try moving 2 digit extensions before single digit. I believe asterisk matches the first found extension which is always the single digit extensions the way you have it Bart Michael Kamleitner wrote:> hi community, > > I'm new to this list & asterisk in general, so let me first say thx to > everybody involved in providing such great tools & ressources!! > > I'm currently trying to implement a simple voicebox-system. > for demonstration purposes, I've successfully connected my cellphone > via bluetooth using the current chan_cellphone-patch on the current > SVN-version of asterisk. everything seems to work fine so far (great > patch!) > > what I want to achieve: > > * incoming call arrives > * asterisk/cellphone answers > * caller is greeted (playback of my-intro) > * caller enters an extension > * caller is directly forwarded to the voicemail of entered extension > > here's my dialplan for this scenario: > > [demo] > exten => s,1,Answer ; Answer the line > exten => s,n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds > exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 > seconds > exten => s,n(restart),BackGround(my-intro) ; Play a > congratulatory message > exten => s,n,WaitExten(5) ; Wait for an > extension to be dialed. > > exten => 1,1,Voicemail(1001,u) > exten => 2,1,Voicemail(1002,u) > ... > exten => 9,1,Voicemail(1009,u) > exten => 10,1,Voicemail(1010,u) > exten => 11,1,Voicemail(1011,u) > > > now basically this seems to work - when I'm calling in, I can press > 1-9 and am connected to the right mailbox. however, apparantly this is > only working for extension with a length of 1! when I try to enter > f.e. "11", asterisk seems to get only the first digit and forwards mit > to extension "1". somehow it seems only the first digit is processed > correctly... > > I've no idea if this is a basic misunderstanding of the concept > (sorry, newbie...), or maybe just a particular problem I'm having with > the cellphone (however I tried both nokia 6630 & nokia n73 with the > same results). > > any help greatly appreciated, thx again! > > > michael > ------------------------------------------------------------------------ > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > > > __________ NOD32 2217 (20070425) Information __________ > > This message was checked by NOD32 antivirus system. > http://www.eset.com > >