[asterisk-dev] [Code Review] 3107: chan_sip: Prevent orphaned channel during a failed SIP transfer to Park

Mark Michelson reviewboard at asterisk.org
Tue Jan 7 16:49:31 CST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3107/#review10522
-----------------------------------------------------------


The patch is mostly good. One thing that should be done though is to set the SIP_DEFER_BYE_ON_TRANSFER flag on the sip_pvt on which the REFER was received. When we send the NOTIFY with sipfrag (happens in both success and failure cases), the receiver of that NOTIFY is supposed to send a BYE to us. By setting the SIP_DEFER_BYE_ON_TRANSFER flag, it makes it so that when you call ast_hangup() on the transferer channel, we will wait to send a BYE (default 32 seconds) since we are expecting to receive one. Without that flag set, we could end up sending a BYE to the transferer at the same time the transferer is sending a BYE to us. While this likely will resolve itself, it's still best to avoid it. From what I could see, this flag was not set when parking a call.

- Mark Michelson


On Jan. 7, 2014, 6:20 p.m., Matt Jordan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3107/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2014, 6:20 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-22834 and ASTERISK-23047
>     https://issues.asterisk.org/jira/browse/ASTERISK-22834
>     https://issues.asterisk.org/jira/browse/ASTERISK-23047
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> When performing a SIP transfer to a Park extension, if the Park fails, chan_sip will currently not hang up either the transferer or the transfer target. This results in the channels being orphaned with no thread to service frames, resulting in stuck channels.
> 
> This patch immediately hangs up the two channels if a Park fails.
> 
> Note that this is also a bug in 1.8; the code is identical between 11 and 1.8 in this respect. This is not a bug in 12+.
> 
> 
> Diffs
> -----
> 
>   /branches/11/channels/chan_sip.c 404856 
> 
> Diff: https://reviewboard.asterisk.org/r/3107/diff/
> 
> 
> Testing
> -------
> 
> Prior to the patch, the channels were stuck.
> 
> With the patch, the two channels are properly hung up.
> 
> 
> Thanks,
> 
> Matt Jordan
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140107/cf77982e/attachment.html>


More information about the asterisk-dev mailing list