HTTP API Test Guide
This guide is about to give you quick guideline how you can test the HTTP API commands in Ozeki 10. Here you will be able to see how the examples of each command can be tested with an IVR system and also how to test the example URL requests by an easy to follow step by step guide and a video tutorial.
Video tutorial
Requirements
PBX: The easiest way to test all the commands of the HTTP
API, that if you have a fully installed and set up phone system using
Ozeki 10 Phone System application. |
|
Ozeki 10: You can download Ozeki 10 from here. (http://www.ozeki.hu/index.php?owpn=231), and install to your computer in just a few simple steps. |
Step 1: Download and install Ozeki 10
The very first step, that you need to do to use the HTTP API commands is to download Ozeki 10. For that, check www.ozeki.hu website, and here select the Downloads menu. In this menu, you can select Ozeki 10 various operating systems, but now you need to download the zip file like in Figure 1 to install Ozeki 10 to the Windows operating system.
When the download of the zip file finished, you just have to open it. This file contains only one exe file, with you can start the installation of Ozeki 10 if you double click on it (Figure 2).
The process of installation is quite easy and quick, you just need to click Next all the time. At the end of the installation, you have to provide a password for the default 'admin' account as you can see in Figure 3. Here you can type anything that you want as a password, but be careful, the password must be at least six characters.
Step 2: Create an IVR extension
After you installed Ozeki 10, to open it, just click on its icon on your desktop. By doing that, the login window will open up in your browser (Figure 4). Here you need to enter the password that you typed in during the installation.
After you logged in with your account, you will be able to see the desktop of Ozeki 10 in your web browser. Here you can find all the applications that Ozeki 10 provides, but now to create the IVR, you need to open the Phone System application (Figure 5).
In the Phone System application to create the IVR extension, first, you need to click on the Create new Extension button as Figure 6 demonstrates it. By doing this, you will be able to see to types of extensions where you can choose from. Now, click on Service. Here, you can see the services that Ozeki 10 provides. Now you just have click on the button of IVR extension.
Next, in the extension details, you have to specify a phone number for this IVR extension. This will be the number that you have to call to test the HTTP API commands. Below, in the OzML to execute panel (Figure 7) you can see an initial script. This script will be executed by default by the IVR in case of a phone call. Now, you just have to click OK to create the extension.
Step 3: Create the HTTP API service
To test an URL request in Ozeki 10, you need one more feature that you have to create, the HTTP API service. This service will provide the port, where the communication process of the API will happen. To create this service, you need to select Start, and follow the Programs, Administrative Tools and Services route as you can see in Figure 8.
Here, first click on Create new Service and here, select the icon of the HTTP API service from the list of services (Figure 9).
Before you finish the creation of the service, in the Service details menu, you need to specify the name of the service, but more importantly, the protocol and port of the service. The number that you provide here as a port, that you have to use when you test an URL request. In this guide, as Figure 10 demonstrates it, the port of the service is 9509.
Step 4: Test one of the command with the IVR
To reach the IVR connection, first, open the Phone System application again. Here, you will be able to see a list of the available extensions with the created IVR extension. If you click on it, all the details about this extension will show up. The main window of the extension is the Script as you can see on Figure 11, where you can write the executable OzML script. This is what you have to change during the testing.
Next, you need to select a command to test. For that, check the HTTP API commands page (Figure 12), where all the available HTTP API commands are listed. Here you can have a look at every command by selecting it from the list, check its description, parameters, and the examples. In this guide you can follow the testing of the UserInput command, so select this one from the list.
In the page of the UserInput command, you can see all the details that you need to understand the working of this command. You can check what parameters are needed to run this command or with which parameters you can customize the command. But to test it, you need the OzML example as Figure 13 shows, so to use it, simply copy it to the clipboard.
Now, just go back to your IVR extension and paste the content into the Script panel and replace the current script. To activate this script to your IVR, just click on Save (Figure 14), and the configuration of the IVR will be updated. Now, if you call the extension, the commands in the pasted script will run.
Step 5: Test one of the URL requests using the IVR extension
The other type of the HTTP API command is that you can test using an URL request. To test these requests with your IVR extension, first, you need to create a password, and with that, the URL request can authenticate the extension as a user. For that, first click on Configure, and then, select Advanced as Figure 15 demonstrates it. Here, in the Login (HTTP API) field, you just have to enter the password, which in this guide is 'qwe123'. After that, just click OK to save the modifications.
After you added a password for the IVR extension, now it is ready to handle the URL requests. To do this, first, you need to select the 'Test' panel like in Figure 16, where you have to copy the request and test it.
You need to select a request from the HTTP API commands page, but be aware of that, not every HTTP API command has got an URL request example, so can't test all of them that way. In this guide, the ListExtensions command will be tested, so to follow it, click on its link in the list of commands. Here, you can find every detail about that command, the description, the parameters, and the bottom of the page, the examples. Now, as you can see on Figure 17, you just have to copy the URL request from here.
Lastly, you have to visit the Test window of the HTTP User account in the SMS Gateway and paste the example command here (Figure 18). After that, you need to modify the Username parameter by replacing the 'HTTP_User_1' with the number of your IVR extension. Then, if you have done everything right till this point, after you pressed the Submit button, you will be able to see all of your currently active extensions in the Response panel.
More information
- Ozeki 10 - HTTP API Commands
- HTTP API Test Guide