Read a number from the caller and run an AGI script using it as parameter: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
[[File:createagiscriptcodenumberentered.png|400px]] | [[File:createagiscriptcodenumberentered.png|400px]] | ||
Then we can create the custom destination to use the AGI script defined | Then we can create the custom destination to use the AGI script defined. As first parameter we'll use the variable holding the code entered ${USR-usercode} and as second parameter the callerid of the caller. | ||
[[File:runagiscriptcodenumberentered.png|400px]] |
Revision as of 09:23, 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.
Then we'll create a "Custom Destination" to read the number from the user
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
Then we can create the custom destination to use the AGI script defined. As first parameter we'll use the variable holding the code entered ${USR-usercode} and as second parameter the callerid of the caller.