signalwire / freeswitch

FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a versatile software implementation that runs on any commodity hardware. From a Raspberry PI to a multi-core server, FreeSWITCH can unlock the telecommunications potential of any device.
https://freeswitch.com/#getting-started
Other
3.54k stars 1.41k forks source link

value of CSeq in Options request bigger than 2^31-1 #2435

Closed adamseeliger closed 4 months ago

adamseeliger commented 5 months ago

OPTIONS sip:foo@yy.yy.yy.yy:5060 #SIP/2.0 Via: SIP/2.0/UDP xx.xx.xx.xx;rport;branch=z9hG4bKDHt64j5HXgapp Route: sip:foo@yy.yy.yy.yy:5060 Max-Forwards: 70 From: sip:mod_sofia@xx.xx.xx.xx:5060;tag=KFXNgHS5vB83F To: sip:foo@example.net Call-ID: 78a4898a-574a-4d1a-bcd2-37af72fa1a1e_510879022-1837 CSeq: 2164992235 OPTIONS Contact: sip:mod_sofia@xx.xx.xx.xx:5060 User-Agent: FreeSWITCH Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE Supported: timer, path, replaces Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer Content-Length: 0

from RFC 3261: 8.1.1.5 CSeq

   The CSeq header field serves as a way to identify and order
   transactions.  It consists of a sequence number and a method.  The
   method MUST match that of the request.  For non-REGISTER requests
   outside of a dialog, the sequence number value is arbitrary.  The
   sequence number value MUST be expressible as a 32-bit unsigned
   integer and MUST be less than 2**31.  As long as it follows the above
   guidelines, a client may use any mechanism it would like to select
   CSeq header field values.

In our setup it takes ~3 month for each freeswitch to reach 2^31 which causes trouble because some user agents refuse / drop those OPTIONs and therfore get unregistered (unregister-on-options-fail)

It seems there was a similar problems with NOTIFYs #929

andywolk commented 4 months ago