Hello,

If the input data is somehow well formed, you could use the following 
transformation to split around the pipe character for example:
https://www.kamailio.org/wiki/cookbooks/devel/transformations#sselect_index_separator

Cheers,

Henning 

> -----Original Message-----
> From: Ricardo Castillo via sr-users <sr-users@lists.kamailio.org>
> Sent: Freitag, 19. April 2024 12:38
> To: sr-users@lists.kamailio.org
> Cc: Ricardo Castillo <pkecasti...@gmail.com>
> Subject: [SR-Users] lcr module, avp_subst to $avp(i:709)
> 
> Hi, I'm trying to capture the content of an AVP from the LCR module and 
> assign it
> to another variable to make use of what is obtained by the regex. For this, I 
> have
> used the avp_subst.
> 
> The content of $avp(i:709):
> 1|sip:|0|||2416027840||5061||;transport=udp|11|1
> 
> I need to extract the index that indicates the port "5061" at position 8.
> I haven't been able to achieve this by trying several regex patterns.
> Has anyone experienced something similar?
> 
> Thanks!
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send
> an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:

Reply via email to