[asterisk-users] Re: 'h' extension and which one applies?

Tony Mountifield tony at softins.clara.co.uk
Tue Feb 6 09:17:00 MST 2007


In article <200702060905.56345.akohlsmith-asterisk at benshaw.com>,
Andrew Kohlsmith <akohlsmith-asterisk at benshaw.com> 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: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org


More information about the asterisk-users mailing list