[asterisk-dev] [Code Review] sip: hangup channel on pending bye
David Vossel
dvossel at digium.com
Wed Aug 4 16:20:46 CDT 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/823/#review2539
-----------------------------------------------------------
/trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/823/#comment5561>
The locking of the owner channel is necessary here because this is called by the scheduler and check_pendings() now expects the owner channel to be locked in order to do the softhangup.
- David
On 2010-07-28 17:41:27, David Vossel wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/823/
> -----------------------------------------------------------
>
> (Updated 2010-07-28 17:41:27)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> When the pending bye flag is used, it is possible that the dialog will terminate and leave the sip_pvt->owner channel up. This is because we never hangup the ast_channel after sending the SIP_BYE request. When we receive the response for the SIP_BYE we set need_destroy which we would expect to destroy the dialog on the next do_monitor loop, but this is not the case. The dialog will only be destroyed once the owner is hungup even with the need_destroy flag set. This patch sets the softhangup flag on the ast_channel when a SIP_BYE request is sent as a result of the pending bye flag.
>
>
> Diffs
> -----
>
> /trunk/channels/chan_sip.c 280300
>
> Diff: https://reviewboard.asterisk.org/r/823/diff
>
>
> Testing
> -------
>
> I tested this by generating a 200 Ok response with an SDP that Asterisk will not accept. When this occurs asterisk will ACK the 200 ok request to the INVITE and set the pending bye flag which will immediately send a BYE request after the ACK. I verified with this patch that the ast_channel hangs up and the dialog is immediately destroyed.
>
>
> Thanks,
>
> David
>
>
More information about the asterisk-dev
mailing list