<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=x-gbk" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Hi Sammy,<br>
    <br>
    What version of OpenSIPS are you using? Also, are there any errors
    in your logs?<br>
    <br>
    Regards,<br>
    <pre class="moz-signature" cols="72">Razvan Crainea
OpenSIPS Developer</pre>
    <br>
    On 21.07.2011 12:06, sammy wrote:
    <blockquote
      cite="mid:17bbe3f.5a45.1314bf21fdb.Coremail.sanms@126.com"
      type="cite">
      <div style="line-height: 1.7; color: rgb(0, 0, 0); font-size:
        14px; font-family: arial;">Hi,guys.
        <div><br>
        </div>
        <div>When one call from PSTN call to Opensips, I want to change
          the From part in INVITE message as below:</div>
        <div>change</div>
        <div>&nbsp;&nbsp;From: 01088331234
          <a class="moz-txt-link-rfc2396E" href="sip:01088331234@192.168.30.44:35060">&lt;sip:01088331234@192.168.30.44:35060&gt;</a>;tag=1</div>
        <div>to</div>
        <div>&nbsp; From: 88888888
          <a class="moz-txt-link-rfc2396E" href="sip:88888888@192.168.30.44:35060">&lt;sip:88888888@192.168.30.44:35060&gt;</a>;tag=1</div>
        <div><br>
        </div>
        <div>use&nbsp;<span class="Apple-style-span" style="white-space:
            pre-wrap; line-height: normal; font-size: medium;">uac_replace_from("<span
              class="Apple-style-span" style="font-size: 14px;
              line-height: 23px; white-space: normal;">88888888</span>","sip:<span
              class="Apple-style-span" style="font-size: 14px;
              line-height: 23px; white-space: normal;"><a class="moz-txt-link-abbreviated" href="mailto:88888888@192.168.30.44:35060">88888888@192.168.30.44:35060</a></span>")</span></div>
        <div><span class="Apple-style-span" style="white-space:
            pre-wrap; line-height: normal; font-size: medium;">but when
            i capture the sip message, the old from is still there in
            the INVITE message and new from part has not ˇ°Fromˇ± before
            display name like this:</span></div>
        <div><span class="Apple-style-span" style="white-space:
            pre-wrap; line-height: normal; font-size: medium;"><br>
          </span></div>
        <div><font class="Apple-style-span" size="3"><span
              class="Apple-style-span" style="line-height: normal;
              white-space: pre-wrap;">INVITE
              <a class="moz-txt-link-freetext" href="sip:4001234567@192.168.30.47:5060">sip:4001234567@192.168.30.47:5060</a> SIP/2.0<br>
              Via: SIP/2.0/UDP
              192.168.30.44:35060;branch=z9hG4bKd5b6.c54a788.0<br>
              From: 01088331234
              <a class="moz-txt-link-rfc2396E" href="sip:01088331234@192.168.30.44:35060">&lt;sip:01088331234@192.168.30.44:35060&gt;</a>;tag=1
              --&gt;here, old from not remove by uac_replace_from()<br>
              88888888 <a class="moz-txt-link-rfc2396E" href="sip:88888888@192.168.30.44:35060">&lt;sip:88888888@192.168.30.44:35060&gt;</a>
              --&gt;here, new from has not "From: " before 88888888 <br>
              To: 4001234567<a class="moz-txt-link-rfc2396E" href="sip:4001234567@192.168.30.47:5070">&lt;sip:4001234567@192.168.30.47:5070&gt;</a><br>
              Call-ID: <a class="moz-txt-link-abbreviated" href="mailto:1-20856@192.168.30.40">1-20856@192.168.30.40</a><br>
              CSeq: 1 INVITE<br>
              Contact: <a class="moz-txt-link-freetext" href="sip:01088331234@192.168.30.44:35060">sip:01088331234@192.168.30.44:35060</a><br>
              Max-Forwards: 68<br>
              Expires: 3600</span></font></div>
        <div><font class="Apple-style-span" size="3"><span
              class="Apple-style-span" style="line-height: normal;
              white-space: pre-wrap;"><br>
            </span></font></div>
        <div><font class="Apple-style-span" size="3"><span
              class="Apple-style-span" style="line-height: normal;
              white-space: pre-wrap;">1. How can uac_replace_from
              function work as I want?</span></font></div>
        <div><font class="Apple-style-span" size="3"><span
              class="Apple-style-span" style="line-height: normal;
              white-space: pre-wrap;">2. How to replace Contact uri name
              from </span></font><span class="Apple-style-span"
            style="white-space: pre-wrap; line-height: normal;
            font-size: medium;">01088331234 to 88888888?</span></div>
        <div><span class="Apple-style-span" style="white-space:
            pre-wrap; line-height: normal; font-size: medium;"><br>
          </span></div>
        <div><span class="Apple-style-span" style="white-space:
            pre-wrap; line-height: normal; font-size: medium;"><span
              class="Apple-style-span" style="font-family: Simsun;
              white-space: normal;">
              <pre>Regards,
Sammy</pre>
            </span></span></div>
        <div><font class="Apple-style-span" size="3"><span
              class="Apple-style-span" style="line-height: normal;
              white-space: pre-wrap;"><br>
            </span></font></div>
      </div>
      <br>
      <br>
      <span title="neteasefooter"><span id="netease_mail_footer"></span></span>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </body>
</html>