curl --request POST \
--url https://api.topcalls.ai/v1/phone-numbers/carriers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"carrier_name": "My VoIP Provider",
"trunk_type": "static_ip",
"sip_gateway": {
"ipv4": "sip.myprovider.com",
"port": 5060,
"inbound": true,
"outbound": true
}
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voip_carrier_sid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sip_gateway_sid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"carrier_name": "<string>",
"trunk_type": "static_ip",
"created_at": "2023-11-07T05:31:56Z"
}Add a custom SIP carrier (Bring Your Own Carrier).
Trunk Types:
static_ip - IP-based authentication (default). Your carrier whitelists TopCalls SBC IP.auth - Credential-based inbound authentication. Requires inbound_auth object.reg - SIP registration. Requires registration object.curl --request POST \
--url https://api.topcalls.ai/v1/phone-numbers/carriers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"carrier_name": "My VoIP Provider",
"trunk_type": "static_ip",
"sip_gateway": {
"ipv4": "sip.myprovider.com",
"port": 5060,
"inbound": true,
"outbound": true
}
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"voip_carrier_sid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sip_gateway_sid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"carrier_name": "<string>",
"trunk_type": "static_ip",
"created_at": "2023-11-07T05:31:56Z"
}Use Authorization: Bearer tc_live_xxxxx
Display name for the carrier
1 - 100Show child attributes
SIP trunk authentication type:
static_ip - IP-based authentication (default)auth - Credential-based inbound authenticationreg - SIP registrationstatic_ip, auth, reg Required when trunk_type is 'reg'
Show child attributes
Required when trunk_type is 'auth'
Show child attributes
Carrier created successfully
Carrier record ID
Account UUID
Carrier UUID (for use in phone number provisioning)
SIP gateway UUID
Display name
static_ip, auth, reg