[asterisk-dev] [Code Review] chan_sip: Make the session-timers 'require: timer' header an option

Nick Lewis Nick.Lewis at atltelecom.com
Wed Jun 9 10:41:00 CDT 2010



> On 2010-06-09 10:32:46, David Vossel wrote:
> > I should start out by saying I don't know much about session timers or how they are used, this is all based on what I read in sip.conf.sample.
> > 
> > It seems to me that the "timer" in the Require field should only be present when the "session-timers" option is set to originate, because that is the only time we actually require it for the transaction (At least I think this is true?!) .  In the other cases session timers appear to either be only initiated by the other endpoint (which means we should put them in the supported field only) or completely rejected.  To me basing the logic off these options (if that is possible) makes more sense than introducing a new one.

Is there a difference between not originating st, originating st if other party supports it and only allowing a dialog if the other party supports st? Does linking the require-header to the st-mode prevent the middle option? 


- Nick


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


On 2010-06-09 10:36:35, Darren Sessions wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/698/
> -----------------------------------------------------------
> 
> (Updated 2010-06-09 10:36:35)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> I've had several issues with the 'Require: timer' header option with regards to the session timers where vendors (primarily BT) and customers SBCs do not support this header and they reject calls with a '420 Bad Extension'.
> 
> Simply commenting this code out in chan_sip.c in the past has resolved the problem, however, I'm interested in a possibly more permanent solution. From what I can gather, this field is optional anyways (someone correct me if I'm wrong here). I've included an excerpt from RFC4028 (section 8.1) which seems to say that it's even not recommended.
> 
> Either way, this patch defaults the require timers option to true so as to be consistent with the existing default behavior. I've also included changes to the configs/sip.conf.sample.
> 
> 
> From RFC4028:
> 
>    The proxy MUST remember, for the duration of the transaction, whether
>    the request contained the Supported header field with the value
>    'timer'.  If the request did not contain a Supported header field
>    with the value 'timer', the proxy *MAY* insert a Require header field
>    with the value 'timer' into the request.  However, this is *NOT
>    RECOMMENDED*.  This allows the proxy to insist on a session timer for
>    the session.  This header field is not needed if a Supported header
>    field was in the request; in this case, the proxy would already be
>    sure the session timer can be used for the session.
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_sip.c 269269 
>   /trunk/configs/sip.conf.sample 269269 
> 
> Diff: https://reviewboard.asterisk.org/r/698/diff
> 
> 
> Testing
> -------
> 
> Compile
> 
> 
> Thanks,
> 
> Darren
> 
>




More information about the asterisk-dev mailing list