How to Set Up Bitcall as a SIP Gateway in FreeSWITCH
How to Set Up Bitcall as a SIP Gateway in FreeSWITCH

A complete guide to connecting your FreeSWITCH server to Bitcall using a SIP Gateway. This configuration has been Tested & Verified using a live gateway registration on Ubuntu 24.04 (via Docker).
What You Will Need
A working FreeSWITCH installation
Your Bitcall SIP credentials: username, password, and domain
Access to the FreeSWITCH configuration directory (usually
/etc/freeswitch/)
Pre-flight Check Detect Port Conflicts
Since multiple VoIP services (Asterisk, 3CX, FreeSWITCH) use Port 5060, run this command first to ensure the port is free:
ss -ulnp | grep 5060If you see output, another service is using the port. Stop it before continuing (e.g., systemctl stop asterisk).
Step 1 : Create the Bitcall Gateway File [Terminal Step]
Run this command to automatically create the gateway configuration file:
cat > /etc/freeswitch/sip_profiles/external/bitcall.xml << 'EOF'
<include>
<gateway name="bitcall">
<param name="username" value="your-username"/>
<param name="password" value="your-password"/>
<param name="realm" value="your-bitcall-domain"/>
<param name="proxy" value="your-bitcall-domain"/>
<param name="register" value="true"/>
<param name="expire-seconds" value="600"/>
<param name="retry-seconds" value="30"/>
</gateway>
</include>EOF
⚠️ Replace your-username and your-password with your real Bitcall credentials.
Step 2 : Configure the Outbound Dialplan [Terminal Step]
Run this command to create a dedicated dialplan file for outbound calls:
cat > /etc/freeswitch/dialplan/default/01_bitcall.xml << 'EOF'
<include>
<extension name="bitcall_outbound">
<condition field="destination_number" expression="^(\d+)$">
<action application="set" data="effective_caller_id_number=your-caller-id"/>
<action application="bridge" data="sofia/gateway/bitcall/$1"/>
</condition>
</extension>
</include>EOF
⚠️ Replace your-caller-id with your valid Bitcall Caller ID.
Step 3 : Apply Changes and Verify [Terminal Step]
Connect to the FreeSWITCH console:
fs_cliReload the Sofia (SIP) profile:
sofia profile external rescanCheck the registration status:
sofia status gateway bitcallYou should see:
State:
REGED(Registered) ✅
Switching Between Asterisk and FreeSWITCH
Because both Asterisk and FreeSWITCH want to use Port 5060, you cannot run both at exactly the same time. Use these commands to switch between them:
To Use FreeSWITCH (Stop Asterisk):
systemctl stop asterisk
systemctl start freeswitchTo Use Asterisk (Stop FreeSWITCH):
systemctl stop freeswitch
systemctl start asteriskExpected Result
The FreeSWITCH console shows the gateway as REGED. You can now bridge calls through the Bitcall gateway using simple XML dialplan rules.
Make Your First Test Call [Terminal Step]
Now that the Bitcall gateway is registered, test an outbound call directly from the SSH terminal:
Enter the console (if not already there):
fs_cliRun the originate command:
originate sofia/gateway/bitcall/YOUR-MOBILE-NUMBER &playback(hello-world)⚠️ Replace
+33612345678with your mobile number in international format.
What should happen:
Your phone rings.
When you answer, you hear the "hello world" message.
This confirms that Bitcall is successfully processing your FreeSWITCH traffic.
📸 SCREENSHOT — Terminal showing the 'originate' command result
Troubleshooting
State: FAIL_WAIT: Check your Bitcall username/password and ensure your server can reach the
gateway.bitcall.iodomain.State: NOREGS: Registration is disabled. Ensure the parameter
<param name="register" value="true"/>is set in your XML.Port Conflict: If FreeSWITCH fails to start, check if another service is using the port:
ss -ulnp | grep 5060.
How to Set Up Bitcall with Asterisk Using IP Authentication
How to Set Up Bitcall as a Carrier in Vicidial