[Serdev] Re: FW: [Serusers] limiting expires time

Jan Janak jan at iptel.org
Tue May 18 11:54:15 UTC 2004


On 17-05 10:55, Chris Crawford wrote:
> 
> I will put the enhancement into the registrar module.  IMHO it should be
> part of the registrar module and not a core option, so that it could be
> set on a user-by-user basis.  

  Yes, it should be a parameter of the registrar module.

> For instance, there may be a group (ACLs)
> associated with limiting user registration times (normal users).  There
> also may be another group associated with 'permanent' registration times
> (gateways, admins, etc.).  It allows more flexibility with each
> registration request.

  I am afraid that this won't be possible at the moment. If you make it
  a module parameter then the value will be common for all users. A
  new parameter of save() function would be necessary to set it on
  per-user basis.

> Below is the functionality that can be expected:
> 
> 1- If a maximum expires is set, then each contact in the 200 reply that
> has an expires time greater than the max will be set to the maximum
> expires.
> 2- If the expires header has a time greater than the configured max,
> then the 200 reply header will be set to the maximum expires.
> 
> Is this reasonable?  Thoughts?

  No, this is not correct. Check RFC3261 how expires value of contacts
  is calculated:

  1) If a contact has an expires parameter then it is used
  2) If a contact has no expires parameter but there is an Expires
     header field, then the value of the header field is used.
  3) If there is neither Expires header field nor expires parameter of
     the contact then a default (implementation specific) value is used.

  200 OK replies contain no Expires header field simply because they may
  contain several contacts, each with a different expires parameter. It
  makes no sense to put Expires header field into 200 OK.

  So, you should calculate the expires value for each contact as
  described above and set it to the maximum if it is greater than the
  maximum.

    Jan.




More information about the Serdev mailing list