]> git.ipfire.org Git - thirdparty/asterisk.git/commit
rtp: Set RTPAUDIOQOS variables when ast_softhangup is called.
authorGeorge Joseph <gjoseph@sangoma.com>
Fri, 6 Mar 2026 18:52:53 +0000 (11:52 -0700)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Tue, 10 Mar 2026 13:49:00 +0000 (13:49 +0000)
commitc2ee154ed2897a8461fd2f39733a4b4f4c627bd1
tree0aaca15d1142ef509c2eade756ddb9e677c07615
parent7b8339fb522e67e8aebb019577c20bd317cf4152
rtp: Set RTPAUDIOQOS variables when ast_softhangup is called.

If a channel in Stasis/ARI is hung up by the channel driver, the RTPAUDIOQOS
variables are set before the channel leaves Stasis and are therefore
available to the ARI app via ChannelVarset events.  If the channel is hung up
by ARI however, the channel leaves Stasis before the RTPAUDIOQOS variables
are set so the app may not get the ChannelVarset events.

We now set the RTPAUDIOQOS variables when ast_softhangup() is called as well
as when the channel driver hangs up a channel.  Since ARI hangups call
ast_softhangup(), the variables will be set before the channel leaves Stasis
and the app should get the ChannelVarset events.
ast_rtp_instance_set_stats_vars(), which actually sets the variables, now
checks to see if the variables are already set before attempting to set them.
This prevents double messages from being generated.

Resolves: #1816
main/channel.c
main/rtp_engine.c