[Asterisk-code-review] sig_analog: Fix broken three-way conferencing. (asterisk[18])
Friendly Automation
asteriskteam at digium.com
Wed Jun 15 11:40:59 CDT 2022
Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/18631 )
Change subject: sig_analog: Fix broken three-way conferencing.
......................................................................
sig_analog: Fix broken three-way conferencing.
Three-way calling for analog lines is currently broken.
If party A is on a call with party B and initiates a
three-way call to party C, the behavior differs depending
on whether the call is conferenced prior to party C
answering. The post-answer case is correct. However,
if A flashes before C answers, then the next flash
disconnects B rather than C, which is incorrect.
This error occurs because the subs are not swapped
in the misbehaving case. This is because the flash
handler only swaps the subs if C has answered already,
which is wrong. To fix this, we swap the subs regardless
of whether C has answered or not when the call is
conferenced. This ensures that C is disconnected
on the next hook flash, rather than B as can happen
currently.
ASTERISK-30043 #close
Change-Id: I96c5bf6c9b7eb2636136b716c677c82c079b6f06
---
M channels/sig_analog.c
1 file changed, 2 insertions(+), 4 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
Friendly Automation: Approved for Submit
diff --git a/channels/sig_analog.c b/channels/sig_analog.c
index ea507fe..fb93d5f 100644
--- a/channels/sig_analog.c
+++ b/channels/sig_analog.c
@@ -3386,10 +3386,8 @@
/* Put them in the threeway, and flip */
analog_set_inthreeway(p, ANALOG_SUB_THREEWAY, 1);
analog_set_inthreeway(p, ANALOG_SUB_REAL, 1);
- if (ast_channel_state(ast) == AST_STATE_UP) {
- analog_swap_subs(p, ANALOG_SUB_THREEWAY, ANALOG_SUB_REAL);
- orig_3way_sub = ANALOG_SUB_REAL;
- }
+ analog_swap_subs(p, ANALOG_SUB_THREEWAY, ANALOG_SUB_REAL);
+ orig_3way_sub = ANALOG_SUB_REAL;
ast_queue_unhold(p->subs[orig_3way_sub].owner);
analog_set_new_owner(p, p->subs[ANALOG_SUB_REAL].owner);
} else {
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18631
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: I96c5bf6c9b7eb2636136b716c677c82c079b6f06
Gerrit-Change-Number: 18631
Gerrit-PatchSet: 2
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220615/a11c25b5/attachment-0001.html>
More information about the asterisk-code-review
mailing list