{"id":13405016,"url":"https://github.com/marcelog/PAGI","last_synced_at":"2025-03-14T09:32:07.322Z","repository":{"id":1294367,"uuid":"1235988","full_name":"marcelog/PAGI","owner":"marcelog","description":"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","archived":false,"fork":false,"pushed_at":"2019-06-26T09:13:46.000Z","size":3919,"stargazers_count":191,"open_issues_count":20,"forks_count":76,"subscribers_count":31,"default_branch":"master","last_synced_at":"2024-10-29T22:13:19.556Z","etag":null,"topics":["agi","asterisk","ivr","ivr-application","php"],"latest_commit_sha":null,"homepage":"http://marcelog.github.com/PAGI","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcelog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-01-09T20:45:46.000Z","updated_at":"2024-08-11T18:21:25.000Z","dependencies_parsed_at":"2022-07-18T16:29:01.925Z","dependency_job_id":null,"html_url":"https://github.com/marcelog/PAGI","commit_stats":null,"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2FPAGI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2FPAGI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2FPAGI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2FPAGI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcelog","download_url":"https://codeload.github.com/marcelog/PAGI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243554138,"owners_count":20309871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agi","asterisk","ivr","ivr-application","php"],"created_at":"2024-07-30T19:01:54.582Z","updated_at":"2025-03-14T09:32:07.282Z","avatar_url":"https://github.com/marcelog.png","language":"PHP","readme":"[![License](https://poser.pugx.org/marcelog/PAGI/license)](https://packagist.org/packages/marcelog/PAGI)\n[![Latest Stable Version](https://poser.pugx.org/marcelog/PAGI/v/stable)](https://packagist.org/packages/marcelog/PAGI)\n[![Documentation Status](https://readthedocs.org/projects/pagi/badge/?version=latest)](http://pagi.readthedocs.org/en/latest/?badge=latest)\n\n[![Build Status](https://travis-ci.org/marcelog/PAGI.svg)](https://travis-ci.org/marcelog/PAGI)\n[![Coverage Status](https://coveralls.io/repos/marcelog/PAGI/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/marcelog/PAGI?branch=master)\n[![Code Climate](https://codeclimate.com/github/marcelog/PAGI/badges/gpa.svg)](https://codeclimate.com/github/marcelog/PAGI)\n[![Issue Count](https://codeclimate.com/github/marcelog/PAGI/badges/issue_count.svg)](https://codeclimate.com/github/marcelog/PAGI)\n\n[![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')](https://pledgie.com/campaigns/30945)\n\n# Introduction\n\nThis framework is intended to simply making ivr applications using Asterisk's\nAGI, providing a nice level of abstraction over what an IVR should look like\nfrom a developers' perspective.\n\n# Documentation\n\n * [Main Site](http://marcelog.github.com/PAGI)\n * [API](http://pagi.readthedocs.org/en/latest/ApiIndex/)\n * [Complete PAGI/PAMI talk for the PHP Conference Argentina 2013](http://www.slideshare.net/mgornstein/phpconf-2013). Check the slide notes for the complete text :)\n * [In-depth tutorial](http://marcelog.github.com/articles/pagi_tutorial_create_voip_telephony_application_for_asterisk_with_agi_and_php.html)\n * [An example IVR application that includes unit tests is available here](https://github.com/marcelog/Pagi-App-And-Test-Example)\n * [Professional Telephony Applications at hand](http://sdjournal.org/a-practical-introduction-to-functional-programming-with-php-sdj-issue-released/) The march edition of [Software Developer Journal](http://sdjournal.org/) features a complete article about writing telephony applications with PAMI and PAGI.\n\n# Installing\nAdd this library to your [Composer](https://packagist.org/) configuration. In\ncomposer.json:\n```json\n  \"require\": {\n    \"marcelog/pagi\": \"2.*\"\n  }\n```\n\n# Using it\n\nFirst, make sure you include the [autoloader shipped with composer](https://getcomposer.org/doc/01-basic-usage.md#autoloading):\n\n```php\nrequire __DIR__ . '/vendor/autoload.php';\n```\n\n# Quickstart\n\nYou can start by *doc/examples/quickstart* for a very basic example. You'll need something like this in your dialplan:\n\n    [default]\n    exten =\u003e 1,1,AGI(/path/to/PAGI/doc/examples/quickstart/run.sh,a,b,c,d)\n    exten =\u003e 1,n,Hangup\n\n# Testing IVR applications\n\nA mocked pagi client is included to easily test your ivr applications. See\n**doc/examples/mock** to see an example of how to use it.\n\n# Features\n\n## Nodes\n\nFor a tutorial about nodes, see [this article](http://marcelog.github.com/articles/pagi_node_call_flow_easy_telephony_application_for_asterisk_php.html)\n\nSimple Call Flow Nodes are available (see **doc/examples/node/example.php**). Using\nnodes will let you simplify how you build and test your ivr applications. Nodes\nare an abstraction layer above the pagi client, and support:\n\n * Prompts mixing sound files, playing numbers/digits/datetime's.\n * Cancel and End Of Input digits.\n * Validator callbacks for inputs, can optionally specify 1 or more sound files\n to play when the validation fails.\n * Callbacks for invalid and valid inputs.\n * Optional sound when no input.\n * Maximum valid input attempts.\n * Optional sound when maximum attempts has been reached.\n * Expecting at least/at most/exactly N digits per input.\n * Timeout between digits in more-than-1 digit inputs.\n * Timeout per input attempt.\n * Retry Attempts for valid inputs.\n * And much more!\n\nThe NodeController will let you control the call flow of your application, by\nregistering nodes and actions based on node results. Thus, you can jump from\none node to the other on cancel or complete inputs, hangup the call, execute a\ncallback, etc. For an example, see doc/examples/nodecontroller/example.php\n\nAn article about the node controller is available [here](http://marcelog.github.com/articles/making_your_ivr_nodes_call_flow_with_pagi_and_php_asterisk.html)\n\n## AutoDial\n\nCallFiles are supported. You can also schedule a call in the future.\n\n## Fax\n\nSending and receiving faxes is supported using spandsp (applications SendFax\nand ReceiveFax).\n\n## Available Facades\n\n * PAGI\\Client\\CDR: Provided to access cdr variables.\n * PAGI\\Client\\ChannelVariables: Provided to access channel variables and asterisk\nenvironment variables.\n * PAGI\\Client\\CallerID: Provided to access caller id variables.\n * PAGI\\Client\\Result: Provided to wrap up the result for agi commands.\n * PAGI\\CallSpool\\CallFile: Call file facade.\n * PAGI\\CallSpool\\CallSpool: Call spool facade.\n * PAGI\\Logger\\Asterisk: Provides access to asterisk logger (see logger.conf in\nyour asterisk installation).\n\n## Results\n\nFor every operation, a Result is provided. Some operations decorate this\nResult to add functionality, like PlayResult, ReadResult, etc. For example,\na stream file will return a PlayResult, which decorates a ReadResult which\nin turn, decorated a Result.\n\n  * PAGI\\Client\\DialResult\n  * PAGI\\Client\\ExecResult\n  * PAGI\\Client\\ReadResult\n  * PAGI\\Client\\PlayResult\n  * PAGI\\Client\\FaxResult\n\n## Debugging, logging\n\nYou can optionally set a [PSR-3](http://www.php-fig.org/psr/psr-3/) compatible logger:\n```php\n$pagi-\u003esetLogger($logger);\n```\n\nBy default, the client will use the [NullLogger](http://www.php-fig.org/psr/psr-3/#1-4-helper-classes-and-interfaces).\n\n# Developers\nThis project uses [phing](https://www.phing.info/). Current tasks include:\n * test: Runs [PHPUnit](https://phpunit.de/).\n * cs: Runs [CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer).\n * doc: Runs [PhpDocumentor](http://www.phpdoc.org/).\n * md: runs [PHPMD](http://phpmd.org/).\n * build: This is the default task, and will run all the other tasks.\n\n## Running a phing task\nTo run a task, just do:\n\n```sh\nvendor/bin/phing build\n```\n\n## Contributing\nTo contribute:\n * Make sure you open a **concise** and **short** pull request.\n * Throw in any needed unit tests to accomodate the new code or the\n changes involved.\n * Run `phing` and make sure everything is ok before submitting the pull\n request (make phpmd and CodeSniffer happy, also make sure that phpDocumentor\n does not throw any warnings, since all our documentation is automatically\n generated).\n * Your code must comply with [PSR-2](http://www.php-fig.org/psr/psr-2/),\n CodeSniffer should take care of that.\n\nLICENSE\n=======\nCopyright 2011 Marcelo Gornstein \u003cmarcelog@gmail.com\u003e\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelog%2FPAGI","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcelog%2FPAGI","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelog%2FPAGI/lists"}