[SR-Users] Kamalio + RTP Engine + SIP Client behind NAT

Nuno Miguel Reis nmreis at student.dei.uc.pt
Thu Jan 16 18:29:53 CET 2020


Hi again.

Thanks for all the help and suggestions. I realized the issue happens if
using kernel forwarding only. If I change rtpengine to start at userspace
without the kernel module enabled everything works fine as expected.
Do you have any hints on why this could be happening with the kernel module?

I'm running rtpengine like this:

usersapece: $ rtpengine -f -L 7 --interface=100.100.100.100 --listen-ng=
127.0.0.1:2223 --tos=184 --sip-source

kernel: $ rtpengine -f -L 7 --table=0 --interface=100.100.100.100
--listen-ng=127.0.0.1:2223 --tos=184 --no-fallback --sip-source


when using kernel module, I'm also setting this rules on chain INPUT under
iptables:

-A INPUT -p udp -m udp --dport 5000:16383 -j RTPENGINE --id 0
-A INPUT -p udp -m udp --dport 16384:32768 -j RTPENGINE --id 0
-A INPUT -p udp -m udp --dport 49152:65535 -j RTPENGINE --id 0


Looking forward to hear from you guys.

Regards,

--
Nuno Miguel Reis
Departamento de Engenharia Informática
Faculdade de Ciências e Tecnologia
Universidade de Coimbra


On Thu, Jan 16, 2020 at 1:23 PM Richard Fuchs <rfuchs at sipwise.com> wrote:

> On 15/01/2020 13.39, Nuno Miguel Reis wrote:
>
> Hi guys.
>
> I'm replacing a environment where I was using kamailio + freeswitch by
> another where I'm adding rtpengine to the mix.
> One of the issues I'm having now is when I have a SIP Client behind NAT:
>
> When I send the INVITE from the SIP Client, the SDP is using the private
> LAN IP address + the advertised media port, let's admit it's
> 10.10.10.10:5000 when the call establishes with a public server running
> kamailio + rtpengine, the actual RTP arrives from the home router public IP
> on a natted port, let's admit it's 100.100.100.100:65100, event though,
> RTPENGINE assumes that RTP stream is coming from 100.100.100.100:5000.
> I'm using the '--sip-source' with RTPENGINE to make it use the received ip
> address instead of the private IP coming in the SDP but I'm not finding
> anything to make RTPENGINE adapt an start sending the RTP FLOW to the port
> where he starts receiving the RTP flow from, discarding the SDP media port
> information.
>
> Rtpengine does this automatically, unless the `asymmetric` flag is used.
> You should see a log message about a `confirmed peer address` as soon as
> the first RTP is received on a port.
>
> Cheers
> _______________________________________________
> 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/20200116/d61a6989/attachment.html>


More information about the sr-users mailing list