/weblog/opensips-and-asterisk-compared
Thursday, March 19, 2009
I receive more and more questions about an open-source VoIP project called OpenSIPS. If you work with Voice over IP, it is certain that you have heard about the Asterisk IP-PBX project but it is possible that you have not heard about OpenSIPS. With a rise in awareness of OpenSIPS, I wrote a quick comparison of these two VoIP platforms.

Simply put, Asterisk functions as a Back to Back User Agent (B2BUA), while OpenSIPS is a Session Initiation Protocol (SIP) Proxy. This makes all the difference between them. The architecture for a SIP proxy is simpler than a B2BUA because a SIP Proxy only deals with signaling. On the other hand, a B2BUA style architecture is more complex because it is responsible for signalling and the media (voice). In a SIP proxy, such B2BUA services such as as codec translation (ie uLaw to G.729a), protocol translation (SIP to IAX2), and services related to media such as IVR, voicemail, automatic call distrubution, text to speech, and voice recognition are not available.
Network Address Translation (NAT) is SIP's Achilles heel. NAT is a function of a network router to map private (local) IP addresses to public (internet) IP addresses. OpenSIPS deals a lot better with NAT traversal then Asterisk. OpenSIPS allows you to send the voice (or video stream) from your IP Telephone or VoIP software client directly to a VoIP telephone service provider using in most cases (non-symmetric NAT). OpenSIPS also allows you to directly manipulate SIP communication to handle special cases, such as, when you have two VoIP telephones behind the same NAT router and want to send the media directly between them.
A unique strength of OpenSIPS is its ability to load balance VoIP calls. Specialized hashing algorithms in OpenSIPS can be configured to load balance by the "username", "ruri", "callid", and other properties. OpenSIPS is "failover aware" and can make for a very complementary part of an Asterisk solution.
With OpenSIPS, you have low level access to the Session Initiation Protocol. You can handle all the requests and responses. This makes it possible 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.
OpenSIPS always need a SIP gateway to connect to the PSTN. There is no possibility to install telephony cards in the server. Often, I will implement Asterisk as a PSTN gateway for OpenSIPS.
As with Asterisk, OpenSIPS has built-in integration with LDAP, Radius, and Diameter.
OpenSIPS is a SIP Proxy and is not capable of any media related (the voice portion of a telephone call) services. OpenSIPS is not a platform that you would use to create systems such as IVR, VoiceMail, TTS, and Voice Recognition, etc. This is by design. However, it is possible to integrate any of these services to an OpenSIPS system using a separate media server such as Asterisk.
Asterisk and OpenSIPS are different systems designed for different tasks. OpenSIPS is a Carrier Class SIP Proxy used primarily by VoIP providers. It is designed to handle large volumes of calls, load balance SIP communication, solve advanced NAT scenarios, and to deal with SIP signalling as no other. Asterisk is a B2BUA and is very popular in the small to medium PBX market. Asterisk is simpler to configure and can be used as a "black box does it all". OpenSIPS is typically used when you have some special need, such as load balancing or when you are managing large volumes such as more than a thousand registered users.
Contact Advantia to help you: