Saturday, 2 October 2010

Setting up a heterogeneous wireless environment using Openimscore, 802.21 and Asterisk on Ubuntu 10.04: Part - 1

Through this post i'll try to explain how to setup a heterogeneous wireless voice/video calling facility in a closed environment using - OpenIMScore, Asterisk, 802.21, IMS Communicator / UCT IMS Client.

Part - 1: Setting up OpenIMSCore

Step-1
First lets setup OpenIMSCore which act as the backbone for our call session. For you need to install few dependency packages.

$sudo apt-get install ant bind9 mysql-server bison libxml2

Step-2
Now you need to download OpenIMSCore from berlios site. Try getting the latest one using 'SVN'. If you are behind a proxy make sure that you add proxy details in /etc/subversion/servers. Then create a folder named 'OpenIMSCore' in /opt. Change the ownership of the folder to your current user name using chown command and then move to the newly created folder. Once you are in the folder run the following commands to download the files from belios.

$mkdir FHoSS
$svn checkout http://svn.berlios.de/svnroot/repos/openimscore/FHoSS/trunk FHoSS
$mkdir ser_ims
$svn checkout http://svn.berlios.de/svnroot/repos/openimscore/ser_ims/trunk ser_ims


Step-3
By default the access rights set for OpenIMSCore is for local access. Now if you are planning to run clients on separate systems then replace 127.0.0.1 with your system IP address using the following script provided by openims team. I recommend you this step b'coz in future you may need to do this for calling across various clients.

$./ser_ims/cfg/configurator.sh

You can keep the home domain as open-ims.test itself as most of the client devices will be pre-configured using this url. But don't forget to change IP to the one configured on NIC.

Step-4
A sample DNS Zone file is provided by OpenIMS team:- ser_ims/cfg/open-ims.dnszone. So you only need to use it for setting up DNS Zone. Copy the file to /etc/bind and and include the following in /etc/bind/named.conf.local

zone "open-ims.test" IN {
type master;
file "/etc/bind/open-ims.dnszone";
notify no;
};


You also update the /etc/resolv.conf so as to point to the new DNS server. If you havin't played around with your ubuntu distribution much, then i feel its better to update this using GUI rather than command line.

Go to System -> Preferences -> Network Connections. Then select wired -> Auto eth0. Click on the 'edit' button and go to 'IPv4 Settings'. In the 'DNS Servers' column add your IP and in 'Search domains' add open-ims.test

Now restart bind using

$sudo /etc/init.d/bind9 restart

You can check out whether the new configuration works using dig command. Try

$dig open-ims.test

If everything work fine then this will return server as your IP address with a lot of junk info. Dont worry about its output now :) Lets move further !

Step-5
Now come back to your /opt/OpenIMSCore/ser_ims folder. Compile it using

$make install-libs all

Go to your /opt/OpenIMSCore/FHoSS folder. Compile it using
$ant compile
$ant deploy
If all your dependent softwares are installed then i hope you wont have any issues in the above step.

Step-6
Now before running your compiled code, lets setup mysql database for our OpenIMSCore. I hope you might have given proper database password. Now try the following command from your /opt/OpenIMSCore folder.

$mysql -u root -p -h localhost < ser_ims/cfg/icscf.sql
$mysql -u root -p -h localhost < FHoSS/scripts/hss_db.sql
$mysql -u root -p -h localhost < FHoSS/scripts/userdata.sql


Step-7
Using the following commands you need to copy certain files to /opt/OpenIMSCore
$cp ser_ims/cfg/*.cfg .
$cp ser_ims/cfg/*.xml .
$cp ser_ims/cfg/*.sh .
Now your OpenIMSCore setup is ready to run !

Step-8
Try running your pcscf, icscf and scscf components on separate terminals. For this you do

$./pcscf.sh
$./icscf.sh
$./scscf.sh


Make sure you do this on separate terminals.

Now you go to FHoSS/deploy folder and start startup.sh. If you are getting any errors while starting this file, it maybe because your JAVA_HOME environment variable is not set. Try setting it and rerun the same.

Now if every thing is working fine you can see on terminal that the peers are connected across each other !

Troubleshooting:

  • Setkey Command not found
Try, #sudo apt-get install ipsec-tools
  • WARNING:peer_connect(): Error opening connection to to xxx.xxx.xxx.xxx 3868 >Connection refused
Just run, #/opt/OpenIMSCore/FHoss/deploy/startup.sh

5 comments:

Anonymous said...

Hi there.

Where is the 802.21 part?

Best regards

Pramod ! said...

Sorry.. i got a bit busy. Will update the next part ASAP !

Anonymous said...
This comment has been removed by a blog administrator.
Anargha said...

but this is only installation of openimscore.. how do i connect ims with asterisk.? can u help me with it?

Pramod ! said...

Actually i don't know when will i be able to write part II & II.

But anyway i'll suggest you some links which i plan to test in this direction.

1) IMS client... http://uctimsclient.berlios.de/ or http://imscommunicator.berlios.de/

2) 802.21
http://hng.av.it.pt/projects/odtone

3) Asterisk and IMS
http://www.lia.deis.unibo.it/Research/IHMAS/

Best wishes..& hope i'll try the other parts in the 2nd week of November !