简体   繁体   English

Webhook不会被解雇。 API nexmo

[英]Webhooks are not fired. API nexmo

I use the nexmo api to redirect all call to a virtual us number to a real number. 我使用nexmo api将所有呼叫重定向到虚拟美国号码到真实号码。

To implement i use this request : https://developer.nexmo.com/api/developer/numbers#update-a-number 要实现我使用此请求: https : //developer.nexmo.com/api/developer/numbers#update-a-number

With params below: 以下是参数:

  1. moHttpUrl : an url (https) on my server which respond 200 OK moHttpUrl:服务器上的URL(https),响应200 OK
  2. country : US 国家:美国
  3. misdn : the us virtual number misdn:美国虚拟号码
  4. voiceCallbackType : tel voiceCallbackType:电话
  5. voiceCallbackValue : the real forward voiceCallbackValue:真正的前锋
  6. voiceStatusCallback : an url (https) on my server which respond 200 OK voiceStatusCallback:我的服务器上的网址(https),响应200 OK

(The data is well recorded, i can see it on nexmo backoffice) (数据记录良好,我可以在nexmo后台看到它)

Problem : when i call the us number with my phone, the redirection is ok. 问题:当我用手机拨打美国电话时,重定向正常。 I stay on line 10 seconds and stop the call. 我保持在线10秒钟并停止通话。

At the moment nexmo should call my voiceStatusCallback but do nothing. 目前,nexmo应该调用我的voiceStatusCallback,但不执行任何操作。 Furthermore i have no idea on which informations are passing with the webhook. 此外,我不知道通过网络挂钩传递了哪些信息。

Thx for your help. 谢谢您的帮助。

It looks like your problem is related to https, the simple call forwarding is part of our deprecated voice API and as such that only supports SHA-1 certs on https, so I'm imagining this is your problem. 看来您的问题与https有关,简单的呼叫转移是我们不赞成使用的语音API的一部分,因此仅支持https上的SHA-1证书,因此我想这是您的问题。 https://help.nexmo.com/hc/en-us/articles/115005461928 https://help.nexmo.com/hc/zh-CN/articles/115005461928

There are 2 options, either use http for your callback (not great I know) or take a look at our new Voice API which will give you a lot more control, if you want to do a simple call forward you would just need to host a JSON file on a URL somewhere that contains a connect action see https://developer.nexmo.com/api/voice/ncco#connect You will then get a whole bunch of call event webhooks such as when the call starts, is answered and ends. 有2种选择,要么使用http进行回调(我知道不是很好),或者看看我们的新语音API,它将为您提供更多控制权,如果您想进行简单的呼叫转移,则只需托管URL上包含连接操作的JSON文件,请参见https://developer.nexmo.com/api/voice/ncco#connect。然后您将获得大量的呼叫事件网络鸣叫,例如呼叫开始时得到答复并结束。

Rgds Sam Nexmo Developer Advocate Rgds Sam Nexmo开发人员倡导者

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

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