bugfix #14 - incorrect from when PAI differs from From header

This commit is contained in:
Dave Horton
2020-04-06 11:30:46 -04:00
parent 018ef8ddd3
commit f54513f166
3 changed files with 12 additions and 17 deletions

View File

@@ -242,18 +242,6 @@ class TaskDial extends Task {
const {getSBC} = srf.locals;
const sbcAddress = getSBC();
/*
if (CallDirection.Inbound === cs.direction) {
const contact = req.getParsedHeader('Contact');
const uri = parseUri(contact[0].uri);
this.logger.debug({contact}, 'outdialing with contact');
sbcAddress = `${uri.host}:${uri.port || 5060}`;
//sbcAddress = `${req.source_address}:${req.source_port}`;
}
else {
sbcAddress = getSBC();
}
*/
if (!sbcAddress) throw new Error('no SBC found for outbound call');
const opts = {
headers: req && req.has('X-CID') ? Object.assign(this.headers, {'X-CID': req.get('X-CID')}) : this.headers,