Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including teardown-js with all npm packages installed. Try it out:

var teardownJs = require("teardown-js")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

teardown-js v0.0.3

SIP Teardown Generator

Dependency Status

teardown-js

Generates a SIP BYE for Session Teardown provided key parameters

Install:

npm install teardown-js

Example Usage:

var mybye = teardownJS.teardown('toUser','mydomain:5060','127.0.0.1','c7a0cha91z','myfromtag','mytotag','"my user"','"my target"');

Example Result

BYE sip:toUser@mydomain:5060 SIP/2.0
Via: SIP/2.0/UDP mydomain:5060
From: "some user" <sip:toUser@mydomain:5060>;tag=xxfrom
To: "some target" <sip:toUser@mydomain:5060>;tag=xxto
Call-ID: c7a0cha9
User-Agent: Teardown-JS
Max-Forwards: 15
CSeq: 2017 BYE
Route: <sip:mydomain:5060;ftag=xxfrom;lr=on>
Content-Length: 0

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free