The GTH is controlled via a TCP socket using an XML language. Here is an example of how to enable MTP-2 monitoring on a timeslot:
<new>
<mtp2_monitor ip_addr='128.250.22.3' ip_port='2453'>
<pcm_source span='2' timeslot='16'/>
</mtp2_monitor>
</new>
Using a text protocol over a TCP socket makes the API programming language neutral. The GTH can be controlled from any language capable of opening a socket. We have used Java, C, C++, PERL and Erlang to control the GTH.
The GTH works with any operating system which has sockets, including GNU/Linux, Solaris, *BSD, MacOSX, Windows NT-2K-XP-Vista and VxWorks.
API Specification (PDF)
DTD for commands
DTD for responses
This is a very simple example which shows how to set up audio loopback on one timeslot of a PCM, written in three different languages:
Java example code
PERL example code
Erlang example code
A Java package which includes an interface to the Xerces XML parser. Xerces is included in JDK 1.4, which is available from Sun. The sample code includes a tool to upgrade the software on the GTH.