|Ismerje meg, hogyan tudja beállítani és használni a legkorszerűbb mobil, VoIP, SMS és web funkciókat.|
What if a customer would not like to spend money calling the company? He could provide his phone number and the company can call him back. The way it works is that you put an inputbox onto your company’s website. The customer types his/her phone number and clicks ’Submit’. Then a phone will ring inside your company. When a member of the support staff picks it up, the call will be transfered to the customer. So when the support staff member picks up the phone he/she will hear its ringing on the other side. When the customer picks up the phone, they can start the conversation.
The telephone which will answer the callback request should already be added to
the system as an extension. If it's not, follow these steps if you want to connect an
analog phone or a desktop
VoIP phone. You need to
register an API Extension too, because when the customer clicks ’Submit’ to request a
callback an API extension will call the employee.
The Following guide is split into four steps for the sake of better transparency:
On the right side of the Ozeki Phone System XE GUI you will see a green bordered box called Extensions. Click ’Add’ (Figure 1).
Figure 1 - Extensions box
On the left half of the screen you will see an ’API extension’ label. Click the ’Install’ button next to it (Figure 2).
Figure 2 - Extensions label
Type in the extension phone number and click ’OK’. The API extension has been installed successfully. (Figure 3).
Figure 3 - Extension general settings
Now the API extension is created and it is assumed that you have already connected an analog phone, or a VoIP phone to the PBX. If you need help, visit our Extension setup guide. Now, study how a callback request will work using the HTTP API:
Watch the workflow of the call command to understand it better (Figure 4).
Figure 4 - The workflow of the Call command
You can get additional information about the call command here
If you want to implement a callback request, you have to be familiar with the HTML language, and with a server-side scripting language such as PHP or ASP.
First of all, you are going to create a simple HTML file, which will contain only two things: a data field, and a submit button. On Figure 5 you can see the HTML code of the index.html which will create the website used in the guide.
Figure 5 - HTML code of index.html
<html> <body> <form name="input" action="callreg.php" method="post"> My telephone number: <input type="text" name="phonenumber"> <input type="submit" name="submit" value="Submit"> </form> </body> </html>
On Figure 6, you can see the HTML file is opened in a web browser.
Figure 6 HTML file in web browser
This is the page where customers, who ask for callback, enter their phone number, and press Submit. After that, the phone number is sent from the HTML site to another file which is (in this guide) the callreq.php file, written in PHP language. You have to have a server which supports PHP. If you do, after uploading this php file, it will be translated on your server, and it will become your php Application. Here is the code of the .php file:
Figure 7 - PHP code of callreq.php
<?php header ("Content-Type:text/xml"); $OzekiAddress = 'http://192.168.112.218:7780/?'; $Command = 'Call'; $Dialed = $_POST('phonenumber'); $ApiExtension = '9998'; $CallerId = '1000'; $CallerDisplayName = 'John Smith'; $Url = 'http://192.168.112.218:8080/callrequest/ozml.php'; $ErrorUrl = ''; $ozekiurl = $OzekiAddress . 'Command=' . $Command . '$Dialed=' . $Dialed . '$ApiExtension=' . $ApiExtension . '$CallerId=' . $CallerId . '$CallerDisplayName=' . urlncode($CallerDisplayName) . '$Url=' . urlencode($Url) . '$ErrorUrl=' . urlencode($ErrorUrl); echo file_get_contents($ozekiurl); ?>
The role of this PHP file is a little bit more complicated. This file gets the phone number from the HTML page and forms the Call command. The entered mandatory data are the following:
After the command is formed in the proper way, and all the mandatory data is given, the Application delivers the info to the Ozeki Phone System XE.
First, the customers number will be dialled from the Ozeki Phone System XE. If the customer answers the call, the Ozeki Phone System XE will send a notification back to your Application about the connected call. This is called the callconnected notification.
This Application will answer the notification, and this is where the $URL part of the Call command gets important. A Response will be sent back to the Ozeki Phone System XE. The response is an XML data (contained in a .php file in this guide) that contains the phone number of the employees at the company who will answer the call of the customer. Ozeki Phone System XE gets this response data from the $URL which has been previously provided for it in the Call command.
Here is the ozml.php file containing the xml data used in this guide for the Response:
Figure 8 - The ozml.php file containing the XML data
<xml version="1.0" encoding="UTF-8"?> <Response> <Delay>1</Delay> <Speak>Hello, you will be transferred to another extension. Good bye! </Speak> <!-- The call will be blind transferred to another extension. To try it please configure an extension (e. g. SIP extension) in the system , register and set the extension ID for the command. --> <BlindTransfer>1100</BlindTransfer> <!-- If blind transfer fails, the following commands will be executed --> <Speak>Sorry, but blind transfer failed. Please setup an extension in the system. </Speak> </Response>
This xml data consists of the following tags:
After the Ozeki Phone System XE gets the response, it will dial the employees on the number 1100 at the company through the HTTP API Extension. When an employee answers the call, the Callback Request is served, and the customer got called back as he wanted.
This last part is about making a Ring group. It is important, because the xml data of the Response will only contain one phone number, so without a Ring group, only one employee could answer the callback request. Here you can find a detailed guide to help you with this.
The guide above showed you how to setup an API Extension in the Ozeki Phone System XE, and how to implement a callback request using HTML, and PHP languages. If you follow this guide step-by-step, and read it paying attention, you will be able to make your own web application and make it communicate with the Ozeki Phone System XE, resulting in a served callback request.
If you have any questions or need assistance, please contact us at firstname.lastname@example.org
People who read this also read...