In article <[EMAIL PROTECTED]>,
Eric \"ManxPower\" Wieling <[EMAIL PROTECTED]> wrote:
> Steve Davies wrote:
> > I have a problem understanding which 'h' (hangup) extension is used in
> > which case - It seems to vary depending on channel type. 
> 
> It doesn't.  It depends on which side of the call hangs up.  "h" is 
> executed when the callER hangs up.
> 
> If you want to handle instances of the callEE hanging up, then look at 
> the "g" option to Dial().  "show application dial"

That's not my experience, and I've just tried it again to confirm.

Say I have two SIP phones, extensions 2000 and 2002, which sip.conf
puts into context sipphone, and extensions.conf contains:

[sipphone]
exten => 2000,1,Dial(SIP/2000)
exten => 2002,1,Dial(SIP/2002)
exten => h,1,NoOp(Hangup in context ${CONTEXT})

I then pick up phone 2000, dial 2002 and pick up 2002 to answer.

It then doesn't matter which phone I put down, the caller or the callee,
the 'h' extension gets executed on the calling channel (SIP/2000-xxxxxxxx)
in BOTH cases.

I believe that for any channel that is executing in the dialplan, when it
is hung up, either directly or due to its peer hanging up, it will execute
the 'h' extension, if any, in whatever is its current context.

Unfortunately, I don't have an answer for the original poster of this thread,
but I wanted to correct Eric's statement.

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

Reply via email to