Hello, ValdIt works! Great! Thanks a lot, Vald! :)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. 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.Thank you andBest
RegardsSammy>------------------------------
>
>Date: Mon, 25 Jul 2011 11:26:56 +0300
>From: Vlad Paiu <[email protected]>
>Subject: Re: [OpenSIPS-Users] uac_replace_from() problem in INVITE
>To: [email protected]
>Message-ID: <[email protected]>
>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
>> [email protected]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users