Remove extraneous bower instructions
Logging cleanup: Trim ICE candidate output
Logging cleanup: Check for null before method call
README.md: add npm instructions
Use Grammar to parse Content-Disposition type

This makes Content-Disposition-related behavior more correct.

fixes #6
Grammar: use text() instead of input.substring(peg$currPos, offset())
SpecGrammar.js: add a couple UUID tests
Grammar: remove unused uuid_URI rule, clean up uuid rule
Grammar: fix quoted_string_clean rule

In theory, the rule returns what's between the quotes in the input.

In practice, it was slicing off the first and last characters of the input,
then returning the result. This only worked if there wasn't any SWS before
the quoted string.

Now, it actually returns what's between the quotes.
Grammar: userinfo rule uses text().slice instead of input.substring

Note that this rule is (still) broken, in that data.user gets set to a string
containing both the user and the password.
Grammar.pegjs: remove unused variable 'header' from SIP_URI rule

See 987c7e6f16f5922e635bb1f6bdd6c7c1359c012d
Allow REFER to non-SIP resources

Usage:

  Send:

    session.refer('http://www.ietf.org')

  Receive:

    session.on('refer', function handleRefer (request) {
      var uri = request.parseHeader('refer-to').uri;
      if (!uri.scheme.match("^sips?$")) {
        // handle non-SIP referral
      } else {
        // handle SIP referral
      }
    });

fixes #9
src/Session.js: non-SIP .refer() and .followRefer() don't .terminate()

This keeps sessions open after non-SIP referrals.

.followRefer():
  1. opens the URI using window.open if it's available
  2. doesn't call its callback argument, since there's no new session

One of REFER tests had to be changed to use an actual sip: URI and avoid
triggering the non-SIP behavior.

Usage:

  var referrerUri = 'FILL THIS IN';
  var refereeUri = 'FILL THIS IN TOO';

  var referrer = new SIP.UA({
      traceSip: true,
      uri: referrerUri,
  });

  var referee = new SIP.UA({
      traceSip: true,
      uri: refereeUri,
  });

  referee.on('invite', function (session) {
      session.accept().on('refer', session.followRefer(function wontGetCalled () {}));
  });

  referee.on('registered', function () {
      referrer.invite(refereeUri).on('accepted', function referToIETF() {
          this.refer('http://www.ietf.org');
      });
  });
git add plugin.xml

This will allow SIP.js to be used as a Cordova plugin as follows:

Shell:

  cordova plugin add com.sipjs # once it's published to the registry
  # The following lines are needed for media support:
  cordova plugin add https://github.com/alongubkin/phonertc
  cordova plugin add com.sipjs.phonertc # This is already published to the registry

JS:

  var SIP = cordova.require('com.sipjs.sipjs');
  # The following line is needed for media support:
  var PhoneRTCMediaHandler = cordova.require('com.sipjs.phonertc.mediahandler')(SIP);
  var ua = new SIP.UA({
    # The following line is needed for media support:
    mediaHandlerFactory: PhoneRTCMediaHandler
  });
plugin.xml: fix path to dist/sip.js
Bump version to 0.6.2
0.6.2 Release

SIP.js can now be used as a Cordova plugin. See these commits:
  dc0549d8d300a27b42ca889cd49f33d2bbf54c91
  1270ee0a59e8b98ad5a8bc6f18ce057610a6fa2f
Remove 0.6.2 dist/ files in preparation for next release
Merge pull request #82 from joseph-onsip/release062

Release 0.6.2

SIP.js can now be used as a Cordova plugin (note that iOS support is broken at the time of this commit, see https://github.com/joseph-onsip/sipjs-cordova/issues/6). Usage:

Shell:

  cordova plugin add com.sipjs # once it's published to the registry
  # The following lines are needed for media support:
  cordova plugin add https://github.com/alongubkin/phonertc
  cordova plugin add com.sipjs.phonertc # This is already published to the registry

JS:

  var SIP = cordova.require('com.sipjs.sipjs');
  # The following line is needed for media support:
  var PhoneRTCMediaHandler = cordova.require('com.sipjs.phonertc.mediahandler')(SIP);
  var ua = new SIP.UA({
    # The following line is needed for media support:
    mediaHandlerFactory: PhoneRTCMediaHandler
  });