[SR-Users] Retrieve remote IP and port

Arsen arsen.semionov at gmail.com
Fri Sep 29 14:38:04 CEST 2017


Hi Iskren,

What do you mean by 'true IP address'? The real IP address of a device
which sends a request?

$si and $sp reference to the source IP address and port of the message,
"Via" header contains IP address and port of UA and it could be different
from $si, for example if UA is behind NAT device.



Arsen Semionov

On Fri, Sep 29, 2017 at 3:05 PM, Iskren Hadzhinedev <
iskren.hadzhinedev at ikiji.com> wrote:

> Hi list,
>
> How can I reliably get the sender’s IP address?
> $si and $sp are returning the server IP and Port.
> I also tried using $Ri and $Rp but it yields the same results.
> Inspecting the packet shows the sender’s true IP:Port pair in the Via:
> header,
> but the From: and To: contain the kamailio server’s public IP address.
>
> Kind regards,
>> --
> *Iskren Hadzhinedev*
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170929/5faa11c8/attachment.html>


More information about the sr-users mailing list