Got it - thanks for your help.
$avp(s:fromCLI) = $(ai{re.subst,/^sip:(.*)@(.*)/\1/});
-----Ursprüngliche Nachricht-----
Von: sr-users-bounces(a)lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org]
Im Auftrag von Juha Heinanen
Gesendet: Sonntag, 3. November 2013 21:58
An: Kamailio (SER) - Users Mailing List
Cc: kamailio(a)AaronLux.com
Betreff: [SR-Users] Regex question
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@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_transforma…
-- juha
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-----
E-Mail ist virenfrei.
Von AVG überprüft -
www.avg.de
Version: 2014.0.4158 / Virendatenbank: 3615/6804 - Ausgabedatum: 02.11.2013