[OpenSIPS-Users] RTPPROXY not starting on correct user account

Steven Platt steven at olli-ai.com
Thu Sep 27 10:57:03 EDT 2018


Greetings,

I am having trouble with RTPProxy bridging media in Opensips 2.3.5

Currently, it seems that RTPProxy is starting as user "root" and not user
"rtpproxy" as it should.
In etc/init.d/rtpproxy I have added the additional daemon options to load
the service as user "rtpproxy", but these seem to be ignored. Running
RTPProxy as root, gives me log errors and does not function.

DAEMON_OPTS="-l [server public ip] -s udp:127.0.0.1:7890 -u rtpproxy
rtpproxy -d DBUG:LOG_LOCAL0"

I can manually kill the existing rtpproxy process and start it again with
the switches to run in the correctly user. If I do this I get working media
on my LAN, but still nothing when connecting with a phone on cellular NAT -
even thought opensips sees RTP proxy sock available.

So I have 2 problems:
- RTPPROXY not starting as "rtpproxy" user
- RTPPROXY when working as normal, does not bridge media for cellular
device NAT.

##### I later kill the PID for the RTPproxy instance running as root
root at opensips-server:~# ps aux | grep rtpproxy
rtpproxy  4458  0.0  0.0  93232  1596 ?        Ssl  09:09   0:00
/usr/bin/rtpproxy -l [ server public ip] -s udp:127.0.0.1 7890 -u rtpproxy
rtpproxy -d DBUG LOG_LOCAL0
root      4784  0.0  0.0   4336  1624 ?        Ss   09:12   0:00 /bin/sh
/etc/init.d/rtpproxy start
root      4787  0.0  0.0  19476  2196 ?        S    09:12   0:00
/usr/bin/rtpproxy -l [ server public ip] -s udp:127.0.0.1:7890 -u rtpproxy
rtpproxy -d DBUG LOG_LOCAL0
root      4831  0.0  0.0  12732  2136 pts/0    S+   09:13   0:00 grep
rtpproxy

####### RTP Proxy Config
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=rtpproxy
DESC="RTP relay"
DAEMON=/usr/bin/$NAME
USER=$NAME
GROUP=$USER
PIDFILE="/var/run/$NAME/$NAME.pid"
PIDFILE_DIR=`dirname $PIDFILE`
CONTROL_SOCK="unix:$PIDFILE_DIR/$NAME.sock"

test -x $DAEMON || exit 0
umask 002

. /lib/lsb/init-functions

# Include defaults if available
if [ -f /etc/default/$NAME ] ; then
        . /etc/default/$NAME
fi

DAEMON_OPTS="-l [server public ip] -s udp:127.0.0.1:7890 -u rtpproxy
rtpproxy -d DBUG:LOG_LOCAL0"



#### OpenSIPS Config
####  NAT modules
loadmodule "nathelper.so"
modparam("nathelper", "natping_interval", 10)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "sipping_bflag", "SIP_PING_FLAG")
modparam("nathelper", "sipping_from", "sip:pinger at 127.0.0.1") #CUSTOMIZE ME
modparam("nathelper", "received_avp", "$avp(received_nh)")

loadmodule "rtpproxy.so"
modparam("rtpproxy", "rtpproxy_sock", "udp:localhost:7890") # CUSTOMIZE ME


#######Log from opensips look normal to me
Sep 27 14:25:42 opensips-server rtpproxy[4424]: DBUG:handle_command:
received command "4443_3 VF 20081102"
Sep 27 14:25:42 opensips-server /usr/sbin/opensips[4452]:
INFO:rtpproxy:rtpp_test: rtp proxy <udp:localhost:7890> found, support for
it enabled
Sep 27 14:25:42 opensips-server /usr/sbin/opensips[4451]:
INFO:rtpproxy:rtpp_test: rtp proxy <udp:localhost:7890> found, support for
it enabled
Sep 27 14:25:42 opensips-server /usr/sbin/opensips[4444]:
INFO:rtpproxy:rtpp_test: rtp proxy <udp:localhost:7890> found, support for
it enabled
Sep 27 14:25:42 opensips-server /usr/sbin/opensips[4442]:
INFO:rtpproxy:rtpp_test: rtp proxy <udp:localhost:7890> found, support for
it enabled
Sep 27 14:25:42 opensips-server /usr/sbin/opensips[4461]:
INFO:rtpproxy:rtpp_test: rtp proxy <udp:localhost:7890> found, support for
it enabled
Sep 27 14:25:42 opensips-server /usr/sbin/opensips[4463]:
INFO:rtpproxy:rtpp_test: rtp proxy <udp:localhost:7890> found, support for
it enabled
Sep 27 14:25:42 opensips-server /usr/sbin/opensips[4464]:
INFO:rtpproxy:rtpp_test: rtp proxy <udp:localhost:7890> found, support for
it enabled
Sep 27 14:25:42 opensips-server /usr/sbin/opensips[4454]:
INFO:rtpproxy:rtpp_test: rtp proxy <udp:localhost:7890> found, support for
it enabled
Sep 27 14:25:42 opensips-server rtpproxy[4424]: DBUG:doreply: sending reply
"4443_3 1#012"
Sep 27 14:25:42 opensips-server rtpproxy[4424]: DBUG:handle_command:
received command "4433_3 VF 20081102"
Sep 27 14:25:42 opensips-server rtpproxy[4424]: DBUG:doreply: sending reply
"4433_3 1#012"
Sep 27 14:25:42 opensips-server rtpproxy[4424]: DBUG:handle_command:
received command "4434_1 VF 20050322"
Sep 27 14:25:42 opensips-server rtpproxy[4424]: DBUG:doreply: sending reply
"4434_1 1#012"
Sep 27 14:25:42 opensips-server rtpproxy[4424]: DBUG:handle_command:
received command "4437_1 VF 20050322"
Sep 27 14:25:42 opensips-server rtpproxy[4424]: DBUG:doreply: sending reply
"4437_1 1#012"
Sep 27 14:25:42 opensips-server rtpproxy[4424]: DBUG:handle_command:
received command "4442_0 V"
Sep 27 14:25:42 opensips-server rtpproxy[4424]: DBUG:doreply: sending reply
"4442_0 20040107#012"
Sep 27 14:25:42 opensips-server rtpproxy[4424]: DBUG:handle_command:
received command "4452_0 V"
Sep 27 14:25:42 opensips-server rtpproxy[4424]: DBUG:doreply: sending reply
"4452_0 20040107#012"
Sep 27 14:25:42 opensips-server /usr/sbin/opensips[4437]:
WARNING:dialplan:dp_load_db: no data in the db
Sep 27 14:25:42 opensips-server rtpproxy[4424]: DBUG:handle_command:
received command "4451_0 V"
Sep 27 14:25:42 opensips-server opensips: INFO:core:daemonize: pre-daemon
process exiting with 0
Sep 27 14:25:42 opensips-server rtpproxy[4424]: DBUG:doreply: sending reply
"4451_0 20040107#012"
Sep 27 14:25:42 opensips-server rtpproxy[4424]: DBUG:handle_command:
received command "4457_0 V"

Any suggestions for this one?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20180927/54cd92e2/attachment.html>


More information about the Users mailing list