Skip to content

Commit 025b381

Browse files
committed
Fix a typo introduced since f7e66da
1 parent 885fb7c commit 025b381

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/SIPMessage.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ JsSIP.IncomingRequest.prototype = new JsSIP.IncomingMessage();
345345
JsSIP.IncomingRequest.prototype.reply = function(code, reason, extraHeaders, body, onSuccess, onFailure) {
346346
var rr, vias, header, length, idx,
347347
response = 'SIP/2.0 ' + code + ' ' + reason + '\r\n',
348-
to = this.to,
348+
to = this.getHeader('To'),
349349
r = 0,
350350
v = 0;
351351

@@ -374,7 +374,7 @@ JsSIP.IncomingRequest.prototype.reply = function(code, reason, extraHeaders, bod
374374
}
375375

376376
response += 'To: ' + to + '\r\n';
377-
response += 'From: ' + this.from + '\r\n';
377+
response += 'From: ' + this.getHeader('From') + '\r\n';
378378
response += 'Call-ID: ' + this.call_id + '\r\n';
379379
response += 'CSeq: ' + this.cseq + ' ' + this.method + '\r\n';
380380

@@ -409,14 +409,14 @@ JsSIP.IncomingRequest.prototype.reply_sl = function(code, reason) {
409409
response += 'Via: ' + this.getHeader('via', v) + '\r\n';
410410
}
411411

412-
to = this.to;
412+
to = this.getHeader('To');
413413

414414
if(!this.to_tag) {
415415
to += ';tag=' + JsSIP.utils.newTag();
416416
}
417417

418418
response += 'To: ' + to + '\r\n';
419-
response += 'From: ' + this.from + '\r\n';
419+
response += 'From: ' + this.getHeader('From') + '\r\n';
420420
response += 'Call-ID: ' + this.call_id + '\r\n';
421421
response += 'CSeq: ' + this.cseq + ' ' + this.method + '\r\n\r\n';
422422

src/SanityCheck.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,14 @@ JsSIP.sanityCheck = (function() {
146146
response += "Via: " + message.getHeader('via', idx) + "\r\n";
147147
}
148148

149-
to = message.to;
149+
to = message.getHeader('To');
150150

151151
if(!message.to_tag) {
152152
to += ';tag=' + JsSIP.utils.newTag();
153153
}
154154

155155
response += "To: " + to + "\r\n";
156-
response += "From: " + message.from + "\r\n";
156+
response += "From: " + message.getHeader('From') + "\r\n";
157157
response += "Call-ID: " + message.call_id + "\r\n";
158158
response += "CSeq: " + message.cseq + " " + message.method + "\r\n";
159159
response += "\r\n";

0 commit comments

Comments
 (0)