mirror of
https://github.com/jambonz/sbc-inbound.git
synced 2026-10-04 02:04:22 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4dd4247dc2 | ||
|
|
055350903a | ||
|
|
7e83791ef0 |
@@ -69,7 +69,7 @@ const {
|
||||
const ngProtocol = process.env.JAMBONES_NG_PROTOCOL || 'udp';
|
||||
const ngPort = process.env.RTPENGINE_PORT || ('udp' === ngProtocol ? 22222 : 8080);
|
||||
const {getRtpEngine, setRtpEngines} = require('@jambonz/rtpengine-utils')([], logger, {
|
||||
emitter: stats,
|
||||
//emitter: stats,
|
||||
dtmfListenPort: process.env.DTMF_LISTEN_PORT || 22224,
|
||||
protocol: ngProtocol
|
||||
});
|
||||
|
||||
+11
-7
@@ -172,13 +172,6 @@ class CallSession extends Emitter {
|
||||
throw new Error('rtpengine failed: answer');
|
||||
}
|
||||
|
||||
/* special case: Five9 Voicestream calls do not advertise a:sendonly, though they should */
|
||||
if (this.isFive9VoiceStream) {
|
||||
this.logger.info('Voicestream call from Five9, blocking audio in the reverse direction');
|
||||
const response = Promise.all([this.blockMedia(opts), this.blockDTMF(opts)]);
|
||||
this.logger.debug({response}, 'response to blocMedia');
|
||||
}
|
||||
|
||||
let headers = {
|
||||
'From': createBLegFromHeader(this.req),
|
||||
'To': this.req.get('To'),
|
||||
@@ -257,6 +250,17 @@ class CallSession extends Emitter {
|
||||
this.logger.error(`rtpengine answer failed with ${JSON.stringify(response)}`);
|
||||
throw new Error('rtpengine failed: answer');
|
||||
}
|
||||
/* special case: Five9 Voicestream calls do not advertise a:sendonly, though they should */
|
||||
if (this.isFive9VoiceStream) {
|
||||
const opts = {
|
||||
...this.rtpEngineOpts.common,
|
||||
'from-tag':this.rtpEngineOpts.uac.tag
|
||||
};
|
||||
this.logger.info('Voicestream call from Five9, blocking audio in the reverse direction');
|
||||
const response = await Promise.all([this.blockMedia(opts), this.blockDTMF(opts)]);
|
||||
this.logger.debug({response}, 'response to blockMedia/blockDTMF');
|
||||
}
|
||||
|
||||
return response.sdp;
|
||||
}
|
||||
});
|
||||
|
||||
Generated
+27
-27
@@ -13,7 +13,7 @@
|
||||
"@jambonz/http-authenticator": "^0.2.2",
|
||||
"@jambonz/http-health-check": "^0.0.1",
|
||||
"@jambonz/realtimedb-helpers": "^0.4.29",
|
||||
"@jambonz/rtpengine-utils": "^0.3.6",
|
||||
"@jambonz/rtpengine-utils": "^0.3.10",
|
||||
"@jambonz/siprec-client-utils": "^0.1.4",
|
||||
"@jambonz/stats-collector": "^0.1.6",
|
||||
"@jambonz/time-series": "^0.2.5",
|
||||
@@ -632,19 +632,19 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@jambonz/rtpengine-utils": {
|
||||
"version": "0.3.6",
|
||||
"resolved": "https://registry.npmjs.org/@jambonz/rtpengine-utils/-/rtpengine-utils-0.3.6.tgz",
|
||||
"integrity": "sha512-nFaAtkX/7RyIRVGV00QjK3r2n5DOir4uE5JJB8mmuRjnCTygHZPofDAvcK0aowtTnBno33kPIno9Mq7imKsdcQ==",
|
||||
"version": "0.3.10",
|
||||
"resolved": "https://registry.npmjs.org/@jambonz/rtpengine-utils/-/rtpengine-utils-0.3.10.tgz",
|
||||
"integrity": "sha512-nwnHaS4vKkj5YB9HyB06ZyHu5knhSzAOeg4qMG4GS0joRAx7DVmnuPhRaQJmcVAgZm9VuDfxSFQrGIot/oVBBQ==",
|
||||
"dependencies": {
|
||||
"debug": "^4.3.1",
|
||||
"rtpengine-client": "^0.3.7",
|
||||
"rtpengine-client": "^0.3.9",
|
||||
"ws": "^8.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@jambonz/rtpengine-utils/node_modules/ws": {
|
||||
"version": "8.5.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz",
|
||||
"integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==",
|
||||
"version": "8.9.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz",
|
||||
"integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
@@ -3508,9 +3508,9 @@
|
||||
"integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A=="
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
@@ -4339,9 +4339,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/rtpengine-client": {
|
||||
"version": "0.3.7",
|
||||
"resolved": "https://registry.npmjs.org/rtpengine-client/-/rtpengine-client-0.3.7.tgz",
|
||||
"integrity": "sha512-M90ozDs+Mw0/XkRFi3+3jByNT88ozqvanTghvG/1WwmnwGW18oxunRz9Ef/Y0iW0Bv1zxGuG1cTlcJrqnkmvRg==",
|
||||
"version": "0.3.9",
|
||||
"resolved": "https://registry.npmjs.org/rtpengine-client/-/rtpengine-client-0.3.9.tgz",
|
||||
"integrity": "sha512-e22oEIHK2fazQdcQNSCNlM/87xi5BHCSiqcOKbxSsGL69KEA1nPdIjihnDpzxhZltYGUokqTpb5aTz/hZhlYjA==",
|
||||
"dependencies": {
|
||||
"bencode": "^2.0.3",
|
||||
"uuid": "^8.2.0",
|
||||
@@ -5782,19 +5782,19 @@
|
||||
}
|
||||
},
|
||||
"@jambonz/rtpengine-utils": {
|
||||
"version": "0.3.6",
|
||||
"resolved": "https://registry.npmjs.org/@jambonz/rtpengine-utils/-/rtpengine-utils-0.3.6.tgz",
|
||||
"integrity": "sha512-nFaAtkX/7RyIRVGV00QjK3r2n5DOir4uE5JJB8mmuRjnCTygHZPofDAvcK0aowtTnBno33kPIno9Mq7imKsdcQ==",
|
||||
"version": "0.3.10",
|
||||
"resolved": "https://registry.npmjs.org/@jambonz/rtpengine-utils/-/rtpengine-utils-0.3.10.tgz",
|
||||
"integrity": "sha512-nwnHaS4vKkj5YB9HyB06ZyHu5knhSzAOeg4qMG4GS0joRAx7DVmnuPhRaQJmcVAgZm9VuDfxSFQrGIot/oVBBQ==",
|
||||
"requires": {
|
||||
"debug": "^4.3.1",
|
||||
"rtpengine-client": "^0.3.7",
|
||||
"rtpengine-client": "^0.3.9",
|
||||
"ws": "^8.5.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ws": {
|
||||
"version": "8.5.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz",
|
||||
"integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==",
|
||||
"version": "8.9.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.9.0.tgz",
|
||||
"integrity": "sha512-Ja7nszREasGaYUYCI2k4lCKIRTt+y7XuqVoHR44YpI49TtryyqbqvDMn5eqfW7e6HzTukDRIsXqzVHScqRcafg==",
|
||||
"requires": {}
|
||||
}
|
||||
}
|
||||
@@ -7999,9 +7999,9 @@
|
||||
"integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A=="
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
@@ -8629,9 +8629,9 @@
|
||||
"integrity": "sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA=="
|
||||
},
|
||||
"rtpengine-client": {
|
||||
"version": "0.3.7",
|
||||
"resolved": "https://registry.npmjs.org/rtpengine-client/-/rtpengine-client-0.3.7.tgz",
|
||||
"integrity": "sha512-M90ozDs+Mw0/XkRFi3+3jByNT88ozqvanTghvG/1WwmnwGW18oxunRz9Ef/Y0iW0Bv1zxGuG1cTlcJrqnkmvRg==",
|
||||
"version": "0.3.9",
|
||||
"resolved": "https://registry.npmjs.org/rtpengine-client/-/rtpengine-client-0.3.9.tgz",
|
||||
"integrity": "sha512-e22oEIHK2fazQdcQNSCNlM/87xi5BHCSiqcOKbxSsGL69KEA1nPdIjihnDpzxhZltYGUokqTpb5aTz/hZhlYjA==",
|
||||
"requires": {
|
||||
"bencode": "^2.0.3",
|
||||
"uuid": "^8.2.0",
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
"@jambonz/http-authenticator": "^0.2.2",
|
||||
"@jambonz/http-health-check": "^0.0.1",
|
||||
"@jambonz/realtimedb-helpers": "^0.4.29",
|
||||
"@jambonz/rtpengine-utils": "^0.3.6",
|
||||
"@jambonz/rtpengine-utils": "^0.3.10",
|
||||
"@jambonz/siprec-client-utils": "^0.1.4",
|
||||
"@jambonz/stats-collector": "^0.1.6",
|
||||
"@jambonz/time-series": "^0.2.5",
|
||||
|
||||
Reference in New Issue
Block a user