TryVox

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

  1. Create credentials for your trunk
  2. Configure your PBX/SBC to authenticate with these credentials
  3. TryVox's Kamailio proxy validates SIP REGISTER and INVITE messages using digest authentication
  4. Authenticated traffic is allowed through to the PSTN

Create Credentials

POST https://api.tryvox.io/v1/account/{account_id}/trunks/{trunk_id}/credentials

Request Parameters

ParameterTypeRequiredDescription
usernamestringyesSIP authentication username
passwordstringyesSIP 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) or 5061 (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}/credentials

Retrieve 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

On this page