|
|
Last night my wife harangued me about not having her phone directory installed on our new handsets so she can see who is calling.
She sent me a spreadsheet with all the contacts and their respective numbers. The manual for the S685IP is a little unintuitive regarding the formatting and options for the vcard format so I started doing some digging about.
Firstly, I created a dummy entry in my handset using all the fields I could find. Then I turned on Bluetooth and transferred it to my laptop so I could see what it looked like. The Bluetooth link worked great. I could have got the vcard from the handset via the web interface, but I just wanted to test the Bluetooth functionality. Here it is:
BEGIN:VCARD
VERSION:2.1
N:Lord;Alan
TEL;HOME:XXXX79XXXX
TEL;WORK:XXXX27XXXX
TEL;CELL:XXXX457XXXX
EMAIL:test@testingcentre.com
BDAY:1900-11-01T00:00
END:VCARD
I didn’t find a perfect csv to vcard converter for this structure, although this online one worked pretty well and only needed a bit of local massaging to import correctly. I also tried a rather old but still useful ruby project from sourceforge here, that also worked but left out the vital VERSION:X.X line altogether.
Anyway, as you should be able to see from above, the name field N: takes two parameters separated by a semicolon and does not use the discreet FN: and LN: format. Note that it is last name first.
The rest should be obvious. If you don’t have data for a field, leave the entire field out. I didn’t try sending a blank field to the handset, but leaving the fields out entirely worked just fine.
The only other “gotcha” is that the file containing your vcard data needs to be DOS formatted and not Unix formatted: CR+LF vs LF. If you are on Windows then you won’t have a problem but Linux users will need to use the tofrodos package (Ubuntu users just do sudo apt-get install tofrodos) and run the file through the unix2dos command before sending it to the handset. If you don’t, the transfer fails.
Once you have the format right, using the Web interface on the base station to upload the directory seemed to work absolutely fine. I was able to send a directory containing 70 entries to each handset. It isn’t blisteringly fast (I guess it took about 2 minutes/handset), but it’s a whole lot quicker than typing the entries in by hand!
April 30th, 2008
Categories: Runes and tales | Author: Alan Lord | Comments: No Comments |
Last week I purchased a triple set of the brand new Siemens S685IP telephones. This is a DECT home telephone system with support for both PSTN and VOIP services. I’d spent quite some time looking for a decent replacement for our aging and now unreliable existing DECT handsets.
I bought these from a UK based on-line telephone vendor DSTelecom and their service and price was very good. I’d been waiting for this model to become available for a couple of months and they were offering the best price and the were first to get them in stock too!
There were a few reasons I selected these Siemens phones, but the main one is their ability to act as a basic telephone switch between handsets and incoming services. The Base unit can support up to 8 incoming services: 1 x PSTN, 1 x Gigaset VOIP Network, and 6 further VOIP (SIP) services.
This is the latest release and the handsets support very high quality voice between each other and on compatible networks. They also support Bluetooth so you can use a wireless headset and upload/download your mobile phone’s address book etc.
Here’s my personal review of these new phones for use in our home network. (Just click on the thumbnails for bigger images)
My initial impressions: Nice packaging and a good looking handset.

There are very easy to follow 1st time instructions that get the system installed and running. Once I’d plugged the phones in and got them charging, and base station in to the LAN, the phone started showing me the weather forecast in Lisbon!
Once the physical install is done, you can do almost everything else from the web based interface of the base station. I’ll cover that in detail in a minute.
But first the handsets. When you get them you need to do a first time charge and discharge cycle. The batteries are supplied (a pair of AAA rechargeables). The first full charge took between 3 and 5 hours depending on the handset. To discharge them all, I made internal calls between the phones and put them all on handsfree. It took a good 8-10 hours for them to get fully discharged. So talk-time is excellent.
The first thing my wife commented on when we were talking internally was the voice quality. She said it was brilliant! And having now just had a conversation with her somewhat hard-of-hearing father, he also attested to the much better sound than our previous telephones. So that’s good!
They have a nice big colour screen where you can - apparently although I haven’t done this yet - add pictures to your directory so the phone shows the caller’s face or avatar when ringing.
Anyway, all-in-all my initial impressions of the system was very positive indeed. Now let’s look at how the whole DECT/VOIP thing is configured and what really makes these stand out for a home phone…
Accessing the Web based user interface was easy. Here’s the login screen you first see:

Due to the way I have our home network set-up, I used a static IP address for the base unit. It also supports DHCP however.

Next is to configure some VOIP service providers. For me it’s my Asterisk server… Only one change seemed to be needed to get the registration to work: Add subscribemwi=yes to your sip.conf. I’m not actually sure if this made any difference, as I think I didn’t click the “Active” box first time round. But apparently this setting is needed to get the message waiting light working properly when you are using Asterisk’s voice-mail anyway.

You configure the details for each service by clicking the “Edit” button. Here’s a default screen showing most of the options.

The next section allows you to select the codecs you’d like each service to support and their priority. As you can see again, it’s a simple, clean and easy-to-understand interface.

After that, you are ready to choose which handsets work with what services. I configured my handsets first to give them meaningful names: “Alan’s, Helen’s and Kitchen”. Note also you can upload/download your handset’s directory from here too. The directory needs to be in vcard format. I haven’t done this yet but I can’t see any major obstacles apart from the time it will take to get a csv spreadsheet into vcard.

This is, for me at least, the coolest feature. From this screen, you can choose which handset rings depending on the service it is coming in on. And you can decide which calls use the built-in answer machine and which do not. It’s basic switch functionality and when you stick Asterisk behind this you have a really flexible solution to handling multiple incoming lines and different types of users.
My wife and I both run our respective businesses from our home offices. Now we have individual incoming VOIP lines into Asterisk plus the home PSTN service. Calls for my business ring, my phone and the kitchen phone. Calls for Helen’s ring her phone and the kitchen phone. Neither uses the Siemens Answer machine but the features of Asterisk’s voice-mail system. Calls for the family ring all three phones and use the built-in answering machine. You can configure this any way you wish basically.
Now we have a basic phone system set-up there are various add-on features to play with
Here is the call forwarding screen where for each service you can decide what to do under certain conditions: “When Busy, No Reply or Always”. Simple but this is a home telephone system.

Next, you have a section for creating dialling plans. You have here, the ability to choose which service gets used for particular number sequences. So, for example, you could put in the international prefix for Australia and only allow numbers with that prefix to go via a particular VOIP service. You can also block certain number sequences completely too.
The Network Mailbox screen allows you to configure the voice-mail service for each provider. So for Asterisk that will be the numbers configured in voicemail.conf. This enables the service to work with the handsets so you get message waiting indications and access to the mailbox without needing to know the mailbox number.

Also in the Telephony section of the configuration tree is an “Advanced Settings” screen. This lets you configure the way DTMF tones are handled, SIP and RTP port numbering and a few other odds and sods.

That’s it for the telephony section. Comprehensive, easy-to-use and nicely laid out.
The next area is “Messaging”. The handsets support SMS type texting and there is an option to configure a jabber server (IM). The Siemens Gigaset VOIP network, which you get automatically subscribed too when you buy your phone is the default configuration, but you can change it to your favourite IM network should you wish. Not being a big user of either SMS or IM I haven’t used this. Maybe one of my kids will show me later!
Also under the Messaging section you can configure a POP3 email server. It is for the network, not per handset so I am not sure of it’s value. I suppose for a family who have a single email account it might be useful. But this feature doesn’t really do it for me. If it was per handset or per network service it would make far more sense.
After Messaging come the last few configuration pages.
The first is called “Info Services” and you can, via the Gigaset Network, configure a few somewhat limited network based information feeds. You can enter an RSS feed, or choose a weather forecasting service. The weather seemed more useful for me so I set it to show me the weather for London for the next three days.
The final screen is the ubiquitous “Miscellaneous” settings. Here you can update the firmware directly from Siemens or use a locally stored file. You also get to choose the NTP server for the clock and whether to automatically deal with daylight saving time changes.

That’s the Siemens S685IP phone system. Having had them running for a few days now, I’m very pleased. Everything has worked, call quality is excellent, ease-of-use is superb.
I have come up with a couple of tricks I’d like Siemens to do that would really enhance the overall functionality however. Two are to do with time. And as there is an accurate and network-synchronised clock in the base station, I can’t see this being terribly hard to do to be honest.
- Use the in-built clock to allow you to configure different network connection settings. So, for example, after 6pm, If a call comes in my office number I might not want it to ring the other (our kitchen or family) phone. Perhaps during a weekend also.
- Ditto with call forwarding. After 6pm or during weekends forward calls to my mobile for example…
- Ditto with the dial plans. Being able to route certain type of call via different networks is great, but being able to choose to do it during certain hours would be even better…
- The email and IM features are nice but in my opinion they would be far more useful if it was configurable based on per handset or service basis rather than a single account for all devices.
- Also to do with the email feature; I’d like the option of IMAP as well as POP3.
I’m sure there will be some other ideas that will crop up have as we get used to them, but all-in-all my first impressions are that this is an absolutely cracking phone system for home and small business. When you use this with Asterisk of course, they get even better. Some of the time based features could possibly be got around by some fiddling with Asterisk. If I get chance to work something out I’ll write it up here.
April 27th, 2008
Categories: Runes and tales | Author: Alan Lord | Comments: 34 Comments |
I love this article on zdnet from David Greenfield. It’s a round-up of what’s happening in the up and coming area of Open Source Hardware. According to David,
A burgeoning trend in open source hardware is putting up some devices on the Web — from machines that make anything (including themselves) to cars — with the specs to make them yourself (See our list below). While still in its infancy, the trend could redefine hardware cost models much as its done for software.
And there are some neat really ideas like this one which I have been following myself for a while:
Now that you’ve got Asterisk, what hardware platform will you run the software on? Usually folk settle on a Intel or AMD based-server of one kind or another. You can build your own PBX hardware with the Astfin Project or buy one for just $450 from the Free Telephony Project store.
This Asterisk appliance project has the chap who wrote the brilliant Open Source Echo Canceller I mentioned before in it.
But how about your own, Open Source Car…
Open Source isn’t just for your office. The OScar aims to be the first open source automobile. The goal is to create a utilitarian car that aims to move people from place-to-place sans a lot of the high-tech gadgetry that runs in today cards. Initial concepts call for a four-door, four meter length vehicle weighing about 1000 Kilo capable of reaching 145 KM/hour.
Cool - just the thing to keep a man happy and content in his shed for months. 
January 6th, 2008
Categories: FLOSS in the news | Author: Alan Lord | Comments: 1 Comment |
If you’ve been following the story so far you’ll now where I am. If you haven’t, please go back to Part 1 and read from there. Alternatively if you click on the Untangle tag in the tag cloud then you should get all of the posts so far.
Hi all,
I’ve not yet got any further with the Untangle portion, but pretty much everything else is now in place and working
Last night I built and installed the few remaining applications that are necessary to support my objectives:
- MySQL (I need this for Joomla! and vtiger)
- Postgresql (I need this for untangle)
- Apache
- PHP (and some associated libraries for added functionality, i.e. HTML-Tidy, mm, libmcrypt, mhash…)
I have also been thinking about what it is actually I am trying to achieve. I find a picture really helps so here’s a block diagram of the applications I want and how they should interface to the outside world…

This was a good exercise that helped me to understand the flow of traffic and what needs to be prevented from passing through the server. The dotted line from Apache to the Internet is because I’m not sure yet whether I’ll actually provide any sort of public web presence from this box or not. I doubt it somehow but you never know…
If anyone has any comments or suggestions for improvements I’d be happy to hear them. I made the original diagram in OOo draw. Here’s the original file if you want to use it or alter it. As with all other stuff on here, its CC licensed.
November 15th, 2007
Categories: Runes and tales | Author: Alan Lord | Comments: 7 Comments |
I haven’t written much recently - the day job keeps getting in the way
Anyway - some of my spare time has been used getting Asterisk working just the way we want. The more I play with it, the more I really like it.
We now have multiple voice mail accounts set-up for our various business interests, linked to an Automated Attendant or IVR (which is currently using my voice, but we are hoping to get one of our wives to record the greetings as girls are better than boys!). Once the caller has pressed the appropriate digit on their phone, Asterisk simultaneously calls multiple extensions (some on another Asterisk server connected across the ‘net), and if no-one answers within a pre-defined time, then the call is routed to the relevant voice mail account. The audio message left by the caller is then attached and emailed to one or more recipients depending on how we configure Asterisk and Exim. When the call is initially presented to our SIP phones, not only do we see the caller ID (which we could use to trigger application events in a CRM like vtiger for example), but we also see which business (or choice) the caller selected, thus we are able to appropriately answer the call.
This is a pretty advanced feature set for any PBX. But when you realise it’s running on a box that cost under £200, which also provides file server, content filtering/firewall, and local web based, application services too, and the software costs have been zero, it’s really quite amazing. Obviously for more “serious” telephony you’d want to run Asterisk on hardware that is designed to be ultra-reliable. But still the software is free. However for a home or home-office set-up I would suggest that this is an excellent platform.
The other thing I have just set-up is a free (for me) local rate DID (Direct Inward Dialling) number that connects, via the net, to my asterisk server using the IAX2 protocol. The provider of the service is the not-for-profit organisation http://www.voipuser.org. This is quite an amazing service:
VoIP User is a non-profit community, formed with the intention of creating a base for early adopters, consumers and professionals alike to exchange ideas, discuss new developments and generally experiment with VoIP technology.We have a natural bias toward open standards. In the VoIP space, this is primarily SIP and IAX (Asterisk).
…
When we started building the foundations of what became VoIP User at the end of 2002 there was nothing available to the developer and early adopter that enabled experimentation with PSTN gateways. Of course with the majority of telephone users on the PSTN, only being able to call another VoIP User in a test environment was too restrictive - some form of free access gateway was required.
In order to fill this need we setup a service system provisioning a PSTN/VoIP gateway for public access at no charge. In order to make this possible we created a unique financial model whereby calls outbound from the gateway are financed by calls inbound to the gateway. Every member signing up for access obtains an inbound PSTN number, on which revenue is generated and VoIP User receives a share. It’s that share of revenue that funds the outbound calls.
All inbound funds are credited to a central “pot” which is made available to those members who are making reasonable use of the facility. Excessive use is dealt with by member and number restrictions. We aim to run this in as fair and reasonable a manner as we possibly can but the over-riding principle is it is offered for experimentational use. We are not a VoIP provider. If you require long term telephony services, you will need to look elsewhere. If you’re looking to test a new piece of SIP or Asterisk equipment, you’re in the right place.
As they state, this service is for experimentation and testing but it works, is very easy to setup and has enabled me to test many of the features of Asterisk. If you are going to start experimenting, pay them a visit. And remember incoming calls are charged at the UK local call rate, and as long as you don’t abuse the service, outbound PSTN calls are free.
Back to the grindstone then…
November 9th, 2007
Categories: Runes and tales | Author: Alan Lord | Comments: No Comments |
O.K. I said I’d write a bit about an excellent new echo canceller which happens to work with Asterisk. Here it is it’s called OSLEC the Open Source Line Echo Canceller and it’s written by a chap called David Rowe.
As readers may recall, I’ve built a small home server (VIA CN700) on which I plan to run Asterisk, Samba and Untangle. Samba is up and running and Asterisk is too. I have a single port, very cheap (about £15 inc postage from the USA) x100p card providing an interface to a normal analogue PSTN telephone line.
When we got everything working, we noticed a great deal of echo on voice calls over the x100p. Lots of playing with gains and various settings in the zaptel configuration failed to make any noticeable difference.
I came across this site whilst looking for something completely different and started to read… It sounded like just the thing. A bit of jiggery and a quick patch to the zaptel-1.4.5.1 sources - thanks to the asterisk mailing list - and I got the OSLEC canceller working.
Basically here’s what to do:
- Build the OSLEC module (it will need to find your kernel sources - just like zaptel) according to the instructions on the website. Once built and you’ve checked that you can install it by inserting the module into your running kernel, copy it (oslec.ko) to your kernel’s loadable module directory: on my system the zaptel modules reside in
/lib/modules/2.6.23/misc/ so that’s where I put the oslec module too.
- Patch your zaptel source tree (if you have version 1.4.5.1 you will need to patch
Makefile.kernel26 or OSLEC will never get loaded) and rebuild and re-install as described. (Caution: Backup your /etc/zaptel.conf, /etc/asterisk/zapata.conf and your modified SysV init scripts so you can simply overwrite the default files installed when you rerun make install on the zaptel sources.)
- Edit your zapata.conf so the following are as below:
echocancel=yes
echocancelwhenbridged=no
;echotraining=400
- Reload everything (if in doubt, stop asterisk and zaptel using your SysV init scripts, e.g # /etc/rc.d/init.d/{asterisk,zaptel} stop. Then start them again. When zaptel starts you should see a message saying Echo canceller OSLEC or something like that; if it says MG2 then it isn’t working so you need to go back and recheck your build and patching and module loading.
That’s it.
Now make or receive a call through your cheap x100p card and marvel at the clear echo free sound! It worked brilliantly for me. Of course YMMV but it is definitely worth a try. Most of the reports on the ‘net are incredibly positive about this.
October 30th, 2007
Categories: Runes and tales | Author: Alan Lord | Comments: 1 Comment |
There’s no Untangle in this instalment - I’m awaiting a new kernel from the developers before I can get any further; it should be here shortly however.
In the previous article of this series I mentioned that I’d explain how to get Asterisk built and running as a non-root user. It wasn’t too hard to be honest but I’ll document it anyway.
The problem: Asterisk by default, when compiled from source, expects to be run as root. For userspace applications, this is NEVER a good idea in my opinion. After all we’re running on a multi user system that can support non-root processes - unlike Windows - so we really should…
The solution for Asterisk-1.4.13 on my LFS based system, is as follows:
Build any hardware add-ons and codecs you need before building Asterisk. I built the Zaptel module for my x100p card and the Speex Open Source VBR codec. The zaptel module needs to find your kernel source tree (usually in /usr/src/linux-2.6.x.x). To build the zaptel source:
./configure --prefix=/usr
make menuselect (to select/deselect the modules you wish to build)
make
then as root:
make install
and optionally:
make config This will install the SysV init scripts and some default configuration files. You may need to modify the init scripts depending on your system.
Simply follow a similar process for the Speex codec…
For Asterisk, start off by creating a group and user that will run and own the asterisk process and files (select {G,U}IDs and names that are appropriate for your system).
groupadd -g 75 asterisk
useradd -c "Asterisk PBX" -d /var/lib/asterisk -g asterisk -s /bin/false -u 75 asterisk
Edit the Makefile in the top of the asterisk source tree so that the line:
ASTVARRUNDIR=${localstatedir}/run becomes ASTVARRUNDIR=${localstatedir}/run/asterisk
Then build as normal
./configure --prefix=/usr
make menuselect (Turn on/off various modules and options. Select sound files/language/format and extra sounds. Type “s” to save and exit)
make
Then as root:
make install
Asterisk is now installed. But because we will run the process as non-root it needs write permissions for these directories and their contents:
/var/lib/asterisk, /var/log/asterisk, /var/run/asterisk, /var/spool/asterisk, /dev/zap/*.
If you installed the zaptel modules and used the ‘make config’ command, a udev rules file (zaptel.rules) will be written to /etc/udev/rules.d. This enables, by default, udev to create the zaptel device files as user:group asterisk. If you chose another name above you will need to edit this file accordingly.
O.K., lets sort out the ownership and access to the files Asterisk needs. First change the owner:
chown -R asterisk:asterisk /var/{lib/asterisk,log/asterisk,run/asterisk,spool/asterisk}
Now set read/write only by owner, read only by group and no access by other:
chmod 750 /var/{lib/asterisk,log/asterisk,run/asterisk,spool/asterisk}
chmod -R o= /var/{lib/asterisk,log/asterisk,run/asterisk,spool/asterisk}
This switch (chmod -R o=) is pretty cool by the way. It removes all access to all files and directories for the “other” classification, effectively setting them to “0″ but does not change or overwrite any of the permissions for owner and/or group access.
The asterisk process itself only needs read permission for the configuration directory (/etc/asterisk) and its contents:
chown -R root:asterisk /etc/asterisk
chmod 750 /etc/asterisk
chmod 640 /etc/asterisk/*
Some of Asterisk’s ‘.conf’ files contain cleartext passwords and other potentially sensitive information. Setting the files as above permits read/write only by the user root and read only by members of the group asterisk.
That’s it basically. When you start asterisk from the SysV init scripts, pass the following arguments to have it run, safely, as your new user:
asterisk ${DEBUG} ${ZAP_TIMING} -U ${USER} -G ${GROUP}
In my startup script, I’ve set those constants above to be:
# If you want debug messages to the console and the logs switch the
# comments below
DEBUG=""
#DEBUG="-d"
# The user and group we created earlier
GROUP="asterisk"
USER="asterisk"
# Use this if you want to limit the maximum number of simultaneous calls
# to prevent system failure for example
MAXCALLS=""
#MAXCALLS="-m 20"
# If you have a Zaptel card/timing source, enable it here
#ZAP_TIMING=""
ZAP_TIMING="-I"
That’s it.
When asterisk starts, it will run as the user and group defined above. In the next instalment, I will write a bit about a fantastic new echo canceller which sorts out cheap x100p cards and makes them work properly… It’s really excellent.
October 30th, 2007
Categories: Runes and tales | Author: Alan Lord | Comments: No Comments |
If you’ve been following the story so far you’ll now where I am. If you haven’t, please go back to Part 1 and read from there. Alternatively if you do a search for Untangle in the little search box top-left then you should get all of the posts so far.
I have stalled on Untangle due to kernel issues already well documented on here before. The good news is the guys from Untangle are in contact with me and are working on a new kernel for the upcoming 5.1 release. I am hoping to get something to play with in the next few weeks. And it will most likely be based on a 2.6.22 release which is excellent news as that has direct support for my hardware.
So in the meantime I have been installing Samba - which is fairly straightforward - and Asterisk which is a bit more involved.
As you will know, I am using the Linux From Scratch (LFS) project for this server’s operating system. From the same stable, comes the Beyond Linux From Scratch (BLFS) book that contains many (i.e. hundreds) excellent resources and instructions for installing various applications; including Samba. So I will not go into detail about how to build Samba here. The configuration of Samba for my home network is another subject and I will discuss this further once I’m happy with the set up.
Asterisk, the Open Source PBX, is another ballgame entirely. To build asterisk itself from source is not too hard. From an LFS core, there were no dependencies to satisfy first. If you are on a major distro however, you will certainly need to add quite a few -dev packages to your system first. With Ubuntu they have a meta package called build-essentials which will certainly help. Here is a good starting point for information: http://www.voip-info.org/wiki/index.php?page=Asterisk+installation+tips.
To build asterisk for testing purposes, build and install as root*. As I have an x100p analogue FXO card I need to install the zaptel driver first like this (after extracting the source tarball and cd‘ing into it):
./configure --prefix=/usr &&
make menuselect &&
make &&
make install &&
make config
Both this and the Asterisk build expect your kernel source tree (the headers) to be in /usr/src/linux-`uname -r` by default. The make menuselect command will enable you to select which hardware drivers you need and to disable the building of those you do not. make config will install a rc.d script for init so the card is properly initialised during boot-up. Although I had to hack this a bit to work with the LFS/BLFS boot scripts. Even if you do not have any analogue cards, you are recommended to install the zaptel drivers as they can provide timing a source for Inter-Asterisk Trunks (IAX) and conferencing via the ztdummy module.
Once the zaptel modules are installed, repeat a similar process for the Asterisk source:
./configure --prefix=/usr &&
make menuselect &&
make &&
make install
This should build and install the Asterisk server into the /usr hierarchy with the configuration files in /etc/asterisk and the runtime information and sound files under /var. When you run make menuselect pay attention, you can choose whether to install various language files, codecs, add-on sounds (I installed the extra sound files) and other goodies. Here’s a page that should help you get going once again: http://www.voip-info.org/wiki/index.php?page=Asterisk+Compile.
You can elect to install sample configuration files, by typing make samples. This will basically give you a working PBX out of the box for testing purposes. This is sort-of-useful but the files are very complicated and hard to follow, although they are well commented so they make a good reference. I quickly removed the whole /etc/asterisk directory to somewhere else (to keep for reference) and started from scratch with a clean directory.
Learning how to setup asterisk is time consuming. Then comes that moment when, after reading for hours and looking into lots of text files and learning about channels, priorities, applications and contexts, suddenly the penny drops! It will become clear. But don’t rush it and I would strongly recommend NOT going for one of the packaged appliance builds that come with a GUI front end to start with. Why? Because you will never learn what’s under the hood and you will be limited by the GUI designer’s ideas of what you need to configure. Once you ‘get it’, by all means use a GUI, but not before…
For testing you will need a phone I know. Obvious but it had to be said. There are plenty of SIP phones on the market that are inexpensive, and there are several “soft phones” that you can run on your PC and use a headset, or mic & speakers. I chose to go the soft phone route for now and tried the following three soft phones for Linux.
- Ekiga: Formerly Gnome Meeting. Initially I thought this was great but I have had several weird issues with DTMF and sound quality, so this is on the back-burner for now.
- Wengo Phone: Looks nice, seems to work O.K. but I preferred the User Interface and overall experience of the final one in my list.
- Twinkle: This just works. Has a simple and easy to use interface and is a cinch to setup. My personal favourite of the three (apart from the name, that is.)
These soft phones I used purely for SIP connectivity on my local LAN to the Asterisk server. There are others that can connect to Asterisk using IAX or H.323 but I didn’t try those, nor see a need to.
Here are a couple of resources I found very helpful along the way:
- The voip-info.org wiki for Asterisk
- This excellent short slide presentation (They say a picture paints a thousand words don’t they…)
- This e-book: The “TFOT” Book (If this site is down, google for it. It’s available from lots of other sources)
- And google. There is loads of information out there if you are prepared to look for it.
Along with my business partner who has installed Asterisk on his similarly small and low-powered server, we now have fully networked digital PBX functionality (IAX trunking between our servers), Voicemail (with email notification and forwarding), and Dial-in & Dial-out via the PSTN (through the x100p card on my box). Next is to try conferencing and call parking.
With this little server (shown here with the x100p card installed), I now have Samba, providing a home network file server for all the family, Asterisk running happily and providing advanced digital telephony throughout the house. And all using free and Open Source software. Once I’d bought the hardware, the software costs were zero, and will be zero. How much is Windows Home Server? And more to the point, why do you need it? Oh yes, does it also have a fully fledged enterprise grade digital PBX? And is it secure? (Just like the rest of Windows… lol)
Once I’ve nailed the configuration down and got asterisk running securely*, I’ll post some more on this including configuration details.
* The usual way to install Asterisk from source is by, and as, root. For a test-bed that’s no problem but for a production environment with direct internet connectivity (as this device will have) this is not a good idea. I will spend a little time developing an installation procedure that will install it as a non-root user and with limited privilages. The suggested mechanisms I have found on-line are not quite as I would like them. I try and keep to the FHS where possible and maintain a “tight” ship. This process I will also document once it’s nailed…
October 11th, 2007
Categories: Runes and tales | Author: Alan Lord | Comments: 2 Comments |
If you’ve been following the story so far you’ll now where I am. If you haven’t, please go back to Part 1 and read from there.
I’ve been a bit busy recently so haven’t had as much time as I’d like to crack on with this. However, I’ve actually come to a bit of a halt regarding Untangle due to the kernel…
I managed to get the initial Rake (Ruby’s Make) build scripts to run to completion on my LFS-6.3 system :-). For those who are interested, after editing some of the Rake files for hard-coded environment variables, I had to drop down to the last version 5 release of the JDK. Version 6 is not supported due to the issues mentioned in part 4 of this series.
After the build completed, trying to run Untangle caused it to barf badly. But I wasn’t surprised by this. I hadn’t installed Postgresql, and I discovered I was missing a setting in my kernel config (IP Userspace queueing via NETLINK (OBSOLETE)) which caused this file ip_queue_maxlen to be created in /proc. There was another file in /proc missing too: icmp_frag_accept. It was searching for this, that led me to get to the bottom of the kernel issues.
After some dialogue on their mailing lists, it became clear that the build process was not going to be as simple as I’d first thought. The current version of Untangle (5.0.2) uses a very heavily patched Debian kernel (2.6.16-ck11). The method they use for patching relies on some debian tools which, seeing as I am building on LFS, I don’t have - nor do I really want.
A little side note: In the Untangle kernel, they are using the now infamous CK scheduler from Con Kolivas, that is no longer being developed for, or ported to, the main kernel tree (Google for Con Kolivas to read about the saga). I’m not sure how this will affect the UT project in the long run but it is quite an interesting area of kernel development and fuelled some big arguments.
When I have some more time to concentrate, I’ll try and work out what is really needed and see if I can patch my recent 2.6.22.5 kernel. They are developing a new release of Untangle (5.1) which may well give me what I need anyway; the ability to run other apps on the same platform and a more modern kernel version. Watch this space…
In the meantime, I have managed to get Asterisk installed. It’s a fairly straightforward CMMI (configure, make, make install) install for the needed packages (in build order): zaptel-1.4.5.1 drivers for the x100p card, asterisk-1.4.11 and asterisk-addons-1.4.2.
Configuring asterisk however is another ball game entirely. It is fairly complicated and involves a steep learning curve. Although thankfully, there are plenty of resources available on-line. I strongly recommend to get the Creative Commons Licensed O’Reilly book from 2005: Asterisk - The Future of Telephony which is widely available on-line and is an excellent resource. Also, there are lots of good blogs and other online resources to help you get started.
In addition, you will almost certainly need a SIP phone of some description. I’m currently using the Ekiga softphone as it is open source and happily runs on Ubuntu (it’s gnome based). It was originally called GnomeMeeting.
I can now make and receive calls locally between the Asterisk server and my PSTN line. Next is to try and get it work over a NAT’ed firewall to Alan Bell’s (my business partner) Asterisk server. Using IAX2 (Inter-Asterisk Exchange protocol) seems the way to ge here as it was specifically designed to use a single IP port, as opposed to SIP that uses independent ports (and potentially many of them) for connection management (UDP) and actual call data (RDP). Using SIP requires you to open up hundreds, if not thousands, of ports on your firewall. More reading and learning to follow.
Laterz…
September 27th, 2007
Categories: Runes and tales | Author: Alan Lord | Comments: 2 Comments |
If you’ve been following the story so far you’ll now where I am. If you haven’t go back to Part 1 and start from there.
The server itself is running smoothly and seemingly reliably. Building Untangle (ut for short) is proving somwhat more problematic, although to be honest, it is what I expected.
After fixing a few hardcoded environment variables (JAVA_HOME) in the [m]rakefiles and changing a class declaration from com.sun.java.swing to javax.swing, the build is failing due to some Java declarations which are requesting an unsupported feature. If anyone is interested, here’s a tarball of the build-log so far: Untangle Build Log
A bit of Googling has thrown up some information that using the SwingUtilities2 package is a big no-no. Even in the JDK 5 version. It has been moved out of the way in JDK 6 and is, apparently, unnecessary due to changes in the way swing now deals with anti-aliasing and sub-pixel font rendering.
Anyway, the guys at Untangle are being very helpful, I’ve got subscribed to their developer mailing list and, hopefully, we’ll have a fix soon.
If there are any Java gurus out there who could suggest an alternative way of dealing with this using the JDK 6 release, the error is caused in this try/catch block:
try{ ((JComponent)nameJLabel).putClientProperty(javax.swing.SwingUtilities2.AA_TEXT_PROPERTY_KEY, new Boolean(true)); }
catch(Throwable t){}
or here in the util class:
public static void setAAClientProperty(Component parentComponent, boolean isAAEnabled){
if( parentComponent instanceof JComponent ){
try{ ((JComponent)parentComponent).putClientProperty(javax.swing.SwingUtilities2.AA_TEXT_PROPERTY_KEY, new Boolean(isAAEnabled)); }
catch(Throwable t){}
Meanwhile, I’ve been playing with file systems and sorting out the partitioning to my liking. Reading several articles on-line I have decided to use XFS for the file system on most partitions. According to what I can find, it offers generally better performance and scalability than the more commonly used ext2/3. It certainly takes up less disk space, I gained 4GB on the biggest partition /home: ext3 = 260GB v XFS = 264GB. On the smaller partitions (4.7GB) I gained 100MB when going from ext3 to XFS and lost that silly and irrelevant lost+found directory.
Keep Tuned, and don’t hesitate to comment 
|