How to modify username of FROM uri?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to modify username of FROM uri?

CheeWii
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" <[hidden email]>;----->From: "123" <[hidden email]>
 
How can I accomplish it simply? Thanks a lot:)
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to modify username of FROM uri?

Bogdan-Andrei Iancu
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@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@192.168.0.1
> <mailto:sip%3A123@192.168.0.1>>;----->From: "123" <sip:123@10.200.0.5
> <mailto:sip%3A123@10.200.0.5>>
>  
> How can I accomplish it simply? Thanks a lot:)
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  


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


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