Replace $tU value

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

Replace $tU value

Vishal Pai
Hello Everyone

Is it possible to update the $tU value to new one. Let say $tU = 1234567890 need to overwrite to $tU = 9876543210 how i can achieve that.

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Replace $tU value

David Villasmil
Just do:

$tU = 9876543210

Simple :)
On Mon, 26 Nov 2018 at 16:46, Vishal Pai <[hidden email]> wrote:
Hello Everyone

Is it possible to update the $tU value to new one. Let say $tU = 1234567890 need to overwrite to $tU = 9876543210 how i can achieve that.
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Replace $tU value

Bogdan-Andrei Iancu-2
In reply to this post by Vishal Pai
Hi Vishal,

use uac_replace_to() function:
    http://www.opensips.org/html/docs/modules/2.4.x/uac.html#func_uac_replace_from

Regards,
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/
On 11/26/2018 06:42 PM, Vishal Pai wrote:
Hello Everyone

Is it possible to update the $tU value to new one. Let say $tU = 1234567890 need to overwrite to $tU = 9876543210 how i can achieve that.


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


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Replace $tU value

Bogdan-Andrei Iancu-2
In reply to this post by David Villasmil
David,

That does not work as the $tU is a read-only variable.

Regards,
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/
On 11/26/2018 07:22 PM, David Villasmil wrote:
Just do:

$tU = 9876543210

Simple :)
On Mon, 26 Nov 2018 at 16:46, Vishal Pai <[hidden email]> wrote:
Hello Everyone

Is it possible to update the $tU value to new one. Let say $tU = 1234567890 need to overwrite to $tU = 9876543210 how i can achieve that.
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Replace $tU value

Vishal Pai
In reply to this post by Bogdan-Andrei Iancu-2
Hi Bogdan,

Thank you for your quick response.

I have tried both the way still unable to overwrite the value.

uac_replace_to("$tU","9876543210");
uac_replace_to("9876543210","$tU");

Can you please let me know the right way to achieve this.

Thanks


On Mon, Nov 26, 2018 at 10:59 PM Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi Vishal,

use uac_replace_to() function:
    http://www.opensips.org/html/docs/modules/2.4.x/uac.html#func_uac_replace_from

Regards,
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/
On 11/26/2018 06:42 PM, Vishal Pai wrote:
Hello Everyone

Is it possible to update the $tU value to new one. Let say $tU = 1234567890 need to overwrite to $tU = 9876543210 how i can achieve that.


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


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Replace $tU value

Bogdan-Andrei Iancu-2
Hi,

uac_replace_to(<a class="moz-txt-link-rfc2396E" href="sip:9876543210@$td">"sip:9876543210@$td");

should do it - you need to call it only for the initial INVITE.

Regards,
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/
On 11/26/2018 09:01 PM, Vishal Pai wrote:
Hi Bogdan,

Thank you for your quick response.

I have tried both the way still unable to overwrite the value.

uac_replace_to("$tU","9876543210");
uac_replace_to("9876543210","$tU");

Can you please let me know the right way to achieve this.

Thanks


On Mon, Nov 26, 2018 at 10:59 PM Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi Vishal,

use uac_replace_to() function:
    http://www.opensips.org/html/docs/modules/2.4.x/uac.html#func_uac_replace_from

Regards,
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/
On 11/26/2018 06:42 PM, Vishal Pai wrote:
Hello Everyone

Is it possible to update the $tU value to new one. Let say $tU = 1234567890 need to overwrite to $tU = 9876543210 how i can achieve that.


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



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Replace $tU value

Vishal Pai
It worked.

Thank You Bogdan

On Tue, Nov 27, 2018 at 2:20 AM Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi,

uac_replace_to("sip:9876543210@$td");

should do it - you need to call it only for the initial INVITE.

Regards,
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/
On 11/26/2018 09:01 PM, Vishal Pai wrote:
Hi Bogdan,

Thank you for your quick response.

I have tried both the way still unable to overwrite the value.

uac_replace_to("$tU","9876543210");
uac_replace_to("9876543210","$tU");

Can you please let me know the right way to achieve this.

Thanks


On Mon, Nov 26, 2018 at 10:59 PM Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi Vishal,

use uac_replace_to() function:
    http://www.opensips.org/html/docs/modules/2.4.x/uac.html#func_uac_replace_from

Regards,
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/
On 11/26/2018 06:42 PM, Vishal Pai wrote:
Hello Everyone

Is it possible to update the $tU value to new one. Let say $tU = 1234567890 need to overwrite to $tU = 9876543210 how i can achieve that.


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



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