Elastix and Kamailio Part 1 – Installing
WARNING: DO NOT INSTALL THIS ON A PRODUCTION MACHINE! Some of you may want be wanting to increase the capacity of your Elastix machine. Asterisk generally has issues when you start to put a lot of SIP peers on it. One of the best ways to get around this is to install a proper SIP server and join it with asterisk. This allows you to register all your SIP handsets to the SIP server and make calls through to your asterisk machine.
The Kamailio module for Elastix allows you to easily integrate Elastix with a enterprise SIP server. All SIP handsets register to Kamailio. All internal SIP calls stay within Kamailio however if a call is external then Kamailio will push the call out to asterisk to deal with it.
To install the Kamalio module you first need to create the directory for it to go in. It installs itself from the directory /var/kamailio
mkdir /var/kamailio
Now change to the directory
cd /var/kamailio
Download the kamailio integration file from the MBIT website
wget http://www.mbit.com.au/kamailio-v2.tgz
Untar the file into the directory
tar zxvf kamailio-integration.tgz
In the directory now will be a heap of files you want to execute the script that installs all the modules for you. To run the script execute install_kamailio.sh
./install_kamailio.sh
Soon as it is installed we will move to the next part for configuring Kamailio. The installation can take a while so please be patient. The installation can only be used with Elastix 2.0.
Posted by Mark Brooker
42 responses to "Elastix and Kamailio Part 1 – Installing"
9:42 on November 8th, 2010
Waiting for part 2!
Great jobs!
P.S. why you don’t use version 3.1.0? No rpms or different config?
17:32 on December 6th, 2010
Wow what an answer to prayer! I have been trying to configure Asterisk with Kamailio 3.1 on Ubunutu and have been pulling my hair out for days. Could it really be as easy as this? When can we see part two?
17:42 on December 6th, 2010
Unfortunately I am flat out at the moment. I should be able to get part 2 for you by the end of the month.
The integration is for Elastix, it uses a freepbx module to administrate asterisk and kamailio.
12:58 on December 7th, 2010
Just installed on Elastix 2.0.3. Several modules crashed on reboot and I don’t see any controls in the FreePBX interface.
16:49 on December 13th, 2010
BTW it appears that the module crashes were related to the latest Elastix yum update. Not your script. Still looking forward to the “rest of the story” .
16:52 on December 13th, 2010
The script has a log file that it puts everything into for the install. I had some issues with a yum repo and getting rtpproxy to install. This could be the issue.
10:22 on December 15th, 2010
Mark, the issue was dahdi, both your script and the Elastix yum update loaded a different kernel. Using grub I went back to the previous kernel and everything came up without errors. However, checking the install log, I notice that Kamailio did not completely install. If you would like to provide your email, I will send you the results. support@topguncom.com
3:44 on January 6th, 2011
Am waiting for part 2, when can we expect it
1:23 on December 8th, 2011
Nice piece, i remember looking somewhere else to do with this. Made me want to do another search in yahoo for more info and found your blog post. Great piece
7:39 on January 7th, 2011
Hi regarding the above files and scripts, i have installed as above after a bit of messing about i required to have a radiusclient installed and that stopped the kamailio install, anyhow i have sorted that and i can see the module activated in freepbx, hoever i dont see any tabs to setup or config kamailio in freepbx nor in elastix where is the module options and what are they, if you could post part2 maybe this would explain things for me a bit better,
Regards
Kurt
17:25 on January 7th, 2011
Hi
At this stage I am snowed under with work. I will see if I can get it done in the next month or so.
14:07 on January 8th, 2011
That would be great, i have a client that may require upto 500 extensions (call center) with alot (most) of remote workers so this could be the answer to my prayers, i will await your part 2 with anticipation …….
3:45 on January 9th, 2011
That is great waiting for part 2?
8:25 on January 16th, 2011
Still no advance on how to install it ??? beware everyone until part 2 is published that tells you how to actually setup and run this system that if you install on a working system it will kill it, as kamailio takes over port 5060 you can neither use nor get rid of it until its configured, personally i think that only posting part of a howto then leaving it 2 months with no part 2 published is a bit silly especially as it will make existing systems unusable, then when contacting the poster all you get is well i only support paid support subscriptions is … well take that as you will……. i personally dont think part 2 will ever arrive on this site … just my opinion
19:19 on January 16th, 2011
Im await to second part, and I hope that is not a false promise, i think dont. Thanks a lot
19:22 on January 16th, 2011
Mark Brooker, do you have a update about this integration?
15:09 on January 17th, 2011
The next part is still to be written. If you are playing with the script, do not do this on a production system because it will take over 5060 and you have to register to asterisk on 5070. Unforunately I cannot guarantee when it will be done because I have other projects which I need to finish before this one.
2:37 on January 19th, 2011
So if your phone register to 5070 how does kamailio even come into play then if the phone still registers just to kamailio ??? im a little confused ………. come on dont keep us in suspense dude
2:38 on January 19th, 2011
i meant just registers to asterisk in message above not kamailio its earyly and i cant type lol ….
11:26 on January 19th, 2011
Hi guys, just wanna say —- plzzzzzzz can you post part 2 mark i know you are busy but i really really could do with the how to on setting up , i hve a setup i must install next week and there will be 500+ users, i think regular elastix is gonna struggle with this many users as is, the kamailio integration will be an answer to a prayer m8 , you would be helping myself and the community at large in a big way…….begging on bended knee
20:20 on January 21st, 2011
I will give it a go on Monday for you. I believe all that is left is to enable the freepbx module, put your ip address in the kamailio.cfg and create a trunk between kamailio and asterisk. I will fire up the VM to test it.
10:57 on January 22nd, 2011
You are a star mark i will await your part 2 with eager anticipation, thanks alot
10:04 on January 25th, 2011
Any updates Mark ?
19:23 on January 25th, 2011
Part 2 is out
20:18 on January 30th, 2011
Mark,
It appears that the script still breaks 2.03 (DAHDI) because of a kernel update. Are you going to address this? Or is this something that should be addressed to Elastix?
21:37 on January 30th, 2011
Mark,
Constructive criticism: After you changed the script one line in Blog 1 was changed.
The line “tar zxvf kamailio-integration.tgz” should read “tar zxvf kamailio-v2.tgz”.
Also after running part two I don’t get a successful install. Kamailio won’t start now. Here is part of the error log.
installing Kamailio
——————————————-
error: Failed dependencies:
libmysqlclient.so.15 is needed by kamailio-mysql-3.0.2-0.i386
libmysqlclient.so.15(libmysqlclient_15) is needed by kamailio-mysql-3.0$
libcurl.so.3 is needed by kamailio-presence-3.0.2-0.i386
libglib-2.0.so.0 is needed by kamailio-purple-3.0.2-0.i386
libpurple.so.0 is needed by kamailio-purple-3.0.2-0.i386
libradiusclient-ng.so.2 is needed by kamailio-radius-3.0.2-0.i386
libnetsnmp.so.10 is needed by kamailio-snmpstats-3.0.2-0.i386
libnetsnmpagent.so.10 is needed by kamailio-snmpstats-3.0.2-0.i386
libnetsnmphelpers.so.10 is needed by kamailio-snmpstats-3.0.2-0.i386
libnetsnmpmibs.so.10 is needed by kamailio-snmpstats-3.0.2-0.i386
libodbc.so.1 is needed by kamailio-unixodbc-3.0.2-0.i386
libcurl.so.3 is needed by kamailio-utils-3.0.2-0.i386
1
Elastix 2.03 x64 install from ISO.
22:09 on January 30th, 2011
Dahdi breaking is an Elastix issue. The script does a yum update which should work fine but in the yum tree at the moment there is a kernel which shouldnt be there. This gets installed and when you reboot your machine the kernel modules for things like dahdi breaks. You have to go into grub and swap it back to the old kernel.
Did you try running through the troubleshooting I put on the second part?
10:04 on February 2nd, 2011
How to go into grub and swap it back to the old kernel, I am new in Linux
Thanks
Toto
20:20 on February 2nd, 2011
i’m running elastix 2.0.3
when i try to install kamailio-integration.tgz: untar : install :: kamailio rpms :: FAILED,,,,,,,,,,,,,,,,,,and,,,,,,,,,,,,,,,,,,: freepbx module :: FAILED, too:
full report
[root@blue54dos kamailio]# ./install_kamailio.sh
——————————————-
installing Base YUM Deps
——————————————-
update :: system :: OK
installing :: kamailio base deps :: OK
——————————————-
installing Kamailio
——————————————-
install :: kamailio rpms :: FAILED
copy :: kamailio.cfg :: OK
set permissions :: kamailio.cfg :: OK
change :: ipforwarding :: OK
——————————————-
installing Kamailio FreePBX
——————————————-
copy :: freepbx module :: OK
change directory :: freepbx module :: OK
untar :: freepbx module :: FAILED
start on boot :: kamailio ::error al leer la información del servicio kamailio: No existe el fichero o el directorio
FAILED
start on boot :: rtpproxy :: OK
[root@blue54dos kamailio]#
ohhhh i,ve put the older kernel into my box:
check it in
/usr/src/kernels (elastix 2.0.3)
ls
2.6.18-194.3.1.el5-i686
2.6.18-194.32.1.el5-i686
you can boot the older kernel changing this:
if you updgraded your kernel via yum update.
edit /etc/grub.conf, look for the line ‘default=0′,
and change it to ‘default=1′. then reboot your system.
it will now load your old kernel
what can i do to install this kamailio plzzzz
thanks
20:23 on February 2nd, 2011
sorry for my english, any way… could you help me. something wrong or something to change into install.sh??????????????
5:57 on February 27th, 2011
I not to mention my guys were found to be looking at the good hints located on your web blog and so immediately got a horrible feeling I had not expressed respect to the web site owner for those secrets. My young boys appeared to be totally stimulated to see all of them and now have certainly been using these things. Thanks for truly being really thoughtful and for making a decision on this kind of important guides millions of individuals are really desirous to understand about. My honest apologies for not saying thanks to you sooner. 5
4:43 on April 15th, 2011
Hello ,Idont know why ./install_kamailio.sh doesn’t work.it appears that this file is unavalilaible !!!!!
Help please
2:39 on October 31st, 2011
We supplyhigh quality NFL Jerseys, Have a Green Bay Packers Jerseys is the perfect way to support your favorite players! It’s well-known that Green Bay Packers Jerseys make you stand out in the crowd, enjoy the fun of life. They are reasonable priced and with high quality. Hope you support our site. http://www.buyjerseysstore.com , whether you leave it blank or customize it,we still thank you for you visit.
2:47 on October 31st, 2011
It’s well-known that Green Bay Packers Jerseys make you stand out in the crowd, enjoy the fun of life. They are reasonable priced and with high quality. Hope you support our site. http://www.buyjerseysstore.com , whether you leave it blank or customize it,we still thank you for you visit.
2:44 on November 28th, 2011
It appears that the module crashes were related to the latest Elastix yum update. Isn’t it??
4:00 on December 9th, 2011
Have a Los Angeles Lakers Jerseys is the perfect way to support your favorite players! Buy a Los Angeles Lakers Jerseys to cheering for them, After all of the jersey is the manager carefully checked to ensure customer satisfaction. Online shopping is convenience and fast, it is best way for people who like watching the games but have no time go shopping buy goods which there want . Don’t hesitate, if you like the goods in our website: http://www.cheapjerseyclub.com/,we are the best buy cheap jerseys , contact us, there can saving your time e-commerce, as long as you leave order, we will do the best service for you.
6:52 on December 21st, 2011
Wholesale NBA Jerseys, Have a Carolina Panthers Jerseys is the perfect way to support your favorite players! Buy a Carolina Panthers Jerseys cheering for them, all of the jersey is the manager carefully checked to ensure customer satisfaction. Online shopping is convenience and fast, it is best way for people who like watching the games but have no time go shopping buy goods which there want . Don’t hesitate, if you like the goods in our website: http://www.cheapjerseyclub.com/ , we are the best buy jerseyscheap, contact us, there can saving your time e-commerce, as long as you give us your order, we will do the best service for you. wish every customs have a happiness life .
6:38 on December 23rd, 2011
I love your blog.. very nice colors & theme. Did you design this website yourself or did you hire someone to do it for you? Plz respond as I’m looking to create my own blog and would like to find out where u got this from. thanks a lot
22:39 on January 24th, 2012
Have you ever thought about adding a little bit more than just your articles? I mean, what you say is fundamental and all. However imagine if you added some great graphics or video clips to give your posts more, “pop”! Your content is excellent but with images and clips, this blog could undeniably be one of the best in its field. Wonderful blog!
4:36 on January 30th, 2012
I am curious to find out what blog system you’re working with? I’m having some small security problems with my latest blog and I would like to find something more safeguarded. Do you have any recommendations?
8:12 on February 10th, 2012
Dumb question, are you installing kamailio on a separate physical server or on the same server where Elastix is installed?
Thank you,
pguima
16:13 on April 21st, 2012
One thing I’d really like to say is that often before purchasing more computer memory, check out the machine in to which it would be installed. In case the machine is definitely running Windows XP, for instance, the particular memory limit is 3.25GB. Setting up more than this would purely constitute some sort of waste. Make sure that one’s motherboard can handle the upgrade quantity, as well. Great blog post.