Create Origination URI

Add a new SIP destination endpoint for outbound call routing.

This API creates a new origination URI (SIP destination) for routing outbound calls from your trunk. The URI must be a valid SIP endpoint in the format sip:user@host:port orsip:host:port.

Valid SIP URI Formats:

  • sip:provider@sip.example.com:5060 - Domain with user
  • sip:192.168.1.100:5060 - IP address
  • sip:trunk@sip.carrier.net:5061 - Custom port

Invalid Formats:

  • http://sip.example.com - Wrong protocol
  • provider@sip.example.com:5060 - Missing sip: prefix
  • sip:example.com - Missing port number

HTTP Request

POSThttps://api.vobiz.ai/api/v1/account/{account_id}/origination-uris

Authentication Required:

  • X-Auth-ID: Your account ID (e.g., {Auth_ID})
  • X-Auth-Token: Your account Auth Token
  • Content-Type: application/json

Request Parameters

Request Parameters

NameTypeDescription
uriRequired
stringSIP URI destination in format sip:user@host:port or sip:host:port. Must be a valid, reachable SIP endpoint. Examples: sip:provider@sip.example.com:5060, sip:192.168.1.100:5060
priority
integerRouting priority (lower = higher priority). Default: 1. Use priority 1 for primary routes, priority 2 for backup/failover routes.
weight
integerLoad balancing weight. Default: 10. Higher values receive proportionally more traffic among URIs with the same priority. Example: weight 20 gets 2x traffic vs weight 10.
enabled
booleanWhether the URI is active for routing. Default: true. Set to false to temporarily disable without deleting.

Response

Returns the complete origination URI object including the auto-generated id UUID and timestamps.

Response - 201 Created
{
  "id": "e1f2a3b4-c5d6-7890-efab-567890123456",

  "uri": "sip:provider@sip.example.com:5060",
  "priority": 1,
  "weight": 10,
  "enabled": true,
  "created_at": "2025-01-22T12:00:15Z",
  "updated_at": "2025-01-22T12:00:15Z"
}

Examples

cURL - Primary Origination URI

cURL Request
curl -X POST https://api.vobiz.ai/api/v1/account/{Auth_ID}/origination-uris \
  -H "X-Auth-ID: YOUR_AUTH_ID" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "uri": "sip:provider@sip.example.com:5060",
    "priority": 1,
    "weight": 10,
    "enabled": true
  }'

cURL - Failover URI with Lower Priority

cURL Request
curl -X POST https://api.vobiz.ai/api/v1/account/{Auth_ID}/origination-uris \
  -H "X-Auth-ID: YOUR_AUTH_ID" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "uri": "sip:backup@sip-backup.example.com:5060",
    "priority": 2,
    "weight": 10,
    "enabled": true
  }'

cURL - Load Balancing Configuration

Create two URIs with the same priority but different weights for 70/30 traffic split:

cURL Request - Primary (70% traffic)
curl -X POST https://api.vobiz.ai/api/v1/account/{Auth_ID}/origination-uris \
  -H "X-Auth-ID: YOUR_AUTH_ID" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "uri": "sip:server1@sip.example.com:5060",
    "priority": 1,
    "weight": 70
  }'
cURL Request - Secondary (30% traffic)
curl -X POST https://api.vobiz.ai/api/v1/account/{Auth_ID}/origination-uris \
  -H "X-Auth-ID: YOUR_AUTH_ID" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "uri": "sip:server2@sip.example.com:5060",
    "priority": 1,
    "weight": 30
  }'

Error Response (400 Bad Request): If SIP URI format is invalid:

Error Response - 400 Bad Request
{
  "error": "Invalid SIP URI format. Expected: sip:user@host:port",
  "code": 400
}

Best Practices:

  • • Configure at least 2 origination URIs for redundancy (one primary, one failover)
  • • Use priority 1 for primary destinations, priority 2 for backup/failover
  • • Adjust weights to distribute load across multiple carriers or servers
  • • Test connectivity to each URI before enabling in production