GithubHelp home page GithubHelp logo

pwfoo / html5-sip-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ernaniaz/html5-sip-client

0.0 2.0 1.0 2.02 MB

HTML5-sip-client is a Javascript based SIP client that uses WebRTC and WebSockets to connect to your SIP server. This project was originally based on ctxSip.

Home Page: https://ernaniaz.github.io/HTML5-sip-client/

License: MIT License

CSS 0.19% JavaScript 99.30% HTML 0.51%

html5-sip-client's Introduction

HTML5-sip-client

GitHub release GitHub license

A Javascript SIP client based on SIP.js.

HTML5-sip-client is a Javascript based SIP client that uses WebRTC and WebSockets to connect to your SIP server. The UI is designed to be launched as a popup from within your application. This project was originally based on ctxSip, got some implementations from ha36d fork and many other implementations made, like Brazilian Portuguese internationalization, implementation of DTMF tones and more.

Features

  • Audio only, Hold / Resume, Mute, multiple call support.
  • Auto Answer.
  • Multi language.
  • No plugins required, Works with WebSocket / WebRTC enabled browsers. (Firefox, Google Chrome, Safari, Edge and other modern browsers).
  • Call log is saved to localStorage.
  • Intuitive interface makes it easy for users.
  • Easy to configure and integrate into your project.
  • MIT licensed.

SSL connections for are required for this to work!

Dependencies

Configuring

The webphone application has some hardcoded configurations you'll probably need to change. At js/app.js will find at line 44 the websocket URI, that point to the same server that provided the HTML webphone app page, connecting at port 443 using protocol WSS (Secure WebSocket) and at path /ws. You can change it to point to your SIP server WebSocket port to test. I didn't recomend you to leave your SIP server open to the network, but use a HTTP proxy to provide access only to the this resource at /ws. If you use NGiNX (and Asterisk server, for example), you can use the following NGiNX server configuration:

# Asterisk websocket connection
location /ws {
    proxy_pass http://127.0.0.1:8088/ws;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_read_timeout 86400s;
}

Also, the username used to authenticate at your SIP server was prepend to 'ws' string (js/app.js at line 33). Change it to reflect your server configuration.

Test installation

To test this software, you can easily configure your system, installing a clean, minimal, CentOS 7 OS. You'll need to install Asterisk and NGiNX. You can do it installing VoIPDomain Asterisk repo, with:

curl -s https://packagecloud.io/install/repositories/voipdomain/production/script.rpm.sh | sudo bash

After configure the repository, install the basic packages with:

yum install -y asterisk asterisk-opus asterisk-sip asterisk-pjsip nginx

You'll need to create the Asterisk SSL configuration files, to do it, use:

mkdir /etc/asterisk/keys
ast_tls_cert -C localhost.localdomain -O "Webphone Test" -d /etc/asterisk/keys

And to create the NGiNX self-signed certificate files, use:

mkdir /etc/nginx/ssl
openssl req -new -x509 -sha256 -newkey rsa:2048 -days 365 -nodes -out /etc/nginx/ssl/webphone.localnet.pem -keyout /etc/nginx/ssl/webphone.localnet.key
chmod 600 /etc/nginx/ssl/webphone.localnet.key
openssl req -new -sha256 -key /etc/nginx/ssl/webphone.localnet.key -out /etc/nginx/ssl/webphone.localnet.csr

Copy configuration files from configs/{asterisk,nginx} to your installation, deploy this repo to /var/www/html, start the NGiNX and Asterisk and access your machine using a modern web browser.

Demo

Clone the repository and use the following command in the directory

python -m SimpleHTTPServer 8000

License

MIT License.

html5-sip-client's People

Contributors

ernaniaz avatar bmac901 avatar ludovic-gasc avatar mancy avatar bat-o-matic avatar

Watchers

James Cloos avatar  avatar

Forkers

explora-dev

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.