]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_dahdi: Fix unavailable channels returning busy.
authorNaveen Albert <asterisk@phreaknet.org>
Sun, 23 Oct 2022 22:46:24 +0000 (22:46 +0000)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Wed, 26 Oct 2022 15:46:09 +0000 (10:46 -0500)
commite4117d72901b199ee56a3ca53c2e86fbe4ab1f6a
tree5af476f252d110c87dc34cd9f9237c38084c220c
parentf66f77fa4f88dbae59761534e9ee2856179410b4
chan_dahdi: Fix unavailable channels returning busy.

This fixes dahdi_request to properly set the cause
code to CONGESTION instead of BUSY if no channels
were actually available.

Currently, the cause is erroneously set to busy
if the channel itself is found, regardless of its
current state. However, if the channel is not available
(e.g. T1 down, card not operable, etc.), then the
channel itself may not be in a functional state,
in which case CHANUNAVAIL is the correct cause to use.

This adds a simple check to ensure that busy tone
is only returned if a channel is encountered that
has an owner, since that is the only possible way
that a channel could actually be busy.

ASTERISK-30274 #close

Change-Id: Iad5870223c081240c925b19df8d6af136953b994
channels/chan_dahdi.c