# baresip-wrapper

> A NodeJS wrapper for BareSIP utility

Latest version **1.0.10** (published 2021-04-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install baresip-wrapper
pnpm add baresip-wrapper
yarn add baresip-wrapper
bun add baresip-wrapper
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.10 |
| Published | 2021-04-07 |
| First published | 2019-04-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=5 |
| Dependencies | 3 |
| Unpacked size | 8.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Alexander Elgin |
| Maintainers | elgin |
| Keywords | baresip |

## Links

- npm: https://www.npmjs.com/package/baresip-wrapper
- Repository: https://github.com/alexander-elgin/baresip-wrapper
- Homepage: https://github.com/alexander-elgin/baresip-wrapper#readme
- Issues: https://github.com/alexander-elgin/baresip-wrapper/issues
- npm.io page: https://npm.io/package/baresip-wrapper

## Dependencies (3)

- [tree-kill](https://npm.io/package/tree-kill.md) ^1.2.2
- [child_process](https://npm.io/package/child_process.md) ^1.0.2
- [os-dependent-path-delimiter](https://npm.io/package/os-dependent-path-delimiter.md) ^1.0.1

## Recent versions

- 1.0.10 (latest) — 2021-04-07
- 1.0.9 — 2020-12-24
- 1.0.8 — 2020-03-19
- 1.0.7 — 2019-06-12
- 1.0.6 — 2019-04-26
- 1.0.5 — 2019-04-25
- 1.0.4 — 2019-04-23
- 1.0.3 — 2019-04-19
- 1.0.2 — 2019-04-18
- 1.0.1 — 2019-04-18
- 1.0.0 — 2019-04-18

## README

# BareSIP NodeJS Wrapper

## Requirements

httpd module has to be uncommented in the BareSIP config

## Install
```sh
$ npm install baresip-wrapper
```

## Usage
```javascript
import Baresip from 'baresip-wrapper';

const baresip = new Baresip('command to start baresip');
baresip.connect();
```

## Methods

* accept () *to accept an incoming call*
* dial (phoneNumber) *to dial the phone number*
* hangUp () *to hang up*
* kill () *to kill the spawned process.*
* on (event, callback) *to set event handlers*
* reload () *to re-create the spawned process (it is required e.g. once the accounts file has been changed)* 
* toggleCallMuted ()  *to mute or unmute your microphone for the current call*

## Events

* **ready** *BareSIP has been initialized*
* **serverConnected** *BareSIP has been connected to the SIP server provider*
* **callEstablished** *your outgoing call has been accepted by the other side*
* **callReceived** *an incoming call has been received*
* **hangUp** *the phone has been hanged up on the other side*

phone number is provided as an argument for the following event handlers

* hangUp
* callReceived

---
_Source: https://npm.io/package/baresip-wrapper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
