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

Laravel News:
Building an Interactive Voice Response System with Laravel and Nexmo
Apr 26, 2017 @ 14:37:45

On the Laravel News site there's a new tutorial posted showing you how to create a simple iVR system with Laravel and Nexmo that includes voice responses.

Want to dial your Laravel app, and have it talk back to you? Let’s take a quick look at how to build a really simple IVR (interactive voice response) – a ‘phone menu’ – with Laravel and Nexmo. When it’s done, you’ll be able to pick up your cell phone, dial a phone number, and have your Laravel app control what you hear.

It’s probably easier than you think, let’s get started!

Using a standard Laravel application and a Laradoc environment, they pull in the nexmo/laravel to connect with the Nexmo service. They also add two others to add additional functionality for reading Tweets and RSS feeds. After configuring the application providers to pull in the Nexmo and Twitter functionality they go over to the Nexmo site and create the application they'll use. The tutorial then shows how to generate a command (the AppCreate command), its signature and the code to make the Nexmo API request. They then create another command to link the application to numbers on the Nexmo account.

Finally, they get to the "good" part - creating the code to handle the incoming calls over webhooks. This includes the controller, routes and - based on user input - how the IVR will respond. In their example, when the number is called, the latest tweet from @taylorotwell is fetched and is converted to text, then spoken back to the caller.

tagged: tutorial ivr voice response system laravel nexmo api

Link: https://laravel-news.com/laravel-hotline-ivr

Marcelo Gornstein's Blog:
Making your ivr nodes (call) flow with PAGI
May 14, 2012 @ 17:09:50

Marcelo Gornstein has returned to his "IVR with PHP" series in this latest post (see others here and here). In this new post he shows you how to create a full flow of interaction for your callers:

The last article was about how to create call flow nodes for asterisk, using pagi and php, to easily create telephony applications. It's now time to add a layer on top of it, and create a complete call flow with several nodes.

He talks about NodeControllers to control execution flow, results from their execution, available actions and an example of creating a controller and adding nodes. He builds on this simple controller and shows how to handle a few actions including responding to user feedback, adding multiple menu options and some more complex logic using a closure to contain the functionality.

tagged: ivr node controller call flow tutorial asterisk

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: