IP PBX Web Service
Brekeke PBX Web Service is an API that allows access to Brekeke PBX functions from third-party
applications and services. The Brekeke PBX contains a built-in SOAP engine and supports
the Web Service Description Language (WSDL). It is therefore possible to access the IP PBX
Web Service using any programming language that has facilities to use the SOAP and WSDL Standards.
The PBX Web Service is automatically installed and ready to use when the Brekeke PBX is installed.
Currently, the Web Service has methods to view/modify user settings, create/delete users, and
implement click-to-call feature. This allows the creation of custom applications
and interfaces for managing users of the Brekeke PBX. More functions to make the Web Service even
more powerful will be added.
VoIP Click-to-Call
One of the powerful features of the Brekeke PBX Web Service is the ability to implement a Click-to-Call
feature. Click-to-Call allows the developer to create a button on a web page or application that
will automatically place a call between two or more phone numbers when activated. Possible applications include:
voice-enabled web sites, kiosks with live operator assistants, and phone directories that automatically dial
numbers.
In PHP 5, for instance, one can enable the php soap extensions and create the following simple
application:
<?php
$client = new SoapClient( "http://[host]/pbx/services/UserImpl?wsdl");
$array = array("4007");
print($client->callControl("4005","4005",$array,"2"));
?>
In this example, a call will be placed between extensions "4005" and "4007".
For more details about the callControl function syntax and to learn more about the PBX Web Service, please read the
Brekeke Web Service Users Guide.
Click-to-Call through HTTP
Alternatively, Brekeke PBX also allows third party call control (3PCC) through HTTP.
Access the URL (format as below) using HTTP protocol. (You may do this easily by entering the URL at the address bar at web browser applications.)
http://<server-ip-address>:<server-port>/pbx/3pcc?to=<callee-number>&from=<caller-number>&user=<caller-user>&type=<type>
<server-ip-address> IP address of server where Brekeke PBX is installed on
<server-port> The same port number you use accessing PBX Admintool
<callee-number> Callee’s number, or its SIP URI. You can specify multiple numbers by dividing number using comma.
<caller-number> Caller’s number or its SIP URI.
<caller-user> PBX User which is used to call out (caller). You can omit this if this is same with “caller-number”.
<type> Specify "1" when you would like to call destinations simultaneously. Specify "2" when you want to connect Caller before connecting Callee.
Brekeke PBX will return the response: "succeeded: ID number". This ID will be the ID used at [Call Status] screen for the session.
|