Skip to content

Commit

Permalink
Add 'cseq' and 'call_id' attributes to OutgoingRequest.
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Feb 28, 2013
1 parent 87645bd commit 6867f51
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/SIPMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 6867f51

Please sign in to comment.