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!

Tuesday, June 23, 2015

Kamailio Server Maintenance – Wed-Thu Night

During the night between Wed (June 24, 2015) and Thu (June 25, 2015), planned to start not early than 00:00 GMT+1, there will be some schedule maintenance work to the infrastructure that is hosting some of the kamailio.org servers.
The main affected services will be:
  • main website (www.kamailio.org)
  • wiki portals
  • mailing lists (lists.sip-router.org)
  • git mirror (git.kamailio.org)
It is expected to have short downtimes of few minutes.

Wednesday, June 10, 2015

Kamailio v4.3.0 Released

June 10, 2015Kamailio v4.3.0 is out –  a new major release, collecting new features and improvements added during about six months of development and one and a half month of testing.
In short, this major release brings 9 new modules and enhancements to more than 50 existing modules, plus components of the core and internal libraries. Detailed release notes are available at:
Development for next major release, 4.4.0 (expected to be out in the first part of 2016) has started already, even a new module is already present in master branch: smsops. Watch the project’s web site closely for further updates and news about evolution of Kamailio.
Enjoy SIP routing in a secure, flexible and easier way with Kamailio v4.3.0!
Thank you for flying Kamailio!

Thursday, June 4, 2015

Kamcli – command line control tool

Recently a new command line tool for Kamailio management was published by Asipto, named kamcli, available at:
It is written in Python and at this stage it is more an attempt to see if the community finds it useful and worth to get it developed further as part of Kamailio project.
  • Short about the benefits/flexibility:
  • python is by default installed on OSes (including Mac OS X) (as opposite to Lua, for example)
  • became rather fast since Google invested in it
  • lot more knowledge base and developers out there (as opposite to Lua or Perl), along with tons of extensions
  • implementation is based on a CLI framework (Click) that makes it extremely easy to add new commands in a plugin-like fashion, therefore is easy to have custom commands when having specific needs (e.g., managing a custom database table used in kamailio.cfg via sqlops => add a new cmd_xyz.py in commands subfolder, without touching other files, not even the config)
  • help message is embedded in the command code file, making it easier to document commands
  • easy to validate parameters as well as format the output
  • handling kamcli configuration file options is also easy (ini format)
One of the reasons of pushing this out was in the perspective of deprecating MI and working with JSONRPC fifo from command line — there is not an easy ways to manage json docs with shell and common tools (e.g., cat, echo, grep, awk) only. Kamcli has implemented the JSONRPC over fifo command (see also jsonrpc-s kamailio module). Still, given the old initial implementation, at this moment, kamcli is relying on MI via fifo (mi_fifo) for some of the commands (e.g., dumping usrloc records from memory).
So far, couple of commands were implemented when comparing with kamctl:
  • subscriber management (kamctl add/rm/passwd…)
  • user location management (kamctl ul …)
  • database querying (kamctl db …)
  • statistics (kamctl stats …)
  • mi commands (kamctl mi …)
  • jsonrpc commands (not in kamctl)
If there is enough interest in developing this tool further, it can be migrated to Kamailio organization on Github to have all developers able to work on it.
For further discussions about this tool, email to development mailing list .

Tuesday, June 2, 2015

Releasing Kamailio v4.3.0

Next major version of Kamailio (v4.3.0) is planned to be out on Wednesday (June 10) or Thursday (June 11). The pool of things to fix is minor, deb packaging for 4.3 is ready, thanks to Victor Seva. Some bits are still left to do: add docs for 4.3 series in wiki, prepare RPM packaging and build
proper ‘what is new’ list of features.
Testing didn’t reveal new issues in the recent past as we run in two servers with live traffic. If you have issues with 4.3 branch, be sure you report them on Github tracker:
Meanwhile, contributions to enhance the related pages on the wiki are very appreciated:
Stay tuned for updates!

Tuesday, May 26, 2015

Branch for Kamailio 4.3 Has Been Created

The next release of Kamailio will be 4.3 – a release with new module and many new functions! The GIT branch for the coming release 4.3 has been created. This branch  will host the release series 4.3.x. To help the developers, please download this branch and test it before the release!
To get this branch from GIT, you can use:
 git clone https://github.com/kamailio/kamailio.git kamailio
 cd kamailio
 git checkout -b 4.3 origin/4.3
Notes about installing Kamailio from this branch are available at:
Hopefully in about two weeks or so the full release of 4.3.0 will be out.
The master branch is again ready for new features, to be part of the next future release, expected to be numbered 4.4.

Wednesday, May 20, 2015

Kamailio World 2015 – One Week Before


One week before and we are ready to welcome the guests of the 3rd edition of Kamailio World Conference & Exhibition.
The content is filled with excellent technical tutorials in the first day and vast range of hot topics covered during the two conference days — Kamailio, SIP, WebRTC, Asterisk, Sems, JsSIP, Performance and Traffic Monitoring, OpenStack, Kazoo, Erlang, Cloud PBX, OTT or VoLTE are among them.
We are honoured to have an impressive list of speakers, from those that are involved in building the communications, able to share their expertise from deep technical aspects to market needs and business perspectives.
Over all, the event has grown continuously from its first edition, special thanks to our sponsors : FhG Fokus, FhG Forum, Asipto, Sipwise, sipgate, Simwood, Obihai, Matrix, Digium, Tyntec, NG Voice, CoreNetDynamics, Pascom, VoiceTel, 2600hz and VUC. They made possible to host the event at a very nice location in the city center of Berlin and be able to bring a consistent number of experienced speakers.
Looking forward to meeting many of you next week in Berlin!

Tuesday, May 19, 2015

Kamailio v4.2.5 Released

Kamailio SIP Server v4.2.5 stable is out! This is a minor release including fixes in code and documentation since v4.2.4. Don’t worry about upgrading – the configuration file and database compatibility is preserved.
Kamailio (former OpenSER) v4.2.5 is based on the latest version of GIT branch 4.2, therefore those running previous 4.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 v4.2.x.
Resources for Kamailio version 4.2.5
Source tarballs are available at:
Detailed changelog:
Download via GIT:
 # git clone git://git.kamailio.org/kamailio kamailio
 # cd kamailio
 # git checkout -b 4.2 origin/4.2
Binaries and packages will be uploaded at:
Modules’ documentation:
What is new in 4.2.x release series is summarized in the announcement of v4.2.0:
Looking forward to meeting many of you at Kamailio World 2015 next week!

Monday, May 11, 2015

New Kamailio Module: Erlang

Before freezing the development for next major release – Kamailio v4.3.0 – several modules and other relevant additions were pushed in a rather short period of time to git repository. Now, we are trying to look briefly at few of them in a series of posts in order to let everyone know about them.
First to talk about it is the erlang module, contributed by Seudin Kasumovic of Bicom Systems. Erlang is a functional programming language tightly related to telecom environment, with built-in support for concurrency, distribution and fault tolerance
The module enables interaction of Kamailio with Erlang nodes, allowing to send and receive Erlang messages as well as RPC calls between each other. You can read more about it at:
Seudin will also present at Kamailio World Conference how this module can be used and its benefits for scalability and reliability.

Tuesday, May 5, 2015

Kamailio World 2015 – Grants for Students

Given the roots and the tight relation of Kamailio project with the academic environment, we are offering three seats at Kamailio World Conference, May 27029, 2015, in Berlin, to students enrolled in universities or research institutes (both bachelor and PhD programs qualify).
Last year we tried it locally with the universities in Berlin and this year we want to extend it, as there might be young people interested to travel a bit and attend the event.
If you are a student and want to participate, email to registration@kamailio.org . Participation to
all the content of the event (workshops, conference and social event) is free, but you will have to take care of expenses for traveling and accommodation. Write a short description about your interest in real time communications and what is the university or the research institute you are affiliate to.
Also, if you are not a student, but you are in touch with some or have access to students forums/mailing lists, it will be very appreciated if you forward these details.
More information about Kamailio World is available on the web site:
Looking forward to meeting many of you in just few weeks in Berlin!

Monday, April 27, 2015

Kamailio World 2015 – The Schedule

It is one month till the start of Kamailio World 2015, time has passed very fast since we announced the event, accelerated by April filled with many public holidays.
The first draft of the schedule is now available, as usual, expect many speakers to tune the content of their presentation along the way to the day of the talk, to surprise the audience with challenging concepts and visions.
speaker-view
At this edition we were pleasely surprised by the number of submissions, but it was an extremely hard task to select the sessions. To accommodate as much as possible, we are introducing the lightning talks, two of 10 minutes each, to give the opportunity to present shortly about interesting ideas or updates of applications used in Kamailio and VoIP eco-system.
The two days of conference are filled with 28 sessions, the event being completed with 5 technical workshopsduring the pre-conference day. Several exhibitors will be available during the conference days with showcases of their products or solutions, ready with many demos on site.
We are very grateful to our sponsors, which made possible to bring again a consistent number of speakers, ensuring first class quality content for the entire event.
In about 4 weeks, we will be ready to welcome you in the beautiful city center of Berlin. Don’t miss the opportunity to attend this event, it is unique across Europe, bringing open source and real time communications industry together, bridging flexibility innovation with telecommunication businesses. It is now the right time to register!
See you in Berlin at the end of May!

Thursday, April 23, 2015

Kamailio v4.3 – Development Frozen

The development (aka master) branch of Kamailio now enter the pre-release phase for version 4.3.0. No new features are allowed to be pushed to GIT master branch until we create a dedicated branch for 4.3 (expected to be in about 4 weeks or so).
The focus moves now on testing the code, to get it in a stable, rock solid state at the time of release. We hope to get many people from the community involved in testing. If you want to get involved and need assistance about what and how to do it, please don’t hesitate to write to mailing lists. The first step is to get Kamailio installed from sources, details at:
Stay tuned for updates to the wiki pages with guidelines for migration from 4.2 to 4.3 as well as what is new in version 4.3.
The release of v4.3.0 is expected to be out few weeks after Kamailio World Conference — more or less about mid of June 2015.

Wednesday, April 15, 2015

Kamailio World 2015 – The Workshops

It is now about one month and a half till the start of Kamailio World Conference 2015. Continuing with the same event structure like in 2014, the afternoon of the first day, the 27th of May, is filled with several technical workshops. These sessions are intended to give a more hands-on perspective on the subjects, with deeper technical content.
workshops
Last year, Sipwise showed how to deploy sip:provide CE – the open source out of the box IP Telephony Operator Platform – in a matter of minutes and customize it to fit better your needs. This year, Daniel Grotti, a long time SIP and Kamailio fellow, is going to show how to enable WebRTC for sip:provider CE in order to bridge the communication between the web world and the classic SIP phones. Few other typical use cases will be approached during the session.
Carsten Bock, from NG Voice, is returning with another tutorial to show more of what can be done with Kamailio for IMS and VoLTE deployments. Besides the tutorial, the plan is to have a VoLTE testbed on site for the duration of the entire event, so the participants can test with their own devices.
After presenting at the past editions the concept and the development of CGRateS, a carrier grade open source CDR rating engine, Dan Bogos is now coming with a hands-on session about how to integrate it with Kamailio for prepaid and postpaid billing.
Ability to troubleshoot SIP routing and analyze the flows on the wire is one of the core elements required for VoIP engineers. Lorenzo Mangani, one of the co-founders of Homer SIP Capture project, is going to deliver a session on how to use existing open source tools (including Homer and sipgrep, but not limited to) to make the SIP troubleshooting process easier.
All together are providing an amazing amount of knowledge from the people with first hand experience, those that built the systems. It is a unique opportunity at Kamailio World to get face to face to interact with such people.
The content of conference days is filled with other very interesting sessions, including as well valuable technical details, presenting scalable and secure architectures or other products that can be used to complete the VoIP platforms with new features. Right now you can see details for a sections of presentations in the Schedule page.
Be sure you don’t miss Kamailio World Conference 2015, during May 27-29, in Berlin, Germany – it is the open source real time communications event in Europe!
See you in Berlin!

Thursday, April 9, 2015

From SQL Tables to Kamailio Hash Tables

Eloy Coto Pereiro has published recently another blog post that can be useful in the case one needs to cache content of custom database tables in Kamailio’s memory via htable module. The article uses Postgresql as database server, but same mechanism can be used for other database servers.
You can read the article at:
Using caching is a good way to improve the performances and htable is a very flexible mechanism in Kamailio configuration file, with plenty of options to tune the caching rules.
Enjoy!

Thursday, April 2, 2015

Kamailio v4.2.4 Released

Kamailio SIP Server v4.2.4 stable is out – a minor release including fixes in code and documentation since v4.2.3 – configuration file and database compatibility is preserved.
Kamailio (former OpenSER) v4.2.4 is based on the latest version of GIT branch 4.2, therefore those running previous 4.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 v4.2.x.
Resources for Kamailio version 4.2.4
Source tarballs are available at:
Detailed changelog:
Download via GIT:
 # git clone git://git.kamailio.org/kamailio kamailio
 # cd kamailio
 # git checkout -b 4.2 origin/4.2
Binaries and packages will be uploaded at:
Modules’ documentation:
What is new in 4.2.x release series is summarized in the announcement of v4.2.0:
Looking forward to meeting many of you at Kamailio World 2015!

Tuesday, March 31, 2015

VUC – 8 Years

The VoIP Users Conference is celebrating 8 years on the air. The weekly online meetup is going to have its 535th session during a 24 hours voipathon, starting at 12:00pm PDT (20:00 London time) on Thursday, the 2nd of April, 2015. You can find more details about the session, including the options to join via audio, video or irc, at:
Big credits to Randy Resnick, who started VUC, kept it going every week for the past years and he is still steering its future. Kamailio developers and users are glad to have been part of many sessions, presenting about latest news related to the project or joining sessions to debate hot topics of the real time communications world at the moment.
Prepare yourself to pop up online and join the VUC voipathon even for a bit, say hi and tell shortly what is new in your world of communications!
Randy and many VUC friends will be at Kamailio World Conference 2015, May 27-29, in Berlin, Germany, with VUC Visions session – be sure don’t miss the event where you can meet the people that had a relevant impact in transformation of the real time communications over the past years and work on defining their future!

Update of Keepassx Autotyping on Mac OS X

Back in 2009 I published the article on this blog about doing autotyping in Keepassx for Mac OS X using AppleScript and some other helper application, MoreInternet. That article is available at:
It is still a popular reading on my blog, however MoreInternet is no longer available for recent releases of Mac OS X. But that's for a better option as now Mac OS X can auto-register URL handlers on first run of an application that advertises the capability.

Lately I am using mainly iTerm2 instead of the classic Terminal.app, therefore I spent a bit of time in upgrading the AppleScript to fit better with my current environment, Mac OS X 10.10 (Yosemite) and iTerm2 (as main option).

The AppleScript is available on GitHub, feel free to fork and make pull requests with enhancements:
With the new version comes few alternatives of specifying the URL schema in order to make it nicer looking inside the Keepassx. The old format with 'kpx' is still available, allowing the variants:
  kpx://proto?username:password@address:port/path
  kpx://proto?username:password:address:port/path
The proto field can be ssh, http or https.

The new variants use kpx-proto for URL schema, getting rid of the strange url with 'proto?' inside it, resulting in something more closer to actual URLs. The new URL format is:
kpx-proto://username:password@address:port/path
Again, the proto can be ssh, http or https. For both formats, old and new, the port and path are optional. For ssh, the path must not be provided. Next are some examples:
kpx-ssh://alice:secret@10.0.0.10 
kpx-https://alice:secret@mywebsite.com/login

It is possible to use the KeePassX self expanding variables such as {USERNAME} or {PASSWORD}.
kpx-https://{USERNAME}:{PASSWORD}@mywebsite.com/login

Installation

Download the kpx.as file from GitHub repository.

Open Script Editor from Applications => Utilities, paste the content of kpx.as into it and export it as 'Application', save it as kpx.app somewhere on your disk.

With a text editor like 'vim', edit kpx.app/Contents/PkgInfo and set the content to "APPLokpx" (no double quotes). Edit kpx.app/Contents/Info.plist and set the bundle signature to the last 4 letters of the value in PkgInfo file and add details about 'kpx' URL handling, you should get to something like this:
    <key>CFBundleSignature</key> <string>okpx</string> <key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLName</key> <string>KeePassX</string> <key>CFBundleURLSchemes</key> <array> <string>kpx</string> <string>kpx-ssh</string> <string>kpx-http</string> <string>kpx-https</string> </array> </dict> </array>
Note: CFBundleSignature should be there already, just update the string value. CFBundleURLTypes (and the array value) must be added.

Save the files you edited and the execute kpx.app from Finder. This operation is registering the kpx URL handlers. The execution is practically exiting immediately, but afterwards Keepassx will be able to launch it for its registered URL schemes.

Again, if you have an older version of Mac OS X, you may need to install More Internet application to register new URL handlers, for more details see the blog for older version of this script. Read that article if you didn't do it in the past, because it provides other useful hints for testing and using as well as screenshots.

Mentioned before that iTerm2 is preferred terminal, if you prefer the Terminal.all, edit the downloaded kpx.as and replace the line:
set myTerm to "iTerm2"
with:
set myTerm to "Terminal"
Then do the same steps as above for installation.

The terminal application is used for ssh handling. For http/https, the Safari browser is used.

An important note is to re-install and run the application every time you change something in the AppleScript file kpx.as, before attempting to use Keepassx with the modifications done in kpx.as.

Hopefully this article will be useful for some people out there!

No effective time to work on at this moment, but it in the future I am thinking to add the option to start mosh instead of ssh and work with other web browsers Chromium/Chrome, Firefox or Opera -- I haven't checked which browsers have support for AppleScript commands. Of course, these or other contributions are welcome!


Monday, March 30, 2015

Roadmap to Kamailio v4.3.0

Next major release of Kamailio is going to be versioned.
The plan to release it was sketched during the last IRC devel meeting back in February, proposing to get it out by beginning of June 2015. Given there has to be at least one month of testing, the next milestones to release date were proposed:
  • freezing the development: Wednesday, April 22, 2015
  • if testing goes smooth, then branching 4.3 after about one month: During the week starting May 18
  • test more in beta phase, prepare packaging, etc. and release after 2-3 weeks: One of the days between June 4 and 11
You can join the discussion with other suggestions or adjustments on Kamailio mailing lists.

Friday, March 27, 2015

Kamailio World 2015 – VoLTE Testbed and Demo

Two months till the start of Kamailio World Conference & Exhibition 2015. Prepare yourself for three days full of interesting presentations and demos during May 27-29 in Berlin, Germany!
With the accelerated propagation of LTE and hot discussions about what 5G is going to be, definitely VoLTE is a top topic these days. Kamailio has a consistent set of IMS extensions, making it one of the most flexible options to consider for rolling out VoLTE platforms, already with live deployments in Europe, Asia, Africa and South America.
Kamailio World is the place where you can play with VoLTE yourself, FhG FokusCore Network Dynamics and NG Voice are preparing a testbed on site with a local LTE network and a Kamailio-based VoLTE platform. Bring your VoLTE capable device (e.g., iPhone 6 or most of the latest models with Android from Samsung, LG, Huaweii …) and experience yourself the technology of your calls in the near future, with high definition voice and proper integration with other IP based services, including WebRTC.
kamailio-ims

Don’t forget to check the other presentations, workshops and exhibitors, it is going to be one of the best events for real time communications and open source in Europe. Registration is open, be sure you secure your participation before the event is sold out!

Tuesday, March 17, 2015

Kamailio & Statsd – Best Practices

Eloy Coto Pereiro has published a very interesting article on his blog about using Kamailio and Statsd. Being the developer of the statsd module in Kamailio, he presents more details about the benefits and how to put all pieces together in order to have the statistics exported by Kamailio and graphs build by Graphite.
Next is a screenshot from the article of what you can get as a result:


    Enjoy!