Retrieve a collection of outbound rules.

GET /list
Retrieve a collection of outbound rules.
Path parameters
  • access_token

    string

    required

    token to be passed as a header.

    minLength: 64

    maxLength: 64

  • pagination

    integer

    required

    The pagination of paging.
  • pagesize

    integer

    required

    The size of paging.
  • sort_by

    string

    optional

    Values include "DEFAULT" and "Optional". Default value will be used when user does not specify value for this field.

Sample Request

                      curl -v -X GET http://127.0.0.1:8990/api/outbound_rules/list \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                      
                    

Responses

200
Successful operation
application/json
  • pagination

    integer

  • count

    integer

  • rules

    array

    Show child attributes
  • sort_by

    string

  • pagesize

    integer

Sample Response

                      
{
    "pagination": 8,
    "count": 100,
    "sort_by": "DEFAULT",
    "pagesize": 10
}
                      
                    

Update outbound rule

POST /update
Update outbound rule
Path parameters
  • access_token

    string

    required

    token to be passed as a header.

    minLength: 64

    maxLength: 64

Request body
application/json
  • id

    integer

    required

    Outbound rule's ID.
  • from_extension

    string

    required

    Extension who starts the call. A comma-separated list of extensions allowed. For example by specifying "101-110, 199", extensions from 101 to 110 and 199 will be applied this rule.
  • from_extension_groups

    array

    required

    Extensions number of the specific groups will be applied this rule.
  • number_length

    integer

    required

    NOTE: It contains the length of number prefix. For example by inputting 15, calls with a caller ID of 15 digits will be applied this rule.
  • number_prefix

    string

    required

    Prefix of callee ID. Calls started with this prefix will be applied this outbound rule.
  • enabled

    boolean

    required

  • routes

    array

    required

  • name

    string

    required

    Outbound rule's name.
  • office_hours

    object

    required

    Show child attributes

Sample Request

                      curl -v -X POST http://127.0.0.1:8990/api/outbound_rules/update \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{}'
                      
                    

Responses

200
Successful operation

Sample Response

                      
                      
                    

Destroy outbound rule

POST /destroy
Destroy media server
Path parameters
  • access_token

    string

    required

    token to be passed as a header.

    minLength: 64

    maxLength: 64

Request body
application/json
  • id

    integer

    required

    Outbound rule's ID.

Sample Request

                      curl -v -X POST http://127.0.0.1:8990/api/outbound_rules/destroy \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{}'
                      
                    

Responses

400
Invalid username supplied.
200
Successful operation.

Sample Response

                      
                      
                    

Retrieve outbound rule

GET /show
Retrieve outbound rule
Path parameters
  • access_token

    string

    required

    token to be passed as a header.

    minLength: 64

    maxLength: 64

  • id

    integer

    required

    Outbound rule's ID.

Sample Request

                      curl -v -X GET http://127.0.0.1:8990/api/outbound_rules/show \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                      
                    

Responses

200
Successful operation
application/json
  • id

    integer

    Outbound rule's ID.
  • from_extension

    string

    Extension who starts the call. A comma-separated list of extensions allowed. For example by specifying "101-110, 199", extensions from 101 to 110 and 199 will be applied this rule.
  • office_hours

    object

    Show child attributes
  • number_length

    integer

    NOTE: It contains the length of number prefix. For example by inputting 15, calls with a caller ID of 15 digits will be applied this rule.
  • number_prefix

    string

    Prefix of callee ID. Calls started with this prefix will be applied this outbound rule.
  • enabled

    boolean

  • from_extension_groups

    array

    Extensions number of the specific groups will be applied this rule.
    Show child attributes
  • name

    string

    Outbound rule's name.
  • routes

    array

    Show child attributes

Sample Response

                      
{}
                      
                    

Create outbound rule

POST /create
Add a new outbound rule. Please make sure you have at least one provider created before creating a new outbound rule.
Path parameters
  • access_token

    string

    required

    token to be passed as a header.

    minLength: 64

    maxLength: 64

Request body
application/json
  • from_extension

    string

    required

    Extension who starts the call. A comma-separated list of extensions allowed. For example by specifying "101-110, 199", extensions from 101 to 110 and 199 will be applied this rule.
  • from_extension_groups

    array

    required

    Extensions number of the specific groups will be applied this rule.
  • number_length

    integer

    required

    NOTE: It contains the length of number prefix. For example by inputting 15, calls with a caller ID of 15 digits will be applied this rule.
  • number_prefix

    string

    required

    Prefix of callee ID. Calls started with this prefix will be applied this outbound rule.
  • enabled

    boolean

    required

  • routes

    array

    required

  • name

    string

    required

    Outbound rule's name.
  • office_hours

    object

    required

    Show child attributes

Sample Request

                      curl -v -X POST http://127.0.0.1:8990/api/outbound_rules/create \
                        -H "Content-Type: application/json" \
                        -H "access_token: 4DFCF1D4C30B4D798ECE3AE43769F008" \
                          -d '{}'
                      
                    

Responses

200
Created outbound rule
application/json
  • id

    integer

    Outbound rule's ID.

Sample Response

                      
{}