Credential Authentication
Authenticate SIP traffic using username and password (digest auth).
Credential Authentication
Authenticate SIP traffic using username and password with SIP digest authentication. This method is ideal when your PBX or SBC does not have a static IP address or when you prefer credential-based security.
How It Works
- Create credentials for your trunk
- Configure your PBX/SBC to authenticate with these credentials
- TryVox's Kamailio proxy validates SIP REGISTER and INVITE messages using digest authentication
- Authenticated traffic is allowed through to the PSTN
Create Credentials
POST https://api.tryvox.io/v1/account/{account_id}/trunks/{trunk_id}/credentialsRequest Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| username | string | yes | SIP authentication username |
| password | string | yes | SIP authentication password (minimum 12 characters recommended) |
Example Request
curl -X POST https://api.tryvox.io/v1/account/acc_1a2b3c/trunks/trunk_4x5y6z/credentials \
-H "Authorization: Bearer tvx_sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"username": "pbx-prod-01",
"password": "secure_password_here_123"
}'Response
{
"id": "cred_7a8b9c",
"trunk_id": "trunk_4x5y6z",
"username": "pbx-prod-01",
"created_at": "2026-04-09T10:35:00Z"
}Note: The password is not returned in the response for security reasons.
Configure Your PBX
Once you've created credentials, configure your PBX or SBC with:
- SIP Server/Proxy:
trunk-{trunk_id}.sip.tryvox.io - Port:
5060(UDP/TCP) or5061(TLS) - Username: The username you created
- Password: The password you created
- Auth Username: Same as username
- Register: Optional (recommended for inbound calls)
List Credentials
GET https://api.tryvox.io/v1/account/{account_id}/trunks/{trunk_id}/credentialsRetrieve all credentials for a trunk.
curl https://api.tryvox.io/v1/account/acc_1a2b3c/trunks/trunk_4x5y6z/credentials \
-H "Authorization: Bearer tvx_sk_live_..."Response
{
"data": [
{
"id": "cred_7a8b9c",
"trunk_id": "trunk_4x5y6z",
"username": "pbx-prod-01",
"created_at": "2026-04-09T10:35:00Z"
},
{
"id": "cred_8c9d0e",
"trunk_id": "trunk_4x5y6z",
"username": "pbx-prod-02",
"created_at": "2026-04-09T11:00:00Z"
}
]
}Delete Credentials
DELETE https://api.tryvox.io/v1/account/{account_id}/trunks/{trunk_id}/credentials/{credential_id}Remove credentials from a trunk. Active SIP sessions using these credentials will be terminated.
curl -X DELETE https://api.tryvox.io/v1/account/acc_1a2b3c/trunks/trunk_4x5y6z/credentials/cred_7a8b9c \
-H "Authorization: Bearer tvx_sk_live_..."Security Best Practices
- Use strong passwords (minimum 12 characters, mix of letters, numbers, and symbols)
- Rotate credentials regularly
- Use unique credentials for each PBX or device
- Enable TLS (port 5061) for encrypted signaling
- Monitor authentication failures in your dashboard