[SR-Users] Regex question

Juha Heinanen jh at tutpro.com
Sun Nov 3 21:57:41 CET 2013


Oliver Roth writes:

> I need to do some string operations in kamailio.cfg.
> How can I get the cli from the following string:
> sip:+41523940347 at 195.216.67.103;user=phone
> 
> I only  would need  +41523940347 in a variable
> 
> Something like
> 
> $avp(s:myCli) = ^sip:\+(\d{11})@.{1,40}$
> 
> Any idea?

see if any of these would help:

http://www.kamailio.org/wiki/cookbooks/devel/transformations#uri_transformations

-- juha



More information about the sr-users mailing list