onsip/SIP.js — pull request #80 by joseph-onsip (2014-07-31 03:55:03+00:00)
Title: Allow REFER to non-SIP resources

TL;DR Demo: http://jsfiddle.net/MAd5U/

I decided to come back to this and make it work with minimal modifications to the Grammar. It allows an `absoluteURI` to be given as the value of a Refer-To header, without affecting other URI behaviors.

fixes #9

Usage:
-
Send:
```javascript
session.refer('http://www.ietf.org')
```
Receive:
```javascript
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
}
});
```