PBX Integration Guides
Whsipder installs transparently in front of your PBX. The only change required is moving your PBX's SIP listener from port 5060 to port 5080 so the edge node can bind to 5060. No trunk reconfiguration, no carrier coordination, no changes to your dialplan or routing rules.
The install.sh script auto-detects your PBX type and performs these changes automatically. These guides are for reference, manual installation, or troubleshooting.
Asterisk / FreePBX
Asterisk is the most common PBX and is auto-detected by the installer. The configuration changes depend on which SIP channel driver you use (PJSIP or chan_sip).
PJSIP (Asterisk 13+, default in 16+)
The installer modifies the PJSIP transport bind address from port 5060 to 5080. For raw Asterisk installations, it edits pjsip.conf directly:
; /etc/asterisk/pjsip.conf
; Change the transport bind port from 5060 to 5080
[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0:5080 ; was 0.0.0.0:5060FreePBX
FreePBX manages Asterisk configuration through its own database and regenerates config files. Editing pjsip.conf directly will be overwritten. Instead, the installer creates a custom override file and updates the FreePBX SIP port setting:
# Create PJSIP custom override
cat > /etc/asterisk/pjsip_custom.conf << 'EOF'
[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0:5080
EOF
# Update FreePBX internal setting
fwconsole setting SIP_PORT 5080
# Reload
fwconsole reloadFreePBX firewall module: If you use the FreePBX firewall module, update its SIP port setting to 5080 as well, or it may block Drachtio's forwarded traffic. Navigate to Connectivity > Firewall > Advanced > Services and update the SIP port.
chan_sip (legacy)
If your Asterisk installation still uses chan_sip instead of PJSIP, the bind port is set via the bindport directive:
; /etc/asterisk/sip.conf
[general]
bindport = 5080 ; was 5060
bindaddr = 0.0.0.0After editing, reload the SIP module:
asterisk -rx "sip reload"FreeSwitch
FreeSwitch uses Sofia SIP profiles. The external profile (which handles inbound trunk calls) needs its port changed from 5060 to 5080. The internal profile (for extensions) typically runs on 5060 as well and should also be moved.
<!-- /etc/freeswitch/sip_profiles/external.xml -->
<profile name="external">
<settings>
<!-- Change from 5060 to 5080 -->
<param name="sip-port" value="5080"/>
</settings>
</profile>If you also have an internal profile on 5060, update it as well (e.g., to 5082):
<!-- /etc/freeswitch/sip_profiles/internal.xml -->
<profile name="internal">
<settings>
<param name="sip-port" value="5082"/>
</settings>
</profile>Restart the Sofia profiles without a full FreeSwitch restart:
fs_cli -x "sofia profile external restart"
fs_cli -x "sofia profile internal restart"Tip: Verify the port change took effect withfs_cli -x "sofia status". The external profile should showsip:mod_sofia@YOUR_IP:5080.
Kamailio
Kamailio requires a manual port change. The installer detects Kamailio but does not auto-modify its configuration due to the wide variety of deployment patterns. Update thelisten directive in your Kamailio configuration:
# /etc/kamailio/kamailio.cfg
# Change SIP listen port from 5060 to 5080
listen = udp:0.0.0.0:5080
listen = tcp:0.0.0.0:5080If you use #!define macros for the port, update the macro instead:
#!define SIP_PORT 5080Restart Kamailio:
systemctl restart kamailioDispatcher module: If you use Kamailio as a load balancer with the dispatcher module, ensure any dispatch targets that reference port 5060 are also updated. Check dispatcher.list or the database table for stale entries.
Generic SIP Server
Whsipder works with any SIP server or proxy that can be configured to listen on a port other than 5060. The only requirement is that your SIP server accepts INVITEs forwarded from the edge node (which runs on localhost by default, or on a separate host if configured).
What you need to do
- Change your SIP server's listen port from 5060 to 5080 (or any available port)
- Ensure it accepts traffic from the edge node's IP (127.0.0.1 if co-located)
- Update
edge.yamlwith the correctpbx.addressandpbx.port
# edge.yaml
pbx:
address: "127.0.0.1" # or remote PBX IP
port: 5080 # your PBX SIP portRemote PBX (separate host)
If the PBX runs on a different server, set pbx.address to the PBX's IP address. The edge will forward INVITEs over the network. Ensure the PBX firewall allows SIP from the edge server's IP, and that RTP media ports are also reachable between the two hosts.
# edge.yaml — remote PBX example
pbx:
address: "10.0.1.50" # PBX on separate host
port: 5060 # PBX can keep 5060 if on a different IPTip: When the PBX is on a separate host, it can keep port 5060 since there is no conflict with the edge node. You only need to change the PBX port when it runs on the same server as the edge.
Verifying the Integration
After reconfiguring your PBX, verify the port change and call flow:
# Confirm your PBX is listening on 5080
ss -ulnp | grep 5080
# Confirm Drachtio (edge) is listening on 5060
ss -ulnp | grep 5060
# Send a SIP OPTIONS ping to the edge
sipsak -vv -s sip:[email protected]Place a test call from an external carrier or SIP phone. The call should arrive at port 5060 (handled by Drachtio), get scored by the edge engine, and then be forwarded to port 5080 (your PBX). In the dashboard Live Feed, you should see the call with its scoring breakdown.