[asterisk-dev] [Code Review] Ensure that Min-SE is included if a 422 was ever returned
Mark Michelson
reviewboard at asterisk.org
Tue Dec 4 17:21:27 CST 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2222/#review7486
-----------------------------------------------------------
First off, the changes you have regarding the use of a named constant instead of magic numbers are great, as is the change you made regarding the setting of the cached Min-SE.
The other parts seem off.
The test you have created is not valid. If Asterisk is set to "accept" mode, then it should not be putting any sort of session-timers headers in the initial INVITE. If it's not sending any session-timer headers in the INVITE, then it doesn't make sense that the endpoint would respond with a 422 since there was no proposed session interval. If we do go up against an endpoint that sends us a 422 when we haven't proposed session timers, then I'm really not sure how we should react to that, to be honest. Since they should be proposing a Min-SE in their 422, we could potentially respond with some sort of Session Timer proposal, but that would violate the local policy of what "accept" means. I think that if we receive a 422 when we're in "accept" mode, then we're clearly dealing with a broken implementation and should not attempt to renegotiate.
The change you have put in now can result in placing a Min-SE header but no Session-Expires header in the initial INVITE when in "accept" mode, which is less than ideal.
- Mark
On Nov. 30, 2012, 4:26 p.m., opticron wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2222/
> -----------------------------------------------------------
>
> (Updated Nov. 30, 2012, 4:26 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> RFC 4028 states that if a 422 response is ever received during a session refresh or during a call attempt (and the UAC wishes to retry), the all subsequent attempts or refreshes must have a Min-SE header. Asterisk does not currently do this if operating in the "accept" mode. This patch corrects this behavior and swaps out a few magic numbers for a pre-existing constant.
>
> This was discovered when writing the test for https://reviewboard.asterisk.org/r/2223/
>
>
> This addresses bug SWP-5051.
> https://issues.asterisk.org/jira/browse/SWP-5051
>
>
> Diffs
> -----
>
> branches/1.8/channels/chan_sip.c 376948
>
> Diff: https://reviewboard.asterisk.org/r/2222/diff
>
>
> Testing
> -------
>
> Before this patch, the test in https://reviewboard.asterisk.org/r/2223/ failed. After the patch, it passes.
>
>
> Thanks,
>
> opticron
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20121204/410943b9/attachment.htm>
More information about the asterisk-dev
mailing list