Asterisk Hacking

Chapter 4: Writing Applications with Asterisk

Introduction

Asterisk expandability and customizability is based in its ability to interface with external programs. Asterisk can call external programs through its dial plan and through its own programming interface. Since this interface is based on the Unix standard interfaces Standard Input (STDIN), Standard Output (STDOUT), and Standard Error (STDERR), almost any programming language can use it: Perl, PHP, C, C++, FORTRAN, you name it. Since most of these languages are capable of doing almost anything asked of them, Asterisk can easily piggyback off their capabilities and do anything they can.

Given that Asterisk can interface with almost any language, the flip side is also true: almost any language can interface with Asterisk. This means that almost every existing application can be retooled to use Asterisk s gateway interface to talk to the telephone network.

Be forewarned, this chapter isn t a tutorial on programming. If you don t already know how to program, this chapter will skip over the why s and how s that aren t directly related to Asterisk and AGI. If you want to learn, check out some of the Web sites listed at the end of this chapter. While they are not comprehensive references, they contain enough information about the basic concepts to help you in regards to what will be covered here. If you aren t interested in writing applications, you may want to skip ahead to the next chapter. Go ahead, no one will know.

Calling Programs from within the Dial Plan

The simplest way to call programs from within...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Industrial Keypads
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.