Retrive a list of transports
GET
/transports/list
Retrieves a list of available network transports.
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.pagination
integer
required
The pagination of paging.pagesize
integer
optional
The pagesize of paging.sort_by
enum
optional
Values include "DEFAULT" and "Optional". Default value will be used when user does not specify value for this field.
Sample Request
https://example.com/api/transports/list?access_token=196ACE20C6F34027895F7F95402BB164&pagesize=100&pagination=1&sort_by=DEFAULT
Response
Placeholders
pagination
integer
required
The pagination of paging.pagesize
integer
optional
The pagesize of paging.sort_by
enum
optional
Values include "DEFAULT" and "Optional". Default value will be used when user does not specify value for this field.page_count
integer
required
The total count of pages.count
integer
required
Current pagesize.transports
array
required
Show child attributesCollection of call session objects.
Sample Response
{
"pagination": 1,
"pagesize": 100,
"sort_by": "DEFAULT",
"page_count": 100,
"count": 100,
"transports": [
{
"protocol": "UDP",
"port": 5060
}
]
}
Add transport protocols
POST
/transports/create
Adds transport protocol for PBX.
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.protocol
string
required
Supported protocol includes: UDP, TCP, TLS, WS and WSS.port
integer
required
Transport port. API will be failed if the specified port is already in use.certificate_file
string
optional
Filename of certificate for TLS or WSS transport protocol. The certificate file MUST be PEM-encoded with X.509.private_key_file
string
optional
Filename of private certificate for TLS or WSS transport protocol.root_certificate_file
string
optional
Filename of root certificate for TLS or WSS protocol.password_for_private_key_file
string
optional
Password of private certificate.certificate_verification_method
string
optional
Indicates if PBX wishes (Optional) or requires (Mandatory) TLS clients to present a client certificate. Valid values include "NONE", "OPTIONAL" or "MANDATORY".
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"protocol": "TLS",
"port": 5063,
"certificate_file": "some cert file",
"private_key_file": "some private key file",
"root_certificate_file": "some root certificate file",
"password_for_private_key_file": "password",
"certificate_verification_method": "Optional"
}
Response
Placeholders
Sample Response
Remove transport protocol
POST
/transports/destroy
Removes certain transport protocol.
Request
Placeholders
access_token
string
required
Access token is a 32-byte string with validity of 30 seconds.protocol
string
required
Valid values include "UDP", "TCP", "TLS", "WS" or "WSS".port
integer
required
Transport port.
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"protocol": "TCP",
"port": 5063
}
Response
Placeholders