Skip to content

Commit

Permalink
Fix #89. Do not send a To tag in '100 Trying' responses.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmillan committed May 15, 2013
1 parent b251a2e commit 9ca4bc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SIPMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ IncomingRequest.prototype.reply = function(code, reason, extraHeaders, body, onS
response += 'Via: ' + this.getHeader('via', v) + '\r\n';
}

if(!this.to_tag) {
if(!this.to_tag && code > 100) {
to += ';tag=' + JsSIP.Utils.newTag();
} else if(this.to_tag && !this.s('to').hasParam('tag')) {
to += ';tag=' + this.to_tag;
Expand Down Expand Up @@ -414,7 +414,7 @@ IncomingRequest.prototype.reply_sl = function(code, reason) {

to = this.getHeader('To');

if(!this.to_tag) {
if(!this.to_tag && code > 100) {
to += ';tag=' + JsSIP.Utils.newTag();
} else if(this.to_tag && !this.s('to').hasParam('tag')) {
to += ';tag=' + this.to_tag;
Expand Down

0 comments on commit 9ca4bc9

Please sign in to comment.