Haven’t posted a little tip to my blog for a little while, so here goes.
When people call me on my preferred number, I have it call my desk phone, the land-line via an ATA, my mobile via sip if I am at home, and should that not work, my mobile via GSM after five seconds of no answer in the home. To stop people giving up listening to the ring-tone whilst the phone connects to my mobile I decided to replace the ring-tone with some music, using the built in music-on-hold feature in 1.4.
You can do all of this within the default sounds which come with Asterisk 1.4, including a snippet which says, “Please hold whilst I try to connect you to the person you are trying to reach.”
The magic to make it work is similar to :
exten => x,1,Answer()
exten => x,2,Playback(followme/pls-hold-while-try)
exten => x,3,Dial(SIP/spa&SIP/deskphone&SIP/mobile,55,m)
[drop your voicemail options after this]
The ‘pls-hold-while-try’ is a default sound which ships with 1.4. The magic configuration which says to play music on hold instead of the ring is the ‘m’ option in the ‘Dial’ command. You can turn a stereo mp3 into something which will play as music on hold with the ‘sox’ command (there is a Debian package of the same name).
sox -V musiconhold.mp3 -r 8000 -c 1 musiconhold.gsm resample -ql
Then just drop this gsm file into /var/lib/asterisk/moh/ (change /etc/asterisk/musiconhold.conf if this is no good).
Sometimes I get quite excited about technology when I see something which might change
my life. I was excited about Bluetooth, and it really has made things good for me, thanks to bluetooth I have a GPS-cum-bluetooth speaker/mic in the car, my diary on the mac and phone are up to date, I can set up printers with zero effort, and until getting a USB dongle, I could connect to the internet on the move very quickly and flexibly.
I nolonger connect to the internet via bluetooth and my mobile, because bluetooth gives quite poor response compared with a usb dongle. For the same reason, I can’t really dump photos straight from my camera to laptop (data transfer is too slow), or stream media between devices. Being able to transfer files at high speed is really useful, and at the moment you have to reach for the LAN most of the time to do this, but yesterday I was introduced to Wireless USB.
Now I am really excited about what this might do. 480Mbps at a 3m range is an ambitious target, but I think we will get this performance in time. A softphone and usb handset for voice would really change the way I work on the move, and something which spoke wireless USB and had a CF interface would change the way I use digital camera equipment for the better.
Shall be keeping a close eye on the spec!
There has recenly been a big bruhaha on the O’reilly Sys-Admin blog started from this post by Luke Kanies.
He argues that the development of the IDE and framework has enabled the software development industry to evolve, and that a lack of similar tools for systems administrators is keeping our industry in the computational dark ages.
Now, he just so happens to be writing a systems administration framework called Puppet which will meet those aims. Written in Ruby (uh oh), this tool will centrally manage system configuration.
Talking further, Luke offers help and advice to your employer, “If your sysadmin is using CDs to build servers, s/he should be fired. No ifs, ands or buts”. Can we inferr from this that Luke wishes that every Unix system in the world should be homogenous?
His argument is argued from an invalid premise. The sys-admin field evolves each time we can use a new hardware technology, new OS features, and find new ways to squeeze more and more performance from our systems.
Selecting the perfect hardware for the job, building a locked-down tight installation, and ensuring commonality via configuration management and monitoring, leads to flexible installs, security and the best performance. I strongly encourage my competitors to only want to learn one system, and better still – only be able to deploy configuration changes through a framework – an ignorance to how the OS works will mean they forget how to debug problems when they occur!
This describes a problem that I reported to the SER developers mailing list, and from the replies, I don’t think this will be fixed soon, hence this post for the search engines to find.
The SER plugin which supports MySQL does not build against current 5.0 versions, complaining ‘undefined symbol _pure_virtual’. Fixing that earns you a similar error, ‘undefined symbol: log’.
The fix is easy, you need to change the Makefile and add links to mygcc and maths libraries – change line 20 of the Makefile (current ver 1.26.2.1) from ‘-lmysqlclient -lz’ to ‘-lmysqlclient -lz -lm -lmygcc’