<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>>------------------------------
>
>Date: Mon, 25 Jul 2011 11:26:56 +0300
>From: Vlad Paiu <vladpaiu@opensips.org>
>Subject: Re: [OpenSIPS-Users] uac_replace_from() problem in INVITE
>To: users@lists.opensips.org
>Message-ID: <4E2D28D0.9010303@opensips.org>
>Content-Type: text/plain; charset="x-gbk"; Format="flowed"
>
>Hello sammy,
>
>Just took a quick look through your config and I saw that you are using
>both uac_replace_from() and
>(subst('/^From:(.+)sip:(.+)@([0-9.:]+)(.+)$/From:\1sip:\2@$Ri:$Rp\4/i')), thus
>having two simultaneous modifications on the From header when the
>message goes through your script, which might lead to the bogus From
>header you are experiencing.
>
>Please try to rework your script and only modify the From header once,
>and let me know if the problem persists.
>
>
>Regards,
>
>--
>Vlad Paiu
>OpenSIPS Developer
>
>
>
>On 07/25/2011 04:39 AM, sammy wrote:
>> Hi, Vald
>>
>> Thanks for your reply. :)
>> I re-check my opensips script, but only use uac_replace_from() one
>> time, i post it here :
>> http://pastebin.com/gTKS3kGF
>>
>> Thanks in advance.
>>
>> Best regards
>> Sammy
>>
>> _______________________________________________
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
</pre></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>