[Asterisk-Users] Re: Why does this Macro Loop?

Tony Mountifield tony at softins.clara.co.uk
Wed Apr 13 15:13:54 MST 2005


In article <200504131653.44702.akohlsmith-asterisk at benshaw.com>,
Andrew Kohlsmith <akohlsmith-asterisk at benshaw.com> wrote:
> On April 13, 2005 03:45 pm, Mystery Glitch wrote:
> > In my [incoming] context I have something like this:
> > exten => 8885861575,1,Macro(vrforward,${EXTEN},8136361451)
> 
> Make sure you have a 'h' extension defined that just hangs up.

Actually, one thing I discovered some time ago is that you _don't_ need
to call Hangup from h, and in fact doing so caused me grief if I was
also doing other stuff in h - some of it got done twice.

h gets called for either of two reasons:
1. You already called Hangup in your dialplan.
2. The remote party hung up.

Neither of those scenarios requires you to call Hangup again.

If you want to ensure you have an h extension, but don't need it to
do anything else, just use:

exten => h,1,NoOp

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