]> git.ipfire.org Git - thirdparty/asterisk.git/commit
core: Don't play silence for Busy() and Congestion() applications.
authorJoshua C. Colp <jcolp@sangoma.com>
Mon, 21 Jun 2021 11:31:41 +0000 (08:31 -0300)
committerJoshua Colp <jcolp@sangoma.com>
Mon, 21 Jun 2021 11:43:49 +0000 (06:43 -0500)
commita3481f07f210eaa2a7f73418758bfd53485d90a2
treeafa82087cd2a37ed442c97c7c81a5581a09cffcb
parentc3b6b056c44f920bad94d1dadda9a4bf579dd5e5
core: Don't play silence for Busy() and Congestion() applications.

When using the Busy() and Congestion() applications the
function ast_safe_sleep is used by wait_for_hangup to safely
wait on the channel. This function may send silence if Asterisk
is configured to do so using the transmit_silence option.

In a scenario where an answered channel dials a Local channel
either directly or through call forwarding and the Busy()
or Congestion() dialplan applications were executed with the
transmit_silence option enabled the busy or congestion
tone would not be heard.

This is because inband generation of tones (such as busy
and congestion) is stopped when other audio is sent to
the channel they are being played to. In the given
scenario the transmit_silence option would result in
silence being sent to the channel, thus stopping the
inband generation.

This change adds a variant of ast_safe_sleep which can be
used when silence should not be played to the channel. The
wait_for_hangup function has been updated to use this
resulting in the tones being generated as expected.

ASTERISK-29485

Change-Id: I066bfc987a3ad6f0ccc88e0af4cd63f6a4729133
include/asterisk/channel.h
main/channel.c
main/pbx.c