Wednesday, March 31, 2010

SIP Phone Configuration

Following the steps starting on page 110, (in /etc/asterisk/)
mv sip.conf sip.conf.sample
touch sip.conf
nano sip.conf
Added the lines:
[general]
[1000]
type=friend
context=phones
host=dynamic
The book is a little confusing at this point, vsftpd is already installed, but I followed the directions...
anonymous_enable=NO
was changed in the vsftpd.conf file, then
groupadd PlcmSpIp
useradd PlcmSpIp -g PlcmSpIp -p PlcmSpIp
passwd PlcmSpIp

However,
vsftpd/vsftpd.chroot_list

doesn't seem to exist?

Zaptel Shelved (Again)

After reading some more about Zaptel and its purpose in the Asterisk system (and given the error I mentioned when trying to compile it yesterday) I don't think it is needed for a pure VoIP system. From the book:
For the first few sections on FXO and FXS channels, we’ll assume that
you have a Digium TDM11B kit (which comes with one FXO and one FXS interface).
This will allow you to connect to an analog circuit (FXO) and to an analog telephone
(FXS). Note that this hardware interface isn’t necessary; if you want to build an IP-only configuration, you can skip to the section on configuring SIP.
I figure that if it ever gets to the point where this is important,
  • We'll be working on our own box
  • We'll get to choose the Linux distro to install on the box (CentOS would be nice, as there is a ton of documentation in the support archives for CentOS and not for much else)
  • Analog connections might not be necessary in the first place
  • Being on our own system opens up the possibility of installing AsteriskNOW, which provides a GUI and does the work for you (but requires installation from a CD)
For now I'm ignoring the Zaptel instructions, unless I'm missing something important as to if it's necessary or not?

Asterisk Start/Stop

Since I did the make config command, asterisk can be started and stopped with
service asterisk start
service asterisk stop
(More so I don't have to scroll through the book every time I forget)

Tuesday, March 30, 2010

More Installations

-Tried to actually install Asterisk;
cd /usr/src/asterisk-1.6.2.6
make clean
./configure
However there were errors:
configure: *** XML documentation will not be available because the 'libxml2' development package is missing.
configure: *** Please run the 'configure' script with the '--disable-xmldoc' parameter option
configure: *** or install the 'libxml2' development package.
-Installed libxml2 2.7.7 according to these instructions, but still got the error- installed in the wrong place?

-Tried
./configure --disable-xmldoc
and got the ascii-asterisk logo.
(Which is probably a good thing)

-Did
make menuselect
make install
and got...
+---- Asterisk Installation Complete -------+
+ +
+ YOU MUST READ THE SECURITY DOCUMENT +
+ +
+ Asterisk has successfully been installed. +
+ If you would like to install the sample +
+ configuration files (overwriting any +
+ existing config files), run: +
+ +
+ make samples +
+ +
+----------------- or ---------------------+
+ +
+ You can go ahead and install the asterisk +
+ program documentation now or later run: +
+ +
+ make progdocs +
+ +
+ **Note** This requires that you have +
+ doxygen installed on your local system +
+-------------------------------------------+
-Ran
make samples
make config
-Decided to install Zaptel anyways since the book references it everywhere and seems to imply that it won't work without.
cd /usr/src
wget http://downloads.digium.com/pub/zaptel/zaptel-1.4-current.tar.gz
tar -zxvf zaptel-1.4-current.tar.gz
-Downloaded and installed libpri
wget http://downloads.digium.com/pub/libpri/libpri-1.4-current.tar.gz
tar -zxvf libpri-1.4-current.tar.gz
-Tried to compile Zaptel;
cd /usr/src/zaptel-1.4.12.1
make clean
./configure
make
...at this point I got an error:
You do not appear to have the sources for the 2.6.32.1-rscloud kernel installed.
exit 1

Clean Up

Moved old tars and .debs to a holder directory.
cd /usr/src/
mkdir old-install-files
mv *.deb old-install-files
mv *.tar.gz old-install-files

Loose Ends

I mentioned that a couple of things in the initial required packages hadn't been installed yet, I took care of the rest of them today thanks to the Asterisk Tips for users of Ubuntu.

-newt-devel (optional) installed:
apt-get install libnewt-dev
-zlib-devel (optional) already installed.

-unixODBC, unixODBC-devel installed
apt-get install unixodbc unixodbc-dev
-OpenSSL already installed.

Linux Headers Figured Out (I think)

After much digging (and learning that the server is amd64 and not i386 after trying to install the i386 package), the Linux Kernel Header problem from earlier should be solved now.

I had to dig through the Debian software packages to find the right files, of which I needed 3:
linux-headers-2.6.32-4-common_2.6.32-10_amd64.deb
linux-kbuild-2.6.32_2.6.32-1_amd64.deb
linux-headers-2.6.32-4-amd64_2.6.32-10_amd64.deb
...all of which were available at
http://ftp.us.debian.org/debian/pool/main/l/[filename].

I used
dpkg -i [filename]
to install them.

More Package Installation

-Ran apt-get update to make sure Ubuntu was updated (following general instructions here)


-Trying to figure out the Linux Kernel Header business...
cat /proc/ver
yields:
Linux version 2.6.32.1-rscloud (root@builder.slicehost.com) (gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9) ) #15 SMP Mon Feb 22 13:22:15 UTC 2010
However
apt-get install linux-headers-`uname -r`
unsurprisingly gives the error
E: Couldn't find package linux-headers-2.6.32.1-rscloud
Tried various combinations of "apt-get install linux-headers-2.6.32***" without success. Left alone for now, but possibly not needed? Will come back to this later. It also might not be possible to install things like this on the VM.

-Following instructions here (which after some Googling seem to be applicable to the cloud setup)...

-Downloaded Asterisk 1.6.2.6 (in cd /usr/src)
wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.6.2.6.tar.gz
tar -xzvf ./asterisk-1.6.2.6.tar.gz

-Downloaded the add-ons
wget http://downloads.digium.com/pub/asterisk/releases/asterisk-addons-1.6.2.0.tar.gz
tar -xzvf ./asterisk-addons-1.6.2.0.tar.gz

-Downloaded and installed libmxml
wget http://ftp.easysw.com/pub/mxml/2.5/mxml-2.5.tar.gz
tar –xzvt mxml-2.5
cd mxml-2.5
./configure
make
make install
-Downloaded ilbc codec
cd /usr/src/asterisk-1.4.22.1/codecs/ilbc
wget http://www.ietf.org/rfc/rfc3951.txt
wget http://www.ilbcfreeware.org/documentation/extract-cfile.awk
awk -f extract-cfile.awk rfc3951.txt
Zaptel apparently not needed as we can't add a Digium card.

Taking a break for a while.

Monday, March 29, 2010

Starting out...

Tried to install the necessary packages listed on page 67 of the book.

-Successfully installed gcc.

-The ncurses-devel package is covered in libncurses and libncurses-devel for Ubuntu, both of which were successfully installed. Followed instructions from here.

-libtermcap-devel not found

-Kernel Development Headers not found

-gcc c++ not found (but already included with Ubuntu)

-OpenSSL (optional) not attempted

-newt-devel (optional) not found

-zlib-devel (optional) not found

-unixODBC; unixOBDC-devel (optional) not found

-libtool installed successfully

-GNU make already included with Ubuntu

Several of these packages have alternates as suggested on the page I linked to above (Asterisk Tips for...Ubuntu) but I didn't have time to go through them properly tonight. I'll take a closer look at it tomorrow.