]> git.ipfire.org Git - thirdparty/asterisk.git/commit
channel: Always provide cause code in ChannelHangupRequest.
authorJoshua C. Colp <jcolp@sangoma.com>
Wed, 16 Apr 2025 09:29:11 +0000 (06:29 -0300)
committerAsterisk Development Team <asteriskteam@digium.com>
Thu, 1 May 2025 12:41:16 +0000 (12:41 +0000)
commit92d23a8f085f3187b507a4e5e54a285e6c444cdc
treed9c3fe755fb54b42d3a2ec01d60e281779fc6f5e
parentee0648d984a76fee211fca0c573bec4fcbbeb100
channel: Always provide cause code in ChannelHangupRequest.

When queueing a channel to be hung up a cause code can be
specified in one of two ways:

1. ast_queue_hangup_with_cause
This function takes in a cause code and queues it as part
of the hangup request, which ultimately results in it being
set on the channel.

2. ast_channel_hangupcause_set + ast_queue_hangup
This combination sets the hangup cause on the channel before
queueing the hangup instead of as part of that process.

In the #2 case the ChannelHangupRequest event would not contain
the cause code. For consistency if a cause code has been set
on the channel it will now be added to the event.

Resolves: #1197
(cherry picked from commit bcd0e53ef698bd5131ceb8423e0ed4fb0ea41405)
main/channel.c