As of October 10, 2009, the sources of SIP Express Router (SER) and Kamailio (OpenSER) were completely integrated under SIP Router Project and branches were created to prepare 3.0.0 releases. From then on, they are in the same version control system, GIT.

The new structure of the source tree is reflected in the next diagram.

As showed above, there are three folders holding extensions (modules):

  • modules – common modules
  • modules_k – Kamailio specific modules
  • modules_s – SER specific modules

Why is needed to have many folders for modules?

There were modules providing same functionality in both projects, many of them sharing the same name. However there are internal constraints that makes the merging of them a long term process. Most important are the database structures behind.

For example, the auth_db exists in both modules_k and module_s. It provides authentication for SIP as per RFC3261, but the database tables used behind are totally different. Kamailio version uses ’subscriber’ table for user profile (username, domain, password, …) while SER version uses a different structure (with user id, domain id, …).

Over the time additional tools were developed, either public, such as Siremis or Serweb, or private that rely on a specific database structure. Dropping one version or both in favor of the other or another one will break many existing systems.

As times goes on, more and more modules from modules_k and modules_s will be merged in modules, but some of them may stay there very long.

Why still packaging Kamailio and SER?

First is important to clarify: from version 3.0.0 on, Kamailio and SER are identical in terms of source code. The difference is made by:

  • the list of the modules set for compilation and included in binary packages (source tarballs include everything)
  • the list of additional tools which are installed
  • the name of main binary, config files and manual pages
  • default configuration file which is installed
  • default configuration parameters
  • default compilation options
  • default database structure

Kamailio release out of SIP Router source tree is intended to easy the installation using Kamailio-specific database structure and modules. If you want to run a SER-specific module, you can do that, just compile, install and load it – not being included in binary package does not mean it is not working.

However, beware that you cannot load modules with same name, since they usually export functions with same name, rising conflicts. Also, some modules depend on others, for example if you load usrloc from modules_k then you must use registrar from same modules_k.

The diagram above shows what is packaged in Kamailio by the green line and what is new SER specific by the blue line.

This approach can be compared with Linux distros: there is the kernel (in our case is the core, libraries and tm modules) and applications (extensions, modules). All distros have the kernel and many common applications, but at some point they start to differentiate by package managers, default configurations and extra application (default shell, default mail server, default X manager, …).

For more details about Kamailio release visit this page.

What SIP server applications were released out of SIP Router Project?

Kamailio 3.0.0 was officially released on January 11, 2010. SER has not yet releases, users willing to get more SER-specific default behavior, modules and tools should use GIT branch sr_3.0.

Of course you can make your own mix of modules you want to use, from all module folders.

All in one source code repository, can I switch between?

This is very easy since we use GIT. You fetch once then navigate through branches:

  git clone --depth 1 git:// sip-router
  cd sip-router

  # you can compile and install the master branch (development)

  git checkout -b kamailio_3.0 origin/kamailio_3.0

  # you can compile and install kamailio 3.0.x version

  git checkout -b sr_3.0 origin/sr_3.0

  # you can compile and install sr 3.0.x (more ser-like behavior)

All branches have all source code files, but as I written above, some default attributes changed.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.