Friday, September 07, 2012

IVR with night mode (go to voice mailbox straightaway after office hours)

We just have a client who operates a small call center. Their hotline
is served with an IVR which provides some self-serviced functions and an
option to talk to agents. After office hours, callers should be sent to
voice mailbox straightaway as all agents are off-duty.

This time-conditional forward is implemented using GotoIfTime function.

Here is an example that we provided.

When the caller presses the IVR option for agent, the GotoIfTime() will
determine whether it is within office hours.
exten => s,1,noop
exten => s,n,GotoIfTime(${CS-HOUR},*,*,*?open)
exten => s,n(closed),Playback(after-office-hour-msg)
exten => s,n,Voicemail(vm-night-mode@context,s)
exten => s,n,Hangup()
exten => s,n(open),noop
exten => s,n,PlayBack(queue-greeting)
exten => s,n,Queue(agent-queue,,,,60)
exten => s,n(queue-busy),Playback(queue-busy)
exten => s,n,Voicemail(vm-day-mode@context,s)
exten => s,n,Hangup()

The variable CS-HOUR is defined previously as.
exten => s,n,Set(CS-HOUR="09:00-22:30")

We could have office hours for night shift as well. For instance,
exten => s,n,Set(CS-HOUR="22:30-09:00")