Skip to main content

Configure IP-to-IP SIP Trunk with Asterisk

Learn how to configure a direct IP-authenticated SIP trunk between your Asterisk server and Bitcall, without using SIP credentials.

Written by Alex


“No password? No problem. Let your IP do the talking.”

If you’ve added your server’s public IP in the Bitcall panel, you can set up a direct SIP trunk without credentials.


🧰 What You’ll Need

⚠️ Your IP must be static and public (not behind NAT) for this to work properly.


🔧 Step-by-Step (chan_sip)

1. SSH into your server

ssh root@your-server-ip


2. Open

sip.conf

nano /etc/asterisk/sip.conf

Add the following at the bottom:

[bitcall-ip]
type=peer
host=gateway.bitcall.io
port=5060
context=outbound-bitcall
insecure=invite
dtmfmode=rfc2833
disallow=all
allow=ulaw
allow=alaw
canreinvite=no
nat=no
qualify=yes

📸 [Insert screenshot: sip.conf IP-auth peer config]


3. Open

extensions.conf

nano /etc/asterisk/extensions.conf

Add this to define your outbound dial context:

[outbound-bitcall]
exten => _X.,1,Set(CALLERID(num)=your-callerid)
same => n,Dial(SIP/${EXTEN}@bitcall-ip,60)
same => n,Hangup()

⚠️ Replace your-callerid with a valid CLI registered in Bitcall.

📸 [Insert screenshot: extensions.conf with outbound context]


4. Reload Asterisk

asterisk -rx "reload"

And check your console:

asterisk -rvvv

You won’t see “Registered” (since IP-auth doesn’t use REGISTER), but you’re now ready to make outbound calls.


🧪 Testing a Call

From a SIP phone or softphone connected to Asterisk:

Dial an external number:

+12025550123

It should route through your bitcall-ip trunk — and start ringing. 🎉


🛡️ Securing IP Trunks

Since there’s no password, anyone spoofing your IP can use your trunk (and your money).

To protect it:

  • ✅ Only allow calls to trusted destinations

  • ✅ Use a firewall to allow SIP traffic only to gateway.bitcall.io

  • ✅ Enable IP access control if using a GUI panel like FreePBX

Example (firewalld or iptables):

iptables -A INPUT -p udp -s 188.34.143.144 --dport 5060 -j ACCEPT


💡 Alternative: Use Bitcall’s IP Directly

If DNS fails or latency is critical, use:

host=188.34.143.144

Instead of gateway.bitcall.io


🧠 TL;DR Recap

✅ Add your public IP to Bitcall panel  
✅ Configure sip.conf with no username/password
✅ Add outbound rules in extensions.conf
✅ Reload and start calling
❗ Use firewall rules to secure it!


Did this answer your question?