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

    boolean

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

    string

    Authentication mode.

    enum : ['IP_AUTH', 'REGISTER_AUTH']

  • id

    integer

    The unique ID of the provider.

    format : int64

  • port

    integer

    Host port for SIP server.
  • name

    string

    Name of preconfigured provider.
  • status

    string

    REGISTERED status or UNREGISTERED status.

    enum : ['ONLINE', 'OFFLINE']

  • hostname

    string

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

    array

    Show child attributes
  • password

    string

    Password for authentication.
  • outbound_server

    string

    Outbound server.
  • out_parameters

    array

    Show child attributes
  • in_parameters

    array

    Show child attributes
  • outbound_server_port

    integer

    Port number for Outbound server.
  • require_register

    boolean

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

    string

    transport protocol of provider.

    enum : ['UDP', 'TCP']

  • provider_in_lan

    boolean

    Whether the provider under LAN or not.
  • reregister_interval

    integer

    Interval for registry refreshment, in seconds.
  • auth_id

    string

    Authentication ID, i.e. SIP username.

Sample Response

                      
{}
                      
                    

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

                      
                      
                    

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

    boolean

    required

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

    string

    required

    Authentication mode.

    enum : ['IP_AUTH', 'REGISTER_AUTH']

  • out_parameters

    array

    required

  • outbound_server_port

    integer

    required

    Port number for Outbound server.
  • auth_id

    string

    required

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

    array

    required

  • name

    string

    required

    Name of preconfigured provider.
  • id

    integer

    required

    The unique ID of the provider.

    format : int64

  • port

    integer

    required

    Host port for SIP server.
  • protocol

    string

    required

    transport protocol of provider.

    enum : ['UDP', 'TCP']

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

    array

    required

  • provider_in_lan

    boolean

    required

    Whether the provider under LAN or not.
  • reregister_interval

    integer

    required

    Interval for registry refreshment, in seconds.
  • require_register

    boolean

    required

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

    string

    required

    Password for authentication.
  • outbound_server

    string

    required

    Outbound server.

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

                      
                      
                    

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

    boolean

    required

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

    string

    required

    Authentication mode.

    enum : ['IP_AUTH', 'REGISTER_AUTH']

  • outbound_server_port

    integer

    required

    Port number for Outbound server.
  • status

    string

    required

    REGISTERED status or UNREGISTERED status.

    enum : ['ONLINE', 'OFFLINE']

  • name

    string

    required

    Name of preconfigured provider.
  • port

    integer

    required

    Host port for SIP server.
  • protocol

    string

    required

    transport protocol of provider.

    enum : ['UDP', 'TCP']

  • provider_in_lan

    boolean

    required

    Whether the provider under LAN or not.
  • hostname

    string

    required

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

    array

    required

  • outbound_server

    string

    required

    Outbound server.
  • 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.
  • auth_id

    string

    required

    Authentication ID, i.e. SIP username.

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
}
                      
                    

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

    integer

  • count

    integer

  • page_count

    integer

  • providers

    array

    Show child attributes
  • sort_by

    string

  • pagination

    integer

Sample Response

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