[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:36:35 CDT 2010


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

(Updated 2010-06-09 10:36:35.128247)


Review request for Asterisk Developers.


Changes
-------

added some braces


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 (updated)
-----

  /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