All Projects → marcelog → Pagi

marcelog / Pagi

Licence: apache-2.0
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

Projects that are alternatives of or similar to Pagi

Starpy
Mirror of Python twisted library for AMI and FastAGI: No pull requests here please. Use Gerrit: https://gerrit.asterisk.org
Stars: ✭ 77 (-52.17%)
Mutual labels:  agi, asterisk
Astive
Media controller for Asterisk PBX (FastAGI Server)
Stars: ✭ 37 (-77.02%)
Mutual labels:  agi, asterisk
Voicer
AGI-server voice recognizer for #Asterisk
Stars: ✭ 73 (-54.66%)
Mutual labels:  agi, asterisk
caller-lookup
Reverse Caller Id using TrueCaller
Stars: ✭ 55 (-65.84%)
Mutual labels:  agi, asterisk
Pathnet
Tensorflow Implementation of PathNet: Evolution Channels Gradient Descent in Super Neural Networks
Stars: ✭ 96 (-40.37%)
Mutual labels:  agi
Python Ami
Python AMI Client
Stars: ✭ 70 (-56.52%)
Mutual labels:  asterisk
Pathnet Pytorch
PyTorch implementation of PathNet: Evolution Channels Gradient Descent in Super Neural Networks
Stars: ✭ 63 (-60.87%)
Mutual labels:  agi
Awesome Deep Rl
For deep RL and the future of AI.
Stars: ✭ 985 (+511.8%)
Mutual labels:  agi
Asternet
AsterNET is an open source .NET framework for Asterisk AMI and FastAGI. AsterNET allows you to talk to Asterisk AMI from any .NET application and create FastAGI applications in any .NET language.
Stars: ✭ 138 (-14.29%)
Mutual labels:  asterisk
Chan Sccp
Replacement for the SCCP channel driver in Asterisk. Extended features include Shared Lines, Presence / BLF, customizable Feature Buttons, and Custom Device State. Visit our discussion mailing list for help and join us as a developer if you like.
Stars: ✭ 127 (-21.12%)
Mutual labels:  asterisk
Nami
Asterisk manager interface (ami) client for nodejs
Stars: ✭ 94 (-41.61%)
Mutual labels:  asterisk
Homer App
HOMER 7.x Front-End and API Server
Stars: ✭ 88 (-45.34%)
Mutual labels:  asterisk
Helix theory
螺旋论(theory of helix)—— “熵减机理论(可用来构建AGI、复杂性系统等)”
Stars: ✭ 98 (-39.13%)
Mutual labels:  agi
Ari4java
Asterisk ARI interface bindings for Java
Stars: ✭ 65 (-59.63%)
Mutual labels:  asterisk
Visual Interaction Networks tensorflow
Tensorflow Implementation of Visual Interaction Networks
Stars: ✭ 133 (-17.39%)
Mutual labels:  agi
Sippts
Set of tools to audit SIP based VoIP Systems
Stars: ✭ 116 (-27.95%)
Mutual labels:  asterisk
Phpari
A Class Library enabling Asterisk ARI functionality for PHP
Stars: ✭ 80 (-50.31%)
Mutual labels:  asterisk
Browser Phone
A fully featured browser based WebRTC SIP phone for Asterisk
Stars: ✭ 95 (-40.99%)
Mutual labels:  asterisk
Tg2sip
Telegram <-> SIP voice gateway
Stars: ✭ 142 (-11.8%)
Mutual labels:  asterisk
Leisuresuitlarry
Leisure Suit Larry Script and Definition Files, by Al Lowe for Sierra (1987)
Stars: ✭ 134 (-16.77%)
Mutual labels:  agi

License Latest Stable Version Documentation Status

Build Status Coverage Status Code Climate Issue Count

![Click here to lend your support to: PAGI and make a donation at pledgie.com !](https://pledgie.com/campaigns/30945.png?skin_name=chrome' border='0')

Introduction

This framework is intended to simply making ivr applications using Asterisk's AGI, providing a nice level of abstraction over what an IVR should look like from a developers' perspective.

Documentation

Installing

Add this library to your Composer configuration. In composer.json:

  "require": {
    "marcelog/pagi": "2.*"
  }

Using it

First, make sure you include the autoloader shipped with composer:

require __DIR__ . '/vendor/autoload.php';

Quickstart

You can start by doc/examples/quickstart for a very basic example. You'll need something like this in your dialplan:

[default]
exten => 1,1,AGI(/path/to/PAGI/doc/examples/quickstart/run.sh,a,b,c,d)
exten => 1,n,Hangup

Testing IVR applications

A mocked pagi client is included to easily test your ivr applications. See doc/examples/mock to see an example of how to use it.

Features

Nodes

For a tutorial about nodes, see this article

Simple Call Flow Nodes are available (see doc/examples/node/example.php). Using nodes will let you simplify how you build and test your ivr applications. Nodes are an abstraction layer above the pagi client, and support:

  • Prompts mixing sound files, playing numbers/digits/datetime's.
  • Cancel and End Of Input digits.
  • Validator callbacks for inputs, can optionally specify 1 or more sound files to play when the validation fails.
  • Callbacks for invalid and valid inputs.
  • Optional sound when no input.
  • Maximum valid input attempts.
  • Optional sound when maximum attempts has been reached.
  • Expecting at least/at most/exactly N digits per input.
  • Timeout between digits in more-than-1 digit inputs.
  • Timeout per input attempt.
  • Retry Attempts for valid inputs.
  • And much more!

The NodeController will let you control the call flow of your application, by registering nodes and actions based on node results. Thus, you can jump from one node to the other on cancel or complete inputs, hangup the call, execute a callback, etc. For an example, see doc/examples/nodecontroller/example.php

An article about the node controller is available here

AutoDial

CallFiles are supported. You can also schedule a call in the future.

Fax

Sending and receiving faxes is supported using spandsp (applications SendFax and ReceiveFax).

Available Facades

  • PAGI\Client\CDR: Provided to access cdr variables.
  • PAGI\Client\ChannelVariables: Provided to access channel variables and asterisk environment variables.
  • PAGI\Client\CallerID: Provided to access caller id variables.
  • PAGI\Client\Result: Provided to wrap up the result for agi commands.
  • PAGI\CallSpool\CallFile: Call file facade.
  • PAGI\CallSpool\CallSpool: Call spool facade.
  • PAGI\Logger\Asterisk: Provides access to asterisk logger (see logger.conf in your asterisk installation).

Results

For every operation, a Result is provided. Some operations decorate this Result to add functionality, like PlayResult, ReadResult, etc. For example, a stream file will return a PlayResult, which decorates a ReadResult which in turn, decorated a Result.

  • PAGI\Client\DialResult
  • PAGI\Client\ExecResult
  • PAGI\Client\ReadResult
  • PAGI\Client\PlayResult
  • PAGI\Client\FaxResult

Debugging, logging

You can optionally set a PSR-3 compatible logger:

$pagi->setLogger($logger);

By default, the client will use the NullLogger.

Developers

This project uses phing. Current tasks include:

Running a phing task

To run a task, just do:

vendor/bin/phing build

Contributing

To contribute:

  • Make sure you open a concise and short pull request.
  • Throw in any needed unit tests to accomodate the new code or the changes involved.
  • Run phing and make sure everything is ok before submitting the pull request (make phpmd and CodeSniffer happy, also make sure that phpDocumentor does not throw any warnings, since all our documentation is automatically generated).
  • Your code must comply with PSR-2, CodeSniffer should take care of that.

LICENSE

Copyright 2011 Marcelo Gornstein [email protected]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].