Read a number from the caller and run an AGI script using it as parameter: Difference between revisions

From MiRTA PBX documentation
Jump to navigation Jump to search
No edit summary
No edit summary
Line 8: Line 8:


[[File:readthecode.png|400px]]
[[File:readthecode.png|400px]]
Let's define an AGI script to test if the code is good or not. We'll send the number entered as parameter. As an additional parameter, we'll send the callerid number of the caller
[[File:createagiscriptcodenumberentered.png|400px]]
Then we can create the custom destination to use the AGI script defined

Revision as of 09:21, 7 June 2016

Let's make the example of a service to verify if a code provided by the user is valid or not, by checking in a database.

As first step we'll create a media file to ask to the user the number.

Createmediafileentercode.png

Then we'll create a "Custom Destination" to read the number from the user

Readthecode.png

Let's define an AGI script to test if the code is good or not. We'll send the number entered as parameter. As an additional parameter, we'll send the callerid number of the caller

Createagiscriptcodenumberentered.png

Then we can create the custom destination to use the AGI script defined