我正在使用RingCentral RingOut API,我想知道是否可以阻止来电者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: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
})发布于 2018-05-07 16:38:03
您可以通过将默认的RingOut调用者ID设置设置为扩展的Blocked,然后在没有显式callerId值的情况下进行RingOut调用,从而使用默认值来实现这一点。您需要在调用RingOut API之前分别更新extension设置。目前不可能将Caller设置为阻止RingOut API调用本身。
若要在帐户中将调用方ID设置为Blocked,请使用Update:
API参考:https://developer.ringcentral.com/api-docs/latest/index.html#!#RefUpdateCallerId
下面是一些使用HTTP和Ruby的示例:
通过HTTP更新呼叫者ID API
PUT /restapi/v1.0/account/~/extension/~/caller-id
Authorization: Bearer <myAccessToken>
{
"byFeature": [
{
"feature": "RingOut",
"callerId": {
"type": "Blocked"
}
}
]
}通过Ruby 更新呼叫者ID API
使用SDK
rc.put('/restapi/v1.0/account/~/extension/~/caller-id', payload: {
byFeature: [
{
feature: "RingOut",
callerId: {
type: "Blocked"
}
}
]
})通过Web 更新来电者ID
还可以使用联机帐户门户(https://service.ringcentral.com)更新此设置:
Settings > Outbound Calls/Faxes > Caller ID > By Feature > RingOut from Web > Edit

进行RingOut调用
当您进行RingOut调用时,只需省略callerId属性,它将使用阻塞的值。
https://stackoverflow.com/questions/50218436
复制相似问题