📢 No Limits. No Restrictions! The Cheapest Calling Rates—Guaranteed!

Login
Help Center

Connect Dograh to Bitcall (Outbound Calling via Asterisk)

AI Voice Agents

Connect Dograh to Bitcall (Outbound Calling via Asterisk)

Use Bitcall as the outbound SIP trunk for a self-hosted Dograh voice agent. Dograh connects through your Asterisk PBX (ARI); Asterisk carries the call over Bitcall.

June 4, 2026

6 min read

Share:
Connect Dograh to Bitcall (Outbound Calling via Asterisk)

Before you begin

💡 Heads-up: Bitcall is outbound-only today. Dograh is self-hosted, and it connects to a SIP carrier through your own Asterisk PBX (the Asterisk ARI provider). So this guide covers outbound AI calling: Dograh → your Asterisk → Bitcall → the phone network. Inbound numbers (DIDs) are coming soon.


"You self-host Dograh. Asterisk is the middle layer. Bitcall is the cheap, global dial tone out." 🤖🔧📞

🧩 How it fits together

Dograh (ARI + external media/WebSocket)  ⇄  your Asterisk PBX  ⇄  Bitcall SIP trunk  ⇄  PSTN

Dograh drives your Asterisk over the Asterisk REST Interface (ARI) and streams audio over a WebSocket. Asterisk places the actual call out through a SIP trunk — and that trunk is Bitcall.


🧰 What You'll Need

  • A self-hosted Dograh instance (Docker Compose) that's reachable from your Asterisk box
  • An Asterisk server — Asterisk 22+, or 20 LTS — with the chan_websocket and res_websocket_client modules and ARI enabled
  • A Bitcall SIP account (username + password) — see Set Up Your First SIP Account
  • An outbound Caller ID (CLI) you're allowed to present
  • A little Bitcall balance (prepaid)

☎️ Step 1: Add Bitcall as a SIP Trunk in Asterisk

Configure a PJSIP trunk from Asterisk to Bitcall, then a dialplan that sends outbound calls out through it. The full trunk setup is here:

Use these Bitcall values:

Setting Value
SIP server / host gateway.bitcall.io
Port 5060
Auth SIP username/password (or Trusted IP)

⚠️ Codec must include ulaw. Dograh's external-media audio is G.711 μ-law, so your Bitcall PJSIP trunk endpoint must allow it — set allow=ulaw on the endpoint. A codec mismatch is the #1 cause of "connected but no audio."


🔌 Step 2: Enable ARI + External Media in Asterisk (for Dograh)

These are the Dograh-specific Asterisk bits. (Full reference: Dograh's official Asterisk ARI guide.)

ari.conf — create the ARI user Dograh authenticates with:

[general]
enabled = yes

[dograh]
type = user
read_only = no
password = your_secure_password

http.conf — ARI needs the HTTP server on:

[general]
enabled = yes
bindaddr = 0.0.0.0
bindport = 8088

extensions.conf — route calls into the Stasis app:

[from-external]
exten => _X.,1,NoOp(Incoming call to ${EXTEN})
 same => n,Stasis(dograh)
 same => n,Hangup()

websocket_client.conf — external-media stream to your Dograh host (self-hosted shown):

[dograh]
type = websocket_client
uri = ws://your-dograh-host:port/api/v1/telephony/ws/ari
protocols = media

(Dograh Cloud uses wss://api.dograh.com/api/v1/telephony/ws/ari with tls_enabled = yes.)

Reload from the Asterisk CLI:

ari reload
dialplan reload
module reload res_websocket_client.so
core reload      # for http.conf changes

The section name dograh in ari.conf is your Stasis App Name; the section name in websocket_client.conf is your WebSocket Client Name. You'll enter both in Dograh next — keep them matching.


🖥️ Step 3: Add the Asterisk ARI Provider in Dograh

  1. In Dograh, go to /telephony-configurationsAdd configuration → select Asterisk ARI.
  2. Fill in:
Field Value
ARI Endpoint URL http://your-asterisk-host:8088
Stasis App Name dograh (matches ari.conf)
App Password your ari.conf password
WebSocket Client Name dograh (matches websocket_client.conf)
From Extensions your outbound origination, e.g. PJSIP/6001 or 6001
  1. Save, then add your SIP extension(s) as phone numbers, and mark this configuration as the default outbound so campaigns and test calls use it.

🎭 Step 4: Set Your Caller ID (CLI)

Set the caller ID for outbound calls in your Asterisk trunk/dialplan. Caller-ID behavior depends on the destination country and operator rules — details here: Change or Manage Your Caller ID.


🚀 Step 5: Place a Test Outbound Call

Create a test workflow in Dograh and trigger an outbound call. The path: Dograh → Asterisk (ARI) → Bitcall trunk → PSTN. 🎉


🛠️ Troubleshooting Table

Problem Likely cause & fix
Dograh can't connect to ARI http.conf not enabled, port 8088 blocked, or res_ari not loaded (module show like res_ari).
ARI authentication failed Stasis App Name / App Password don't match ari.conf (watch for stray spaces).
Connected but no audio chan_websocket not loaded, wrong websocket_client.conf URI, WebSocket Client Name mismatch — or your Bitcall trunk doesn't allow=ulaw.
Outbound call never reaches the PSTN Asterisk dialplan/trunk to Bitcall isn't routing the call; check the trunk, your balance, and that the route is enabled.
Call drops after ~30–60 seconds RTP inactivity during the agent's thinking gaps → enable RTP keepalives, raise the RTP timeout. See AI voice calls dropping after 30 seconds.
Caller ID wrong / missing CLI rules vary by destination. See Change or Manage Your Caller ID.

🧠 TL;DR Recap

✅ Add Bitcall as a PJSIP trunk in Asterisk — gateway.bitcall.io:5060, allow=ulaw ✅ Enable ARI + HTTP + external media in Asterisk (Stasis app dograh) ✅ Add the Asterisk ARI provider in Dograh with matching names + From Extensions ✅ Set Caller ID, mark default outbound, place a test call ☕


Related: SIP trunking for AI voice agents (full explainer) · AI voice calls dropping after 30 seconds · Configure IP-to-IP SIP Trunk with Asterisk


Previous Post

Connect Retell to Bitcall (Outbound SIP Trunk)

Next Post

Connect Bland AI to Bitcall (Outbound SIP Trunk)

On This Page

Before you begin

🧩 How it fits together

🧰 What You'll Need

☎️ Step 1: Add Bitcall as a SIP Trunk in Asterisk

🔌 Step 2: Enable ARI + External Media in Asterisk (for Dograh)

🖥️ Step 3: Add the Asterisk ARI Provider in Dograh

🎭 Step 4: Set Your Caller ID (CLI)

🚀 Step 5: Place a Test Outbound Call

🛠️ Troubleshooting Table

🧠 TL;DR Recap

Still need help?

Can't find what you're looking for? Our support team is here to help.

Contact us