IP PBX Configuration - Elastix¶
Elastix is an Open Source Unified Communications Software. SIP Trunk configuration instructions below apply to the following Elastix versions:
- Elastix v. 2.5
- Elastix V. 4.0
Documentation is provided for scenario where Elastix server uses Static IP address on the public Internet and when Dynamic IP address is used.
To begin SIP Trunk configuration open PBX Configuration:
Elastix 2.5¶
- Click
PBX
in top toolbar.
Next follow "Static IP addres" or "Dynamic IP address" section below.
Elastix 4.0¶
- Click
PBX Configuration
in left toolbar.
Next follow "Static IP addres" or "Dynamic IP address" section below.
Static IP address¶
-
Static IP address (
a.b.c.d
in our example above) of your Elastix server will be added to GoTrunk service IP ACL (Access Control List) and outbound calls coming from that IP address will be accepted without requiring any further authentication (SIP username and password). This is the most efficient way of authenticating SIP calls. -
Inbound calls to one of Telephone Numbers on your GoTrunk account will be sent directly to Elastix public IP address. Since the calls will be coming from known
peer
(IP address of SIP Trunking serviceq.x.y.z
in our example above) Elastix will accept them without requiring any further authentication.
To configure Elastix server to work with GoTrunk SIP trunk using IP authentication the following changes are required:
Follow steps below to add SIP Trunk:
1. Select Trunks
.
2. Click Add SIP Trunk
button.
3. Enter name of the trunk as gotrunk
4. Enter the following into PEER Details
field (replace eu.st.ssl7.net
with amn.st.ssl7.net
if you want to use North America POP):
type=peer
host=eu.st.ssl7.net
context=from-trunk
5. Click Submit Changes
button.
Next follow "Routing configuration" instructions below.
Dynamic IP address¶
-
For outbound calls from Elastix to GoTrunk SIP Credentials (SIP username and password) authentication is used.
-
For inbound calls to one of Telephone Numbers on your GoTrunk account to work Elastix needs to Register with GoTrunk service (and periodically refresh registration in case IP address changes). Calls will be sent to IP address which was sent in the most recent Elastix Registration. Since the calls will be coming from known peer (IP address of SIP Trunking service
q.x.y.z
in our example above) Elastix will accept them without requiring any further authentication.
To configure Elastix server to work with GoTrunk SIP Trunk using SIP Credentials authentication the following changes are required:
Follow steps below to add SIP Trunk:
- Select
Trunks
. - Click
Add SIP Trunk
link. - Enter name of the trunk as
gotrunk
- Enter the following into
PEER Details
field (replaceeu.st.ssl7.net
withamn.st.ssl7.net
if you want to use North America POP):
type=peer
host=eu.st.ssl7.net
context=from-trunk
qualify=yes
defaultuser=outbound_sip_username ; <- replace with your Outbound SIP Username
remotesecret=outbound_sip_password ; <- replace with your Outbound SIP Password
- Enter the following into
Register String
:
incoming_sip_username:incoming_sip_password@eu.st.ssl7.net
- Click
Submit
button.
Verify SIP Registration¶
To verify your Elastix server has correctly registered on GoTrunk network follow steps below:
- Click
PBX
menu. - Select
Tools
. - Select
Asterisk-Cli
. - Type the following command:
sip show registry
- Click
Execute
button. - Verify the state is
Registered
. Any other state indicates communications problem (firewall / NAT issue) between your Elastix server and GoTrunk network or incorrect Register string in your trunk configuration.
Next follow "Routing configuration" instructions below.
Routing configuration¶
Outbound route¶
Follow steps below to add Outbound route:
- Select
Outbound Routes
. - Click
9_outside
link. - Select
gotrunk
from drop down list. - Click
Submit Changes
button.
Inbound routes¶
For each of the Telephone Numbers on your GoTrunk account follow steps below to add Inbound route:
- Select
Inbound Routes
. - Click
Add Inbound Route
button. - Enter Telephone Number into
Description
field. - Enter Telephone Number into
DID Number
field. - Set desired destination from the drop down list.
- Click
Submit
button.
Note: make sure to click Apply Config
button in top right corner of the page to reload your FreePBX configuration.