简体   繁体   English

通话期间如何在网站上播放通话?

[英]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. 人1从我们的网站呼叫人2当人2回答人1将听到他在网站上的声音时人1将在通话进行时单击网站上的任何mp3文件,人2将收听该mp3文件以及人2会说什么将在我们的网站上播放,以便第1个人可以听到它。

how this thing is possible ? 这件事怎么可能? i am using twilio for an year but this functionality is not available in that. 我使用twilio一年了,但是该功能在其中不可用。

please help me out. 请帮帮我。 I develop in PHP 我用PHP开发

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? 是不是

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. 通常,语音应用程序服务(如twilio,tropo等)通过根据呼叫期间发生的事件请求控制应用程序执行操作来工作。 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. 可能会有一个API调用,您可以在twilio,tropo等平台上执行这些操作以启动操作,但我不记得了。 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. 您更有可能需要使用诸如Asterisk AGI协议之类的协议,该协议允许在服务器处理呼叫时将操作推送到服务器。 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. 我知道Cloudvox是一家提供此服务的提供商,该提供商支持支持AGI接口的托管服务,因此值得一看,当然比构建自己的Asterisk服务器要容易得多。

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. 我还建议您检查一下Anveo,因为它们的产品通常比其他产品复杂一些,并且它们通常会很快实现功能,因此您总是可以要求一个网络API在现场通话中播放mp3。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM