This is an extension module for the Asterisk Gateway Interface (AGI) that adds commands to allow the transfer of audio files to and from Asterisk via the AGI session (in other words, it allows you to copy sound files to and from the Asterisk server, using AGI commands). This is useful when using FastAGI from a remote host; sounds recorded by Asterisk may be retrieved by remote FastAGI-providing service, for example, or sound files required by the remote service may be dynamically added to the Asterisk server.

This module adds the following AGI commands:

This is a derivative work based on older GPL code from the AGIAddOns module, which is copyright © 2005, Manuel Guesdon. This version provides compatibility with newer versions of Asterisk, and it injects the extra AGI commands into the default AGI handler (so that no dialplan changes are necessary in order to use them, and/or to allow more graceful degradation of service if the extension commands are not available). The audio file transfer protocol is also slightly modified; it sends (and expects) 76 base64-encoded characters per line when transferring data (vs. the original's 72 characters per line) - this makes it slightly easier to use this with legacy/"buggy" base64 encoders such as Python's default string encoder, which base64-encodes any given data as 76-characters lines (i.e. 76 characters followed by a newline character).


Installation is a 2-part process:

Some of these packages may already be present on your system. Please also refer to the README file included in the source archive.

1. Install Asterisk development files

This module was developed for Asterisk 1.4 or earlier.

Installing Asterisk development files with yum (Fedora) []
  1. In a terminal, enter:
    yum install asterisk-devel
    This will install the development files needed to build asterisk-agi-audiotx.

Installing Asterisk from source []

Please refer to the documentation that comes with Asterisk for this procedure. It is recommended, however, to use your distribution's version of Asterisk (if available).

2. Install asterisk-agi-audiotx

Installing asterisk-agi-audiotx RPM (Fedora) []
  1. Download the latest asterisk-agi-audiotx RPM
  2. In a terminal, go to the directory where the file was saved
  3. Install the asterisk-agi-audiotx module (your filename may be slightly different):
    rpm -Uhv asterisk-agi-audiotx-0.1-1.rpm

Installing asterisk-agi-audiotx from source []
  1. Download the latest version of asterisk-agi-audiotx
  2. In a terminal, go to the directory where the file was saved
  3. Extract asterisk-agi-audiotx (the filename may be different from the example below):
    tar -xzvf asterisk-agi-audiotx-0.1.tar.gz
  4. Build the asterisk-agi-audiotx module for your version of Asterisk:

    For Asterisk 1.4.x:

    For Asterisk 1.2 or Asterisk 1.0:
    or if using Asterisk 1.0:

  5. Install the asterisk-agi-audiotx module:
    su -c 'make install'


This module simply adds functionality to the existing AGI system. There is no need to use a different application call in your Asterisk dialplan - the standard AGI, EAGI or DeadAGI interface is used (so in extensions.conf, this would something like agi('your_script_here') ).

Type "show agi" at the Asterisk CLI prompt to see the full list of available AGI commands; 3 new commands are added by this module.

Type "show agi put soundfile", "show agi get soundfile", or "show agi isexisting soundfile" to get information on how to use the new AGI commands.


Other Asterisk applications/extension modules by the maintainer of this module: Logo