On 05/27/2016 10:21 AM, Al S wrote: > Hi, > > I am trying to read username portion of Contact header: > > My Contact header content has a URI value such as: > sip:8131110000@10.10.10.10.:5060 > > and I am trying to read : 8131110000 > > I tried the following perl similar RE and it didn't work: > > ($var(main_number2)) = $ct =~ /sip:(.*)@/; > > Thanks, > AS
Check out transformations: $var(user) = $(ct{tobody.user}); http://www.kamailio.org/wiki/cookbooks/4.4.x/transformations#uri_transformations http://www.kamailio.org/wiki/cookbooks/4.4.x/transformations#to-body_transformations -- Fred Posner @fredposner The Palner Group, Inc. http://www.palner.com direct/sms: +1 (503) 914-0999 direct/sms: +1 (224) 334-FRED _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users