Compare commits

...
7 Commits
4 changed files with 1923 additions and 316 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)}`);
const contact = this.req.locals.registration.contact;
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}`);
}
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') {
+1909 -310
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "sbc-outbound",
"version": "v0.7.1",
"version": "v0.7.3",
"main": "app.js",
"engines": {
"node": ">= 12.0.0"
@@ -30,8 +30,8 @@
"@jambonz/db-helpers": "^0.6.16",
"@jambonz/http-health-check": "^0.0.1",
"@jambonz/mw-registrar": "0.2.1",
"@jambonz/realtimedb-helpers": "^0.4.9",
"@jambonz/rtpengine-utils": "^0.2.2",
"@jambonz/realtimedb-helpers": "^0.4.24",
"@jambonz/rtpengine-utils": "^0.3.1",
"@jambonz/stats-collector": "^0.1.6",
"@jambonz/time-series": "^0.1.6",
"cidr-matcher": "^2.1.1",