Howto:Initiate a Mobility CallBack via simple HTTP GET or POST request: Difference between revisions
m (New page: This article describes how to setup a PHP script to enable CallBack on Mobility devices supporting IP CallBack only via simple HTTP GET or POST request. ==Applies To== This information ap...) |
m (→Configuration) |
||
Line 28: | Line 28: | ||
Example GET request with following URL: | Example GET request with following URL: | ||
http://192.168.0.1/mobility.php?cn=Reiner%20Zufall&e164=123&hw=iphone | <nowiki>http://192.168.0.1/mobility.php?cn=Reiner%20Zufall&e164=123&hw=iphone</nowiki> | ||
In this example a User <code>Reiner Zufall</code> will call phone number 123 and will use device <code>iphone</code>: | In this example a User <code>Reiner Zufall</code> will call phone number 123 and will use device <code>iphone</code>: |
Revision as of 19:38, 5 September 2011
This article describes how to setup a PHP script to enable CallBack on Mobility devices supporting IP CallBack only via simple HTTP GET or POST request.
Applies To
This information applies to
- innovaphone PBX, V9 hotfix 3
- PHP, version 5.2
More Information
The innovaphone PBX supports CallBack via IP via SOAP API for all User Devices registered on it, but also for Mobility For destinations.
In order to use this CallBack feature SOAP API must be used. If only a simple HTTP GET or POST is supported on client side, a sample PHP script described in this article, can be used to convert simple HTTP requests to SOAP messages for PBX.
$/wiki-src/xml/IPCallBack/
Configuration
First download the sample PHP script and extract it to a folder on your PHP 5.2 enabled web server.
The sample contains following files:
- innopbx.class.php
- PHP implementation of SOAP API for innovaphone PBX
- logger.class.php
- simple logger for debugging, writes into local text file
- mobility.php
- sample script
The mobility.php
script takes parameters for call back from POST or GET request and initiates a call via SOAP API. The HTTP credentials for SOAP session are hard coded in the PHP script (you may change it to submin the credentials with each HTTP request).
Example GET request with following URL:
http://192.168.0.1/mobility.php?cn=Reiner%20Zufall&e164=123&hw=iphone
In this example a User Reiner Zufall
will call phone number 123 and will use device iphone
:
- The PBX Object with Long Name
Reiner Zufall
is used to start the call - The Mobility Fork Destination with Device labeled
iphone
Known Problems
Download
- http://download.innovaphone.com/ice/wiki-src#ipcallback - download the complete file package of scripts and files described in this article.