Closed razvancrainea closed 4 years ago
Hi @razvancrainea , many thanks for the code! It looks OK in general, but 0.4% loss of coverage is a bit of a problem, as it brings us back into <90% yellow area. :( There are also few small things are missing such as version number etc. I have created a new feature branch, please rebase your pull request of that so that we can work together on adding those missing bits. https://github.com/sippy/rtpproxy/tree/razvancrainea-feature/norecord
Hi Razvan, getting some progress with a test case. Got first segfault here, would you mind taking a look and letting me know if you have any ideas WRT fixing it. Thanks!
00:00:00.279/INFO:GLOBAL:main:922: rtpproxy started, pid 41248 00:00:00.279/ERR:GLOBAL:main:934: can't open pidfile for writing: Permission denied (13) 00:00:34.305/DBUG:GLOBAL:rtpp_command_split:392: received command "U recording.singlefile_57494.rec. 127.0.0.1 12345 from_tag_1" 00:00:34.305/INFO:GLOBAL:rtpp_command_ul_handle:486: new IPv4/IPv4 session recording.singlefile_57494.rec., tag from_tag_1 requested, type strong 00:00:34.305/INFO:recording.singlefile_57494.rec.:rtpp_command_ul_handle:549: new session on IPv4 port 44360 created, tag from_tag_1 00:00:34.305/INFO:recording.singlefile_57494.rec.:rtpp_stream_prefill_addr:685: pre-filling caller's RTP address with 127.0.0.1:12345 00:00:34.305/INFO:recording.singlefile_57494.rec.:rtpp_stream_prefill_addr:685: pre-filling caller's RTCP address with 127.0.0.1:12346 00:00:34.305/DBUG:GLOBAL:rtpc_doreply:188: sending reply "44360\n" 00:00:34.305/DBUG:GLOBAL:rtpp_command_split:392: received command "L recording.singlefile_57494.rec. 127.0.0.1 54321 from_tag_1 to_tag_1" 00:00:34.305/INFO:recording.singlefile_57494.rec.:rtpp_command_ul_handle:475: lookup on ports 44360/44362, session timer restarted 00:00:34.306/INFO:recording.singlefile_57494.rec.:rtpp_stream_prefill_addr:685: pre-filling callee's RTP address with 127.0.0.1:54321 00:00:34.306/INFO:recording.singlefile_57494.rec.:rtpp_stream_prefill_addr:685: pre-filling callee's RTCP address with 127.0.0.1:54322 00:00:34.306/DBUG:GLOBAL:rtpc_doreply:188: sending reply "44362\n" 00:00:34.306/DBUG:GLOBAL:rtpp_command_split:392: received command "Rs recording.singlefile_57494.rec. from_tag_1" 00:00:34.308/INFO:recording.singlefile_57494.rec.:handle_copy:68: starting recording RTP session on port 44362 00:00:34.309/INFO:recording.singlefile_57494.rec.:handle_copy:75: starting recording RTCP session on port 44363 00:00:34.309/DBUG:GLOBAL:rtpc_doreply:188: sending reply "0\n" 00:00:34.309/DBUG:GLOBAL:rtpp_command_split:392: received command "Rs recording.singlefile_57494.rec. to_tag_1" 00:00:34.309/INFO:GLOBAL:handle_command:588: record request failed: session recording.singlefile_57494.rec., tags to_tag_1/NONE not found 00:00:34.309/DBUG:GLOBAL:rtpc_doreply:188: sending reply "E50\n" 00:00:34.309/DBUG:GLOBAL:rtpp_command_split:392: received command "Rs recording.singlefile_57494.rec. to_tag_1 from_tag_1" 00:00:34.309/INFO:recording.singlefile_57494.rec.:handle_copy:75: starting recording RTCP session on port 44361 00:00:34.309/DBUG:GLOBAL:rtpc_doreply:188: sending reply "0\n" 00:00:34.309/DBUG:GLOBAL:rtpp_command_split:392: received command "N recording.singlefile_57494.rec. from_tag_1" 00:00:34.309/INFO:recording.singlefile_57494.rec.:handle_stop_record:68: stopping recording RTCP session on port 44363 00:00:34.309/INFO:recording.singlefile_57494.rec.:handle_stop_record:78: stopping recording RTP session on port 44362 00:00:34.309/DBUG:GLOBAL:rtpc_doreply:188: sending reply "0\n" 00:00:34.309/DBUG:GLOBAL:rtpp_command_split:392: received command "N recording.singlefile_57494.rec. to_tag_1 from_tag_1" Assertion failed: (spa->rtcp->stream[idx]->rrc != NULL), function handle_stop_record, file rtpp_command_norecord.c, line 66. Died on signal 6, obtained 10 stack frames.
Abort trap (core dumped)
@razvancrainea JFYI I've added some basic testing and it looks OK. You can see results here https://coveralls.io/jobs/59450312/source_files/1802592253 (all other tests are disabled for clarity sake). The SEGFAULT issue still pending.
Hey, Maxim!
Thanks for taking time to look into this! I will take a look at the crash, trying to figure out what's happening. As soon as I figure it out, I will rebase against the new branch.
Best regards, Răzvan
Command to stop recording a session.
There is no test yet for this feature, but I will try to add one in the following days.