Friday, October 29, 2010

Kamailio Advanced Training, Nov 22-25, 2010, Berlin

Next Kamailio Advanced Training will take place in Berlin, Germany, Nov 22-25, 2010.

Last stable series is 3.1.x (Oct 06, 2010, see release notes), continues the work done within SIP-Router.org project. Among brand new features in v3.1.0, starting with the previous major version, 3.0.0, you can run mixed Kamailio (OpenSER) and SIP Express Router (SER) modules in the same SIP server instance, giving you the most powerful tools to build stable, very performant and features rich VoIP and Unified Communication platforms.

The class is organized by Asipto and will be taught by Daniel-Constantin Mierla, co-founder and core developer of Kamailio SIP Server project.

Read more details about the class and registration at:

Thursday, October 28, 2010

Kamailio Business Directory Launched

Today was announced the launch of Kamailio Business Directory.

This is a web page hosted by the Kamailio project site that will list companies and individuals offering products, services or solutions based on Kamailio or SER. It is an open directory that tries to enable more visibility to the business market around the project. If you want to apply to be listed, please follow the instructions at:

We have already several companies listed, couple of them to still in review process, therefore check it again soon, the directory is available at:

Wednesday, October 27, 2010

Asterisk, Kamailio, Openfire and Social Media Integration

Courtesy of Kelvin Chua, CTO of NEXTIX, I received the slides presented at Astricon 2010 to the session “Asterisk, Kamailio, Openfire and Social Media Integration”.

You can download the slides from:

The presentations goes through usage of open source components to build a social media integration system. Here is the abstract:

“The excitement does not end with combining the flexibility of asterisk, the capacity handling of kamailio and the chattiness of openfire, we’ve been seeing this for the past astricons. The real deal is how to use the three powerhouse in a more socially relevant context. This session will introduce you to another way of creating your own facebook or myspace. It aims to discuss what we as asterisk users/developers wanted to see in a social platform and yet nobody did it on facebook. It will discuss a myriad of apps involved with social platforms like iphone/android apps as well as a list of hardware we don’t see integrated with current social websites. it will also touch on rare topics like working on video mixers (MCU) on asterisk using h.264 and how to use this on the platform.”

NextIX is an innovation company that specializes in universally available information and communication technology solutions for the consumer, SME, enterprise and government.

Monday, October 25, 2010

Debian Based Kamailio Distribution

CIITIX has announced CIITIX VoIP 1.0 – a Debian Lenny custom Linux distribution that includes a pre-configured Kamailio v3.1.0. Among enabled features are:

  • user authentication against MySQL
  • NAT traversal
  • accounting to MySQL
  • SIP SIMPLE presence
  • embedded XCAP server
  • DoS detection and protection

You can download the ISO image and read more about at:

It is a good and easy way for people to try a Kamailio based VoIP system on a physical server or a virtual machine.

Wednesday, October 20, 2010

Kamailio v3.0.4 Released

Kamailio v3.0.4 is out – a minor release including fixes in code and documentation since v3.0.3 – configuration file and database compatibility is preserved.

Kamailio (OpenSER) 3.0.4 is based on the latest version of GIT branch 3.0, therefore those running 3.0.0, 3.0.1, 3.0.2 or 3.0.3 are advised to upgrade — there is no change required to be done to configuration file or database.

Note that latest stable version of the project is Kamailio 3.1.0, released on October 06, 2010. It is highly recommended to upgrade directly to latest stable release to benefit of most actual fixes and features. More details about 3.1.0 at:

Resources for Kamailio version 3.0.4

Source tarballs are available at:

http://www.kamailio.org/pub/kamailio/3.0.4/src/

Detailed changelog:

http://www.kamailio.org/pub/kamailio/3.0.4/ChangeLog

Download via GIT:

# git clone –depth 1 git://git.sip-router.org/sip-router kamailio
# cd kamailio
# git checkout -b kamailio_3.0 origin/kamailio_3.0

Binaries and packages will be uploaded at:

http://www.kamailio.org/pub/kamailio/3.0.4/

Modules’ documentation:

http://www.kamailio.org/docs/modules/3.0.x/

What is new in 3.0.x release series is summarized in the announcement of v3.0.0:

http://www.kamailio.org/w/kamailio-openser-v3.0.0-release-notes/

Kamailio v1.5.5 Released

Kamailio v1.5.5, a new release in 1.5 series, is out. Kamailio (OpenSER) 1.5.5 is based on the latest version of branch 1.5, including many fixes in code and documentation, therefore those running 1.5.0, 1.5.1, 1.5.2, 1.5.3 or 1.5.4 are advised to upgrade.

Note that latest stable version of the project is Kamailio 3.1.0, released on October 06, 2010. It is highly recommended to upgrade directly to latest stable release to benefit of most actual fixes and features. More details about 3.1.0 at:

http://www.kamailio.org/w/kamailio-openser-v3.1.0-release-notes

This release marks the end of official maintenance for branch 1.5 by development team. That means no new packaging will be done for 1.5.x, but fixes can be added in SVN branch 1.5 repository. The development team officially maintain last two stable branches, these are now 3.0.x and 3.1.x.

Source tarballs are available at:

http://www.kamailio.org/pub/kamailio/1.5.5/src/

Detailed changelog:

http://www.kamailio.org/pub/kamailio/1.5.5/ChangeLog

Download via SVN:

svn co https://openser.svn.sourceforge.net/svnroot/openser/branches/1.5 kamailio

Tag for this release can be browsed at:

http://openser.svn.sourceforge.net/viewvc/openser/tags/1.5.5/

Project site at SourceForge.net (still using old name):

http://sourceforge.net/projects/openser/

Binaries and packages will be uploaded at:

http://www.kamailio.org/pub/kamailio/1.5.5/

Modules’ documentation:

http://www.kamailio.org/docs/modules/1.5.x/

What is new in 1.5.x release series is summarized in the announcement of v1.5.0:

http://www.kamailio.org/w/kamailio-openser-v1.5.0-release-notes


Note: Kamailio is the new name of OpenSER project. First version under Kamailio name was 1.4.0. Older versions will continue to use OpenSER name.

Thursday, October 14, 2010

Best of New in Kamailio 3.1.0 - #10: Registration to Remote SIP Servers

Many DID providers require to register to their servers in order to route the calls to your server. While the recommended way is to get a peering agreement where all calls to your block of DIDs are sent to the IP address of your SIP server, in some cases, like SOHO or SMB, you usually register to some VoIP services that offer free DIDs. Then is hard to get a peering agreement just for one or two DIDs.

Normally you used such providers only for incoming calls, for outgoing you have a least cost routing system selecting the best route from many termination providers.

Kamailio 3.1.0 introduces a handy way to configure your SIP proxy to register to other SIP servers for incoming calls. You have to load uac module and add records to uacreg table. The table stores following attributes:
  • l_uuid - local unique user id, e.g.,: 12345678
  • l_username - local user name, e.g.,: daniel
  • l_domain - local domain, e.g.,: mysipserver.com
  • r_username - remote username, e.g.,: daniel123
  • r_domain - remote domain, e.g.,: sipprovider.com
  • realm - remote relam, e.g.,: sipprovider.com
  • auth_username - authentication username, e.g.,: daniel123
  • auth_password - authentication password, e.g.,: xxxxxx
  • auth_proxy - SIP address of authentication proxy, e.g.,: sip:sipprovider.com
The module takes care of sending REGISTER and refresh registrations before they expire.

When calls come in, you have to run uac_reg_lookup() that will detect if the call is coming from a remote SIP provider and can change the R-URI to local username@domain. Afterwards you can run location lookup.
if(uac_reg_lookup("$rU", "$ru")) {
xlog("request from a remote SIP provider [$ou => $ru]\n");

}
lookup("location");
The documentation for uac module is available at:

Tuesday, October 12, 2010

Apt Deb Repositories for v3.1.0

Courtesy of Jon Bonilla, Kamailio's Debian APT repository is offering now the packages for version 3.1.0 as well as nightly builds from stable branch 3.1.

So, if you want to get the latest version of branch 3.1, set your apt sources to:

deb http://deb.kamailio.org/kamailio31-nightly lenny main 

Supported OSes are Debian Lenny, Squeeze and Ubuntu Lucid.

Check for more details the wiki page:

Monday, October 11, 2010

Best of New in Kamailio 3.1.0 - #9: Load Balancer



SIP load balancer extension - dispatcher module - comes in Kamailio v3.1.0 with a bunch of new features:
  • weight-based load balancing - you can assign weights to addresses in a destination group and Kamailio will take care to distribute calls accordingly. For example, if you want to distribute 80% of calls to one server and the rest to another one, just set weight=80 to first address and weight=20 to second one
2 sip:192.168.178.20:5080 0 0 weight=80
2 sip:192.168.178.28:5082 0 0 weight=20
  • call-load-based dispatching - the module can track active calls and select least loaded destination to distribute the traffic. Note that the module includes a light-weight call tracing system which works even in transaction stateless mode. There is no dependency on heavy modules such as dialog, making it suitable for embedded systems as well.
  • configurable list of valid codes for SIP ping replies - the module has the ability to send OPTIONS requests to addresses in destination sets in order to discover whether they are active or not. In some particular cases, the reply code could be different than 200 (for example the system is asking for authentication), but still the system should be able to handle new calls. With module parameter ds_ping_reply_codes you can define a list of reply codes or reply code classes that are valid to consider that destination is active. For example - all 2XX and 3XX replies, together with 403 and 488:
modparam("dispatcher", "ds_ping_reply_codes", "class=2;code=403;code=488;class=3")

The value of this parameter can be changed at runtime without restartion Kamailio.

Summarizing, with the new weight and call load dispatching, the module offers now a large range of algorithms to select destination, from old ones I would mention: round-robin, priority level, random, hashing of SIP message attributes. you can hardly find a competitor to beat the performances and features of dispatcher module for SIP load balancing.

You can browse module's documentation online at:

Thursday, October 7, 2010

Best of New in Kamailio 3.1.0 - #8: Configuration File

Kamailio v3.1.0 is shipped with a refurbished configuration file. It has a new structure to reflect better SIP server functionalities such as:
  • SIP location server
  • SIP registrar server
  • SIP presence server
  • NAT traversal management
  • PSTN routing
  • SIP message format sanity checks
  • routing within-dialog SIP requests
Several values were replaced by defines making easier to maintain and understand the logic of configuration file:
  • value of db_url parameters is set by DBURL define - if you change the access to database server you have to update a single value
  • multi-domain parameter value
  • used flags (for accounting, missed calls or NAT traversal) are also defined values, using more meaningful ID name
Couple of new features are included in the configuration file and can be easily enabled or disabled by defining or un-defining specific IDs:
  • TLS support - controlled by #!define WITH_TLS
  • multi-domain support - controlled by #!define WITH_MULTIDOMAIN
  • flood detection and protection - controlled by #!define WITH_ANTIFLOOD
  • database aliases lookup - controlled by #!define WITH_ALIASDB
  • source IP authentication - controlled by #!define WITH_IPAUTH
  • XMLRPC control interface -controlled by #!define WITH_XMLRPC
Have a look at configuration file (located in /etc/kamailio/kamailio.cfg or /usr/local/etc/kamailio/kamailio.cfg) and you will be surprised to discover how easy is now to manage it and turn on/off features. Also, you can browse it online on our GIT repository.

Wednesday, October 6, 2010

Kamailio v3.1.0 Released

Kamailio (OpenSER) v3.1.0 is out – major release with impressing number of new features and improvements.

On October 06, 2010, Kamailio (OpenSER) 3.1.0 has been released – this release is a result of more than 8 months of development from the teams of Kamailio (OpenSER) and SIP Express Router (SER) projects. Backed up by a solid development group, we are proud to announce that this release brings a large set of features, many for first time on the SIP server market, such as asynchronous TLS, UDP raw sockets, embedded HTTP and XCAP servers, embedded Lua, configuration file debugger. All together, there are over 15 new modules and countless improvements to old components.

Since last major release (version 3.0.0, which was out in January 10, 2010), the two SIP servers, Kamailio and SER, are practically the same application, the name making the difference regarding the database structure and the extensions used for certain features, such as user database based authentication or location service. Therefore another development direction was towards smooth integration of Kamailio and SER extensions, previously duplicated modules such as auth, sl, ratelimit or sms were merged during this development cycle.

Continue reading the release notes at:

Tuesday, October 5, 2010

Best of New in Kamailio 3.1.0 - ToC

Kamailio 3.1.0 - a new major release of the open source SIP server - is scheduled for October 6, 2010. The amount of new feature is astonishing, it is the outcome of 7 months development made by Kamailio and SER teams.

With blog series named "Best of New in Kamailio 3.1.0 ..." I try to detail some of most relevant new additions this release brings to light.

Here is the table of content:
Chapters will be added over the time and this page will be updated with the links to specific posts. Check it from time to time to see its new content...

Monday, October 4, 2010

Best of New in Kamailio 3.1.0 - #7: Pre-processor Directives

Previous major version, 3.0.0, introduced for first time configuration file pre-processor directives that allowed to include files, define IDs and test their definition.

It was one of the most appreciated additions in 3.0.0, allowing to structure better the configuration file, to enable or disable features with one single line change.

Kamailio v3.1.0 added new features to these pre-processor directives:
  • defined IDs can take values, being either strings, integer or even statements
  • defined IDs with values are replaced across configuration file
  • new subst directive that does perl-like substitutions inside string values within configuration file
For example, the default configuration file for v3.1.0 defines DBURL token to be used for db_url parameters:
#!define DBURL "mysql://openser:openserrw@localhost/openser"
...
modparam("auth_db", "db_url", DBURL)
Changing access to database requires now to update a single place, the define of DBURL.

If you have pieces of config that repeat, you can define them and reuse:
#!define MYLOG xlog("[$Tf]: message $rm from $fu to $ru\n")
...
route {
...
MYLOG;
...
MYLOG;
...
}
...
The new subst allow replacement inside string values - example: replace DBPASSWD token with 123qaz in all strings inside configuration file:
#!subst "/DBPASSWD/123qaz/"
modparam("acc", "db_url", "mysql://user:DBPASSWD@localhost/db")
Note that defines and subst apply to all parts of configuration file, not matter are global parameters, module settings or routing blocks.

Another useful features related to config pre-processor directives is the ability to define IDs from command line using -A parameter:
kamailio -A MYVALUE=abc
You can see as well the core cookbook section for pre-processor directives:

Sunday, October 3, 2010

Best of New in Kamailio 3.1.0 - #6: Asynchronous TLS

Demand for secure communication increased lately. Caused or not by more and more attacks on VoIP systems lately, as well as better penetration of Instant Messaging and Presence in SIP networks, IP telephony providers look now seriously to offer full content protection as a service.

Kamailio 3.1.0 is the first version that can be truly used for large scale full encrypted SIP communication engine. OpenSER (up to Kamailio 1.5.x) had more like a beta implementation, it was added for prototyping purposes and never improved, maybe also a result of missing TLS clients at that time.

Previous version, Kamailio 3.0.x, had a completely re-architectured TLS implementation, inherited from SIP Express Router (SER) v2.1.0, which was designed for massive scalability. Still, the missing piece in 3.0.x was asynchronous support. This was added in 3.1.0.

Asynchronous TLS support in v3.1.0 stands out through its simplicity to configure. It is on by default, transparent to configuration file. You can disable it via TCP connection control parameter:

tcp_async=no

The tls module has a comprehensive documentation:
TLS being a layer on top of TCP, many tunings can be done via global TCP parameters:

Friday, October 1, 2010

Best of New in Kamailio 3.1.0 - #5: GeoIP API

When providing services world wilde, with a centralized signaling platform and distributed media relays for optimizing voice path, one of the most important decisions to make is which media relay to use for best quality.

One criterion is geographic location of caller and callee - discovering that at runtime is much better than static mapping considering the mobility of users.
Kamailio 3.1.0's new module named geoip provides to configuration file an easy way to discover the location of caller or callee based on IP address. You can query a Max Mind GeoIP database and receive location details such as country code, time zone, a.s.o.

Here is an example of how to detect if the caller and callee are located in same country:
if(lookup("location")) {
# callee is online
geoip_match("$si", "src");
geoip_match("$nh(d)", "dst");
if($gip(src=>cc)==$gip(dst=>cc)) {
xlog("caller and callee located in same country - code: $gip(src=>cc)\n");
}
}
Another beneficial result is to be able to drop traffic coming from specific countries that tried to attack your service or you don't have customers. This is very useful these days, in a time where spit and scanning attacks against VoIP server increases.

Of course, this is an alternative to firewall method, giving you the opportunity to monitor (e.g., write in SIP server logs) if there are attempts of sending calls from such countries. Also, you can count attempts from a specific country and block the country for a while, everything done dynamically in your configuration file.

Blocking all traffic from Canada would be like:
geoip_match("$si", "src");
if($gip(src=>cc)=="CA") {
xlog("SIP message from Canada (ip: $si) - drop it\n");
send_reply("403", "Forbidden");
exit;
}
GeoIP API is very easy to use, the module has one parameter to set the path to GeoIP database, then you can match any IP address (e.g., source IP, next hop IP, IP from Via, Contact or any other header) and store the results in as many containers as you want, then they can be used to compare any attribute between them or against config values.

The documentation of geoip module is available at: