Play an Audio Clip Onto an Ongoing Call

Play an audio clip onto an ongoing call

Is it possible to modify an active call by overlaying a sound track during the call?

No, sorry, there is no API to access the in-call audio stream.

Why it is not possible to play an audio file on a voice call in android

After a thorough research, what I have come to know is that there are more than one limitations/hurdles to make it possible. These limitations/hurdles are at three different levels.

First limitation is at API level, because there is no high-level API to play sound files in the conversation audio during a call as mentioned in Android official documentation.

Second limitation is at Radio Interface Layer (RIL). RIL passes on complete control of the call to Radio Daemon (rild) of the Linux library which then further passes the control to the vendor RIL. That means we cannot manipulate voice call in android source code.

Even if we are able to remove these two limitations, we may still not be able to play audio file to an ongoing voice call. Because there is a third limitation. Every vendor has their own library of RIL that communicates with Radio Daemon (rild). This requires that vendor RIL to be open source which is not actually. Hardware vendors do not usually make their device drivers code available.

Detail discussion on this topic is present at this link.

Twilio - Play an audio file to the person call is transferred to before connecting

Twilio evangelist here.

What you're describing is called a 'whisper' and its pretty easy to set up with Twilio. I'd start by reading through the Call Screening and Recording How to which includes an example of a whisper.

Specifically, check out examples 4 and 5 which shows how to include the url attribute on the <Number> noun. The url you provide there will be requested when the second call is answered and allows you to return TwiML that Twilio will execute to that call before we bridge the two calls together.

Hope that helps.



Related Topics



Leave a reply



Submit