<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Again, the question has to be asked: why do you want to rewrite the Contact header? And is there a better way to accomplish what you are trying to accomplish? <div><br></div><div>Contact is constructed by the endpoints, not the proxy. Touching it is almost never a good idea.</div><div><br></div><div>Where Contact is statefully rewritten by the topology hiding modules, touching it is also not a good idea.</div><div><br></div><div>It’s just not a good idea.<br><br><div dir="ltr">—<div>Sent from mobile, with due apologies for brevity and errors.</div></div><div dir="ltr"><br><blockquote type="cite">On Apr 7, 2020, at 2:29 AM, Mack Hendricks <mack@dopensource.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hey All,<div class=""><br class=""></div><div class="">I always have issues with substituting out header values.  I’ve tried subst and subst_hf.   </div><div class=""><br class=""></div><div class="">Here is the value that I want to change out:</div><div class=""><br class=""></div><div class="">Contact: <<a href="sip:52.41.52.34:5060;line=sr-h06Cy7RYRFkYacM0a7epa7sVa7sVRcNCW7IbaGZ9RGlC" class="">sip:52.41.52.34:5060;line=sr-h06Cy7RYRFkYacM0a7epa7sVa7sVRcNCW7IbaGZ9RGlC</a>></div><div class=""><br class=""></div><div class=""> And this is what I want it to be</div><div class=""><br class=""></div><div class="">Contact: <<a href="sip:1313717555@jump.dsiprouter.net" class="">sip:1313717555@jump.dsiprouter.net</a>;line=sr-h06Cy7RYRFkYacM0a7epa7sVa7sVRcNCW7IbaGZ9RGlC></div><div class=""><br class=""></div><div class="">I’m using this </div><div class=""><br class=""></div><div class="">subst('/^Contact: <sip:(.*);(.*)>$/Contact: <<a href="sip:1313717555@jump.dsiprouter.net;\2" class="">sip:1313717555@jump.dsiprouter.net;\2</a>>\r/ig’);</div><div class=""><br class=""></div><div class="">And it doesn’t work, but putting into a online regular expression tester it looks good as shown below.  Any ideas? </div><div class=""><br class=""></div><div class=""><div><PastedGraphic-1.png></div></div></div><span>_______________________________________________</span><br><span>Kamailio (SER) - Users Mailing List</span><br><span>sr-users@lists.kamailio.org</span><br><span>https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</span><br></div></blockquote></div></body></html>