Asterisk Gateway Interface 1.4 and 1.6 Programming

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

Asterisk Gateway Interface 1.4 and 1.6 Programming

Nir Simionovich

Design and develop Asterisk-based VoIP telephony platforms and services using PHP and PHPAGI
Mapt Subscription
FREE
$29.99/m after trial
eBook
$16.80
RRP $23.99
Save 29%
Print + eBook
$39.99
RRP $39.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$16.80
$39.99
$29.99p/m after trial
RRP $23.99
RRP $39.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Asterisk Gateway Interface 1.4 and 1.6 Programming Book Cover
Asterisk Gateway Interface 1.4 and 1.6 Programming
$ 23.99
$ 16.80
jQuery UI 1.6: The User Interface Library for jQuery Book Cover
jQuery UI 1.6: The User Interface Library for jQuery
$ 26.99
$ 18.90
Buy 2 for $34.30
Save $16.68
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

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

Recommended for You

Microsoft BizTalk 2010: Line of Business Systems Integration Book Cover
Microsoft BizTalk 2010: Line of Business Systems Integration
$ 35.99
$ 25.20
Responsive Web Design with HTML5 and CSS3 Book Cover
Responsive Web Design with HTML5 and CSS3
$ 23.99
$ 4.80
Applied Architecture Patterns on the Microsoft Platform Book Cover
Applied Architecture Patterns on the Microsoft Platform
$ 35.99
$ 25.20
BizTalk Server 2010 Cookbook Book Cover
BizTalk Server 2010 Cookbook
$ 35.99
$ 25.20
Pentaho 3.2 Data Integration: Beginner's Guide Book Cover
Pentaho 3.2 Data Integration: Beginner's Guide
$ 29.99
$ 21.00
Nginx HTTP Server - Second Edition Book Cover
Nginx HTTP Server - Second Edition
$ 26.99
$ 2.70