Phone API Reference - Core - exports
Desk Phone API features described in this section are deprecated and supported only on the following models: D40, d45, d50, d60, d62, d65, d70
exports
Object used to provide functions, variables, and properties for use by another script. Use require in another script to obtain the exports in the current script.
Exports will not work if you set exports = to an object (e.g., {"key" : "value" }). You must set properties of the exports object as can be seen in the example.
Require Extended Library:
exports.test = "test"; |
Examples
js example file with exports
var example2 = {};
example2.init = function () {
this.status = 'Status set by example2.init()';
};
example2.getStatus = function () {
return this.status;
};
example2.setStatus = function (param) {
this.status = param;
};
example2.init();
exports.getStatus = example2.getStatus.bind(example2);
exports.setStatus = example2.setStatus.bind(example2); |
, multiple selections available,
Related content
Phones - XML Configuration 4.25.1+
Phones - XML Configuration 4.25.1+
More like this
Phones - Action URL Variables
Phones - Action URL Variables
More like this
Open Source - D80 phone able to steal server phone assignment
Open Source - D80 phone able to steal server phone assignment
More like this
Switchvox -Understanding Sangoma Phone Assignment Options
Switchvox -Understanding Sangoma Phone Assignment Options
More like this
SIP Trunking and Fax - Sangoma PJSIP Configuration module for Asterisk
SIP Trunking and Fax - Sangoma PJSIP Configuration module for Asterisk
More like this
Sangoma Phone Desktop Client Emergency Location
Sangoma Phone Desktop Client Emergency Location
More like this