Run a single command on your server and our setup script handles everything automatically — SIP config, firewall rules, codec settings, and more.
bash <(curl -sSL https://autodialer.center/setup.sh)
Run this on your Magnus/Asterisk server as root. Prefer to inspect first? Download the script and review it before running.
Make sure you have the following before running the setup.
A running Magnus Billing installation with Asterisk (chan_sip). VPS or dedicated server.
You need root (or sudo) SSH access to your server to run the setup script.
Your server must have a static public IP. The script will detect it automatically.
Your Magnus SIP users (extensions) should already be created before testing calls.
Open a terminal and SSH into your Magnus server as root.
On Windows: use PuTTY or Windows Terminal. On Mac / Linux: use the built-in Terminal app.
# Replace with your actual server IP address
ssh root@YOUR_SERVER_IP
If you normally log in with a non-root user, switch to root first:
sudo su -
Copy and paste the command below into your server terminal and press Enter.
bash <(curl -sSL https://autodialer.center/setup.sh)
The script will ask you a few questions interactively (Janus server IP, your server's public IP, RTP port range). The defaults are pre-filled — just press Enter to accept them.
If you prefer to download the script first, then upload and run it manually.
# Download the script to your server
wget -O /tmp/setup.sh https://autodialer.center/setup.sh
# Make it executable
chmod +x /tmp/setup.sh
# Review it (optional)
cat /tmp/setup.sh
# Run it
bash /tmp/setup.sh
# Run this from your local machine (not the server)
scp setup.sh root@YOUR_SERVER_IP:/tmp/setup.sh
# Then SSH in and run it
ssh root@YOUR_SERVER_IP "bash /tmp/setup.sh"
The script makes targeted changes to your server — nothing destructive. It creates backups first.
Creates a timestamped backup of sip.conf and rtp.conf in /etc/asterisk/backup_dialer_*/ before making any changes.
Sets directmedia=no, nat=yes, canreinvite=no, your server's public IP as externip, and enables codecs ulaw/alaw/g722. Also disables RTP timeout to prevent call drops.
Creates a [janus-dialer] peer block pointing to CellHub's Janus gateway IP with insecure=port,invite so calls from the WebRTC bridge are accepted.
Sets rtpstart and rtpend in rtp.conf so Asterisk uses the correct port range for media streams.
Adds UFW or iptables rules to allow SIP (UDP/TCP 5060) and RTP traffic only from CellHub's Janus IP — not from the open internet.
Runs asterisk -rx "sip reload" so all changes take effect immediately without a full restart.
Run these commands on your server to confirm everything is working correctly.
Check registered SIP peers (look for Janus gateway):
asterisk -rx "sip show peers"
Enable SIP debug to watch call traffic in real time:
asterisk -rx "sip set debug on"
Watch Asterisk console for incoming registrations:
asterisk -rvvv
Confirm firewall rules were applied (iptables):
iptables -L INPUT -n | grep 5060
Common issues and how to fix them.
asterisk -rx "sip set debug on" and watch for 401/403 errorsinsecure=port,invite is in the [janus-dialer] section of sip.confdirectmedia=no is set — audio must flow through Janus, not directlyasterisk -rx "rtp set debug on" to inspect RTP flowrtptimeout=0 is set in sip.conf (the script sets this)/etc/asterisk/sip.conf and /usr/local/asterisk/etc/asterisk/sip.confWe're available on Telegram to walk you through the installation step by step.