Ok, most of us  know that Voice Internet Protocol (VoIP) Telephony refers to the technology used for making telephone calls over the Internet. We trying to make this technology as easy as possible for engineers/geeks who trying to deploy it all around and also for users who just want to pick up the phone and make a call.

I think it’s very important to understand the complete call flow in order to be ready to solve some issues that could be here and there with VoIP. Nowadays there are  two major platforms  used to implement VoIP telephony: one is a great Asterisk (thanks to Mark Spencer, cheers!) and OpenSER.


In this post we will try to compare Asterisk and OpenSER side by site and understand what is the main differences between these two.

Prelude

If you work with IP telephony, it’s quite possible that you have not heard about OpenSER, but certainly you must have heard about Asterisk.

Well, I love a polemic headline and I have seen this question asked in the forums many times.  So, I will dare to compare these two very popular softwares dedicated to the VoIP market.  The idea here is not to show you which one will be better for your specific project, but mainly how they are different from each other. Below is a comparison side by side.

Architecture

Asterisk is a Back to Back User Agent (B2BUA), while OpenSER is a Session Initiation Protocol (SIP) Proxy.  This makes all the difference between them. The SIP proxy architecture is faster than a B2BUA because it deals only with signaling (no RTP, i.e. voice data passing thru it). On the other hand, the B2BUA architecture, even being slower, handles the media and it is capable of several services not available in a SIP proxy such as Codec Translation, Protocol Translation (SIP to IAX/ SIP to H.323 / IAX to H.323 / H.323 to SIP … ), and services related to media such as IVR (Interactive Voice Response), Queuing, Text to Speech, FAX to e-mail and Voice Recognition.

Nat Traversal

OpenSER deals a lot better with NAT traversal then Asterisk do. You can send the media from your customer directly to the provider using OpenSER in most cases (non-symmetric NAT). Manipulating directly the SIP protocol allows you to handle special cases (for example when you have two customers behind the same NAT device and want to send the media directly between them).

Load Balancing

OpenSER has specific load balancing algorithms with hash. So it can load balance by the “ruri”, “username”, “call-id”, and some other properties. It can use redirected messages consuming very few resources from the load balancer machine. Failover is part of the solution, things you won’t find on Asterisk (at least without nights of additional coding), but are complementary.

Low Level Access to SIP Header and Transactions

OpenSER gives you low level access to the protocol. You can handle all the requests and responses. So it is possible, most times, to translate between two incompatible versions of SIP, handling directly the SIP headers, requests, and responses. This is an important feature when you have SIP implementations from different manufacturers, which can be incompatible between each other.

Integration with Radius, Diameter, and LDAP

OpenSER has built-in integration with LDAP, Radius, and Diameter. While this is also possible with Asterisk, the implementation on OpenSER is developed in C, integrated as a module, and is part of the OpenSER distribution (no perl, no python, no third-party modules, ha-ha!).

Carrier Class Routing

The module CARRIERROUTE implements sophisticated algorithms to route calls to the PSTN. Some times VoIP providers have tables with more then 40.000 routes. In this case, you will absolutely need a specific routing module capable of failback, blacklists, and some other features specific to VoIP providers.

Media Services

OpenSER is a SIP Proxy and is not capable of any media related services. So it is not possible to create, using OpenSER, systems such as VoiceMail, IVR, TTS, and Voice Recognition. However, it is possible to integrate any of these services to the platform using a separate Media Server such as Asterisk, Yate or FreeSwitch.  This is by design, and it is the way the SIP protocol is defined in the standards (RFC3261).

Connectivity to the PSTN

OpenSER always need a SIP gateway to connect to the PSTN. There is no possibility to install telephony cards in the server.  In several cases, Asterisk is used as the PSTN gateway for OpenSER.

Conclusion

I love this discussion, because Asterisk and OpenSER completes one another. OpenSER provides rock solid SIP services to VoIP providers, it is capable to handle large volumes of calls (thousands), to load balance SIP, to solve  advanced NAT scenarios, and to deal with SIP signaling as no other. Asterisk is a B2BUA, very strong in the PBX market. It is simpler to configure and can handle low to medium volumes (let’s say 80-100 lines per unit – depends on CPU and etc.).  Asterisk can be used as a “single box does it all”, while OpenSER requires all the architectural components of SIP to work. OpenSER is a “hit” in the VoIP provider market and in Universities. Asterisk PBX is a success in the IP-PBX market, and it is getting a piece of the small to medium VoIP providers. Usually you start using OpenSER when you have some special need, such as load balancing or when you have large volumes such as more than a thousand registered users. Choose wisely and take care!

 

Leave a Reply