sippy / rtpproxy

The RTPproxy is a high-performance software proxy for RTP streams that can work together with Sippy B2BUA, Kamailio, OpenSIPS and SER.
http://rtpproxy.org
BSD 2-Clause "Simplified" License
405 stars 114 forks source link

Can't put all packets from both directions into a single file #146

Open chenyw11 opened 1 year ago

chenyw11 commented 1 year ago

I use rtpproxy + opensips to record audio. But when I use wireshark to open the pcap, I can only find one direction in the file.

rtppoxy version: 2.2.alpha start with -P -r /recording -S /spool -R opensips version: 2.4.11

opensips.cfg :

 if($rs == "200") {

        rtpproxy_start_recording(,,"s");
 }

rtpproxy log:

DBUG:GLOBAL:rtpp_command_split:402: received command "184_4770_11 Uc18,8,0,96 79b05ac58fa94e2b995b7d5161da50eb 192.168.2.20 4018 bd650e0fa39d400e96d2313b1ed0108e;1"

INFO:GLOBAL:rtpp_command_ul_handle:519: new IPv4/IPv4 session 79b05ac58fa94e2b995b7d5161da50eb, tag bd650e0fa39d400e96d2313b1ed0108e;1 requested, type strong
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_command_ul_handle:582: new session on IPv4 port 29792 created, tag bd650e0fa39d400e96d2313b1ed0108e;1
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_stream_prefill_addr:842: pre-filling caller's RTP address with 192.168.2.20:4018
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_stream_prefill_addr:842: pre-filling caller's RTCP address with 192.168.2.20:4019
DBUG:GLOBAL:rtpc_doreply:194: sending reply "29792 192.168.40.219\n"
DBUG:GLOBAL:rtpp_command_split:402: received command "187_2831_11 D 79b05ac58fa94e2b995b7d5161da50eb bd650e0fa39d400e96d2313b1ed0108e"
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_cmd_delete_ematch:113: forcefully deleting session 1 on ports 29792/0
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_pipe_get_stats:207: RTP stats: 0 in from callee, 0 in from caller, 0 relayed, 0 dropped, 0 ignored
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_pipe_get_stats:207: RTCP stats: 0 in from callee, 0 in from caller, 0 relayed, 0 dropped, 0 ignored
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_session_dtor:231: session on ports 29792/0 is cleaned up
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_stream_dtor:389: RTP stream from callee: SSRC=NONE, ssrc_changes=0, psent=0, precvd=0, plost=0, pdups=0
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_stream_dtor:389: RTP stream from caller: SSRC=NONE, ssrc_changes=0, psent=0, precvd=0, plost=0, pdups=0
DBUG:GLOBAL:rtpc_doreply:194: sending reply "0\n"
DBUG:GLOBAL:rtpp_command_split:402: received command "186_953_11 Uc18,8,0,96 79b05ac58fa94e2b995b7d5161da50eb 192.168.2.20 4018 bd650e0fa39d400e96d2313b1ed0108e;1"
INFO:GLOBAL:rtpp_command_ul_handle:519: new IPv4/IPv4 session 79b05ac58fa94e2b995b7d5161da50eb, tag bd650e0fa39d400e96d2313b1ed0108e;1 requested, type strong
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_command_ul_handle:582: new session on IPv4 port 26326 created, tag bd650e0fa39d400e96d2313b1ed0108e;1
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_stream_prefill_addr:842: pre-filling caller's RTP address with 192.168.2.20:4018
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_stream_prefill_addr:842: pre-filling caller's RTCP address with 192.168.2.20:4019
DBUG:GLOBAL:rtpc_doreply:194: sending reply "26326 192.168.40.219\n"
DBUG:GLOBAL:rtpp_command_split:402: received command "187_2831_12 Lc8,96 79b05ac58fa94e2b995b7d5161da50eb 192.168.40.243 31734 bd650e0fa39d400e96d2313b1ed0108e;1 te6r5m23S64Sm;1"
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_command_ul_handle:508: lookup on ports 26326/23804, session timer restarted
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_stream_prefill_addr:842: pre-filling callee's RTP address with 192.168.40.243:31734
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_stream_prefill_addr:842: pre-filling callee's RTCP address with 192.168.40.243:31735
DBUG:GLOBAL:rtpc_doreply:194: sending reply "23804 192.168.40.219\n"
INFO:79b05ac58fa94e2b995b7d5161da50eb:_rtpp_stream_latch:660: caller's address latched in: 192.168.2.20:4019 (RTCP), SSRC=UNKNOWN, Seq=UNKNOWN
INFO:79b05ac58fa94e2b995b7d5161da50eb:_rtpp_stream_latch:660: caller's address latched in: 192.168.2.20:4018 (RTP), SSRC=0x4A7B36A1, Seq=22594
INFO:79b05ac58fa94e2b995b7d5161da50eb:_rtpp_stream_latch:660: callee's address latched in: 192.168.40.243:31734 (RTP), SSRC=0x7891F06C, Seq=58997
DBUG:GLOBAL:rtpp_command_split:402: received command "185_1949_11 Lc8,96 79b05ac58fa94e2b995b7d5161da50eb 192.168.40.243 31734 bd650e0fa39d400e96d2313b1ed0108e;1 te6r5m23S64Sm;1"
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_command_ul_handle:508: lookup on ports 26326/23804, session timer restarted
DBUG:GLOBAL:rtpc_doreply:194: sending reply "23804 192.168.40.219\n"
DBUG:GLOBAL:rtpp_command_split:402: received command "185_1949_12 Rs 79b05ac58fa94e2b995b7d5161da50eb te6r5m23S64Sm bd650e0fa39d400e96d2313b1ed0108e"
INFO:79b05ac58fa94e2b995b7d5161da50eb:handle_copy:68: starting recording RTP session on port 26326
DBUG:GLOBAL:rtpc_doreply:194: sending reply "0\n"
DBUG:79b05ac58fa94e2b995b7d5161da50eb:update_jitter_stats:155: update_jitter_stats() : timestamp reset : 0x7891F06C, 320, 27360
DBUG:79b05ac58fa94e2b995b7d5161da50eb:update_rtpp_stats:437: 0x7891F06C/59169: delta rtime=3.459949, delta ts=0.000000
INFO:79b05ac58fa94e2b995b7d5161da50eb:_rtpp_stream_latch:660: callee's address latched in: 192.168.40.243:31735 (RTCP), SSRC=UNKNOWN, Seq=UNKNOWN
DBUG:GLOBAL:rtpp_command_split:402: received command "186_953_12 D 79b05ac58fa94e2b995b7d5161da50eb bd650e0fa39d400e96d2313b1ed0108e te6r5m23S64Sm"
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_cmd_delete_ematch:113: forcefully deleting session 1 on ports 26326/23804
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_pipe_get_stats:207: RTP stats: 2115 in from callee, 2118 in from caller, 4233 relayed, 0 dropped, 0 ignored
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_pipe_get_stats:215: RTP times: caller: first in at 1685522804.307660, duration 42.300086, longest IPI 0.040017
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_pipe_get_stats:221: RTP times: callee: first in at 1685522804.267438, duration 42.340113, longest IPI 0.021857
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_pipe_get_stats:207: RTCP stats: 29 in from callee, 10 in from caller, 39 relayed, 0 dropped, 0 ignored
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_session_dtor:231: session on ports 26326/23804 is cleaned up
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_stream_dtor:389: RTP stream from callee: SSRC=0x7891F06C, ssrc_changes=1, psent=2115, precvd=2115, plost=0, pdups=0
INFO:79b05ac58fa94e2b995b7d5161da50eb:rtpp_stream_dtor:389: RTP stream from caller: SSRC=0x4A7B36A1, ssrc_changes=1, psent=2118, precvd=2118, plost=0, pdups=0
DBUG:GLOBAL:rtpc_doreply:194: sending reply "0\n"
sobomax commented 1 year ago

@chenyw11 you need to have rtpproxy_start_recording(,,"s") in both normal route (i.e. INVITE handling) as well as 183/200 path in order to have both directions recorded. Looks like you've only got the latter.

chenyw11 commented 1 year ago

@sobomax But I only want to start recording after 200 (the call is answered). How can I do?