Note : Before you start using this configuration guide, make sure you have configured your Trixbox following our online configuration guide.
You can easily configure your own InPhonex local access number using Trixbox. Your customers will call your local PSTN numbers which will be connected to a Digium PCI PSTN card and redirected to our local access number platform (8600).
The card we recommend for this deployment is the Digium TDM400P card with four fxo ports. However, if you just want to configure your Trixbox server for testing or just personal use you can use the Wildcard X101P or X100P card with one fxo port.
X101P or X100P Card Installation
To configure this card with Trixbox use the zaptel card auto-config utility to setup the zaptel driver.
- Install the card in the PCI slot. One of the advantages of this type of cards is that it does not need a power connector in order to operate.
- Logon to Centos with the root account
- Run the following commands:
[root@asterisk1]# genzaptelconf
[root@asterisk1]# ztcfg
[root@asterisk1]# zttool
The results of zttool should show your zap card as configured.
You can also run the command zap show channels:
asterisk1*CLI> zap show channels
Chan Extension Context Language MusicOnHold
pseudo from-pstn en
1 from-pstn en
If this information is shown, then the card has been configured correctly.
TDM400P Card Installation
You can find additional documentation and specifications at: http://www.digium.com/en/products/hardware/tdm400p.php
NOTE: Make sure to order the card with 4 fxo ports since they also have them with 2 fxo and 2 fxs ports.
Start by installing the card into a free PCI slot. Make certain that you connect a power cable into the card. FXO cards require power in order to power the telephone line or extension. The TDM400P range of cards use the standard 4 pin hard drive power connector, if you don't have a free power connector you can always buy the equivalent of a double adaptor. Close the PC up and turn the power on.
Note: the LED's adjacent to each port will not come on until the the device has been properly configured.
In Trixbox you need to configure some options manually since the card will not work as soon as it is installed.
Logon to Centos and execute the following commands:
[root@asterisk1]# cd /usr/src/kernels/2.6.9-34.EL-i686/include/linux
[root@asterisk1]# mv spinlock.h spinlock.h.old
[root@asterisk1]# wget http://nerdvittles.com/aah27/spinlock.h
OR if that doesn't work.....
[root@asterisk1]# wget http://liquid-fire.us/spinlock.h
[root@asterisk1]# cd /etc/udev
[root@asterisk1]# cp ./permissions.d/zaptel.permissions /usr/src/kernels/2.6.9-34.EL-i686/include/linux
[root@asterisk1]# cp ./rules.d/zaptel.rules /usr/src/kernels/2.6.9-34.EL-i686/include/linux
[root@asterisk1]# cd /usr/src/zaptel
[root@asterisk1]# make linux26 && make install
[root@asterisk1]# shutdown -r now
if zaptel drivers have been identified after a reboot:
[root@asterisk1]# genzaptelconf
[root@asterisk1]# ztcfg
[root@asterisk1]# zttool
The results of zttool should show your zap card as configured
Edit Zapata-auto.conf file ( if you installed a X101P or X100P Card)
Use a PC on your network that has a web browser and connect to your Trixbox using HTTP://YourTrixboxIPaddress
- Click on Asterisk Management Portal and then click setup.
- Click Maintenance.
- Config Edit
- Click on zapata-auto.conf
- You will see the following configuration:
callerid=asreceived
; Span 1: WCFXO/0 "Wildcard X101P Board 1" RED
signalling=fxs_ks
; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 1
context=from-pstn
group=0
channel => 1
; Span 2: ZTDUMMY/1 "ZTDUMMY/1 1"
- Change the context for every channel from context=from-pstn to context=inphonex-ccg
callerid=asreceived
; Span 1: WCFXO/0 "Wildcard X101P Board 1" RED
signalling=fxs_ks
; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 1
context=inphonex-ccg
group=0
channel => 1
; Span 2: ZTDUMMY/1 "ZTDUMMY/1 1"
Edit Zapata-auto.conf file (If you installed a TDM400P card)
- Use a PC on your network that has a web browser and connect to your Trixbox using HTTP://YourTrixboxIPaddress
- Click on Asterisk Management Portal and then click setup.
- Click Maintenance.
- Config Edit
- Click on zapata-auto.conf
- You will see the following configuration:
callerid=asreceived
; Span 1: WCTDM/0 "Wildcard TDM400P REV I Board 1"
signalling=fxs_ks
; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 1
context=from-pstn
group=0
channel => 1
signalling=fxs_ks
; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 2
context=from-pstn
group=0
channel => 2
signalling=fxs_ks
; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 3
context=from-pstn
group=0
channel => 3
signalling=fxs_ks
; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 4
context=from-pstn
group=0
channel => 4
; Span 2: ZTDUMMY/1 "ZTDUMMY/1 1"
- Change the context for every channel from context=from-pstn to context=inphonex-ccg
callerid=asreceived
; Span 1: WCTDM/0 "Wildcard TDM400P REV I Board 1"
signalling=fxs_ks
; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 1
context=inphonex-ccg
group=0
channel => 1
signalling=fxs_ks
; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 2
context=inphonex-ccg
group=0
channel => 2
signalling=fxs_ks
; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 3
context=inphonex-ccg
group=0
channel => 3
signalling=fxs_ks
; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 4
context=inphonex-ccg
group=0
channel => 4
; Span 2: ZTDUMMY/1 "ZTDUMMY/1 1"
- Click on the UPDATE button.
- Click the Re-Read configs ( this is necessary in order for the changes to take effect)
Edit extensions_custom.conf file
- Use a PC on your network that has a web browser and connect to your Trixbox using HTTP://YourTrixboxIPaddress
- Select System Administration.
- Select Config Edit.
- Click on extensions_custom.conf.
- Scroll down to the end of the page and add the following text:
[inphonex-ccg]
include => ext-local-custom
include => from-pstn
exten => s,1,Answer
exten => s,2,Wait,2
exten => s,3,Dial(SIP/8600@inphonex,20,tr)
- Click on the UPDATE button.
- Click the Re-Read configs (this is necessary in order for the changes to take effect).
Note: This will redirect all calls answered by your Trixbox to InPhonex local access number platform assuming that you have already configured your Trixbox following our configuration guide.
For more tips on securing your Asterisk server, please visit these links:
http://etel.wiki.oreilly.com/wiki/index.php/Asterisk_Brute_Force_Prevention
http://www.voip-info.org/wiki/view/Fail2Ban+(with+iptables)+And+Asterisk
Notice regarding support:
In an effort to provide the best possible support, we offer the following options to Trixbox/Asterisk users:
- Unlimited, free use of our knowledgebase.
- Configuration guides that can assist most customers with the most common Trixbox/Asterisk configurations.
These are the only support options that we provide at this time.