From 9ca4bc9f55a98218ed1661e8bd911c9927da7041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Mill=C3=A1n?= Date: Wed, 15 May 2013 08:21:48 +0100 Subject: [PATCH] Fix #89. Do not send a To tag in '100 Trying' responses. --- src/SIPMessage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SIPMessage.js b/src/SIPMessage.js index 2c43457dd..28e28727c 100644 --- a/src/SIPMessage.js +++ b/src/SIPMessage.js @@ -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; @@ -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;