Bug Report
Your environment
Issue description
The fix for #962 removed the toAor() call from session.connect(request.refer_to.uri, options, initCallback);.
As intended, the URI parameters of the refer_to URI are now included in the outgoing INVITE,
but now the refer_to URI headers are copied, too.
In my understanding, this is wrong.
The URI headers in the refer_to URI shall be used to construct the INVITE (as it is done for the Replaces header
a few lines above), but they shall not be forwarded to the target in the request-URI or To header.
We don't want the target to include those headers into the messages originating from the target.
I would suggest following change:
diff --git a/src/RTCSession.js b/src/RTCSession.js
index 47f8848..63fff69 100644
--- a/src/RTCSession.js
+++ b/src/RTCSession.js
@@ -2314,7 +2314,9 @@ module.exports = class RTCSession extends EventEmitter {
options.extraHeaders.push(`Replaces: ${replaces}`);
}
- session.connect(request.refer_to.uri, options, initCallback);
+ let target_uri = request.refer_to.uri.clone();
+ target_uri.clearHeaders();
+ session.connect(target_uri, options, initCallback);
}
function reject() {
Full JsSIP logs
Bug Report
Your environment
Issue description
The fix for #962 removed the toAor() call from
session.connect(request.refer_to.uri, options, initCallback);.As intended, the URI parameters of the refer_to URI are now included in the outgoing INVITE,
but now the refer_to URI headers are copied, too.
In my understanding, this is wrong.
The URI headers in the refer_to URI shall be used to construct the INVITE (as it is done for the Replaces header
a few lines above), but they shall not be forwarded to the target in the request-URI or To header.
We don't want the target to include those headers into the messages originating from the target.
I would suggest following change:
Full JsSIP logs