API - Documentation

Developper's Guide : usage of CallBridge Pro's API

Foreword

CallBridgePro is a telephony and sms app, but also useful for registering contacts, appointments and sending addresses.

Call orders come either of:

  • Your CRM application to which you will have added the use of APIs,
  • Our Windows application (CallBridgePro.Win),
  • Our Saas portal – Web application (CallBridgeProWeb).

To use our APIs you need to be a CallBridge Pro user with the API option.

To open a CallBridge Pro account, just click HERE.

Orders arrive almost immediately through notifications on the smartphone(s) having the CallBridgePro app installed .

The notification’s title (before opening), through its prefix, indicates the action it will produce.

The terminology of prefixes is:

  • ” Call. “: Immediate dialing of the telephone number given in the notification
  • Call “: opening of a window allowing the user to check/modify the n° and to ask for its dialing. The Text (optional) can be used to inform the user about the reason of the call.
  • ” SMS. “: Launch the smartphone’s native SMS app with the phone number(s) to be contacted + text of the message. On IOS phone user needs to press ‘Send’.
  • SMS “: Opens a screen allowing the user to check/modify the phone number(s) + text of the SMS and to request its composition. On IOS phone user needs to press ‘Send’.
  • ” Info “: Copy immediatly the text content to the clipboard. User can use this text with the “Paste” function.
  • ” Contact. “: Contact details immediately added to the smartphone’s phonebook.
  • Contact “: Opens a screen with contact details. The user can check/modify and then add the contact with the press of a button.
  • ” Agenda. “: Immediate integration of the appointment to the calendar.
  • Agenda “: Opens a screen with appointment details. User  can check/modify before adding the appointment to its calendar.
  • ” Map. “: Opens the Map (or Maps) on the smartphone. Through an option on the smartphone (in Settings) address can be send directly to those apps: “Maps”, “Waze” or “Navigon”

NB: The presence of a dot ‘.’ After the prefix defines its immediate action on the smartphone.

Opening the notification will launch the CalleBridgePro mobile application in the ‘mode’ chosen by the issuer of the order.

NB: On IOS, the simple fact of being in the CallBridgePro app (in the foreground) will trigger the execution of the notification, no user action needed then.

 

There are also 2 “Services” API, you can use to:

  • get the version n° of the WebServices: CallBridgeProApi,
  • get the names/nick of smartphone users of the selected account.

API description is available at the following address:

http://164.132.49.2/CALLBRIDGEPROAPI_WEB/awws/CallBridgeProApi.awws?wsdl

 

For each action on the smartphone there is a service in CallBridgeProApi.

An example of each notification service is given in appendix (+ in javascript).

Les différents appels API

CallBridgeProApi/Put_Notification_Sms  :

Send SMS to 1 or more recipients.

 

Variables information :

Variables information :

pLogin                  : Account login

pPass                    : Account password

pDateTime         : Notification’s sending date and time, using format :YYYYMMDDhhmmss  Ex: 20170120093425

pImmediate      : 1 = Immediate SMS      0 = Display (for manual user action)

pRecipients       : User name/nick (on smartphone) =recipient of the notification (userlist retrievable by API Service call, see section)

pTitle                   : Notification’s title (visible only on android)

pPhones             : Phone N° (if multi : separated by a comma)

pText                    : SMS text

pPost                    : Computer station sending the notification

CallBridgeProApi/Put_Notification_Call :

Dial/launch a call.

 

Variables information :

pLogin                  : Account login

pPass                    : Account password

pDateTime         : Notification’s sending date and time, using format :YYYYMMDDhhmmss  Ex: 20170120093425

pImmediate      : 1 = Immediate Call      0 = Display (for manual user action)

pRecipients       : User name/nick (on smartphone) =recipient of the notification (userlist retrievable by API Service call, see section)

pTitle                   : Notification’s title (notification’s 1st line, visible only on android)

pPhones             : Phone N° to call

pText                    : Optionnal text (information only, for example : reason of the call)

pPost                    : Computer station sending the notification

CallBridgeProApi/Put_Notification_Info :

Put text in smartphone’s clipboard.

 

Variables information :

pLogin                  : Account login

pPass                    : Account password

pDateTime         : Notification’s sending date and time, using format :YYYYMMDDhhmmss  Ex: 20170120093425

pImmediate      : 1 = Immediate Clipboard     0 = Display (for manual user action)

pRecipients       : User name/nick (on smartphone) =recipient of the notification (userlist retrievable by API Service call, see section)

pTitle                   : Notification’s title (visible only on android)

pMessage           : Subject (optionnal, for exemple : here is my licence code)

pText                    : Text to put in clipboard

pPost                    : Computer station sending the notification

CallBridgeProApi/Put_Notification_Agenda :

Add appointment to smartphone’s calendar.

 

 

Variables information :

pLogin                  : Account login

pPass                    : Account password

pDateTime         : Notification’s sending date and time, using format : YYYYMMDDhhmmss  Ex: 20170120093425

pImmediate      : 1 = Immediately added in calendar    0 = Display (for manual user action)

pRecipients       : User name/nick (on smartphone) =recipient of the notification (userlist retrievable by API Service call, see section)

pTitle                   : Notification’s title (visible only on android)

pMessage          : Appointment title/subject

pDateFrom        : Start Date, using format  (YYYYMMDD)

pTimeFrom        : Start Time, using format (hhmm)

pDateTo              : End Date, using format (YYYYMMDD)

pTimeTo             : End Time, using format (hhmm)

pPlace                  : Location of event (address format to be interpreted by Google)

pAllDay               : 1   (if  event lasts all-day)

pText                    : Notes (for event/appointment)

pReminder        : Android only : Number of minutes, for alert . Example : 60 = 1 hour before

pPost                    : Computer station sending the notification

CallBridgeProApi/Put_Notification_Contact :

Add contact to the smartphone.

 

Variables information :

pLogin                  : Account login

pPass                    : Account password

pDateTime         : Notification’s sending date and time, using format :YYYYMMDDhhmmss  Ex: 20170120093425

pImmediate      : 1 = Immediately added to contacts   0 = Display (for manual user action)

pRecipients       : User name/nick (on smartphone) =recipient of the notification (userlist retrievable by API Service call, see section)

pTitle                   : Notification’s title (visible only on android)

pLastName        : Contact’s last name

pFirstName       : Contact’s first name

pSociety              : Company name

pAddress            : Address (formatted for Maps) : Street + number

pZip                      : Zip code

pCity                     : City

pCountry            : Country OR State, Country

pTelephone      : Phone N°

pCellphone       : Phone N° mobile

pEmail                 : Contact’s Email

pWeb                   : Website

pPost                    : Computer station sending the notification

CallBridgeProApi/Put_Notification_Map :

Display map or route for address. Third parties app compatible : Maps/Waze/Navigon.

 

Variables information :

pLogin                  : Account login

pPass                    : Account password

pDateTime         : Notification’s sending date and time, using format :YYYYMMDDhhmmss  Ex: 20170120093425

pImmediate      : 1 = Immediate Display    0 = Display (for manual user action)

pRecipients       : User name/nick (on smartphone) =recipient of the notification (userlist retrievable by API Service call, see section)

pTitle                   : Notification’s title (visible only on android)

pMessage          : Subject (example: Customer John Doe, today 3PM)

pAddress            : Location/Address (formatted for Google Maps) : Street + number

pZip                       : Zip code

pCity                     : City

pCountry            : Country OR State, Country

pLongitude        : GPS Longitude : corresponding to the address*

pLatitude            : GPS Latitude : corresponding to the address*

pPost                    : Poste ayant envoyé la notification

*To maintain the lowest price for CallBridge Pro’s API, we’re not using Google Map API, but it’s free for individual use. You can easily get coordinates, just by sending a javascript request with any address to Google Maps. Plus doing this let you check the existence of the entered address.

'Service' API calls

CallBridgeProApi/Get_Version :

Get CallBridgeProApi version number.

 

Variables information :

pLogin                  : Account login

pPass                    : Account password

pDateTime         : Notification’s sending date and time, using format :YYYYMMDDhhmmss  Ex: 20170120093425

CallBridgeProApi/Get_Devices :

Get the name (nick) of every smartphone connected to CallBridgePro.

(this is needed to choose the recipient of each notification)

 

Variables information :

pLogin                  : Account login

pPass                    : Account password

pDateTime         : Notification’s sending date and time, using format :YYYYMMDDhhmmss  Ex: 20170120093425

 

Detail come back through XML with :

IDClientAppareil               : Internal ID of smartphone

Nom                                     : Name (nick)

NotifFlag                             : Kind of smartphone (1=Android  2=Ios)

FlagStop                              : 1 = Unusable device (stopped/broken/stolen…)

DateCreation                      : Coonection’s Date to CallBridgePro

Usage examples

For the pDateTime variable/tag, we use TheDateTime()

sending date and time using format : YYYYMMDDhhmmss  Ex: 20170120093425 pour le 20/01/2017 à 09h34m25s

 

// Prepare datas to send Soap CallBridgeProApi/Put_Notification_Sms

 

 

function Put_Notification_Sms() {

var requete;

requete=”<soap:Envelope xmlns:soap=\”http://schemas.xmlsoap.org/soap/envelope/\”    xmlns:xsi=\”http://www.w3.org/1999/XMLSchema-instance\” xmlns:xsd=\”http://www.w3.org/1999/XMLSchema\”><soap:Body>”;

requete += AjBalise(“pLogin”,”myLogin”);                           // Account Login

requete += AjBalise(“pPass”,”myPassword”);       // Account Password

requete += AjBalise(“pImmediate”,”1″);                             // 1 = SMS immediate    0 = display (for manual actions)

requete += AjBalise(“pDateTime”,TheDateTime() );            // Return as :YYYMMDDhhmmss  Ex: 20170120093425 s

requete += AjBalise(“pRecipients”,”Patrick S7″); // Name/Nick of the smartphone

requete += AjBalise(“pTitle”,”CallBridgePro”);    // Notification Title

requete += AjBalise(“pPhones”,”0689939667,0623631148″);           // Phone N° receiving SMS

requete += AjBalise(“pText”,”The text of the SMS”);           // Text SMS

requete += AjBalise(“pPost”,”Sender”);                              // device sending the notification

requete += “</soap:Body></soap:Envelope>”;

SendHttp(requete,”Put_Notification_Sms”,CallBackReponse)            // Send XML request and Service name to contact

}

 

// Prepares data to send SOAP CallBridgeProApi/Put_Notification_Call

function Put_Notification_Call() {

var requete;

requete=”<soap:Envelope xmlns:soap=\”http://schemas.xmlsoap.org/soap/envelope/\”     xmlns:xsi=\”http://www.w3.org/1999/XMLSchema-instance\” xmlns:xsd=\”http://www.w3.org/1999/XMLSchema\”><soap:Body>”;

requete += AjBalise(“pLogin”,”myLogin”);                           // Account Login

requete += AjBalise(“pPass”,”myPassword”);       // Account Password

requete += AjBalise(“pImmediate”,”1″);                             // 1 = immediate call    0 = display only

requete += AjBalise(“pDateTime”,TheDateTime() );            // Return as :YYYMMDDhhmmss  Ex: 20170120093425 s

requete += AjBalise(“pRecipients”,”Patrick S7″); // Name/Nick of the smartphone

requete += AjBalise(“pTitle”,”CallBridgePro”);    // Notification Title (1st lign on android)

requete += AjBalise(“pPhones”,”0689939667″); // Phone N° to call

requete += AjBalise(“pText”,”The text explanatory”); // Optionnal Text optionnel for the caller

requete += AjBalise(“pPost”,”Sender”);                              // Device sending the notification

requete += “</soap:Body></soap:Envelope>”;

SendHttp(requete,”Put_Notification_Call”,CallBackReponse) // Send XML request and Service name to contact

}

 

// Prepares data to send SOAP Soap CallBridgeProApi/Put_Notification_Info

function Put_Notification_Info() {

var requete;

requete=”<soap:Envelope xmlns:soap=\”http://schemas.xmlsoap.org/soap/envelope/\”     xmlns:xsi=\”http://www.w3.org/1999/XMLSchema-instance\” xmlns:xsd=\”http://www.w3.org/1999/XMLSchema\”><soap:Body>”;

requete += AjBalise(“pLogin”,”myLogin”);                           // Account Login

requete += AjBalise(“pPass”,”myPassword”);       // Account Password

requete += AjBalise(“pImmediate”,”1″);                             // 1 = Put in clipboard    0 =     display only

requete += AjBalise(“pDateTime”,TheDateTime() );            // Return as :YYYMMDDhhmmss  Ex: 20170120093425 s

requete += AjBalise(“pRecipients”,”Patrick S7″); // Name/Nick of the smartphone

requete += AjBalise(“pTitle”,”CallBridgePro”);    //Notification Title (1st lign on android)

requete += AjBalise(“pMessage”,”0689939667″);               // Subject

requete += AjBalise(“pText”,”The text for clipboard”); // Textfor the clipboard

requete += AjBalise(“pPost”,”Sender”);                              // Device sending the notification

requete += “</soap:Body></soap:Envelope>”;

SendHttp(requete,”Put_Notification_Info”,CallBackReponse) // Send XML request and Service name to contact

}

// Prepares data to send SOAP CallBridgeProApi/Put_Notification_Agenda

function Put_Notification_Agenda() {

var requete;

requete=”<soap:Envelope xmlns:soap=\”http://schemas.xmlsoap.org/soap/envelope/\”     xmlns:xsi=\”http://www.w3.org/1999/XMLSchema-instance\” xmlns:xsd=\”http://www.w3.org/1999/XMLSchema\”><soap:Body>”;

requete += AjBalise(“pLogin”,”myLogin”);                           // Account Login

requete += AjBalise(“pPass”,”myPassword”);       // Account Password

requete += AjBalise(“pImmediate”,”1″);                             // 1 = Mise en presse papier    0 =     display only

requete += AjBalise(“pDateTime”,TheDateTime() );            // Return as :YYYMMDDhhmmss  Ex: 20170120093425 s

requete += AjBalise(“pRecipients”,”Patrick S7″); // Name/Nick of the smartphone

requete += AjBalise(“pTitle”,”CallBridgePro”);    // Notification Title (1st lign on android)

requete += AjBalise(“pMessage”,”Appointment topic”);// Event subject

requete += AjBalise(“pDateFrom”,”20170122″); // date from  (YYYYMMDD)

requete += AjBalise(“pTimeFrom”,”1530″);         // hour from (hhmm)

requete += AjBalise(“pDateTo”,”20170122″);     // date to     (YYYYMMDD)

requete += AjBalise(“pTimeTo”,”1800″);                             // hour to (hhmm)

requete += AjBalise(“pAllDay”,”0″);                     // 1 if All Day

requete += AjBalise(“pPlace”,”221b Baker St.,NW1 6XE LONDON”);// Event’s address (as readable by Google Maps)

requete += AjBalise(“pText”,”The text to explain the action to be taken”);       // Text explaining the event/RDV

requete += AjBalise(“pReminder”,”1″);                               // for Android smartphones only :    Number of minutes  for the reminder (60 = 1 hour)

requete += AjBalise(“pGuests”,””);                      // Not used

requete += AjBalise(“pPost”,”Sender”);                              // Device sending the notification

requete += “</soap:Body></soap:Envelope>”;

SendHttp(requete,”Put_Notification_Agenda”,CallBackReponse)       // Send XML request and Service name to contact

}

 

// Prepares data to send SOAP CallBridgeProApi/Put_Notification_Contact

function Put_Notification_Contact() {

var requete;

requete=”<soap:Envelope xmlns:soap=\”http://schemas.xmlsoap.org/soap/envelope/\” xmlns:xsi=\”http://www.w3.org/1999/XMLSchema-instance\” xmlns:xsd=\”http://www.w3.org/1999/XMLSchema\”><soap:Body>”;

requete += AjBalise(“pLogin”,”myLogin”);                                          // Account Login

requete += AjBalise(“pPass”,”myPassword”);                       // Account Password

requete += AjBalise(“pImmediate”,”0″);                             // 1 = ajout immédiat dans les Contacts 0 = display only

requete += AjBalise(“pDateTime”,TheDateTime() );                            // Return as :YYYMMDDhhmmss  Ex: 20170120093425 s

requete += AjBalise(“pRecipients”,”Patrick S7″);                // Name/Nick of the smartphone

requete += AjBalise(“pTitle”,”CallBridgePro”);                    // Notification Title (1st lign on android)

requete += AjBalise(“pLastName”,”Kenedy”);                     // Contact Name

requete += AjBalise(“pFirstName”,”William”);                    // Contact First Name

requete += AjBalise(“pSociety”,”McLeed”);                        // Company Name

requete += AjBalise(“pAddress”,”221B Baker Street”);        // Address (Maps formatted) : N° and street

requete += AjBalise(“pZip”,”NW1 6XE”);                                             // Zip Code

requete += AjBalise(“pCity”,”LONDON”);                                            // City

requete += AjBalise(“pCountry”,”ENGLAND”);                     // Country or state, Country

requete += AjBalise(“pTelephone”,”00442079358866″);     // Phone N° (use ’00’ for international)

requete += AjBalise(“pCellphone”,”0033623631148″);        // Mobile Phone N° (use ’00’ for international)

requete += AjBalise(“pEmail”,”[email protected]”);                         // Contact’s Email

requete += AjBalise(“pWeb”,”www.mcleed.fr”);                 // Website

requete += AjBalise(“pPost”,”Sender”);                                              // Device sending the notification

requete += “</soap:Body></soap:Envelope>”;

SendHttp(requete,”Put_Notification_Contact”,CallBackReponse)      // Send XML request and Service name to contact

}

 

 

 

// Prepares data to send SOAP CallBridgeProApi/Put_Notification_Map

function Put_Notification_Map() {

var requete;

requete=”<soap:Envelope xmlns:soap=\”http://schemas.xmlsoap.org/soap/envelope/\”     xmlns:xsi=\”http://www.w3.org/1999/XMLSchema-instance\” xmlns:xsd=\”http://www.w3.org/1999/XMLSchema\”><soap:Body>”;

requete += AjBalise(“pLogin”,”myLogin”);                           // Account Login

requete += AjBalise(“pPass”,”myPassword”);       // Account Password

requete += AjBalise(“pImmediate”,”0″);                             // 1 = Affichage immédiat par Maps (Plan)    0 = display only

requete += AjBalise(“pDateTime”,TheDateTime() );            // Return as :YYYMMDDhhmmss  Ex: 20170120093425 s

requete += AjBalise(“pRecipients”,”Patrick S7″); // Name/Nick of the smartphone

requete += AjBalise(“pTitle”,”CallBridgePro”);    // Notification Title (1st lign on android)

requete += AjBalise(“pMessage”,””);                   // Subject

requete += AjBalise(“pAddress”,”150 rue Gallieni”);           // Address (Maps formatted) : N° and street

requete += AjBalise(“pZip”,”92100″);                  // Zip Code

requete += AjBalise(“pCity”,”Boulogne-billancourt”);         // City

requete += AjBalise(“pCountry”,”France”);          // Country or State, Country

requete += AjBalise(“pLongitude”,”2.2354263″);               // Longitude GPS : of the address

requete += AjBalise(“pLatitude”,”48.8360609″); // Latitude GPS : of the address

requete += AjBalise(“pPost”,”Sender”);                              // Device sending the notification

requete += “</soap:Body></soap:Envelope>”;

SendHttp(requete,”Put_Notification_Map”, CallBackReponse)          // Send XML request and Service name to contact

}

 

 

 

// Send Request to CallBridgeProApi

function SendHttp(pRequete,pService,pCallBack) {

var params = ‘xml=’+pRequete+’&action=’+”urn:CallBridgeProApi/”+pService;

var xmlhttp;

xmlhttp = new XMLHttpRequest();

xmlhttp.open(“POST”,”https://www.mcleed.net/CallBridgeProApi_WEB/awws/CallBridgeProApi.awws”,true);

xmlhttp.setRequestHeader(“Content-type”,”application/x-www-form-urlencoded; charset=UTF-8″);

xmlhttp.setRequestHeader(“Content-length”,params.length);

xmlhttp.setRequestHeader(“Connection”,”close”);

xmlhttp.onreadystatechange = function() {

if (xmlhttp.readyState==4 && (xmlhttp.status==200)) {

var lRetour = xmlhttp.responseText;

var tChaine = lRetour.split(“Result>”);

var tReponse = tChaine[1].split(“</”);

if (pCallBack) { pCallBack(tReponse[0]) };

}               }

xmlhttp.send(params);

}

 

// Return date local time as  YYYYMMDDhhmmss

function TheDateTime(){

var ladate=new Date();

var Y=ladate.getFullYear();

var M=ladate.getMonth()+1;

if (M<10) {M = “0” + M};

var D=ladate.getDate();

if (D<10) {D = “0” + D};

 

var h=ladate.getHours();

if (h<10) {h = “0” + h};

var m=ladate.getMinutes();

if (m<10) {m = “0” + m};

var s=ladate.getSeconds();

if (s<10) {s = “0” + s};

return Y+””+M+””+D+””+h+””+m+””+s;

}

 

 

// return beacon and value as : <Balise  xsd:type=”xsd:string”>Value</Balise>

function AjBalise(pBalise,pValeur) {

var sRetour = “<“+pBalise+”  xsd:type=\”xsd:string\” >”+StringtoUTF8(pValeur)+”</”+pBalise+”>”

return sRetour

}

Empty section. Edit page to add content here.