[asterisk-users] Answered time on channel
Steve Edwards
asterisk.org at sedwards.com
Tue Jan 2 23:23:12 CST 2018
> On Tue, 26 Dec 2017, Eric Wieling wrote:
>
> Don't use an 'h' extension, use a hangup handler.
> On 12/26/2017 04:43 PM, Steve Edwards wrote:
>
> Why?
On Tue, 2 Jan 2018, Eric Wieling wrote:
> From the hangup handler specification:
> Hangup handlers are an alternative to the h extension. They can be used
> in addition to the h extension. The idea is to attach a Gosub routine to
> a channel that will execute when the call hangs up. Whereas which h
> extension gets executed depends on the location of dialplan execution
> when the call hangs up, hangup handlers are attached to the call
> channel. You can attach multiple handlers that will execute in the order
> of most recently added first.
Cool. So in my case where every context has:
exten = h,1, goto(finish-call,h,1)
a hangup handler established at the start of the call makes perfect sense
and prevents stupid errors like forgetting to list the template in the
context declaration.
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281
More information about the asterisk-users
mailing list