TsB2BUA Back-to-Back User Agent Server Overview Source Code SDK

TsB2BUA from TeleSoft International is a highly portable, highly scalable software Back-to-Back User Agent Back-to-BackSession Initiation Protocol server (SIP server). TsB2BUA is delivered as a set of configurable source code files designed to run as an application on a wide range of operating systems and embedded or host-based platforms and servers. TsB2BUA is built to interoperate with a wide range of service providers, other SIP servers (e.g., Asterisk) and end-user SIP phones from a variety of manufacturers/developers.

Because it is delivered in source code form, customers can customize and differentiate their B2BUA-based products quickly and cost-effectively using TsB2BUA software building blocks.

TsB2BUA is a member of the TsSipServer family of SIP server building blocks that can be assembled in different combinations for different customer applications. Another member of the TsSipServer family is TsProxy, a SIP Proxy Server with or without Registrar(s). TsProxy can provide the functions of a SIP-PBX for a local SIP network.

A SIP Back-to-Back-User-Agent (B2BUA) is a SIP server that lets users in one SIP “domain” (e.g., www.telesoft-intl.com) connect Voice-over-Internet Protocol (VoIP) calls to users in another SIP domain (e.g., www.fedex.com).

A company/organization uses B2BUA(s) to connect its internal network(s) to the networks (SIP domains) of its:

  • remote company locations
  • service providers
  • customers
  • suppliers
  • partners

Versatile TsB2BUA is designed to be configured at both compile and run-time to fit a wide range of B2BUA topologies and applications. At its heart, TsB2BUA has a Call Router-Normalizer software entity which routes and maps (reformats) SIP messages between different users in separate SIP “domains” (logical sub-networks). Each SIP domain is often associated with a SIP Registrar, or it may be a SIP trunk domain that has no registrar/SIP registration process involved. A SIP domain is typically a collection of SIP User Agent (UA) endpoints (e.g., VoIP phones) and a SIP server that mediates calls between users in the domain.

As each SIP message passes through TsB2BUA between different SIP domain interfaces of the B2BUA, TsB2BUA makes changes to the SIP message to transform the SIP message so that it is valid in the destination SIP domain. This SIP message mapping/modification process is referred to as “SIP header normalization.” TsB2BUA automatically performs default SIP header normalization that works for many customers without modification, but TsB2BUA source code comments and documentation make it easy for the TeleSoft customer to customize SIP message normalization to fit their unique mapping needs, if any.

TsB2BUA can be configured to contain an integrated SIP Registrar/Proxy server, providing SIP proxy call services to users who register with the TsB2BUA Registrar. A user’s SIP phone which registers with the TsB2BUA Registrar can be in the local office or remotely located while accessing TsB2BUA over the Internet. Registered users can make local calls to other local users registered on that TsB2BUA Registrar, or to remote users on other SIP domains/networks across the Internet.

TsB2BUA can also be configured with “no registration enabled” to interwork/call between two or more SIP trunks/domains where no SIP registration is involved. Another special TsB2BUA configuration supports SIP Forum SIPConnect 1.1 Registration Mode that allows many phones registered on the internal Registrar/Proxy side of TsB2BUA to register with an external service provider via a single SIP registration transaction on the service provider interface.

Figure 1 shows the general TsB2BUA system configuration.

TsB2BUA System Configuration

Figure 1 – General TsB2BUA Configuration

Although Figure 1 shows two internal UAs (Agents) within the overall TsB2BUA box, TsB2BUA can actually support N-number of internal UAs/Agents (subject to memory and processing power constraints) per TsB2BUA build, with each internal UA/Agent configured as a Registrar, a Registering Entity, or a SIP trunk with no registration involved.

Highly Portable

TsB2BUA is provided in ANSI C source code form and is therefore highly portable to most platforms, from low-power embedded to highly scalable multi-threading servers. The high portability and scalability of TsB2BUA are a result of its minimal OS dependencies:

  • UDP/TCP/IP sockets
  • small set of common standard C run-time library system calls (e.g., strcpy)
  • optionally, POSIX sockets if multithreading is needed for the particular customer configuration.

Although TsB2BUA is usually shipped with Linux as the OS, the TsB2BUA OS Abstraction (OSA) package is available for a number of other OSs/RTOSs (e.g., VxWorks).

Available Internet-based training from senior TeleSoft software engineers can help speed understanding and time-to-market.

Supported B2BUA Functions

  • Call Routing and Filtering – TsB2BUA acts as an intermediary for users in one SIP domain to place VoIP calls to users in another SIP domain or via a service provider domain, allowing selective filtering and custom value-add modification of SIP messages as they pass through the B2BUA. Each end-to-end user VoIP call has two B2BUA call legs, one from each endpoint to the B2BUA.

  • Registrar – TSB2BUA provides PBX-like ability to register tens to thousands of users so that a central location, the Registrar, knows where (i.e., IP address) each registered user can be located at any given moment so that users can call each other within the local TsB2BUA Registrar domain, and also send and receive calls with usr endpoints outside the local TsB2BUA Registrar domain.

  • Security – Isolates different domains/networks to the extent required for an application. Can hide details of the network on the “other end” of a VoIP call, providing security for each respective network domain. Secure protocols like TLS for SIP and SRTP for RTP voice/video data can be used on one or both call legs of a B2BUA call.

  • Registering Entity – allows users who register with the TsB2BUA internal Registrar to automatically register with an external service provider service account, allowing the locally registered TsB2BA user to send and receive calls with the outside world via the B2BUA connection to the external service provider or other company/organization domain (e.g., www.verizon.net). See Figure 2 for an example TsB2BUA configuration which has this feature.

  • Media Relay – TsB2BUA has the optional ability to relay Real-Time Protocol (RTP) voice/video packets between two TsB2BUA domains. This can be useful for security – for example, non-encrypted RTP can be used on the internal company ”side” of TsB2BUA while encrypted SRTP is used to carry voice/video packets on the external “side” of TsB2BUA connected to a service provider.

  • SIP User Agent (UA) –proven TeleSoft CompactSIP stack handles most of SIP protocol details.

TsB2BUA is delivered as a flexible set of SIP server C source code building blocks that TeleSoft customers can use to rapidly and cost-effectively develop a range of custom B2BUA products. The building blocks include:

  • TsSipServer Call Router-Normalizer
  • TsSipServer Agent
  • TsSipServer Registrar
  • TsSipServer Registering Entity
  • TsSipServer User Agent (UA) CompactSIP Stack

In general, TsB2BUA will pass-through transparently to the other side call leg any SIP message headers and/or SIP header parameters that are not recognized by the TsB2BUA Call Router-Normalizer that is handling the SIP header or header parameter.

As with all other TeleSoft protocol stacks, TsB2BUA Server is a standards-based solution; TsB2BUA has been developed to comply with the latest IETF SIP Recommendations and SIP Forum SIPconnect Technical Recommendations. The TsB2BUA Server SDK is written in ANSI C language for ease of portation, low overhead operation and small memory footprint.

TsB2BUA Special Features

TsB2BUA has several special features not typically available on SIP servers:

1) Pass-Through Registration Mode (optional – can be per TsB2BUA Registrar registration account) – Illustrated in Figure 2 - allows a local domain TsB2BUA Registrar registration account user to place VoIP calls to users outside the local domain via the Internet using an external service provider registration account (e.g. Vonage). In this mode, there is a separate external service provider SIP registration account for each local Registrar registration account that needs to call outside the local TsB2BUA Registrar/Proxy server domain. Thus, when a local user registers with the TsB2BUA Registrar, it can automatically trigger registration on a corresponding SIP registration account with an external service provider (e.g., Vonage).

TsB2BUA Configuration Individual Registration Passthrough Mode

2) The SIP Forum’s SIPConnect 1.1 Registration Mode is supported by TsB2BUA and illustrated in Figure 3. SIPConnect 1.1 Registration Mode allows many phones registered on the internal Registrar/Proxy side of TsB2BUA to register with an external service provider via a single SIP registration transaction on the service provider interface.

TsB2BUA Configuration SIPconnect 1.1 Registration Mode

3) SIP Trunk to SIP Trunk Configuration -- Figure 4 illustrates the other end of the range of TsB2BUA configurations (compared with Figures 2 and 3), with Figure 4 showing a B2BUA connected to two SIP trunks in separate domains, with no registration on either “side” of TsB2BUA:

TsB2BUA Configuration SIP trunk on each side

4) Per-user registration account option for added security to permit registration with TsB2BUA Registrar from only one particular IP address/location for that TsB2BUA Registrar registration account.

5) Multiple bindings per TsB2BUA Registrar registration account. Allows more than one local phone to ring for an incoming call to a registered user, and first phone answered gets connected to the call.

Benefits of TeleSoft Software SDKs

Simplifies SIP B2BUA Server Design – Speeds Time-to-Market

Powerful features save valuable engineering resources and simplify product development.

Includes Full Function SIP Software

The TsB2BUA Server is based on and incorporates the proven TeleSoft CompactSIP protocol software stack. Written in ANSI C and using a small set of operating system calls, this Proxy Server requires minimal resources from any platform. CompactSIP supports and is compliant with over 55 IETF RFCs.

TsB2BUA Server Features

TsB2BUA Server is a modular, high performance, easy-to-use SDK:

  • Ideal for host & embedded applications
  • Micro system memory size 200KB-350KB
  • Modular architecture
  • Hardware Independent
  • OS independent
  • SIPconnect Conformant
  • IETF Conformant
  • Written in ANSI C for ease of portation


TsB2BUA runs as an application and can be run on a wide range of operating systems including Linux, Windows, MQX, Nucleus, Micrium UC/OS II, OSE and VxWorks.

TeleSoft CompactSIP is proven

  • Extensively interop tested at multiple SIPits and against Asterisk, OpenSIPS and 35+ 3rd party devices
  • Routinely torture tested against IETF RFC 4475 and PROTOS test suites and in our own test labs
  • Millions of clients in daily use worldwide

TeleSoft Advantages

TeleSoft SIP software stacks are specifically architected for all types of embedded, mobile and host based applications and are optimized for high performance and very small code size.

All TeleSoft SIP protocol software stacks are 100% hardware independent and run as applications that enable easy portation to different software and hardware platforms.

Purchasing TeleSoft Software

TeleSoft software products are supplied under a commercial license in source code form. Project costs are kept under control with cost-effective licensing fees.


Comprehensive documentation includes Porting Guide and User Guide provided in a searchable soft format