Chronolisme.Com

An all new world. My World.

Browsing Posts in Projects

When I first started this project I wanted to document my progress live on this blog but I’ve forgetten. So I’ll start off half way. (Which my primary objectives in this project is already complete, the secondary objective is the hard part, obviously why I made it secondary)

I’ve already got Asterisk working on normal Softphones which it can now called each other.

OpenVPN is also already working by being able to connect both sides (Australia and Malaysia).

I’ve tested voice talks with my sister who’s currently in Malaysia, voice quality isn’t bad afterall, seems like there’s future for my project, really happy.

What I’m currently stuck at now is chan_mobile. I am finally able to get it installed into Asterisk as an add-on after much trouble and countless research. The only thing now is that it couldn’t pair with my phone. Whenever Asterisk tries to pair it with my phone, and when I enter the passkey, it fails without a reason.

Today, I stayed back at the office in order to work on this. It’s 6:30pm now, way pass my office hours and I’m still here. Because the stupid Internet connection back at home ran out of quota and it’s shaped, sucky connection it is.

  • 5:30pm: In order to solve my problem, I figured out I should reinstall everything from scratch, except this time I try to have Bluez installed from the Synaptics Package Manager instead of downloading the source code and installing it myself. I remember that Ubuntu comes with a bluetooth applet that existing on the top right corner of the screen when I have a bluetooth adapter plugged into the VM. It disappeared after I had all Bluez stuff compiled and installed. I’ll work from there to see if I can find out anything.
  • 6:00pm: I finally got Asterisk compiled and installed. Now I’m trying to install required Bluez stuff in order to make Asterisk-Addons install –with-bluetooth.
  • 6:30pm: Installed all the Bluez stuff I can find on the Synaptics Package Manager, doesn’t seem to be able to install Asterisk-Addons –with-bluetooth yet. Now I’ll try to download bluez from the website and try again.
  • 6:35pm: Successfully ./configure asterisk-addons. Will try and install it now.
  • 6:37pm: Installation with make install was a success as expected. Now will try to setup chan_mobile to see if pairs my phone.
  • 6:40pm: hcitool scan command gives me an error saying hcitool: error while loading shared libraries: libbluetooth.so.3: cannot open shared object file: No such file or directory. Wonder what I should do now… Let me think for a minute…
  • 6:45pm: Seems like everything regarding the hcitool command throws the same error. Something is wrong with Bluez.
  • 7:00pm: Not really sure what’s wrong. Tried reinstalling bluez-hcidump from the Synaptics Package Manager but no help. Tried rebooting, not helping. Will try to download the bluez_hcidump and install it. Might help. No idea.
  • 7:02pm: Did not help, let’s try downloading the bluez-firmware as well.
  • 7:04pm: Still not working dammit. Wonder what’s the problem here…
  • 7:09pm: I cd my way to /usr/bin/ and found libbluetooth.so.2 instead of libbluetooth.so.3. I suspect it’s a version problem due to the fact that there are two versions here. Lets see if uninstall everything and only install the newer version one works.
  • 7:13pm: YES! It did work! Now working on setting up chan_mobile!
  • 7:24pm: Done setting up chan_mobile. Now trying to pair them.
  • 7:30pm: Pairing still fail, but this time it seems like it really is trying to pair. Although it is not successful now but I can feel I’m getting close to it.
  • 7:41pm: OMG WTH! I CAN’T FREAKING BELIEVE MY EYES! IT HAS PAIRED! WOOHOO! I looked at the interface and realised that the applet had disappeared again, so I decided to give the bluez-gnome a reinstall at the Synaptics Package Manager. The applet reappeared. Pairing the phone will ask me for a passkey through the applet, and by typing in the passkey paired the device and the pc. Will throw in my configs in a moment to test if I can make calls through this device.
  • 8:00pm: Completed my config migration, testing seems to show that calls can made through device from the computer, however I could not hear a sound…
  • 8:15pm: Alright, I’m feeling hungry already. Gonna go home and cook now, guess that’ll be all for today.

This time, I’m gonna talk about the basic setup of my entire project.

In my previous post about this “project” of mine, I mentioned something like reusing my existing server (which died right before I left the country) in order to handle the VPN, Asterisk and other stuff. After much reconsideration, I’ve come to a conclusion that the existing hardware that I have will be too outdated to do all that I need. Afterall, what I’ll be doing will require the use of multiple VMs running simultaneously while having encryption on most of the connections which will also require much processing power to encrypt and decrypt data packets. So, I’ve decided to do an upgrade on its hardware.

The new hardware would consist of a dual-core processor, 2 GB of RAM and a new Hard Drive. I wouldn’t go in detail in this, I’m just mentioning this so that you have an idea what kind of hardware would work best here.

First, I’ll start with the OS.

For my server, I will be using Windows XP Professional as the host OS. In case you don’t speak geek, host OS means that it will be OS that loads up when you start the computer, any other OS that you start up later as Virtual Machines (VM) after the host OS boots up, are called Client OS. The reason I choose MS Windows as my host OS is because there are a couple of things that I think it does better (or easier, maybe) than Linux. For example, remote desktop. For a computer that I will leave approx. 6,452 kilometers away from me, I need maximum control over it, and Windows provide the great Remote Desktop application readily available on Windows XP. It is easily configurable and provides great help when something goes wrong with the server, having able to look at it like as if I’m just infront of the computer, is just simply wonderful.

Remote Desktop in action.

Remote Desktop in action. (Click to enlarge.)

Another great thing about Windows XP is the ease of creating a network bridge. Again, for those who do not speak geek, in less geeky terms, network bridging, means putting 2 networks together and making them look like they’re from one network. The reason that I need this network bridging is mostly due to the fact that I want my VPN clients (more on this in the future) that connect to the server and all the VMs that I have on the server to appear as part of the original network I had at home instead of being on a separate network.

A bunch of network interfaces bridged together. (Click to enlarge.)

A bunch of network interfaces bridged together. (Click to enlarge.)

In order to bridge a couple of network interfaces together, just simply highlight the interface in “Network Connections” of Windows XP, right click, and create a network bridge.

Now that I’m done talking about the host OS, it’s time to talk about my VM client OS.
Operating System: Ubuntu Linux v8.04 (Hardy Heron)
RAM: 512MB
HDD Space: (Undecided, depends on the size of the HDD I’m getting)

Now, the specs that I listed above is the spec for the VM client that I’m installing. When creating a VM, you will be given the choice to allocate a certain amount of RAM and HDD space to the VM from the host computer, which, as a result, that amount of RAM or HDD space will be used up whenever your VM is started on the computer. Since Ubuntu Linux is considerably lightweight compared to MS Windows, 512MB will be sufficient. It doesn’t really matter what amount I put in now because I can change this amount anytime (not for the HDD space though, not always the case).

Those on the left side are the VMs I have in VirtualBox.

Those on the left side are the VMs I have in VirtualBox. Yup, I have 5 VMs installed. (Click to enlarge.)

In order to create VMs, I’ve chosen Sun VirtualBox as my VM software. I don’t need much reason to do this simply because VirtualBox is Open Source and it’s free. Creating a VM in VirtualBox’s GUI is very easy, as long as you speak English, you won’t have a problem.

Ubuntu running on VirtualBox.

Ubuntu running on VirtualBox. (Click to enlarge.)

In the picture above, you can see how a VM is started when using a Graphical User Interface (GUI). But think about it, when you’re using a VM as part of a server, you don’t need a GUI to be showing up all the time, plus, having a GUI loaded consumes a lot of RAM, and that is a very undesirable situation considering that RAM (on servers) is never enough. So in order to solve this, I will have to start the VM without the GUI, and this is what we IT geeks call “Headless”. It is a way of start and using an application, in the background. To achieve this, I will have to use an application call the VBoxHeadless that comes with the VirtualBox installer, but left unmentioned in the entire GUI.

To use this application, you will have to fire up your “Command Prompt” (in Windows) or “Terminal” (in Linux/Macintosh).

Note: If you’re on Windows, you’ll have to cd(Change Directory) your way to “C:\Program Files\Sun\xVM VirtualBox\” before proceeding to the next step.

Now type in:
VBoxHeadless -startvm "Your VM Name"
Without the quotes. Then hit Enter/Return.

In my case, it will look like this:

This means that the VM is now running on the background, without the GUI. It will start up as usual and run the services that you have deployed to it, without the interface, thus saving RAM.

In my next post, I’ll talk about my OpenVPN configurations and how to control my VMs in headless mode with OpenSSH.

VoIP Project: The Plan

2 comments

Ever since I started work, I’ve been exposed to many more things that I’ve never touched, one of it is a VoIP phone system.

The VoIP system used in the office is simply awesome, and it got me really interested to setup one myself.

I’m not going to talk about that because that not the purpose of this post. The main topic of this post is my plan to implement a VPN across the internet to use it for VoIP and many other purposes.

Below are the basic planning of this project.
——————————————-
Network

The plan above consist of my existing home network in Malaysia with the exception of the server currently not working.

The basic network configurations would be as pictured above. This is just a basic plan, with much setup yet to be done.

——————————————-
Hardware
1. Server (For Australia Use)
2. Wireless Router
3. ADSL2+ Modem (Would be provided by ISP I believe)
4. Linksys SPA3102 ATA
5. UPS (Malaysia’s unstable electricity have killed a couple of HDDs, not gonna let this happen again)

To build a network like this, the existing hardware I have would not be sufficient. Equipment that I have at home (Malaysia) already exist so I wouldn’t need any extra to build the network.

——————————————-
Software
1. Microsoft Windows XP (Host OS)
2. Ubuntu Linux (Client OS)
3. Sun VirtualBox VM
4. Asterisk PBX v1.4 (Version 1.6 is unstable and less supported.)
5. OpenVPN
6. CounterPath X-Lite Softphone

Due to the fact that this server is going to be a host for many other applications, I’ve decided to have Microsoft Windows XP as the host OS and have Ubuntu Linux as a client OS under VirtualBox VM.

For the VoIP, I will be using Asterisk PBX 1.4 as the phone PBX system. Up till now, I’m still undecided on which server I would like to have Asterisk and OpenVPN running on, this is due to a couple of reasons:

  1. Malaysia’s internet is slow and unstable, being a host would mean trouble for others to connect to it. Therefore hosting it on Malaysia’s network is undesirable.
  2. I’m staying in Australia at the moment, so I would be using the Server I have here as my primary desktop as well, which would mean trouble if it is the host for all other applications as well.
  3. ETC – There are a couple more reasons which I’m not sure on how to elaborate it.

I have actually already started working on this project but it’s all still initial testing stages to test out the correct software to use to make sure the success of this project.

Since I’m currently having exams at Uni, I’ll only start working on it after the exams.

Powered by WordPress Web Design by SRS Solutions © 2010 Chronolisme.Com Design by SRS Solutions