www.atcom.cn Tour of Trixbox Edwin Version Date Author Description 1.
www.atcom.cn 1. Introduce................................................................................................................4 Related Hardware and software ................................................................................................4 System set up ............................................................................................................................5 2. Install Trixbox and make internal calls ..........................................................
www.atcom.
www.atcom.cn 1. Introduce This article is a guide to use Trixbox and ATCOM products to build a simple application on small office application. Through this article, we hope that reader can build the IP PBX solution for small enterprise Related Hardware and software Trixbox2.0: Asterisk based Trixbox enables even the novice user to quickly set up a voice over IP phone system.
www.atcom.cn System set up We use following devices in our set up: 1: Server with Trixbox installed: we also install AX-100p and AX-400p in this server, we install two AX-110S FXS modules and two AX-110X modules, so you can connect three PSTN lines and two normal phones. So there are five analog ports on the Trixbox server. one FXO port from AX-100p, two FXO port from AX-400p. two FXS ports from AX-400p. 2: Normal phone: connect to the AX-400p FXS ports.
www.atcom.cn 2. Install Trixbox and make internal calls Install Trixbox The set up of Trixbox is simple. Just download the ISO file from www.trixbox.org and record it in the CD to make an auto boot CD. PUT this installation CD and reboot your computer, then it will format your system and install the CENTOS and Trixbox server on it. I am using Trixbox2.0 version on this article. If you have question in install, you can refer the www.trixbox.org for the install guide.
www.atcom.cn Add SIP extensions: Sip extensions is an SIP account allows you to log on the Trixbox via an SIP terminal such as IP phone AT-530 and softphone x-lite. Go to -->Free PBX --> setup-->Extensions -->add generic SIP device.
www.atcom.cn Secret: Enable Voicemail Voicemail password: 2005 ; Log on password 2005 ; password of your mailbox So we have created three SIP extensions. And we can use SIP device to log on the Trixbox use these extensions. Register SIP device: 1. Register SIP softphone Download the x-lite softphone phone from couterpath website www.xten.
www.atcom.cn Register Server Addr: Register Username: Register Password: Phone Number: 192.168.1.129 2004 2004 2004 IP address of Trixbox server. Use the same method register another at-530 to extension 2005, then you can free inbound call between these three extensions 2003~2005. Voice Mail Box Voice mail box is enabled when we create the extensions. So if somebody calls you on your extension and you are unavailable, he will hear the voice mail greeting message and leave voice message.
www.atcom.cn 3. Make outbound call To make an outbound call, we need to add trunk first. There are many types of trunk, SIP trunk, Zap Trunk and so on, We use AX-100p and A-400p to make zap trunks here. Install AX-100p and AX-400p to the PC (Hardware) 1. 2. 3. Power off Trixbox and pull out the power adapter. Insert AX-100p card to the PCI slot of your PC and firm it with screw.
www.atcom.cn machine. FXS interfaces get phones plugged into them, delivery battery, and provide ringing. FXS interfaces are signalled with FXO signalling. FXO (Foreign eXchange Office) is an interface that connect to a phone line. They supply your PBX with access to the public telephone network. FXO interfaces use FXS signalling. FXS interfaces are what allow you to hook telephones to your PBX, and FXO interfaces allow you to connect your PBX to real analog phone lines.
www.atcom.cn Channel 03: FXS Kewlstart (Default) (Slaves: 03) Channel 04: FXO Kewlstart (Default) (Slaves: 04) Channel 05: FXO Kewlstart (Default) (Slaves: 05) 5 channels configured. Above message shows that AX-100p and AX-400p are already auto configured. You can see that channel 1, 2 and 3 are configured as FXS_KS signaling, that means ports 1,2 and 3 will be act as FXO ports. And for the ports 4 and 5, they use FXO_KS signaling and act as FXS ports.
www.atcom.cn Add Zap Trunk Use the SSH tool to open the file /etc/asterisk/zapata-auto.conf You will see there are five channels here. Just like: ; Span 1: WCFXO/0 "Wildcard X100P Board 1" RED signalling=fxs_ks ; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 1 context=from-zaptel group=0 channel => 1 ; Span 2: WCTDM/0 "Wildcard TDM400P REV E/F Board 1" signalling=fxs_ks ; Note: this is a trunk.
www.atcom.cn Maximum Channels: Maximum available simultaneous outbound calls. Outbound Dial Prefix: 9 Trixbox will add a prefix to the number you dial and send to the trunk Zap Identifier: g0 ; the three FXO ports are grouped as g0, so when you make outbound call via this trunk, Trixbox will pick up the available FXO channel in g0 automatically. The channel are grouped by Trixbox when you use “genzaptelconf ”, you can see the group information in the file /etc/asterisk/zapata-auto.conf .
www.atcom.cn Add outbound routes Ok. We have added the trunk already. To make out bound calls, we also need to specify that which trunk that our calls should route to. Go to the Freepbx --> Setup--> Outbound Routes--> Add Route Route Name: 9_outside Dial Patterns: 9|. Trixbox will cut the first number “9” if the phone number dial begins with 9. Trunk Sequence: ZAP/g0 all number accord with the above Dial Patterns will be sent to ZAP/g0 trunk.
www.atcom.cn Add zap extensions Remember that we have two FXS modules on the AX-400p card, we can use this two fxs port to build two zap extension. Go to the Free PBX --> setup-->Extensions -->add generic zap device User Extension: Display Name: Channel: Enable VoiceMail VoiceMail Password: 2001 Annie 4 the fourth channel is the FXS port 2001 Now connect a normal phone to the 3rd port of the AX-400p card, and pick up the phone, you will hear the dial tone and you can make calls now.
www.atcom.cn And we have assigned voice mail boxes to each extension. To expand the number of extensions, you can just add IP phone or softphone. Three PSTN extensions, to make outbound calls, you need to add prefix 9 to your number when dialing. We have finished outbound call now, the next step we will add IVR for our system.
www.atcom.cn 4. IVR IVR, means Interactive Voice Response. It is very important for the enterprise application. We can use the IVR to do the auto-attendant job. Generate the Voice file Go to FreePBX -->Setup --> System Recording --> Add Recording You can use your extension to record a voice file or Upload a voice file. Record via extensions: Enter an extension 2001 in the record via extension and “Go” to the next page.
www.atcom.cn Specify the name of this record and dial *77 in 2001 extension and you will here indicate sound and then record your voice.
www.atcom.
www.atcom.cn 5. Make outbound calls via SIP Service We have added zap trunk in the before chapter. But the rate for international call on the PSTN line is expensive. I want to more lower rate for our international call. So I apply an voipbuster account ( they have a low international rate) and after adding a SIP trunk, we can use our extension to make calls to via the voipbuster service.
www.atcom.cn Link outbound route to SIP trunk Go to FreePBX --> SetUp-->Outbound Routes-->Add ourbound routes Route name: Dial Patterns: Trunk Sequence: 8_international_calls 8|. SIP/SIP_International Now we have added a new international route. All number begin with number 8 will be sent to this route. According to the zap trunk in the above chapter, in our system: Calls begin with 8 will outgoing via our SIP service.
www.atcom.cn 6. Remote register through IAX2 protocol We have built a local simple IP PBX system so far. This is the total structure of my system: I lease an ADSL line to connect the internet. I have a dynamic WAN IP. (dynamic IP is enough to me and static ip is expensive) I have a Trixbox server behind my router. I can use my ip phone connect the Trixbox to act as an extension in my local area network. They are at the same network as Trixbox.
www.atcom.cn Add IAX2 extension Go to -->Free PBX --> setup-->Extensions -->add generic IAX2 device. and add a IAX2 extensions: Add IAX2 Exenions: User Extension: 2006 ; Phone number of this extension Display Name: Alice ; Caller ID Secret: 2006 ; IAX2 Log on password Enable Voicemail Voicemail password: 2006 ; password of your mailbox. Add Port Forwarding on router Since our Trixbox server is behind the router and don’t have public ip.
www.atcom.cn I can see that my public ip is 124.35.127.209. so I can use my ATA AG-188 to register to my Trixbox server via internet. The configure method of AG-188 is the same as AT-530. IAX Server Addr: 121:35.127.
www.atcom.cn OK, Now!, we can use the AG-188 to register our Trixbox server now, but it is very annoy because our public IP is dynamic and will change after several hours. Fortunately, there is a service called DDNS. Via the DDNS, you can bind your dynamic public IP to a fix domain. For example, I am using a free DDNS service from a Chinese company and they give me an account. I run the DDNS client on the Trixbox server. The client will connect to the DDNS server and send my public ip to them .
www.atcom.cn 7. Echo Cancellation Echo is a big problem in VoIP and the most possibility echo problem in our system is the making outbound calls via an IP Phone. Below is several ways to improve our voice quality.
www.atcom.cn Install the MG2 echo cancellation If the echo is still worst or you hear some noise at the beginning of your speech, then we can try to use the MG2 echo cancellation. Trixbox doesn’t install this soft echo cancellation in default. The soft echo cancellation may give you a good result in Trixbox. Download the latest 1.2 version zaptel for asterisk official website www.asterisk.org. before install the zaptel driver , we need to install the kernel source of Trixbox.
www.atcom.cn 8. Install AX-4S in the Trixbox AX-4S is a four ports BRI card. It doesn’t use the zaptel driver so the genzapconf command doesn’t work on it. If you need to install this card on the Trixbox server, you need to install the mISDN driver, it base on the mISDN driver. Configure the jumper and switch of the card First according to the AX-4S manual to set the card to correct jumper, I use the card to connect the NT Plus’s S/T port, so I configure the card’s four ports as TE port.
www.atcom.cn ; define your ports, e.g. 1,2 (depends on mISDN-driver loading order) ports=1,2,3,4 context = from-pstn ; context where to go to when incoming Call on one of the above ports msns=* In the misdn.conf file, I configure the port 1~4 as a group named “intern”. to use these ports to make outgoing call. We need to add a custom trunk. Add custom trunk: Go to FreePBX-->Set up --> Trunks and add a new custom trunk.
www.atcom.cn After doing that, all calls to the BRI port will route to the IVR entry. Auto load the AX-4S card after system startup Open the /etc/rc.d/rc.local file and add a new line on this file to auto start the AX-4S card after system startup /etc/rc.d/rc.local ============= #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /var/lock/subsys/local /etc/init.
www.atcom.cn 9. The End Thanks for your reading of this article. If you have question or advise of this article, please feel free to contact me at edwin@atcom.com.cn.