Invalid CSeq in NOTIFYs for BLF keys

Hello everyone,

We’re running Freeswitch 1.10.7 on a Debian 10 machine.

Recently we ran into a problem with our BLF keys. After some time they seem to be stuck on the last status update they received. Only a reboot or forcing a resubscribe can fix the problem. The error occurs on multiple devices and softwarephones.

Looking at the SIP packets, I can see that Freeswitch is sending a NOTIFY with the correct contents. But the endpoints replay with ‘500 Internal Server Error’ or ‘500 Invalid CSEQ’.
After looking at the CSEQ values of the packets I noticed that Freeswitch at some point started using a lower CSEQ number than in the previous NOTIFY packet. Which is then followed by a ‘500…’ replay from the endpoints.

As far as I know the CSEQ number should always be increased which would explain why the endpoints will no longer update the status of the BLF keys.

The CSEQ number for NOTIFYS seems to always bee around 537700000 - 53785000. I also noticed that the CSEQ number in the same Dialog makes big jumps between NOTIFYs. I thought it would only increase by 1 for every NOTIFY.

I could’t find a way to attach files to this post so I upladed a pcap to google drive.

What can we do to handle this problem?

Thank you


This sounds similar to a problem I had. Basically FreeSWITCH is correct, the user agents are not.

Here are a couple of links explaining: 500 Internal Server Error. from Yealink Phones on BLF Notify | FusionPBX Forums


In my case it happened over new year, when the FreeSWITCH resets the CSeq values (they’re based on seconds since year start).


It should always be increased but there comes a time where the Cseq have to be rotated, although the Max is “2147483648” it does not mean that the NOTIFY has to use it so when they get into the higher end of the Cseq numbers it can rollover however I would expect to see this handled by FreeSWITCH when it gets into the higher number by sending a NOTIFY with Subscription-State: terminated;reason=deactivated forcing the SIP Device to reSUBSCRIBE and start again at a lower Cseq.

I am speak from experience of another BLF build and this was something i was burned with

Have you checked for any behavior like this?

1 Like