Docsity
Docsity

Prepare-se para as provas
Prepare-se para as provas

Estude fácil! Tem muito documento disponível na Docsity


Ganhe pontos para baixar
Ganhe pontos para baixar

Ganhe pontos ajudando outros esrudantes ou compre um plano Premium


Guias e Dicas
Guias e Dicas


Asterisk Asterisk, Notas de estudo de Informática

AsteriskAsterisk

Tipologia: Notas de estudo

2016

Compartilhado em 07/11/2016

jean-claudio-santos-4
jean-claudio-santos-4 🇧🇷

4 documentos

1 / 604

Toggle sidebar

Esta página não é visível na pré-visualização

Não perca as partes importantes!

bg1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Pré-visualização parcial do texto

Baixe Asterisk Asterisk e outras Notas de estudo em PDF para Informática, somente na Docsity!

Other resources from O’Reilly

Related titles Ethernet: The Definitive Guide Switching to VoIP T1: A Survival Guide

TCP/IP Network Administration VoIP Hacks™

oreilly.com oreilly.com is more than a complete catalog of O’Reilly books. You’ll also find links to news, events, articles, weblogs, sample chapters, and code examples.

oreillynet.com is the essential portal for developers interested in open and emerging technologies, including new platforms, pro- gramming languages, and operating systems.

Conferences O’Reilly brings diverse innovators together to nurture the ideas that sparkrevolutionary industries. We specialize in document- ing the latest tools and systems, translating the innovator’s knowledge into useful skills for those in the trenches. Please visit conferences.oreilly.com for our upcoming events.

Safari Bookshelf ( safari.oreilly.com ) is the premier online refer- ence library for programmers and IT professionals. Conduct searches across more than 1,000 books. Subscribers can zero in on answers to time-critical questions in a matter of seconds. Read the books on your Bookshelf from cover to cover or sim- ply flip to the page you need. Try it today for free.

SECOND EDITION

Asterisk

: The Future of Telephony

Jim Van Meggelen, Leif Madsen, and Jared Smith

Beijing Cambridge Farnham Köln Paris Sebastopol Taipei Tokyo

This book is dedicated to Rich Adamson

Thanks for showing us the meaning of

community.

Foreword

Once upon a time, there was a boy

...with a computer

...and a phone.

This simple beginning begat much trouble!

It wasn’t that long ago that telecommunications, both voice and data, as well as soft- ware, were all proprietary products and services, controlled by one select club of companies that created the technologies, and another select club of companies who used the products to provide services. By the late 1990s, data telecommunications had been opened by the expansion of the Internet. Prices plummeted. New and innovative technologies, services, and companies emerged. Meanwhile, the work of free software pioneers like Richard Stallman, Linus Torvalds, and countless others was culminating in the creation of a truly open software platform called Linux (or GNU/Linux). How- ever, voice communications, ubiquitous as they were, remained proprietary. Why? Perhaps it was because voice on the old public telephone network lacked the glamor and promise of the shiny new World Wide Web. Or, perhaps it was because a telephone just wasn’t as effective at supplying adult entertainment. Whatever the reason, one thing was clear. Open source voice communications was about as widespread as open source copy protection software.

Necessity (and in some cases simply being cheap) is truly the mother of invention. In 1999, having started Linux Support Services to offer free and commercial technical support for Linux, I found myself in need (or at least in perceived need) of a phone system to assist me in providing 24-hour technical support. The idea was that people would be able to call in, enter their customer identity, and leave a message. The system would in turn page a technician to respond to the customer’s request in short order. Since I had started the company with about $4,000 of capital, I was in no position to be able to afford a phone system of the sort that I needed to implement this scenario. Having already been a Linux user since 1994, and having already gotten my feet wet in open source software development by starting l2tpd, Gaim, and cheops, and in the complete absence of anyone having explained the complexity of such a task, I decided that I would simply make my own phone system using hardware borrowed from

xi

Adtran, where I had worked as a co-op student. Once I got a call into a PC, I fantasized, I could do anything with it. In fact, it is from this conjecture that the official Asterisk motto (which any sizable, effective project must have) is derived:

It’s only software!

For better or worse, I rarely think small. Right from the start, it was my intent that Asterisk would do everything related to telephony. The name “Asterisk” was chosen because it was both a key on a standard telephone and also the wildcard symbol in Linux (e.g., rm -rf *).

So, in 1999, I had a free telephony platform I’d put out on the Web and I went about my business trying to eke out a living at providing Linux technical support. However, by 2001, as the economy was tanking, it became apparent that Linux Support Services might do better by pursuing Asterisk than general-purpose Linux technical support. That year, we would make contact with Jim “Dude” Dixon of the Zapata Telephony project. Dude’s exciting work was a fantastic companion to Asterisk and provided a business model for us to start pursuing Asterisk with more focus. After creating our first PCI telephony interface card in conjunction with Dude, it became clear that “Linux Support Services” was not the best name for a telephony company, and so we changed the name to “Digium,” which is a whole other story that cannot be effectively conveyed in writing. Enter the expansion of Voice over IP (VoIP) with its disruptive transition of voice from the old, circuit-switched networks to new IP-based networks, and things really started to take hold.

Now, as we’ve already covered, clearly most people don’t get very excited about tele- phones. Certainly, few people could share my excitement the moment I heard a dial tone coming from a phone connected to my PC. However, those who do get excited about telephones get really excited about telephones. And facilitated by the Internet, this small group of people were now able to unite and apply our bizarre passions to a common, practical project for the betterment of many.

To say that telecom was ripe for an open source solution would be an immeasurable understatement. Telecom is an enormous market due to the ubiquity of telephones in work and personal life. The direct market for telecom products has a highly technical audience that is willing and able to contribute. People demand their telecom solutions be infinitely customizable. Proprietary telecom is very expensive. Creating Asterisk was simply the spark in this fuel-rich backdrop.

Asterisk sits at the apex of a variety of transitions (proprietary → open source; circuit switched → VoIP; voice only → voice, video, and data; digital signal processing → host media processing; centralized directory → peer to peer) while easing those transitions by providing bridges back to the older ways of doing things. Asterisk can talk to any- thing from a 1960s-era pulse-dial phone to the latest wireless VoIP devices, and provide features from simple tandem switching all the way to Bluetooth presence and DUNDi.

Most important of all, though, Asterisk demonstrates how a community of motivated people and companies can work together to create a project with a scope so significant

xii | Foreword

Preface

This is a book for anyone who is new to Asterisk™.

Asterisk is an open source, converged telephony platform, which is designed primarily to run on Linux. Asterisk combines more than 100 years of telephony knowledge into a robust suite of tightly integrated telecommunications applications. The power of As- terisk lies in its customizable nature, complemented by unmatched standards compli- ance. No other PBX can be deployed in so many creative ways.

Applications such as voicemail, hosted conferencing, call queuing and agents, music on hold, and call parking are all standard features built right into the software. More- over, Asterisk can integrate with other business technologies in ways that closed, proprietary PBXes can scarcely dream of.

Asterisk can appear quite daunting and complex to a new user, which is why docu- mentation is so important to its growth. Documentation lowers the barrier to entry and helps people contemplate the possibilities.

Produced with the generous support of O’Reilly Media, Asterisk: The Future of Telephony was inspired by the work started by the Asterisk Documen- tation Project. We have come a long way, and this book is the realization of a desire to deliver documentation that introduces the most fundamental elements of Asterisk— the things someone new to Asterisk needs to know. It is the first volume in what we are certain will become a huge library of knowledge relating to Asterisk.

This book was written for, and by, the Asterisk community.

Audience

This book is for those new to Asterisk, but we assume that you’re familiar with basic Linux administration, networking, and other IT disciplines. If not, we encourage you to explore the vast and wonderful library of books that O’Reilly publishes on these subjects. We also assume you’re fairly new to telecommunications, both traditional switched telephony and the new world of Voice over IP.

xv

Chapter 12, Relational Database Integration Walks you through setting up Asterisk to work with ODBC databases.

Chapter 13, Managing Your Asterisk System Discusses issues regarding how to best manage your Asterisk phone system, in- cluding CDR, logs, and prompts.

Chapter 14, Potpourri Briefly covers what is, in fact, a rich and varied cornucopia of incredible features and functions—all part of the Asterisk phenomenon.

Chapter 15, Asterisk: The Future of Telephony Predicts a future where open source telephony completely transforms an industry desperately in need of a revolution.

Appendix A, VoIP Channels

Appendix B, Application Reference

Appendix C, AGI Reference

Appendix D, Configuration Files

Appendix E, Asterisk Dialplan Functions

Appendix F, Asterisk Manager Interface Actions

Appendix G, An Example of func_odbc

Software

This book is focused on documenting Asterisk Version 1.4; however, many of the con- ventions and information in this book are version-agnostic. Linux is the operating system we have run and tested Asterisk on, with a leaning toward Red Hat syntax. We decided that while Red Hat–based distributions may not be the preferred choice of everyone, their layout and utilities are nevertheless familiar to many experienced Linux administrators.

Conventions Used in This Book

The following typographical conventions are used in this book:

Italic 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.

Preface | xvii

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 ] Indicates optional keywords and arguments.

{ choice-1 | choice-2 } Signifies either choice-1 or choice-.

This icon signifies a tip, suggestion, or general note.

This icon indicates a warning or caution.

Using Code Examples

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: The Future of Telephony , Second Edition, by Jim Van Meggelen, Leif Madsen, and Jared Smith. Copyright 2007 O’Reilly Media, Inc., 978-0-596-51048-0.”

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

When you see a Safari® Books Online icon on the cover of your favorite technology book, that means the book is available online through the O’Reilly Network Safari Bookshelf.

xviii | Preface