Skip to content

Commit 97f278a

Browse files
InterLinked1kharwell
authored andcommitted
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
1 parent cc8e098 commit 97f278a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

channels/sig_analog.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -3386,10 +3386,8 @@ static struct ast_frame *__analog_handle_event(struct analog_pvt *p, struct ast_
33863386
/* Put them in the threeway, and flip */
33873387
analog_set_inthreeway(p, ANALOG_SUB_THREEWAY, 1);
33883388
analog_set_inthreeway(p, ANALOG_SUB_REAL, 1);
3389-
if (ast_channel_state(ast) == AST_STATE_UP) {
3390-
analog_swap_subs(p, ANALOG_SUB_THREEWAY, ANALOG_SUB_REAL);
3391-
orig_3way_sub = ANALOG_SUB_REAL;
3392-
}
3389+
analog_swap_subs(p, ANALOG_SUB_THREEWAY, ANALOG_SUB_REAL);
3390+
orig_3way_sub = ANALOG_SUB_REAL;
33933391
ast_queue_unhold(p->subs[orig_3way_sub].owner);
33943392
analog_set_new_owner(p, p->subs[ANALOG_SUB_REAL].owner);
33953393
} else {

0 commit comments

Comments
 (0)