diff --git a/lib/call-session.js b/lib/call-session.js index 1625596..12e31b9 100644 --- a/lib/call-session.js +++ b/lib/call-session.js @@ -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 } });