In article <[EMAIL PROTECTED]>,
Andrew Kohlsmith <[EMAIL PROTECTED]> wrote:
> On Tuesday 06 February 2007 7:02 am, Andrea Spadaccini wrote:
> > This would surely be more intuitive and would require less dialplan
> > programming when there are more than one point where one might get an
> > hangup and hangup conditions must be handled (i.e.
> > Vicidial/Astguiclient).
>
> So then just do what I do:
>
> [macro-pri-dial]
> exten => s,1,Dial(Zap/g1/${ARG1},,g)
> exten => s,n,GotoIf($[${DIALSTATUS} = ANSWER]?h,1)
> exten => s,n,GotoIf($[${DIALSTATUS} = NOANSWER]?h,1)
> exten => s,n,GotoIf($[${DIALSTATUS} = BUSY]?h,1)
> exten => s,n,GotoIf($[${DIALSTATUS} = CONGESTION]?h,1)
> exten => s,n,NoOp(PRI-DIAL: Unusual Dialstatus "${DIALSTATUS}")
> exten => s,n,Hangup
>
> exten => h,1,NoOp(h exten hit in pri-dial macro)
> exten => h,n,Macro(handle-hangup)
I have never needed explicitly to Goto the 'h' extension. If I'm in a
normal context and a Dial fails, if I then fall off the bottom of the
extension, it goes to my h extension anyway.
Perhaps it's different when you're inside a macro (which brings us back
to the point of the original poster).
Cheers
Tony
--
Tony Mountifield
Work: [EMAIL PROTECTED] - http://www.softins.co.uk
Play: [EMAIL PROTECTED] - http://tony.mountifield.org
_______________________________________________
--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