mirror of
https://github.com/jambonz/sbc-outbound.git
synced 2026-10-04 02:04:19 +00:00
avoid sips scheme if best effort TLS is enabled via env (#122)
This commit is contained in:
+1
-1
@@ -292,7 +292,7 @@ class CallSession extends Emitter {
|
|||||||
const hostport = !o.port || 5060 === o.port ? o.ipv4 : `${o.ipv4}:${o.port}`;
|
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 prependPlus = vc.e164_leading_plus && !this.req.calledNumber.startsWith('0') ? '+' : '';
|
||||||
const transport = `transport=${protocol}`;
|
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 u = `${scheme}:${prefix}${prependPlus}${calledNumber}@${hostport};${transport}`;
|
||||||
const obj = {
|
const obj = {
|
||||||
name: vc.name,
|
name: vc.name,
|
||||||
|
|||||||
Reference in New Issue
Block a user