GithubHelp home page GithubHelp logo

spicyramen / sip-websocket Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kyuucr/sip-websocket

0.0 2.0 0.0 445 KB

Session Initiation Protocol for node.js

License: MIT License

JavaScript 84.23% CoffeeScript 15.77%

sip-websocket's Introduction

README

This is a simple SIP implementation with WebSocket as available transport. This project is a fork from sip.js

Installation

  1. Clone this project. git clone git://github.com/bokuwakyuu/sip-websocket.git
  2. Install dependencies. npm install

Usage

By putting http server to initialization option will enable sip server to listen to websocket request on port defined by http server.

var http = require('http');
var sip = require('sip-websocket');

var server = http.createServer(function(request, response) {
    console.log((new Date()) + ' Received request for ' + request.url);
    response.writeHead(404);
    response.end();
});

server.listen(8080, function() {
    console.log((new Date()) + ' Server is listening on port 8080');
});

sip.start({ websocket : server }, function(request) {});

You could also use express framework.

var express = require('express');
var app = express.createServer();

app.listen(8080, , function() {
    console.log((new Date()) + ' Server is listening on port 8080');
});

sip.start({ websocket : server }, function(request) {});

Thanks to

  • kirm for creating sip.js
  • Worlize for creating WebSocket-Node

License

See LICENSE

sip-websocket's People

Contributors

kirm avatar

Watchers

James Cloos avatar Gonzalo Gasca Meza avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.