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

Login
Help Center

How to Connect Asterisk to Bitcall The Complete SIP Authentication Guide for 2026

Voice & SIP Setup

How to Connect Asterisk to Bitcall The Complete SIP Authentication Guide for 2026

A complete beginner-friendly guide to connecting your Asterisk server to Bitcall using SIP username and password authentication tested and verified on Ubuntu 24.04 with Asterisk 20.

April 8, 2026

6 min read

Share:
How to Connect Asterisk to Bitcall  The Complete SIP Authentication Guide for 2026

What You Will Need


  • A VPS running Ubuntu 22.04 or 24.04 LTS.

  • An active Bitcall account: Go to panel.bitcall.io

  • Your Bitcall SIP credentials: Username, password, and domain.

  • SSH access to your server.

What Is This Article About

This guide walks you through every step of connecting an Asterisk PBX to the Bitcall cloud voice network using SIP registration. You will configure either the legacy chan_sip driver or the modern chan_pjsip driver, verify registration, set up an outbound dial plan, and place your first test call — all from the terminal. No prior Asterisk experience is required.

Phase 1: Prepare the Server [Terminal Step]

Before installing anything, make sure your server is ready.

Step 1 Connect to your server:

ssh root@your-server-ip

Step 2 Check your Ubuntu version:

lsb_release -a

You should see Ubuntu 22.04 or 24.04 LTS. Both work perfectly.

Step 3 Install basic tools:

apt install -y curl wget nano net-tools

These are small helper tools required during installation. If they are already installed, the command will simply confirm that and move on nothing will break.

Phase 2: Install Asterisk [Terminal Step]

Step 4 Install Asterisk:

apt install -y asterisk

This installs Asterisk version 20 automatically. Takes 2–5 minutes. You will see a lot of text scrolling this is normal, just wait until it finishes.

Step 5 Confirm Asterisk is running:

asterisk -rx "core show version"

You should see: Asterisk 20.x.x

Phase 3: Configure Bitcall Option A: chan_sip (sip.conf) [Terminal Step]

Use this if your system loads the legacy chan_sip module. This is the classic SIP driver that ships with Asterisk.

Step 6 Navigate to the Asterisk config folder:

cd /etc/asterisk

This is the folder that contains all Asterisk configuration files.

Step 7 Add the registration line to sip.conf:

This command automatically adds the registration line in the correct place inside the [general] section no need to open or manually edit the file:

sed -i '/^\[general\]/a register => your-bitcall-username:your-bitcall-password@your-bitcall-domain' /etc/asterisk/sip.conf

⚠️ Replace your-bitcall-username, your-bitcall-password, and your-bitcall-domain with your real Bitcall credentials from panel.bitcall.io.

Verify it was added correctly:

grep "register =>" /etc/asterisk/sip.conf

You should see your registration line in the output.

CAUTION

The register => line must be inside the [general] section of sip.conf. The sed command above handles this automatically. If you add it manually, make sure it is placed directly after [general] — if placed outside, Asterisk will silently ignore it and show "0 SIP registrations."

Step 8 Add the Bitcall peer configuration block:

Run this command to automatically append the Bitcall connection details to the end of sip.conf:

cat >> /etc/asterisk/sip.conf << 'EOF'

[bitcall]

type=peer

host=your-bitcall-domain

port=5060

username=your-username

secret=your-password

fromuser=your-username

fromdomain=your-bitcall-domain

insecure=invite

qualify=yes

dtmfmode=rfc2833

disallow=all

allow=ulaw

allow=alaw

nat=yes

canreinvite=no

EOF

⚠️ Replace your-bitcall-domain, your-bitcall-username, and your-bitcall-password with your real Bitcall credentials.

NOTE

The last line must be just EOF on its own — this tells the command "I'm done, save now." It runs instantly.

Step 9 Add the outbound dial plan to extensions.conf:

cat >> /etc/asterisk/extensions.conf << 'EOF'

[outbound-bitcall]

exten => _X.,1,Set(CALLERID(num)=your-caller-id)

same => n,Dial(SIP/${EXTEN}@bitcall,60)

same => n,Hangup()

EOF

⚠️ Replace your-caller-id with a valid Caller ID from your Bitcall account in international format — for example +33612345678.

Step 10 Reload Asterisk:

asterisk -rx "reload"

This tells Asterisk to re-read all config files. Without this step, your changes are completely ignored.

Step 11 Check registration:

asterisk -rx "sip show registry"

You should see output like this:

Host                                    Username    Refresh  State         Reg.Timeyour-bitcall-domain:5060 your-user 285 Registered Mon, 23 Mar 2026 13:05:51

1 SIP registrations.

IMPORTANT

If you see 0 SIP registrations, the most common cause is the register => line being outside the [general] section. Go back to Step 7 and double-check its placement.

Phase 4: Configure Bitcall Option B: PJSIP (pjsip.conf) [Terminal Step]

Use this if your system runs Asterisk 16 or later chan_pjsip is the modern standard for Asterisk.

IMPORTANT

Port Conflict: Only one SIP driver can use port 5060 at a time. If you decide to use PJSIP, make sure chan_sip is disabled or moved to a different port.

Step 12 Add the PJSIP configuration blocks:

Run this command to create a fresh pjsip.conf file with all required connection blocks:

cat > /etc/asterisk/pjsip.conf << 'EOF'

; === BitCall PJSIP Configuration ===

[transport-udp]

type=transport

protocol=udp

bind=0.0.0.0:5060

[bitcall]

type=registration

outbound_auth=bitcall-auth

server_uri=sip:your-bitcall-domain

client_uri=sip:your-bitcall-username@your-bitcall-domain

retry_interval=60

contact_user=your-bitcall-username

[bitcall-auth]

type=auth

auth_type=userpass

username=your-bitcall-username

password=your-bitcall-password

[bitcall-aor]

type=aor

contact=sip:your-bitcall-domain

[bitcall-endpoint]

type=endpoint

transport=transport-udp

aors=bitcall-aor

auth=bitcall-auth

context=outbound-bitcall

disallow=all

allow=ulaw

allow=alaw

outbound_auth=bitcall-auth

[bitcall-identify]

type=identify

endpoint=bitcall-endpoint

match=your-bitcall-domain

EOF

⚠️ Replace your-bitcall-domain, your-bitcall-username, and your-bitcall-password with your real Bitcall credentials.

Step 13 Add the PJSIP outbound dial plan:

cat >> /etc/asterisk/extensions.conf << 'EOF'

[outbound-bitcall]

exten => _X.,1,Set(CALLERID(num)=your-caller-id)

same => n,Dial(PJSIP/${EXTEN}@bitcall-endpoint)

same => n,Hangup() 

EOF

⚠️ Replace your-caller-id with your valid international format number.

Step 14 Restart Asterisk:

Unlike chan_sip, PJSIP transport changes (like binding to port 5060) require a full restart:

asterisk -rx "core restart now"

Step 15 Check PJSIP registration:

asterisk -rx "pjsip show registrations"

You should see output like this:

<Registration/ServerURI...>           <Auth...>           <Status...>=======================================================================

bitcall/sip:your-bitcall-domain bitcall-auth Registered

Make Your First Test Call [Terminal Step]

Now that you have configured Asterisk (via Option A or Option B), run one of these commands directly in your SSH terminal to test the connection:

For chan_sip (Option A):

asterisk -rx "channel originate SIP/bitcall/+33612345678 application Playback hello-world"

For PJSIP (Option B):

asterisk -rx "channel originate PJSIP/+33612345678@bitcall-endpoint application Playback hello-world"

⚠️ Replace +33612345678 with your mobile number.

What should happen:

  1. Your phone rings.

  2. When you answer, you hear the "hello world" audio message.

  3. This confirms that Bitcall is successfully processing your Asterisk traffic.

Troubleshooting Common Issues & Fixes

ProblemCauseSolution [Terminal Step]0 SIP registrations (chan_sip)register => line is outside [general]Check with grep "register =>" /etc/asterisk/sip.conf. Move it inside [general].SIP Registration RejectedWrong credentialsVerify your username/password from Bitcall Panel. Confirm no extra spaces or typos.Port 5060 Bind FailedTwo SIP drivers on the same portStop chan_sip first: asterisk -rx "module unload chan_sip.so".One-way audioNAT / SIP ALG issueFor chan_sip, set nat=yes. Disable SIP ALG on your router/firewall.Call disconnects quicklyMissing insecure=inviteAdd insecure=invite to your peer/endpoint configuration.Endpoint / Peer not foundName mismatch in extensions.confVerify the identifier matches your config exactly (bitcall vs bitcall-endpoint).

Quick Reference: Switching Between chan_sip and PJSIP

TIP

Since only one driver can use port 5060, use these commands for a permanent "one-click" switch.

To switch from chan_sip → PJSIP:

sed -i '/\[modules\]/a noload => chan_sip.so' /etc/asterisk/modules.conf

asterisk -rx "core restart now"

asterisk -rx "pjsip show registrations"

Then update your Dial string in extensions.conf to use PJSIP/.

To switch from PJSIP → chan_sip:

sed -i '/noload => chan_sip.so/d' /etc/asterisk/modules.conf

sed -i '/\[modules\]/a noload => res_pjsip.so' /etc/asterisk/modules.conf

asterisk -rx "core restart now"

asterisk -rx "sip show registry"

Then update your Dial string in extensions.conf back to Dial(SIP/...).

Expected Result

Asterisk shows Registered to your Bitcall domain in the status output (sip show registry or pjsip show registrations). Outbound calls route through your Bitcall trunk using your configured Caller ID. Your first test call rings your phone and plays the "hello world" message confirming end-to-end connectivity between your Asterisk server and the Bitcall cloud voice network.


Previous Post

How to Set Up Bitcall as a Carrier in Vicidial

Next Post

How to Set Up Bitcall as a SIP Trunk in 3CX

On This Page

What You Will Need

What Is This Article About

Phase 1: Prepare the Server [Terminal Step]

Phase 2: Install Asterisk [Terminal Step]

Phase 3: Configure Bitcall Option A: chan_sip (sip.conf) [Terminal Step]

Phase 4: Configure Bitcall Option B: PJSIP (pjsip.conf) [Terminal Step]

Make Your First Test Call [Terminal Step]

Troubleshooting Common Issues & Fixes

Quick Reference: Switching Between chan_sip and PJSIP

Expected Result

Still need help?

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

Contact us