This article shows how to install Kamailio 1.5.2 on Fedora 9:

make a new directory and download the kamailio version:

 

 cd /opt
 mkdir kamailio
 cd kamailio/
 wget http://www.kamailio.org/pub/kamailio/1.5.2/src/kamailio-1.5.2-notls_src.tar.gz

 

tar the downloded file:

 

  tar -zxvf kamailio-1.5.2-notls_src.tar.gz

 

Install all the required mysql packages:

 

 yum install mysql*

 

Start the mysql (if not started):

 

/etc/init.d/mysqld start

 

make mysql start on boot:

 

chkconfig --level 345 mysqld on

 

use the following procedure to connect from sql GUI

change the root password (if needed)

 

 mysqladmin -u root password NEWPASSWORD          -- firt time changing root password

 

allow openser@localhost so kamctl command will work with mysql:

 

 mysql -p
 mysql> GRANT USAGE ON *.* TO 'openser'@'localhost' IDENTIFIED BY 'asterisk' ;
 mysql> GRANT ALL PRIVILEGES ON *.* TO 'openser'@'localhost'  ;
 mysql> commit;

 

install sum other important packages

 

 yum install gcc
 yum install gcc-c++
 yum install bison*
 yum install svn*
 yum install flex*

 

install the following package for the lcr module:

 

 yum install pcre*

 

set the vars:

 

cd kamailio-1.5.2-notls  
vi Makefile.vars 
 ## Compile MySQL modules - debian-require: libmysqlclient-dev
 MODS_MYSQL=on

 

 ## Compile PCRE modules - debian-require: libpcre3-dev
 MODS_PCRE=on

 

Install Kamailio with Mysql

 

 cd kamailio-1.5.2-notls
 make prefix=/ include_modules="db_mysql,lcr,uri" all
 make prefix=/ include_modules="db_mysql,lcr,uri" install

 

configure hostname and mysql:

 

 vi /etc/kamailio/kamctlrc
 Uncomment DBENGINE=MYSQL
 SIP_DOMAIN=domain.com

 

Create the Mysql DB:

 

 /sbin/kamdbctl create

 

Enter your mysql pass, then "yes" "yes" for the next 2 questions. a new "OpenSER" DB was created

Configure your Kamailio.cfg located at /etc/kamailio

Check your configuration

 

 kamailio -c

 

run kamailio

 

 kamctl start

 

add two users 1000 and 2000:

 

kamctl add 1000 1000
kamctl add 2000 2000

 

configure 2 x-lites, register and make a call.