[asterisk-users] asterisk and IVR

Salaheddine Elharit salah.elharit200 at gmail.com
Thu Jul 25 11:33:20 CDT 2013


ok thank you i will verify and i will update you

thanks for your help


2013/7/25 A J Stiles <asterisk_list at earthshod.co.uk>

> On Thursday 25 July 2013, Salaheddine Elharit wrote:
> > thanks for your help when i use
> >
> > exten => s,1,NoOp(User chose support option)
> > exten => s,n,Dial(SIP/228, 10)
> > exten => s,n,Goto(${DIALSTATUS},1)
> > exten => NOANSWER,1,Goto(call,s,1)
> >
> > with no answer i can coto [call] without issue but with answer like
> below i
> > can't get [call]
> >
> > exten => s,1,NoOp(User chose support option)
> > exten => s,n,Dial(SIP/228, 10)
> > exten => s,n,Goto(${DIALSTATUS},1)
> > exten => ANSWER,1,Goto(call,s,1)
>
>
> Immediately after the Dial() statement, add a line like
> exten => s,nNoOp(Dial status is ${DIALSTATUS})
>
> That will show you the actual contents of ${DIALSTATUS} in the CLI  (in
> case
> it is not what you are expecting).  Call your extension a few times, and
> see
> exactly what you get when the line is answered, unanswered, engaged and
> maybe
> if the phone is unplugged.
>
> Instead of having a separate extension named after every possible value of
> ${DIALSTATUS} it might be easier to use a GotoIf() statement to jump away
> in
> one case  (most sensibly, if the call was answered),  and fall through to
> the
> default otherwise  ("engaged" and "phone not connected" are similar enough
> to
> "no answer" for that probably to be what you want, barring special values
> --
> feel free to use more GotoIf() statements if required).
>
> Something like:
>
> exten => s,n,GotoIf($["${DIALSTATUS}" = "ANSWER"]?answered)
> exten => s,n,NoOp(execution continues here if no answer)
> ...
> exten => s,n,Hangup()
> exten => s,n(answered),NoOp(we jump here if call was answered)
> ...
> exten => s,n,Hangup()
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130725/68911e09/attachment.htm>


More information about the asterisk-users mailing list