Skip to main content

CallBlockingService

A list of all methods in the CallBlockingService service. Click on the method name to view detailed information about that method.

MethodsDescription
read_caller_blocking_settingsReturns the current caller blocking settings of a user.
update_caller_blocking_settingsUpdates the current caller blocking settings of a user.
list_blocked_allowed_numbersReturns the lists of blocked and allowed phone numbers.
create_blocked_allowed_numberUpdates either blocked or allowed phone number list with a new phone number.
read_blocked_allowed_numberReturns blocked or allowed phone number(s) by their ID(s). Batch request syntax is supported.
update_blocked_allowed_numberUpdates blocked or allowed phone number(s) by their ID(s). Batch request syntax is supported.
delete_blocked_allowed_numberDeletes blocked or allowed phone number(s) by their ID(s). Batch request is supported.

read_caller_blocking_settings

Returns the current caller blocking settings of a user.

  • HTTP Method: GET
  • Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-blocking

Parameters

NameTypeRequiredDescription
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
extension_idstrInternal identifier of the RingCentral extension/user (can be set to "~" to indicate that the extension associated with current authorization session should be used)

Return Type

CallerBlockingSettings

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.call_blocking.read_caller_blocking_settings(
account_id="~",
extension_id="~"
)

print(result)

update_caller_blocking_settings

Updates the current caller blocking settings of a user.

  • HTTP Method: PUT
  • Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-blocking

Parameters

NameTypeRequiredDescription
request_bodyCallerBlockingSettingsUpdateThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
extension_idstrInternal identifier of the RingCentral extension/user (can be set to "~" to indicate that the extension associated with current authorization session should be used)

Return Type

CallerBlockingSettings

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import CallerBlockingSettingsUpdate

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = CallerBlockingSettingsUpdate(
mode="Specific",
no_caller_id="BlockCallsAndFaxes",
pay_phones="Block",
greetings=[
{
"type_": "type",
"preset": {
"uri": "uri",
"id_": "id",
"name": "name"
}
}
]
)

result = sdk.call_blocking.update_caller_blocking_settings(
request_body=request_body,
account_id="~",
extension_id="~"
)

print(result)

list_blocked_allowed_numbers

Returns the lists of blocked and allowed phone numbers.

  • HTTP Method: GET
  • Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-blocking/phone-numbers

Parameters

NameTypeRequiredDescription
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
extension_idstrInternal identifier of the RingCentral extension/user (can be set to "~" to indicate that the extension associated with current authorization session should be used)
pageintThe result set page number (1-indexed) to return
per_pageintThe number of items per page. If provided value in the request is greater than a maximum, the maximum value is applied
statusBlockedNumberStatusEnum

Return Type

BlockedAllowedPhoneNumbersList

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import BlockedNumberStatusEnum

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.call_blocking.list_blocked_allowed_numbers(
account_id="~",
extension_id="~",
page=1,
per_page=100,
status="Blocked"
)

print(result)

create_blocked_allowed_number

Updates either blocked or allowed phone number list with a new phone number.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-blocking/phone-numbers

Parameters

NameTypeRequiredDescription
request_bodyAddBlockedAllowedPhoneNumberThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
extension_idstrInternal identifier of the RingCentral extension/user (can be set to "~" to indicate that the extension associated with current authorization session should be used)

Return Type

BlockedAllowedPhoneNumberInfo

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import AddBlockedAllowedPhoneNumber

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = AddBlockedAllowedPhoneNumber(
phone_number="phoneNumber",
label="label",
status="Blocked"
)

result = sdk.call_blocking.create_blocked_allowed_number(
request_body=request_body,
account_id="~",
extension_id="~"
)

print(result)

read_blocked_allowed_number

Returns blocked or allowed phone number(s) by their ID(s). Batch request syntax is supported.

  • HTTP Method: GET
  • Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-blocking/phone-numbers/{blockedNumberId}

Parameters

NameTypeRequiredDescription
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
extension_idstrInternal identifier of the RingCentral extension/user (can be set to "~" to indicate that the extension associated with current authorization session should be used)
blocked_number_idstrInternal identifier of a blocked number entry

Return Type

BlockedAllowedPhoneNumberInfo

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.call_blocking.read_blocked_allowed_number(
account_id="~",
extension_id="~",
blocked_number_id="blockedNumberId"
)

print(result)

update_blocked_allowed_number

Updates blocked or allowed phone number(s) by their ID(s). Batch request syntax is supported.

  • HTTP Method: PUT
  • Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-blocking/phone-numbers/{blockedNumberId}

Parameters

NameTypeRequiredDescription
request_bodyAddBlockedAllowedPhoneNumberThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
extension_idstrInternal identifier of the RingCentral extension/user (can be set to "~" to indicate that the extension associated with current authorization session should be used)
blocked_number_idstrInternal identifier of a blocked number entry

Return Type

BlockedAllowedPhoneNumberInfo

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import AddBlockedAllowedPhoneNumber

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = AddBlockedAllowedPhoneNumber(
phone_number="phoneNumber",
label="label",
status="Blocked"
)

result = sdk.call_blocking.update_blocked_allowed_number(
request_body=request_body,
account_id="~",
extension_id="~",
blocked_number_id="blockedNumberId"
)

print(result)

delete_blocked_allowed_number

Deletes blocked or allowed phone number(s) by their ID(s). Batch request is supported.

  • HTTP Method: DELETE
  • Endpoint: /restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-blocking/phone-numbers/{blockedNumberId}

Parameters

NameTypeRequiredDescription
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
extension_idstrInternal identifier of the RingCentral extension/user (can be set to "~" to indicate that the extension associated with current authorization session should be used)
blocked_number_idstrInternal identifier of a blocked number entry

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.call_blocking.delete_blocked_allowed_number(
account_id="~",
extension_id="~",
blocked_number_id="blockedNumberId"
)

print(result)

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →