Configuring SIP trunk credentials in your PBX
Set up SparkTG SIP trunking in Asterisk, FreePBX, or 3CX. Includes configuration examples, codec settings, NAT handling, and steps to verify two-way audio.
SIP trunking connects your on-premises PBX to SparkTG's cloud telephony network, enabling inbound and outbound calls through your existing phone system. Here's how to configure it.
Getting your SIP credentials
- 1
Go to Settings → SIP Trunks
Dashboard → Settings → SIP Trunks → click Create New Trunk.
- 2
Copy your credentials
You'll see: SIP Server (sip.sparktg.com), SIP Port (5060 for UDP, 5061 for TLS), Username, Password, and your Outbound Caller ID. Keep these secure.
FreePBX / Asterisk configuration
; /etc/asterisk/sip.conf — SparkTG trunk
[sparktg-trunk]
type=peer
host=sip.sparktg.com
port=5060
username=YOUR_SIP_USERNAME
secret=YOUR_SIP_PASSWORD
fromuser=YOUR_SIP_USERNAME
fromdomain=sip.sparktg.com
insecure=port,invite
qualify=yes
dtmfmode=rfc2833
context=from-sparktg
disallow=all
allow=ulaw
allow=alaw3CX configuration
- 1
Add a new SIP trunk
In 3CX Admin Console → SIP Trunks → Add SIP Trunk → Generic SIP Trunk.
- 2
Enter credentials
Registrar/Server: sip.sparktg.com | Port: 5060 | Authentication ID: your SIP username | Password: your SIP password.
- 3
Set codec priority
Add G.711 (ulaw/alaw) as the first codec. Remove any video codecs. SparkTG supports G.711, G.729, and G.722.
If your PBX is behind NAT, you must set the External IP and Local Networks fields in your SIP settings. Without this, audio is one-way or calls drop after 30 seconds.
Testing the trunk
- After saving, the trunk should show Registered status within 30 seconds.
- Place a test outbound call from an extension through the trunk.
- Receive a test inbound call to your virtual number and verify it reaches the PBX.
- Check two-way audio — speak and listen both directions for at least 30 seconds.
Frequently asked questions
Where do I find my SparkTG SIP trunk credentials?
My SIP trunk shows 'Unregistered' in FreePBX — what should I check?
Why is audio one-way after my SIP trunk connects?
Why do calls drop exactly after 30 seconds on my SIP trunk?
Which audio codecs should I configure for SparkTG SIP trunking?
Was this article helpful?
Still stuck? Contact our support team →