<div dir="ltr"><div>You can save the received header into a variable, perform changes to it, remove the old Contact header and append the new one (from the variable).</div><div><br></div><div>-ovidiu<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 12, 2021 at 8:48 AM Joseph Barrero <<a href="mailto:joebarrero@gmail.com">joebarrero@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Callum,</div><div><br></div><div>Unfortunately, the contact information and parameters are read-only and cannot be set using a transformation.  I've also tried fix_nated_contact and it appends an additional expire parameter to the end of the contact header.  As such, I end up with, expires=486;expires=60.  </div><div><br></div><div>- Joe</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 12, 2021 at 5:41 AM Callum Guy <<a href="mailto:callum.guy@x-on.co.uk" target="_blank">callum.guy@x-on.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Joseph,<div><br></div><div>I haven't fully digested your scenario however you may have some luck using the nathelper function fix_nated_contact - presuming NAT is not an issue.</div><div><br></div><div><a href="https://opensips.org/html/docs/modules/3.1.x/nathelper.html#func_fix_nated_contact" target="_blank">https://opensips.org/html/docs/modules/3.1.x/nathelper.html#func_fix_nated_contact</a><br></div><div><br></div><div>Otherwise you'll probably be able to achieve this using general transformations, should be quite straightforward if you only have a single Contact:</div><div><br></div><div><a href="https://www.opensips.org/Documentation/Script-Tran-3-1#toc60" target="_blank">https://www.opensips.org/Documentation/Script-Tran-3-1#toc60</a><br></div><div><br></div><div>Hope that helps,</div><div><br></div><div>Callum</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 12 Mar 2021 at 03:55, Joseph Barrero <<a href="mailto:joebarrero@gmail.com" target="_blank">joebarrero@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Is there a way to replace the expires parameter in a Contact header within a reply route?<br><br>The issue I'm trying to solve is the following.<br><br>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.<br><br>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).<br><br>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.<br><br>What I'd like to do is simply change the expire parameter in the contact header to 60 seconds on the reply route.  <br><br><div>Any help will be greatly appreciated. </div><div><br></div><div>Thank you,</div><div>Joe Barrero</div></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>

<br>
<p dir="ltr" style="font-family:Arial,Helvetica,sans-serif;font-size:1.3em;line-height:1.38;margin-top:0pt;margin-bottom:0pt;text-align:justify"><font size="3" face="Verdana"><span style="font-size:8px;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"></span></font></p><div style="font-family:Arial,Helvetica,sans-serif;font-size:1.3em"><img src="https://www.x-on.co.uk/email/footer/banner-03-2021.jpg"></div><div style="font-family:Arial,Helvetica,sans-serif;font-size:1.3em"><br></div><div><div><div><font style="font-family:Arial,Helvetica,sans-serif;font-size:1.3em" size="4"><b><sup><font face="Verdana">0333 332 0000  |  <a href="https://www.x-on.co.uk" target="_blank">x-on.co.uk</a>  |  <sub> </sub></font></sup></b></font><font style="font-family:Arial,Helvetica,sans-serif;font-size:1.3em" size="4"><b><sub><sup><font face="Verdana"><a href="https://www.linkedin.com/company/x-on" target="_blank"><img src="http://www.x-on.co.uk//images/icon/linkedin.png" width="24" height="24"></a>  <a href="https://www.facebook.com/XonTel" target="_blank"><img src="http://www.x-on.co.uk//images/icon/facebook.png" width="24" height="24"></a>  <a href="https://twitter.com/xonuk" target="_blank"><img src="http://www.x-on.co.uk//images/icon/twitter.png" width="24" height="24"></a></font></sup></sub> </b></font><b style="font-family:Arial,Helvetica,sans-serif;font-size:large"><sup><font face="Verdana">  |  <a href="https://www.x-on.co.uk/service/surgery-connect/coronavirus.htm" target="_blank">Coronavirus</a></font></sup></b><b style="font-size:16.9px"><sup><font face="Verdana">  |  <a href="https://practiceindex.co.uk/gp/x-on" target="_blank">Practice Index Reviews</a></font></sup></b><br><p style="font-family:Arial,Helvetica,sans-serif;font-size:1.3em"><span style="font-family:Verdana;font-size:8px"><a href="http://www.itspa.org.uk/itspa-awards" target="_blank">THE ITSPA AWARDS 2020</a> AND Best ITSP - Mid Market, Best Software and Best Vertical Solution are trade marks of the Internet Telephony Services Providers' Association, used under licence.</span></p><p><font face="Verdana"><span style="font-size:8px"><b>From April 1st 2021 our office address will change to: Units 22-24 Riduna Park, Melton IP12 1QT.</b></span></font></p><p style="font-family:Arial,Helvetica,sans-serif;font-size:1.3em"><span style="font-size:6pt;font-family:Verdana;color:black">X-on
is a trading name of Storacall Technology Ltd a limited company registered in
England and Wales.<br>
Registered Office : Avaland House, 110 London Road, Apsley, Hemel Hempstead,
Herts, HP3 9SD. Company Registration No. 2578478.<br>
The information in this e-mail is confidential and for use by the addressee(s)
only. If you are not the intended recipient, please notify X-on immediately on <span>+44(0)333 332 0000</span> and delete the<br>message from your computer. If you are not a named addressee you must not use,
disclose, disseminate, distribute, copy, print or reply to this email. </span><span style="font-size:6pt;font-family:Verdana;color:black">Views
or opinions expressed by an individual<br>within this email may not necessarily
reflect the views of X-on or its associated companies. Although X-on routinely
screens for viruses, addressees should scan this email and any attachments<br>for
viruses. X-on makes no representation or warranty as to the absence of viruses
in this email or any attachments.</span></p>





<p style="font-family:Arial,Helvetica,sans-serif;font-size:1.3em"><span style="font-size:6pt;font-family:Verdana;color:black"></span><font size="2"><span style="font-size:6pt;font-family:Verdana;color:black"></span></font></p></div></div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">VoIP Embedded, Inc.<br><a href="http://www.voipembedded.com" target="_blank">http://www.voipembedded.com</a></div>