This is a book for anyone who uses Asterisk, but particularly those who already understand the dialplan syntax.
In this book, we look at common problems we’ve encountered as Asterisk administrators and implementers, then show solutions to those problems using the Asterisk dialplan. As you go through the recipes and start looking at the solutions, you may think, “Oh, that’s a neat idea, but they could have also done it this way.” That might happen a lot, because with Asterisk, the number of solutions available for a particular problem are astounding. We have chosen to focus on using the tools available to us within Asterisk, so solutions heavily focus on the use of dialplan, but that doesn’t mean an external application through the Asterisk Gateway Interface or Asterisk Manager Interface isn’t also possible.
Readers of this book should be familiar with many core concepts of Asterisk, which is why we recommend that you already be familiar with the content of Asterisk: The Definitive Guide, also published by O’Reilly. This book is designed to be a complement to it.
We hope you find some interesting solutions in this book that help you to be creative in future problem solving.
The book is organized into these chapters:
This chapter shows some examples of fundamental dialplan constructs that will be useful over and over again.
This chapter discusses a number of examples of controlling phone calls in Asterisk.
This chapter has examples of ways to get involved with the audio of a phone call.
This book is focused on documenting Asterisk Version 1.8; however, many of the conventions and information in this book are version-agnostic.
The following typographical conventions are used in this book:
Indicates new terms, URLs, email addresses, filenames, file extensions, pathnames, directories, and Unix utilities.
Constant
width
Indicates commands, options, parameters, and arguments that must be substituted into commands.
Constant width
bold
Shows commands or other text that should be typed literally by the user. Also used for emphasis in code.
Constant width italic
Shows text that should be replaced with user-supplied values.
[ Keywords
and other stuff ]
{ choice-1 | choice-2
}
This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “Asterisk Cookbook, First Edition, by Leif Madsen and Russell Bryant (O’Reilly). Copyright 2011 Leif Madsen and Russell Bryant, 978-1-449-30382-2.”
If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at [email protected].
Safari Books Online is an on-demand digital library that lets you easily search over 7,500 technology and creative reference books and videos to find the answers you need quickly.
With a subscription, you can read any page and watch any video from our library online. Read books on your cell phone and mobile devices. Access new titles before they are available for print, and get exclusive access to manuscripts in development and post feedback for the authors. Copy and paste code samples, organize your favorites, download chapters, bookmark key sections, create notes, print out pages, and benefit from tons of other time-saving features.
O’Reilly Media has uploaded this book to the Safari Books Online service. To have full digital access to this book and others on similar topics from O’Reilly and other publishers, sign up for free at http://my.safaribooksonline.com.
Please address comments and questions concerning this book to the publisher:
O’Reilly Media, Inc. |
1005 Gravenstein Highway North |
Sebastopol, CA 95472 |
800-998-9938 (in the United States or Canada) |
707-829-0515 (international or local) |
707-829-0104 (fax) |
We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at:
http://oreilly.com/catalog/9781449303822/ |
To comment or ask technical questions about this book, send email to:
[email protected] |
For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.
Find us on Facebook: http://facebook.com/oreilly
Follow us on Twitter: http://twitter.com/oreillymedia
Watch us on YouTube: http://www.youtube.com/oreillymedia
While writing this book, we used O’Reilly’s Open Feedback Publishing System (OFPS), which allowed Asterisk community members to read and comment on the content as we were writing it. The following people provided feedback to us via OFPS: Stefan Schmidt, Scott Howell, Christian Gutierrez, Jason “not a nub” Parker, and Paul Belanger. Thank you all for your valuable contributions to this book!