EAGI voice input & output

Hello,

I’m experimenting Asterisks programming to input and output to voicecall streams. I’m just listening in own thread fd3 and collecting streamdata to circular buffer and another thread waits for input to arrive and produces some raw output to the call -sounds like a trivial case and yes it is… but

The issue with EAGI is seems that be only way to do voice output to the call is using files and commands like PLAYBACK (I’d rather like to have fd4 for channel output) Once I’m using PLAYBACK fd3 seems to be in a blocked state and I cant get the input from the call. The annoying thing resulting from this is that after playing some sound there is a significant delay before fd3 seems to have data from incoming call.

Am I completely lost, if not is there some way to by pass this? I checked JACK() application and it seems to provide detour to this, but running jackd for this simple case seems overkill to me.

Regards,
J

I don’t believe EAGI was really written as a realtime media transport mechanism for that use case, so it doesn’t provide the functionality.

Thanks for immediate answer and I got your point and agree. It was just so great that it took 10minutes to get things rocking but soon I found that I lose 1-2seconds from the input stream and it becomes unusable in real life cases…

Can you suggest me from where I should look for the alternative approach to this, or is the JACK application in the right direction…

thanks,

There is no framework to externally provide the media, except by using a VoIP protocol (such as SIP) or JACK. You’d have to write an Asterisk module to do what you want otherwise.

Again you are faster than lightning… By using VoIP protocols, I guess, you mean that I should capture the packets (using some protocol) sent from Asterisk using my own “magic-proxy-server” and modify those on the fly? Or is there some API in Asterisk which I have missed?

Am I completely lost?

He means you source the media from a SIP end point.

1 Like

There is no API for transporting media externally to do this for an application, you could only do that explicitly by using core APIs and writing your own thing. What I was referring to is that Asterisk speaks SIP, so if you have another application server or something or can write your own app that speaks SIP - then you could send the call over and do what you want. That’s an involved process.

I will check the core APIs 1st and then consider having some open source SIP server as skeleton for my testing application. Thanks!