[SR-Users] getting source IP from Contact header

Alex Balashov abalashov at evaristesys.com
Wed Mar 22 19:52:41 CET 2017


Ali,

A Contact header is a "name-address pair", so you first need to fetch
the URI from it before you can fetch that URI's host portion. All of
that can be done using Kamailio transformations:

http://www.kamailio.org/wiki/cookbooks/5.0.x/transformations

To accomplish what you'd want, you'd use:

   $(ct{nameaddr.uri}{uri.host})

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/



More information about the sr-users mailing list