开发者

how can i play call on website while call is on?

one of my client want following functionality in his site.

Person 1 will call person 2 from our website When person 2 answers person 1 will hear his voice on website person 1 will click on any mp3 file开发者_如何学编程 on website while call is going on and person 2 will listen to that mp3 file and what person 2 speak will be played on our website so that person 1 can hear it.

how this thing is possible ? i am using twilio for an year but this functionality is not available in that.

please help me out. I develop in PHP


Generally the voice application services like twilio, tropo etc. work by requesting the controlling application what to do based on events that happen during the call. For example when a new call arrives they will send a request to the pre-designated controlling application asking what they should do and then when the call is answered they will ask for further actions etc.

In your case you want it to work the other way around and you want to tell the server processing the call to do something in response to an event from your end. There may be an API call you can execute on the twilio, tropo etc. platforms to initiate actions but I can't recall it. More likely you will need to use something like the Asterisk AGI protocol which allows actions to be pushed to the server while it's processing the call. Cloudvox is one provider I know of that supports a hosted service that supports an AGI interface so they'd be worth a look, certainly a lot easier than building your own Asterisk server.

I'd also recommend checking out Anveo as their offerings are generally a bit more sophisticated than the others and they will often implement features very quickly so you could always ask for a web API that will play an mp3 during a live call.


You do know it's illegal to record a telephone conversation without the other person knowing it or unless you have a wiretap permit. Don't you?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜