...
Receiving a call
Code Block |
---|
|
{
"action":"gettingcall",
"params":{
"clientId":1234
"campaign":"campaign->"
}
} |
...
Code Block |
---|
|
{
"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"
} |
Execute actions
You can execute actions on uPhone by using the window proxy API.
Code Block |
---|
|
//Get the iframe window
var w = document.getElementsByTagName('iframe')[0].contentWindow;
const call = {
action: "makecall",
params:{
number:1113,
campaign: "campaign->"
}
};
//Send message
w.postMessage(call, '*'); |
Here is an example of how to obtain the iframe window and sending to the uPhone.