kirm/sip.js — Issue #15: Patch for sending in-dialog requests
Author: agranig
Created: 2012-01-29 23:17:32+00:00
State: open

There's a bug in your code handling the loose-route detection, here's the patch:

```
diff --git a/sip.js b/sip.js
index 90f8163..4d738f8 100644
--- a/sip.js
+++ b/sip.js
@@ -1100,7 +1100,7 @@ function makeTransactionLayer(options, transport) {
rq.headers.route = parsers.route({s: rq.headers.route, i:0});

hop = parseUri(rq.headers.route[0].uri);
- if(routeuri.lr === undefined ) {
+ if(hop.params.lr === undefined ) {
rq.headers.route.shift();
rq.headers.route.push({uri: rq.uri});
rq.uri = hop;
```

Yeah, I should learn how to send pull requests, I know :)