latestOpenAPI 3.1.0PortSIP2026-08-105581112.6 MB

577415d4a3d5

Trunk

Create a provider

Add a new provider into system.

post/providers

Request body

namestring required

The name of the trunk.

enabledboolean

Whether to enable the provider.

brandstring

The brand of trunk.

auth_mode'IP_AUTH' | 'REGISTER_AUTH' | 'ACCEPT_REGISTER' | 'TEAMS' | 'WHATS_APP'

Authentication mode:
Can be either:

  • IP_AUTH:
  • REGISTER_AUTH:
  • ACCEPT_REGISTER:
  • TEAMS:
  • WHATS_APP:
transport'UDP' | 'TCP' | 'TLS' required

The trunk transport protocol:
Can be either:

  • UDP:
  • TCP:
  • TLS:
hostnamestring required

Server hostname or IP address

portinteger required

A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535. For TCP, port number 0 is reserved and cannot be used, while for UDP, the source port is optional and a value of zero means no port

auth_idstring

Authentication ID, i.e. SIP username.

usernamestring

Authentication username.

passwordstring

Password for authentication.

registrationboolean

Whether registration is required.

register_intervalinteger

Interval for registry refreshment, in seconds.

outbound_serverstring required

The outbound server hostname of the trunk.

outbound_server_portinteger required

A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535. For TCP, port number 0 is reserved and cannot be used, while for UDP, the source port is optional and a value of zero means no port

inlanboolean

Whether the trunk under LAN or not.

single_via_headerboolean

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

rewrite_via_ipboolean

Rewrite the host IP of Via header by public IP when sending the request to trunk.

verify_portboolean

Verify the port when receiving SIP messages from trunk

keep_aliveboolean

Send OPTIONS message for keep alive.

concurrencyinteger required

The max number of concurrent calls.

keep_alive_intervalinteger

Keep alive message sending interval (seconds).

additional_ipsstring

The additional IP addresses of provider.
A semicolon-separated list of IP addresses in CIDR format.
For example: 192.0.2.0/24;192.0.2.0/32 as defined in RFC 4632 and RFC 4291.

adjust_sdp_directionboolean

Adjust the SDP direction for call hold.

remove_srtp_infoboolean

Remove crypto line in the SDP.

stir_shaken_signature_requiredboolean

Whether to enable STIR/SHAKEN signature.

did_numbersstring

The semicolon-separated list of DID/DDI pool number range or DID/DDI number. Assign a DID/DDI pool number range or DID/DDI number to the tenant. For example: 3000;12000-18000. The DID/DDI pool number range should not overlap with other tenant DID/DDI pool number ranges and numbers.

Example request

{
  "port": 80,
  "outbound_server_port": 80
}

Response

Created

idstring

The unique ID of the resource.

Example response

{
  "id": "NzAwNTUxOTA5NzczMTQ4MTYw"
}