Block and unblock customers
Цей контент ще не доступний вашою мовою.
A blocked customer’s accounts and sub-customers cannot make calls. Its balance and settings stay as they are, so unblocking restores service exactly as it was. This is the same as Block and Unblock in the customer’s Actions menu in the panel. The customer can be anywhere below the authenticated customer in the hierarchy, including sub-customers of sub-customers.
Both methods support trusted mode with i_wholesaler, the ID of a customer above the one you block.
blockCustomer
Section titled “blockCustomer”Blocks a customer and disconnects all its calls in progress at once.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
i_customer |
int | yes | ID of the customer |
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
result |
string | OK |
Example
Section titled “Example”call("blockCustomer", {"i_customer": 3}){"result": "OK"}unblockCustomer
Section titled “unblockCustomer”Unblocks a customer. Its accounts can call again at once if their balances allow it.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
i_customer |
int | yes | ID of the customer |
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
result |
string | OK |
Example
Section titled “Example”call("unblockCustomer", {"i_customer": 3}){"result": "OK"}Errors
Section titled “Errors”| faultCode | faultString | Cause |
|---|---|---|
400 |
Customer not found |
No customer with this i_customer is below the authenticated customer |
400 |
Cannot block root customer |
You tried to block the root customer |