The web AGI functionality allows you to build your own IVR menu using entirely custom logic. You will need the following to use our web AGI functionality:
- A publically accessible web server
- To make full use of the functionality, the server will need to be configured to run server side scripts in a language of your choice
- A Gradwell Multi User VoIP account
Please be aware that our support team are unable to provide advice on configuring your server scripts if you choose to use a web AGI router.
Creating a new web AGI router
To create a web AGI router, click on Web AGI Routing from the top menu of the control panel.
*NOTE* Currently, you will be directed to the legacy control panel to record your voice menu.
Select an unused internal and enter a descriptive name for your new router.
After you have clicked Create you can click your web AGI router to configure it.
You will need to enter the URL of the server that you have placed your scripts on. This is the URL that we will send HTTP POST requests to.
Finally, don't forget to ensure that you add the router as a destination from a phone number or call management tool (such as an IVR menu). For reference we include a Routing Information box on the configuration page to show you the internal routes to the number.
After a call is made to a web AGI router, we will log full details of the call on this page. This helps you troubleshoot any problems you encounter.
When a call is received at the Web AGI number, our system will make an HTTP POST request to the configured URL. The following fields will be included in the POST request.
The script must return a JSON encoded data structure, as follows:
Each entry in the ‘actions’ list is an object with the following fields:
Authenticating a customer
You may use this on their phone system to authenticate their own customers, before passing them through to a support team.
- Phone call is received
- HTTP POST to http://www.example.com/callhandler.php with fields _callerid=01225800800, _calleridname=Gradwell, _time=12223334444, _extension=1122345
- HTTP response lists 2 actions: [action=read, name=customer_id, voiceprompt_id=100], [action=read, name=pin, voiceprompt_id=101]
- The Web AGI system will process these actions. It is assumed that voice prompt 100 would say something like “Thank you for calling us, please enter your customer number” and that voice prompt 101 would say “Please enter your PIN code”
- After the customer enters the data, a second HTTP POST is sent to the same URL with two fields: customer_id=12345, pin=9876
- The response at this point is where the customer can create an extremely flexible phone system. Obviously the internal implementation is up to the end user, but querying a customer database is likely to be a common scenario
- If the customer ID and PIN are not valid, it may simply send a “play” action with an appropriate message, followed by the two read actions, to prompt the user to try again
- If the customer ID is valid, and is a key account, it may route directly to their account manager
- If the customer ID is valid, and is another customer, it may route to a standard support queue
Routing based on caller ID
The functionality may also be used to route based on the caller ID, for example to route callers to their local branch, or routing known customers to their account manager.
In this case, you would simply return an appropriate “dial” action in response to the initial request, after inspecting the _callerid field provided.