fix: validate caller collector encoding and release engine permissions

This commit is contained in:
hectorzhao
2026-08-31 17:26:29 +08:00
parent 5284d41f9a
commit 116e316eca
3 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ insert('route[S28_CDR_FAILURE] {', '\n $var(cra_kind)="END"; $var(cra_code)=$
const fields = ['uid', 'callid', 'customer', 'gateway', 'vendor', 'vendorGateway', 'caller', 'landing', 'callee', 'city', 'carrier', 'attempt'];
function emitter(type, prefix) {
const ref = k => `$${prefix}(cra_${k})`;
const encoded = fields.map(k => `$(${prefix}(cra_${k}){s.encode.base64})`).join('|');
const encoded = fields.map(k => `$(${prefix}(cra_${k}){s.b64encode})`).join('|');
return `\nroute[CRA_EMIT_${type}] {\n if (${ref('customer')}==NULL || ${ref('customer')}=="none") return;\n xlog("L_NOTICE", "CRA1|$var(cra_kind)|$Ts|$Tsm|${ref('startsec')}|${ref('startmicro')}|$var(cra_code)|$var(cra_source)|${encoded}\\n");\n}\n`;
}
cfg += emitter('AVP', 'avp') + emitter('DLG', 'dlg_val') + `