avoid sips scheme if best effort TLS is enabled via env (#122)

This commit is contained in:
Dave Horton
2024-01-30 20:09:58 -08:00
committed by GitHub
parent 4ba3d5b2b0
commit 453b27d6e1

View File

@@ -292,7 +292,7 @@ class CallSession extends Emitter {
const hostport = !o.port || 5060 === o.port ? o.ipv4 : `${o.ipv4}:${o.port}`;
const prependPlus = vc.e164_leading_plus && !this.req.calledNumber.startsWith('0') ? '+' : '';
const transport = `transport=${protocol}`;
const scheme = protocol === 'tls' ? 'sips' : 'sip';
const scheme = (protocol === 'tls' && !process.env.JAMBONES_USE_BEST_EFFORT_TLS) ? 'sips' : 'sip';
const u = `${scheme}:${prefix}${prependPlus}${calledNumber}@${hostport};${transport}`;
const obj = {
name: vc.name,