mirror of
https://github.com/jambonz/sbc-outbound.git
synced 2026-10-04 18:44:38 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d641504797 | ||
|
|
b871812a70 | ||
|
|
e123a2ef88 | ||
|
|
775e63518a | ||
|
|
307cf9bd65 |
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM --platform=linux/amd64 node:18.9.0-alpine3.16 as base
|
||||
FROM --platform=linux/amd64 node:18.12.1-alpine3.16 as base
|
||||
|
||||
RUN apk --update --no-cache add --virtual .builds-deps build-base python3
|
||||
|
||||
|
||||
@@ -40,11 +40,13 @@ const initCdr = (srf, req) => {
|
||||
const to = arr ? arr[1] : req.calledNumber;
|
||||
arr = regex.exec(req.callingNumber);
|
||||
const from = arr ? arr[1] : req.callingNumber;
|
||||
const applicationSid = req.get('X-Application-Sid');
|
||||
|
||||
return {
|
||||
account_sid: req.get('X-Account-Sid'),
|
||||
call_sid: req.get('X-Call-Sid'),
|
||||
sip_callid: req.get('Call-ID'),
|
||||
...(applicationSid && {application_sid: applicationSid}),
|
||||
from,
|
||||
to,
|
||||
duration: 0,
|
||||
@@ -429,6 +431,7 @@ class CallSession extends Emitter {
|
||||
sip_status: status
|
||||
}).catch((err) => this.logger.error({err}, 'Error writing cdr for call failure'));
|
||||
}
|
||||
return;
|
||||
}
|
||||
else {
|
||||
this.logger.info(`got ${err.status}, cranking back to next destination`);
|
||||
|
||||
Generated
+7
-7
@@ -9,7 +9,7 @@
|
||||
"version": "v0.7.7",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jambonz/db-helpers": "^0.7.2",
|
||||
"@jambonz/db-helpers": "^0.7.3",
|
||||
"@jambonz/http-health-check": "^0.0.1",
|
||||
"@jambonz/mw-registrar": "0.2.2",
|
||||
"@jambonz/realtimedb-helpers": "^0.4.35",
|
||||
@@ -560,9 +560,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@jambonz/db-helpers": {
|
||||
"version": "0.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@jambonz/db-helpers/-/db-helpers-0.7.2.tgz",
|
||||
"integrity": "sha512-xFK6qNz4HebbNZsR35UnNptxeNKvfzu67UTdkVkBKOXW4O0nsVjwl5yuiacgXugHyCJ6Xq0dB3Cir4e52DAp6A==",
|
||||
"version": "0.7.3",
|
||||
"resolved": "https://registry.npmjs.org/@jambonz/db-helpers/-/db-helpers-0.7.3.tgz",
|
||||
"integrity": "sha512-FXQPnl5AGV3P6RhvdSKfjIOdEXShYe7aKJayJjaPARPTCTGqLTDhV2tfsWirCrpQhn+vanJHAiOyzOTmbDIfzA==",
|
||||
"dependencies": {
|
||||
"cidr-matcher": "^2.1.1",
|
||||
"debug": "^4.3.3",
|
||||
@@ -5951,9 +5951,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@jambonz/db-helpers": {
|
||||
"version": "0.7.2",
|
||||
"resolved": "https://registry.npmjs.org/@jambonz/db-helpers/-/db-helpers-0.7.2.tgz",
|
||||
"integrity": "sha512-xFK6qNz4HebbNZsR35UnNptxeNKvfzu67UTdkVkBKOXW4O0nsVjwl5yuiacgXugHyCJ6Xq0dB3Cir4e52DAp6A==",
|
||||
"version": "0.7.3",
|
||||
"resolved": "https://registry.npmjs.org/@jambonz/db-helpers/-/db-helpers-0.7.3.tgz",
|
||||
"integrity": "sha512-FXQPnl5AGV3P6RhvdSKfjIOdEXShYe7aKJayJjaPARPTCTGqLTDhV2tfsWirCrpQhn+vanJHAiOyzOTmbDIfzA==",
|
||||
"requires": {
|
||||
"cidr-matcher": "^2.1.1",
|
||||
"debug": "^4.3.3",
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@
|
||||
"jslint": "eslint app.js lib"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jambonz/db-helpers": "^0.7.2",
|
||||
"@jambonz/db-helpers": "^0.7.3",
|
||||
"@jambonz/realtimedb-helpers": "^0.4.35",
|
||||
"@jambonz/http-health-check": "^0.0.1",
|
||||
"@jambonz/mw-registrar": "0.2.2",
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ test('sbc-outbound tests', async(t) => {
|
||||
|
||||
const res = await queryCdrs({account_sid: 'ed649e33-e771-403a-8c99-1780eabbc803'});
|
||||
//console.log(`cdrs: ${JSON.stringify(res)}`);
|
||||
t.ok(res.total === 6, 'wrote 6 cdrs');
|
||||
t.ok(res.total === 5, 'wrote 5 cdrs');
|
||||
|
||||
srf.disconnect();
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user