Skip to content

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

elastix-pbx-configuration-25.png

Figure 8.1 Elastix v. 2.5 PBX Configuration.
  1. Click PBX in top toolbar.

Next follow "Static IP addres" or "Dynamic IP address" section below.

Elastix 4.0

elastix-pbx-configuration-40.png

Figure 8.2 Elastix v. 4.0 PBX Configuration.
  1. Click PBX Configuration in left toolbar.

Next follow "Static IP addres" or "Dynamic IP address" section below.

Static IP address

elastix-sip-trunking-diagram-static-ip.png

Figure 8.3 Elastix SIP Trunk - static IP address.


  1. 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.

  2. 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 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 IP authentication the following changes are required:


elastix-add-trunk-static-ip.png

Figure 8.4 Elastix add SIP Trunk - static IP address.

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

elastix-sip-trunking-diagram-dynamic-ip.png

Figure 8.5 Elastix SIP Trunk - dynamic IP address.


  1. For outbound calls from Elastix to GoTrunk SIP Credentials (SIP username and password) authentication is used.

  2. 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:


elastix-add-trunk-dynamic-ip.png

Figure 8.6 Elastix add SIP Trunk - dynamic IP address.

Follow steps below to add SIP Trunk:

  1. Select Trunks.
  2. Click Add SIP Trunk link.
  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
qualify=yes
defaultuser=outbound_sip_username   ; <- replace with your Outbound SIP Username
remotesecret=outbound_sip_password  ; <- replace with your Outbound SIP Password
  1. Enter the following into Register String:
incoming_sip_username:incoming_sip_password@eu.st.ssl7.net
  1. Click Submit button.

Verify SIP Registration

To verify your Elastix server has correctly registered on GoTrunk network follow steps below:

elastix-sip-registry.png

Figure 8.7 Elastix 4.0 SIP Registry.
  1. Click PBX menu.
  2. Select Tools.
  3. Select Asterisk-Cli.
  4. Type the following command: sip show registry
  5. Click Execute button.
  6. 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

elastix-outbound-route.png

Figure 8.8 Elastix add Outbound route.

Follow steps below to add Outbound route:

  1. Select Outbound Routes.
  2. Click 9_outside link.
  3. Select gotrunk from drop down list.
  4. Click Submit Changes button.

Inbound routes

elastix-inbound-route.png

Figure 8.9 Elastix add Inbound routes.

For each of the Telephone Numbers on your GoTrunk account follow steps below to add Inbound route:

  1. Select Inbound Routes.
  2. Click Add Inbound Route button.
  3. Enter Telephone Number into Description field.
  4. Enter Telephone Number into DID Number field.
  5. Set desired destination from the drop down list.
  6. Click Submit button.

Note: make sure to click Apply Config button in top right corner of the page to reload your FreePBX configuration.