My goal is to change the domain in TO filed from "1.1.1.1" to a new
value "2.2.2.2".

TO field in ACK before using "subst"
To: <sip:[EMAIL PROTECTED];user=phone>;tag=3b6d3327


TO field in ACK after using "subst"
To: <sip:[EMAIL PROTECTED];user=phone>;tag=3b6d3327 t:
<sip:[EMAIL PROTECTED]:5060;transport=udp;user=phone>;tag=3b6d3327

command used in route[1] block:
if ( subst('/^To:(.*)sip:[EMAIL PROTECTED]@[a-zA-Z0-9.]+(.*)$/t:\1\u\2/ig') ) 
{};


Is this a bug?

Regards,
AR



On Wed, Nov 19, 2008 at 9:11 AM,  <[EMAIL PROTECTED]> wrote:
> Make sure your regex allows for a to_tag,.
> ------Original Message------
> From: Robert R
> Sender:
> To: opensip
> Sent: Nov 19, 2008 8:04 AM
> Subject: [OpenSIPS-Users] modify TO field
>
> Hi,
>
> What module/function can be used to modify TO field in a SIP request header?
> I've tried both "replace" and "subst" from TEXTOPS module. Both
> functions works fine for INVITE message. However, it creates a new TO
> field in ACK message i.e, it does not overwrite on the existing To
> field. Thus, I end up with two TO fields in ACK message.
>
> Please advice.
>
> Regards,
> RR
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> Sent from my Verizon Wireless BlackBerry
>

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to