Skip to content

Commit 6867f51

Browse files
committed
Add 'cseq' and 'call_id' attributes to OutgoingRequest.
1 parent 87645bd commit 6867f51

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/SIPMessage.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,13 @@ OutgoingRequest = function(method, ruri, ua, params, extraHeaders, body) {
7878

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

8384
// CSeq
84-
cseq = (params.cseq || Math.floor(Math.random() * 10000)) + ' ' + method;
85-
this.setHeader('cseq', cseq);
85+
cseq = params.cseq || Math.floor(Math.random() * 10000);
86+
this.cseq = cseq;
87+
this.setHeader('cseq', cseq + ' ' + method);
8688
};
8789

8890
OutgoingRequest.prototype = {

0 commit comments

Comments
 (0)