Showing posts with label telephony. Show all posts
Showing posts with label telephony. Show all posts

Thursday, June 25, 2015

Kamailio - TLSF – High Performance Memory Manager

Kamailio v4.3.0, Camille Oudout from Orange/Libon, France, pushed a new memory manager (named tlsf) focused on high performances on handling memory operations.
It is well known that Kamailio (from its very beginning as SER project back in 2001) has its own memory manager. That simplifies especially the handling of shared memory on different oeprating systems. There were two available, that can be enabled at compile time, so  called:
  • f_malloc (aka fast malloc) – the one mostly used as default for stable releases
  • q_malloc (aka quick malloc) – the one more suitable for memory operations troubleshooting
While these two memory managers were designed to be fast for multi-process applications such as Kamailio (e.g., avoid thread locking for private memory) as well as dealing with the patterns of routing SIP traffic, few special cases could result in slowing down — one of this is when needing to free a lot of allocated chucks of same size.
Worth to mention that system memory manager could be (and can still be) enabled to be used for private memory needs. Some other attempts to add new memory managers were not yet completed, therefore not being ready for use (e.g., the Doug Lea allocator or Lock Less allocator — you can check the source code tree, inside mem/ folder, for more details).
Camille implemented the Two Level Segregated Fit (TLSF) memory allocator, know to be O(1) for both malloc() and free() operations (no worse case behavior). It has a 4 byte block overhead, but hardware memory it cheap these days. You can read more about it at:
It is not enabled by default, being rather young code now, but it is a good candidate to become in the near future. To enable it, you have to install Kamailio from sources and compile using:
make MEMDBG=1 MEMMNG=2 cfg
make all
make install
It will enable the debugging mechanism as well, that can be disabled by using MEMDBG=0.
If you start using it, do provide us feedback about how it performs, because it helps to assert its relevance and stability. Also, do not hesitate to start a discussion if you have questions or suggestions via the sr-dev mailing list.
Have a great summer!

Monday, July 22, 2013

Details on charging in IMS with Kamailio

Carsten Bock has published an article about how billing is done in IMS. It is available here:
They are working on integrating Kamailio with the Mobicents Charging Server, the connection between the two systems will be done using Diameter protocol.

Tuesday, March 26, 2013

Not in my mobile world...

Spending over a decade in time in real time communication services, at some point in early stage of my career even working for a mobile operator, I realized about some things I never had or barely did:
  • never had a contract with a mobile operator - no monthly subscription fee, only prepaid. In late nineties I got first cell phony while still being at studies. To get a contract, one had to provide a lot of documents to guarantee for paying the bills. Going for prepaid was easier, but of course more expensive per minute. Once I got closer to the industry and understood the risks of over-charging, specially for people that travel a lot, spending many weeks a year on roaming, contracts were no longer attractive. I started with email before cell phone, I am still an email centric communication guy. Also, my business is mainly about IP telephony, when traveling I prefer to pay for one hour of WiFi access where I can call VoIP but also check the emails. Today I have three active seems always around me (one just for 3G data plan), none under contract. And no bill shock can happen, although I spend substantial time on roaming.
  • never sent a MMS - probably the most useless feature I ever seen on mobile services. Introduced before the era of popular big screen smartphones, sending a picture that couldn't be actually seen meant simply just paying for stupidity. I was never more than few hours far from an internet connection, there are better ways to share a moment with images
  • never bought subsidized smartphones - even in most cases they are bound to monthly contracts, there are more expensive options for what is called here 'branded phones with sim lock'. Practically, you cannot use other mobile networks and the phone is pre-installed with that specific mobile operator apps. The difference of few tens of Euros comparing with standard price was never appealing when the device costs anyhow several hundreds. Traveling frequently results in a quite big stock of international SIM cards, ability to use any of them is a real value for a phone
  • never used call forwarding - this is it, if the call was for me, it's me or nobody answering
Among services I barely use:
  • voicebox - I try to disable the service whenever possible, although many times the operators makes it impossible or reactivate the service periodically for what so ever unknown services. As it may not be convenient calling back to voicebox service (could happen again because of traveling), better not have messages that people consider as delivered. Calls are for real time interaction, if not available, use email or SMS for short description of the matter
  • directory or info desk services - locating a restaurant nearby or other place is much easier using the Internet. If I'm going to be premium charged for a call, again I rather pay for internet access on public WiFi hotspots.
That leaves pretty much voice and sms, both used quite rare lately, more and more rarer! Why? Because mobile operators add new features too late on the market, when already another IP-based service is very popular for offering same features. It is hard to change habits then.

Hopefully at some point we will see true innovation from mobile operators, till then Internet rocks!

Monday, June 18, 2012

Kamailio v3.3.0 Released

Kamailio SIP Server v3.3.0 is out – a new major release with a very large number of new features and improvements.
 
On June 18, 2012, Kamailio (OpenSER) 3.3.0 has been released – this release is a result of about 6 months of development and 2 months of testing from the teams of Kamailio (OpenSER) and SIP Express Router (SER) projects.
 
This version comes with 7 brand new modules in addition to a lot of fresh features in core and old modules. Continue reading full release notes at:
Enjoy SIP routing in a secure, flexible and easier way with Kamailio v3.3.0!

Asipto has recently announced two new training and consultancy public events where you can learn how to use Kamailio to build your rich communication services, read more about them at:

Thursday, June 14, 2012

Updates of Kamailio Debian Packages

Courtesy of Jon Bonilla, Debian packaging got a bit of updates in preparation to release Kamailio v3.3.0.

Next is his announcement on the Kamailio's users mailing list.

With the upcoming release of version 3.3.0, we have updated our Kamailio Debian repositories.
  • Debian 5.0 “lenny” will no longer be supported. This means that no more nightly builds for this distribution will be triggered. We’ll provide builds for stable releases of 3.0, 3.1 and 3.2 branches though.
  • Ubuntu 12.04 “Precise” is now supported for nightly builds and 3.2+ versions. Next time a 3.2.x version is tagged we’ll provide the build. Meanwhile you can download the nightly build of 3.2 branch for this distro.
  • There will be no more nightly builds of 3.1 branch. We’ll provide stable builds in case another version is released though.
  • We now support nightly builds of branch 3.3 (same as 3.2 and master). You can test latest git versions of branch 3.3 until a stable release is built using these repositories:
deb http://deb.kamailio.org/kamailio33-nightly squeeze main
deb http://deb.kamailio.org/kamailio33-nightly wheezy main
deb http://deb.kamailio.org/kamailio33-nightly lucid main
deb http://deb.kamailio.org/kamailio33-nightly precise main

All the information and repositories can be found in Kamailio wiki as usual:

Wednesday, June 6, 2012

Kamailio Packages for Raspberry Pi

Peter Dunkley, a registered Kamailio developer, has built some RPMs of upcoming Kamailio 3.3.0, including for the Raspberry Pi (running Fedora 17).

If anyone wants to try them, they are available via Yum repository:
The post at Peter Dunkley’s blog:

Wednesday, May 30, 2012

Remarks about Kamailio at LinuxTag

The participation of Kamailio at LinuxTag this year was filled with several related events and, as usually, a great opportunity for community meeting and social networking.

Again, five of the management team members were at the booth in various occasions, answering questions and making demos: Andreas, Carsten, Daniel, Henning and Ramona. Marius and Mario from 1 & 1 Romanian branch and Germany completed our staff. We shared the space with related SEMS project, Stefan, Rafael, Vladimir and Alena being there for it.

On Wednesday, Carsten had his presentation in the LinuxTag Conference track, Daniel did the Project Fast Forward presentation at Open Source Arena. On Thursday, Daniel gave one hour workshop about how to install Kamailio and configure it for secure unified communication services – a well received event, the seminar room being fully attended. On Saturday, the Project Fast Forward presentation was repeated by Daniel. Links to presentations:
Most of visitors were from Germany, but we had several people coming from neighborhood countries, like Poland and Denmark.

We learned about interesting deployments using Kamailio, notable being a relatively large Instant Messaging and Presence communication platform, using the SIP SIMPLE presence modules (including RLS) – the average online user base being 40 000, with peaks at 60 000. Out there are much more larger Kamailio deployments, but mainly targeting telephony services. This deployment proves that SIP SIMPLE presence extensions are becoming more and more an attraction, not being a dead direction. Our upcoming Kamailio v3.3.0 has a lot of improvements in scalability of presence related modules, which along embedded XCAP server and MSRP relay modules, makes Kamailio the most complete SIP SIMPLE implementation out there.

Now LinuxTag 2012 is gone, time to focus on the release of Kamailio v3.3.0!

Friday, May 25, 2012

Kamailio and SEMS in a Risk-of-Life Service

An interesting story sent by Jeremy A. on SEMS mailing list about use of Kamailio and SEMS in emergency services.

This is a belated report on the use of SEMS in a risk of life service.

The system uses Kamailio in a distributed architecture of dozens of Fire & Rescue stations. This is heavily based on distributed and replicated DNS.

A single ’911′ style headquarters has duplicate hot swap-over control rooms at other locations.
The headquarter and alternate posts have servers that service HQ operator positions with SIP phones. These provides sidecar indication of F&R Station state for up to 64 F&R stations – using BLF. These phones are hooked into an integrated analogue audio management system.

Each Fire and Rescue station has an embedded SIP based controller that runs Kamailio and proprietary software to control the F&R station electrical and safety systems as well as provide public address functions to alert the F&R staff of a new emergency. These PA announcements are SIP based using a DSL network and are live from the HQ positions, plus computer synthesized voice, as well as alerting tones.

Each station also has multiple SIP phones for in-station and station to station calling.
The network is decentralized, so failure of the central control system still allows point to point communications between Fire and Rescue stations.

The headquarter systems uses SEMS as the primary operator manager to perform multiple simultaneous deployment calls to remote Fire and Rescue stations. SEMS is used to create a dynamic conference between an operator and multiple Fire & Rescue stations. These are automatically initiated by SEMS and answered by the F&R embedded systems. This means an operator can broadcast a deployment message and initiate station control activities at up to five stations (fifth alarm) This is only constrained by the bandwidth available at the headquarters. Our SEMS packages have been designed to handle non-answered calls to the conference and provide operator indication by ‘SMS’ messages to the handsets and audio feedback.

The system provides full forensic recording by using rtpproxy at all locations. These recordings are archived by an out-of-band process.

Control of the system is purely SIP based – so every item in the system is a SIP based entity. This includes servers, embedded systems, and phones.

The phones are physically integrated into operator positions that also handle PSTN, PBX, and radio traffic. The interface is purely keyboard on the operator phones.
Options for integration of the SIP system into CAD (Computer Aided Dispatch) are obvious. The only drawback is the rusty and ancient systems and the unbelievable process required to get approval to integrate.

The system as provided provides at least 5 nines reliability. Probably a lot better. The only downside is the DSL network (provided by others at amazing expense) that provides a system with a lousy 2 nines reliability. We are in the process of developing an offering using redundant DLS/3G routing to improve this.

The field stations are a hybrid Centos 5/Slax system running out of flash. The HQ systems are straight Centos 5 systems running off disk or off flash. Future versions will be pure Centos out of flash with no fancy memory overlay – flash is well good enough.

The system has been live for over a year with no major issues. I can’t say how many lives have been saved, but certainly quite a few. At least we haven’t been sued yet!

Wednesday, February 8, 2012

Kamailio at VoIPUsersConference, Feb 17, 2012

Daniel-Constantin Mierla (co-founder) and Alex Balashov (member of management board) will coordinate a new session of VoIP Users Conference (VUC) about Kamailio SIP Server, on Friday, the 17th of February, 2012, starting at 17:00GMT. There will be other developers and users around, ready to answer whatever questions you may have.

VUC is the well know weekly online conference that allow everyone to connect via SIP (voice) and/or IRC (text) to interact with the guests. The host and moderator will be Randy Resnick. You can read more details about this weekly event at:
To participate, choose your preferred way to connect:
  • SIP: 200901@login.zipdx.com
  • Skype: vuc.me or ld.vuc.me
  • IRC: #vuc channel on irc.freenode.net
  • PSTN: +15672522286
The session targets first to give an update on latest developments: asynchronous TLS layer, asynchronous SIP processing, SIMPLE presence extensions, embedded HTTP-XCAP server and MSRP relay, no-SQL storage systems (Redis, Cassandra), embedded interpreters (Lua, Python, C#), a.s.o.

Besides hearing what is new, it is a good chance for everyone to ask and learn about how Kamailio can be used by service providers to meet today’s communication demands: integrated voice, video, instant messaging and presence services, load balancing and least cost routing, security and confidentiality, scalability and redundancy, SIP in IPv6, interaction with web 2.0 and social networking services, …

The previous VUC session about Kamailio and SIP Express Router was done almost two years ago, you can read more and listen the recorded podcast at:

Tuesday, January 31, 2012

Kamailio v3.2.2 Released

Kamailio SIP Server v3.2.2 stable is out – a minor release including fixes in code and documentation since v3.2.2 – configuration file and database compatibility is preserved.
Kamailio (former OpenSER) 3.2.2 is based on the latest version of GIT branch 3.2, therefore those running previous 3.2.x versions are advised to upgrade. There is no change that has to be done to configuration file or database structure comparing with older v3.2.x.
Resources for Kamailio version 3.2.2
Source tarballs are available at:
Detailed changelog:
Download via GIT:
# git clone –depth 1 git://git.sip-router.org/sip-router kamailio
 # cd kamailio
 # git checkout -b 3.2 origin/3.2
 # make FLAVOUR=kamailio cfg
Binaries and packages will be uploaded at:
Modules’ documentation:
What is new in 3.2.x release series is summarized in the announcement of v3.2.0:

Thursday, December 1, 2011

Kamailio v3.2.1 Released

Kamailio SIP Server v3.2.1 stable is out – a minor release including fixes in code and documentation since v3.2.0 – configuration file and database compatibility is preserved.

Kamailio (former OpenSER) 3.2.1 is based on the latest version of GIT branch 3.2, therefore those running previous 3.2.0 versions are advised to upgrade. There is no change that has to be done to configuration file or database structure comparing with v3.2.0.

Resources for Kamailio version 3.2.1

Source tarballs are available at:

Detailed changelog:

Download via GIT:

 # git clone –depth 1 git://git.sip-router.org/sip-router kamailio  # cd kamailio  # git checkout -b 3.2 origin/3.2  # make FLAVOUR=kamailio cfg

Binaries and packages will be uploaded at:

Modules’ documentation:

What is new in 3.2.x release series is summarized in the announcement of v3.2.0: