Permalink
Browse files

Added 'Record-Route' parser and stringifier

  • Loading branch information...
1 parent 7d0ee54 commit d5e474788eeef3392b19b8b9d9d8538f38b0bbd6 @kirm committed Jan 28, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 sip.js
View
4 sip.js
@@ -256,6 +256,7 @@ var parsers = {
return parseMultiHeader(parseAOR, v, h);
},
'route': parseMultiHeader.bind(0, parseAOR),
+ 'record-route': parseMultiHeader.bind(0, parseAOR),
'cseq': parseCSeq,
'content-length': function(v) { return +v.s; },
'via': parseMultiHeader.bind(0, parseVia),
@@ -402,6 +403,9 @@ var stringifiers = {
route: function(h) {
return h.length ? 'Route: ' + h.map(stringifyAOR).join(', ') + '\r\n' : '';
},
+ 'record-route': function(h) {
+ return h.length ? 'Record-Route: ' + h.map(stringifyAOR).join(', ') + '\r\n' : '';
+ },
cseq: function(cseq) {
return 'CSeq: '+cseq.seq+' '+cseq.method+'\r\n';
},

0 comments on commit d5e4747

Please sign in to comment.