fonoster / routr

⚡ The future of programmable SIP servers.
https://routr.io
MIT License
1.42k stars 147 forks source link

[BUG]: Ignoring "expires" parameter on Contact header #245

Open psanders opened 11 months ago

psanders commented 11 months ago

What happened?

Routr is not following the protocol specified in Section "10.3 Processing REGISTER Requests" of RFC3261. It's incorrectly handling the "expires" parameter from the Contact header, which should be used to determine the expiration time. Because of this, we are having problems with SIP clients that include the expiration time in the Contact header rather than using a separate Expires header.

Steps to reproduce

  1. Build a basic UA with SIP.js (or use SimpleUser)
  2. Attempt to register with the UA
  3. At this point will see an error and the registration will fail

Expected behavior

Routr should handle the 'expires' parameter in the Contact header, and fall back to the header or a default value if none are present, as per RFC3261.

Additional context

As part of this ticket we should review the entire section 10.3 since it is likely we are missing additional aspects of registration process.