[asterisk-users] How do I create an IVR/Dial Group that works properly?
Alan Lord (News)
alanslists at gmail.com
Fri Jul 17 03:22:46 CDT 2009
Hi all,
I am trying to understand how I can get a simple IVR scenario to work
properly (having already removed most of my hair...).
The basic requirement is as follows:
* Caller arrives at our main number
* Caller is greeted and then told they can enter an extension number, if
known, or wait and their call will be connected to an available rep.
* The IVR then dials a group of extensions (if the caller didn't enter
one obviously).
* Someone picks up the call and the connection is established and logged.
Now, I have all of this working apart from the last piece.
My IVR rings various extensions and I can pick up the call just fine.
But my problem is that the data asterisk records regarding the call is
wrong.
It correctly identifies the CallerID, but it always records the
destination as "s". Not the extension of, for example my SIP phone (101).
If the incoming caller dials 101 whilst in the IVR, the log is correct.
I can see *why* I am having this problem (There is no extension when you
arrive in the IVR other than "s"), but I cannot see *how* to fix it.
Please can I ask how do others handle this so it works properly (I've
included the basics of my DP below)?
I'm running Asterisk 1.4.21.2~dfsg-1ubuntu3 on Ubuntu Server 8.10.
Thanks
Alan
Here is the IVR which callers are dropped into:
[tolc_menu] ; Welcome and information to callers
exten => s,1,Answer()
exten => s,n,Wait(2)
exten => s,n,Background(welcome-to-tolc) ; Say Hello
exten => s,n,Wait(1)
exten => s,n(tryagain),Background(enter-ext-of-person&or) ; Enter
extension number if known, or
exten => s,n,Background(pls-stay-on-line) ; Trying to connect...
exten => s,n,WaitExten(5)
exten => s,n,Macro(belllord,${ALANL}&${ALANB},303)
exten => _10[1-5],1,Macro(call_extension,SIP/${EXTEN})
exten => _20[1-5],1,Macro(call_extension,IAX2/alanb/${EXTEN})
The Vars ALANL and ALANB are:
ALANL=SIP/101
ALANB=IAX2/alanb/202
Here is the Macro belllord:
[macro-belllord]
exten => s,1,Dial(${ARG1},20,t)
exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Voicemail(${ARG2}@business,u) ; business is the
voicemail context, ${ARG2} is the mailbox number to dial
exten => s-NOANSWER,n,Hangup()
exten => s-BUSY,1,Voicemail(${ARG2}@business,b)
exten => s-BUSY,n,Hangup()
exten => _s-.,1,Goto(s-NOANSWER,1)
Here is the call-extension Macro:
[macro-call_extension]
exten => s,1,Dial(${ARG1},20,t) ; Ring channel for up to 20s
exten => s,n,Goto(s-${DIALSTATUS},1) ; Go to either no answer or busy.
exten => s-NOANSWER,1,Voicemail(${MACRO_EXTEN}@garden_house,u)
exten => s-BUSY,1,Voicemail(${MACRO_EXTEN}@garden_house,b)
exten => _s-.,1,Goto(s-NOANSWER,1)
More information about the asterisk-users
mailing list