Hi all,

 

is there a way to make freeswitch send a 423 (Interval Too Brief) during a SIP REGISTER request?

I want to prevent clients to (re)register with a low expire-time and thus spam our network.

The “sip-force-expires”-variable would work but don’t seem to be SIP-compliant to me.

 

From RFC 3261:

 
               10.3 Processing REGISTER Requests

 

        When receiving a REGISTER request, a registrar follows these steps:
        
        (...)
 
        7. The registrar now processes each contact address in the Contact
         header field in turn.  For each address, it determines the
         expiration interval as follows:
 
         -  If the field value has an "expires" parameter, that value
            MUST be taken as the requested expiration.
 
         -  If there is no such parameter, but the request has an
            Expires header field, that value MUST be taken as the
            requested expiration.
 
         -  If there is neither, a locally-configured default value MUST
            be taken as the requested expiration.
 
         The registrar MAY choose an expiration less than the requested
         expiration interval.  If and only if the requested expiration
         interval is greater than zero AND smaller than one hour AND
         less than a registrar-configured minimum, the registrar MAY
         reject the registration with a response of 423 (Interval Too
         Brief).  This response MUST contain a Min-Expires header field
         that states the minimum expiration interval the registrar is
         willing to honor.  It then skips the remaining steps.
 
 
Thanks in Advance,
Adam