通话期间如何在网站上播放通话?
我的一位客户希望在他的网站中提供以下功能。
人员 1 将通过我们的网站呼叫人员 2 当人 2 接听时,人 1 将在网站上听到他的声音 当通话进行时,人员 1 将单击网站上的任何 mp3 文件,人员 2 将收听该 mp3 文件 第 2 个人所说的内容将在我们的网站上播放,以便第 1 个人可以听到。
这东西怎么可能?我使用 twilio 一年了,但此功能不可用。
请帮帮我。 我用PHP开发
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通常,诸如 twilio、tropo 等语音应用程序服务的工作方式是根据呼叫期间发生的事件请求控制应用程序执行哪些操作。例如,当新呼叫到达时,他们会向预先指定的控制应用程序发送请求,询问他们应该做什么,然后当呼叫得到应答时,他们会要求采取进一步的操作等。
在您的情况下,您希望它以其他方式工作周围,您想告诉处理调用的服务器执行某些操作以响应来自您端的事件。您可能可以在 twilio、tropo 等平台上执行 API 调用来启动操作,但我不记得了。更有可能的是,您需要使用类似 Asterisk AGI 协议,该协议允许在处理调用时推送到服务器的操作。 Cloudvox 是我所知道的一家提供商,它支持支持 AGI 接口的托管服务,因此值得一试。看起来,肯定比构建自己的 Asterisk 服务器容易得多。
我还建议您查看 Anveo,因为他们的产品通常比其他产品更复杂,并且通常会实现一些功能速度非常快,因此您始终可以请求一个 Web API 在实时通话期间播放 mp3。
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?