[SR-Users] getting source IP from Contact header

Kordován Szabolcs koszab at gmail.com
Wed Mar 22 19:24:40 CET 2017


Hello,

You can use {uri.host}
<http://www.kamailio.org/wiki/cookbooks/5.0.x/transformations#urihost>
 transformation.

Regards,
Szabolcs

2017-03-22 18:23 GMT+01:00 Ali Taher <ataher at vanrise.com>:

> Hello everyone,
>
>
>
> I’m trying to get the host part from the contact header in the sip invite
> packet.
>
>
>
> Following is the contact header format:
>
> Contact: <sip:user_name at 192.168.1.1:5060>
>
>
>
> What I want as result is 192.168.1.1
>
>
>
> I searched among the pseudovairables  and found $ct variable which
> reference to the body of contact header. (<sip:user_name at 192.168.1.1:5060
> >)
>
>
>
> Is there a way to get directly the host (192.168.1.1) without applying
> transformation at the level of $ct.
>
> If not what transformation can achieve it.
>
>
>
> Thanks in advance.
>
>
>
> Regards,
>
> Ali
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170322/8b5d4ea9/attachment.html>


More information about the sr-users mailing list