]> git.ipfire.org Git - thirdparty/asterisk.git/commit
channel.c: Move setting RTP stats from ast_softhangup to ast_ari_channels_hangup. master
authorGeorge Joseph <gjoseph@sangoma.com>
Wed, 13 May 2026 00:30:04 +0000 (18:30 -0600)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Tue, 19 May 2026 21:12:37 +0000 (21:12 +0000)
commit22f0a53ce44e5541433917226bf2c03fa4f44ff7
treecb00bf500d19fe651d9e3d6fa9c087011c0280c6
parent1146e1943d2a80f5292a5c4a96233643d4500358
channel.c: Move setting RTP stats from ast_softhangup to ast_ari_channels_hangup.

The original trigger for setting the RTP stats in ast_softhangup() came from
an ARI issue where stats weren't being set in time to be reported on STASIS_END
events. The thought was that setting them in a common place like ast_softhangup()
would ensure the stats were set in possibly other scenarios.  Unfortunately,
setting the RTP stats variables in ast_softhangup() broke ABI as it required
that no channel locks be held which was not the case earlier.

Given that the original issue was ARI, we can move setting the stats to
ast_ari_channels_hangup() in resource_channels just before it calls
ast_softhangup().  This might not catch all cases of the stats not being set,
but it won't break ABI or deadlock either.

Resolves: #1928
include/asterisk/channel.h
main/channel.c
res/ari/resource_channels.c