Cheryl Lander
asked on
IVR and after hours
Im really struggling with setting up a after hours function in asterisk.
its an appliance AA50, so Ive been using the gui, but changing things manually.
I have 3 menus
Welcome (Main Menu)
FMBH (Business Hours)
FMAH (After Hours)
What is the code for Welcome to make it go to FMAH (after hours outside of 9 - 5.)
its an appliance AA50, so Ive been using the gui, but changing things manually.
I have 3 menus
Welcome (Main Menu)
FMBH (Business Hours)
FMAH (After Hours)
What is the code for Welcome to make it go to FMAH (after hours outside of 9 - 5.)
comment=Welcome
alias_exten=7000
exten=s,1,Wait(1)
exten=s,7,Answer
exten=s,8,Wait(1)
exten=s,9,Background(stage1)
exten=s,10,WaitExten(10)
include=default
exten=1,1,Goto(voicemenu-custom-2|s|1)
exten=2,1,Goto(voicemenu-custom-3|s|1)
sorry - correction
[ivr-switch]
exten => s,1,GotoIfTime(09:00-17:00|mon-fri?FMBH|s|1)
exten => s,2,Goto(FMAH|s|1)
ASKER
welcome is the first menu people get (press 1 for sales 2 for support etc.
If I understand correctly, then you would like to skip to FMAH instead of playing the background welcome message (or possibly after).
In the case, just use the "exten=>1" I used anywhere that fits your scenario (immediately after Answer or after playing the welcome message). Just have it jump to FMAH instead of FMBH.
The options in the menu should jump to locations in FMBH.
Usually you don't do it this way, but have the call land on a neutral context, make the switch there and then present the caller with a totally different IVR. Alternatively you can have the incoming context set a variable that contains the sound file to be played and then use one welcome context with the same options.
In the case, just use the "exten=>1" I used anywhere that fits your scenario (immediately after Answer or after playing the welcome message). Just have it jump to FMAH instead of FMBH.
The options in the menu should jump to locations in FMBH.
Usually you don't do it this way, but have the call land on a neutral context, make the switch there and then present the caller with a totally different IVR. Alternatively you can have the incoming context set a variable that contains the sound file to be played and then use one welcome context with the same options.
exten => s,<anywhere>,GotoIfTime(09:00-17:00|mon-fri?FMAH|s|1)
ASKER
If someone calls between the hours of 9am-5pm
go to FMBH
If call outside of hours go to FMAH.
go to FMBH
If call outside of hours go to FMAH.
ASKER
Is this what you meant ABOVE?
Yes, but WHEN?
You said you wanted it in the welcome context, in that case I have to know WHEN to include this GotoIf .
Could you explain what the caller should hear/do when calling the office in and our of work hours, with references to the respective context?
You said you wanted it in the welcome context, in that case I have to know WHEN to include this GotoIf .
Could you explain what the caller should hear/do when calling the office in and our of work hours, with references to the respective context?
ASKER
As soon as someone calls it should check if its between business hours.
The welcome context is the main entry point which says press 1 for sales and 2 for support.
If its inside business hours and I press 1 it will go to FMBH
If its outside business hours and I press 1 it will go to FMAH.
The welcome context is the main entry point which says press 1 for sales and 2 for support.
If its inside business hours and I press 1 it will go to FMBH
If its outside business hours and I press 1 it will go to FMAH.
ASKER
let me add to that.
(welcome context)
As soon as someone calls it should check if its between business hours.
The welcome context is the main entry point which says press 1 for sales and 2 for support.
If its inside business hours and I press 1 it will go to FMBH
exten=1,1,Goto(voicemenu-c ustom-2|s| 1)
If its outside business hours and I press 1 it will go to FMAH.
(welcome context)
As soon as someone calls it should check if its between business hours.
The welcome context is the main entry point which says press 1 for sales and 2 for support.
If its inside business hours and I press 1 it will go to FMBH
exten=1,1,Goto(voicemenu-c
If its outside business hours and I press 1 it will go to FMAH.
exten
=
2
,
1
,
Goto
(
voicemenu
-
custom
-
3
|
s
|
1
)
Sorry- I thought I submitted that yesterday
Though I can't see any references to FMAH and FMBH in your example, here is the code I think you are looking for. You might want to change the targets of the Goto commands to suit your requirements
Though I can't see any references to FMAH and FMBH in your example, here is the code I think you are looking for. You might want to change the targets of the Goto commands to suit your requirements
exten => 1,1,GotoIfTime(09:00-17:00|mon-fri?FMBH|s|1)
exten => 1,2,Goto(09:00-17:00|mon-fri?FMAH|s|1)
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Any progress/feedback?
ASKER
still trying to work this out.
Anything I can help with?
I can't really tell what the wellcome menu is for, but here is the switch between daytime and other.
You usually implement it without having the user type something, so the switch happens really when the call is answered.
[ivr-switch]
exten => s,1,GotoIfTime(09:00-17:00
exten => s,1,Goto(BMBH|s|1)