[asterisk-users] ARI events : ChannelDestroyed and ChannelHangupRequest
Jean Aunis
jean.aunis at prescom.fr
Tue Jun 20 07:55:48 CDT 2017
Le 12/06/2017 à 22:56, Jean Aunis a écrit :
> Le 12/06/2017 à 15:46, Joshua Colp a écrit :
>> On Mon, Jun 12, 2017, at 05:43 AM, Jean Aunis wrote:
>>> Hello,
>>>
>>> I noticed that when a channel is destroyed, two different events can be
>>> raised : ChannelDestroyed and ChannelHangupRequest. These two events
>>> seem to be mutually exclusive : if I receive a ChannelHangupRequest, I
>>> will never receive a ChannelDestroyed, and vice versa.
<snip>
Just for information, I finally figured out the problem when trying to
reproduce it, and I don't think it is a bug.
When a channel enters a Stasis application from the dialplan, the
application is subscribed to this channel. But when the channel is hung
up, Asterisk removes the channel from the application before emitting
the ChannelDestroyed event, so the application is unsubscribed and does
not receive this final event.
The behaviour is different for channels originated with ARI : in this
case Asterisk will subscribe the application to the channel, so it
receives all the events until the channel is destroyed.
I solved it by manually subscribing the application to the channel.
Jean
More information about the asterisk-users
mailing list