RingCentral:成功进行新订阅后,在进行 RingOut 呼叫时没有发布 webhook

RingCentral: After successfully making a new subscription, there is no webhook posted while the RingOut call is in progress

昨天,我发现一个问题,在成功进行新订阅后,在进行 RingOut 调用时,没有 webhook 发布到指定的 URL。

到目前为止,当我的应用程序订阅事件(如下所述)时,我看到整个过程进行得很好,我的 webhook 端点总是从 RingCentral 返回一些东西。但是,在那之后,到目前为止,该 webhook 端点的回发为零。

Webhook 端点始终可访问且可正常运行。

目前,我认为 RingCentral 没有回传,但我不太确定。

我想要一些如何调查此问题的指导。

重现问题的步骤:

  1. 创建新订阅或忽略是否存在以下事件的活动 webhook 订阅:

    • /restapi/v1.0/account/~/extension/~/presence?detailedTelephonyState=true&sipData=true
    • /restapi/v1.0/account/~/extension/~/presence/line/presence?detailedTelephonyState=true
  2. 拨打 RingOut 电话。

我在构建此示例应用程序时发现了相同的问题,该示例应用程序展示了如何使用 RingCentral 运行 Webhooks:https://github.com/bdeanindy/ringcentral-webhook-basics

> ringcentral-webhook-basics@0.1.0 start /Users/benjamin.dean/MyApps/ringcentral-webhook-basics
> node index.js

PORT:  3000
Server is listening on port:  3000
LOGIN SUCCESS DATA:  { access_token: 'HIDDEN',
  token_type: 'bearer',
  expires_in: 3600,
  refresh_token: 'HIDDEN',
  refresh_token_expires_in: 604800,
  scope: 'ReadMessages Faxes ReadPresence ReadAccounts EditExtensions RingOut SMS InternalMessages ReadCallLog ReadCallRecording Accounts',
  owner_id: 'HIDDEN',
  endpoint_id: 'HIDDEN' }

BODY:  
Subscription Response:  { uri: 'https://platform.devtest.ringcentral.com/restapi/v1.0/subscription/HIDDEN',
  id: 'HIDDEN',
  creationTime: '2016-09-15T22:48:45.877Z',
  status: 'Active',
  eventFilters: 
   [ '/restapi/v1.0/account/133128004/extension/134694004/presence?detailedTelephonyState=true',
     '/restapi/v1.0/account/133128004/extension/133128004/presence?detailedTelephonyState=true',
     '/restapi/v1.0/account/133128004/extension/664573005/presence?detailedTelephonyState=true',
     '/restapi/v1.0/account/133128004/extension/133165004/presence?detailedTelephonyState=true',
     '/restapi/v1.0/account/133128004/extension/138323004/presence?detailedTelephonyState=true' ],
  expirationTime: '2016-09-22T22:48:45.877Z',
  expiresIn: 604799,
  deliveryMode: 
   { transportType: 'WebHook',
     encryption: false,
     address: 'http://fbe654d0.ngrok.io/webhooks?auth_token=HIDDEN' } }

Just made a call from soft phone to my mobile device (no events are arriving).

Now I am going to hangup the call and then I am going to change the availability status of the user to see if that generates events...    

BODY:  {"uuid":"88474bfa-061e-4184-9e39-3ca78e51e1be","event":"/restapi/v1.0/account/133128004/extension","timestamp":"2016-09-15T22:50:34.418Z","subscriptionId":"ad355889-74cc-4db1-9fd0-fc20f442c261","body":{"extensions":[{"extensionId":"133128004","eventType":"Update"}]}}
BODY:  {"uuid":"bc236a49-e01b-4c3f-bb75-872745381a3b","event":"/restapi/v1.0/account/133128004/extension","timestamp":"2016-09-15T22:50:34.418Z","subscriptionId":"26ba88c0-0554-4ff7-8dfb-e1f597306176","body":{"extensions":[{"extensionId":"133128004","eventType":"Update"}]}}
BODY:  {"uuid":"4efc4740-3b26-43a4-8c74-e984a778c364","event":"/restapi/v1.0/account/133128004/extension","timestamp":"2016-09-15T22:50:34.418Z","subscriptionId":"b2d76ced-b860-4fb9-af1d-aeb55cf2bf0f","body":{"extensions":[{"extensionId":"133128004","eventType":"Update"}]}}
BODY:  {"uuid":"b3d53990-26ae-4241-8eac-0acfe210c6cb","event":"/restapi/v1.0/account/133128004/extension","timestamp":"2016-09-15T22:50:34.418Z","subscriptionId":"f22cec6d-3f0e-4a10-aa6b-e3a726fe8e61","body":{"extensions":[{"extensionId":"133128004","eventType":"Update"}]}}
BODY:  {"uuid":"4a3aebe7-8fd7-411b-8cf6-6809be3491a1","event":"/restapi/v1.0/account/133128004/extension","timestamp":"2016-09-15T22:50:34.418Z","subscriptionId":"9dc0fbd3-b5dc-4b09-9dd1-db61098b6195","body":{"extensions":[{"extensionId":"133128004","eventType":"Update"}]}}
BODY:  {"uuid":"54fe63e4-6cec-4da7-b91b-02066f2218d7","event":"/restapi/v1.0/account/133128004/extension","timestamp":"2016-09-15T22:50:37.431Z","subscriptionId":"ad355889-74cc-4db1-9fd0-fc20f442c261","body":{"extensions":[{"extensionId":"133128004","eventType":"Update"}]}}
BODY:  {"uuid":"3abf1018-816b-48cd-a8b5-eb7c484f25bc","event":"/restapi/v1.0/account/133128004/extension","timestamp":"2016-09-15T22:50:37.431Z","subscriptionId":"26ba88c0-0554-4ff7-8dfb-e1f597306176","body":{"extensions":[{"extensionId":"133128004","eventType":"Update"}]}}
BODY:  {"uuid":"70fba7c1-e820-408c-897f-387d23aad789","event":"/restapi/v1.0/account/133128004/extension","timestamp":"2016-09-15T22:50:37.431Z","subscriptionId":"f22cec6d-3f0e-4a10-aa6b-e3a726fe8e61","body":{"extensions":[{"extensionId":"133128004","eventType":"Update"}]}}
BODY:  {"uuid":"20a4207e-9574-43ad-8246-afb2bb728853","event":"/restapi/v1.0/account/133128004/extension","timestamp":"2016-09-15T22:50:37.431Z","subscriptionId":"b2d76ced-b860-4fb9-af1d-aeb55cf2bf0f","body":{"extensions":[{"extensionId":"133128004","eventType":"Update"}]}}
BODY:  {"uuid":"aa3d2e9f-dde5-4259-b14d-f105056784d1","event":"/restapi/v1.0/account/133128004/extension","timestamp":"2016-09-15T22:50:37.431Z","subscriptionId":"9dc0fbd3-b5dc-4b09-9dd1-db61098b6195","body":{"extensions":[{"extensionId":"133128004","eventType":"Update"}]}}

So we are not receiving any telephony events for VOIP, but we are receiving presence events for the extension.

Now, let's try sending an SMS and see if we receive any events.
Nope, no events for SMS either.

我发现没有像预期的那样将与电话相关的事件发布到我的 webhook 端点,但是扩展存在事件(可用性的更新和修改)正在生成事件。

我已联系我们的工程团队调查此问题并帮助解决它。

感谢您报告这位 Janielle。修复后我会更新这个post。