> 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/h248-mgcp/tb-media-gateway.md).

# TB Media Gateway

TB Media Gateway [Tmedia](https://prosbcdocs.telcobridges.com/tmedia-documentation/products/tmedia/tmedia) is a full-featured media gateway application that works with TelcoBridges' family of [media gateway](https://prosbcdocs.telcobridges.com/tmedia-documentation/products/tmedia/tmedia) and [value-added services](https://prosbcdocs.telcobridges.com/tmedia-documentation/products/tmedia/features-and-solutions/solutions/value-added-services) (VAS) development platforms to provide core media gateway functionality.

### Functions

TB Media Gateway supports the following core media gateway functionality:

* [**Switching**](/telecom-references/developer-reference/routing-scripts/call-routing.md)
  * TB Media Gateway provides switching support for both [TDM](/telecom-references/transmission-and-lines/tdm.md) and [VoIP](/telecom-references/sip-and-voip/ip-network.md)-based networks. It provides support for switching calls between [class 4](https://prosbcdocs.telcobridges.com/tmedia-documentation/products/tmedia/features-and-solutions/solutions/tandem-switching) and class 5 switches on TDM networks, switching calls between TDM and VoIP networks, as well as support for [hairpinning](/telecom-references/developer-reference/routing-scripts/call-routing.md) on VoIP networks
* [**Transcoding**](/telecom-references/voice-and-media/transcoding.md)
  * TB Media Gateway offers support for all major wireline, wireless and IP [voice codecs](/telecom-references/voice-and-media/voice-codecs.md).
* [**Trunking**](https://prosbcdocs.telcobridges.com/tmedia-documentation/products/tmedia/features-and-solutions/solutions/trunking)
  * TB Media Gateway can terminate multiple trunks from multiple different service providers.
* [**Signaling**](/telecom-references/ss7-and-signalling/ss7/signaling-protocols.md)
  * TB Media Gateway supports concurrent use of and switching between the [SS7](/telecom-references/ss7-and-signalling/ss7.md), [ISDN](/telecom-references/ss7-and-signalling/isdn.md), [SIP](/telecom-references/sip-and-voip/sip.md) and [SIGTRAN](/telecom-references/ss7-and-signalling/sigtran.md) signaling protocols.
* [**Accounting**](/telecom-references/cdr-and-statistics/cdr.md)
  * TB Media Gateway supports the [RADIUS](https://prosbcdocs.telcobridges.com/tmedia-documentation/other-pages/operations/radius) accounting standard for the creation and storage of [call detail records](/telecom-references/cdr-and-statistics/cdr.md), or can be stored locally [Text CDR](/telecom-references/cdr-and-statistics/text-call-detail-records.md). These can be imported into dedicated billing and reconciliation applications.
* [**Routing**](/telecom-references/developer-reference/routing-scripts/call-routing.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://prosbcdocs.telcobridges.com/tmedia-documentation/other-pages/operations/high-availability)
  * 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://prosbcdocs.telcobridges.com/tmedia-documentation/other-pages/other/web-portal), 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](/telecom-references/transmission-and-lines/ds3-interfaces.md) interfaces, 1 [STM-1](/telecom-references/transmission-and-lines/stm-1.md) interface, or Ethernet) ; the active [signaling protocols](/telecom-references/ss7-and-signalling/ss7/signaling-protocols.md) (such as [SS7](/telecom-references/ss7-and-signalling/ss7.md), [ISDN](/telecom-references/ss7-and-signalling/isdn.md), [SIP](/telecom-references/sip-and-voip/sip.md), [SIGTRAN](/telecom-references/ss7-and-signalling/sigtran.md)), the active services ([MTP2](/telecom-references/ss7-and-signalling/mtp2.md), [MTP3](/telecom-references/ss7-and-signalling/mtp3.md), [ISUP](/telecom-references/ss7-and-signalling/isup.md), [SCCP](/telecom-references/ss7-and-signalling/sccp.md), [M2UA](/telecom-references/ss7-and-signalling/sigtran/sigtran-m2ua.md), [M3UA](/telecom-references/ss7-and-signalling/sigtran/m3ua.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](/telecom-references/developer-reference/toolpack-api/toolpack-engine.md), manages the conversion between signaling protocols and [voice codecs](/telecom-references/voice-and-media/voice-codecs.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://prosbcdocs.telcobridges.com/tmedia-documentation/products/tmedia/tmedia) family of products or via an external host allied with the 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](/telecom-references/voice-and-media/ringback-tones.md)
* [Conferencing](https://prosbcdocs.telcobridges.com/tmedia-documentation/products/tmedia/features-and-solutions/solutions/conferencing)
* [Voicemail](https://prosbcdocs.telcobridges.com/tmedia-documentation/products/tmedia/features-and-solutions/solutions/voicemail-service)
* [Unified communications](https://prosbcdocs.telcobridges.com/tmedia-documentation/products/tmedia/features-and-solutions/solutions/unified-communications)
* [SMS messaging](/telecom-references/ss7-and-signalling/ss7/sms.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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
