Skip to content
Permalink
Browse files

Add 'cseq' and 'call_id' attributes to OutgoingRequest.

  • Loading branch information
ibc committed Feb 28, 2013
1 parent 87645bd commit 6867f5109acf1da8bcaf2ae747441ce25b0ca66f
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/SIPMessage.js
@@ -78,11 +78,13 @@ OutgoingRequest = function(method, ruri, ua, params, extraHeaders, body) {

// Call-ID
call_id = params.call_id || (ua.configuration.jssip_id + JsSIP.Utils.createRandomToken(15));
this.call_id = call_id;
this.setHeader('call-id', call_id);

// CSeq
cseq = (params.cseq || Math.floor(Math.random() * 10000)) + ' ' + method;
this.setHeader('cseq', cseq);
cseq = params.cseq || Math.floor(Math.random() * 10000);
this.cseq = cseq;
this.setHeader('cseq', cseq + ' ' + method);
};

OutgoingRequest.prototype = {

0 comments on commit 6867f51

Please sign in to comment.
You can’t perform that action at this time.