PBX & Integrations10 min read
HexaVoice SIP Trunk Configuration for Asterisk / FreePBX
Configure HexaVoice as a SIP trunk in Asterisk or FreePBX with example config files.
HexaVoice + Asterisk/FreePBX SIP Trunk
FreePBX (GUI Method)
Step 1: Add Trunk
Go to Connectivity > Trunks > Add Trunk > Add SIP (chan_pjsip) Trunk.
Step 2: General Settings
| Field | Value |
|---|---|
| Trunk Name | hexavoice |
| Outbound CallerID | Your DID number |
| Maximum Channels | 10 |
Step 3: pjSIP Settings — General
| Field | Value |
|---|---|
| Username | Your SIP Username |
| Secret | Your SIP Password |
| SIP Server | sip.hexavoice.net |
| SIP Server Port | 5060 |
| Context | from-trunk |
| Transport | UDP or TCP |
Step 4: pjSIP Settings — Registration
| Field | Value |
|---|---|
| Register | Yes |
| Register Transport | UDP |
| Outbound Proxy | sip.hexavoice.net |
Asterisk (Manual Config)
/etc/asterisk/pjsip.conf
ini
[hexavoice-transport]
type=transport
protocol=udp
bind=0.0.0.0
[hexavoice-registration]
type=registration
transport=hexavoice-transport
outbound_auth=hexavoice-auth
server_uri=sip:sip.hexavoice.net
client_uri=sip:[email protected]
retry_interval=60
[hexavoice-auth]
type=auth
auth_type=userpass
username=YOUR_USERNAME
password=YOUR_PASSWORD
[hexavoice-aor]
type=aor
contact=sip:sip.hexavoice.net
[hexavoice]
type=endpoint
transport=hexavoice-transport
context=from-trunk
disallow=all
allow=ulaw
allow=alaw
allow=g729
outbound_auth=hexavoice-auth
aors=hexavoice-aor
from_user=YOUR_USERNAME
from_domain=sip.hexavoice.net/etc/asterisk/extensions.conf
ini
[from-trunk]
exten => _X.,1,NoOp(Inbound from HexaVoice)
same => n,Goto(internal,${EXTEN},1)
same => n,Hangup()Reload Asterisk
After saving config files, run:
- asterisk -rx "module reload"
- asterisk -rx "pjsip show registrations"
You should see hexavoice-registration with status Registered.