[asterisk-users] dialplan tips

harry R rhm.noa101 at gmail.com
Thu Aug 6 03:06:03 CDT 2009


2009/8/6 Alex Samad <alex at samad.com.au>

> On Fri, Jul 24, 2009 at 08:28:48AM -0500, Danny Nicholas wrote:
> > Here's how I think your dialplan should look:
> >
> > exten => 101,1,Ringing
> > exten => 101,2,Answer()
> > exten => 101,3,Dial(SIP/quentin,10)
> > exten => 101,n,VoiceMail(101 at default,u)
> > exten => 101,n,Playback(vm-goodbye)
> > exten => 101,n,Hangup()
> > exten => 101-BUSY,1,Playback(busy)
> > exten => 101-BUSY,n,Wait(3)
> > exten => 101-BUSY,n,VoiceMail(101 at default,b)
> > exten => 101-BUSY,n,Playback(vm-goodbye)
> > exten => 101-BUSY,n,Hangup()
> >
>
>  >I have a question about this dialplan, why does the dial do a jump to
> >101-<DIALSTATUS>, is there a goto 101-<DIALSTATUS> missing ?
>
> >Alex
>
> Hi Alex

You are right, a line is missing. If I just stay in this same dialplan, I
will add this line
exten => 101,GotoIf([${DIALSTATUS} = BUSY]?101-BUSY,1)
just after the diap() application.

But as someone else wrote before, you can do a dialplan like this
exten => 101,1,Ringing
exten => 101,n,Answer()
exten => 101,n,Dial(SIP/quentin,10)
exten => 101,n,Goto(101-${DIALSTATUS},1)
exten => 101-NOANSWER,1,VoiceMail(101 at default,u)
exten => 101-NOANSWER,n,Playback(vm-goodbye)
exten => 101-NOANSWER,n,Hangup()
exten => 101-BUSY,1,Playback(busy)
exten => 101-BUSY,n,Wait(3)
exten => 101-BUSY,n,VoiceMail(101 at default,b)
exten => 101-BUSY,n,Playback(vm-goodbye)
exten => 101-BUSY,n,Hangup()
exten => _101-.,1,Goto(101-NOANSWER,1)

Harry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090806/e1e01155/attachment-0001.htm 


More information about the asterisk-users mailing list