[Kamailio-Users] Recording RTP session

Klaus Darilion klaus.mailinglists at pernau.at
Mon Mar 22 10:18:12 CET 2010


Hi!

Never did recording, but just:

1. try without recording and make sure that the stream really is relayed 
via rtpproxy (tcpdump, ngrep). Your logs only show the initialization of 
nathelper module, contacting rtpproxy during startup. It does not show 
any call that is relayed.

2. only if above is verified and works well, add the start_recording() 
command to you configuration. I think start_recording() should be called 
after force_rtpproxy.

regards
klaus

Am 19.03.2010 16:13, schrieb Hector.Ortiz at swisscom.com:
> Hi everybody
>
> I’ve configured a SIP server (OpenSER 1.3.2) to work with rtpproxy and
> so far everything is fine, but now I want to be able to record the audio
> from a conversation. I’ve read that this is possible by using the
> function start_recording from the module NATHelper but I’m not able to
> get it working
>
> RTPproxy 1.2.1 is running with the following options:
>
> root at openser:/opt/rtpproxy-1.2.1/bin# ps uax | grep rtpproxy
>
> rtpproxy 30827  0.0  0.0  26968   964 ?        Ssl  14:49   0:00
> /opt/rtpproxy-1.2.1/bin/rtpproxy -u rtpproxy rtpproxy -p
> /var/run/rtpproxy/rtpproxy.pid -l 192.168.34.1 -s udp:127.0.0.1 7890 -r
> /etc/openser/stored_conversations -S /tmp -a -d DBUG -P
>
> root     31547  0.0  0.0   7524   892 pts/1    R+   15:59   0:00 grep
> rtpproxy
>
> Output from netstat
>
> root at openser:/opt/rtpproxy-1.2.1/bin# netstat -tupna | grep rtpproxy
>
> udp        0      0 127.0.0.1:7890
> 0.0.0.0:*                           30827/rtpproxy
>
> Relevant parts of the configuration file
>
>>
> # ------ nathelper params -----
>
> modparam("nathelper", "natping_interval", 30)
>
> modparam("nathelper", "ping_nated_only", 1)
>
> modparam("nathelper", "sipping_bflag", 7)
>
> modparam("nathelper", "sipping_from", "sip:pinger at openser.org")
>
> modparam("nathelper", "rtpproxy_sock", "udp:127.0.0.1:7890")
>
> modparam("nathelper", "force_socket", "udp:localhost:7890")
>
>>
> route[6] {
>
>          xlog("L_INFO", "ROUTE 6");
>
>          # NAT handling
>
>          # Set reply routing block, to which control is passed after a
> transaction
>
>          # completed with a negative result but before sending a final reply
>
>          t_on_failure("1");
>
>          # Check if we're NATed
>
>          if (isflagset(5) || isbflagset(6)) {
>
>                  # Use rtpproxy
>
>                  force_rtp_proxy();
>
>                  if ( start_recording() ) {
>
>                          xlog("L_INFO", "RECORDING...");
>
>                  };
>
>          }
>
>          # Set reply routing block, to which control is passed each time
> a reply
>
>          # (provisional or final) for the transaction is received
>
>          t_on_reply("1");
>
> }
>
>>
> onreply_route[1] {
>
>          xlog("L_INFO", "ONREPLY_ROUTE");
>
>          if ((isflagset(5) || isbflagset(6)) &&
> status=~"(180)|(183)|(2[0-9][0-9])") {
>
>                  xlog("L_INFO", "NAT'd TRANSACTION");
>
>                  fix_nated_contact();
>
>                  force_rtp_proxy();
>
>                  if ( start_recording() ) {
>
>                          xlog("L_INFO", "RECORDING...");
>
>                  };
>
>          }
>
>          else if (nat_uac_test("1")) {
>
>                  fix_nated_contact();
>
>          }
>
>          exit;
>
> }
>
> When I start OpenSER I see the following in syslog
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31630]: NOTICE:core:main:
> version: openser 1.3.2-notls (x86_64/linux)
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31630]: INFO:core:main: using
> 256 Mb shared memory
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31630]: INFO:core:main: using
> 1 Mb private memory per process
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31630]: INFO:sl:mod_init:
> Initializing StateLess engine
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31630]: INFO:tm:mod_init: TM -
> initializing...
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31630]: INFO:maxfwd:mod_init:
> initializing...
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31630]:
> INFO:usrloc:ul_init_locks: locks array size 512
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31630]:
> INFO:registrar:mod_init: initializing...
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31630]: INFO:textops:mod_init:
> initializing...
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31630]: INFO:xlog:mod_init:
> initializing...
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31630]:
> INFO:avpops:avpops_init: initializing...
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31630]: INFO:acc:mod_init:
> initializing...
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31630]: INFO:dialog:mod_init:
> Dialog module - initializing
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31630]:
> INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 255 kb
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31630]:
> INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 255 kb
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31632_0 V"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31632_0 20040107 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31632_1 VF 20050322"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31632_1 1 "
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31632]:
> INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
> for it enabled
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31631_0 V"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31631_0 20040107 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31633_0 V"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31633_0 20040107 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31634_0 V"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31634_0 20040107 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31635_0 V"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31635_0 20040107 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31636_0 V"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31636_0 20040107 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31637_0 V"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31637_0 20040107 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31638_0 V"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31638_0 20040107 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31637_1 VF 20050322"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31637_1 1 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31631_1 VF 20050322"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31631_1 1 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31634_1 VF 20050322"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31634_1 1 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31636_1 VF 20050322"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31636_1 1 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31633_1 VF 20050322"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31633_1 1 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31635_1 VF 20050322"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31635_1 1 "
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31631]:
> INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
> for it enabled
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31634]:
> INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
> for it enabled
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31637]:
> INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
> for it enabled
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31633]:
> INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
> for it enabled
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31636]:
> INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
> for it enabled
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31635]:
> INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
> for it enabled
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31638]:
> INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
> for it enabled
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31639_0 V"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31639_0 20040107 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31638_1 VF 20050322"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31638_1 1 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31640_0 V"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31640_0 20040107 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31642_0 V"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31642_0 20040107 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31643_0 V"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31643_0 20040107 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31644_0 V"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31644_0 20040107 "
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31642]:
> INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
> for it enabled
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31643]:
> INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
> for it enabled
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31645_0 V"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31645_0 20040107 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31639_1 VF 20050322"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31639_1 1 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31642_1 VF 20050322"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31642_1 1 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31644_1 VF 20050322"
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31644]:
> INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
> for it enabled
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31644_1 1 "
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31640]:
> INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
> for it enabled
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31639]:
> INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
> for it enabled
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31640_1 VF 20050322"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31640_1 1 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31643_1 VF 20050322"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31643_1 1 "
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:handle_command: received
> command "31645_1 VF 20050322"
>
> Mar 19 16:08:45 openser rtpproxy[30827]: DBUG:doreply: sending reply
> "31645_1 1 "
>
> Mar 19 16:08:45 openser /usr/sbin/openser[31645]:
> INFO:nathelper:rtpp_test: rtp proxy <udp:127.0.0.1:7890> found, support
> for it enabled
>
> But when I place the call no debug info from rtpproxy is being generated
> nor the RTP session is being saved to file.
>
> Any idea what the problem can be?
>
> Thanks in advance
>
> Héctor
>
>
>
> _______________________________________________
> Kamailio (OpenSER) - Users mailing list
> Users at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users



More information about the Users mailing list