> 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/apis-and-integration/toolpack-api.md).

# Toolpack API

The ToolPack API modules are intended to provide the solution developer with a simpler, protocol-agnostic approach to developing telephony applications while providing complete control, including access to system-level functionality.

The graphic below demonstrates Toolpack and a customer developed application running on an external application server such as one would use with the Tdev [TMP6400](https://telcobridges.com/products/development-platforms-tdev/tmp6400-tdev-voip-gateway-development-platform/) or the Tdev [TMP800](https://telcobridges.com/products/).

![Toolpack Architecture Overview](https://docs.telcobridges.com/w/images/2/2e/Toolpack_Architecture_Overview.jpg)

Typically, an application only needs to interact with the system through the use of C++ classes indicated above via dashed borders.

### Toolpack API components

Toolpack API is comprised of the following elements:

* [Customer Application Framework (CAF)](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/api/customer-application-framework/README.md)
* [CMC Library](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/api/cmc-library/README.md)
* [Toolpack Engine](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/misc/toolpack-engine/README.md)
* [Toolpack System Manager](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/signalling/toolpack-sys-manager/README.md)
* [TCAP Control Library](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/protocols/tcap-control-library/README.md)

### Typical Toolpack call handling application components

A Toolpack call handling application is the application, in the Toolpack system, that controls call flows, by connecting and using *toolpack\_engine*. In order to control call flows, the CAF Call API is used. This API hides the communication mechanism with *toolpack\_engine*, so the application code only has to deal with implementing actual call flows.

The Toolpack call handling application can also use other APIs to integrate with Toolpack OAM (be automatically launched/relaunched/shutdown, receive configuration reload notifications, respond to heart beat, etc.).

TelcoBridges' own call handling application (the *gateway* application) uses all of these APIs. Sample application *simple\_call* also provides simplified examples for using these APIs.

Below is the list of APIs that the application can use.

#### Mandatory library

* CAF library: This library contains all the required APIs to handle calls, or integrate with Toolpack OAM.

#### Mandatory APIs

In order to control calls, an application must at least initialize the following modules:

* [CTBCMCLib](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/api/cmc-library/README.md): This module connects to *toolpack\_engine*, and allows using the CAF API to control call legs and call flows
* [CTBCAFComm](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/api/ctbcafcomm/README.md): This library is mandatory for enabling communication with other applications, such as *toolpack\_engine*, or the Toolpack OAM system

#### Toolpack OAM APIs

In order to integrate with Toolpack OAM, or to get access to the configuration database, an application then needs to initialize the following modules:

* [CTBCAFServiceAlmMgmt](https://github.com/telcobridges-main/tmedia-wiki/tree/main/tmedia/operations/ctbcafservicealmmgmt/README.md): This module (Application Launch Management) allows an application to be launched (and monitored for failure through heartbeat) by Toolpack OAM system
* [CTBCAFServiceCmMgmtClient](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/api/ctbcafservicecmmgmtclient/README.md): This module (Configuration Management) allows an application to be informed of the current active configuration, and active database connection string

#### Other optional APIs

The CAF library also implements the following modules, which are convenient for an application to use:

* [CTBCAFLog](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/api/ctbcaflog/README.md): This module automatically writes calls to "LogTrace" function (which the CAF library itself uses to log useful information) to log files. It also manages log files rotation and zipping.
* [CTBCAFCli](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/misc/ctbcafcli/README.md): This module provides a command-line interface that's more convenient that a single shell prompt, by allowing the application to display multiple pages of information, view the application log, and enter commands. It also allows the application to be "remotely controlled" using the *tbx\_cli\_tools\_remote* application.

### Accessing Toolpack configuration database

The Toolpack configuration database is normally configured using the Web Portal. However, some applications may need to query information from that database. When that's the case, TelcoBridges provides a MySql database access class ([CTBCAFDb](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/api/ctbcafdb/README.md)), along with many DAOs (data access objects) that provide C++ classes that represent all the database tables used by Toolpack. For more information on how to access Toolpack configuration database, please refer to the following page: [Accessing Toolpack DB](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/api/accessing-toolpack-db/README.md)

### Toolpack API documentation

Description and documentation of all APIs are available on demand in the **tb-doc.zip** file. Once unzipped, please check folder **tb\doc\toolpack\html\index.html**


---

# 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/apis-and-integration/toolpack-api.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.
