简体   繁体   English

Vonage语音API

[英]Vonage voice API

We built an application using Vonage voice API, in which the inbound call is received on the webpage.我们使用 Vonage 语音 API 构建了一个应用程序,其中在网页上接收呼入电话。 However, we are not finding a way to fetch and display caller ID/caller phone number from the backend to the web page.但是,我们没有找到从后端获取和显示来电显示/来电号码到 web 页面的方法。 Any help from anyone for the above-mentioned issue will be greatly appreciated Thank you in advance任何人对上述问题的任何帮助将不胜感激提前谢谢您

In order for us (at Vonage) to help you out, can you let us know what stack you're using in order to point to the right specialist here?为了让我们(在 Vonage)为您提供帮助,您能否让我们知道您正在使用什么堆栈以便在这里找到合适的专家? ie are you using the nodejs, Ruby, Python, PHP SDK etc即你使用nodejs,Ruby,Python,PHP ZF20E3C5E54C3AB3D376DAZF666

This link could be usefull to you: https://developer.vonage.com/voice/voice-api/webhook-reference此链接可能对您有用: https://developer.vonage.com/voice/voice-api/webhook-reference

basically you need to configure the answer web hook specifing the url of your server and the http verb (POST or GET), so evey time you are gonna received a call, your back end is gonna be notified (asking you from the ncco). basically you need to configure the answer web hook specifing the url of your server and the http verb (POST or GET), so evey time you are gonna received a call, your back end is gonna be notified (asking you from the ncco).

from that docs, the from parameter is gonna be the number of the caller (in the body if you are using post, in the query params of the url if you are using a get).从该文档中, from参数将是调用者的号码(如果您使用的是post,则在正文中,如果您使用get,则在url的查询参数中)。

You may save this in your database and retrive it when needed.您可以将其保存在数据库中并在需要时检索它。

But if you simply need to display the caller number on your browser, you may not need that.但如果您只需要在浏览器上显示来电号码,则可能不需要。

probably your code looks like this: https://github.com/nexmo-community/client-sdk-tutorials/blob/main/phone-to-app-js/client_js.html#L25可能您的代码如下所示: https://github.com/nexmo-community/client-sdk-tutorials/blob/main/phone-to-app-js/client_js.html#L25

the second parameter of the member:call listener is an nxmCall . member:call监听器的第二个参数是nxmCall this should have a from property with the info you are interested in这应该有一个from属性,其中包含您感兴趣的信息

(more info here: https://developer.vonage.com/sdk/stitch/javascript/Application.html#event:member:call ) (更多信息: https://developer.vonage.com/sdk/stitch/javascript/Application.html#event:member:call

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

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