How to Set Up Bitcall with Asterisk Using IP Authentication
How to Set Up Bitcall with Asterisk Using IP Authentication

A complete guide to connecting your Asterisk server to Bitcall using IP-to-IP Authentication. This is the professional standard for servers with a fixed public IP it’s faster, more stable, and doesn’t require SIP passwords or registration lines.
What You Will Need
A VPS with a Static Public IP
An active Bitcall account panel.bitcall.io
SSH access to your server
Phase 1 : Whitelist your Server IP [Browser Step]
Before configuring Asterisk, you must tell Bitcall to trust your server's IP address.
Log in to panel.bitcall.io.
Go to IP Authentication in the sidebar.
Click Add IP.
Enter your server's Public IP (e.g.,
YOUR-SERVER-IP).Click Save.
Phase 2 : Choose Your Driver [Terminal Step]
Option A : chan_sip Configuration (sip.conf)
Use this for older Asterisk versions or simple setups.
Steps:
Clear old registration lines: Run this command to remove any existing registration from
sip.confto avoid conflicts:sed -i '/register =>/d' /etc/asterisk/sip.confAppend the peer block: Run this command to add the Bitcall IP block to the end of
sip.conf:
cat >> /etc/asterisk/sip.conf << 'EOF'
[bitcall-ip]
type=peer
host=gateway-ip-here
context=from-bitcall
insecure=invite
qualify=yes
disallow=all
allow=ulaw
allow=alaw
nat=yesEOF
⚠️ Replace gateway-ip-here with the Bitcall gateway IP provided in your panel.
Reload Asterisk:
asterisk -rx "reload"Verify:
asterisk -rx "sip show peers"You should see
bitcall-ipwith status OK.
Option B : PJSIP Configuration (pjsip.conf)
Use this for Asterisk 16+ (the modern standard).
Steps:
Add PJSIP blocks: Run this command to append the IP-to-IP blocks to
pjsip.conf:
cat >> /etc/asterisk/pjsip.conf << 'EOF'
; === BitCall IP-to-IP Configuration ===
[bitcall-endpoint-ip]
type=endpoint
transport=transport-udp
aors=bitcall-aor-ip
context=from-bitcall
disallow=all
allow=ulaw
allow=alaw
[bitcall-aor-ip]
type=aor
contact=sip:gateway-ip-here
[bitcall-identify-ip]
type=identify
endpoint=bitcall-endpoint-ip
match=gateway-ip-hereEOF
⚠️ Replace gateway-ip-here with the Bitcall gateway IP.
Restart Asterisk:
asterisk -rx "core restart now"Verify:
asterisk -rx "pjsip show endpoints"You should see
bitcall-endpoint-ipin status Not in use (Available).
TIP
To switch between chan_sip and PJSIP for IP-to-IP: Use the same noload commands in modules.conf as described in Article 1. The underlying logic is the same.
Expected Result
Asterisk sends calls directly to Bitcall without needing a login. Bitcall recognizes your server by its IP and routes the call instantly.
Make Your First Test Call [Terminal Step]
Since there is no "Registration" (State: Registered) for IP-to-IP, you test by making a call directly from the SSH terminal:
# For chan_sip (Option A):
asterisk -rx "channel originate SIP/bitcall-ip/YOUR-MOBILE-NUMBER application Playback hello-world"
# For PJSIP (Option B):
asterisk -rx "channel originate PJSIP/YOUR-MOBILE-NUMBER@bitcall-endpoint-ip application Playback hello-world"⚠️ Replace YOUR-MOBILE-NUMBER with your actual phone number.
Troubleshooting
Call Rejected (403 Forbidden): Ensure your Server IP is correctly added to the IP Authentication section in the Bitcall panel.
Peer Status: UNKNOWN: Check the
host=orcontact=IP address. Ensure your server firewall allows traffic on UDP Port 5060.One-way audio: Double-check NAT settings in your config files.
Switching Drivers: See our Credentials Guide for the one-click
sedcommands to switch between chan_sip and PJSIP safely.
No previous post
How to Set Up Bitcall as a SIP Gateway in FreeSWITCH