Asterisk Config
From New Zealand VoIP Users Group
Request for cleanup: This page has been marked as requiring cleanup. Please see its talk page for details of why. You can help the project by cleaning up all or part of this article. If you clean this article up in full, please remove this notice.
Asterisk config files
Asterisk config files are usually found in /etc/asterisk/
Zaptel Hardware
First off you need to configure and load the module for the zaptel hardware and tell it which region you are in so it knows what settings (such as impedance) to use. Using the correct settings is important for two reasons:
- When the card gets a telepermit the telepermit will only be valid if you are using the correct settings.
- Using the correct settings will help stop problems such as echo.
For a 2.6 kernel (which should be common enough these days) you need to edit /etc/modprobe.conf (or /etc/modprobe.d/zaptel on Debian/Xorcom Rapid). For the TDM400P you need to add
options wcfxs opermode=NEWZEALAND options wctdm opermode=NEWZEALAND
(The module changes names from wcfxs to wctdm in the zaptel-1.2 version)
Once you have that sorted you need to setup Asterisk to use the zaptel hardware. Xorcom Rapid and Asterisk@Home provide an automatic configuration utility for Zaptel hardware called genzaptelconf.
Run this with the -c nz option to setup Asterisk to load the correct indication tones for NZ.
This will setup 2 files; /etc/zaptel.conf which is the system Zaptel hardware configuration, and /etc/asterisk/zapata-channels.conf which is included by the main Asterisk Zaptel configuration file /etc/asterisk/zapata.conf
Wether you setup your Zaptel configuration manually or with genzaptelconf, your /etc/zaptel.conf file should contain the following;
loadzone = nz defaultzone = nz
FX Connection:
Once you have an account setup, put the following SIP trunks in as a minimum -contexts etc may change depending on your preferences, but you get the idea:
; outbound trunk [vix_out] type=peer context=from-sipphone host=vix.fx.net.nz
; inbound trunks [vix1.fx.net.nz] type=friend context=from-sipphone host=vix.fx.net.nz
[vix2.fx.net.nz] type=friend context=from-sipphone host=161.29.0.4
[vix3.fx.net.nz] type=friend context=from-sipphone host=161.29.0.228
[vix4.fx.net.nz] type=friend context=from-sipphone host=161.29.0.244
Hostnames have mostly been removed to reduce dependency on DNS, your choice really.

