]> git.ipfire.org Git - thirdparty/asterisk.git/commit
channels/chan_sip: Ensure that a BYE is sent during INVITE w/Replaces transfer
authorMatthew Jordan <mjordan@digium.com>
Mon, 9 Feb 2015 02:44:24 +0000 (02:44 +0000)
committerMatthew Jordan <mjordan@digium.com>
Mon, 9 Feb 2015 02:44:24 +0000 (02:44 +0000)
commitbc1e13dfc3f77c8a6bc07d50552638c1eb1563b3
tree8a952097af0c7baf29fd1c0022f8e53d9e795329
parent6eff59855256d3cfdd09294e0c5235257f99b1bc
channels/chan_sip: Ensure that a BYE is sent during INVITE w/Replaces transfer

Consider a scenario where Alice and Bob have an established dialog with each
other external to Asterisk. Bob decides to perform an attended transfer of
Alice to Asterisk. In this case, Alice will send an INVITE with Replaces
to Asterisk, where the Replaces specifies Bob's dialog with Asterisk. In this
particular scenario, Asterisk will complete the transfer, but - since Bob's
channel has had Alice masqueraded into it and is now a Zombie - a BYE
request will not be sent.

This patch fixes that issue by adding a new flag to chan_sip that tracks
whether or not we have an INVITE with Replaces. If we do, the flag is used
on the sip_pvt to ensure that a BYE request is sent, even if the channel has
been masqueraded away.

Review: https://reviewboard.asterisk.org/r/4362/

ASTERISK-22436 #close
Reported by: Eelco Brolman
Tested by: Jeremiah Gowdy, Kristian Høgh
patches:
  asterisk-11-hangup-replaced-3.diff uploaded by Jeremiah Gowdy (License 6358)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@431620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_sip.c
channels/sip/include/sip.h