JsSIP-0.6.34/0000755000175000017500000000000012544264670012020 5ustar danieldanielJsSIP-0.6.34/.gitignore0000644000175000017500000000005012544264670014003 0ustar danieldanielnode_modules/ npm-debug.log .npmignore JsSIP-0.6.34/.jshintignore0000644000175000017500000000001712544264670014522 0ustar danieldaniellib/Grammar.js JsSIP-0.6.34/.jshintrc0000644000175000017500000001321612544264670013650 0ustar danieldaniel{ // JSHint Default Configuration File (as on JSHint website) // See http://jshint.com/docs/ for more details "maxerr" : 50, // {int} Maximum error before stopping // Enforcing "bitwise" : false, // true: Prohibit bitwise operators (&, |, ^, etc.) "camelcase" : false, // true: Identifiers must be in camelCase "curly" : true, // true: Require {} for every new block or scope "eqeqeq" : true, // true: Require triple equals (===) for comparison "freeze" : true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc. "forin" : false, // true: Require filtering for..in loops with obj.hasOwnProperty() "immed" : true, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());` "latedef" : "nofunc", // true: Require variables/functions to be defined before being used "newcap" : true, // true: Require capitalization of all constructor functions e.g. `new F()` "noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee` "noempty" : true, // true: Prohibit use of empty blocks "nonbsp" : true, // true: Prohibit "non-breaking whitespace" characters. "nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment) "plusplus" : false, // true: Prohibit use of `++` & `--` "quotmark" : "single", // Quotation mark consistency: // false : do nothing (default) // true : ensure whatever is used is consistent // "single" : require single quotes // "double" : require double quotes "undef" : true, // true: Require all non-global variables to be declared (prevents global leaks) "unused" : true, // true: Require all defined variables be used "strict" : false, // true: Requires all functions run in ES5 Strict Mode "maxparams" : false, // {int} Max number of formal params allowed per function "maxdepth" : false, // {int} Max depth of nested blocks (within functions) "maxstatements" : false, // {int} Max number statements per function "maxcomplexity" : false, // {int} Max cyclomatic complexity per function "maxlen" : false, // {int} Max number of characters per line // Relaxing "asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons) "boss" : false, // true: Tolerate assignments where comparisons would be expected "debug" : false, // true: Allow debugger statements e.g. browser breakpoints. "eqnull" : false, // true: Tolerate use of `== null` "es5" : false, // true: Allow ES5 syntax (ex: getters and setters) "esnext" : false, // true: Allow ES.next (ES6) syntax (ex: `const`) "moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features) // (ex: `for each`, multiple try/catch, function expression…) "evil" : false, // true: Tolerate use of `eval` and `new Function()` "expr" : false, // true: Tolerate `ExpressionStatement` as Programs "funcscope" : false, // true: Tolerate defining variables inside control statements "globalstrict" : false, // true: Allow global "use strict" (also enables 'strict') "iterator" : false, // true: Tolerate using the `__iterator__` property "lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block "laxbreak" : false, // true: Tolerate possibly unsafe line breakings "laxcomma" : false, // true: Tolerate comma-first style coding "loopfunc" : false, // true: Tolerate functions being defined in loops "multistr" : false, // true: Tolerate multi-line strings "noyield" : false, // true: Tolerate generator functions with no yield statement in them. "notypeof" : false, // true: Tolerate invalid typeof operator values "proto" : false, // true: Tolerate using the `__proto__` property "scripturl" : false, // true: Tolerate script-targeted URLs "shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;` "sub" : true, // true: Tolerate using `[]` notation when it can still be expressed in dot notation "supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;` "validthis" : false, // true: Tolerate using this in a non-constructor function // Environments "browser" : true, // Web Browser (window, document, etc) "browserify" : true, // Browserify (node.js code in the browser) "couch" : false, // CouchDB "devel" : true, // Development/debugging (alert, confirm, etc) "dojo" : false, // Dojo Toolkit "jasmine" : false, // Jasmine "jquery" : false, // jQuery "mocha" : false, // Mocha "mootools" : false, // MooTools "node" : true, // Node.js "nonstandard" : true, // Widely adopted globals (escape, unescape, etc) "prototypejs" : false, // Prototype and Scriptaculous "qunit" : false, // QUnit "rhino" : false, // Rhino "shelljs" : false, // ShellJS "worker" : false, // Web Workers "wsh" : false, // Windows Scripting Host "yui" : false, // Yahoo User Interface // Custom Globals "globals" : {} // additional predefined global variables } JsSIP-0.6.34/.travis.yml0000644000175000017500000000055012544264670014131 0ustar danieldaniellanguage: node_js node_js: - 0.10 before_install: - npm install -g npm@latest - npm install -g git+https://github.com/gulpjs/gulp.git#4.0 install: npm install before_script: gulp devel dist notifications: email: recipients: - jmillan@aliax.net - ibc@aliax.net - saghul@gmail.com on_success: change on_failure: always JsSIP-0.6.34/AUTHORS.md0000644000175000017500000000057212544264670013473 0ustar danieldaniel# AUTHORS ### José Luis Millán * Main author. Core Designer and Developer. * (Github [@jmillan](https://github.com/jmillan)) ### Iñaki Baz Castillo * Core Designer and Developer. * (Github [@ibc](https://github.com/ibc)) ### Saúl Ibarra Corretgé * Core Designer. * (Github [@saghul](https://github.com/saghul)) JsSIP-0.6.34/BUILDING.md0000644000175000017500000000233412544264670013541 0ustar danieldaniel## What you need to build JsSIP You just need to have [Node.js](http://nodejs.org/) and [Git](http://git-scm.com/). ### Node.js * [Install Node.js via package manager](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager) * [Install Node.js from sources](http://nodejs.org) ### Git * [Install Git](http://git-scm.com/book/en/Getting-Started-Installing-Git) ## How to build JsSIP Clone a copy of the main JsSIP git repository by running: ```bash $ git clone https://github.com/versatica/JsSIP.git JsSIP $ cd JsSIP ``` Install `gulp-cli` 4.0 globally (which provides the `gulp` command): ```bash $ npm install -g gulpjs/gulp-cli#4.0 ``` (you can also use the local `gulp` executable located in `node_modules/.bin/gulp`). Install the Node.js dependencies: ```bash $ npm install ``` Finally, run `gulp dist` (or just `gulp`) to get: * `dist/jssip-X.Y.Z.js`: uncompressed version of JsSIP. * `dist/jssip-X.Y.Z.min.js`: compressed version of JsSIP. * `dist/jssip.js`: copy of the compressed file. ```bash $ gulp dist ``` ## Test units ```bash $ gulp test ``` ## Development ### Changes in JsSIP Grammar If you modify `lib/Grammar.pegjs` then you need to recompile it: ```bash $ gulp devel $ gulp dist ``` JsSIP-0.6.34/CHANGELOG.md0000644000175000017500000005525612544264670013646 0ustar danieldanielCHANGELOG ========= Version 0.6.33 (released in 2015-06-17) --------------------------------------- * Don't keep URI params&headers in the registrar server URI. * `RTCSession` emits `peerconnection` for outgoing calls once the `RTCPeerConnection` is created and before the SDP offer is generated (good chance to create a `RTCDataChannel` without requiring renegotiation). Version 0.6.32 (released in 2015-06-16) --------------------------------------- * Add callback to `update` and `reinvite` events. Version 0.6.31 (released in 2015-06-16) --------------------------------------- * Added a parser for Reason header. Version 0.6.30 (released in 2015-06-09) --------------------------------------- * Fix array iteration in `URI#toString()` to avoid Array prototype mangling by devil libraries such as Ember. Version 0.6.29 (released in 2015-06-06) --------------------------------------- * Auto-register on transport connection before emitting the event. Version 0.6.28 (released in 2015-06-02) --------------------------------------- * Update "rtcninja" dependencie. Version 0.6.27 (released in 2015-06-02) --------------------------------------- * Don't terminate SIP dialog if processing of 183 with SDP fails. * Update dependencies. Version 0.6.26 (released in 2015-04-17) --------------------------------------- * Update "rtcninja" dependency. Version 0.6.25 (released in 2015-04-16) --------------------------------------- * Update "rtcninja" dependency. Version 0.6.24 (released in 2015-04-14) --------------------------------------- * RTCSession: Fix Invite Server transaction destruction. Version 0.6.23 (released in 2015-04-14) --------------------------------------- * RTCSession: Handle session timers before emitting "accepted". * Fix issue with latest version of browserify. Version 0.6.22 (released in 2015-04-13) --------------------------------------- * Fix double "disconnected" event in some cases. Version 0.6.21 (released in 2015-03-11) --------------------------------------- * Don't iterate arrays with (for...in) to avoid problems with evil JS libraries that add stuff into the Array prototype. Version 0.6.20 (released in 2015-03-09) --------------------------------------- * Be more flexible receiving DTMF INFO bodies. Version 0.6.19 (released in 2015-03-05) --------------------------------------- * Update dependencies. * Version 0.6.18 (released in 2015-02-09) -------------------------------------- * Terminate the call with a proper BYE/CANCEL/408/500 if request timeout, transport error or dialog error happens. * Fix "rtcninja" dependency problem. Version 0.6.17 (released in 2015-02-02) -------------------------------------- * `RTCSession`: Improve `isReadyToReOffer()`. Version 0.6.16 (released in 2015-02-02) -------------------------------------- * `RTCSession`: Avoid calling hold()/unhold/renegotiate() if an outgoing renegotiation is not yet finished (return false). * `RTCSession`: Add `options` and `done` arguments to hold()/unhold/renegotiate(). * `RTCSession`: New public method `isReadyToReOffer()`. Version 0.6.15 (released in 2015-01-31) -------------------------------------- * `RTCSession:` Emit `iceconnetionstatechange` event. * Update "rtcninja" dependency to 0.4.0. Version 0.6.14 (released in 2015-01-29) -------------------------------------- * `RTCSession:` Include initially given `rtcOfferConstraints` in `sendReinvite()` and `sendUpdate()`. Version 0.6.13 (released in 2015-01-29) -------------------------------------- * Properly keep mute local audio/video if remote is on hold, and keep it even if we re-offer. Also fix SDP direction attributes in re-offers according to current local and remote "hold" status. Version 0.6.12 (released in 2015-01-28) -------------------------------------- * Update "rtcninja" dependency to 0.3.3 (fix "RTCOfferOptions"). Version 0.6.11 (released in 2015-01-27) -------------------------------------- * Fix "Session-Expires" default value to 90 seconds. Version 0.6.10 (released in 2015-01-27) -------------------------------------- * Update "rtcninja" dependency to 0.3.2 (get the `rtcninja.canRenegotiate` attribute). Version 0.6.9 (released in 2015-01-27) -------------------------------------- * Don't reply 405 "Method Not Supported" to re-INVITE even if the UA's "newRTCSession" event is not set. * `RTCSession`: Allow extraHeaders in `renegotiate()`. Version 0.6.8 (released in 2015-01-26) -------------------------------------- * `RTCSession`: Don't ask for `getUserMedia()` in outgoing calls if `mediaConstraints` is `{audio:false, video:false}`. It is user's responsability to, in that case, provide `offerToReceiveAudio/Video` in `rtcOfferConstraints`. Version 0.6.7 (released in 2015-01-26) -------------------------------------- * ' UA.call()': Return the `RTCSession` instance. * ' UA.sendMessage()': Return the `Message` instance. Version 0.6.6 (released in 2015-01-24) -------------------------------------- * `RTCSession`: Don't process SDPs in retranmissions of 200 OK during reINVITE/UDATE. * `RTCSession`: Emit 'reinvite' when a reINVITE is received. * `RTCSession`: Emit 'update' when an UPDATE is received. Version 0.6.5 (released in 2015-01-20) -------------------------------------- * `RTCSession`: Don't override `this.data` on `answer()` (unless `options.data` is given). Version 0.6.4 (released in 2015-01-19) -------------------------------------- * `RTCSession#connect()`: Add `rtcAnswerContraints` options for later incoming reINVITE or UPDATE with SDP offer. * `RTCSession#answer()`: Add `rtcOfferConstraints` options for later incoming reINVITE without SDP offer. * `RTCSession#renegotiate()`: Add `rtcOfferConstraints` options for the UPDATE or reINVITE. * `RTCSession#answer()`: Remove audio or video from the given `getUserMedia` mediaConstraints if the incoming SDP has no audio/video sections. Version 0.6.3 (released in 2015-01-17) -------------------------------------- * Bug fix. Properly cancel when only '100 trying' has been received. Version 0.6.2 (released in 2015-01-16) -------------------------------------- * Bug fix: Do not set "Content-Type: application/sdp" in body-less UPDATE requests. Version 0.6.1 (released in 2015-01-16) -------------------------------------- * Support for [Session Timers](https://tools.ietf.org/html/rfc4028). Version 0.6.0 (released in 2015-01-13) -------------------------------------- * [debug](https://github.com/visionmedia/debug) module. * [rtcninja](https://github.com/ibc/rtcninja.js) module. * Can renegotiate an ongoing session by means of a re-INVITE or UPDATE method (useful if the local stream attached to the `RTCPeerConnection` has been modified). * Improved hold/unhold detection. * New API options for `UA#call()` and `RTCSession#answer()`. Version 0.5.0 (released in 2014-11-03) -------------------------------------- * JsSIP runs in Node! * The internal design of JsSIP has also been modified, becoming a real Node project in which the "browser version" (`jssip-0.5.0.js` or `jssip-0.5.0.min.js`) is generated with [browserify](http://browserify.org). This also means that the browser version can be loaded with AMD or CommonJS loaders. Version 0.4.3 (released in 2014-10-29) -------------------------------------- * [(3b1ee11)](https://github.com/versatica/JsSIP/commit/3b1ee11) Fix references to 'this'. Version 0.4.2 (released in 2014-10-24) -------------------------------------- * [(ca7702e)](https://github.com/versatica/JsSIP/commit/ca7702e) Fix #257. RTCMediaHandler: fire onIceCompleted() on next tick to avoid events race conditions in Firefox 33. Version 0.4.1 (released in 2014-10-21) -------------------------------------- This version is included into the [Bower](http://bower.io/) registry which means `$ bower install jssip`. Version 0.4.0 (released in 2014-10-21) -------------------------------------- * (http://jssip.net/documentation/0.4.x/api/session) Hold/Unhold implementation * (http://jssip.net/documentation/0.4.x/api/session) Mute/Unmute implementation * (http://jssip.net/documentation/0.4.x/api/ua_configuration_parameters/#instance_id) New 'instance_id' configuration parameter * (http://jssip.net/documentation/0.4.x/api/ua_configuration_parameters/#log) New 'log' configuration parameter * [(34b235c)](https://github.com/versatica/JsSIP/commit/34b235c) Fix #246. Increase the event emiter max listener number to 50 * [(9a1ebdf)](https://github.com/versatica/JsSIP/commit/9a1ebdf) Late SDP implementation. Handle SDP-less incoming INVITEs * [(f0cc4c1)](https://github.com/versatica/JsSIP/commit/f0cc4c1) Fix #253. RTCSession: instead of "started" emit "accepted" when 2XX and "confirmed" when ACK * [(f0cc4c1)](https://github.com/versatica/JsSIP/commit/f0cc4c1) Fix #253. RTCSession: accept SDP renegotiation on incoming UPDATE requests. * [(177f38d)](https://github.com/versatica/JsSIP/commit/177f38d) Fix #248. Improve transaction handling on CANCEL * [(f9ef522)](https://github.com/versatica/JsSIP/commit/f9ef522) Fix detection of incoming merged requests (don't generate 482 for retransmissions). * [(3789d5b)](https://github.com/versatica/JsSIP/commit/3789d5b) Fix #245. Improve late CANCEL * [(2274a7d)](https://github.com/versatica/JsSIP/commit/2274a7d) Add hack_via_ws option to force "WS" in Via header when the server has wss:// scheme. * [(c9e8764)](https://github.com/versatica/JsSIP/commit/c9e8764) Fire 'progress' (originator = local) when receiving an incoming call. * [(39949e0)](https://github.com/versatica/JsSIP/commit/39949e0) Fix #242. fine tune the ICE state check for createAnswer/createOffer * [(80c32f3)](https://github.com/versatica/JsSIP/commit/80c32f3) Fix #240. ICE connection RTP timeout status fix * [(1f4d36d)](https://github.com/versatica/JsSIP/commit/1f4d36d) Remove RFC 3261 18.1.2 sanity check (sent-by host mismatch in Via header). * [(62e8323)](https://github.com/versatica/JsSIP/commit/62e8323) Fix #176. Update to the latest IceServer definition * [(caf20f9)](https://github.com/versatica/JsSIP/commit/caf20f9) Fix #163. Stop transport revocery on UA.stop(). * [(2f3769b)](https://github.com/versatica/JsSIP/commit/2f3769b) Fix #148: WebSocket reconnection behaviour * [(d7c3c9c)](https://github.com/versatica/JsSIP/commit/d7c3c9c) Use plain 'for' loops instead of 'for in' loops on arrays * [(a327be3)](https://github.com/versatica/JsSIP/commit/a327be3) Fix. INFO-based DTMF fixes * [(d141864)](https://github.com/versatica/JsSIP/commit/d141864) Fix #133. Incorrect REGISTER Contact header value after transport disconnection * [(f4a29e9)](https://github.com/versatica/JsSIP/commit/f4a29e9) Improvements to 2xx retransmission behaviour * [(3fc4efa)](https://github.com/versatica/JsSIP/commit/3fc4efa) Fix #107. Stop spamming provisional responses * [(7c2abe0)](https://github.com/versatica/JsSIP/commit/7c2abe0) Fix. Permit receiving a 200 OK to a INVITE before any 1XX provisional * [(5c644a6)](https://github.com/versatica/JsSIP/commit/5c644a6) Improvements to min-expires fix * [(4bfc34c)](https://github.com/versatica/JsSIP/commit/4bfc34c) Fix handling of 423 response to REGISTER * [(3e84eaf)](https://github.com/versatica/JsSIP/commit/3e84eaf) Fix #112. Enhance CANCEL request processing * [(1740e5e)](https://github.com/versatica/JsSIP/commit/1740e5e) Fix #117. Clear registration timer before re-setting it * [(dad84a1)](https://github.com/versatica/JsSIP/commit/dad84a1) Fix #111. Create confirmed dialog before setting remote description. * [(15d83bb)](https://github.com/versatica/JsSIP/commit/15d83bb) Fix #100. 'originator' property was missing in RTCSession 'started' event data object. Thanks @gavllew * [(b5c08dc)](https://github.com/versatica/JsSIP/commit/b5c08dc) Fix #99. Do not close the RTCSession if it has been accepted and the WS disconnects * [(46eef46)](https://github.com/versatica/JsSIP/commit/46eef46) Fix #90. Don't log password * [(9ca4bc9)](https://github.com/versatica/JsSIP/commit/9ca4bc9) Fix #89. Do not send a To tag in '100 Trying' responses Version 0.3.0 (released in 2013-03-18) ------------------------------- * [(fea1326)](https://github.com/versatica/JsSIP/commit/fea1326) Don't validate configuration.password against SIP URI password BNF grammar (fix #74). * [(3f84b30)](https://github.com/versatica/JsSIP/commit/3f84b30) Make RTCSession local_identity and remote_identity NameAddrHeader instances * [(622f46a)](https://github.com/versatica/JsSIP/commit/622f46a) remove 'views' argument from UA.call() * [(940fb34)](https://github.com/versatica/JsSIP/commit/940fb34) Refactored Session * [(71572f7)](https://github.com/versatica/JsSIP/commit/71572f7) Rename causes.IN_DIALOG_408_OR_481 to causes.DIALOG_ERROR and add causes.RTP_TIMEOUT. * [(c79037e)](https://github.com/versatica/JsSIP/commit/c79037e) Added 'registrar_server' UA configuration parameter. * [(2584140)](https://github.com/versatica/JsSIP/commit/2584140) Don't allow SIP URI without username in configuration.uri. * [(87357de)](https://github.com/versatica/JsSIP/commit/87357de) Digest authentication refactorized. * [(6867f51)](https://github.com/versatica/JsSIP/commit/6867f51) Add 'cseq' and 'call_id' attributes to OutgoingRequest. * [(cc97fee)](https://github.com/versatica/JsSIP/commit/cc97fee) Fix. Delete session from UA sessions collection when closing * [(947b3f5)](https://github.com/versatica/JsSIP/commit/947b3f5) Remove RTCPeerConnection.onopen event handler * [(6029e45)](https://github.com/versatica/JsSIP/commit/6029e45) Enclose every JsSIP component with an inmediate function * [(7f523cc)](https://github.com/versatica/JsSIP/commit/7f523cc) JsSIP.Utils.MD5() renamed to JsSIP.Utils.calculateMD5() (a more proper name for a function). * [(1b1ab73)](https://github.com/versatica/JsSIP/commit/1b1ab73) Fix. Reply '200' to a CANCEL 'before' replying 487 to the INVITE * [(88fa9b6)](https://github.com/versatica/JsSIP/commit/88fa9b6) New way to handle Streams * [(38d4312)](https://github.com/versatica/JsSIP/commit/38d4312) Add Travis CI support. * [(50d7bf1)](https://github.com/versatica/JsSIP/commit/50d7bf1) New `grunt grammar` task for automatically building customized Grammar.js and Grammar.min.js. * [(f19842b)](https://github.com/versatica/JsSIP/commit/f19842b) Fix #60, #61. Add optional parameters to ua.contact.toString(). Thanks @ibc * [(8f5acb1)](https://github.com/versatica/JsSIP/commit/8f5acb1) Enhance self contact handling * [(5e7d815)](https://github.com/versatica/JsSIP/commit/5e7d815) Fix. ACK was being replied when not pointing to us. Thanks @saghul * [(1ab6df3)](https://github.com/versatica/JsSIP/commit/1ab6df3) New method JsSIP.NameAddrHeader.parse() which returns a JsSIP.NameAddrHeader instance. * [(a7b69b8)](https://github.com/versatica/JsSIP/commit/a7b69b8) Use a random user in the UA's contact. * [(f67872b)](https://github.com/versatica/JsSIP/commit/f67872b) Extend the use of the 'options' argument * [(360c946)](https://github.com/versatica/JsSIP/commit/360c946) Test units for URI and NameAddrHeader classes. * [(826ce12)](https://github.com/versatica/JsSIP/commit/826ce12) Improvements and some bug fixes in URI and NameAddrHeader classes. * [(e385840)](https://github.com/versatica/JsSIP/commit/e385840) Make JsSIP.URI and JsSIP.NameAddrHeader more robust. * [(b0603e3)](https://github.com/versatica/JsSIP/commit/b0603e3) Separate qunitjs tests with and without WebRTC. Make "grunt test" to run "grunt testNoWebRTC". * [(659c331)](https://github.com/versatica/JsSIP/commit/659c331) New way to handle InvalidTargetErorr and WebRtcNotSupportedError * [(d3bc91a)](https://github.com/versatica/JsSIP/commit/d3bc91a) Don't run qunit task by default (instead require "grunt test"). * [(e593396)](https://github.com/versatica/JsSIP/commit/e593396) Added qunitjs based test unit (for now a parser test) and integrate it in grunt.js. * [(da58bff)](https://github.com/versatica/JsSIP/commit/da58bff) Enhance URI and NameAddrHeader * [(df6dd98)](https://github.com/versatica/JsSIP/commit/df6dd98) Automate qunit tests into grunt process * [(babc331)](https://github.com/versatica/JsSIP/commit/babc331) Fix. Accept multiple headers with same hader name in SIP URI. * [(716d164)](https://github.com/versatica/JsSIP/commit/716d164) Pass full multi-header header fields to the grammar * [(2e18a6b)](https://github.com/versatica/JsSIP/commit/2e18a6b) Fix contact match in 200 response to REGISTER * [(3f7b02f)](https://github.com/versatica/JsSIP/commit/3f7b02f) Fix stun_host grammar rule. * [(7867baf)](https://github.com/versatica/JsSIP/commit/7867baf) Allow using a JsSIP.URI instance everywhere specting a destination. * [(a370c78)](https://github.com/versatica/JsSIP/commit/a370c78) Fix 'maddr' and 'method' URI parameters handling * [(537d2f2)](https://github.com/versatica/JsSIP/commit/537d2f2) Give some love to "console.log|warn|info" messages missing the JsSIP class/module prefix. * [(8cb6963)](https://github.com/versatica/JsSIP/commit/8cb6963) In case null, emptry string, undefined or NaN is passed as parameter value then its default value is applied. Also print to console the processed value of all the parameters after validating them. * [(f306d3c)](https://github.com/versatica/JsSIP/commit/f306d3c) hack_ip_in_contact now generates a IP in the range of Test-Net as stated in RFC 5735 (192.0.2.0/24). * [(528d989)](https://github.com/versatica/JsSIP/commit/528d989) Add DTMF feature * [(777a48f)](https://github.com/versatica/JsSIP/commit/777a48f) Change API methods to make use of generic 'options' argument * [(3a6971d)](https://github.com/versatica/JsSIP/commit/3a6971d) Fix #26. Fire 'unregistered' event correctly. * [(5616837)](https://github.com/versatica/JsSIP/commit/5616837) Rename 'outbound_proxy_set' parameter by 'ws_servers' * [(37fe9f4)](https://github.com/versatica/JsSIP/commit/37fe9f4) Fix #54. Allow configuration.uri username start with 'sip' * [(a612987)](https://github.com/versatica/JsSIP/commit/a612987) Add 'stun_servers' and 'turn_servers' configuration parameters * [(9fad09b)](https://github.com/versatica/JsSIP/commit/9fad09b) Add JsSIP.URI and JsSIP.NameAddrHeader classes * [(f35376a)](https://github.com/versatica/JsSIP/commit/f35376a) Add 'Content-Length' header to every SIP response * [(3081a21)](https://github.com/versatica/JsSIP/commit/3081a21) Enhance 'generic_param' grammar rule * [(e589002)](https://github.com/versatica/JsSIP/commit/e589002) Fix. Allow case-insentivity in SIP grammar, when corresponds * [(aec55a2)](https://github.com/versatica/JsSIP/commit/aec55a2) Enhance transport error handling * [(d0dbde3)](https://github.com/versatica/JsSIP/commit/d0dbde3) New stun_servers and turn_servers parameters * [(47cdb66)](https://github.com/versatica/JsSIP/commit/47cdb66) Add 'extraHeaders' parameter to UA.register() and UA.unregister() methods * [(69fbdbd)](https://github.com/versatica/JsSIP/commit/69fbdbd) Enhance in-dialog request management * [(da23790)](https://github.com/versatica/JsSIP/commit/da23790) Fix 'UTF8-NONASCII' grammar rule * [(3f86b94)](https://github.com/versatica/JsSIP/commit/3f86b94) Require a single grunt task for packaging * [(81595be)](https://github.com/versatica/JsSIP/commit/81595be) Add some log lines into sanity check code for clarity * [(a8a7627)](https://github.com/versatica/JsSIP/commit/a8a7627) Enhance RTCPeerConnection SDP error handling. Thanks @ibc for reporting. * [(3acc474)](https://github.com/versatica/JsSIP/commit/3acc474) Add turn configuration parameters for RTCPeerConnection * [(9fccaf5)](https://github.com/versatica/JsSIP/commit/9fccaf5) Enhance 'boolean' comparison * [(24fcdbb)](https://github.com/versatica/JsSIP/commit/24fcdbb) Make preloaded Route header optional. * [(defeabe)](https://github.com/versatica/JsSIP/commit/defeabe) Automatic connection recovery. * [(a45293b)](https://github.com/versatica/JsSIP/commit/a45293b) Improve reply() method. * [(f05795b)](https://github.com/versatica/JsSIP/commit/f05795b) Fix. Prevent outgoing CANCEL messages from being authenticated * [(5ed6122)](https://github.com/versatica/JsSIP/commit/5ed6122) Update credentials with the new authorization upon 401/407 reception * [(2c9a310)](https://github.com/versatica/JsSIP/commit/2c9a310) Do not allow reject-ing a Message or Session with an incorrect status code * [(35e5874)](https://github.com/versatica/JsSIP/commit/35e5874) Make optional the reason phrase when reply-ing * [(85ca354)](https://github.com/versatica/JsSIP/commit/85ca354) Implement credential reuse * [(351ca06)](https://github.com/versatica/JsSIP/commit/351ca06) Fix Contact header aggregation for incoming messages * [(d6428e7)](https://github.com/versatica/JsSIP/commit/d6428e7) Fire UA 'newMessage' event for incoming MESSAGE requests regardless they are out of dialog or in-dialog. * [(1ab3423)](https://github.com/versatica/JsSIP/commit/1ab3423) Intelligent 'Allow' header field value. Do not set a method in the 'Allow' header field if its corresponding event is not defined or has zero listeners. * [(4e70a25)](https://github.com/versatica/JsSIP/commit/4e70a25) Allow 'text/plain' and 'text/html' content types for incoming SIP MESSAGE Fixed incoming SIP MESSAGE processing when the Content-Type header contains parameters * [(d5f3432)](https://github.com/versatica/JsSIP/commit/d5f3432) Fixed the message header split when a parsing error occurs. Parsing error log enhanced. Version 0.2.1 (released in 2012-11-15) ------------------------------- * [(24e32c0)](https://github.com/versatica/JsSIP/commit/24e32c0d16ff5fcefd2319fc445a59d6fc2bcb59) UA configuration `password` parameter is now optional. * [(ffe7af6)](https://github.com/versatica/JsSIP/commit/ffe7af6276915695af9fd00db281af51fec2714f) Bug fix: UA configuration `display_name` parameter. * [(aa51291)](https://github.com/versatica/JsSIP/commit/aa512913733a4f63af066b0a9e12a8e38f2a5acb) Bug fix: Allows multibyte symbols in UA configuration `display_name` parameter (and require not to write it between double quotes). * [(aa48201)](https://github.com/versatica/JsSIP/commit/aa48201) Bug fix: "cnonce" value value was not being quoted in Digest Authentication (reported by [vf1](https://github.com/vf1)). * [(1ecabf5)](https://github.com/versatica/JsSIP/commit/1ecabf5) Bug fix: Fixed authentication for in-dialog requests (reported by [vf1](https://github.com/vf1)). * [(11c6bb6)](https://github.com/versatica/JsSIP/commit/11c6bb6aeef9de3bf2a339263f620b1caf60d634) Allow receiving WebSocket binary messages (code provided by [vf1](https://github.com/vf1)). * [(0e8c5cf)](https://github.com/versatica/JsSIP/commit/0e8c5cf) Bug fix: Fixed Contact and Record-Route header split (reported by Davide Corda). * [(99243e4)](https://github.com/versatica/JsSIP/commit/99243e4) Fixed BYE and ACK error handling. * [(0c91285)](https://github.com/versatica/JsSIP/commit/0c91285) Fixed failure causes in 'registrationFailed' UA event. Version 0.2.0 (released in 2012-11-01) -------------------------------------- * First stable release with full website and documentation. * Refactored sessions, message and events API. Version 0.1.0 (released in 2012-09-27) -------------------------------------- * First release. No documentation. JsSIP-0.6.34/LICENSE0000644000175000017500000000234112544264670013025 0ustar danieldanielName: JsSIP Author: José Luis Millán Core Developer: Iñaki Baz Castillo Copyright (c) 2012-2015 José Luis Millán - Versatica License: The MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. JsSIP-0.6.34/README.md0000644000175000017500000000626712544264670013312 0ustar danieldaniel

[![Build Status](https://travis-ci.org/versatica/JsSIP.png?branch=new-design)](https://travis-ci.org/versatica/JsSIP) ## Overview * Runs in the browser and Node.js. * SIP over [WebSocket](http://jssip.net/documentation/misc/sip_websocket/) (use real SIP in your web apps) * Audio/video calls ([WebRTC](http://jssip.net/documentation/misc/webrtc)) and instant messaging * Lightweight! * Easy to use and powerful user API * Works with OverSIP, Kamailio, Asterisk. Mobicents and repro (reSIProcate) servers ([more info](http://jssip.net/documentation/misc/interoperability)) * Written by the authors of [RFC 7118 "The WebSocket Protocol as a Transport for SIP"](http://tools.ietf.org/html/rfc7118) and [OverSIP](http://oversip.net) ## Getting Started The following simple JavaScript code creates a JsSIP User Agent instance and makes a SIP call: ```javascript // Create our JsSIP instance and run it: var configuration = { 'ws_servers': 'ws://sip-ws.example.com', 'uri': 'sip:alice@example.com', 'password': 'superpassword' }; var ua = new JsSIP.UA(configuration); ua.start(); // Make an audio/video call: var session = null; // HTML5