REFER should have sips contact if far end is using sips (#192)

This commit is contained in:
Dave Horton
2025-02-24 09:37:18 -05:00
committed by GitHub
parent 086adfbeef
commit 23c748046d

View File

@@ -180,8 +180,8 @@ class CallSession extends Emitter {
host = obj.host;
proxy = `sip:${featureServer}`;
}
if (obj.user) uri = `${scheme}:${obj.user}@${host}`;
else uri = `${scheme}:${host}`;
if (obj.user) uri = `sip:${obj.user}@${host}`;
else uri = `sip:${host}`;
this.logger.info(`uri will be: ${uri}, proxy ${proxy}`);
const sendOfferToRtpEngine = async(remoteSdp) => {
@@ -1057,7 +1057,7 @@ Duration=${payload.duration} `
// eslint-disable-next-line no-unused-vars
'content-length':contentlength, 'refer-to':_referto, 'referred-by': referredby,
// eslint-disable-next-line no-unused-vars
'X-Refer-To-Leave-Untouched': _leave,
'X-Refer-To-Leave-Untouched': _leave, contact: _contact,
...customHeaders
} = req.headers;
@@ -1066,6 +1066,7 @@ Duration=${payload.duration} `
headers: {
'Refer-To': `<${stringifyUri(uri)}>`,
'Referred-By': referredby,
'Contact': this.contactHeader,
...customHeaders
}
});