Create Trunk
Creates a new SIP trunk. This is the first step for all SIP Trunking use cases.
A SIP Trunk acts as a virtual connection between your communication system (PBX/Contact Center) and Exotel's telephony network.
HTTP Request
Request Headers
Header | Value |
|---|---|
Content-Type | application/json |
Request Parameters
The following parameters are sent as JSON in the body of the request:
Parameter Name | Mandatory/Optional | Value |
|---|---|---|
trunk_name | Mandatory | String; Unique identifier for the trunk. Must be alphanumeric with underscores only, maximum 16 characters. Example: outbound_trunk, my_pbx_trunk |
nso_code | Mandatory | String; Network Service Operator code. Use ANY-ANYfor standard configuration. |
domain_name | Mandatory | String; SIP domain for the trunk. Format: <your_sid>.pstn.exotel.com. Example: ameyo5m.pstn.exotel.com |
Example Request
HTTP Response
On success, the HTTP response status code will be 200 OK.
The trunk_sidis the unique identifier of the trunk - save this value as it will be required for all subsequent API calls.
Example Response
Response Parameters
Parameter Name | Type & Value |
|---|---|
request_id | String; Unique identifier for this API request |
method | String; HTTP method used (POST) |
http_code | Integer; HTTP status code (200 for success) |
trunk_sid | String; Important - Unique identifier for the trunk. Save this for subsequent API calls. Example: trmum1f708622631150902801a1n |
trunk_name | String; Name of the trunk as provided in request |
domain_name | String; SIP domain for the trunk |
status | String; Current trunk status: active- Trunk is ready for use, inactive- Trunk is disabled |
auth_type | String; Authentication type. Currently only IP-WHITELISTis supported |
registration_enabled | String; SIP registration status: enabledor disabled |
edge_preference | String; Edge server preference. Default: auto |
nso_code | String; Network Service Operator code |
secure_trunking | String; TLS status: enabledor disabled |
destination_uris | String; API path to manage destination URIs for this trunk |
whitelisted_ips | String; API path to manage ACLs (whitelisted IPs) for this trunk |
credentials | String; API path to credentials for this trunk |
phone_numbers | String; API path to manage phone numbers for this trunk |
date_created | String; ISO 8601 timestamp when trunk was created |
date_updated | String; ISO 8601 timestamp when trunk was last updated |