[Home]

Summary:ASTERISK-23290: chan_sip: ast_bridge_transfer_blind causes channel to be hung up immediately, leading to BYE request being sent before NOTIFY
Reporter:Matt Jordan (mjordan)Labels:
Date Opened:2014-02-12 22:04:44.000-0600Date Closed:2014-02-14 06:40:01.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Channels/chan_sip/Transfers
Versions:12.0.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) full.txt.1
( 1) messages.txt
Description:When {{chan_sip}} calls {{ast_bridge_transfer_blind}}, the calling thread will wait until it knows whether or not the transfer has completed before sending a NOTIFY (200) to the transferor.

Unfortunately, the bridging layer is rather quick at ejecting the transferor from the bridge. This results in the transferor being hung up rather quickly, causing a BYE request to go out before the NOTIFY.

We then end up sending the NOTIFY request after the BYE. This causes the {{blind-transfer-accountcode}} test to then fail.

We need to either:
# Defer sending the BYE until after the NOTIFY request
# Don't send the NOTIFY if the BYE was sent

Logs are attached. The following are the key lines in the log file showing the error:

* SIP/test1-00000000 is booted from the bridge:
{noformat}
[Feb 11 15:41:06] VERBOSE[10511][C-00000000] bridge_channel.c:     -- Channel SIP/test1-00000000 left 'native_rtp' basic-bridge <e95fc3f0-b3d4-4233-8f06-b6ff81691a5e>
{noformat}
* {{BYE}} is transmitted to {{test1}}:
{noformat}
[Feb 11 15:41:06] VERBOSE[10511][C-00000000] chan_sip.c: Reliably Transmitting (no NAT) to 127.0.0.4:5060:
ÿBYE sip:test1@127.0.0.4:5060 SIP/2.0
{noformat}
* {{NOTIFY}} is transmitted to {{test1}}:
{noformat}
[Feb 11 15:41:06] VERBOSE[10480][C-00000000] chan_sip.c: Reliably Transmitting (no NAT) to 127.0.0.4:5060:
ÿNOTIFY sip:test1@127.0.0.4:5060 SIP/2.0
{noformat}
Comments:By: Matt Jordan (mjordan) 2014-02-12 22:30:52.854-0600

Setting {{SIP_DEFER_BYE_ON_TRANSFER}} prior to calling {{ast_bridge_transfer_blind}} should fix this. Patch up on review board.