Hi,

o Wojciech Wrona [12/21/08 21:04]:
Hi guys,
I've just read whole list archive but didn't find any good solution, so decided to write here :) At first i'd like to say that my adventure with sems just started, so forgive me if i'll be writing stupid things :)

So... in company where i work, SEMS is used to handle some small IVR (service line) for customers, and a local company voicemail for emplyees. There is a idea that every call on a service line should be recorded - new company policy.

I was thinking (inspired by reading this list) about modifing/creating new AmAudioConnector to force it to write data to 2 destinations - second call, and some kind of object (simillar to AmConferenceChannel) with common AmMultipartyMixer. So at the end i can get an AmAudio object which contains synchronized mixed audio of 2 calle legs (call is in B2ABUA - i should say it at the very beginning :)). The question is: How to write this stream to a file ? Especially how to copy audio stream from one AmAudio to another ? Or maybe this direction is so wrong that i should start to do it diffrent way ?

you can use AmAudioQueue (AmAdvancedAudio.h) to write audio to two AmAudio devices. put both the audio_connector and the AmAudioFile in the write queue, and it will write to both. You don't even have to modify the AmAudioConnector, you just catch the b2abconnectaudio event, and after it is connected, you get the output with getOutput() and put it in the queue, like
MySession::onB2ABEvent(ev) {
AmB2ABCallerSession::onB2ABEvent(ev);
if (ev-event-id==B2ABConnectAudio) {
 lockAudio();
audio_queue.pushAudio(getOutput(), AmAudioQueue::OutputQueue, AmAudioQueue::Back, true, false); audio_queue.pushAudio(my_audio_file, AmAudioQueue::OutputQueue, AmAudioQueue::Back, true, false);
 setOutput(audio_queue);
 unlockAudio();
}

Now, with r1203 you can use the AmAudioMixIn to mix the audio from two AmAudios by using AUDIO_MIXIN_IMMEDIATE_START | AUDIO_MIXIN_ONCE as flags. Additionally, you can use AmAudioBridge to connect read and write (input and output), this way by using getInput() and with an extra AmAudioQueue you can do the whole thing in the caller session easily I guess.

hth
Stefan


Thanks in advance for help and Marry Christmas,
Best regards,

--
Stefan Sayer
VoIP Services

[email protected]
www.iptego.com

IPTEGO GmbH
Am Borsigturm 40
13507 Berlin
Germany

Amtsgericht Charlottenburg, HRB 101010
Geschaeftsfuehrer: Alexander Hoffmann
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to