Kamailio and FusionPBX Registrations

I'm posting this, as it vexed me for a while. I inherited a Kamailio configuration, so my comprehension of all the implications of the different setting wasn't as good as I like. In my deployment, phones register to the Kamailio box and the registrations are forwarded onto Fusion.

The problem I found was that my registrations would sometimes drop on the Fusion side. kamctl ul show had the registrations lasting fine. However, Status - Registrations on FusionPBX would often show registrations going negative and sometime disappearing altogether only to reappear a second or two later.

I have found that Fusion adds 20 seconds onto the time specified in Provision category line_register_expires.

Kamailio seems to renew its registrations to FusionPBX at half of the value set in
modparam("registrar", "min_expires", 240)

I set line-register-expires to 120 and Kamailio's min_expires to 240. This gives a 20 second grace period for the registration to be renewed. I haven't explored the relationship much more than this as it seems to work well for me.

Hope you find this useful.


Staff member
I think I know exactly what you are talking about and I have fixed mine up.

Setting this param adds a random deviation to the expires value in the 200 OK in response to all inbound SIP REGISTERs towards this sip_profile.

Result will be that clients will not re-register at the same time-interval thus spreading the load on your system.
The above setting seems to cause the problems you describe, try adding the following to your internal sip profile as shown in the image.

Don't forget to make sure its on each server and memcached is flushed, profile restarted etc. That should cure that issue.

Attached Files: