mirror of
https://github.com/jambonz/sbc-outbound.git
synced 2025-12-19 04:27:45 +00:00
when sending to retell with user starting with call_ dont prepend plus (#191)
This commit is contained in:
@@ -322,7 +322,7 @@ class CallSession extends Emitter {
|
||||
const prefix = vc.tech_prefix || '';
|
||||
const transport = o.protocol?.startsWith('tls') ? 'tls' : (o.protocol || 'udp');
|
||||
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 && /^[1-9]/.test(this.req.calledNumber) ? '+' : '';
|
||||
const scheme = transport === 'tls' && !process.env.JAMBONES_USE_BEST_EFFORT_TLS && o.use_sips_scheme ?
|
||||
'sips' : 'sip';
|
||||
let u = `${scheme}:${prefix}${prependPlus}${calledNumber}@${hostport};transport=${transport}`;
|
||||
|
||||
Reference in New Issue
Block a user