Thursday, August 27, 2009

Porting openSER 0.9.5 Server on LN2410 baord

About SIP

SIP is an application-layer protocol used to establish, modify, and terminate sessions or multimedia calls. These sessions can be conferences, e-learning, telephony over the Internet, and similar applications.


The SIP protocol supports five features for establishing and closing multimedia sessions.

  • User location: Determines the endpoint address used for communication.

  • User parameters negotiation: Determines the media and parameters to be used.

  • User availability: Determines if the user is available or not to establish a session.

  • Call establishment: Establishes the parameters for caller and callee, and informs on call progress (ringing, ringback, congestion) to both parties.

  • Call management: Session transfer and closing.

SIP Operation Theory

The entire SIP signaling flows through the SIP proxy server. On the other hand, the media signaling, transported by the RTP protocol, flows directly from one endpoint to another.


SIP Entities

  • UAC (user agent client)—Client or terminal that starts the SIP signaling.

  • UAS (user agent server)—Server that responds to the SIP signaling coming from a UAC.

  • UA (user agent)—SIP terminal (IP phone, ATA, softphone).

  • Proxy Server—It receives requests from a UA and transfers them to another SIP proxy if this specific terminal requested is not under its domain.

  • Redirect Server—This receives requests and sends back to the caller including data about the destination, instead of sending directly to the callee.

  • Location Server—This provides the callee's contact addresses to Proxy and Redirect Servers.



Openser-0.9.5 is older version of opensips and is compatible with gcc 2.95 cross compiler used for building the filesystem of LN2410, hence this version is used for porting openser on LN2410 board

Requirements
----------------
a. cross-2.95.3.tar.bz2(gcc cross compiler version 2.95)
b. Openser-0.9.5
c. flex 2.5.33

Flex cross compilation
a. Download flex source code and follow the steps to configure and build the library.
(It is assumed that cross compiler is installed and path is set in shell enviroment.)
tar -zxvf flex-2.5.4a.tar.gz (http://flex.sourceforge.net/)
cd flex-2.5.4
mkdir /home/guest/flex_lib
this folder is used save flex library.
b. ./configure --prefix=/home/guest/flex_lib --build=i686-pc-linux-gnu --host=arm-linux --target=arm-linux CC=arm-linux-gcc
c. Changes in Makefile
CC = arm-linux-gcc
AR = arm-linux-ar
RANLIB = arm-linux-ranlib

d. make prefix=/home/guest/flex_lib all
e. make prefix=/home/guest/flex_lib install

openser-0.9.5 cross compilation

a. download openser-0.9.5 and perform the steps to cross compile and build the executable
tar -zxvf openser-0.9.5_src.tar.gz (http://www.openser-project.org/pub/openser/)
b. Changes in Makefile.def
RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
OS = linux
ARCH = arm
OSREL = 2.6.13.2
#set some vars from the environment (and not make builtins)
CC := arm-linux-gcc
line # 301
DEFS+= $(extra_defs) \
-DNAME='"$(MAIN_NAME)"' -DVERSION='"$(RELEASE)"' -DARCH='"$(ARCH)"' \
-DOS='"$(OS)"' -DCOMPILER='"$(CC_VER)"' -D__CPU_$(ARCH) -D__OS_$(OS) \
-DCFG_DIR='"$(cfg-target)"'\
-DPKG_MALLOC \
-DSHM_MEM -DSHM_MMAP\

line# 847
LIBS= -L/home/guest/flex_lib/lib/ -L /lib -lfl -ldl -lresolv
c. mkdir /openser_lib
d. make prefix=/openser_lib skip_modules="mysql" modules
e. make prefix=/openser_lib install
f. copy the /openser_lib to LN2410 filesystem
cp /openser_lib /media/disc/ -rf

g. changes in /etc/openser/openser.cfg

# ----------- global configuration parameters ------------------------

debug=3 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no # (cmd line: -E)


check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
port=5060
children=4
fifo="/tmp/openser_fifo"

h. run openser on LN2410
./openser_lib/sbin/openser -m 8
you check the server process using the ps command

Using the server
There are plenty of soft-phone available on the net(e.g ekiga,twinkle) you can select any one of them,install on the PC, for windows user you can use windows messenger client to communicate with other softphone.

Communication can achived in siple steps.
1. Register the Softphones to server.
2. call the other softphone using the uri (sip:2000@192.168.1.103)
note: The server configuration allows registeration is without authentication hence you can register using any user id.

No comments:

Post a Comment