Node.js Javascript

From Yate Documentation
Revision as of 04:02, 14 January 2018 by Vladimir Latyshev (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.

Installation

Basics of Node.js are outside the scope of this document.

npm install yate-extmodule

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.

Documentation

See full documentation here: https://www.npmjs.com/package/yate-extmodule