[Asterisk-Users] Dial() Jumping behaviour and Vesrsion 1.2

hugolivude hugolivude at gmail.com
Mon Jan 23 18:52:32 MST 2006


Thanks so much for your comments and for directing me back to the
sample extensions.conf.  With all the examples floating around, I
sometimes forget to just go back to the soiurce!

H

On 1/22/06, bbench at mail.bg <bbench at mail.bg> wrote:
> see inline
> > The version 1.2  Dial() command does not use the n+101 jumping
> > behaviour by default.  I know about the j option and setting
> > "priorityjumping=yes"  as described here:
> >
> > http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Dial
> >
> > But if I use the default behaviour does that mean I have to check the
> > DIALSTATUS to determine whether or not to go to voicemail?
> No but is good idea
> > For example I used to do this:
> >
> > exten => s,1,Dial(SIP/${EXTEN}@2123456789,20,t)
> > exten => s,2,Voicemail(u${EXTEN})
> > exten => s,3,Goto(s,200)
> > ;
> > exten => s,102,Voicemail(b${EXTEN})
> > exten => s,103,Goto(s,200)
> > ;
> > exten => s,200,Playback(CallAgainRealSoon)
> > exten => s,201,Hangup
> > ;
> > exten => h,1,Hangup
> >
> > So in 1.2 would I do the following or am I missing something?
>
> No but is good idea
> or you can use "n" instead of "s"
> or
> exten => 1234,1,Dial(SIP/${EXTEN}@2123456789,20,t)
> exten => 1234,n,Voicemail(u${EXTEN)
> exten => 1234,dial+101,Voicemail(b${EXTEN})
> or even better use a macro (since your way is very close to that)
> (see below)
>
> > exten => s,1,Dial(SIP/${EXTEN}@2123456789,20,t)
> > exten => s,2,GotoIf($["${DIALSTATUS }" = "BUSY"]?10)
> > exten => s,3,GotoIf($["${DIALSTATUS }" = "NOANSWER"]?20)
> > ;
> > exten => s,10,Voicemail(b${EXTEN})
> > exten => s,11,Goto(s,100)
> > ;
> > exten => s,20,Voicemail(u${EXTEN})
> > exten => s,21,Goto(s,100)
> > ;
> > exten => s,100,Playback(CallAgainRealSoon)
> > exten => s,101,Hangup
> > ;
> > exten => h,1,Hangup
> [your-internal-context]
> exten =>1234,1,Macro(stdexten,${EXTEN},SIP/${EXTEN},20,t)
>
> [macro-stdexten]; straight from   the extensionsconf sample
> ;;   ${ARG1} - Extension  (we could have used ${MACRO_EXTEN} here as well
> ;;   ${ARG2} - Device(s) to ring
>
> ;exten => s,1,Dial(${ARG2},20)          ; Ring the interface, 20 seconds maximum
> ;exten => s,2,Goto(s-${DIALSTATUS},1)   ; Jump based on
> status(NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)
> ;
> ;exten => s-NOANSWER,1,Voicemail(u${ARG1})      ; If unavailable, send to voicemail
> w/ unavail announce
> ;exten => s-NOANSWER,2,Goto(s,1)                ; If they press #, return to start
> ;exten => s-BUSY,1,Voicemail(b${ARG1})  ; If busy, send to voicemail w/ busy
> announce
> ;exten => s-BUSY,2,Goto(s,1)            ; If they press #, return to start
> ;
> ;exten => _s-.,1,Goto(s-NOANSWER,1)             ; Treat anything else as no answer
> ;exten => a,1,VoicemailMain(${ARG1})
> benchev
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.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