4.0.8 • Published 11 months ago

fritz-callmonitor v4.0.8

Weekly downloads
8
License
LGPL-3.0
Repository
github
Last release
11 months ago

fritz-callmonitor Build Status npm version Dependency Status License

Provides a Node.js wrapper for the call monitor api of the AVM Fritz!Box. Written in TypeScript.

Installation

npm install fritz-callmonitor

TypeScript Usage

You need TypeScript 2. Just install the NPM package and you're ready to go!

Enabling the API

The network API is disabled by default. To use this, call #96*5* on a phone which is managed by the FRITZ!Box.

Sample

"use strict";

import { CallMonitor, EventKind } from "fritz-callmonitor";

const cm = new CallMonitor("192.168.178.1", 1012);

cm.on("ring", rr => {
	console.dir(rr);
	console.log(`${rr.caller} calling...`);
});

cm.on("call", rr => console.dir(rr));
cm.on("pickup", rr => console.dir(rr));
cm.on("hangup", rr => console.dir(rr));

cm.on("phone", evt => {
    // gets called on every phone event
    switch(evt.kind) {
        case EventKind.Ring:
        case EventKind.Call:
            console.log(`${evt.caller} -> ${evt.callee}`);
            break;
    }
});

cm.on("close", () => console.log("Connection closed."));
cm.on("connect", () => console.log("Connected to device."));
cm.on("error", err => console.dir(err));

cm.connect();
4.0.8

11 months ago

4.0.7

12 months ago

4.0.6

1 year ago

4.0.1

3 years ago

4.0.0

3 years ago

3.1.9

4 years ago

3.1.8

4 years ago

3.1.7

4 years ago

3.1.6

4 years ago

3.1.5

5 years ago

3.1.4

5 years ago

3.1.3

5 years ago

3.1.2

5 years ago

3.1.1

6 years ago

3.0.2

7 years ago

3.0.0

8 years ago

2.0.0

8 years ago

0.2.1

9 years ago

0.1.1

10 years ago

0.1.0

10 years ago