[SR-Users] username of Contact header
Fred Posner
fred at palner.com
Fri May 27 16:27:59 CEST 2016
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 at 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
More information about the sr-users
mailing list