{"id":16389331,"url":"https://github.com/marcelog/pagi-app-and-test-example","last_synced_at":"2025-10-26T13:30:37.728Z","repository":{"id":2591040,"uuid":"3572837","full_name":"marcelog/Pagi-App-And-Test-Example","owner":"marcelog","description":"An example of a PAGI IVR application, including unit tests","archived":false,"fork":false,"pushed_at":"2016-01-03T23:10:28.000Z","size":341,"stargazers_count":11,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-03-11T13:53:27.468Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://marcelog.github.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-02-28T16:21:26.000Z","updated_at":"2022-12-06T14:38:14.000Z","dependencies_parsed_at":"2022-08-29T05:00:54.171Z","dependency_job_id":null,"html_url":"https://github.com/marcelog/Pagi-App-And-Test-Example","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2FPagi-App-And-Test-Example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2FPagi-App-And-Test-Example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2FPagi-App-And-Test-Example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelog%2FPagi-App-And-Test-Example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcelog","download_url":"https://codeload.github.com/marcelog/Pagi-App-And-Test-Example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219862889,"owners_count":16555951,"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":[],"created_at":"2024-10-11T04:32:23.989Z","updated_at":"2025-10-26T13:30:37.293Z","avatar_url":"https://github.com/marcelog.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\nAn example PAGI IVR application (for asterisk and php, of course),\nincluding unit tests with phpunit. This is the source code for\nthe article at:\n[http://marcelog.github.com/articles/pagi_mock_client_unit_test_ivr_application_telephony_asterisk_agi.html](http://marcelog.github.com/articles/pagi_mock_client_unit_test_ivr_application_telephony_asterisk_agi.html)\n\n# The code\n\n* src/MyApp/App.php is the IVR application itself.\n* test/AppTest.php is a phpunit test case for the ivr application. It\ncontains 2 unit tests.\n\nThe other files serve as a skeleton for running everything.\n\n# Config\n\n1. Copy the directory \"config.example\" (and its contents) to \"config\".\n2. Edit config/php.ini if you need to change xdebug extension\npath.\n3. Edit config/cli.properties. Change \"php\" and \"pear\" to match the\npaths in your filesystem (usually /usr/bin/php and /usr/bin/pear).\n4. Run `./composer.phar install`\n\n# Run the tests\n\n```\n$ bin/test.sh\n```\n\nThe coverage will be generated as html in runtime/coverage.\nYou can find resulting logs from tests in runtime/log/dev.log\n\nRun the IVR\n-----------\nIn your extensions.conf, put these lines (modify to suit your paths):\n\n```\nexten =\u003e 123,1,AGI(/home/ivr/bin/runIvr.sh)\nexten =\u003e 123,n,Hangup\n```\n\nRun the application by calling 123 (or the extension you've configured).\nResulting logs are in `runtime/log/production.log`\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelog%2Fpagi-app-and-test-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcelog%2Fpagi-app-and-test-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelog%2Fpagi-app-and-test-example/lists"}