<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    do you see the xlog message "Contact modified" in syslog? Maybe that
    part of config is not executed due to other conditions. You can
    enable cfgtrace for debugger module and see what actions are
    executed from configuration file.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 25/05/15 10:04, Зуев Михаил wrote:<br>
    </div>
    <blockquote cite="mid:44c87144a693ab012fdacac94531e7e8@orion-k.ru"
      type="cite">
      <p>Hi all,</p>
      <p> </p>
      <p>I need to modify the host part of a contact header. I'm trying
        something like:</p>
      <p>route {</p>
      <p><span style="white-space: pre;"> </span>.....</p>
      <p><span style="white-space: pre;"> </span>if
        (remove_hf("Contact")){</p>
      <p><span style="white-space: pre;"> </span>if
        (insert_hf("Contact: <a class="moz-txt-link-rfc2396E" href="sip:XXX.XXX.XXX.XXX:5060"><sip:XXX.XXX.XXX.XXX:5060></a>\r\n",
        "Contact"))</p>
      <p><span style="white-space: pre;"> </span>xlog("Contact
        modified");</p>
      <p><span style="white-space: pre;"> </span>}</p>
      <p><span style="white-space: pre;"> </span>if
        (!t_relay("YYY.YYY.YYY.YYY","5060")) {</p>
      <p><span style="white-space: pre;"> </span>sl_reply_error();</p>
      <p><span style="white-space: pre;"> </span>}</p>
      <p><span style="white-space: pre;"> </span>......</p>
      <p>}</p>
      <p> </p>
      <p>When i look SIP DUMP on YYY.YYY.YYY.YYY side i see older
        Contact field.</p>
      <p>I try subst_hf with regexp, subst and simply remove Contact,
        all this does not work.</p>
      <p><span style="white-space: pre-wrap;">What i am doing wrong?</span></p>
      <div>
        <pre>
</pre>
        <pre>-- </pre>
        <pre>С уважением Зуев Михаил</pre>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - <a class="moz-txt-link-freetext" href="http://www.kamailioworld.com">http://www.kamailioworld.com</a></pre>
  </body>
</html>