Create Outbound Trunk
Configure a SIP trunk for outbound calls.
- URL:
/sip/create-outbound-trunk
- Method:
POST
- Headers:
Authorization: Bearer <your_api_key>
- Content-Type:
application/json
Request Body
| Field |
Type |
Required |
Description |
trunk_name |
string |
Yes |
Name of the trunk (1-100 characters). |
trunk_type |
string |
Yes |
Provider type. One of: twilio, exotel. |
trunk_config |
object |
Yes |
The trunk configuration object (see below). |
Trunk Configuration
Response Schema
| Field |
Type |
Description |
success |
boolean |
Indicates if the operation was successful. |
message |
string |
Human-readable success message. |
data |
object |
Contains the trunk details. |
data.trunk_id |
string |
Unique identifier for the trunk (format: ST_...). |
HTTP Status Codes
| Code |
Description |
| 200 |
Success - Trunk created successfully. |
| 400 |
Bad Request - Invalid input data or mismatched configuration. |
| 401 |
Unauthorized - Invalid or missing Bearer token. |
| 500 |
Server Error - Internal server error during trunk creation. |
Example: Twilio Trunk
curl -X POST "https://api-livekit-vyom.indusnettechnologies.com/sip/create-outbound-trunk" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your_api_key>" \
-d '{
"trunk_name": "Twilio Production",
"trunk_type": "twilio",
"trunk_config": {
"address": "example.pstn.twilio.com",
"numbers": ["+15550100000"],
"username": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"password": "your_auth_token_here"
}
}'
Response:
{
"success": true,
"message": "Outbound trunk created successfully, Store the trunk id securely.",
"data": {
"trunk_id": "ST_a1b2c3d4e5f6..."
}
}
Example: Exotel Trunk
curl -X POST "https://api-livekit-vyom.indusnettechnologies.com/sip/create-outbound-trunk" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your_api_key>" \
-d '{
"trunk_name": "Exotel India",
"trunk_type": "exotel",
"trunk_config": {
"exotel_number": "+918044319240"
}
}'