mirror of
https://github.com/jambonz/sbc-outbound.git
synced 2026-01-25 02:07:59 +00:00
add fix to lint script (#124)
Co-authored-by: Markus Frindt <m.frindt@cognigy.com>
This commit is contained in:
@@ -958,6 +958,16 @@ Duration=${payload.duration} `
|
||||
|
||||
async _onFeatureServerTransfer(dlg, req, res) {
|
||||
try {
|
||||
// the following properties are ignored in the REFER headers
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { via, from, to, 'call-id': callid, cseq, 'max-forwards': maxforwards,
|
||||
// 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,
|
||||
...customHeaders
|
||||
} = req.headers;
|
||||
|
||||
const referTo = req.getParsedHeader('Refer-To');
|
||||
const uri = parseUri(referTo.uri);
|
||||
this.logger.info({uri, referTo}, 'received REFER from feature server');
|
||||
@@ -975,7 +985,8 @@ Duration=${payload.duration} `
|
||||
method: 'REFER',
|
||||
headers: {
|
||||
'Refer-To': stringifyUri(uri),
|
||||
'Referred-By': stringifyUri(u)
|
||||
'Referred-By': stringifyUri(u),
|
||||
...customHeaders
|
||||
}
|
||||
});
|
||||
return res.send(response.status);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"start": "node app",
|
||||
"test": "NODE_ENV=test HTTP_PORT=3050 JAMBONES_HOSTING=1 JAMBONES_NETWORK_CIDR=127.0.0.1/32 JAMBONES_MYSQL_HOST=127.0.0.1 JAMBONES_MYSQL_USER=jambones_test JAMBONES_MYSQL_PASSWORD=jambones_test JAMBONES_MYSQL_DATABASE=jambones_test JAMBONES_REDIS_HOST=localhost JAMBONES_REDIS_PORT=16379 JAMBONES_TIME_SERIES_HOST=127.0.0.1 JAMBONES_LOGLEVEL=error DRACHTIO_SECRET=cymru DRACHTIO_HOST=127.0.0.1 DRACHTIO_PORT=9060 JAMBONES_RTPENGINES=127.0.0.1:12222 node test/ ",
|
||||
"coverage": "./node_modules/.bin/nyc --reporter html --report-dir ./coverage npm run test",
|
||||
"jslint": "eslint app.js lib"
|
||||
"jslint": "eslint app.js lib --fix"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jambonz/db-helpers": "^0.9.3",
|
||||
|
||||
Reference in New Issue
Block a user