Skip to content

General purpose SIP library for NodeJS and Web browsers.

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE.md
GPL-3.0
COPYING
LGPL-3.0
COPYING.LESSER
Notifications You must be signed in to change notification settings

gmazovec/sipcore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

sipcore.js

General purpose SIP library for JavaScript.

Installation

npm install sipcore

API

SIP.format (msg, compact)
SIP.parse (text)
SIP.parseUri (text)
SIP.formatUri (uri)
SIP.isMessage (obj)

SIP.createMessage (obj)
Message.getHeader (name, parse, pos)
Message.setHeader (name, value, pos)
Message.toResponse (status, reason)
Message.toRequest (method, uri)
Message.copy ()
Message.format (compact)

SIP.createProtocol([constructor], [options])

SIP.createTransport ()
Transport.register (protocol, [port], [address])
Transport.listen ([cb])
Transport.isListening ([protocol])
Transport.send (msg, [address], [port], [protocol], [cb])
Transport.close ()
Event: Transport.on('message', function (msg))
Event: Transport.on('listening', function (listenState))

SIP.createTransaction (transport, [msg])
Transaction.state
Transaction.timeout
Transaction.error
Transaction.send (msg, [addr], [port], [protocol], [cb])
Transaction.send (msg, [cb])
Transaction.on('message', function (message))
Transaction.on('state', function (state)
Transaction.on('timeout', function ())

Example

var sip = require('sipcore');
var protocol = sip.createProtocol();
var transport = sip.createTransport();

transport.register(protocol);
transport.listen(function (listenState) {
    console.log('* HEAP listening...', listenState.heap ? 'ok' : 'failed');
});

transport.on('message', function (msg) {
    console.log('-- new SIP message');
    console.log(msg.format());
});

About

General purpose SIP library for NodeJS and Web browsers.

Topics

Resources

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE.md
GPL-3.0
COPYING
LGPL-3.0
COPYING.LESSER

Stars

Watchers

Forks

Packages

No packages published