[asterisk-dev] [Code Review] SIP session timers: Add Require: timer to appropriate responses

opticron reviewboard at asterisk.org
Thu Nov 15 11:02:16 CST 2012


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

Ship it!


I'm inclined to agree with Mark based on what I've read of the RFC and the explanations here.  It seems that the additional Require header parsing would go unused if added to the release branches.

- opticron


On Oct. 31, 2012, 11:05 a.m., Mark Michelson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2172/
> -----------------------------------------------------------
> 
> (Updated Oct. 31, 2012, 11:05 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This patch makes it so Asterisk adds Require: timer when appropriate when sending INVITE responses.
> 
> If session timers are in use, then there are two situations under which we'll add the header:
> 
> 1) We are sending a 200 OK with a Session-Expires header that has a refresher parameter of "uac"
> 2) We are sending a 200 OK with a Session-Expires header that has a refresher parameter of "uas" and the INVITE to which we are responding had a Supported: timer header in it.
> 
> This patch also introduces another change. Prior to this change, the only way we would add a Session-Expires header in an INVITE response was if the inbound INVITE had a Supported: timer header in it. Now we always add this header if Asterisk using session-timers=originate. This is based on a table in section 9 of RFC 4028. It indicates that if the UAC does not support Session-Timers but the UAS does, then the UAS should send a Session-Expires header with a refresher parameter of "uas".
> 
> 
> This addresses bug ASTERISK-20570.
>     https://issues.asterisk.org/jira/browse/ASTERISK-20570
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/channels/chan_sip.c 375481 
>   /branches/1.8/channels/sip/include/sip.h 375481 
> 
> Diff: https://reviewboard.asterisk.org/r/2172/diff
> 
> 
> Testing
> -------
> 
> Tried the following three scenarios that should have resulted in Asterisk sending a 200 OK with a Require: timer:
> 
> 1. INVITE with refresher=uac
> 2. INVITE with refresher=uas
> 3. INVITE with no Session-Expires but with Supported: timer
> 
> I also tried the following scenario that should result in a 200 OK with a Session-Expires (refresher=uas) but no Require: timer header:
> 
> INVITE with no Supported: timer header present.
> 
> I plan on turning this into a testsuite test as well.
> 
> 
> Thanks,
> 
> Mark
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20121115/a99c9c3b/attachment.htm>


More information about the asterisk-dev mailing list