简体   繁体   English

使用 Twilio 构建一个从电话 A 到电话 B 的呼叫示例

[英]Build an example with Twilio of a call from phone A to phone B

Does anyone know if in Twilio it is possible to mount an application with the following requirements?:有谁知道在Twilio 中是否可以安装具有以下要求的应用程序?:

  1. From an 'A' telephone, that of the telemarketer or sender, an 'X' telephone of the receiver indicated from the application will be called.从“A”电话,即电话推销员或发件人的电话,将呼叫应用程序中指定的收件人的“X”电话。

  2. The application must be able to intercept if the phone 'X':如果电话“X”:应用程序必须能够拦截:

    2.1. 2.1. Does not exist.不存在。

    2.2. 2.2. It exists but communicates.它存在,但会交流。

    2.3. 2.3. It exists, does not communicate but does not pick up.它存在,不交流但不接听。

    2.4. 2.4. It exists, does not communicate, picks up and the conversation takes place.它存在,不交流,接听并进行对话。

  3. If the conversation occurs, detect when it ends.如果对话发生,检测何时结束。

  4. The conversation is recorded.谈话被记录下来。

  5. Asynchronously, make a request to Twilio to recover the recording and delete it.异步地,向 Twilio 发出请求以恢复记录并将其删除。

I have been seeing the documentation on their website and I have some doubts:我一直在他们网站上看到文档,我有一些疑问:

  1. Can it be done from a standalone Java application?可以从独立的 Java 应用程序中完成吗? Or does it have to be web?.还是必须是网络?

  2. The telephone A sender, how should it be configured from Twilio?电话 A 发件人,它应该如何从 Twilio 配置? (I'm getting involved with the concepts of verified phone, purchased phone, 'webhook', etc). (我参与了经过验证的电话、购买的电话、“网络钩子”等概念)。

Can someone point me to an example that does that?有人可以指出我这样做的例子吗? I am a bit lost.我有点失落。

I have used twilio a long time ago, but from what I remember :我很久以前就使用过 twilio,但据我所知:

  1. You can record a conversation but I don't think it is free to do so (You have limited storage and need to pay if you want more, I will let you check that one).您可以录制对话,但我认为这样做不是免费的(您的存储空间有限,如果您想要更多,则需要付费,我会让您检查那个)。

  2. Twilio will detect when the conversation ends and stop both call. Twilio检测对话何时结束并停止通话。

  3. You must be able to recover your recording from a java application.您必须能够从 Java 应用程序恢复您的录音。

  4. I don't know if you can know all the points from your part 2. there might be some return code from Twilio API that could tell you that but I'm usure about that.我不知道您是否可以了解第 2 部分中的所有要点。 Twilio API 中可能有一些返回代码可以告诉您这一点,但我对此很确定。

  5. Your application will need to use VoIP and have webhooks configured so I'm pretty sure you will need a web app with a certified ssl certificate not a self-signed one otherwise Twilio will not accept the latter and will not let you send messages or calls.您的应用程序将需要使用 VoIP 并配置了网络钩子,因此我很确定您需要一个带有经过认证的 ssl 证书的网络应用程序,而不是自签名证书,否则 Twilio 将不接受后者,并且不会让您发送消息或电话. For free certified ssl certifcate you can check Let's Encrypt .对于免费认证的 ssl 证书,您可以查看Let's Encrypt

  6. You can check the the Twilio API documentation , I'm pretty sure you will find a lot more information in there.您可以查看Twilio API 文档,我很确定您会在其中找到更多信息。 Regarding your points you might want to focus on the Voice API and the REST API关于您的观点,您可能希望专注于Voice APIREST API

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

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