Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This app is currently discontinued.

...

Creating the iframe

Code Block
languagehtml
<iframe 
  src="https://yourInstance.ucontactcloud.com/uphone/" 
  scrolling="no" 
  allow="camera;microphone">
</iframe>

Event notifications

Messages will be sent to the parent page when these events occur:

For subscribing uPhone events, window proxy API will have to be used.

This is an example of how to subscribe to events from the page that has the iframe.

Code Block
languagejs
window.addEventListener('message', e =>{
	console.log(e.data.action);
	console.log(e.data.params.number);
});
  • Making a call

  • Receiving a call

  • Sent dispositions

The information will be received in the following format

Make call

Code Block
languagejson
{
  "action":"makecall",
  "params":{
	"number":1234
	"campaign":"campaign->"
  }
}

Receiving a call

Code Block
{
  "action":"gettingcall",
  "params":{
    "clientId":1234
    "campaign":"campaign->"
  }
}

Sent dispositions

Code Block
languagejson
{
  "action": "sentDispositions",
  "params":
  "campaign": "Incoming<-",
  "clientId": "9999",
  "date": "2022-6-17 12:51:59",
  "direction": "incoming",
  "dispositions": {
    "action": "NOACTION"
    "comment": "comment"
    "value1": "Venta"
    "value2": ""
    "value3": ""
  },
  "duration": "00:06",
  "guid": "6353dfa0-2a90-4d57-b145-1c3826cde381"
}