Edit an Allowed Number Rule

Edit the configuration of a call allowlist rule.

Request URL

POST {base_url}/{api_path}/allow_numbers/update?access_token={access_token}

Request parameters

Table 1.
Parameter Required Type Description
id Yes Integer The unique ID of a call allowlist rule.
Note: You can query call allowlist rule's ID using Search Specific Allowed Numbers Rules.
name No String The name of the call allowlist rule.
limit_type No String The communication type that will be applied to the call allowlist rule.

Valid value:

  • inbound: Allow the number(s) to call into the PBX.
  • outbound: Allow PBX extensions to call the number(s).
  • both: Allow the number(s) to call into the PBX and allow PBX extensions to call the number(s).
number_list No String The numbers that will be allowed by the system.
Note: Use & to separate multiple numbers.

Response parameters

Table 2.
Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.

Examples

Request example

POST /openapi/v1.0/allow_numbers/update?access_token=ffUn1DAFD3kfBYjqxISx18dR531iTrMd HTTP/1.1
Host: 192.168.5.150:8088
Content-Type: application/json
{
    "id":3,
    "limit_type":"both"
}

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS"
}