[SR-Users] Kamailio and RTPProxy

Juan Perez juan_perez_2014 at yahoo.com
Tue Oct 28 01:22:11 CET 2014


I installed Kamailio 4.2 and the latest rtpproxy. When starting Kamailio I see these lines:

Oct 27 21:54:26 ip-10-0-2-68 kamailio: DEBUG: <core> [sr_module.c:590]: load_module(): load_module: trying to load </usr/local
Oct 27 21:54:26 ip-10-0-2-68 kamailio: DEBUG: <core> [sr_module.c:357]: register_module(): register PV from: rtpproxy
Oct 27 21:54:26 ip-10-0-2-68 kamailio: DEBUG: <core> [cfg.lex:1724]: pp_define(): defining id: MOD_rtpproxy
Oct 27 21:54:32 ip-10-0-2-68 ./kamailio[3887]: ERROR: rtpproxy [rtpproxy.c:1707]: send_rtpp_command(): timeout waiting reply f
Oct 27 21:54:32 ip-10-0-2-68 ./kamailio[3887]: ERROR: rtpproxy [rtpproxy.c:1716]: send_rtpp_command(): proxy <udp:10.0.2.68:77
Oct 27 21:54:32 ip-10-0-2-68 ./kamailio[3887]: WARNING: rtpproxy [rtpproxy.c:1573]: rtpp_test(): can't get version of the RTP
Oct 27 21:54:32 ip-10-0-2-68 ./kamailio[3887]: WARNING: rtpproxy [rtpproxy.c:1610]: rtpp_test(): support for RTP proxy <udp:10
Oct 27 21:54:37 ip-10-0-2-68 ./kamailio[3898]: ERROR: rtpproxy [rtpproxy.c:1707]: send_rtpp_command(): timeout waiting reply f
Oct 27 21:54:37 ip-10-0-2-68 ./kamailio[3898]: ERROR: rtpproxy [rtpproxy.c:1716]: send_rtpp_command(): proxy <udp:10.0.2.68:77
Oct 27 21:54:37 ip-10-0-2-68 ./kamailio[3898]: WARNING: rtpproxy [rtpproxy.c:1573]: rtpp_test(): can't get version of the RTP

I run rtpproxy like this:
/usr/local/rtpproxy-install-dir/bin/rtpproxy -l <public ip here> -s udp:10.0.2.68:7722 -F -d DBUG:LOG_LOCAL3

I have these linee in the kamailio.cfg file

loadmodule "rtpproxy.so"

# ----- rtpproxy params -----
modparam("rtpproxy", "rtpproxy_sock", "udp:10.0.2.68:7722")

I have tried with localhost, with 127.0.0.1 and get the same results ( I mean configure kamailio to contact rttpproxy with localhost instead of ip and at the same time running rtpproxy with the same reference.

 I can see the rtpproxy running/listening

[root at ip-10-0-2-68 sbin]# netstat -lnp  | grep rtpproxy
udp        0      0 10.0.2.68:7722              0.0.0.0:*                               3608/rtpproxy

I can also see these lines:
[root at ip-10-0-2-68 sbin]# netstat -np  | grep 7722
udp        0      0 10.0.2.68:49772             10.0.2.68:7722              ESTABLISHED 3928/./kamailio
udp        0      0 10.0.2.68:36097             10.0.2.68:7722              ESTABLISHED 3897/./kamailio
udp        0      0 10.0.2.68:49158             10.0.2.68:7722              ESTABLISHED 3906/./kamailio
udp        0      0 10.0.2.68:37129             10.0.2.68:7722              ESTABLISHED 3904/./kamailio
udp        0      0 10.0.2.68:39052             10.0.2.68:7722              ESTABLISHED 3926/./kamailio
udp        0      0 10.0.2.68:38161             10.0.2.68:7722              ESTABLISHED 3919/./kamailio
udp        0      0 10.0.2.68:53144             10.0.2.68:7722              ESTABLISHED 3887/./kamailio
udp        0      0 10.0.2.68:39721             10.0.2.68:7722              ESTABLISHED 3905/./kamailio
udp        0      0 10.0.2.68:59563             10.0.2.68:7722              ESTABLISHED 3909/./kamailio
udp        0      0 10.0.2.68:51884             10.0.2.68:7722              ESTABLISHED 3921/./kamailio
udp        0      0 10.0.2.68:46902             10.0.2.68:7722              ESTABLISHED 3930/./kamailio
udp        0      0 10.0.2.68:33981             10.0.2.68:7722              ESTABLISHED 3931/./kamailio
udp        0      0 10.0.2.68:60221             10.0.2.68:7722              ESTABLISHED 3898/./kamailio
udp        0      0 10.0.2.68:35651             10.0.2.68:7722              ESTABLISHED 3900/./kamailio
udp        0      0 10.0.2.68:33105             10.0.2.68:7722              ESTABLISHED 3927/./kamailio
udp        0      0 10.0.2.68:43349             10.0.2.68:7722              ESTABLISHED 3887/./kamailio
udp        0      0 10.0.2.68:39259             10.0.2.68:7722              ESTABLISHED 3899/./kamailio
udp        0      0 10.0.2.68:35170             10.0.2.68:7722              ESTABLISHED 3907/./kamailio
udp        0      0 10.0.2.68:38760             10.0.2.68:7722              ESTABLISHED 3908/./kamailio



In the rtpproxy I see that it is sent data and it replies too, I even got a wireshark capture showing that as well:

Oct 27 21:54:41 ip-10-0-2-68 rtpproxy[3608]: DBUG:get_command: received command "3931_2 V"
Oct 27 21:54:41 ip-10-0-2-68 rtpproxy[3608]: DBUG:rtpc_doreply: sending reply "20040107#012"
Oct 27 21:54:41 ip-10-0-2-68 rtpproxy[3608]: DBUG:get_command: received command "3927_2 V"
Oct 27 21:54:41 ip-10-0-2-68 rtpproxy[3608]: DBUG:rtpc_doreply: sending reply "20040107#012"
Oct 27 21:54:41 ip-10-0-2-68 rtpproxy[3608]: DBUG:get_command: received command "3926_2 V"
Oct 27 21:54:41 ip-10-0-2-68 rtpproxy[3608]: DBUG:rtpc_doreply: sending reply "20040107#012"
Oct 27 21:54:41 ip-10-0-2-68 rtpproxy[3608]: DBUG:get_command: received command "3928_2 V"
Oct 27 21:54:41 ip-10-0-2-68 rtpproxy[3608]: DBUG:rtpc_doreply: sending reply "20040107#012"


But somehow kamailio does not see it:

[root at ip-10-0-2-68 sbin]# ./kamctl fifo nh_show_rtpp
which: no greadlink in (/sbin:/bin:/usr/sbin:/usr/bin:/)
which: no gdb in (/sbin:/bin:/usr/sbin:/usr/bin:/)
udp:10.0.2.68:7722::  set=0
        index:: 0
        disabled:: 1
        weight:: 1
        recheck_ticks:: 53253287


I even when to the kamailio code and saw something that may have something to do with it but havent tried it yet:, in the implementation of the function "send_rtpp_command" I see that the socket created is using TCP. But I tried configuring kamailio/rtpproxy to use tcp instead but I also got the same results, kamailio seems to fail to acknoledgwe the replies from rtpproxy.
I also have SELINUX disabled and the iptables are not running.

I dont know what else to check, if somebody can shed some light into this I'd appreciate it.

jp2014


 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20141028/ceb22d45/attachment.html>


More information about the sr-users mailing list