Find file History
Latest commit c4172d6 Aug 22, 2014 @matthiasl Perl and Python: Remove defunct examples
The C version of 'save_to_pcap.c' has become so good that
there is no point having Perl and Python versions.
Failed to load latest commit information.


Title: README file for Perl example code

This is example code in Perl for a Corelatus GTH. The examples were
tested on Perl 5.10.0 on linux.

Keep in mind that I'm a Perl dabbler, i.e. if it looks weird, then
that's most likely because I didn't know better. Suggestions for
improvement are welcome to

There are six examples:

Recorded file playback

  Plays back a previously recorded timeslot on an E1. The GTH
  can record bit-exact copies of timeslots and then play back
  such files at a later time. Typical use:

    >./ 1A 16 signalling.raw
    All done, sent 2276 octets

  The file could contain audio (8kHz Alaw, without a header) or
  it could contain signalling. The GTH treats both the same. Most
  likely it's a dump of an E1 you recorded earlier using the next

E1 timeslot dump to a file

  This is the opposite of the first example, it copies the
  data on the given E1 to a file on your PC. Typical use:

    >./ 1A 16 4000 signalling.raw
    All done, wrote 4000 octets

Query and Set Attributes on GTH Resources

  The GTH has a bunch of parameters you can query and set, for
  instance to query the 'board' attributes:

     >./ board
        $VAR1 = {
          'voice coding' => 'alaw',
          'LED mode' => 'normal',
          'power source' => 'A',
          'architecture' => 'gth2.1',
          'connected ROM ID 1' => 'none',
          'PCM LED assignment' => 'universal',
          'connected ROM ID 2' => 'none',
          'power consumption' => '7.2',
          'ROM ID' => '0x26d02d81000000e7',
          'temperature' => '35.0'

  and here's how to enable an E1:

     >./ pcm1A status enabled mode E1

  (This replaces the script)

Sniff ISUP

  Print out when calls start and stop on an SS7 link.

  Uses the GTH to decode MTP-1 and MTP-2. MTP-3 and ISUP decoding
  is done in Perl. Typical use:

     >./ gth21 1A 16
     IAM called party: 21255512 calling party: 11313555 CIC=0
     ignoring ISUP address complete
     ignoring ISUP answer
     ignoring ISUP release
     RLC on CIC=0

Enable L1

   Enable Layer 1 on SDH/SONET and E1/T1 hardware. Typical use:

     >./ sdh1

Map and unmap E1/T1 links carried on SDH/SONET

   This example is only useful on SDH/SONET hardware. It's used
   to get access to E1/T1 links carried on SDH/SONET.

     >./ sdh1:hop1_1:lop1_1_1

   the 'pcm1' is the dynamically assigned name of the E1/T1 link.
   Once you've got a name assigned, you can use it, e.g.:

     >./ pcm1

   When you're finished, you can clean up:

     >./ pcm1

The examples are built on top of a little library,,
which lets you hack up Perl code to do pretty much anything
supported by the GTH, i.e. you don't have to write your own parser.

# eof