[OpenSIPS-Users] Changing the expire parameter in the Contact field

Joseph Barrero joebarrero at gmail.com
Fri Mar 12 03:53:09 EST 2021

Is there a way to replace the expires parameter in a Contact header within
a reply route?

The issue I'm trying to solve is the following.

I have two OpenSIPS servers, a primary and a backup.  The OpenSIPS server
is performing mid-registrar duties for Freeswitch.  However, when I take
the primary OpenSIPS server down for maintenance and bring it back online,
Freeswitch still has the other registration active.  When the UA tries to
register again on the primary OpenSIPS server, the mid-register module
sends a request over to Freeswitch, and Freeswitch returns two contacts;
one contact with the modparam("mid_registrar", "outgoing_expires", 600)
value and the other contact with an expiration of whatever value it happens
to be on (in this example it is 600 - time elapsed) from the registration
created by the secondary OpenSIPS server.

The problem is that the expiration parameter in the 200 Ok reply to the UA
from OpenSIPS on a successful registration has the second expiration value
instead of the shorter expiration value set in modparam("mid_registrar",
"max_expires", 60).

The result, is that the UA goes from 60-second registrations to whatever
the second expiration value had at the time (a value between 0 and 599).
When the second expiration is higher than 60 seconds, the UA's registration
is expired on OpenSIPS for up to 599 seconds.

What I'd like to do is simply change the expire parameter in the contact
header to 60 seconds on the reply route.

Any help will be greatly appreciated.

Thank you,
Joe Barrero
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20210311/a38b723a/attachment.html>

More information about the Users mailing list