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

FieldValue
Trunk Namehexavoice
Outbound CallerIDYour DID number
Maximum Channels10

Step 3: pjSIP Settings — General

FieldValue
UsernameYour SIP Username
SecretYour SIP Password
SIP Serversip.hexavoice.net
SIP Server Port5060
Contextfrom-trunk
TransportUDP or TCP

Step 4: pjSIP Settings — Registration

FieldValue
RegisterYes
Register TransportUDP
Outbound Proxysip.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.

Back to Knowledge Base