Kamailio: modifying “expires” attribute

Have you ever needed to change the expires attribute of the Contact header in a REGISTER message because you don’t use usrloc or registrar modules? Well, if that is your case, this code snippet may be helpful for you:

But why so complicated? Two things.

– We use a custom module for registration. It’s written in C and the expires attr is generated by the Authorization authority.
– Save(“location”) of usrloc module automatically sends the 200 OK with the correct headers. We do not have this in hand for usage.

This might not be the easiest way of doing it, but it works, serves the purpose and could be used as an alternative 🙂