1.0.9 • Published 8 years ago
qrelate v1.0.9
qrelate
Short-Term memory pipeline correlation module
About
This module was designed for paStash In-Line CDR correlation
Setup
npm install --save qrelateFunctions
key: Key name to extract value fromsuffix: Extend with suffixprefix: Extend with prefixregex: Replace using regexregex_match: Match using regexname: Store using nameinject: Inject header on correlationscore: Score to assign for a match
Parameters
maxSize: max number of items in LRUmaxAge: max age in ms for items in LRUtreshold: correlation treshold scoreuuid: correlation identifier key
Usage
const qrelate = require('qrelate');
// Set Cache
qrelate.params('maxSize',5000); // max number of items in LRU
qrelate.params('maxAge',5000); // max age of items in LRU
qrelate.params('threshold',99); // correlation threshold score
qrelate.params('uuid','uuid'); // correlation identifier key
// Set Vectors
const vectors = [
{ score: 100, key: 'callid', suffix: "_b2b-1" },
{ score: 100, key: 'correlation_id', name: 'callid', inject: 'x-cid' },
{ score: 50, key: 'ruri_user', regex: /^(00|\+)/ },
{ score: 50, key: 'from_user', regex: /^(00|\+)/ }
{ score: 50, key: 'to_user', name: "last8dig", regex_match: /.{8}$/ }
];
qrelate.vectors(vectors);