Compare commits

...
12 Commits
Author SHA1 Message Date
Dave Horton 320a30e328 0.9.8 2026-07-20 08:42:25 -04:00
Dave Horton cd2fde360d 0.9.7 2026-07-20 08:39:53 -04:00
Hoan Luu Huu e353b751c0 fixed wrongly identify 3pcc call (#245)
* fixed wrongly identify 3pcc call

* update drachtio 5.0.27
2026-07-11 08:31:59 -04:00
Hoan Luu Huu 53b46f7e51 update rtcp-mux to default for srtp (#246) 2026-07-09 07:09:53 -04:00
Hoan Luu Huu 6608286e8c fixed: don't log carrier register_credential to log (#244)
* fixed: don't log carrier register_credential to log

* upgrade realtimedb helper 0.8.21
2026-06-19 07:08:52 -04:00
Dave HortonandClaude Opus 4.5 6ddfbc9373 fix error handler middleware parameter order (#243)
The error handler was using (req, res, next, err) but drachtio-srf
error middleware expects (err, req, res, next). This caused
"res.send is not a function" errors when the handler was invoked.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-21 15:20:17 -04:00
Dave Horton cd48675499 curtail massive log msg (#242) 2026-04-23 07:35:27 -04:00
Hoan Luu Huu cecdbdccef update drachtio srf 5.0.21 (#241) 2026-04-13 21:24:28 -04:00
Dave Horton 6586919c86 update deps 2026-03-30 21:07:53 -04:00
Dave Horton c919438af5 update to drachtio-srf latest (#239) 2026-03-05 09:24:49 -05:00
Dave Horton ab39525467 update drachtio-srf (#236) 2026-02-09 10:28:42 -05:00
Hoan Luu Huu 61a66ab181 update drachtio srf version (#231) 2026-01-22 08:13:11 -05:00
8 changed files with 360 additions and 312 deletions
+1 -1
View File
@@ -270,7 +270,7 @@ srf.invite((req, res) => {
session.connect();
});
srf.use((req, res, next, err) => {
srf.use((err, req, res, next) => {
logger.error(err, 'hit top-level error handler');
res.send(500);
});
+1 -1
View File
@@ -4,7 +4,7 @@
"ICE": "default",
"SDES": "off",
"flags": ["generate mid", "SDES-no", "port latching"],
"rtcp-mux": ["require"]
"rtcp-mux": ["offer"]
},
"teams": {
"transport-protocol": "RTP/SAVP",
+1 -1
View File
@@ -96,7 +96,7 @@ module.exports = [
// Variables
'no-delete-var': 2,
'no-undef': 2,
'no-unused-vars': [2, {args: 'none'}],
'no-unused-vars': [2, {args: 'none', ignoreRestSiblings: true}],
// Node.js and CommonJS
'no-mixed-requires': 2,
+5 -1
View File
@@ -109,7 +109,11 @@ class CallSession extends Emitter {
async connect() {
const {sdp} = this.req.locals;
const is3pcc = this.req.body?.length === 0;
// use the parsed SDP from middleware (req.locals.sdp), not req.body:
// for multipart (SIPREC) or IWF-originated bodies req.body may be empty
// or not represent the actual offer, which would wrongly send an
// SDP-bearing call down the no-offer 3pcc path.
const is3pcc = !sdp || sdp.length === 0;
this.logger.info(`inbound ${is3pcc ? '3pcc ' : ''}call accepted for routing`);
const engine = this.getRtpEngine();
if (!engine) {
+14 -4
View File
@@ -394,8 +394,13 @@ module.exports = (srf, logger) => {
}
}
if (r.length > 1) {
logger.info({r},
'multiple carriers with the same gateway have the same number provisioned for the same account'
const all = r.map(({account_sid, voip_carrier_sid}) => ({account_sid, voip_carrier_sid}));
logger.info({
number: r[0].number,
total: all.length,
matches: all.slice(0, 5)
},
'multiple carriers with the same gateway have the same number provisioned for the same account'
+ ' -- cannot determine which one to use');
return {
fromCarrier: true,
@@ -601,8 +606,13 @@ module.exports = (srf, logger) => {
}
}
else if (r.length > 1) {
logger.info({r},
'multiple accounts have added this carrier with default routing -- cannot determine which to use');
const all = r.map(({account_sid, voip_carrier_sid}) => ({account_sid, voip_carrier_sid}));
logger.info({
number: r[0].number,
total: all.length,
matches: all.slice(0, 5)
},
'multiple accounts have added this carrier with default routing -- cannot determine which to use');
return {
fromCarrier: true,
error: 'Multiple accounts are attempting to route the same phone number from the same carrier'
+2 -1
View File
@@ -130,7 +130,8 @@ module.exports = function(srf, logger) {
logger.info('identifyAccount: rejecting call from carrier because DID has not been provisioned');
return res.send(404, 'Number Not Provisioned');
}
logger.info({gateway}, 'identifyAccount: incoming call from gateway');
const {register_password, ...gatewayForLog} = gateway;
logger.info({gateway: gatewayForLog}, 'identifyAccount: incoming call from gateway');
const appSidHeader = req.get('x-application-sid');
if (appSidHeader && appSidHeader == application_sid) {
logger.info({callId}, 'Loop Detected, x-application-sid header on incoming call matches applicationSid');
+333 -300
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "sbc-inbound",
"version": "0.9.5",
"version": "0.9.8",
"main": "app.js",
"engines": {
"node": ">= 20.0.0"
@@ -32,7 +32,7 @@
"@jambonz/db-helpers": "^0.9.18",
"@jambonz/digest-utils": "^0.0.9",
"@jambonz/http-health-check": "^0.0.1",
"@jambonz/realtimedb-helpers": "^0.8.18",
"@jambonz/realtimedb-helpers": "^0.8.21",
"@jambonz/rtpengine-utils": "^0.4.4",
"@jambonz/siprec-client-utils": "^0.2.10",
"@jambonz/stats-collector": "^0.1.10",
@@ -41,7 +41,7 @@
"cidr-matcher": "^2.1.1",
"debug": "^4.4.3",
"drachtio-fn-b2b-sugar": "0.2.1",
"drachtio-srf": "^5.0.5",
"drachtio-srf": "^5.0.27",
"express": "^4.21.2",
"pino": "^10.1.0",
"verify-aws-sns-signature": "^0.1.0",