What are SIP Servers and why are there so many?
SIP and SIP Servers – a brief explanation
SIP is a general purpose Session Initiation Protocol that can be used as the basis for a range of services that extend beyond VoIP to video, Presence and beyond. It is a powerful and highly versatile protocol that can be used for signalling and to establish and terminate communication sessions between end-points. Even within the voice environment, SIP can be used to implement various services that add functionality and features on top of the basic end-to-end voice connection.
SIP is now the foremost open protocol used for Voice over IP services. VoIP Service providers must support a large user base across the Internet, providing 2-way access to the Public Telephone network and seamless integration with value-added services like voicemail. Their systems have to be resilient, highly featured and capable of interconnection with a wide range of end-user equipment. The range of components that they must use when designing a solution is reflected in the relatively large number of SIP Server types.
In this context the term “SIP Server” describes a particular service that can be implemented using SIP rather than being a reference to a physical device (a PC for example). One hardware device, such as a Dell or HP Server, can be used as the host for several different SIP Server services. This should make more sense as you see what types of SIP Server there are.
A SIP Proxy Server acts as an intermediate router for SIP requests and is always located somewhere in the path between two end points. A SIP Proxy Server would never be the end point itself. When it receives a SIP request it will examine it and decide whether to pass it on unmodified, change it in some way and forward it, re-route it to an alternative destination (or destinations – see “Forking Proxy below”) or reject it. When it rejects a request, it must send back a response giving a reason. One of the core functions of a Proxy Server is to ensure that a SIP INVITE request is routed to the correct onward destination. It would normally have a “dial plan” for this purpose. The actual destination might be a PSTN gateway, another Proxy Server, a SIP phone (often referred to as a User Agent) or a Media Server.
This is just a specialised type of Proxy Server that duplicates the SIP request and forwards it to multiple locations. It must also handle the multiple responses and filter them to ensure that the device that sent the original request is not confused.
This is another specialised type of Proxy Server that responds to SIP INVITE requests by returning a 3xx response. Alternatively, it may reject the call and send a response to this effect. The main 3xx responses are 300, 301 and 302. Along with with the 3xx response, the Redirect Server sends back one or more alternative addresses using the SIP Contact header. The device that initiated the call and sent the original INVITE receives the 3xx response and knows that it must re-try the call using the address (or addresses) provided by the Redirect Server.
Registrar Server (and Location Server)
A server that accepts and handles SIP REGISTER requests. It is normally combined with the function of Location Server – a Location Server simply being a database which stores information about the current location of a SIP User Agent. It is normal for a SIP phone – or other SIP User Agent – to register itself with one or more Registrar Servers as soon as it is is switched on. The registration will almost always involve authentication with a User ID and password. The User ID for many SIP devices is the same as its phone number. Once registered, it is easy for calls to be routed to the device provided the call passes through a Proxy Server that has access to the Location Server. Without this registration process, your IP phone would have to always be located in the same place using the same IP address and that IP address would have to be hard coded into the dial plan of the device calling it (or in the dial plan of a Proxy Server used by the calling device).
This is the name given to automated call processing servers (also known as IVR’s) in the VoIP World. A Media Server acts as the end point for a SIP call and typically plays pre-recorded voice announcements and prompts, accepts DTMF key presses or spoken instructions to allow it to implement interactive services such as voicemail, tele-banking, tele-voting etc.
This term describes a service that acts as a transparent bridge, between two networks, for media streams in a VoIP call. Servers that offer far-end NAT traversal often use an integrated Media Proxy. They act as a Proxy Server, but modify the contents of the SIP packets (in both directions) to make it look as if the terminating device requires the media stream to be opened at the address of the Media Proxy rather than at its own address. This means the device that initiated the call and the one that answered it have a media stream connection that goes via the Media Proxy which is sitting between them (transparently proxying the media). The Media Proxy is always on a public IP address which means devices behind NAT are able to initiate connections to it where they would not have been able to initiate connections to each other.
Gateway Server or PSTN Gateway Server
If you want to make calls from your VoIP phone to a phone on the conventional telephone network then your call has to be routed through a PSTN Gateway Server. The same is true if you want to call a mobile phone, although it is possible for the mobile service provider to make this gateway available as part of their infrastructure rather than requiring all VoIP calls to first break out to the PSTN and then onward to the mobile network. PSTN stands for Public Switched Telehone Network and it the name given to the traditional telephone infrastructure that serves all the landlines and telephones such as are still to be found in most homes. Most businesses still rely almost entirely on the PSTN for their inbound call traffic and only use VoIP for some outbound calls and for internal calls within the organisation (perhaps between branches that are geographically remote but which have existing high speed links for their data network).
B2BUA (Back to Back User Agent)
In some ways, this is like a cross between a Proxy Server and a Gateway Server. Technically – in SIP terms – it acts as the end point for an incoming call. In this respect it is unlike a Proxy Server. However, it would make use of a dial plan to determine where to forward the call and would initiate a new call to the required destination then links the audio paths together so that both remote parties can talk to each other. You could say that a Gateway Server is therefore a B2BUA, but strictly a B2BUA must be linking two VoIP calls together whereas a Gateway is linking a VoIP call to a conventional PSTN call. To summarise, a B2BUA acts as the “man-in-the-middle” for a SIP call path and appears to be the end point for both call legs. This means that it does not forward SIP requests and responses like a Proxy Server, but it does allow calls to be routed onward under control of a dial plan and it links the audio streams of the calling and called parties so they will think they are connected directly to each other. You may be wondering why this is useful – the answer is that it can greatly assist in allowing calls to penetrate networking boundaries such as between the Internet and a private LAN. It can also be used to modify the encoding of the speech on each leg of the call if the B2BUA is capable of so-called “transcoding”. Asterisk is an example of a B2BUA capable of transcoding.
SBC (Session Border Controller)
This term is sometimes used to describe a server that incorporates some of the services described above in such a way as to provide control of VoIP connections at the edge of a private network where it meets the Internet. It’s primary function is to control and facilitate access to VoIP devices on the network that it protects. However, some manufacturers also describe far-end NAT traversal devices as SBC’s which is probably a mis-use of the terminology, but then again the definition is somewhat ambiguous. If it is acting as a far-end NAT traversal device then it would either have to incorporate a Media Proxy Server or it would have to act as a B2BUA. In fact, for an SBC to work as a B2BUA with two interfaces – one connected to the Internet and the other to the protected subnet – makes a lot of sense. Firstly, it overcomes problems of routing and IP address substitutions for SIP packets traversing between two different networks, but it also permits a high level of control over calls that are attempting to enter or leave the protected network. Asterisk can be used very effectively in this role.