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

Darren Sessions dmsessions at gmail.com
Wed Jun 9 10:28:14 CDT 2010



> On 2010-06-09 10:22:02, pabelanger wrote:
> > /trunk/channels/chan_sip.c, lines 9094-9095
> > <https://reviewboard.asterisk.org/r/698/diff/1/?file=10663#file10663line9094>
> >
> >     braces for if statements.

fixed.


> On 2010-06-09 10:22:02, pabelanger wrote:
> > /trunk/channels/chan_sip.c, lines 9249-9250
> > <https://reviewboard.asterisk.org/r/698/diff/1/?file=10663#file10663line9249>
> >
> >     same as above.

fixed.


- Darren


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


On 2010-06-09 10:16:01, Darren Sessions wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/698/
> -----------------------------------------------------------
> 
> (Updated 2010-06-09 10:16:01)
> 
> 
> 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 
> 
> Diff: https://reviewboard.asterisk.org/r/698/diff
> 
> 
> Testing
> -------
> 
> Compile
> 
> 
> Thanks,
> 
> Darren
> 
>




More information about the asterisk-dev mailing list