简体   繁体   English

如何获得RingCentral软电话中显示的用户状态?

[英]How can I get a user's status as shown in the RingCentral softphone?

The RingCentral softphone application will show user status as the following. RingCentral软电话应用程序将显示以下用户状态。 How can I get this via the API? 如何通过API获取此信息?

  • Available 可得到
  • Busy
  • Do Not Disturb 请勿打扰
  • Invisible 无形
  • On a Call 通话中
  • On Hold 等候接听

I'm looking at the "Get User Status API" which has a presenceStatus property with the following values Offline , Busy , Available , but how do I get the full status list shown on the softphone? 我看其中有一个“获取用户状态API” presenceStatus使用下面的值属性OfflineBusyAvailable ,但是我如何才能在软电话显示完整的状态列表?

https://developer.ringcentral.com/api-reference#Presence-getPresenceStatus https://developer.ringcentral.com/api-reference#Presence-getPresenceStatus

Here's an example screenshot: 这是一个示例屏幕截图:

在此处输入图片说明

User presence is the right place to find this information and this can be done statically via the REST API and via real-time updates using the Subscription API's Push Notifications. 用户状态是找到此信息的正确位置,可以通过REST API和使用Subscription API的Push Notifications进行实时更新来静态完成此操作。

The status shown in the softphone is an combination of several different values in user presence and can be as shown below. 网络电话中显示的状态是用户在场时几个不同值的组合,可以如下所示。

The following KB article indicates how the status is determined: 以下知识库文章指示如何确定状态:

Presence - View Presence via Favorites | 在线状态-通过收藏夹查看在线状态| RingCentral Phone RingCentral电话

在此处输入图片说明

The status of their phone will be displayed as Available, Do Not Disturb, and Busy. 他们的电话状态将显示为“可用”,“请勿打扰”和“忙碌”。 Contacts on Invisible or Offline will be seen as Invisible. 不可见或离线上的联系人将被视为不可见。

The " Get User Status API " (aka Presence API) will return an object like the following: 获取用户状态API ”(又名Presence API)将返回如下对象:

{
  "uri": "https://platform.ringcentral.com/restapi/v1.0/account/403228676008/extension/403228676008/presence",
   "extension": {
      "uri": "https://platform.ringcentral.com/restapi/v1.0/account/403228676008/extension/403228676008",
      "id": 403228676008,
      "extensionNumber": "101"
   },
   "presenceStatus": "Available",
   "telephonyStatus": "NoCall",
   "userStatus": "Available",
   "dndStatus": "TakeAllCalls",
   "allowSeeMyPresence": true,
   "ringOnMonitoredCall": false,
   "pickUpCallsOnHold": true
}

From this, user status can be built using this pseudocode: 由此,可以使用以下伪代码建立用户状态:

user_status = 
  !user.allowSeeMyPresence                ? "Invisible" :
  user.presenceStatus == "Offline"        ? "Invisible" :
  user.dndStatus == "DoNotAcceptAnyCalls" ? "Do Not Disturb" :
  user.telephonyStatus == "CallConnected" ? "On a Call" :
  user.telephonyStatus == "OnHold"        ? "On Hold" :
  user.presenceStatus == "Busy"           ? "Busy" : "Available"

Once a page you display this info, you can also update it in real time by creating a subscription to the presence endpoints for the users you wish to receive updates for. 页面显示此信息后,您还可以通过为要接收其更新的用户创建状态端点的订阅来实时更新它。

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

相关问题 获取有关 FaxOut RingCentral API 的传真状态更改的通知 - Get Notification on Fax Status Change for FaxOut RingCentral API 如何通过facebook应用程序获取facebook用户的登录状态? - How can get login status of facebook user through facebook application? 如何通过java代码获取风暴拓扑状态? - How can I get storm topology status via java code? 如果FB.init({status:true})导致Javascript SDK加载状态,我该如何获取状态? - If FB.init({status:true}) causes the Javascript SDK to load status, how can I get the status? 如何让'git status'始终使用短格式? - How can I get 'git status' to always use short format? 如何获取网络元素的网络“状态”? - How can I get the network-“Status” of an webelement? 如何使用页面名称而不是用户名将状态发布到Facebook页面? - How can I post status to facebook page with page name rather than user name? 登录成功后如何从ejs文件的另一个页面获取状态(存储在json中) - how can I get status (stored in json) from another page at ejs file after login success 如何保持Jenkins状态页面? - How can I persist Jenkins status page? 使用 telethon 获取电报用户状态 - Get telegram user status with telethon
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM