User:IPgrp4/sandbox

The Drive
There are both business and technical drivers associated with IMS deployment, that will bring benefits in service creation capabilities as well as in cost optimization

IMS offers richer user experience with sophisticated business models
 * BUSINESS DRIVERS

IMS is able to deliver services faster, at lower cost and independently of devices, access and media types
 * TECHNICAL DRIVERS

Advanatages over the traditional non-IMS setup:


 * Access agnostic
 * Services independent
 * Open architecture
 * Multi-device
 * Vendor independent

Objective
To configure and setup the core network components in IMS that includes the signaling for both session and media flows viz. P-CSCF, I-CSCF, S-CSCF and HSS, to allow the end users to make a SIP call.

The Architecture
The openIMS core consists of two fundamental components:


 * Call Session Control Function

There are three different types of CSCF that exist viz. Proxy-CSCF, Serving-CSCF and the Interrogating-CSCF, commonly known as P-CSCF, S-CSCF and I-CSCF, respectively.


 * P-CSCF

This is the entry point into the IMS network. It serves as a edge server essentially and is located in the visited network or the home network if the visited network does not support IMS. P-CSCF is The Boss in this openIMS architecture. It is the decision maker and sits on the path of all signalling, can inspect every signal, provides authentication for the subscribers, etc.


 * forwards the registration requests received from the UE to the I-CSCF
 * forwards the SIP messages to the S-CSCF that administrate the user, whose address is defined during the registation
 * forwards the request and the answers to the UE


 * S-CSCF

It is a SIP server always located in the home network. The S-CSCF uses DIAMETER Cx and Dx interfaces to the HSS to download and upload user profiles - it has no local storage of the user. All necessary information is loaded from the HSS.


 * it handles SIP registrations, which allows it to bind the user location (e.g. the IP address of the terminal) and the SIP address
 * it decides to which application server(s) the SIP message will be forwarded, in order to provide their services
 * it provides routing services, typically using ENUM lookups
 * there can be multiple S-CSCFs in the network for load distribution and high availability reasons. It's the HSS that assigns the S-CSCF to a user, when it's queried by the I-CSCF


 * I-CSCF


 * its IP address is published in the DNS of the domain (using NAPTR and SRV type of DNS records), so that remote servers can find it, and use it as a forwarding point (e.g. registering) for SIP packets to this domain
 * I-CSCF queries the HSS using the DIAMETER Cx interface to retrieve the user location and then routes the SIP request to its assigned S-CSCF
 * Also functions as a Topology Hiding Inter-network Gateway


 * Home Subscriber Server

HSS is the master user database that supports the IMS network entities that handle the call sessions
 * it contains the subscription-related information (user profiles), used by the control layer
 * it contains subcription information used by the service layer
 * it provides data used to perform authentication and authorization of the user
 * it can provide information about the physical location of user

The IMS Setup
''' Step 1 : Pre-Requisites!  
 * ' Hardware Requirements:''
 * Atleast 2GB of RAM with Ubuntu 11.10 installed on it


 *  Network Access: 
 * For setting DHCP IP:


 * sudo vi/etc/network/interfaces


 * auto lo


 * iface eth0 inet loopback


 * auto dhcp


 * iface eth0 inet dhcp


 * Also edit /etc/dhcp/dhclient.conf and uncomment the line:


 * domain-name-servers 127.0.0.1;


 * sudo/etc/init.d/networking restart

'''
 * ' Software Requirements:''
 * gcc3/4, make, subversion, bison, flex, libxml2, libmysql, curl.

'''
 * ' DNS Setup:''
 * copy file:
 * from /opt/OpenIMSCore/ser_ims/cfg/open-ims.dnszone
 * to  /etc/bind/ open-ims.dnszone
 * Go to /etc/bind/named.conf.default-zones and type the code below into that file:
 * zone "open-ims.test"
 * IN {
 * type master;
 * file "/etc/bind/open-ims.dnszone";
 * notify no;
 * };


 * Go to named.conf.options
 * Forwarders
 * 127.0.0.1;
 * }
 * Go to /etc/resolv.conf:
 * Name server: 127.0.0.1
 * Domain: open-ims.test
 * Search: open-ims.test
 * Search: open-ims.test


 * /etc/hosts : (Note : If qmail error comes up, then edit the hosts file and point the address of your dns server to www.yourdnsdomainname.com Ubuntu)


 * 127.0.0.1     localhost
 * 127.0.0.1     open-ims.test


 * open-ims.dnszone:
 * $ORIGIN open-ims.test.
 * $TTL IN
 * Pcscf                    1D IN A                 127.0.0.1
 * Icscf                     1D IN A                127.0.0.1
 * Pcscf                    1D IN A                 127.0.0.1
 * Icscf                     1D IN A                127.0.0.1
 * Icscf                     1D IN A                127.0.0.1
 * Icscf                     1D IN A                127.0.0.1


 * Restart the bind server: sudo /etc/init.d/bind9 restart
 * To test DNS SERVER (TO RESOLVE HOST NAMES):
 * dig @127.0.0.1pcscf.open-ims.test

'''
 * ' mySQL Setup:''
 * If you get error in this step then you don’t have mysql server properly installed.
 * 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
 * Check if the databases are in there and accessible mysql -u root –p
 * For viewing database : show databases
 * To swith database, or to use the table within the particular the database : use (whatever table)
 * Shows tables : show tables
 * Check the table hss_db : Select * from hss_db. You should be able to see information regarding Alice and Bob which are the two default subscribers provided by FoKuSS but these are currenly unregistered.

''' Step 2 : Getting the Source Code! ''' The source code is pre-configured to work from a standard file path:
 * Create /opt/OpenIMSCore and go there : mkdir /opt/OpenIMSCore
 * cd /opt/OpenIMSCore
 * Create a new directory ser_ims and checkout the CSCFs there: mkdir ser_ims
 * cd /opt/OpenIMSCore
 * svn checkout http://svn.berlios.de/svnroot/repos/openimscore/ser_ims/trunk ser_ims
 * Create a new directory FHoSS and checkout the HSS there: mkdir FHoSS
 * cd /opt/OpenIMSCore
 * svn checkout http://svn.berlios.de/svnroot/repos/openimscore/FHoSS/trunk FHoSS

''' Step 3 : Compile! '''
 * ser_ims compile
 * go to cd ser_ims
 * make install-libs all
 * (Note : If something breaks, you probably don't have all the prerequisites.)
 * FHoSS compile
 * If you don't have a JDK >=1.5, get one before proceeding
 * Make sure, that the JDK version that you are using is >= 1.5!!!
 * Do "ant compile deploy" in FHoSS
 * cd FHoSS
 * ant compile
 * ant deploy

''' Step 4: Start the Components! '''


 * Start pcscf.sh, icscf.sh and scscf.sh
 * cd /opt/OpenIMSCore and then start
 * Sudo ./pcscf.sh
 * Sudo ./icscf.sh
 * Sudo ./scscf.sh
 * cd /opt/OpenIMSCore/FHoSS/deploy
 * sh startup.sh ( If something breaks you probably don’t have the correct java path. For this edit startup.sh point it to your java path )
 * Note: Run everything in separate terminals.
 * At this point, the FHoSS web console should start and login as admin user:
 * Username : hssAdmin
 * Password : hss
 * Search in USER IDENTITIES, there should be 2 default users Alice and Bob . They will get registered after registering them using an appropriate client.

''' Step 5: Cient Configuration! '''
 * – We used sipP version 3.3 ( Reason: Awesome VOIP software which shows actual message transfer )
 * sudo apt-get install ncurses-dev
 * sudo apt-get install build-essential
 * Grab sipp 3.3 from sourceforge.net
 * Sudo wget –m –nd http://sourceforge.net/projects/sipp/files/latest/download?source=files
 * extract it locally
 * tar -xzf sipp.3.3.tar.gz
 * cd sipp.3.3
 * Open ./sipp.3.3/scenario.hpp and add this line
 * #include 
 * after
 * #include 
 * save the file, and in the terminal and do make pcapplay ( This is for passing RTP packets)

The Call Flows
Here we have two scenarios:


 * The first one shows the case when the users are contacting the IMS Core for the first time. This time the users need to first register themselves!


 * Second scenarios is where the users were already registered and the call goes through from the UAC to the UAS!

What have we learned?
IMS helped us in understanding a new architectural frame work (All IP) which is also used for Voice over IP calls. It consists of different components (specific to SIP) like Components and its function:

P-CSCF - Authenticate, Admission Control, Policy Control

I-CSCF - SIP Proxy for external networks, at the edge of the admin domain

S-CSCF - SIP registrar, main entity for control pane

HSS - Database of all IMS nodes including UE

We are trying to make a call from user A to User B. It traverses as follow:

1) When user A tries to call user B, it first lands on the P-CSCF (Proxy), this helps in authenticating the user and also provides the admission control. The P-CSCF is specific to each user’s network.

2) The PCSCF in-turn forwards to I-CSCF, this acts as a proxy to get the user B’s location info from the HSS. This will help in placing the call to the user B’s network. This info is achieved by sending LIR (Location Info Request) and receiving LIA (Location Info Answer).

3) Once I-CSCF gets this information, it forwards to S-CSCF, which is a main entity in the control plane and acts as a SIP registrar. It carries out multimedia control and routing functions.

4) On collecting the information from User A’s network, now S-CSCF forwards it to the user B's P-CSCF. Thus, the user B gets the SIP message and the entire communication between User A and user B takes place by exchanging a series of SIP messages. This part of the project gave us in depth understanding on the working of these components, IMS architecture and how server implementation is done on a Linux platform.

What have we accomplished?
As the basic aim for the project is to make a SIP call, which will be served by the entities in IMS architecture, we have completed the configuration for the 3 call serving control functions, i.e. P-CSCF, I-CSCF, S-CSCF. We have also configured HSS with the required peer records for Alice and Bob. Moreover, we have updated the DNS hosts files and other configuration files to redirect the SIP requests towards our IMS domain. (For example ‘/etc/hosts’ file and few changes in java files) Possible future steps for the projects are as follows:

1) Implement servers in different devices and make a SIP call

2) Implement all the servers corresponding to one network domain in one single device and make a SIP call between two clients with different domains

3) Implement each servers for different operators in different devices and again make a SIP call between two clients with different domains What do