fix: validate caller collector encoding and release engine permissions
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
# 主叫号码接通率与应答率实时分析设计方案
|
# 主叫号码接通率与应答率实时分析设计方案
|
||||||
|
|
||||||
日期:2026-08-31
|
日期:2026-08-31
|
||||||
版本:V1.1(按用户修订后的业务口径)
|
|
||||||
|
版本:V1.1(按用户修订后的业务口径)
|
||||||
状态:设计文档已完成;代码、数据库迁移、真实联调与上线均待实施。
|
状态:设计文档已完成;代码、数据库迁移、真实联调与上线均待实施。
|
||||||
|
|
||||||
实施更新(2026-08-31):独立分析链路、API、页面和测试脚本已编写;部署与真实验收结果以实施状态及发布报告为准,上述为方案编制时状态。
|
实施更新(2026-08-31):独立分析链路、API、页面和测试脚本已编写;部署与真实验收结果以实施状态及发布报告为准,上述为方案编制时状态。
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ source /etc/lisglosips/secrets/mysql-migrate.env
|
|||||||
set +a
|
set +a
|
||||||
export DATABASE_URL
|
export DATABASE_URL
|
||||||
DATABASE_URL=$(/usr/bin/node -e 'console.log(`mysql://${encodeURIComponent(process.env.MYSQL_USER)}:${encodeURIComponent(process.env.MYSQL_PASSWORD)}@${process.env.MYSQL_HOST}:${process.env.MYSQL_PORT}/${process.env.MYSQL_DATABASE}`)')
|
DATABASE_URL=$(/usr/bin/node -e 'console.log(`mysql://${encodeURIComponent(process.env.MYSQL_USER)}:${encodeURIComponent(process.env.MYSQL_PASSWORD)}@${process.env.MYSQL_HOST}:${process.env.MYSQL_PORT}/${process.env.MYSQL_DATABASE}`)')
|
||||||
|
# Previous delta releases stripped executable bits from bundled native engines.
|
||||||
|
find "$new/node_modules/.pnpm" -path '*/@prisma/engines/schema-engine-debian-openssl-3.0.x' -type f -exec chmod 0750 {} \;
|
||||||
/usr/bin/node "$new/node_modules/prisma/build/index.js" migrate deploy --schema "$new/prisma/schema.prisma"
|
/usr/bin/node "$new/node_modules/prisma/build/index.js" migrate deploy --schema "$new/prisma/schema.prisma"
|
||||||
unset DATABASE_URL MYSQL_PASSWORD
|
unset DATABASE_URL MYSQL_PASSWORD
|
||||||
install -d -o syslog -g lisglosips -m 0750 /var/log/lisglosips
|
install -d -o syslog -g lisglosips -m 0750 /var/log/lisglosips
|
||||||
|
|||||||
@@ -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'];
|
const fields = ['uid', 'callid', 'customer', 'gateway', 'vendor', 'vendorGateway', 'caller', 'landing', 'callee', 'city', 'carrier', 'attempt'];
|
||||||
function emitter(type, prefix) {
|
function emitter(type, prefix) {
|
||||||
const ref = k => `$${prefix}(cra_${k})`;
|
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`;
|
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') + `
|
cfg += emitter('AVP', 'avp') + emitter('DLG', 'dlg_val') + `
|
||||||
|
|||||||
Reference in New Issue
Block a user