Asterisk Gateway Interface 1.4 and 1.6 Programming

Design and develop Asterisk-based VoIP telephony platforms and services using PHP and PHPAGI

Asterisk Gateway Interface 1.4 and 1.6 Programming

Progressing
Nir Simionovich

Design and develop Asterisk-based VoIP telephony platforms and services using PHP and PHPAGI
$23.99
$39.99
RRP $23.99
RRP $39.99
eBook
Print + eBook

Get unlimited access to this and 3,500 other courses today!

With unlimited access to a constantly growing library of over 3,500 courses, a subscription to Mapt gives you everything you need to get that next promotion or to land that dream job. Cancel anytime.

+ Collection
Free Sample

Book Details

ISBN 139781847194466
Paperback220 pages

Book Description

Asterisk is the world's leading open-source PBX, telephony engine, and telephony applications toolkit with immense flexibility.

This book will give you a firm understanding of Asterisk Gateway Interface (AGI) development and proper AGI development practices. You will learn how to formulate Atomic AGI-enabled scripts, enabling rapid development within a well-defined Asterisk execution and runtime environment.

This book builds from the simplest form of an Asterisk application, the dialplan-based application, gradually building a full understanding of AGI scripting. The book also introduces a new concept of AGI development named "Atomic AGI" or "Particle Programming". It will introduce you to various techniques of interacting with the user, where user interaction isn't limited to keypad-based input, but also includes recording messages from the user, sending output to the user, and controlling the call flow.

The book takes a pragmatic approach with clear and complete examples, and a service development project — allowing you to understand the project cycle of developing an Asterisk-based service or application.

Table of Contents

Chapter 1: 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
Chapter 2: Basic IVR Development: Using the Asterisk DialPlan
The dialplan is a set of "finite state machines"
The dialplan syntax
Summary
Chapter 3: More IVR Development: Input, Recordings, and Call Control
Grabbing and processing user input
Summary
Chapter 4: 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
Chapter 5: 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
Chapter 6: 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
Chapter 7: 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
Chapter 8: AMI: The Asterisk Manager Interface
AMI—the history
AMI—understanding basics
PHPAGI and the AMI Interface
Click-2-Call and Web-Callback
Summary
Chapter 9: Final Programming Project
ACRG—Asterisk Call Recording Gateway
Project implementation guide
Additional programming projects
Summary
Chapter 10: Scaling Asterisk Applications
Scaling Asterisk platforms
Summary

What You Will Learn

  • Create AGI applications with Asterisk easily using PHPAGI, a PHP class library
  • Avoid going through the normal pitfalls of novice developers when developing Asterisk-based applications and services for the first time
  • Develop AGI scripts and FastAGI servers using Asterisk-PERL modules
  • Configure your AMI login information in the phpagi.conf file in order to utilize the AMI interface with PHPAGI
  • Understand the Asterisk Manager Interface and its utilization in Asterisk applications
  • Develop full web-based call-back platforms and highly interactive IVR applications using PHP and PHPAGI
  • Learn proper development paradigms to easily scale your services and applications
  • Get ideas for various Asterisk-based services and applications that you can create

Authors

Table of Contents

Chapter 1: 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
Chapter 2: Basic IVR Development: Using the Asterisk DialPlan
The dialplan is a set of "finite state machines"
The dialplan syntax
Summary
Chapter 3: More IVR Development: Input, Recordings, and Call Control
Grabbing and processing user input
Summary
Chapter 4: 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
Chapter 5: 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
Chapter 6: 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
Chapter 7: 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
Chapter 8: AMI: The Asterisk Manager Interface
AMI—the history
AMI—understanding basics
PHPAGI and the AMI Interface
Click-2-Call and Web-Callback
Summary
Chapter 9: Final Programming Project
ACRG—Asterisk Call Recording Gateway
Project implementation guide
Additional programming projects
Summary
Chapter 10: Scaling Asterisk Applications
Scaling Asterisk platforms
Summary

Book Details

ISBN 139781847194466
Paperback220 pages
Read More

Read More Reviews