Tải bản đầy đủ
12.1 Editing The .conf Files

12.1 Editing The .conf Files

Tải bản đầy đủ

Every time you update freePBX, there is a good chance that changes or
additions you have made in iax.conf will be overwritten. To avoid this, all
additions I wish to make in iax.conf are made in iax_general_custom.conf
or iax_custom.conf.

12.1.4 iax_custom.conf
; additions to iax.conf that would not get deleted if you
upgrade freepbx
;externip = or (one or the other NOT both)
externhost =
localnet =

12.1.5 Indications.conf
In the general section ensure the following exist:
country = au ; (The default is country = us, therefore replace “us” with “au”)

12.1.6 enum.conf
; The search list for domains may be customized.
; Domains are searched in the order they are listed here.
search => e164.arpa
search => e164.org

12.1.7 extensions_custom.conf
If you have a ZAP trunk and you want to get an external line and be presented with a
dial tone first before you dial the external line, you may add the following codes in the
extensions_custom.conf file.
The example below assumes that your ZAP is on channel 1.
Immediately after the line following the [from-internal-custom] context, insert the
following codes:
exten => 0,1,Dial(ZAP/1/{EXTEN})
exten => 0,2,Hangup
This will allow you to dial 0 and you will get a second dial tone from PSTN. Following
which you can dial a PSTN number that you wish to call.

If you're using a PRI line, you need to enable 'overlapdial' in
/etc/asterisk/zapata.conf for this to work.

12.1.8 features_general_custom.conf
(You may ignore this if you are using using Trixbox v2.6.x with the latest FreePBX)

TRIXBOX-2 Without Tears

Page 76 of 248

The default features.conf included with Trixbox is fairly minimal. It is recommended
that you reflect the following in your features_general_custom.conf file. The extra
keywords will come in handy later on. You may ignore these setting if not required.

transferdigittimeout =>3
courtesytone = beep
xfersound = beep
xferfailsound = beeperr
;adsipark = yes
featuredigittimeout = 800

TRIXBOX-2 Without Tears

; Number of seconds(in seconds)
; to wait between digits when transferring a call
; Sound file to play to the parked caller
; when someone dials a parked call
; to indicate an attended transfer is complete
; to indicate a failed transfer
; if you want ADSI parking announcements
; Max time (ms) between digits for
; feature activation. Default is 500

Page 77 of 248

After doing all of the above, you will no doubt feel frustrated if your VOIP does not work.
The following are some basic steps for you to do – at least to ensure that your installation
is running correctly and is registered to the appropriate VSP before you start doing
anything more adventurous.
There are two places where you can obtain a quick health report of your system – the
System Process Status and the Asterisk Info screens.

If you don’t have the Asterisk Info option, refer to the NOTES section on how to
obtain this module.

First you must ensure that asterisk is well and running or you may not be able to make or
receive any call.
If all processes are running then your battle is half won.
In Trixbox 2.6, the information can be obtained straight from the Admin Maintainance
screen as soon as you change user mode to Admin mode – see red arrow in the
illustration below..

If any of the four services aren’t running, chances are something is wrong and your
Asterisk will not be working correctly or not working at all. A probable cause can be
wrong configuration of your zaptel drivers. If you don’t have a zaptel devise, you should
try to disable the related .conf files.
Ensure that the minimum requirements have been met. If the minimum requirements and
the right type of hardware requirements have been met, and yet it is still not working, then
maybe its time to start the installation again.
Next, select and click Asterisk Info to verify your status.

TRIXBOX-2 Without Tears

Page 78 of 248

From freePBX, select the Asterisk Tab and click on the Asterisk Information option as
shown by the red arrow.

When presented with the info page, select Show All. See illustration below.

You will then be presented with the following screen.

TRIXBOX-2 Without Tears

Page 79 of 248

Scroll down to the SIP (or IAX if you are using IAX) section and ensure that you are
registered to your trunks. You will only be able to make and receive external calls –
hopefully - if you are registered.
If all trunks are registered, you can be almost certain that at the very least, your Trixbox
installation is working (although not necessarily that you can make or receive calls).
In the majority of cases, if you have done everything as described in the preceding
chapters, the chances of your installation working are pretty good. However there are
always times when you think that the weather is going to be fine and yet you are pelted by
a thunderstorm.
If you are not able to make or receive calls, the most common causes are Trunk
Registrations, the choice of Codec, Routings, and Dialling rules errors.
Routings and Dialling rules are something that needs to be thought out logically with no
simple way of determining, as different people has different requirements and different
VSP have different dialling rules.

TRIXBOX-2 Without Tears

Page 80 of 248

A new issue has raisen its ugly head with Trixbox 2.2.4. Building Trixbox 2.2.4 from the
ISO broke the zaptel install module. As a result, zapel module will not be found and
consequently the zaptel cards will not be detected
To remedy this, log in as root and do the following at the command line:
yum clean all
yum install zaptel*
The abovae problem has since been correct with later releases.

The X100P card is no longer being made, but there are many X100P compatible in the
market – some good and some not so good. The cards I am using is the A100P variety
from Openvox. The 3 A100Ps I use for testing and POC (in different boxes of course)
have been working flawlessly for the last 7 months; unfortunately, since Asterisk no
longer will be supporting the X100P officially, Openvox has stopped its production.
This card allows you to connect a POTS (plain Old Telephone System) line to your
Asterisk box.

OpenVox A100P Card
If this card is added after Asterisk has been configured, it may be necessary to configure
it by using the zaptel card auto-config utility so the correct zaptel driver will be set up. To
do that, enter the following from the command line.
Restart Asterisk
Shutdown –r now
After restart run the following:
genzaptelconf –s –d –v –c au
Restart again.
Shutdown –r now

TRIXBOX-2 Without Tears

Page 81 of 248

Next go into the freePBX web interface to create a trunk and you will notice that there is
already a trunk called ZAP/g0. You need to edit this.

Enter the phone number for you pots line in the Caller ID field
Enter 1 for Maximum channels
Set a dial rule you want for this trunk
Select an outbound dial prefix to select this trunk when dialling
Set the Zap Identifier to 1 (the default is g0)

Once the card is configured, you must add a route for Incoming Calls or asterisk will not
answer this line
Click on Incoming Calls in freePBX and set up an incoming route. To make outbound
calls you will need to set an outbound route as well.
If you have this card installed, you may need to edit the following files (usually you don’t
have to); zapata.conf, zapata-auto.conf, zaptel.conf and modprobe.conf. The last 2
files live in the /etc directory – use a text editor (I use nano) to edit them as you cannot
edit them through Config Edit.

14.2.1 zapata.conf
Under [channels] add the following lines:
The above is to ensure that the line is hung up if there is no answer or busy after 6
busy tones.
For my installation to function correctly, I have also changed the following setting to
obtain a good compromise on volume/echoing:
rxgain=4 (you may have to experiment a little with this setting)
(you may have to experiment a little with this setting)

14.2.2 zapata-auto.conf
Ensure the following exist in Zapata-auto.conf. It is located at the end of the file.
channel => 1
Leave the rest of the file as it is.

14.2.3 zaptel.conf
Change the loadzone and defaultzone to “au”
# Global data
loadzone = au
defaultzone = au

TRIXBOX-2 Without Tears

Page 82 of 248