8  Get Under The Bonnet 

Note for home users:
Config files manual tweaks in this guide are meant for advanced users. Unless you have a compelling reason to do so, users are advised against any manual config file tweaks.

Just as you think that all is OK, you realized something else requires attention.  This is true with TRIXBOX as well.

To do this you may need to edit some configuration files (.conf) that reside both in the /etc/asterisk directory and /etc directories.  Configuration files in the /etc/asterisk are generally editable through Config Edit.

To start editing the .conf files you need to log in to TRIXBOX Configuration and Administration and select the Config Edit selection. 

Select Config Edit (marked with red arrow) and you will see a new screen with a list of all the .conf files, which can be edited manually. 

 You may scroll down the page to find the file that you wish to edit.

8.1  Editing The .conf Files 

A number of .conf files may require editing to get asterisk to work, depending on the individual requirements.  In this guide, as a base, we will be looking at features.conf, sip.conf, iax.conf (just in case you want IAX, but not really necessary if you are just running SIP), indications.conf, enum.conf, extensions_custom.conf, features.conf, zaptel.conf and modprobe.conf  (the last 2 files live in the /etc directory may need to be edited if you have a FXO card e.g. X100P installed. We will look a them later on under Interfacing Asterisk to PSTN).

8.1.1  sip.conf 

[general]
port = 5060           ; Port to bind to (SIP is 5060)
bindaddr = 0.0.0.0    ; Address to bind to (all addresses on machine)
disallow=all
allow=g729   
; I add this in sip_custom.conf instead
allow=ulaw
allow=alaw
allow=gsm 

; the 2 lines below I added them in sip_custom.conf although
; you can add them in sip.conf

defaultexpirey=600     ; **Engin users: include this if necessary
maxexpirey=3600
          ; **Engin & BBP Global users: include this if necessary 

qualify=yes
progressinband=yes

; If you need to answer unauthenticated calls, you should
; change this next line to 'from-trunk', rather than
; 'from-sip-external'.
; You'll know this is happening if when you call in you get
; a message saying "The number you have dialed is not in
; service. Please check the number and try again." 

context = from-sip-external ; Send unknown SIP callers to this context
callerid =
Unknown
tos=0x68 

; #, in this configuration file, is NOT A COMMENT. This is exactly
; how it should be.
#include sip_nat.conf
#include sip_custom.conf
#include sip_additional.conf
;;#include additional_a2billing_sip.conf

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

sip_custom.conf

language=au
videosupport=yes
allow=g729
allow=g723
allow=h261
allow=h263
allow=h263p 

defaultexpirey=600      ; **Engin users: include this if necessary
maxexpirey=3600        
; **Engin & BBP Global users: include this if necessary

8.1.2  iax.conf

In the general section, add the following lines if it is not already there: 

[general]
delayreject=yes
jitterbuffer=yes   
; I placed this line in my iax_custom.conf instead
mailboxdetail=yes  
; I placed this line in my iax_custom.conf instead

Note: 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_custom.conf

iax_custom.conf

; additions to iax.conf that would not get deleted in you upgrade freepbx
externip = <your fixed external IP> or (one or the other NOT both)
externhost = <your DynDNS name>
localnet = 192.168.1.0/255.255.255.0
languagae=au
delayreject = yes
jitterbuffer = yes

allow=g729
allow=ilbc
allow=g723

8.1.3  Indications.conf

In the general section ensure the following exist: 

[general]
country = au  
;  (The default is country = us, therefore replace “us” with “au”)

8.1.4  enum.conf 

[general]
;
; The search list for domains may be customized.
; Domains are searched in the order they are listed here.
;
search => e164.org
search => e164.arpa
;h323driver => H323  ; this line exists in AAH v2.8

(There should only be the three entries above).

8.1.5  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 include => from-internal-trixbox 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.

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

8.1.6  features.conf

The default features.conf included with trixbox is fairly minimal.  It is recommended that you reflect the following in your features.conf file.  The extra keywords will come in handy later on.

; Sample Parking configuration
;
[general]
parkext => 70           
; What ext. to dial to park
parkpos => 71-79        
; What extensions to park calls on
context => parkedcalls  
; Which context parked calls are in
;parkingtime => 60      
; Number of seconds a call can be
                                                                   ; parked for (default is 45 seconds)

transferdigittimeout =>3 ; Number of seconds to wait (in seconds) between digits
                                                                          ; when transferring a call

courtesytone = beep
                     ;Sound file to play to the parked callerwhen someone dials a parked call
xfersound = beep
                 ; to indicate an attended transfer is complete
xferfailsound = beeperr
     ; to indicate a failed transfer
;adsipark = yes
                  ; if you want ADSI parking announcements
;pickupexten = *8
                     ; Configure the pickup extension. Default is *8
featuredigittimeout = 800
 ;Max time (ms) between digits for
                                                                        ; feature activation. Default is 500

[featuremap]
;blindxfer => ##
          ; Blind Transfer (default is # - change if having
                                                        ; problem with external DTMF that requires #)

;disconnect => **
        ; Disconnect Call
automon => *1
                ; One Touch Record
;atxfer => *2
                ; Attended Xfer

Note: If you are having problem with # when you are calling external number that requires you to input #, you may change the blind transfer key to ## which will solve the problem but you must remember to use ## when you want to do blind transfer.