]> git.ipfire.org Git - thirdparty/asterisk.git/commit
bridge_basic: Ignore answer from transfer target when they've timed out.
authorJoshua Colp <jcolp@digium.com>
Thu, 16 Nov 2017 15:04:55 +0000 (15:04 +0000)
committerJoshua Colp <jcolp@digium.com>
Fri, 17 Nov 2017 12:42:59 +0000 (07:42 -0500)
commitd3ada56562170cf6970e7b9ac801330ec6db0ff5
tree980440ca6cd8e7368cad9cd8db87c112bb992195
parentb447c650505a2bc0c8244b2d925bfeb98e3998a7
bridge_basic: Ignore answer from transfer target when they've timed out.

This is a fun one.

Given the following attended transfer scenario:

1. Transfer target is called
2. Transferer hangs up
3. Transfer target call attempt reaches timeout
4. Transfer target is told to hang up
5. Transfer target answers before channel is hung up
6. Transferer recall target is called

A crash would occur. This is because the transfer target call
attempt, despite being told to hang up, would raise a recall
target answer before the recall target had been answered. As it
had not answered there would be no recall target channel and it
would implode.

This change makes it so that if the transfer target has been
hung up we don't tell the attended transfer code that it has
answered. We also clear out the stimulus that the recall target
has been answered after telling the transfer target to hang up,
in case it was able to raise the information before we told it
to hangup.

ASTERISK-27361

Change-Id: Ifb8b255a9c4d2c5c1b8ad77bf54f659ed286df99
main/bridge_basic.c