Saturday, January 9, 2010

Best of New in Kamailio 3.0.0 - #15: sctp

SCTP - Stream Control Transmission Protocol - read more about this protocol at wikipedia or the IETF RFC. Being designed with telephony in mind, SCTP and SIP match perfectly, unfortunately not many end devices support it due to late appearance, but for internal infrastructure and peering is the best option in terms of server resource usage, scalability and high availability.

Kamailio (OpenSER) 3.0.0 offers of the most complete SCTP implementation in the open source SIP and VoIP world. The numbers of features talk themselves:
  • multi-homing
  • statistics for SCTP
  • connections associations - multi-streaming
  • connection auto-close
  • runtime re-configuration of SCTP parameters
  • management of attributes for retransmission at SCTP transport layer
  • connection reuse
  • connection tracking
  • black-listing at SCTP level
  • ability to fallback to SCTP for big UDP packets
  • over 20 parameters to tune SCTP behaviour
  • configurable time to live, send retries, send and receive buffer size, retransmission timeout, a.s.o
  • admin access via RCP control interface
Next some examples of using command line interface application sercmd to access SCTP options:

 $sercmd core.sctp_info
{
opened_connections: 0
tracked_connections: 0
total_connections: 50007
}

$ sercmd core.sctp_options
{
sctp_socket_rcvbuf: 54784
sctp_socket_sndbuf: 54784
sctp_autoclose: 180
sctp_send_ttl: 32000
sctp_send_retries: 0
sctp_srto_initial: 3000
sctp_srto_max: 60000
sctp_srto_min: 1000
sctp_asocmaxrxt: 10
sctp_init_max_attempts: 8
sctp_init_max_timeo: 60000
sctp_hbinterval: 30000
sctp_pathmaxrxt: 5
sctp_sack_delay: 200
sctp_sack_freq: 0
sctp_max_burst: 4
}
Integration of SIP with SS7 networks should be pushed forward by availability of this SCTP implementation in the Open Source space. Also I expect more and more big SIP platforms to migrate internally to SCTP, mainly because of reliability and high availability features offered by this transport layer.

The series will continue with SIP identity authentication - RFC4474

Friday, January 8, 2010

Best of New in Kamailio 3.0.0 - #14: iptrtpproxy

If you face limitations in handling the RTP streams for your behind NAT users, check the new module in Kamailio (OpenSER) 3.0.0 named: iptrtpproxy.

Online readme available at:
http://kamailio.org/docs/modules/3.0.x/modules/iptrtpproxy.html

Using it, all RTP streams are manipulated directly in kernel space, no data are copied from kernel to userspace and back, therefore reducing load and delay.

The provides similar functionality as nathelper but communicates with netfilter kernel xt_RTPPROXY module using libipt_RTPPROXY userspace library. More about these at:
http://www.2p.cz/en/netfilter_rtp_proxy

AFAIK, these NAT traversal solution is used by public VoIP service offered by iptel.org, therefore is pretty much production ready (Note: the module is not a new development, it is available in Kamailio 3.0.0 via SIP Router project framework from SIP Express Router (SER)).

Next I will get back to transport layer: SCTP - Stream Control Transmission Protocol - wikipedia.

Thursday, January 7, 2010

Best of New in Kamailio 3.0.0 - #13: number portability

Contributed by 1&1, the German provider running a telephony service with over 3 000 000 subscribers, Kamaialio (OpenSER) 3.0.0 comes with a suite of tools to implement fast number portability handling:
  • pdbt server - located in source directory, under utils/pdbt
  • pdb module - client for the server, as Kamailio module
The PDB module and server have support for load-balancing and aggressive timeouts (in milliseconds), offering a scalable framework for number portability service.

The module can query in many servers in parallel and use the first answer , ensuring just few milliseconds to query the remote server and return the reply to the configuration script. Runtime management can be done via Kamailio's control interface (e.g., via XMLRPC, FIFO file, UDP or TCP sockets).

See the readme online at:
http://kamailio.org/docs/modules/3.0.x/modules/pdb.html

Coming next: iptrtpproxy - kernel-based media relaying for nat traversal

Wednesday, January 6, 2010

Best of New in Kamailio 3.0.0 - #12: development team

The most important aspect of every open source project is long term reliability. Kamailio (OpenSER) is no longer a small application, version 3.0.0 packages over 100 modules and you can use now other over 50 modules coming from SIP Express Router (SER).

On another hand, we play on the availability-is-critical market - telecommunications. By law or user expectation, the service should not be down nor have long delays. If there is a bug, it has to be fixed quick, if there is a regression, then needs to be recovered asap. If the user has an emergency, you must route his 112 (911) call at any time.

Moreover, just voice communication is deprecated, providers need to offer new services to resist on the market, new features need to be brought in.

Considering all these, first thing to analyze to an open source project is the development team. And I think the SIP Router Project (out of which we package Kamailio (OpenSER) 3.0.0) has a great group of people and companies doing support and development.

With the risk of forgetting many of them (I will do that to myself, but just contact me if your name is missing), I am listing some names (no order preference) along with very short description (google their name for more):
  • Andrei Pelinescu-Onciul - the one that wrote first line (and 2nd, 3rd, and couple more) of code for SIP Express Router (SER), credited for the application design, very active all the time since the SER project started, keeping SER the reference name of open source SIP server (NOTE: SER is the foundation for Kamailio (OpenSER) (fork of SER in 2005) or other variants, many Kamailio developers were working to SER project as well). He is working for Iptelorg
  • Juha Heinanen - running TutPro consultancy service, member of Kamailio management team, doctor in computer science, former professor at Tampere University, author of many RFCs, and the list can continue … from the web:
    http://www.arkko.com/tools/rfcstats/juhaheinanen.html
  • Jan Janak - one of the most important and oldest developers of SIP Express Router (SER), tight involved in project administration, working for Iptelorg
  • Elena-Ramona Modroiu - member of Kamailio management team, co-founder of Kamailio (OpenSER), author of many tutorials about Kamailio, including the Devel Guide, running consultancy service at asipto.com
  • Miklos Tirpak - among first contributors of SIP Express Router (SER) project, working for Iptelorg
  • Klaus Darilion - doctor in computer science at Technical University Vienna, involved in ENUM and security of VoIP/SIP, author/contributor to several open source applications (e.g., QjSimple SIP phone) and papers related to these domains, working at ipcom.at
  • Jiri Kuthan - in charge with SIP Express Router (SER) project management at FhG Fokus where it started just before year 2000, involved in development, author of IETF RFCs, running Iptelorg
  • Henning Westerholt - developer and member of management board of Kamailio, in charge with the biggest VoIP deployment based on Kamailio(OpenSER) I ever heard of: by now about 3 000 000 users, 6 000 000 phone numbers, 2 000 000 000 routed minutes per month (older reference), working at 1&1
  • Raphael Coeffic - initial author of SIP Express Media Server (SEMS), working at Iptelorg
  • Andreas Granig - Kamailio developer, author of Kamailio Config Wizard, working at sipwise.com
  • Martin Hoffmann - developer member of SER management team, working at Telio
  • Jesus Rodriguez - Kamailio developer and FreeBSD packager, working at Voztele.com
  • Greger Viken Teigre - member of SER management team, one of the authors of SER Getting Started guide
  • Inaki Baz Castillo - Kamailio and SIP Router developer, running sipdoc.net
  • Stefan Sayer - main author of SIP Express Media Server (SEMS), member of SER management team, working at Iptego
  • Carsten Bock - Kamailio and SIP Router developer, in charge with many SIP deployments in telco and mobile operators across Europe, working for Basis Audionet
  • Maxim Sobolev - developer of SER and author of RTPProxy, Sippy B2BUA, working at Sippy Soft
  • Alex Balashov - Kamailio advocate, long term community support activist, running consultancy service at evaristesys.com
  • Ovidiu Sas - Kamailio developer, running voipembedded.com
  • Nils Ohlmeier - SER developer, author of sipsak, VoIP RFC Watch and other SIP testing tools, working as SIP and VoIP consultant
  • Olle E. Johansson - registered developer of Kamailio and SIP Router, well known for its activity as main SIP developer for Asterisk, running edvina.net
  • Hendrik Scholz - SER developer, in charge with Freenet VoIP platform of over 700 000 users, working at FreeNet AG (NOTE: Freenet DLS & VoIP was bought by 1&1 in 2009, resulting in 1&1 VoIP platform running a subscriber base of over 4 000 000 000 SIP accounts once integration is done)
I would say:
  • with such squad, the future development is safe and guaranteed for high quality outcome
  • the combined SIP and VoIP expertise is outstanding
  • this is clear not one-man project, therefore not dependent of availability of one person
  • it is no company that can take control over the project, ensuring impartial evolution and business environment
  • having many companies behind the devs, the project has a strong business and financial backup for a solid future
  • biggest VoIP providers in Europe are directly involved in the SIP Router project: 1&1, FreeNet and Telio
Do you need more references to convince you or your upper management to go with SIP-Router-project-based solutions? Contact me, I have dozen of other references for you, now I listed only those related to people involved in development team right now.

Next episode: number portability.

Tuesday, January 5, 2010

Best of New in Kamailio 3.0.0 - #11: memcached connector

Another interesting module in Kamailio (OpenSER) 3.0.0 is memcached - readme is available online at:

http://kamailio.org/docs/modules/3.0.x/modules_k/memcached.html

Memcached is a distributed memory object caching system and the Kamailio module sharing the same name gives you the possibility to access the key-values stored in Memcached server from withing Kamailio configuration file.

Main featured offered by memcached module:
  • get/set integer or string values from/to memcached server
  • atomic increment or decrement integer values from memcached server
  • key can be static string or dynamic value build from other config variables
  • set expire time for memcached values
  • operations are done via pseudo-variables, therefore memcached values can be used by other modules, can be printed via xlog, a.s.o.
The pseudo-variables that give access to memcached operations are documented here.

Example of usage - count number of SIP requests to IP 10.10.10.10:

event_route[htable:mod-init] {
$mct(10.10.10.10) = 0;
}

route {
...
if(snd_ip==10.10.10.10)
$mcinc(10.10.10.10) = 1;
...
}
Then you can pull the number of SIP requests from a different application, like web admin portal.

Next in this series will not be about a SIP-related feature, but probably the most important aspect over all: the development team - join of Kamailio (OpenSER) and SIP Express Router (SER) under SIP Router Project, resulting in lot more people working on, with large expertise in the area, backed up by many companies, to ensure solid future and extraordinary quality of project.

SIP-related new features will continue afterwards.

Monday, January 4, 2010

Schedule for Kamailio 3.0.0 Release

Kamailio (OpenSER) 3.0.0 release scheduled for January 11, 2010 ...

This time the testing phase was a bit longer way than usual, but the achievements pay the bill - you can run Kamailio (OpenSER) and SIP Express Router (SER) modules at the same time, as well as most of the core features from both applications.

Proposed date to release Kamailio (OpenSER) 3.0.0 is the 11th of January. If you are aware of issues in branch 3.0, report them to:
sr-dev [at] lists.sip-router.org

I encourage everyone to contribute to wiki pages for what is new and migration from 1.5.x:
http://www.kamailio.org/dokuwiki/doku.php/features:new-in-3.0.x
http://www.kamailio.org/dokuwiki/doku.php/install:1.5.x-to-3.0.0

To get upcoming 3.0.0 from GIT and test, see:
http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-3.0.x-from-git

I started to detail some of the new features in blog posts, see ToC at:

http://bit.ly/4qy9cn

A great 2010 for kamailians and sip router users!

Sunday, January 3, 2010

Best of New in Kamailio 3.0.0 - #10: topology hiding

Kamailio (OpenSER) 3.0.0 comes with a new module named topoh. In SIP, there are several headers indicating the local IP address of user agent or the path taken to rich the SIP server:
  • top most Via header
  • contact address
  • Record-Route headers
  • sometimes the Call-ID header
You may want to hide such details, typical use cases being:
  • protect the addresses of your PSTN gateways - will protect you against people trying to attack them to get free calls
  • protect your internal network topology - when having a big platform with many servers, you do not disclose their addresses
  • interconnection provider - to keep the details of connected parties secret to the other, to prevent a bypass of its service in the future
Note that for full privacy, you have to use a media relay (like rtpproxy) to hide the endpoints of media stream.

Advantages of topology hiding via topoh module:
  • lightweight solution - it is built in top of the SIP proxy, does not keep the state of the call. Needed information is encrypted in the SIP message
  • it can work across several SIP servers - by sharing same secret, different servers can encode/decode SIP messages within same call
  • script writer gets access to clear SIP messages - using an innovation in Kamailio 3.0.0, the SIP message is decode before executing the config file and is encoded after it execution. Practically, in config you process headers as they are set by caller or callee, ensuring proper accounting, authorization, etc.
  • straightforward usage - you need just to load the module, eventually tune the module parameters and that's it - topology hiding functionality is transparent to config routing logic
  • scalability - there is no back-to-back user agent involved, one box running topoh can scale up to many thousands of active calls with a casual server hardware these days
See screenshots with headers of (pay attention to Via, Contact, Call-ID):
  • received INVITE from caller
  • forwarded INVITE to callee
  • received 200 ok from callee
  • forwarded 200 ok to caller






The readme of topoh module is available at:
http://kamailio.org/docs/modules/3.0.x/modules/topoh.html

Check next post to learn about MemCached connector - accessing memcached from Kamailio config file.

Saturday, January 2, 2010

Best of New in Kamailio 3.0.0 - ToC

Best of New in Kamailio (OpenSER) 3.0.0

Kamailio (OpenSER) v3.0.0 was released on January 11, 2010. It is the first version done based on http://sip-router.org integration project, meaning that you can use mixed features of Kamailio (OpenSER) and SIP Express Router (SER) in the same configuration file.

This page collects the links to a series of blog posts highlighting the best new features made available by 3.0.0 release.

Table of content: