Friday, July 1, 2011

10yearsSER - things done right - configuration file

Looking back over the past 10 years since SIP Express Router (aka SER) is developed, I found several things that made it famous. First such thing to talk about is the configuration file.

SER's configuration file is completely different than one may expect, like typical .ini file or, common in telephony, the prefix based routing rules (e.g., Asterisk's dialplan).

SIP promises included flexibility, extensibility and ability to route calls on IP/DNS based networks, with telephony just a subset of its capabilities. Based on that, going for prefix based routing seemed inappropriate for long term goals.

Initially designed by Andrei Pelinescu-Onciul, the structure of SER's configuration file ended to be very like a programming language. That succeeded to get over the time a lot of people to dislike SER itself, mainly those coming from legacy telephony products, very used in routing telephone numbers, based on prefixes.

Summarizing the evolution and comparing with what happened to other IP telephony projects, I can definitely conclude that the decision was the right one. Here is a short example of routing SIP INVITE requests to 10.0.0.1 and the other request types to 10.0.0.2:
route {
if(method=="INVITE") {
t_relay_to("udp:10.0.0.1:5060");
} else {
t_relay_to("udp:10.0.0.2:5060");
}
}
For example, Asterisk and Freeswitch, although they have their own call routing config language, text or xml based, in most of the cases the routing is decided using programming languages such as Lua, PHP, Perl a.s.o, through embedded interpreters or control interfaces such as AGI.

Probably SER came too early with this idea, at that time there was no fast scripting language that could have been used to match our performance goals, being necessary to define a new one. No matter how many hated it so far, several order or magnitudes more loved it, resulting over the time in a well defined SIP routing language, optimized to be fast for handling SIP traffic. With the power of a logical language in hands, people could easily build their ideas of new services on top of it.

At this moment SER and Kamailio (forked from SER in 2005 and back together since 2008) have embedded interpreters for Lua, Perl or Python, so you can route SIP using applications written in such programming languages, but still the default config language is the internal one.

It is no way I can be sure or claim that using a logical language for configuration file of telephony engines was invented in SER, but for sure it contributed substantially to show the power of such concept in building new and advanced telephony services.

In the year of 10th anniversary, it is the time of sending kudos to Andrei for such idea and his work to implement it.

No comments:

Post a Comment