首先,振铃工作正常,它拨打了两个号码,并成功地将它们连接在一起。
当我向Ringout REST API端点发送POST请求时,我会得到一个ringout ID。然后,我使用这个振铃ID,每隔几秒钟发出一次GET请求,以跟踪双方何时应答了这些呼叫。(我知道webhooks,但webhooks不能告诉我被呼叫者的状态)
{
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/XXXX/extension/XXXXXX/ringout/XXx";,
"id": xxx,
"status": {
"callStatus": "Success",
"callerStatus": "Success",
"calleeStatus": "Success"
}
}我使用同样的轮询技术来计算任何一方何时从呼叫断开。
{
"uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/xxxx/extension/xxxx/ringout/xxxx";,
"id": xxx,
"status": {
"callStatus": "CannotReach",
"callerStatus": "Finished",
"calleeStatus": "Finished"
}
}我注意到ringout ID只存在大约30秒,在此之后,当我发送GET请求时,即使电话仍在进行,我也会收到此响应。
{
"errorCode": "CMN-102",
"message": "Resource for parameter [ringoutId] is not found",
"errors": [
{
"errorCode": "CMN-102",
"message": "Resource for parameter [ringoutId] is not found",
"parameterName": "ringoutId"
}
],
"parameterName": "ringoutId"
}这是振铃呼叫的预期行为吗?即使呼叫仍处于活动状态,ID是否会在30秒后消失?
发布于 2016-09-23 00:33:06
这个问题也在RingCentral开发人员社区中提出,并由平台的主要架构师https://devcommunity.ringcentral.com/ringcentraldev/topics/how-long-does-a-ringout-id-live-for回答
在这里添加一份Anton的答案,以节省人们的点击...
在建立(或取消)两个呼叫分支之前,
振铃ID一直有效。您不能使用此ID检查已连接到双方的呼叫的状态,也不能取消已连接的呼叫。
为了监控已建立呼叫的状态,您应该使用我们的在线状态通知。
https://stackoverflow.com/questions/39627279
复制相似问题