An introduction to PHP & AGI



Similar documents
Asterisk. Michael Kershaw

and Voice Applications Eyal Wirsansky, Verso Technologies JaxJUG

VoIP and FreeBSD. The daemon meets the phone. May 15th, 2008 University of Ottawa,, Ottawa, Canada Massimiliano Stucchi

ASTERISK & PHP. Hans-Christian Otto International PHP Conference 2010 SE Berlin, June 1, 2010

Asterisk Open Source PBX/iPBX Advanced Usage. Presented by: Nir Simionovich DimiTelecom Ltd

Open Source Telephony Projects as an Application Development Platform. Frederic Dickey Director Product Management

Asterisk & ENUM. Extending the Open Source PBX. Michael Haberler, IPA Otmar Lendl, nic.at

Ryan Brown October 9, 2004 The Burgh Live, LLC. Voice over IP using Asterisk (*)

Micronet VoIP Solution with Asterisk

Mediatrix 3000 with Asterisk June 22, 2011

IP PBX SH-500N

By Numan Khan

VOIP and Ruby. The Convergence of Web and Voice Applications using Open Source Software. Justin Grammens Localtone Interactive

So, you need to deploy a Private Branch exchange

IP Telephony with Asterisk. Sunday A. Folayan

Overview of Asterisk (*) Jeff Gunther

Integration of GSM Module with PC Mother Board (GSM Trunking) WHITE/Technical PAPER. Author: Srinivasa Rao Bommana

SPAM over Internet Telephony (SPIT) und Abwehrmöglichkeiten

FOR COMPANIES THAT WANT TO EXPAND AND IMPROVE THEIR TELEPHONE SYSTEM

NOC Workshop VoIP in the NOC labs SANOG10

Internet Telephony Terminology

Asterisk PBX Features

Open source VoIP Networks

Open Source VoiceXML Interpreter over Asterisk for Use in IVR Applications

Crash Course in Asterisk

Why choose an Asteriskbased. from Foehn? A communication solution that will answer your call. Based on the world s largest open source platform

Presents. And. Base documentation

Applications between Asotel VoIP and Asterisk

Introducing hosted telephony from Foehn

VoIP and IP IT Tralee

The following is a list of the features available with the managed Intersoft IP Telephony Services.

VOIP and Ruby. The Convergence of Web and Voice Applications using Open Source Software. Justin Grammens Localtone Interactive

VoxStack GSM Gateway API. Version: Author: Joe.Yung

VoIP Services User Guide

VoIP and IP Telephony

OpenVox GSM Gateway Function Manual

Asterisk: The Future of Your Phone Service

VOIP with Asterisk & Perl

H o s t e d PABX. r e v o l u t i o n i s i n g c o m m u n i c a t i o n s

IP- PBX. Functionality Options

Wildix Management System (WMS) White Paper

Asterisk Fast Start. The Asterisk Fast Start course is a three-day course. The class will consist of a combination of lectures and lab exercises.

Grandstream Networks, Inc. UCM6510 Basic Configuration Guide

Why Cluster? Exploring some of the decentralizing tools in Asterisk 1.4 and beyond

Advances in Japan Office Telephony

Building an Asterisk Based Call Center. presented by Matt Florell

The Competella Attendant and Agent clients are Windows-based. Management- and configuration tools are web-based.

VoIP Series - Build, Test, and Deploy VoIP Applications with Asterisk and other Open-Source Applications

CLOUD BASED VOIP BUSINESS PHONE SYSTEM

State of Oregon Open Source Application Use in the Enterprise

QUICK START GUIDE RELEASE 7

You da M.A.N. Voice, over IP, over stuff

MULTI FUNCTION IP PBX V3.6

Introduction to VOIP. Stephen Okay Abdus Salam Int l Center for Theoretical Physics Trieste, Italy, February 21, 2007

Request for Proposal for Telephone System Hosted VoIP System On Premise VoIP System Hybrid IP System #RFP PHONE SYSTEM 1

THE FOEHN TRANSPARENT PRICING GUARANTEE THE MOST FLEXIBLE CLOUD PHONE SYSTEM BY EXPERTS FROM START TO FINISH

Eliminating cost and complexity with hosted VoIP

Unified Communications

Asterisk: A Non-Technical Overview

BUILDING LARGE CAMPUS ASTERISK-BASED PABX SYSTEMS

Connections and wiring Diagram

ilanga: A Next Generation VoIP-based, TDMenabled

VoIP from A to Z. NAEO 2009 Conference Cancun, Mexico

RTMP Channel Server I6NET Solutions and Technologies

Using Asterisk with Odin s OTX Boards

VoIP Laboratory C VoIP Billling in a Village Telco

The Foehn Transparent Pricing Guarantee. The Most Flexible Cloud Phone System. By Experts from Start to Finish

Grandstream Networks, Inc.

Telecommunications Disaster Recovery and business continuity Services. copyright 2006 Corpotel, inc /

Merging Old and New Telephony with Asterisk

Survey on Approaches of Provision VoIP Service 報 告 人 : 唐 崇 實 2005/3/24

The Madison Metropolitan Sewerage District requests quotations for. IP Telephony System

Asterisk Voice Exchange: An Alternative to Conventional EPBX

Hosted PBX introduction

B rismark. Open Source IP PBX The Future of Telephony. T: W:

Calculate Your Savings

There are three main types of products based on VoIP technology that are available to you. They are:

Frontier VoIPCortex IP PBX open, scalable, accessible and feature-laden

3CX Phone System v14. Innovating Communications

Extension Manual. 3CX Assistant, MyPhone User portal, Dial codes & Voice mail for 3CX Phone System Version 8.0

Call Center, Quick Start

Avaya IP Office Unified Communications for Small Business

Introduction...3. The Integrations Section...4. Create a New Integration...5. Create a New Trigger...6. Custom fields Custom Variables...

Wave IP 2.0 SP1. Wave ViewPoint User Guide

Improving your commercial service thanks to Asterisk. Jacques Gripekoven Managing Director, Eyepea jg@eyepea.be

Where IP Gateways Fail

Introduction to Asterisk

NeoIVR. Flexible & high performance IVR platform

Telco Depot IP-PBX Software Features

Contents. Specialty Answering Service. All rights reserved.

Dramatically simplifying voice and data networking. IVR Editor HOW-TO Guide

IP PBX using SIP. Voice over Internet Protocol

TEL-500 Project Report. Auto-Dialler System. Voice Communications. Done By: - AKASH ANANTHANARAYANAN SANJEEVAKUMAR DEVARAJA

INTEGRATED COMMUNICATIONS

Small Business Telephone System

MAXIS ONE TECHNOLOGIES, L.L.C. MAXIS ONE TECHNOLOGIES, L.L.C. CLOUD-BASED VIRTUAL HOSTED PBX USER S MANUAL

How to use IP-0x to connect to Skype

Vulnerability Scan. January 6, 2015

intelligence at the edge of the network EdgeBOX V 4.5 VoIP How To

Case Study. Checkmarq VBX Solution for Dutch Property Agent. Overview

Transcription:

February 12 th - 13 th 2007 PHP Phone Home An introduction to PHP & AGI

This talk is not...... about REST... about Web Services... by Paul Reinheimer In fact, I am not Paul Reinheimer The REST talk is gone this is the replacement The Zend Certification talk will be today at 4PM in Room 150

About Me (the obligatory ego slide) Web Development for 9 years Full PHP for 7 years Documentation, Web, Other Infrastructure php architect Editor-in-Chief (2 years) php tek, php works conferences (organization) First Zend PHP 5 Certified in Canada Other stuff (-:

Phones Switch from community (party lines) to family Switch from family to personal (mobile) Universal Desk, Cell, Home -- lots of lines Many carry their own phone everywhere

Email is broken spam is overwhelming filters don't work there is no assured delivery people don't answer emails

Phone + Internet net2phone, Skype, Vonage, etc VOIP IVR (MTA = 1 877 630 6202) Soft Phone (x777) Multi-point ring: 514 907 0775

VOIP is cheap Time of day discount a thing of the past 2 /min in North America e.g. Spain = 2 /min DIDs for 2.50/month PBX = CHEAP

Interactive Voice Response IVR Proprietary Tellme: http://studio.tellme.com/ VoiceXML <vxml version="2.0"> <form id="hello"> <block>hello World!</block> </form> </vxml>

Asterisk Open source The Apache of Phones Price: free. Compared: thousands of dollars, with no components Voicemail, Conferencing, Queueing

Asterisk easy to install easy to configure trunk, extension config extension example: exten => ${EXT_SEAN}, 1, Ringing exten => ${EXT_SEAN}, 2, Dial(${CLIENT_SEAN}, ${RINGTIMEOUT}) exten => ${EXT_SEAN}, 3, VoiceMail(su${EXT_SEAN}@staff) exten => ${EXT_SEAN}, 4, Hangup

Asterisk as IVR AGI = Asterisk Gateway Interface CGI (http) Like CGI, but for phone calls AGI, EAGI (audio), FastAGI (remote), DeadAGI

AGI Asterisk Console Extension exten => 500, 1, agi, firsttest.php exten => 500, 2, hangup Simple Script: #!/usr/local/bin/php5 <?php echo "SAY NUMBER 42 ''\n"; sleep(5);?>

Why Sleep? #!/usr/local/bin/php5 <?php echo "SAY NUMBER 42 ''\n"; sleep(5);?> AGI is interactive Wait for return or Sound to stop playing

A Better Script Actually read headers and input But ignore them #!/usr/local/bin/php5 <?php // read headers while (fgets(stdin)!= \n ); echo SAY NUMBER 42 \n ; $result = fgets(stdin);?>

Headers Name: Value pairs like HTTP example: Array ( [agi_request] => firsttest.php [agi_channel] => IAX2/sean@sean/2 [agi_language] => en [agi_type] => IAX2 [agi_uniqueid] => 1164592919.38 [agi_callerid] => "Sean" <777> [agi_dnid] => 500 [agi_rdnis] => unknown [agi_context] => internal [agi_extension] => 500 [agi_priority] => 1 [agi_enhanced] => 0.0 [agi_accountcode] => )

Origination Asterisk Manager API Call files: Must be owned by asterisk user (utime) Must be moved into Asterisk's call files spool Sample: Channel: SIP/777@mta.phparch.com MaxRetries: 2 RetryTime: 60 WaitTime: 30 Context: staff Extension: 200 Priority: 1

PHP AGI Silly to try to do everything, yourself. PHP Handles CGI PHPAGI handles AGI Handles headers Most AGI commands Wrappers (text2wave == festival)

Simple PHP AGI Example #!/usr/bin/php -q <?php set_time_limit(30); require('phpagi.php'); $agi = new AGI(); $agi->answer(); $agi->text2wav("hello. Let's enter some text."); $text = $agi->text_input('numeric'); $agi->text2wav("you entered $text"); $agi->text2wav('goodbye'); $agi->hangup();?>

Related Links VOIP Wiki: http://voip-info.org/wiki/ VoiceXML Spec: http://www.w3.org/tr/voicexml20/ TellMe Studio: http://studio.tellme.com AGI Spec: http://home.cogeco.ca/~camstuff/agi.html PHPAGI: http://phpagi.sf.net/ Email me at: sean@php.net...or call me: sip:777@mta.phparch.com