Node.js Javascript
From Yate Documentation
(Difference between revisions)
(Created page with "This library is intended for use with [https://nodejs.org/ Node.js] Javascript runtime environment. It implements External Module protocol and is suitable for developing e...") |
|||
Line 1: | Line 1: | ||
This library is intended for use with [https://nodejs.org/ Node.js] Javascript runtime environment. It implements [[External Module]] protocol and is suitable for developing external Yate scripts. | This library is intended for use with [https://nodejs.org/ Node.js] Javascript runtime environment. It implements [[External Module]] protocol and is suitable for developing external Yate scripts. | ||
− | |||
− | + | == Installation == | |
− | + | ||
− | == | + | |
Basics of Node.js are outside the scope of this document. | Basics of Node.js are outside the scope of this document. | ||
− | + | npm install yate-extmodule | |
− | + | ||
− | npm install | + | |
− | == | + | ==Usage== |
− | + | ||
− | + | ===Example=== | |
− | + | const extmodule = require('yate-extmodule') | |
− | + | let connection = extmodule.connect({host: '127.0.0.1', port: 5040}, () => { | |
− | + | console.log('connected') | |
− | + | }) | |
− | + | connection.watch('engine.timer', (message) => { | |
− | + | console.log('tick', message.time) | |
+ | }) | ||
− | + | More examples in 'examples' directory of this module. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | More examples | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ===Documentation=== | |
+ | See full documentation here: https://www.npmjs.com/package/yate-extmodule |
Latest revision as of 06:02, 14 January 2018
This library is intended for use with Node.js Javascript runtime environment. It implements External Module protocol and is suitable for developing external Yate scripts.
Contents |
[edit] Installation
Basics of Node.js are outside the scope of this document.
npm install yate-extmodule
[edit] Usage
[edit] Example
const extmodule = require('yate-extmodule') let connection = extmodule.connect({host: '127.0.0.1', port: 5040}, () => { console.log('connected') }) connection.watch('engine.timer', (message) => { console.log('tick', message.time) })
More examples in 'examples' directory of this module.
[edit] Documentation
See full documentation here: https://www.npmjs.com/package/yate-extmodule