我发现了与构建此示例应用程序相同的问题,该示例应用程序显示了带有 RingCentral 的 Webhook 如何运行: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。修复后我会更新这篇文章。