PIONEERS Played with Kamailio?

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Just getting started with Kamailio. Has anyone else played with this? If not, would you like to??
 

kenn10

Well-Known Member
Joined
Dec 16, 2007
Messages
3,764
Reaction score
2,173
Never played with it but it does have the internal plumbing to support shared call appearances. It would be an interesting front-end for Asterisk or FreeSwitch.
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,534
Reaction score
727
I have used its cousin, OpenSIPS, for a few years. It's very suitable as a SIP router, proxy, registrar, load balancer, protocol-adapter (TLS to UDP for example) and general SIP responder (responding to junk scans or OPTIONS packets for example).

kenn10: it has the "internal plumbing" to do SIP. So whatever a shared call appearance is, if you can do it with SIP, then you could probably do it with kamailio or opensips. If you're just talking about multiple registration and stuff like that then you can do that easily with your Asterisk pbx using pjsip.
 

kenn10

Well-Known Member
Joined
Dec 16, 2007
Messages
3,764
Reaction score
2,173
kenn10: it has the "internal plumbing" to do SIP. So whatever a shared call appearance is, if you can do it with SIP, then you could probably do it with kamailio or opensips. If you're just talking about multiple registration and stuff like that then you can do that easily with your Asterisk pbx using pjsip.

@billsimon The type of shared call appearance to which I refer is "Key System" type functionality where multiple phones can register to an extension and the buttons light up for busy, hold, idle, etc. for subscribed phones on that extension. The boss/secretary type of function. This is a major business function lacking from Asterisk that no one seems to feel is important except for large businesses who end up utilizing Cisco or Avaya systems to have the feature. I see a lot of cloud business systems (Vonage, 8X8, Jive) offering the functionality now on a variety of Sip phones.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
https://kamailio.org/docs/modules/devel/modules/sca.html

DwwiYiKWsAIFXcj.jpg
 
Last edited:

kenn10

Well-Known Member
Joined
Dec 16, 2007
Messages
3,764
Reaction score
2,173
I think this could (and no doubt others have) scale Asterisk for multiple servers or cloud instances and provide a higher level of redundancy and load balancing. Unfortunately, its also another layer on top of FreePBX since you have to have trunks, stations, etc. set up in the Asterisk as well as in the Siremis/Kamailio arrangement.

I don't know if Siremis does this but it would be great to have an app that would remove or greatly reduce the need for FreePBX to setup the Asterisk server for extensions and trunks. I'm sure by now that @wardmundy has already been looking into all of this so I look forward to his comments.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
My initial thoughts are to leave Siremis out of the mix for now and create extensions, trunks, and routes on the Asterisk server which would be hidden from everything except Kamailio. Then use matching extension names and passwords on the Kamailio server where endpoints would be registered. All dialing from those endpoints would then be passed directly from Kamailio to Asterisk for regular processing just as you do today. If you want redundancy, just bring up a second matching Asterisk platform, and one line of code on Kamailio does the trick. Haven't got all of it working just yet, but so far, so good.
 

krzykat

Telecom Strategist
Joined
Aug 2, 2008
Messages
3,145
Reaction score
1,235
If you want redundancy, just bring up a second matching Asterisk platform, and one line of code on Kamailio does the trick. Haven't got all of it working just yet, but so far, so good.
Watching thread and anxious to see results. Have you considered fusionPBX for a redundancy? I am thinking for emergency failover only, not the full freePBX setup, but more the phones to be registered and ring groups that will allow for in / out calls while primary server is down??
 

krzykat

Telecom Strategist
Joined
Aug 2, 2008
Messages
3,145
Reaction score
1,235
I first used OpenSER many years ago to do calling card applications in conjunction with A2B coupled with Asterisk with Joe Roper. There may be people that want to use it for billing of their Asterisk servers as well, and I don't know what @jroper is up to any more, but he may take an interest in your journey here.
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,534
Reaction score
727
My initial thoughts are to leave Siremis out of the mix for now and create extensions, trunks, and routes on the Asterisk server which would be hidden from everything except Kamailio. Then use matching extension names and passwords on the Kamailio server where endpoints would be registered. All dialing from those endpoints would then be passed directly from Kamailio to Asterisk for regular processing just as you do today. If you want redundancy, just bring up a second matching Asterisk platform, and one line of code on Kamailio does the trick. Haven't got all of it working just yet, but so far, so good.

I don't know whether Kamailio has this, but OpenSIPS has a feature called mid-registrar. (https://www.opensips.org/Documentation/Tutorials-MidRegistrar) This would eliminate having to set up your endpoints on the Kamailio server. Just pass through registration requests to Asterisk and if Asterisk agrees that the phone authenticated, then OpenSIPS considers it registered and stores the location at the proxy. This would also work well with your back-end redundancy plan.
 

ou812

Guru
Joined
Oct 18, 2007
Messages
479
Reaction score
79
I'm having trouble registering a phone, I followed the instructions but I think there is a problem with my default settings as the logs say it's not configured,

root@register100:~# cat /var/log/syslog | grep kamailio
Jan 14 15:14:49 register100 kamailio[2965]: Kamailio not yet configured. Edit /etc/default/kamailio first. ... failed!
Jan 14 16:16:18 register100 kamailio[3491]: Stopping Kamailio SIP server: kamailio:.
Jan 14 16:16:27 register100 kamailio: INFO: <core> [tcp_main.c:4745]: init_tcp(): using epoll_lt as the io watch method (auto detected)
Jan 14 16:16:27 register100 kamailio[3503]: Starting Kamailio SIP server: kamailio:loading modules under config path: /usr/lib/x86_64-linux-gnu/kamailio/modules/

my /etc/default/kamailio was copied from instructions and looks like this.

#
# Kamailio startup options
#

# Set to yes to enable kamailio, once configured properly.
RUN_KAMAILIO=yes

# User to run as
USER=kamailio

# Group to run as
GROUP=kamailio

# Amount of shared and private memory to allocate
# for the running Kamailio server (in Mb)
SHM_MEMORY=128
PKG_MEMORY=4

# Config file
CFGFILE=/etc/kamailio/kamailio.cfg

Not sure were I went wrong any help would be appreciated.

Gary.
 

ou812

Guru
Joined
Oct 18, 2007
Messages
479
Reaction score
79
I set the time zone on the server and rebooted and the fail warning is gone from the logs, systemctl status kamailio looks good, but I still can't register, I turned off cloud firewall on this vps to make sure.
 

ou812

Guru
Joined
Oct 18, 2007
Messages
479
Reaction score
79
I believe now my issue was in creating a user, when I add user I get a access denied.

ERROR 1045 (28000): Access denied for user 'kamailioro'@'localhost' (using password: YES)
INFO: user '4500' already exists
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,534
Reaction score
727
Use tcpdump to examine general network traffic. Try sngrep for SIP traffic specifically. Increase debug level in the kamailio.cfg so that you get more output to your syslog.
 

ou812

Guru
Joined
Oct 18, 2007
Messages
479
Reaction score
79
I am able to create users if I change /etc/kamailio/kamctlrc DBROUSER="kamailio" and corresponding password
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
I don't know whether Kamailio has this, but OpenSIPS has a feature called mid-registrar. (https://www.opensips.org/Documentation/Tutorials-MidRegistrar) This would eliminate having to set up your endpoints on the Kamailio server. Just pass through registration requests to Asterisk and if Asterisk agrees that the phone authenticated, then OpenSIPS considers it registered and stores the location at the proxy. This would also work well with your back-end redundancy plan.

In Kamailio, it's the UAC Module. Other than Slide #17 on Mid-Registrar from Fred Posner, there aren't many clues for something well above my pay grade. I haven't been able to get it to work using the UACReg List in Siremis.
 

dicko

Still learning but earning
Joined
Oct 30, 2015
Messages
1,607
Reaction score
826
If you want to dabble in using kamalio as a front end sip proxy , you might want to try dsiprouter

https://github.com/dOpensource/dsiprouter

It will do the grunt work of getting a basic kamailio system and provide you with a functioning GUI front end to aa kamailio proxy for any number of pbxes

You can add siremis if you want but a full function pbx is perhaps better left to fusionpbx or freepbx
 
Last edited:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
@dicko: Nice find! Very smooth install and setup except on CentOS 7 it kept erroring out on downloading the Kamailio packages from the repo so I manually installed them and then reran the installer. Worked like a champ. No glitches in the setup, and they support Skyetel which made configuring everything else a one-minute setup. HINT: $50 Skyetel credit still available on Nerd Vittles.

On dSIPRouter:

Carrier Groups: used defaults
PBX/Endpoint: added one of our existing Incredible PBX VPS servers with its public IP address (write down assigned ID number)
Domains: added the FQDN associated with the new dSIPRouter/Kamailio VPS; choose PassThru to PBX option with PBX ID number
Inbound DID Mapping: added DID from Skyetel and mapped it to Incredible PBX VPS
Global Outbound Routes: set default route to 1 which was Skyetel

On the PBX:

1. Added a trunk for Kamailio with the IP address of the dSIPRouter/Kamailio VPS:
Code:
type=friend
port=5060
nat=yes
insecure=port,invite
host=xxx.xxx.xxx.xxx
disallow=all
context=from-trunk
allow=ulaw
2. Added an outbound route pointing to the Kamailio trunk in step #1
3. Added an inbound route for the 11-digit DID from Skyetel
4. WhiteList the Kamailio VPS IP address with /root/add-ip

Kamailio Packages (if you get errors on initial install, execute the following and rerun installer):
Code:
yum -y install http://download.opensuse.org/repositories/home:/kamailio:/v5.1.x-rpms/CentOS_7/x86_64/kamailio-5.1.6-16.el7.centos.x86_64.rpm
yum -y install http://download.opensuse.org/repositories/home:/kamailio:/v5.1.x-rpms/CentOS_7/x86_64/kamailio-xmpp-5.1.6-16.el7.centos.x86_64.rpm
yum -y install http://download.opensuse.org/repositories/home:/kamailio:/v5.1.x-rpms/CentOS_7/x86_64/kamailio-ldap-5.1.6-16.el7.centos.x86_64.rpm
yum -y install http://download.opensuse.org/repositories/home:/kamailio:/v5.1.x-rpms/CentOS_7/x86_64/kamailio-gzcompress-5.1.6-16.el7.centos.x86_64.rpm
yum -y install http://download.opensuse.org/repositories/home:/kamailio:/v5.1.x-rpms/CentOS_7/x86_64/kamailio-outbound-5.1.6-16.el7.centos.x86_64.rpm
yum -y install http://download.opensuse.org/repositories/home:/kamailio:/v5.1.x-rpms/CentOS_7/x86_64/kamailio-debuginfo-5.1.6-16.el7.centos.x86_64.rpm
yum -y install http://download.opensuse.org/repositories/home:/kamailio:/v5.1.x-rpms/CentOS_7/x86_64/kamailio-presence-5.1.6-16.el7.centos.x86_64.rpm
yum -y install http://download.opensuse.org/repositories/home:/kamailio:/v5.1.x-rpms/CentOS_7/x86_64/kamailio-unixodbc-5.1.6-16.el7.centos.x86_64.rpm
yum -y install http://download.opensuse.org/repositories/home:/kamailio:/v5.1.x-rpms/CentOS_7/x86_64/kamailio-utils-5.1.6-16.el7.centos.x86_64.rpm
yum -y install http://download.opensuse.org/repositories/home:/kamailio:/v5.1.x-rpms/CentOS_7/x86_64/kamailio-tls-5.1.6-16.el7.centos.x86_64.rpm
yum -y install http://download.opensuse.org/repositories/home:/kamailio:/v5.1.x-rpms/CentOS_7/x86_64/kamailio-mysql-5.1.6-16.el7.centos.x86_64.rpm
yum -y install http://download.opensuse.org/repositories/home:/kamailio:/v5.1.x-rpms/CentOS_7/x86_64/kamailio-postgresql-5.1.6-16.el7.centos.x86_64.rpm

WARNING WARNING WARNING: After you reboot, you'll need to add some entries to firewalld to get things working:
Code:
# nnnn for SSH port if you plan to change it
# Do NOT change SSH port until after reboot, or you will be locked out!!
firewall-cmd --zone=public --permanent --add-port=nnnn/tcp
firewall-cmd --zone=public --add-port=nnnn/tcp
# next two required to get web access to portal
firewall-cmd --zone=public --add-port=5000/tcp
firewall-cmd --zone=public --permanent --add-port=5000/tcp
# next required to talk SIP
firewall-cmd --zone=public --add-port=5060/udp
firewall-cmd --zone=public --permanent --add-port=5060/udp
 
Last edited:

Members online

Forum statistics

Threads
25,778
Messages
167,504
Members
19,198
Latest member
serhii
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top