[asterisk-users] How do I create an IVR/Dial Group that works properly?
Alan Lord (News)
alanslists at gmail.com
Fri Jul 17 11:10:02 CDT 2009
On 17/07/09 16:30, David Backeberg wrote:
> On Fri, Jul 17, 2009 at 4:22 AM, Alan Lord (News)<alanslists at gmail.com> wrote:
>> * 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).
>
> Somewhere earlier, you do the very first answer. At that point, you should add a
> NoOp(${EXTEN})
> Set(WHATIREALLYWANTEDINSTEAD=${EXTEN}
>
> and then keep popping out the
> ${WHATIREALLYWANTEDINSTEAD}
> value wherever you wanted the original extension before you started
> jumping all over the place in your dialplan.
I don't really understand what you are saying here. Sorry :-(
When the call first hits * (over an IAX trunk), it gets put into the IVR
[tolc_menu} at s,1 and the extension in the IAX context is the incoming
number. So there isn't an EXTEN at this stage. And I do not know
WHATIREALLYWANTEDINSTEAD because:
a) the caller has not yet dialled an extension, or
b) I do not know which of us will answer the call.
> As you maybe guessed by now, EXTEN is the immediate, right now
> extension, and if you make jumps, it will update as you jump around.
Well, yes I understand that. So WTF does the extension not *jump* to 101
or 202 (or whatever the destination is) when a real person finally
answers the call?
> And then if you want the WHATIREALLYWANTEDINSTEAD value into your CDR,
> see the earlier post this week regarding setting arbitrary values into
> your CDR.
It can't be this hard surely?
We can't be the only firm in the world that doesn't do DDI and just has
one incoming number?
As I said, if while the caller is in the IVR they dial 101 it works
properly. But some will not know our extension numbers so the IVR rings
several handsets and the first one to pick up gets the call. Why isn't
that information set as the destination EXTEN?
I am beginning to think this is probably a bug. It has nothing to do
with Macros. I have tried without.
Alan
>> [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)
>>
>>
>>
>> _______________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
More information about the asterisk-users
mailing list