✅ Official Setup Guide — Magnus / Asterisk

Connect Your Magnus Server
in Under 5 Minutes

Run a single command on your server and our setup script handles everything automatically — SIP config, firewall rules, codec settings, and more.

⚡ One-Command Install
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.

1

Before You Begin — Requirements

Make sure you have the following before running the setup.

💻

Magnus Billing Server

A running Magnus Billing installation with Asterisk (chan_sip). VPS or dedicated server.

🔒

SSH Root Access

You need root (or sudo) SSH access to your server to run the setup script.

🌎

Public IP Address

Your server must have a static public IP. The script will detect it automatically.

📡

SIP Accounts Ready

Your Magnus SIP users (extensions) should already be created before testing calls.

2

Connect to Your Server via SSH

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.

TERMINAL
# Replace with your actual server IP address
ssh root@YOUR_SERVER_IP

💡 Using a non-root user?

If you normally log in with a non-root user, switch to root first:

BASH
sudo su -
3

Run the Setup Script

Copy and paste the command below into your server terminal and press Enter.

BASH — RUN AS ROOT
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.

📄 Prefer to download and inspect first?

3b

Alternative: Manual Download & Run

If you prefer to download the script first, then upload and run it manually.

OPTION A — Download directly on the server
# 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
OPTION B — Upload from your computer (SCP)
# 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"
4

What the Script Does Automatically

The script makes targeted changes to your server — nothing destructive. It creates backups first.

🔐

Backs up your config files

Creates a timestamped backup of sip.conf and rtp.conf in /etc/asterisk/backup_dialer_*/ before making any changes.

Updates sip.conf

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.

📢

Adds Janus as a trusted SIP peer

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.

💾

Configures RTP port range

Sets rtpstart and rtpend in rtp.conf so Asterisk uses the correct port range for media streams.

🔒

Opens firewall rules

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.

🔁

Reloads Asterisk SIP module

Runs asterisk -rx "sip reload" so all changes take effect immediately without a full restart.

5

Verify the Setup

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

✅ After setup — test the dialer

  1. Go to autodialer.center/login.php
  2. Select your company account and enter a SIP username & password
  3. The status dot should turn green — this means your SIP extension registered successfully through CellHub
  4. Dial any internal extension or external number to test a call
!

Troubleshooting

Common issues and how to fix them.

🔴 Dialer shows "Registration failed"

🔴 Call connects but no audio

🔴 Call drops after ~16 seconds

🔴 Script can't find sip.conf

Need help with the setup?

We're available on Telegram to walk you through the installation step by step.