简体   繁体   English

应在RingCentral中订阅什么事件以在接到呼叫时得到通知?

[英]What event should be subscribed in RingCentral to get notified when a call is received?

I'm working on an application where I need to get notified when a call is received on the main line or any of the available extensions. 我正在开发一个应用程序,当在主线或任何可用的分机上接到呼叫时,需要通知我。 Which event should be subscribed to get notification? 应该订阅哪个事件来获得通知?

Moreover does RingCentral support Webhook notification? 此外,RingCentral是否支持Webhook通知? At some place I came across something which said RingCentral only supports PubNub but I saw that there is a way to provide TransportType as PubNub or Webhook. 在某个地方,我遇到了一些东西,说RingCentral仅支持PubNub,但我看到有一种方法可以将TransportType提供为PubNub或Webhook。

Which event should be subscribed to get notification of a call being received on my main line or any of the available extensions? 应该订阅哪个事件来获得在我的主线路或任何可用分机上收到呼叫的通知?

You would want to subscribe to Presence events making sure to set the detailedTelephonyStatus query parameter to true . 您需要预订Presence事件,以确保将detailedTelephonyStatus查询参数设置为true

Here is an example of this from the documentation for creating a subscription to presence events: 这是来自文档的示例,用于创建对出席事件的预订:

POST /restapi/v1.0/subscription HTTP/1.1
Authorization: Bearer U0pDMDFQMDFQQVMwMnxBQUJFU3VOMlp2bjZFR0gxNFhfTUNONhaU1SVHc
Content-Type: application/json
Content-Length: 235


{
    "eventFilters": [
        "/restapi/v1.0/account/~/extension/~/presence?detailedTelephonyState=true&aggregated=true"
    ],
    "deliveryMode": {
        "transportType": "PubNub",
        "encryption": "true"
    }
}

Within the eventFilters property, you would want to add an array element for each extension within the account which you wish to monitor. eventFilters属性内,您想为要监控的帐户内的每个扩展添加一个数组元素。

I have created a sample application built in Node.js for creating a subscription to all of the extensions within a RingCentral sandbox account here: https://github.com/bdeanindy/ringcentral-subscription-basics . 我已经在Node.js中创建了一个示例应用程序,用于在以下位置创建对RingCentral沙箱帐户中所有扩展的预订: https : //github.com/bdeanindy/ringcentral-subscription-basics

Does RingCentral support Webhook notification? RingCentral是否支持Webhook通知?

Yes, read the documentation for creating subscriptions https://developers.ringcentral.com/api-docs/latest/index.html#!#RefCreateSubscription and you will see that both PubNub and Webhook are supported transportType . 是的,阅读用于创建订阅的文档https://developers.ringcentral.com/api-docs/latest/index.html#!#RefCreateSubscription ,您将看到PubNubWebhook都受支持transportType

Here is an example of how to create a subscription which uses the Webhook transportType : 这是如何创建使用Webhook transportType的订阅的Webhook

POST /restapi/v1.0/subscription HTTP/1.1
Accept: application/json
Authorization: Bearer U0pDMDFQMDFQQVMwMXxBQURIZjAzWFFySGpMen
Content-Type: application/json
Content-Length: 269

{
  "eventFilters": [
     "/restapi/v1.0/account/~/extension/~/presence",
     "/restapi/v1.0/account/~/extension/~/message-store"
  ],
  "deliveryMode": {
        "transportType": "WebHook",
        "address": "https://consumer-host.example.com/consumer/path"
  }
}

You'll want to make sure to change the deliveryMode.address value to point to a server you manage to receive the events. 您将需要确保将deliveryMode.address值更改为指向您设法接收事件的服务器。 This server will need to have a valid certificate chain supporting connections on port 443. 该服务器将需要具有有效的证书链,以支持端口443上的连接。

Here is a quick start tutorial on using RingCentral Webhooks . 这是有关使用RingCentral Webhooks快速入门教程

暂无
暂无

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

相关问题 如何确保一个事件只订阅一次 - How to ensure an event is only subscribed to once RingCentral:成功进行新订阅后,在 RingOut 调用过程中没有发布 webhook - RingCentral: After successfully making a new subscription, there is no webhook posted while the RingOut call is in progress 在运行时使用反射检查给定事件是否已订阅 - Check if a given event is subscribed, during runtime, using reflection 当我们要订阅可观察数组时如何进行错误处理 - How to do error handling when we want array of observable to be subscribed 如何从开发者控制台的产品列表中删除订阅以及它对旧订阅用户的影响? - How to remove Subscription from product list in developer console and what will be its effect on the old subscribed users? 当用户升级条带时,我想根据以前订阅的订阅中使用的请求扣除付款? - I want to deduct payment on the basis of request used in previously subscribed subscription when user upgrades in stripe? 当用户在iOS订阅中输入计费重试时应采取什么措施? - What action should be taken when a user enters billing retry in iOS subscriptions? 有没有一种方法可以验证主题是否已订阅 - Is there a way to verify if a topic as been subscribed to 如何知道mqtt中订阅的主题 - how to know the subscribed topics in mqtt 当一个事件有多个订阅者时,如何获取每个订阅者的返回值? - when an event has multiple subscribers, how do I get the return value for each subscriber?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM