On 08.04.2013, at 17:52, Vassilis Radis wrote:

> Hi all,
> 
> I have a small system with kamailio as proxy and SEMS as SBC. Calls come into 
> kamailio which sends them to SEMS, which in turn makes a call out through 
> kamailio again. The use of SEMS is currently only for topology hiding.I use 
> sbc app with a simple profile that enables rtp_relay. Everything works great.
> 
> Since the rtp streams come and go through sems anyway I decided to give it a 
> shot and implement call recording but by not using conference module or DSM, 
> for the purpose of getting to know the sems core implementation details.
> 
> First try:
> I tried to use a custom AmSessionAudioConnector version in AmB2ABSession , by 
> replacing the 2 AmAudioDelay classes with AmAudioQueues (which wrap the 
> AmAudioDelays along with a common AmAudioFile to record). It didnt work for 
> the simple reason that I didnt notice that those classes (AmB2ABxxxx) seem to 
> be abandoned by the SBC app. In 1.5 version, the AmB2BSession is always used, 
> no matter if relaying is done.
> 
> Second try:
> I tried to patch AudioStreamData that is used by AmB2BMedia: I instanciated 
> an AmAudioFile and passed it to the two AudioStreamData instances. Then , I 
> went on to patch AudioStreamData::writeStream to write to the file. When I 
> was trying that I saw that although code always reached   
> AudioStreamData::writeStream , this function is "useless" in the sense that 
> if I replace its whole body with just "return 0", the system works normally , 
> i.e. the calls still work with relaying and no audio is lost in any leg.  
> 
> So I have two questions:
> 1. Why AudioStreamData::writeStream has this behaviour like it is not needed 
> for audio relaying.? And when I comment out the code in the function, how are 
> the streams written? 
> 

If transcoding is not enabled, nothing will happen there ;-) You need to 
initialize the streams as for transcoding for your application as well.

> 2. With the restriction of not using DSM or other module except sbc, where in 
> the code should I look into implementing call recording.
>  I am desperately searching for the correct place to instantiate an 
> AmAudioFile, and call its put method to write both legs' incoming audio. 
> 

I would probably go for an extended Call-control plug-in. There you get the 
full SBCCallLeg (derived from AmB2BSession) passed, which gives you a chance to 
initialize whatever you need to setup call recording.
You could, for example start with adding an output audio stream in 
AudioStreamData, and figure out how to use it properly. This should also enable 
fancy stuff like introducing audio effects while relaying/transcoding.

-Raphael.


> Any insights or guidance?
> 
> Thanks a lot, Bill.
> 
> P.S. I am surprised that this isnt already a feature in SEMS. I would expect 
> that it is simple to implement by someone who knows  the code well, and more 
> importantly I would assume that it is something that a fair amount of people 
> would need. Am I wrong?
> _______________________________________________
> Sems mailing list
> [email protected]
> http://lists.iptel.org/mailman/listinfo/sems

_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems

Reply via email to