我正在使用 RingCentral RingOut API,我想知道是否可以阻止 caller ID ?
RingOut API 仅在请求格式中显示 phoneNumber
属性,但 RingCentral 在线帐户门户可以阻止调用者 ID。有办法做到这一点吗?
API引用:https://developer.ringcentral.com/api-docs/latest/index.html#!#RefMakeRingOut
请求:
POST /restapi/v1.0/account/~/extension/~/ring-out HTTP/1.1
{
"from": {"phoneNumber": "+14155550100"},
"callerId": {"phoneNumber": "+16505550100"},
"to": {"phoneNumber": "+12125550100"},
"playPrompt": true
}
我正在使用 Ruby SDK:https://github.com/ringcentral/ringcentral-ruby
rc.post('/restapi/v1.0/account/~/extension/~/ring-out', payload: {
from: {phoneNumber: "+14155550100"},
callerId: {phoneNumber: "+16505550100"},
to: {phoneNumber: "+12125550100"},
playPrompt: true
})
最佳答案
您可以通过将分机的默认 RingOut 主叫方 ID 设置设置为“已阻止”,然后在没有显式 callerId
值的情况下进行 RingOut 调用来实现此目的,因此默认值将使用。您需要在调用 RingOut API 之前单独更新分机来电显示设置。目前无法在 RingOut API 调用本身中将主叫方 ID 设置为阻止。
要将帐户中的来电显示设置为已阻止
,请使用更新来电显示 API:
API引用:https://developer.ringcentral.com/api-docs/latest/index.html#!#RefUpdateCallerId
以下是一些使用 HTTP 和 Ruby SDK 的示例:
通过 HTTP 更新来电显示 API
PUT /restapi/v1.0/account/~/extension/~/caller-id
Authorization: Bearer <myAccessToken>
{
"byFeature": [
{
"feature": "RingOut",
"callerId": {
"type": "Blocked"
}
}
]
}
通过 Ruby SDK 更新来电显示 API
rc.put('/restapi/v1.0/account/~/extension/~/caller-id', payload: {
byFeature: [
{
feature: "RingOut",
callerId: {
type: "Blocked"
}
}
]
})
通过 Web UI 更新来电显示
您还可以使用在线帐户门户 ( https://service.ringcentral.com ) 更新此设置:
设置
> 出站电话/传真
> 来电显示
> 按功能
> 从网络拨出
> 编辑
调用 RingOut 调用
当您进行 RingOut 调用时,只需省略 callerId
属性,它将使用阻止的值。
关于ruby - 是否可以在 RingOut 中将主叫方 ID (CID/CLID) 设置为“阻止”?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50218436/