[OpenSIPS-Users] modify TO field

Robert R rob1485 at gmail.com
Wed Nov 19 15:42:09 CET 2008

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

TO field in ACK before using "subst"
To: <sip:14078789913 at;user=phone>;tag=3b6d3327

TO field in ACK after using "subst"
To: <sip:14078789913 at;user=phone>;tag=3b6d3327 t:
<sip:+14078789913 at;transport=udp;user=phone>;tag=3b6d3327

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

Is this a bug?


On Wed, Nov 19, 2008 at 9:11 AM,  <brett at nemeroff.com> 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
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> Sent from my Verizon Wireless BlackBerry

More information about the Users mailing list