[asterisk-users] Looking for some example dialplans

Peter Kristolaitis alter3d at alter3d.ca
Mon Dec 21 14:52:54 CST 2009


You may want to make your WaitExten() wait for a bit longer than 3 
seconds.  ;)   Doesn't give the user much time to listen to the greeting 
AND enter a 4-digit extension....

I have something like this  in my dialplan and it works fine (sanitized, 
and some irrelevant parts snipped out).   I have options 1, 2, 3, and 4 
in the IVR, and all my user extensions are 2XX.   Note that although I 
have my user extensions split out into a separate context, this isn't 
necessary for it to work.

[COMPANY_ivr_main]
include => COMPANY_internal

; Invalid extension handler; replay the options, skipping the greeting.
exten => i,1,Wait(0.5)
exten => i,n,Playback(pbx-invalid)
exten => i,n,Wait(0.5)
exten => i,n,Goto(ivr_mainmenu,restart)

; The root of the IVR menu
exten => ivr_mainmenu,1,Answer()
exten => ivr_mainmenu,n,Wait(0.5)
exten => ivr_mainmenu,n,Background(COMPANY/thank-you-for-calling)
exten => ivr_mainmenu,n(restart),Background(COMPANY/if-you-know-extension)
exten => ivr_mainmenu,n,Background(COMPANY/otherwise-listen-to-options)
exten => ivr_mainmenu,n,Background(COMPANY/for-product-support)
exten => ivr_mainmenu,n,Background(COMPANY/for-sales)
exten => ivr_mainmenu,n,Background(COMPANY/to-access-conference-bridge)
exten => ivr_mainmenu,n,Background(COMPANY/to-access-company-directory)
exten => ivr_mainmenu,n,Background(COMPANY/to-repeat-options)
exten => ivr_mainmenu,n,WaitExten(60)
exten => ivr_mainmenu,n,Hangup()

exten => 1,1,FollowMe(COMPANY_productsupport)
exten => 1,n,VoiceMail(100 at COMPANY,u)
exten => 1,n,Wait(1)
exten => 1,n,Hangup()

exten => 2,1,FollowMe(COMPANY_sales)
exten => 2,n,VoiceMail(101 at COMPANY,u)
exten => 2,n,Wait(1)
exten => 2,n,Hangup()

exten => 3,1,Goto(COMPANY_conference,conf_mainmenu,1)

exten => 4,1,Goto(COMPANY_directory,dir_mainmenu,1)

exten => *,1,Goto(ivr_mainmenu,1)

; Internal extensions
[COMPANY_internal]
exten => _2XX,1,FollowMe(COMPANY_${EXTEN})
exten => _2XX,n,VoiceMail(${EXTEN}@COMPANY,u)
exten => _2XX,n,Wait(1)
exten => _2XX,n,Hangup()




Myles Wakeham wrote:
> I have an Asterisk system setup for our small business, and its working 
> well.  I posted to the list about a week or so ago, regarding having it 
> handle direct extension dialing, and unfortunately I'm not any closer to 
> solving this issue, so I was hoping someone might have a working example 
> of how to set this up they could point me towards.
>
> Basically I have everything EXCEPT direct extension dialing working. 
> What I mean by this is that a caller gets an ACD menu when they come 
> into the phone system, (1 for sales, 2 for support, 3 for customer 
> service, and 8 for directory of employees).
>
> I have setup extensions with 4 digit numbers, all beginning with 6 (ie. 
> 6001, 6002, etc.).  I was hoping that I could capture the first digit 
> entered as a 6 which doesn't correspond with a menu option, and then get 
> the next 3 digits and dial the appropriate extension.  Unfortunately 
> that's not working because the system isn't quick enough to process and 
> deal with additional digit entry without dropping a digit or two.
>
> I was told to use wildcard maskings like this _XXXX for the extension, 
> which I attempted over the weekend.  Unfortunately the second I hit a 
> digit that wasn't in the menu options, it dropped the call.
>
> What I have that is working at the moment is this:
>
> ; Calls during business hours
> exten => s,1,Set(TIMEOUT(digit)=1)
> exten => s,n,Wait(1)
> exten => s,n,Background(01-welcome_mod)
> exten => s,n,WaitExten(3)
> exten => s,n,Goto(ts_operator,s,1)
>
> ; User pressed 1 - sales
> exten => 1,1,Wait(1)
> exten => 1,n,Goto(ts_sales,s,1)
>
> etc
>
> What I need to know is what to change this to (exactly) so that it will 
> allow up to 4 digits to be entered, but on the first one being entered, 
> it is validated against the phone menu options.
>
> Does anyone have any example dialplans that show how to do an ACD menu, 
> with direct extension dialing supported as well they could point me towards?
>
> Myles
>   




More information about the asterisk-users mailing list