[OpenSIPS-Users] Extract "numeric part" of RURI
Bogdan-Andrei Iancu
bogdan at opensips.org
Thu Jan 9 13:15:20 UTC 2025
Hi Alain,
There is no direct way. You need to use a transformation (on top of $rU)
in order to get that param value : $(rU{s.select,0,,}) , see
https://www.opensips.org/Documentation/Script-Tran-3-4#s.select
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
https://www.opensips-solutions.com
https://www.siphub.com
On 09.01.2025 14:56, Alain Bieuzent wrote:
>
> unfortunatelyno,
>
> $rU in my example returns the entire string between sip: and before
> the @ => 123456789;tgrp=99999
>
> I know how read the value of parameters (ex : $(rU{param.value, tgrp})
> ), but I don’t know how to read the value without parameters
>
> Thanks
>
> *De : *Users <users-bounces at lists.opensips.org> au nom de Ali Dogan
> <alidogan at plan.com>
> *Répondre à : *OpenSIPS users mailling list <users at lists.opensips.org>
> *Date : *jeudi 9 janvier 2025 à 12:31
> *À : *OpenSIPS users mailling list <users at lists.opensips.org>
> *Objet : *Re: [OpenSIPS-Users] Extract "numeric part" of RURI
>
> Hello Alain,
>
> 3.77 Username in SIP Request's URI - $rU 🔗
>
> $rU - reference to username in request's URI
>
> It is R/W variable (you can assign values to it routing script)
>
>
> This should give you what you need.
>
> Best Regards,
>
> *Ali Dogan***********
>
> *plan.com <http://www.plan.com/>*
>
>
>
> +44(0)3300 88 18 18 <tel:+44(0)3300%2088%2018%2018>
>
> *alidogan at plan.com <mailto:alidogan at plan.com>*
>
> Facebook <https://www.facebook.com/plan.im>
>
>
>
> Instagram <https://www.instagram.com/plandotcom>
>
>
>
> LinkedIn <https://www.linkedin.com/company/plan-com>
>
>
>
>
>
> plan.com <http://www.plan.com/> is the trading name of Plan
> Communications Limited, registered in the Isle of Man with company
> number 010273V and Registered Office at No.5 Victoria Street, Douglas,
> Isle of Man, IM1 2LR. This email and any attachments to it may be
> confidential and are intended solely for the use of the individual to
> whom it is addressed. Any views or opinions expressed are solely those
> of the author and do not necessarily represent those of Plan. If you
> are not the intended recipient of this email, you must neither take
> any action based upon its contents, nor copy or show it to anyone.
> Please contact the sender if you believe you have received this email
> in error.
>
> ------------------------------------------------------------------------
>
> *From:* Users <users-bounces at lists.opensips.org> on behalf of Alain
> Bieuzent <alain.bieuzent at free.fr>
> *Sent:* Thursday, January 9, 2025 14:12
> *To:* OpenSIPS users mailling list <users at lists.opensips.org>
> *Subject:* [OpenSIPS-Users] Extract "numeric part" of RURI
>
>
>
>
> This message was sent from outside plan.com. Please do not click links
> or open attachments unless you recognise the source of this email and
> know the content is safe.
>
> Good Morning,
>
> What is the best way to extract the "numeric part" of a RURI, for
> example on an INVITE with tgrp parameter and I want to extract only
> the “123456789” part
>
> INVITE _sip:123456789;tgrp=99999 at X.X.X.X:5060
> <sip:123456789;tgrp=99999 at X.X.X.X:5060>_
>
> Thanks in advance,
>
> Alain
>
> _______________________________________________ Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20250109/76477ea1/attachment-0001.html>
More information about the Users
mailing list