Leave alert_notification and outbind unanswered
Mirror / push (push) Has been cancelled
Test / lint (pull_request) Successful in 21s
Test / test (18) (pull_request) Successful in 30s
Test / test (20) (pull_request) Successful in 29s
Test / test (22) (pull_request) Successful in 30s
Test / test (24) (pull_request) Successful in 30s
Test / test (26) (pull_request) Successful in 30s

This commit is contained in:
2026-09-22 21:43:57 +02:00
parent bdebef849c
commit b54f5b02f3
5 changed files with 54 additions and 7 deletions
+7
View File
@@ -16,6 +16,7 @@ import { createSms } from './sms.ts';
import { dlrFromPdu } from './dlr.ts';
import { paramText } from './defs/types.ts';
import { respIdParams, segmentId } from './sms-id.ts';
import { respNameFor } from './defs/commands.ts';
/** SMPP 3.4 lists ESME_RMSGQFUL under submit_sm_resp only; 4.6.2's retryable code is another. */
export function refusedSegmentStatus(
@@ -171,6 +172,12 @@ export class IncomingRequests {
return;
}
if (!respNameFor(pduObj.cmdName)) {
this.log.info('session - ignoring a command SMPP gives no response', { cmdName: pduObj.cmdName });
return;
}
this.log.info('session - no handler for command', { cmdName: pduObj.cmdName });
await this.session.sendReturn(pduObj, 'ESME_RINVCMDID');
}
+2 -1
View File
@@ -13,6 +13,7 @@ import { defaultInterfaceVersion } from './defs/constants.ts';
import { errorFrom } from './error-from.ts';
import { paramText } from './defs/types.ts';
import { guardedLog } from './log.ts';
import { respNameFor } from './defs/commands.ts';
export type AuthenticateResult = { userData?: unknown } | boolean;
@@ -224,7 +225,7 @@ async function handleRequest(
return true;
}
if (pduObj.cmdName === 'unbind') return false;
if (pduObj.cmdName === 'unbind' || !respNameFor(pduObj.cmdName)) return false;
session.log.debug('server - command before bind', { cmdName: pduObj.cmdName });
await session.sendReturn(pduObj, 'ESME_RINVBNDSTS');