Saturday, January 27, 2007

Installing Astribank On TrixBox

Note to windows users: On windows you can get a free SSH client called putty. To paste text on putty, just click the right mouse button (ctrl+v does not work there as expected).

On this manual, the code below (in Italics) should be copied from your browser (usually ctrl+c), and then paste into your SSH client.

These commands should be entered in an SSH connection. The username is root, and the password is the password you defined in the installation:

# stop asterisk
amportal stop
# add new respositories for the Xorcom utilities and drivers:
cat >/etc/yum.repos.d/xorcom.repo << EOF
[xorcom]
name=Xorcom RPM Repository for CentOS and RHEL baseurl=http://updates.xorcom.com/astribank/trixbox/repo
gpgcheck=0
enabled=1
EOF

# remove all zaptel modules
rpm -qa | grep zaptel-modules | xargs -l rpm -e || true
# install new software, this commands may output a lot of text, and at # the end, you should press "y"
yum install zaptel zaptel-modules-`uname -r` freepbx-module-zapauto -y

# start asterisk
amportal start
# done

Now you should connect the Astribank. After 10 seconds you should see the Astribank light flashing. You will also see that /proc/xpp is populated with information about your hardware, and /proc/zaptel will also be
populated.

The next stage is to configure freePBX to recognize the new extensions available by your Astribank ( depends on the model, but may vary from 12 to 38).

1. Now on your Trixbox web interface, click on "System Administration" (the default user is "maint" and the default password is "password")
2. Now click on the "FreePBX" link.
3. Click on the "Tools" menu on the top right.
4. Click on the "Module admin" link
5. In the "Module Administration" page you should enable (at least) the modules "core"
and "Zaptel configuration (zapauto)" and submit.
6. If needed press on the red bar at the top of the screen, and reload the page.
7. On the "Setup" page, choose the "Zaptel configuration" menu and follow the
instructions

Wednesday, January 3, 2007

Installation of Asterisk

INSTALLING ASTERISK:

Now it's time to start having fun with Asterisk. There are two basic ways to
install Asterisk, an official release(at the time of this writing the official
release is 1.2.14) and the SVN_DEV version(development branch).
We recommend using Asterisk 1.2.14.

NOTE: If you want to use release 1.0.8 or 9 we would recommend either
using the CVS_v1-0_Stable branch where the issues are fixed, or patching
your 1.0.8/1.0.9 code with the following patch:

(http://astguiclient.sourceforge.net/experimental_code/localmasq.patch)
- If you do patch your system make sure you put the asterisk version
field for the server on the admin pages as '1.0.11.1'

1. follow these command line steps:
- mkdir /usr/src/asterisk
- cd /usr/src/asterisk

A. if you want 1.2 release (reliable with new features):
- wget http://ftp.digium.com/pub/asterisk/releases/asterisk-1.2.14.tar.gz
- wget http://ftp.digium.com/pub/zaptel/releases/zaptel-1.2.12.tar.gz
- wget http://ftp.digium.com/pub/libpri/releases/libpri-1.2.4.tar.gz

- gunzip asterisk-1.2.14.tar.gz
- tar xvf asterisk-1.2.14.tar

- gunzip zaptel-1.2.12.tar.gz
- tar xvf zaptel-1.2.12.tar

- gunzip libpri-1.2.4.tar.gz
- tar xvf libpri-1.2.4.tar

B. if you want latest SVN_1.2 version (release tree with new patches)
- svn checkout http://svn.digium.com/svn/asterisk/branches/1.2 asterisk-1.2
- svn checkout http://svn.digium.com/svn/zaptel/branches/1.2 zaptel-1.2
- svn checkout http://svn.digium.com/svn/libpri/branches/1.2 libpri-1.2

C. if you want latest SVN_DEV version (not recommended) [1.5 tree]
- svn checkout http://svn.digium.com/svn/asterisk/trunk asterisk
- svn checkout http://svn.digium.com/svn/zaptel/trunk zaptel
- svn checkout http://svn.digium.com/svn/libpri/trunk libpri

- ALL ->
- (1.0 tree)if you want to allow for more than 100 voicemail messages in a
mailbox(warning this will slightly increase memory usage when a call
is in voicemail) edit the voicemail source code file:

- vi /usr/src/asterisk/asterisk/apps/app_voicemail.c
edit this line and change 100 to 999:
#define MAXMSG 100

- (1.0 tree)if you have no X server installed on your Asterisk machine, then you
will need to comment out the gtk console lib(only affects stable tree
and 1.0 releases) edit the voicemail source code file:

- vi /usr/src/asterisk/asterisk/pbx/Makefile
edit this line at the top and just add a hash # in front of it as shown:
#PBX_LIBS+=$(shell $(CROSS_COMPILE_BIN)gtk-config --cflags >
/dev/null 2>/dev/null && echo "pbx_gtkconsole.so")

- cd ./zaptel-1.2.12
- make clean
- make
- make install

- cd ../libpri-1.2.4
- make clean
- make
- make install

- cd ../asterisk-1.2.14
- (1.2 tree) If you want to include Answering Machine Detection ability
you will need to download app_amd.c and amd.conf and alter the
apps/Makefile to compile it properly
- cd apps

- wget http://www.eflo.net/files/app_amd2.c
- mv app_amd2.c app_amd.c

- vi Makefile
replace this line(line 32):
app_mixmonitor.so app_stack.so
with this line:
app_mixmonitor.so app_stack.so app_amd.so

- wget http://www.eflo.net/files/amd2.conf

- mkdir /etc/asterisk
- mv amd2.conf /etc/asterisk/amd.conf
-*OPTIONAL*(1.2.12.1 thru 1.2.14) apply the meetme volume control patch

- wget http://www.eflo.net/files/meetmeadmin_volume_control.patch
- patch -p1 < ./meetmeadmin_volume_control.patch
- File to patch: app_meetme.c - cd ../
-(1.2 tree) apply the cli delimiter patch
- wget http://www.eflo.net/files/cli_chan_concise_delimiter.patch
- patch -p1 < ./cli_chan_concise_delimiter.patch
- File to patch: cli.c
- make clean
- make
- make install
- make samples # this makes sample conf files (only use for new installs)
- (1.2 tree) EXPERIMENTAL!!! If you want to use app_conference
instead of meetme for VICIDIAL then follow these instructions
- cd /usr/src/asterisk
- wget http://www.eflo.net/files/VD_app_conference_0.6.zip
- unzip VD_app_conference_0.6.zip
- cd app_conference
- make clean
- make
- make install
- modprobe zaptel # this loads the zaptel module
- install the module for the digium device that you are using, we are using the T100P
single span T1 card so we use:
- modprobe wct1xxp
Here's the list of all digium cards and the modules you use with them:
Card Module
-----------------
TDM400P wctdm
X100P wcfxo
TDM* wcfxs
S100U wcusb
T100P wct1xxp
E100P wct1xxp
T400P tor2
E400P tor2
TE110P wcte11xp
TE410P wct4xxp
TE405P wct4xxp
TE411P wct4xxp
TE406P wct4xxp
TE210P wct2xxp
TE205P wct2xxp
TDM2400P wctdm24xxp
- If you have chosen a Sangoma T1/E1 or analog card, you will need to
follow their instructions for installation of their driver software
LATEST Sangoma Wanpipe drivers:
ftp://ftp.sangoma.com/linux/current_wanpipe/wanpipe-beta4-2.3.4.tgz
- now your asterisk installation is built and loaded and it's time to configure it.
NOTES: If you want to install zttool diagnostics you may need the newt package installed:
- wget http://www.freedomphones.net/files/newt-0.51.6.tar.gz
- gunzip newt-0.51.6.tar.gz
- tar xvf newt-0.51.6.tar
- cd newt-0.51.6
- ./configure
- make
- make install
- cd ../ - ln -s /usr/lib/libnewt.so.0.51.6 /usr/lib/libnewt.so.0.51
then go to your zaptel folder and do 'make zttool'