Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 19 Next »

Preparing and initializing of separate CLI library, parameter <pbx_name> is the name of your daktela pbx.

<script type="text/javascript">
var daktelaCli = document.createElement('script');
daktelaCli.src = 'https://<pbx_name>';
daktelaCli.type = 'text/javascript'; daktelaCli.charset = 'utf-8'; daktelaCli.async = true;
daktelaCli.onload = function() {
	var cli = new daktelaCliClass();

Most of the following functions return data using the callback return function, it has two parameters, namely "data" where newly retrieved data and "error" are the possible error state.

var callback = function(data, error) {

Loading queue settings and status

The retrieved queue data is returned in the callback function and is temporarily stored in localStorage with which it is advisable to work with the "helpers" object of our library.

cli.getQueue(server, queue, callback); // server - absolute url of daktela pbx, queue - object of queue containing at least values "name" and "accessToken"
// for exmaple
cli.getQueue('https://<pbx_name>', {name:'200',accessToken:'sa67fas84fsa6df4sa68d7'}, callback);

  • No labels