Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
PHP AGI ( Asterisk Gateway Interface ) facade, with CDR ( Call Detail Record ), Call spool and schedule auto dial, Send and Receive Fax, Channel Variables, and Caller ID management
PHP XSLT

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
docs/examples/quickstart
resources
src/mg/PAGI
README
build.properties
build.xml

README

Introduction
============
This software is still in development, stay tuned.

This framework is intended to simply making agi applications. You will 
extend PAGIApplication like:

class MyPAGIApplication extends PAGIApplication
{
    public function init()
    {
        $this->log('Init');
        $client = $this->getAgi();
        $client->answer();
    }

    public function shutdown()
    {
        $this->log('Shutdown');
        $client = $this->getAgi();
        $client->hangup();
    }

    public function run()
    {
        $this->log('Run');
    }

    public function errorHandler($type, $message, $file, $line)
    {
    }

    public function signalHandler($signal)
    {
    }
}

and that's your application ;) Please see the api for more details. 
you signal handler, error handler, init, and shutdown methods are automatically
setup and called.

Please see docs/examples/quickstart for a very basic example. You'll need
something like this in your dialplan:

[default]
switch => Realtime
exten => 1,1,AGI(/tmp/PAGI/docs/examples/quickstart/run.sh,a,b,c,d)
exten => 1,n,Hangup
--------------------------------------------------------------------------------
Available Facades
=================
PAGI\Client\CDR: Provided to access cdr variables.
PAGI\Client\ChannelVariables: Provided to access channel variables.
PAGI\Client\CallerID: Provided to access caller id variables.
--------------------------------------------------------------------------------
Debugging, logging
==================

You need log4php (http://logging.apache.org/log4php/) if you want debugging
output from the container. Just make sure you copy it to the include_path and
Ding will pick it up from there.

This means that this is NOT A REQUIREMENT FOR A DEPLOY. It's not even a
requirement at develop time (except when you really want debug output).
You can use the included example of a log4php.properties file in
docs/examples/quickstart.

Of course it is recommended that you do not set DEBUG output in your log4php
configuration (or remove it from the include path so PAGI will notice and not
use it). This *will* create a difference in performance.
--------------------------------------------------------------------------------
Developers
==========
* build.xml is a phing build file, not ant.
* It's very possible that you may need to edit build.properties.
* Available main targets: all, build, test, report.
* Tools run: phpdoc, phploc, phpcs, phpmd, phpcpd, phpdepend, phpunit.
--------------------------------------------------------------------------------
Something went wrong with that request. Please try again.