Most people assume that to build a voice bot you need a phone number. Buy a DID, wire it to your IVR, handle the calls. That's the traditional path.
But what if you don't need a phone number at all?
VoIPBin supports Direct Hash SIP URIs — a way to connect callers directly to an AI voice agent using a SIP address instead of a phone number. No number purchase, no DID provisioning, no carrier dependency.
What Is a Direct Hash SIP URI?
A Direct Hash SIP URI looks like this:
sip:direct.<12-hex-chars>@sip.voipbin.net
For example:
sip:direct.a3f9c12b4e87@sip.voipbin.net
The 12-character hex string is derived from your agent's ID. Anyone with a SIP-capable client — softphone, WebRTC gateway, another SIP server — can call this URI and reach your AI agent directly.
No phone number. No carrier. Just SIP.
Why This Matters
Traditional approach:
- Buy a phone number ($1–5/month per number)
- Associate it with your app
- Wait for provisioning
- Handle PSTN ingress costs
Direct Hash SIP approach:
- Create an agent
- Derive the SIP URI from the agent ID
- Share it with callers — done
This is especially useful for:
- Internal tools — employee-facing voice bots that don't need a public number
- B2B integrations — connect two SIP systems directly without PSTN
- Dev/test environments — avoid burning real numbers during development
- WebRTC apps — connect browser-based callers through a SIP gateway
Step 1: Sign Up and Get an Access Key
curl -s -X POST "https://api.voipbin.net/v1.0/auth/signup" \
-H "Content-Type: application/json" \
-d '{
"name": "My Agent",
"email": "you@example.com",
"password": "secure-password"
}'
# Returns: { "accesskey": { "token": "your-access-key" } }
The token value is your accesskey — append it as ?accesskey=<token> to all API calls.
Step 2: Create an AI Agent
curl -s -X POST "https://api.voipbin.net/v1.0/agents?accesskey=<your-token>" \
-H "Content-Type: application/json" \
-d '{
"name": "voice-assistant",
"detail": "You are a helpful voice assistant. Answer questions concisely.",
"engine_type": "openai",
"engine_model": "gpt-4o"
}'
Response:
{
"id": "a3f9c12b-4e87-4a2c-9f31-d0e1b8c72a5f",
"name": "voice-assistant",
"detail": "You are a helpful voice assistant..."
}
Hold on to that id — you'll derive the SIP URI from it.
Step 3: Derive the Direct Hash SIP URI
The Direct Hash is the first 12 hex characters of the agent's UUID (dashes removed):
def get_direct_hash_uri(agent_id: str) -> str:
hex_id = agent_id.replace("-", "")[:12]
return f"sip:direct.{hex_id}@sip.voipbin.net"
# Example
agent_id = "a3f9c12b-4e87-4a2c-9f31-d0e1b8c72a5f"
print(get_direct_hash_uri(agent_id))
# sip:direct.a3f9c12b4e87@sip.voipbin.net
Same logic in Go — using the VoIPBin Go SDK:
package main
import (
"fmt"
"strings"
)
func getDirectHashURI(agentID string) string {
hexID := strings.ReplaceAll(agentID, "-", "")
if len(hexID) > 12 {
hexID = hexID[:12]
}
return fmt.Sprintf("sip:direct.%s@sip.voipbin.net", hexID)
}
func main() {
agentID := "a3f9c12b-4e87-4a2c-9f31-d0e1b8c72a5f"
fmt.Println(getDirectHashURI(agentID))
// sip:direct.a3f9c12b4e87@sip.voipbin.net
}
Step 4: Call the URI
Dial the SIP URI from any SIP-capable client (Linphone, Zoiper, Bria, etc.):
sip:direct.a3f9c12b4e87@sip.voipbin.net
VoIPBin routes the inbound call to your AI agent. The agent handles STT, LLM inference, and TTS — your code never sees raw audio.
You can also trigger a programmatic two-leg call using the Calls API:
curl -s -X POST "https://api.voipbin.net/v1.0/calls?accesskey=<your-token>" \
-H "Content-Type: application/json" \
-d '{
"source": "sip:caller@yourdomain.com",
"destinations": [
{
"type": "sip",
"target": "sip:direct.a3f9c12b4e87@sip.voipbin.net"
}
]
}'
This lets you bridge an external SIP endpoint into your AI agent on demand.
Bonus: Use the VoIPBin MCP Server
If you work with Claude Code or Cursor, the fastest way to experiment is the VoIPBin MCP server:
uvx voipbin-mcp
Then prompt Claude:
"Create a VoIPBin agent and give me its Direct Hash SIP URI"
The MCP server exposes the full VoIPBin API surface, so you can create agents, make calls, and manage flows entirely through natural language — no curl required.
Phone Number vs. Direct Hash: When to Use Which
| Direct Hash SIP URI | Phone Number (DID) | |
|---|---|---|
| Cost | Free | ~$1-5/month |
| Caller type | SIP / WebRTC clients | Any phone (PSTN) |
| Setup time | Instant | Minutes to hours |
| Best for | Internal, B2B, dev/test | Consumer-facing |
| PSTN access | No | Yes |
Use Direct Hash when your callers are already SIP-capable. Use a real number when you need to reach regular phones or mobile.
Wrapping Up
Direct Hash SIP URIs are a simple but underappreciated feature:
- No phone number purchase required
- URI derived instantly from the agent ID
- Works with any SIP client or WebRTC gateway
- Zero carrier cost, zero provisioning delay
For internal tooling, developer environments, or B2B voice integrations, this is the cleanest way to deploy an AI voice bot without the overhead of phone number management.
Resources
Top comments (0)