SIP * Recommended * – TRIXBOX / ELASTIX – Setup Guide

FaktorTel and Trixbox or Elastix

Setting up Trixbox to work with FaktorTel is a relatively easy task, as FaktorTel natively supports the Asterisk PBX we can simply add FaktorTel as a trunk to Trixbox and then set your outbound route to send out FaktorTel and it should all work perfectly.
In this tutorial we use the SIP protocol to connect Trixbox to FaktorTel.

When running SIP trunk to your asterisk server contact Support and ask them to send 09xxxxxx number in the invite header so calls authenticate correctly

last updated: Wednesday 20 July 2011

Step 1:

Login to the web interface of your Trixbox Server.

Step 2:

Up the top right of the screen you will see ” USER MODE ( SWITCH ) “, click on the word ” SWITCH ”

Step 3:

Enter in your Username and Password at the prompt. Username is usually ” maint ” ( Without the quotes )

Step 4:

You will be on a new screen now. Hover your mouse over the “PBX” menu item and then click on “PBX SETTINGS” on the menu which appears.

Step 5:

On the side menu click on ” TRUNKS ” which is under ” Basic ” in your settings. Then click on “Add SIP Trunk”

In this menu you will need to enter in your trunk settings. These are listed below.

The settings are as follows:

Trunk Name: ftel

Peer Details

host=sip.faktortel.net.au
context=from-trunk
directmedia=no
canreinvite=no
type=peer
username=YOUR USERNAME ( E.g. username=09123456 )
fromuser=YOUR USERNAME ( E.g. username=09123456 )
secret=YOUR PASSWORD
qualify=yes
nat=yes
disallow=all
allow=gsm
allow=alaw
allow=ulaw
dtmfmode=rfc2833
sendrpid=pai

USER Context: YOUR USERNAME ( E.g. username=09123456 )

User Details

type=user
host=dynamic
secret=YOUR PASSWORD
disallow=all
allow=gsm
allow=alaw
allow=ulaw
context=from-trunk
dtmfmode=rfc2833
insecure=port,invite
directmedia=no
canreinvite=no
nat=yes
qualify=yes
directmedia=no
canreinvite=no
trustrpid=yes
deny=0.0.0.0/0.0.0.0
permit=202.43.66.0/255.255.255.0

These are all the settings you require, do not add any other options to Peer or User.

Step 6:

The final setting is your REGISTRATION STRING, right down the bottom of the menu. Again please change the address accordingly if you are prepaid or other.

In the registration string section please enter the following, replacing USERNAME and PASSWORD with your username and password that was supplied to you:

USERNAME:PASSWORD@sip.faktortel.com.au

End of settings.

Step 7:

Click on ” Submit Changes ”

Step 8:

Scroll up to the top of the window and you will see an orange bar which says ” Apply Changes ”
please click on this and click ” Continue ”

Step 9:

Once your settings are loaded in you will be connected to the FaktorTel network.

NAT STUN and SIP ALG

Depending on how you have setup your xDSL connection you may require modification to sip_nat.conf
It is Recomended to turn off SIP ALG and SPI Firewall

For more inforamtion on Application-level gateway

Here’s how to modify /etc/asterisk/sip_nat.conf:

Step 1:

add the following lines.

localnet=192.168.0.0/16       ; RFC 1918 addresses
localnet=172.16.0.0/12         ; Another RFC1918 with CIDR notation
localnet=10.0.0.0/8                ; Also RFC1918
localnet=169.254.0.0/16       ; Zero conf local network

Step 2:

If you are using SIP ALG skip to next section

Step 3:

If you have a staic IP Address

externip = (your static ip address)
Skip to next section

Step 4:

If you have a dynamic IP Address

externhost= YOUR DYNAMIC ADDRESS ( E.g. me.dyndns.org )
or
stunaddr = stun.faktortel.com.au:3478
externrefresh = 15

How to make an outgoing call now that you are connected…

Now that you are connected to FaktorTel you want to be able to make outgoing calls. This is quite easy.
All you need to do is set an ” Outbound Route “, what this does is tells your PBX where to send calls to.

Here’s how to set it up for FaktorTel:

Step 1:

Click on ” Outbound Routes ” on the left menu of your PBX setup screen.

Step 2:

Click on ” Add Route ” on the right menu.

Step 3:

In the menu which appears, enter in a name for your outbound route, in this case we’ll call it ” Outside ”

Step 4:

In dial patterns ( for Australia ) simply enter ” [0].” ( without the surrounding quotes, so it should be [0]. )

Step 5:

Under Trunk Sequence choose ” ftel “, this is where your calls will go out from which start with ” 0 ” ( such as 07, 08, 09 )

Step 6:

Click on ” Submit Changes ”

Step 7:

Scroll to the top of the page and click on the orange bar and apply the changes by clicking on “Continue” in the menu which appears.

Note: If you would like FaktorTel to handle your dial plan, you can simply put a full stop ( a dot ) in the Dial Patterns section and FaktorTel will set your state allowing you to make calls like you would on a standard handset / PBX.

How to setup your Inbound Calls…

Since you have your connection to FaktorTel all setup and ready to go you can also setup inbound calls. This is a favorite among people who have a number for each staff member in their organisation.

Here is how to do it in Trixbox:

Step 1:

To add an incoming number we need to add an incoming route. To do this on the left hand menu click on ” Inbound Routes ”

Step 2:

Click on the ” Add Route ” link on the top right of the menu.

Step 3:

Type in a name for your route. Lets use ” My House ” here.

Step 4:

Enter in the number provided to you by FaktorTel as the DID Number. E.g. ” 0756306650 ”

Step 5:

Scroll right to the bottom of the menu and click on ” Extensions ” and then choose your extension from the list to the right.

Step 6:

Click on ” Submit ”

Step 7:

Scroll to the top of the menu and click on the orange bar and click ” Continue ” to apply your changes.

Now any time anyone rings your incoming number the extension you set should ring.

What is Asterisk?

Asterisk is a complete PBX in software. It runs on Linux and provides all of the features you would expect from a PBX and more. Asterisk does voice over IP in three protocols, and can interoperate with almost all standards-based telephony equipment using relatively inexpensive hardware.

Asterisk provides Voicemail services with Directory, Call Conferencing, Interactive Voice Response, Call Queuing. It has support for three-way calling, caller ID services, ADSI, SIP and H.323 (as both client and gateway). Check the Features section for a more complete list.

Asterisk needs no additional hardware for Voice over IP. For interconnection with digital and analog telephony equipment, Asterisk supports a number of hardware devices, most notably all of the hardware manufactured by Asterisk’s sponsors, Digium™. Digium has single and quad span T1 and E1 interfaces for interconnection to PRI lines and channel banks as well as a single port FXO card and a one to four-port modular FXS and FXO card.

Also supported are the Internet Line Jack and Internet Phone Jack products from Quicknet.

Asterisk supports a wide range of TDM protocols for the handling and transmission of voice over traditional telephony interfaces. Asterisk supports US and European standard signalling types used in standard business phone systems, allowing it to bridge between next generation voice-data integrated networks and existing infrastructure. Asterisk not only supports traditional phone equipment, it enhances them with additional capabilities.

Using the Inter-Asterisk eXchange (IAX™) Voice over IP protocol, Asterisk merges voice and data traffic seamlessly across disparate networks. While using Packet Voice, it is possible to send data such as URL information and images in-line with voice traffic, allowing advanced integration of information.

Asterisk provides a central switching core, with four APIs for modular loading of telephony applications, hardware interfaces, file format handling, and codecs. It allows for transparent switching between all supported interfaces, allowing it to tie together a diverse mixture of telephony systems into a single switching network.

Asterisk is primarily developed on GNU/Linux for x/86. It is known to compile and run on GNU/Linux for PPC along with OpenBSD, FreeBSD, and Mac OS X Jaguar. Other platforms and standards-based UNIX-like operating systems should be reasonably easy to port for anyone with the time and requisite skill to do so. Asterisk is available in the testing and unstable Debian archives, maintained thanks to Mark Purcell.