<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello,</p>
    <p><br>
    </p>
    <p>to clarify, in the REGISTER you sent and pasted again below, from</p>
    <p><br>
    </p>
    <p>Contact: <a class="moz-txt-link-rfc2396E" href="sip:OTT919620649614@125.16.231.74:25841;ob"><sip:OTT919620649614@125.16.231.74:25841;ob></a></p>
    <p><br>
    </p>
    <p>you want to have:<br>
    </p>
    <p><br>
    </p>
    <p>Contact: <a class="moz-txt-link-rfc2396E" href="sip:OTT919620649614@185.122.205.178:5070;lr"><sip:OTT919620649614@185.122.205.178:5070;lr></a></p>
    <p><br>
    </p>
    <p>If yes, then this doesn't look right at all, then the device
      cannot receive calls anymore. Maybe you can explain the purpose
      and then we may be able to offer some hints.</p>
    <p><br>
    </p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
    <pre wrap="">REGISTER <a class="moz-txt-link-freetext" href="sip:185.122.206.62">sip:185.122.206.62</a> SIP/2.0
Via: SIP/2.0/UDP 125.16.231.74:25841;rport;branch=z9hG4bKPj592750e4-9a06-4662-a55e-a8a71dedb974
Route: <a class="moz-txt-link-rfc2396E" href="sip:185.122.205.178:5070;lr"><sip:185.122.205.178:5070;lr></a>
Max-Forwards: 70
From: <a class="moz-txt-link-rfc2396E" href="sip:OTT919620649614@185.122.206.62"><sip:OTT919620649614@185.122.206.62></a>;tag=35af1666-a2b1-4c6e-a7b6-8675845036e7
To: <a class="moz-txt-link-rfc2396E" href="sip:OTT919620649614@185.122.206.62"><sip:OTT919620649614@185.122.206.62></a>
Call-ID: 5bc6558f-1ffc-4990-bc99-d099c4fdcbcb
CSeq: 41801 REGISTER
User-Agent: PJSUA v2.3 Linux-4.4.0.64/x86_64/glibc-2.19
Contact: <a class="moz-txt-link-rfc2396E" href="sip:OTT919620649614@125.16.231.74:25841;ob"><sip:OTT919620649614@125.16.231.74:25841;ob></a>
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Authorization: Digest username="OTT919620649614", realm="185.122.206.62", nonce="af7780946d2b72ddc5e765a68798e937", uri=<a class="moz-txt-link-rfc2396E" href="sip:185.122.206.62">"sip:185.122.206.62"</a>, response="a4c0614fbc3c72ece619247de5766a4b", algorithm=MD5
Content-Length:  0


SIP/2.0 200 OK
Via: SIP/2.0/UDP 125.16.231.74:25841;rport=25841;branch=z9hG4bKPj592750e4-9a06-4662-a55e-a8a71dedb974;received=125.16.231.74
From: <a class="moz-txt-link-rfc2396E" href="sip:OTT919620649614@185.122.206.62"><sip:OTT919620649614@185.122.206.62></a>;tag=35af1666-a2b1-4c6e-a7b6-8675845036e7
Call-ID: 5bc6558f-1ffc-4990-bc99-d099c4fdcbcb
CSeq: 41801 REGISTER
To: <a class="moz-txt-link-rfc2396E" href="sip:OTT919620649614@185.122.206.62"><sip:OTT919620649614@185.122.206.62></a>;tag=1492409213989
Expires: 50
Contact: <a class="moz-txt-link-rfc2396E" href="sip:OTT919620649614@125.16.231.74:25841;ob"><sip:OTT919620649614@125.16.231.74:25841;ob></a>;expires=50
Content-Length: 0</pre>
    <br>
    <div class="moz-cite-prefix">On 17.04.17 08:38, Narayan P wrote:<br>
    </div>
    <blockquote
cite="mid:HK2PR0201MB17457956E1094C7269B2CA9FD7060@HK2PR0201MB1745.apcprd02.prod.outlook.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Exchange Server">
      <!-- converted from text -->
      <style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
      <meta content="text/html; charset=UTF-8">
      <style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
      <div dir="ltr">
        <div id="x_divtagdefaultwrapper" dir="ltr"
          style="font-size:12pt; color:#000000;
          font-family:Calibri,Arial,Helvetica,sans-serif">
          <p>Hi Daniel,</p>
          <p><br>
          </p>
          <p>I am attaching here my sip trace at client side.Request you
            to see this.</p>
          <p>My client IP in register request is <span>125.16.231.74
              and the server on which kamailio is running is
              185.122.205.178.</span></p>
          <p><span><br>
            </span></p>
          <p><span>I want my contact header to be <span><a class="moz-txt-link-rfc2396E" href="sip:OTT919620649614@185.122.205.178:5070;lr"><sip:OTT919620649614@185.122.205.178:5070;lr></a></span></span></p>
          <p><span><span><br>
              </span></span></p>
          <p><span><span>I am using avp_subst() function to replace
                this.But kamailio is not starting.</span></span></p>
          <p><span><span>Please reply if I am in wrong way or have
                different understanding as I am very new to kamailio.</span></span></p>
          <p><span><span><br>
              </span></span></p>
          <p><span><span>Thanks,</span></span></p>
          <p><span><span>Narayan<br>
              </span></span></p>
          <p><span><span><br>
              </span></span></p>
          <p><span><span></span></span><br>
          </p>
        </div>
        <hr tabindex="-1" style="display:inline-block; width:98%">
        <div id="x_divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
            color="#000000" face="Calibri, sans-serif"><b>From:</b>
            Narayan P<br>
            <b>Sent:</b> Friday, April 14, 2017 12:54:25 PM<br>
            <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
            <b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:moconda@gmail.com">moconda@gmail.com</a><br>
            <b>Subject:</b> RE: Not able to replace route_uri in contact
            header uri</font>
          <div> </div>
        </div>
      </div>
      <font size="2"><span style="font-size:10pt;">
          <div class="PlainText">Hi Daniel,<br>
            <br>
            Thanks for your response.<br>
            <br>
            I mean to say,<br>
            In my register request the route header i.e. route_uri is
            <a class="moz-txt-link-rfc2396E" href="sip:185.122.205.178"><sip:185.122.205.178></a> and contact header is
            <a class="moz-txt-link-abbreviated" href="mailto:3333@172.22.13.41">3333@172.22.13.41</a>.<br>
            I want my contact header to be <a class="moz-txt-link-abbreviated" href="mailto:3333@185.122.205.178">3333@185.122.205.178</a>.<br>
            So how can I replace the contact header's only domain part
            with route_uri.the user part of the contact header remains
            same.<br>
            <br>
            <br>
            Thanks,<br>
            Narayan<br>
          </div>
        </span></font></blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - May 22-24 (USA) - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - May 8-10, 2017 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>