Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Marcelo Gornstein's Blog:
Advanced telephony applications with PHP and PAGI using call flow nodes
Apr 04, 2012 @ 16:21:54

Marcelo Gornstein has a new post to his blog (in his PHP and PAGI series) showing how you can use call nodes to create more complicated telephony applications.

Now, since version 1.10.0, PAGI comes with a neat feature, which is a small abstraction layer over the pagi client, called "Nodes". Also, the "NodeController" will orchestrate how those nodes interact with each other. Nodes are essentially call flow nodes. These new features will allow you to implement complete call flows in no time, and maybe even without using the pagi client by yourself. In this article, I'll introduce the nodes by themselves (and how to unit test them), and will talk about the node controller in a latter article.

He introduces the concepts of these Nodes and shows how to create a simple client, make a node off of it and read in the user's input. Code is also included for a basic IVR menu, working with pre-prompt messages, digits, datetimes and calling card PIN numbers. There's also some examples of calling validators on the input, making callbacks, tracking the nodes via in internal system and mocking out the nodes for testing purposes.

tagged: pagi telephony application call flow node tutorial

Link:

Marcelo Gornstein's Blog:
Unit test your PHP IVR applications with PAGI
Mar 01, 2012 @ 19:25:49

Marcelo Gornstein has a recent post to his blog about a method he's come up with to test your PHP-based IVR ("interactive voice response" systems for telephony) applications with the help of PAGI.

Since version 1.9.2, PAGI comes with a mock of a pagi client, suitable to be used in your own unit tests, so you can test your telephony applications, like IVRs. The idea behind the mocked client is to let you test the callflow side of your application, the user interaction and the exact sequence an ivr application should obey. Let's see how to use it.

He shows how to test a basic PAGI application by hooking in the PAGI client into his PHPUnit test for the app and the code coverage of the result. The MockedClientImpl client lets you test the application without having the external dependency of actually running it. He includes some examples of commands and how they'd be mocked out with this client as well as a handy list of the "on*" methods available (like "onDial" or "onSayAlpha").

You can find the complete source for everything in the article on his github account.

tagged: unittest ivr telephony voice pagi mock client

Link:


Trending Topics: