<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><pre>Hello, Vald</pre><pre>It works! Great! Thanks a lot, Vald! :)</pre><pre>I remove the subst('/^From:(.+)sip:(.+)@([0-9.:]+)(.+)$/From:\1sip:\2@$Ri:$Rp\4/i') and re-captured the SIP message, uac_replace_from() works as it should be. </pre><pre><span class="Apple-style-span" style="white-space: normal; "><pre style="white-space: pre-wrap; word-wrap: break-word; font-family: arial; ">I do NOT know the From header can be modified by subst() again. Now I knew the uac_replace_to(), uac_replace_from() and subst() can only modify the same part of the message once in one dialog.</pre><pre style="white-space: pre-wrap; word-wrap: break-word; font-family: arial; ">Thank you and</pre><pre style="white-space: pre-wrap; word-wrap: break-word; font-family: arial; ">Best Regards</pre></span></pre><pre>Sammy</pre><pre>&gt;------------------------------
&gt;
&gt;Date:&nbsp;Mon,&nbsp;25&nbsp;Jul&nbsp;2011&nbsp;11:26:56&nbsp;+0300
&gt;From:&nbsp;Vlad&nbsp;Paiu&nbsp;&lt;vladpaiu@opensips.org&gt;
&gt;Subject:&nbsp;Re:&nbsp;[OpenSIPS-Users]&nbsp;uac_replace_from()&nbsp;problem&nbsp;in&nbsp;INVITE
&gt;To:&nbsp;users@lists.opensips.org
&gt;Message-ID:&nbsp;&lt;4E2D28D0.9010303@opensips.org&gt;
&gt;Content-Type:&nbsp;text/plain;&nbsp;charset="x-gbk";&nbsp;Format="flowed"
&gt;
&gt;Hello&nbsp;sammy,
&gt;
&gt;Just&nbsp;took&nbsp;a&nbsp;quick&nbsp;look&nbsp;through&nbsp;your&nbsp;config&nbsp;and&nbsp;I&nbsp;saw&nbsp;that&nbsp;you&nbsp;are&nbsp;using&nbsp;
&gt;both&nbsp;uac_replace_from()&nbsp;and&nbsp;
&gt;(subst('/^From:(.+)sip:(.+)@([0-9.:]+)(.+)$/From:\1sip:\2@$Ri:$Rp\4/i')),&nbsp;thus&nbsp;
&gt;having&nbsp;two&nbsp;simultaneous&nbsp;modifications&nbsp;on&nbsp;the&nbsp;From&nbsp;header&nbsp;when&nbsp;the&nbsp;
&gt;message&nbsp;goes&nbsp;through&nbsp;your&nbsp;script,&nbsp;which&nbsp;might&nbsp;lead&nbsp;to&nbsp;the&nbsp;bogus&nbsp;From&nbsp;
&gt;header&nbsp;you&nbsp;are&nbsp;experiencing.
&gt;
&gt;Please&nbsp;try&nbsp;to&nbsp;rework&nbsp;your&nbsp;script&nbsp;and&nbsp;only&nbsp;modify&nbsp;the&nbsp;From&nbsp;header&nbsp;once,&nbsp;
&gt;and&nbsp;let&nbsp;me&nbsp;know&nbsp;if&nbsp;the&nbsp;problem&nbsp;persists.
&gt;
&gt;
&gt;Regards,
&gt;
&gt;--&nbsp;
&gt;Vlad&nbsp;Paiu
&gt;OpenSIPS&nbsp;Developer
&gt;
&gt;
&gt;
&gt;On&nbsp;07/25/2011&nbsp;04:39&nbsp;AM,&nbsp;sammy&nbsp;wrote:
&gt;&gt;&nbsp;Hi,&nbsp;Vald
&gt;&gt;
&gt;&gt;&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;reply.&nbsp;:)
&gt;&gt;&nbsp;I&nbsp;re-check&nbsp;my&nbsp;opensips&nbsp;script,&nbsp;but&nbsp;only&nbsp;use&nbsp;uac_replace_from()&nbsp;one&nbsp;
&gt;&gt;&nbsp;time,&nbsp;i&nbsp;post&nbsp;it&nbsp;here&nbsp;:
&gt;&gt;&nbsp;http://pastebin.com/gTKS3kGF
&gt;&gt;
&gt;&gt;&nbsp;Thanks&nbsp;in&nbsp;advance.
&gt;&gt;
&gt;&gt;&nbsp;Best&nbsp;regards
&gt;&gt;&nbsp;Sammy
&gt;&gt;
&gt;&gt;&nbsp;_______________________________________________
&gt;&gt;&nbsp;Users&nbsp;mailing&nbsp;list
&gt;&gt;&nbsp;Users@lists.opensips.org
&gt;&gt;&nbsp;http://lists.opensips.org/cgi-bin/mailman/listinfo/users

</pre></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>