PacktLib: Asterisk Gateway Interface 1.4 and 1.6 Programming

Asterisk Gateway Interface 1.4 and 1.6 Programming

Credits

About the author

Acknowledgement

About the reviewers

Preface

Installing a 'Vanilla' Asterisk

Downloading Asterisk

Zaptel—Zapata Telephony Driver

DAHDI—Digium Asterisk Hardware Device Interface

Libpri—ISDN PRI Library

Asterisk—the open source PBX

Asterisk-addons—the open source PBX

Asterisk—SVN source packages

Compiling the source code

Summary

Basic IVR Development: Using the Asterisk DialPlan

The dialplan is a set of "finite state machines"

The dialplan syntax

Summary

More IVR Development: Input, Recordings, and Call Control

Grabbing and processing user input

Summary

A Primer to AGI: Asterisk Gateway Interface

How does AGI work?

The ten rules of AGI development

A preface to what's coming ahead

Summary

AGI Scripting with PHP

PHP-CLI vs. PHP-CGI

The php.ini configuration file

AGI script permissions

The structure of a PHP based AGI script

Communication between Asterisk and AGI

The AGI Hello-World program

AGI debugging

Summary

PHPAGI: An AGI Class Library in PHP

Obtaining PHPAGI

The file structure of PHPAGI

A very simple PHPAGI example

The AGI/Dialplan high-wire act

A slightly more complex PHPAGI example

AGI Scripts in popular Asterisk applications

Summary

FastAGI: AGI as a TCP Server

FastAGI argument handling

FastAGI error handling

FastAGI with PHPAGI and xinetd

FastAGI with PHPAGI and Google

FastAGI with other tool kits

Summary

AMI: The Asterisk Manager Interface

AMI—the history

AMI—understanding basics

PHPAGI and the AMI Interface

Click-2-Call and Web-Callback

Summary

Final Programming Project

ACRG—Asterisk Call Recording Gateway

Project implementation guide

Additional programming projects

Summary

Scaling Asterisk Applications

Scaling Asterisk platforms

Summary