[asterisk-users] How do I create an IVR/Dial Group that works properly?
David Backeberg
dbackeberg at gmail.com
Fri Jul 17 10:30:38 CDT 2009
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.
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.
And then if you want the WHATIREALLYWANTEDINSTEAD value into your CDR,
see the earlier post this week regarding setting arbitrary values into
your CDR.
> [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
>
More information about the asterisk-users
mailing list