There is no doubt that the back-to-back support is a very important asset for OpenSIPS. Maybe you do not use it directly with B2B scenarios, but there are several modules using the B2B support in order to provide even more complex calling scenarios, like:
- Call Center – for managing the call between queue and agents
- SIPREC – to manage the call leg towards the SIPREC server
- Media Exchange – for creating new call legs for pushing/fetching RTP streams
- B2B SCA – an aggregator of B2B calling and Shared Call Appearance
So, there are actually many cases where the back-to-back support (the b2b_entities mainly) is required and used in OpenSIPS.
And considering all the clustering work that was done in last years in OpenSIPS, this automatically raise the need : the back-2-back must also have clustering support.
This need for the clustering support is even stronger as coming from the High-Availability direction. Yes, in order to build a highly available system for OpenSIPS, with an hot (fully sync’ed) stand-by, you need clustering support, mainly the ability of the back-2-back engine to replicate its internal data in realtime, with other OpenSIPS instances.
This support was just added in OpenSIPS 3.1, the upcoming major release. It has tiny visibility at the scripting level (just one new extra parameter for the b2b_entity module, to set the cluster ID), but there is a huge amount of under-the-hood coding to make it work (spoiler: video demo at the end)
The implementation of the data replication in b2b_entities module will reflect upon all the modules on top of it. The b2b_entities will also provide to the upper modules this data replication support. Already the b2b_logic, media_exchange and siprec module are fully taking this advantage in order to achieve clustering. For more complex modules like call_center and b2b_sca, some extra work is still required.
So, thanks to back-2-back clustering support, many other modules have achieved the clustering capability.
And because there is not much to show about this (just one single module parameter), let’s better see the effect of this clustering upon calling scenario.
Thanks to Vlad Patrascu, we have here a video with a short demo. It will showcase how we can achieve High Availability for ongoing B2B sessions, in a simple two-node cluster, configured in an Active-Backup setup. The B2B scenario considered involves an OpenSIPS server that bridges a caller to a media server, before and after connecting it to a final endpoint. We will see how such a B2B session survives a failover event and restoration to the primary server.
Enjoy it !!