[OpenSIPS-Users] How to modify username of FROM uri?

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Mar 18 09:19:03 CET 2010


Hi,

Use the uac_replace_from() to change the URI only and build a new URI 
based on the old one:

  $var(new_uri) = "sip:"+$fU+"@10.200.0.5" ;
  uac_replace_from("$var(new_uri)")

or, much simpler:

   uac_replace_from(""sip:$fU at 10.200.0.5")

see: http://www.opensips.org/Resources/DocsCoreVar16#toc39

Regards,
Bogdan


CheeWii wrote:
> Hi
> I have a simple question.
> I know the from_uri can get the FROM information. and  I can use 
> uac_replace_from() to change uri.
> But I just want to modify the domain only , the username need to be 
> reserved.
> Thus
> From: "123" <sip:123 at 192.168.0.1 
> <mailto:sip%3A123 at 192.168.0.1>>;----->From: "123" <sip:123 at 10.200.0.5 
> <mailto:sip%3A123 at 10.200.0.5>>
>  
> How can I accomplish it simply? Thanks a lot:)
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro




More information about the Users mailing list