This API is used for communication with call-list apps.
The client consumeApi function is used to access the Api:
var calllistApi = start.consumeApi("com.innovaphone.calllist");
calllistApi.onmessage.attach(onmessage); // onmessage is called for responses from the API
Used to declare that it is interested in call list entries. The Call List App will provide the requested amount of available call list entries. The App wil also provide new entries at runtime.
string count | Number of currently available entries that are to be returned immediately. Up to 100 entries are possible. |
calllistApi.send({ "mt": "Subscribe", "count": 20 });
The result message for the Subscribe request.
array entries | Array of call list entries. |
{
"mt": "Update",
"entries": [
{
"cdr": 21173,
"sip": "tac",
"id": "c06ab5ee-cc1c-5c01-8a68-009033420759",
"dir": "o",
"node": "root",
"phys": "",
"cause": 0,
"time": 1545391345000,
"alert-duration": 12,
"call-duration": 0,
"conn-duration": 0,
"billing-duration": 0,
"call": "int",
"remote": {
"number": "40",
"sip": "rh",
"dn": "Ralf Hütter"
},
"status": "al"
},
{
"cdr": 20713,
"sip": "tac",
"id": "2d61b691-9c1b-5c01-ed7a-009033420759",
"dir": "i",
"node": "root",
"phys": "berlin",
"cause": 0,
"time": 1545313426000,
"alert-duration": 7,
"call-duration": 2814,
"conn-duration": 2814,
"billing-duration": 0,
"call": "int",
"remote": {
"number": "683",
"sip": "fs",
"dn": "Florian Schneider"
},
"status": "co"
},
]
}
The Call List App sends this message to subscriber when ever the call list (database) have been cleared.
string count | Number of currently available entries that are to be returned immediately. |
calllistApi.send({ "mt": "Clear" });
Used to get the complete callflow of a call.
string id | The cdr of the call entry. |
calllistApi.send({ "mt": "GetCallFlow", "id": 12 });
Response message to GetCallFlow containing the callflow information of an entry.
string id | The cdr of the call entry. |
string flow | The callflow of the call entry. |
{"mt":"GetCallFlowResult","id":12,"flow":[
{"caller":"ep2","ep1_number":"302","ep1_sip":"waiting2","ep1_dn":"Waiting2","ep2_number":"201","ep2_sip":"endeavour","ep2_dn":"Endeavour","status":"al"},
{"ep1_number":"200","ep1_sip":"atlantis","status":"co","type":"cf","entry":"true"}
],"src":"src0"}