Asterisk Basics, and Load Balancing via DUNDi
IMPORTANT: The configurations, that is, the code sections underneath are not wrapped. However, if you want to copy paste them, you can just select them and despite they being not visible to you, they’ll get copied into the clipboard. Otherwise you may want to refer to the PDF version.
Prepared by : Vivek Kapoor http://exain.com
Prepared on : 01 July 2010
PDF Version : Asterisk_Basics_Load_Balancing_DUNDi_Vivek_Kapoor
Purpose of this document
Asterisk is an open source PBX. Which means, you can setup your own little telephone exchange in your home/office environment. On a much larger usage, you may look forward to setting up a redundant phone setup wherein multiple boxes are interconnected with each other and provide some sort of failover capability and easier management, which is possible through something called DUNDi. This document aims to provide such a solution with a possibility of horizontal scaling instead of vertical scaling. So, this may mean that by using low-end commodity hardware, you can setup a strong telephone infrastructure which can cater to thousands of users.
Read the document carefully. Read it fully before you start implementing it. It is intentionally detailed so that you know what you’re doing.
Acknowledgements
All credit of this document goes to JR Richardson. I’m afraid I’ve not been able to find a suitable link for him, but his whitepapers and presentations are the ones which helped me move forward. And of course, Mark Spencer – the guy behind Asterisk. Without him this document wouldn’t have existed.
The writings by JR Richardson
- http://www.voip-info.org/storage/users/813/47813/images/1654/DUNDi_So_Easy.pdf
- http://atlaug.com/stuff/Presentations/Astricon06/JR_Richardson_Whitepaper.pdf
Read more…
Board800 now on Twitter!
Now also get updates of Board800 on Twitter
Board800 – My first Flex and Red5 Application
A few months back I was not even aware that it was now possible to do Adobe Flex development on Linux. Adobe has made the Flex SDK freely available, and Red5 is the media server which can easily integrate with a Flex application.
The possibilities are endless, and I personally feel that this is the way future applications would be developed. What I thought Java Web Start could have achieved (had it been a bit faster and the plugin etc. didn’t involve huge download and cumbersome installation), now I see that in Adobe Flex.
Regardless, I spent last few months working on a Flex application, and it has now culminated into what I’ve named as Board800 (http://www.board800.com). It is an interactive multi-user whiteboard application, on the lines of Dabbleboard, though much simpler. You can use it to collaborate with other users, and also *purchase* it if you wish to deploy it on your own servers. Go check it out now! http://www.board800.com
WikiReader – End of the World doesn’t scare me now!
I got my shiny new WikiReader. For the uninitiated, it’s the entire Wikipedia (well, atleast the textual content of entire Wikipedia in English language) stored on a memory card (MicroSD), and visible from inside a touch screen device.
I have always been fond of encyclopedias – when I was a kid, I loved the World Books, then when I grew up and got familiar with computers, had heard of Microsoft Encarta – but I think since childhood I wasn’t a big fan of MS, so went ahead and bought IBM Worldbook CDs. It was amazing, and helped much in the school projects.
Now, at this date, I’ll admit I am getting a lot paranoid. That is more related paranoia associated with 2012, End of the World and what not. I have always believed in stuff which is WITH YOU and in your reach WHEN YOU WANT. Internet is something which scares me – a lot of stuff I “need”, which is there, but as soon as you get offline, all’s gone (well, this scare has prompted me to setup 3 different ISP connections at my home, apart from the mobile wireless internet). I don’t want that. I had been attempting to understand and planning that I”ll download the entire Wikipedia some day, and set up on my machine so that I can access it offline. Well, it would have been cumbersome and real painful. I couldn’t believe when I read about WikiReader, and I realized that’s the device I need (originally I’d been reading about Openmoko and FreeRunner). So, I found out the dealers in India (IDA Systems), and immediately placed the order.
I have been so happy with the purchase that now I can concentrate on the other survival tactics for EoW
I don’t think anyone wouldn’t want knowledge at their fingertips, in such a convenient and cheap manner. If you don’t have WikiReader, then I think you’re missing out on a lot of stuff that you could’ve learnt.
Phillipe Starck – angle of vision
I saw a post about Philippe Starck on raising the angle of vision at http://deepikadutta.wordpress.com/2009/03/15/designers-raise-the-angle-of-vision/
MUST SEE! – check out the “catch” while raising your angle of vision
Booting Ubuntu without Monitor plugged in / switched off
There is a major issue with Ubuntu partly due to BulletproofX and the X window system, which requires the presence of a monitor for X window to start. If the monitor is switched off, or is not connected, then Ubuntu / X would not be able to detect it and thus would go into “low graphics mode”. So, basically your GDM would not start.
There are two scenarios in which the monitor is not connected / switched off
- You wish to save energy and thus switch off the monitor, and then remotely reboot the machine
- You have Ubuntu running as a Server and thus no dedicated monitor is connected to it and you remotely reboot the machine. Specially, if you have automatic login enabled along with Remote Desktop (vino/vnc) enabled, and rely on Network Manager to start your session (through Wifi perhaps). In this case, Ubuntu would go into low graphics mode, and your network manager would not be able to assign you an IP, and you have lost complete remote access to the machine. Isn’t it pathetic?
I am still not aware on how to take care of the first part, that is, monitor switched off intentionally by you.
However, if you are running Ubuntu as a server and have/need a GUI, then the solution is here. Thanks to nikgare / http://ubuntuforums.org/showpost.php?p=7681232&postcount=8 for the pointer.
- Modify
/etc/X11/xorg.confand remove all content and add the following
Section "Device"
Identifier "Configured Video Device"
Driver "vesa"
EndSectionSection "Monitor"
Identifier "Generic Monitor"
HorizSync 58-62
VertRefresh 75-117
EndSectionSection "Screen"
Identifier "Default Screen"
Device "Configured Video Device"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x768"
EndSubSection
EndSection
- You also may want to disable Bulletproof-X by modify /etc/gdm/gdm.conf and commenting out the line
#FailsafeXServer=/etc/gdm/failsafeXServer
Now reboot, and X would start without monitor plugged in.
Skype Video on Ubuntu 64 Bit
I was very happy when I had got my new Core 2 Duo E8400 processor. I immediately installed Ubuntu Jaunty 9.04 64Bit on it. Everything I wanted to use worked, except Skype. After a lot of research, I did manage to install Skype, but the Video always gave a green screen, and crashed when I started the video. Here’s how to make it work successfully.
- Download the Skype for 64Bit Ubuntu OS. It is not a true 64Bit version, but manages the dependencies well. http://www.skype.com/go/getskype-linux-ubuntu-amd64
- Sign In to Skype and see all works as per requirements. You may need to go to Skype Options and fiddle with the Audio settings and select your audio card instead of pulseaudio.
- Through Synaptic, install lib32v4l. Through console, you can do apt-get install lib32v4l
- Download skype.start script (right click and select Save Link As) and save it in the /usr/bin directory. You may need root privileges for that. Otherwise save it on your Desktop, and use it to run Skype with Video compatibility. The privileges of the script need to be made executable. Through console you can do chmod 755 /path/to/skype.start and through GUI you can right click on the file, select Properties and under the Permissions tab, select “Allow executing file as program”. Remember, you need to start skype.start and not skype for the video to work.
The new version of Skype probably will fix the issues. There has been a long thread on Skype Forums regarding Linux this where the developers have promised that it will be out “Real Soon Now(tm)”. However, a month and a half has passed. Regardless, the solution works for voice and video both, and I’m happy using it.
And yes, if you need the content of the skype.start script, here it is
#!/bin/bash LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so /usr/bin/skype
Have fun Skyping!
Auto shutdown KVM Virtual Machines on system shutdown
Update August 2010: It does not always work as expected. Though this method works well if the server is Ubuntu 8.04 or Ubuntu 9.04, but the shutdown script never get called in Debian Squeeze. Maybe a better init script would be required for newer versions.
I have been using KVM for virtualization for quite some time now, probably more than a year. Though the initial use was on the servers which were rarely shutdown, now I’ve started using it in my home envir0nment where frequent restarts or shutdowns are there. The challenge that I faced was to automatically shutdown the KVM virtual machines when the system was shutdown or restarted.
Thanks to Joern at linux-kvm.com, I was able to setup a script which does an auto shutdown of the Linux (basically any VM which has ssh available) machines. I am using it on Ubuntu 9.04 (Jaunty Jackalope) 64 Bit Desktop edition.
Steps
- Add the host file entries
- Make sure you are able to do ssh without entering any password from root into the VMs
- Put the script into the /etc/init.d directory.
- Test the script before rebooting the system
- Reboot the system to check if it worked
Read more…
Searches in Google show all sites to be Harmful
Probably a bug in Google’s search engine (http://www.google.co.in), all the searches showed the message “This site may harm your computer.” today, 31 January 2009 20:22 Hrs IST (GMT +0530). I thought, one of the rare things like this should be on a blog

Google India - All Sites are Harmful for your Computer
Howto – Fujitsu U1010 (U810) UMPC and Ubuntu Linux 8.04 Hardy Heron
Few weeks back I purchased a Fujitsu U1010 (U810 in US market). It ran Windows Vista. Though I have been using Ubuntu for all my computing needs, I thought let the UMPC run Windows much like my Nokia runs Symbian. However, in a matter of few days I got fedup with Vista and decided to install Ubuntu 8.04 – there were challenges, and fortunately with the help of some good souls on internet, I overcame majority of them. Now the UMPC is running full-time Ubuntu Linux.
Disclaimer
The steps mentioned below may not be suitable from security point of view. Please use them at your own discretion. I take no responsibility for anything done to your machine by following the instructions below.
Tasks covered
- Installation of Operating System
- Touchscreen Configuration using evtouch – Not perfect though
- Switching On/Off of Keyboard Lights/LEDs/Headlights
- Rotating the screen
- Associating the keys / , // , and Screen Rotate on the panel with their desired functions, that is, switching on keyboard lights, running handwriting recognition application and rotating the screen.
- Using the Webcam – still painful
- Putting the system into suspend and recovering from it successfully.
Much Thanks to
- Julian Brown – http://panic.cs-bristol.org.uk/~jules/fujitsu-u810-debian-install-notes.html – Without him, the most important feature for me, the Keyboard lights, would not have worked.
- Nathan Eckenrode (n8k99) and LordOfThePigs – http://so.nacreo.us/2007/12/touch-me-i-sick.html – For touchscreen configuration and a shell script for screen rotation
- zmiq2 – http://www.umpcportal.com/modules/newbb/viewtopic.php?topic_id=2202&forum=16&post_id=16973 – For an excellent tip on Suspend and Resume.
