Compare commits

..
4 changed files with 30 additions and 11 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
FROM node:current-slim
FROM node:17.4-slim
WORKDIR /opt/app/
COPY package.json ./
RUN npm install
+10 -2
View File
@@ -124,14 +124,22 @@ class CallSession extends Emitter {
};
if (this.req.locals.registration) {
debug(`sending call to user ${JSON.stringify(this.req.locals.registration)}`);
debug(`sending call to registered user ${JSON.stringify(this.req.locals.registration)}`);
let destUri = this.req.uri;
if (this.req.has('X-Override-To')) {
const dest = this.req.get('X-Override-To');
const uri = parseUri(contact);
uri.user = dest;
destUri = stringifyUri(uri);
this.logger.info(`overriding destination user with ${dest}, so final uri is ${destUri}`);
}
const contact = this.req.locals.registration.contact;
if (contact.includes('transport=ws')) {
uris = [contact];
}
else {
proxy = this.req.locals.registration.proxy;
uris = [this.req.uri];
uris = [destUri];
}
}
else if (this.req.locals.target === 'forward') {
+18 -7
View File
@@ -1,11 +1,12 @@
{
"name": "sbc-outbound",
"version": "v0.7.1",
"version": "v0.7.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "v0.7.1",
"name": "sbc-outbound",
"version": "v0.7.2",
"license": "MIT",
"dependencies": {
"@jambonz/db-helpers": "^0.6.16",
@@ -28,7 +29,7 @@
"tape": "^5.3.2"
},
"engines": {
"node": ">= 8.10.0"
"node": ">= 12.0.0"
}
},
"node_modules/@babel/code-frame": {
@@ -3294,13 +3295,22 @@
}
},
"node_modules/node-fetch": {
"version": "2.6.6",
"integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==",
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
},
"peerDependencies": {
"encoding": "^0.1.0"
},
"peerDependenciesMeta": {
"encoding": {
"optional": true
}
}
},
"node_modules/node-forge": {
@@ -7292,8 +7302,9 @@
"integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
},
"node-fetch": {
"version": "2.6.6",
"integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==",
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"requires": {
"whatwg-url": "^5.0.0"
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "sbc-outbound",
"version": "v0.7.1",
"version": "v0.7.2",
"main": "app.js",
"engines": {
"node": ">= 12.0.0"