]> git.ipfire.org Git - thirdparty/asterisk.git/commit
audiohook: Don't allow audiohooks to attach to hung up channels.
authorJoshua C. Colp <jcolp@sangoma.com>
Thu, 12 Mar 2020 14:22:06 +0000 (11:22 -0300)
committerJoshua Colp <jcolp@sangoma.com>
Fri, 13 Mar 2020 14:56:11 +0000 (09:56 -0500)
commit6636fff2cf5ae0f6c911b23fef9d8555c7b637c0
tree6ae3e07ddb50cfb86bdc574d463ebd5ad73d3abc
parent4990a6e2fb183ded0bef22c6766b5d3b8c19ec94
audiohook: Don't allow audiohooks to attach to hung up channels.

Given a scenario where MixMonitor was initiated over AMI it
was possible for the channel and MixMonitor thread to remain
alive past hang up of the channel. This scenario required
the AMI initiated MixMonitor to retrieve the channel, a
hangup to occur on the channel in another thread, and then
for MixMonitor to actually start. If this occurred the
MixMonitor thread would remain alive indefinitely and
the channel reference would remain.

This change ensures that audiohooks are never able to
be attached to channels that have been hung up. An
additional fix has also been done in app_mixmonitor to
properly release the channel reference if this occurs.

ASTERISK-28780

Change-Id: I8044c06daa06f0f16607788c596f55623be26f58
apps/app_mixmonitor.c
main/audiohook.c