800 PBX developer API can allow you handle complicated business logic in easy steps.
Here are the steps to get started.
-
-
Post the Parameters
Parameter Value/Notes userID Userid of our account. apiKey API key generated for your account. phoneToCall Destination number where the call has to be originated extension Extension to forward the call (optional) If no extension is mentioned, the calls will be forward to the main extension. params Additional parameters you can sent by sending them in the key and value format, which can be used by your voice xml application. -
Get the Sample Code
Though, its simple https post to the webpage, we have provided the sample code as a java library for you.
To call a number and connect to an extension, use the following code. Please note that extension is an optional parameter. Omitting the extension will connect the caller to the main extension.
"public String PostToHTTPS.postRequest(userID, apiKey, phoneToCall, extension, params)"
"public String PostToHTTPS.postRequestWithVxmlPath(userID, apiKey, phoneToCall, vxmlPath, params)"
VoiceXML
You can connect the users to your voicexml application directly by invoking the following command. At this time, only US English (TTS & Speech Recognition) are supported.
VoiceXML (VXML) is the W3C's standard XML format for specifying interactive voice dialogues between a human and a computer. It allows voice applications to be developed and deployed in an analogous way to HTML for visual applications.
Post Parameters
Parameter Value/Notes userID Userid of our account. apiKey API key generated for your account. phoneToCall Destination number where the call has to be originated extension Extension to forward the call (optional) If no extension is mentioned, the calls will be forward to the main extension. params Additional parameters you can sent by sending them in the key and value format, which can be used by your voice xml application.
Library Function
"public String PostToHTTPS.postRequestWithVxmlPath(userID, apiKey, phoneToCall, vxmlPath, params)"
You can connect the users to your voicexml application directly by invoking the following command. At this time, only US English (TTS & Speech Recognition) are supported.
Connection to an extension:
String userID = "john"; String apiKey = "10f27f2a071deb35"; String phoneToCall = "4086777649"; String extension = "9"; Hashtable params = new Hashtable(); params.put("your_key", "your_value"); CalltoClient clc = new CalltoClient(); String status = clc.call(userID, apiKey, phoneToCall, extension, params);
If call is placed successfully, you will get the message "Success : We have placed the call. Your caller will receive call Now." in the status variable. Otherwise, error message is specified such as "Sorry, your apikey and userID did not match."
Connecting to a VoiceXML application:
String userID = "john"; String apiKey = "10f27f2a071deb35"; String phoneToCall = "4086777649"; String extension = "9"; String vxmlPath = "http://yourserver.com/sample.vxml"; Hashtable params = new Hashtable(); params.put("your_key", "your_value"); CalltoClient clc = new CalltoClient(); String status = clc.callVXML(userID, apiKey, phoneToCall, extension, vxmlPath, params);
The parameters will be issued as post parameters to your voicexml application
