Now I compiled the rtpproxy (latest version) and got -A parameter.

To sure I am clear,

Dear,

SETUP :
QUESTION :
  • rtpproxy
    • Do I need the -l PRIVATE_IP AND/OR PUBLIC_IP  for NAT ?
    • Do I need the -A PRIVATE_IP/PUBLIC_IP  for NAT ?
  • kamailio
    • Do I need to add extra code on ROUTING to enable advertise - NAT ?
Best Regards,

Youssef BOUJRAF
Mobile: +32 (0)477 94 86 89
Skype: y_boujraf
Email: yboujraf@gmail.com



Best Regards,

Youssef BOUJRAF
Mobile: +32 (0)477 94 86 89
Skype: y_boujraf
Email: yboujraf@gmail.com


On Fri, Oct 1, 2021 at 8:29 PM Youssef Boujraf <yboujraf@gmail.com> wrote:
Dear all,

I just compiled the rtpproxy from sippy github repo.

I have installed the rtpproxy with advertise.

Now, when trying to start kamailio, I have those errors :

 /usr/sbin/kamailio[784]: ERROR: rtpproxy [rtpproxy.c:1060]: child_init(): Name or service not known
 /usr/sbin/kamailio[784]: ERROR: <core> [sr_module.c:922]: init_mod_child(): Error while initializing module rtpproxy (/usr/lib/x86_64-linux-gnu/kamailio/modules/rtpproxy.so)
 /usr/sbin/kamailio[784]: ERROR: <core> [pt.c:328]: fork_process(): init_child failed for process 5, pid 784, "slow timer"
 /usr/sbin/kamailio[784]: CRITICAL: <core> [main.c:1663]: main_loop(): cannot fork "slow" timer process
 /usr/sbin/kamailio[779]: ALERT: <core> [main.c:735]: handle_sigs(): child process 784 exited normally, status=255


Best Regards,

Youssef BOUJRAF
Mobile: +32 (0)477 94 86 89
Skype: y_boujraf
Email: yboujraf@gmail.com


On Fri, Oct 1, 2021 at 4:49 PM Youssef Boujraf <yboujraf@gmail.com> wrote:
Dear Henning,

I need to move my existing installation working fine on VMWare and public ip without NAT to a new infra doesn’t providing direct public ip. NAT is mandatory.

Yes after my move to new infra. I will migrate to latest framework.

Just now, I compiled the latest rtpproxy and will check if wit -A parameter and in kamailio add listen with advertise will fix my issue.

Any help of the rtpproxy and kamailio config will help me so much

Best regards
Boujraf Youssef

On 1 Oct 2021, at 15:08, Henning Westerholt <hw@skalatan.de> wrote:



Hello Youssef,

 

before investing a lot of time into this old version, I would suggest that you update:

 

  • operating system (e.g. at least to Debian Buster)
  • Kamailio (at least 5.4.x)
  • And also rtpproxy, consider also rtpengine which is much more flexible especially for NAT scenarios

 

In the newer kamailio default cfg you find also support for rtpengine, it can be easily enabled with a define.

 

Cheers,

 

Henning

 

From: sr-users <sr-users-bounces@lists.kamailio.org> On Behalf Of Youssef Boujraf
Sent: Friday, October 1, 2021 1:01 PM
To: sr-users@lists.kamailio.org
Cc: Contacts <yboujraf@gmail.com>
Subject: [SR-Users] Kamailio 4.4 + rtpproxy behind the NAT (debian stretch 9.13)

 

Dear,

 

I am testing the kakamilio 4.4 with rtpproxy on Debian stretch 9.13

I have installed the packages

·         apt-get install kamailio and rtpproxy.

·         kamailio 4.4

·         rtpproxy Basic version: 20040107

 

My version of RTPPROXY doesn't have the -A parameter so that means without advertising there is no way to work behind NAT? That is what I have understood after spending one week on forums. Thanks if somebody could confirm otherwise, which way I need to go to figure out my issue?

 

# rtpproxy -v
Basic version: 20040107
Extension 20050322: Support for multiple RTP streams and MOH
Extension 20060704: Support for extra parameter in the V command
Extension 20071116: Support for RTP re-packetization
Extension 20071218: Support for forking (copying) RTP stream
Extension 20080403: Support for RTP statistics querying
Extension 20081102: Support for setting codecs in the update/lookup command
Extension 20081224: Support for session timeout notifications

 

# rtpproxy -help
rtpproxy: invalid option -- 'h'
usage: rtpproxy [-2fvFiPa] [-l addr1[/addr2]] [-6 addr1[/addr2]] [-s path]
        [-t tos] [-r rdir [-S sdir]] [-T ttl] [-L nfiles] [-m port_min]
        [-M port_max] [-u uname[:gname]] [-n timeout_socket] [-d log_level[:log_facility]]
#

 

/etc/hosts

 

127.0.0.1       localhost
127.0.1.1       sip.dom.xx sip
192.168.1.19    sip.dom.xx sip
PUBLIC_IP   sip.dom.xx sip
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

 

/etc/kamailio/kamailio.cfg

kamailio.config

#!define PUBLIC_IP "xxx.xxx.xxx.xxx"
#!define PRIVATE_IP "192.168.1.19"
#!define PRIVATE_NET "192.168.1.0/24

listen=udp:PRIVATE_IP:5060 advertise PUBLIC_IP:5060 

 

#!ifdef WITH_NAT

# ----- rtpproxy params -----

modparam("rtpproxy", "rtpproxy_sock", "udp:PRIVATE_IP:7722")


# ----- nathelper params -----

modparam("nathelper", "natping_interval", 30)

modparam("nathelper", "ping_nated_only", 1)

modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)

modparam("nathelper", "sipping_from", "sip:pinger@kamailio.org")

 

Etc/default/rtpproxy

 

PRIVATE_IP=192.168.1.19

PUBLIC_IP=xxx.xxx.xxx.xxx

rtpport_min= 10000

rtpport_max=20000

syslog=DBUG:LOG_LOCAL5

#Defaults for rtpproxy
#The control socket.
#CONTROL_SOCK="unix:/var/run/rtpproxy/rtpproxy.sock"
#To listen on an UDP socket, uncomment this line:
#CONTROL_SOCK=udp:127.0.0.1:7722
#Additional options that are passed to the daemon.
EXTRA_OPTS="-l $PRIVATE_IP/$PUBLIC_IP ="-s $PRIVATE_IP:7222 -m $rtpport_min -M $rtpport_max -d $syslog"`

 

Thanks if you could route me to the right way.

 

Best regards


Yboujraf
Email: yboujraf@gmail.com