Skip to content

Commit

Permalink
chan_dahdi: Don't allow MWI FSK if channel not idle.
Browse files Browse the repository at this point in the history
For lines that have mailboxes configured on them, with
FSK MWI, DAHDI will periodically try to dispatch FSK
to update MWI. However, this is never supposed to be
done when a channel is not idle.

There is currently an edge case where MWI FSK can
extraneously get spooled for the channel if a caller
hook flashes and hangs up, which triggers a recall ring.
After one ring, the on hook time threshold in this if
condition has been satisfied and an MWI update is spooled.
This means that when the phone is picked up again, the
answerer gets an FSK spill before being reconnected to
the party on hold.

To prevent this, we now explicitly check to ensure that
subchannel 0 has no owner. There is no owner when DAHDI
channels are idle, but if the channel is "in use" in some
way (such as in the aforementioned scenario), then there
is an owner, and we shouldn't process MWI at this time.

ASTERISK-28518 #close

Change-Id: Ia3904434fd81688d71742f7e84358b7e1c38e92a
  • Loading branch information
InterLinked1 authored and kharwell committed May 2, 2022
1 parent a2679b0 commit 0a8b3d3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions channels/chan_dahdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -11573,6 +11573,7 @@ static void *do_monitor(void *data)
&& !analog_p->fxsoffhookstate
&& !last->owner
&& !ast_strlen_zero(last->mailbox)
&& !analog_p->subs[SUB_REAL].owner /* could be a recall ring from a flash hook hold */
&& (thispass - analog_p->onhooktime > 3)) {
res = has_voicemail(last);
if (analog_p->msgstate != res) {
Expand Down

0 comments on commit 0a8b3d3

Please sign in to comment.