Update provider

POST /update
Update provider
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • name

    string

    required

    Name of preconfigured provider.
  • in_parameters

    array

    required

  • auth_mode

    string

    required

    Authentication mode.

    enum : ['IP_AUTH', 'REGISTER_AUTH']

  • protocol

    string

    required

    transport protocol of provider.

    enum : ['UDP', 'TCP']

  • require_register

    boolean

    required

    Indicates if SIP trunks or VoIP providers need to be registered.
  • password

    string

    required

    Password for authentication.
  • out_parameters

    array

    required

  • reregister_interval

    integer

    required

    Interval for registry refreshment, in seconds.
  • id

    integer

    required

    The unique ID of the provider.

    format : int64

  • port

    integer

    required

    Host port for SIP server.
  • ips

    array

    required

  • auth_id

    string

    required

    Authentication ID, i.e. SIP username.
  • outbound_server

    string

    required

    Outbound server.
  • outbound_server_port

    integer

    required

    Port number for Outbound server.
  • status

    string

    required

    REGISTERED status or UNREGISTERED status.

    enum : ['ONLINE', 'OFFLINE']

  • hostname

    string

    required

    SIP server hostname or IP address (also referred to as Registrar Server).
  • provider_in_lan

    boolean

    required

    Whether the provider under LAN or not.
  • single_via_header

    boolean

    required

    Whether this provider is only accept single Via SIP header or not.

Sample Request

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

Responses

200
Successful operation

Sample Response

                      
                      
                    

Retrieve provider

GET /show
Retrieve provider
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • id

    integer

    required

    The unique ID of the provider.

Sample Request

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

Responses

200
Successful operation
application/json
  • auth_mode

    string

    Authentication mode.

    enum : ['IP_AUTH', 'REGISTER_AUTH']

  • protocol

    string

    transport protocol of provider.

    enum : ['UDP', 'TCP']

  • out_parameters

    array

    Show child attributes
  • ips

    array

    Show child attributes
  • in_parameters

    array

    Show child attributes
  • reregister_interval

    integer

    Interval for registry refreshment, in seconds.
  • hostname

    string

    SIP server hostname or IP address (also referred to as Registrar Server).
  • outbound_server_port

    integer

    Port number for Outbound server.
  • single_via_header

    boolean

    Whether this provider is only accept single Via SIP header or not.
  • id

    integer

    The unique ID of the provider.

    format : int64

  • require_register

    boolean

    Indicates if SIP trunks or VoIP providers need to be registered.
  • password

    string

    Password for authentication.
  • port

    integer

    Host port for SIP server.
  • provider_in_lan

    boolean

    Whether the provider under LAN or not.
  • auth_id

    string

    Authentication ID, i.e. SIP username.
  • outbound_server

    string

    Outbound server.
  • status

    string

    REGISTERED status or UNREGISTERED status.

    enum : ['ONLINE', 'OFFLINE']

  • name

    string

    Name of preconfigured provider.

Sample Response

                      
{}
                      
                    

Retrieve a collection of providers

GET /list
Retrieve a collection of providers
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

  • pagination

    integer

    required

    The pagination of paging.

    format : int32

  • 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.

    enum : ['DEFAULT', 'OPTIONAL']

Sample Request

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

Responses

200
Successful operation
application/json
  • page_count

    integer

  • pagination

    integer

  • sort_by

    string

  • pagesize

    integer

  • providers

    array

    Show child attributes
  • count

    integer

Sample Response

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

Destroy provider

POST /destroy
Destroy provider by provider's ID.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • id

    integer

    required

    The unique ID of the provider.

    format : int64

Sample Request

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

Responses

200
Successful operation.
400
Invalid provider ID supplied.

Sample Response

                      
                      
                    

Create provider

POST /create
Add a new provider into system.
Path parameters
  • access_token

    string

    required

    token to be passed as a header

    minLength: 64

    maxLength: 64

Request body
application/json
  • provider_in_lan

    boolean

    required

    Whether the provider under LAN or not.
  • name

    string

    required

    Name of preconfigured provider.
  • auth_mode

    string

    required

    Authentication mode.

    enum : ['IP_AUTH', 'REGISTER_AUTH']

  • protocol

    string

    required

    transport protocol of provider.

    enum : ['UDP', 'TCP']

  • require_register

    boolean

    required

    Indicates if SIP trunks or VoIP providers need to be registered.
  • password

    string

    required

    Password for authentication.
  • reregister_interval

    integer

    required

    Interval for registry refreshment, in seconds.
  • port

    integer

    required

    Host port for SIP server.
  • ips

    array

    required

  • auth_id

    string

    required

    Authentication ID, i.e. SIP username.
  • outbound_server

    string

    required

    Outbound server.
  • status

    string

    required

    REGISTERED status or UNREGISTERED status.

    enum : ['ONLINE', 'OFFLINE']

  • hostname

    string

    required

    SIP server hostname or IP address (also referred to as Registrar Server).
  • outbound_server_port

    integer

    required

    Port number for Outbound server.
  • single_via_header

    boolean

    required

    Whether this provider is only accept single Via SIP header or not.

Sample Request

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

Responses

200
Created provider
application/json
  • id

    integer

    The unique ID of the provider.

    format : int64

Sample Response

                      
{
    "id": 1234
}