> For the complete documentation index, see [llms.txt](https://prosbcdocs.telcobridges.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://prosbcdocs.telcobridges.com/telecom-references/sip-and-voip/tb-media-gateway.md).

# TB Media Gateway

TB Media Gateway [Tmedia](https://telcobridges.com/media-gateways/products/tmedia-gateways/) is a full-featured media gateway application that works with TelcoBridges' family of [media gateway](https://telcobridges.com/media-gateways/products/tmedia-gateways/) and [value-added services](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/concepts/value-added-services/README.md) (VAS) [development platforms](https://telcobridges.com/products/development-platforms-tdev/) to provide core media gateway functionality.

### Functions

TB Media Gateway supports the following core media gateway functionality:

* [**Switching**](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/concepts/call-routing/README.md)
  * TB Media Gateway provides switching support for both [TDM](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/transmission/tdm/README.md) and [VoIP](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/sip-voip/voip/README.md)-based networks. It provides support for switching calls between [class 4](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/isdn-cas/tandem-switching/README.md) and class 5 switches on TDM networks, switching calls between TDM and VoIP networks, as well as support for [hairpinning](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/concepts/call-routing/README.md) on VoIP networks
* [**Transcoding**](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/voice-media/transcoding/README.md)
  * TB Media Gateway offers support for all major wireline, wireless and IP [voice codecs](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/voice-media/voice-codecs/README.md).
* [**Trunking**](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/sip-voip/trunking/README.md)
  * TB Media Gateway can terminate multiple trunks from multiple different service providers.
* [**Signaling**](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/sip-voip/signaling-protocols/README.md)
  * TB Media Gateway supports concurrent use of and switching between the [SS7](https://telcobridges.com/media-gateways/solutions/signaling/migrating-ss7-sigtran/), [ISDN](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/protocols/isdn/README.md), [SIP](https://telcobridges.com/learning/sip-trunking/what-is-sip/) and [SIGTRAN](https://telcobridges.com/media-gateways/solutions/signaling/migrating-ss7-sigtran/) signaling protocols.
* [**Accounting**](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/concepts/call-detail-record/README.md)
  * TB Media Gateway supports the [RADIUS](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/protocols/radius/README.md) accounting standard for the creation and storage of [call detail records](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/concepts/call-detail-record/README.md), or can be stored locally [Text CDR](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/concepts/text-call-detail-records/README.md). These can be imported into dedicated billing and reconciliation applications.
* [**Routing**](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/concepts/call-routing/README.md)
  * TB Media Gateway supports a variety of call routing functions, such as least-cost routing; percentage-based routing; as well as routing based on variables such as call origin, call destination, time of day, etc. TB Media Gateway also features the ability to write and edit rules via a high-level scripting language. New call routes can be applied without restarting the system.
* [**High Availability**](https://github.com/telcobridges-main/tmedia-wiki/tree/main/tmedia/operations/high-availability/README.md)
  * The system has been designed from the ground up to be always available. Every module of the system includes redundancy to allow survivability of the system in any situation.

### Components

TB Media Gateway is comprised of three main elements:

* The **first component**, [Toolpack Web Portal](https://github.com/telcobridges-main/tmedia-wiki/tree/main/tmedia/configuration/web-portal/README.md), is used to configure the inputs used to drive media gateway functionality. These include the number and types of network interfaces connected to the device(depending upon the model, ranging from 1 to 64 T1/E1/J1 interfaces, 1-3 [DS-3](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/protocols/ds3-interfaces/README.md) interfaces, 1 [STM-1](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/protocols/stm-1/README.md) interface, or Ethernet) ; the active [signaling protocols](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/sip-voip/signaling-protocols/README.md) (such as [SS7](https://telcobridges.com/media-gateways/solutions/signaling/migrating-ss7-sigtran/), [ISDN](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/protocols/isdn/README.md), [SIP](https://telcobridges.com/learning/sip-trunking/what-is-sip/), [SIGTRAN](https://telcobridges.com/media-gateways/solutions/signaling/migrating-ss7-sigtran/)), the active services ([MTP2](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/protocols/mtp2/README.md), [MTP3](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/protocols/mtp3/README.md), [ISUP](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/protocols/isup/README.md), [SCCP](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/protocols/sccp/README.md), [M2UA](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/protocols/sigtran-m2ua/README.md), [M3UA](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/protocols/m3ua/README.md) and others).
* The **second component** of TB Media Gateway is the run-time application which manages call routing, accounting and status information.
* The **third component**, [Toolpack Engine](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/misc/toolpack-engine/README.md), manages the conversion between signaling protocols and [voice codecs](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/voice-media/voice-codecs/README.md) required to connect calls between different end-user devices. The power and complexity of Toolpack Engine is hidden from view; it interacts directly with the run-time application.

### System configuration

TB Media Gateway is designed to run either on the internal host of the [Tmedia](https://telcobridges.com/media-gateways/products/tmedia-gateways/) family of products or via an external host allied with the [Tdev](https://telcobridges.com/products/development-platforms-tdev/) family of products.

### Advanced functionality

* TB Media Gateway is provided with full source code for the application component only. This allows you to enhance the functionality to take advantage of additional capabilities of the Tmedia or Tdev hardware, such as the optional VoIP and IVR mezzanine boards.
* Tmedia and Tdev devices support the deployment of additional applications and services alongside the core media gateway functionality. These include:
* [Ringback tones](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/voice-media/ringback-tones/README.md)
* [Conferencing](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/concepts/conferencing/README.md)
* [Voicemail](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/concepts/voicemail-service/README.md)
* [Unified communications](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/misc/unified-communications/README.md)
* [SMS messaging](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/protocols/sms/README.md)
* and many others


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://prosbcdocs.telcobridges.com/telecom-references/sip-and-voip/tb-media-gateway.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
