Issue Details (XML | Word | Printable)

Key: XMR-99
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Chemeris
Reporter: Jaroslav Libak
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
sipXtapi: sipXmediaLib

improved call recording + old recording fix

Created: 2007-03-09 18:42   Updated: 2007-07-09 10:36
Component/s: sipXmediaLib
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. File FullCallRecording.diff (20 kB)
2. File helppatch.diff (1 kB)
3. File patch.diff (20 kB)
4. File patch.diff (19 kB)

Environment: sipxtapi branch


 Description  « Hide
The old call recording has a bug, it doesnt work at all because of a line in CpPhoneMediaInterface.cpp:

return mpFlowGraph->record(1, -1, NULL, NULL, szFile) ;

The first parameter is wrong, it says recording will be done only for 1 ms ...

This patch changes the type of file sound is written into PCM WAV from RAW PCM, since basic user doesn't know how to play raw pcm (you have to set some parameters to play it properly). The old call recording only recorded speaker sound, without local microphone sound. Thus we only got half of the conversation.

This patch adds 2 splitters, 1 mixer and 1 new recorder to the flowgraph. 1st splitter is between MprMixer and MprBridge on the mic side, to ensure we get mic + any sound we play to remote party, and 2nd splitter is between MprBridge and MprMixer on the speaker side of the flowgraph so that we get speaker sound too. This gets mixed in new mixer and sent to MprRecorder. This way we can hear full conversation.

MprRecorder was modified to send a message to flowgraph when it is enabled or disabled. This is necessary to ensure we can enable/disable these 2 splitters and mixer whenever it is needed. Upon reception of these messages in flowgraph, we determine the ID of the recorder, and if its the new callrecorder we enable/disable the splitters/mixer. It is not possible to do this without sending messages, as recording can be stopped automatically in MprRecorder itself after long silence or DTMF.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Jaroslav Libak added a comment - 2007-03-09 19:07
Also please update the documentation - callrecording is done in flowgraph, therefore after we add such a call to conference it will be stopped. To record conference, recording should be started on 1 call in conference only. When call is removed from conference, recording will stop too, as media connection is destroyed and recreated.

Alexander Chemeris added a comment - 2007-03-09 19:11
Please, provide patch for documentation too.

Jaroslav Libak added a comment - 2007-03-10 05:47
This patch updates sipxtapi.h and explains better how conference recording behaves.

I originally also wanted to add new events to sipxtapi to inform user when recording really started and stopped, but this will be supplied in a separate patch later. It has to work right and inform the user that call recording on a call stopped when he for example uses conference join to add the call to conference.

So this patch is complete, unless there are objections to documentation level in the source code.

Alexander Chemeris added a comment - 2007-03-12 10:10
Changes to patch, should be done before its check in:

1) Wrap long lines (I saw two lines you're unwrapped)
2) Write documentation to all changes in .h files - new/changed functions, new enum values, etc. We should tend to fully documented code.

Then I'll test it, and commit.

Jaroslav Libak added a comment - 2007-03-15 05:49
New patch.diff file with recommended changes.

Alexander Chemeris added a comment - 2007-06-29 08:06
Patch updated to latest sipXtapi (FullCallRecording.diff).

Keith Kyzivat added a comment - 2007-06-29 15:59
This patch, with slight modifications to the enum values given to ON_MPRRECORDER_ENABLED and ON_MPRRECORDER_DISABLED has been committed to the main branch of sipXtapi, rev 9772.

http://scm.sipfoundry.org/viewsvn/sipX?view=rev&revision=9772

Keith Kyzivat added a comment - 2007-07-09 10:36
r9799 has some updated fixes... from my svn commit comment:

"Fix call recording, as initialization was done inside crazy recording defines, but shutdown/destruction was done in all cases, leading to trying to remove a non existant output link from mpCallrecMixer. Now the call recorder exists no matter what defines are present, even without INSERT_RECORDERS and WantRecorders (static int, directly tied to INSERT_RECORDERS) being defined."