qrelate
Short-Term memory pipeline correlation module
About
This module was designed for paStash In-Line CDR correlation
Setup
npm install --save qrelate
Functions
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 = ; // Set Cacheqrelate; // max number of items in LRUqrelate; // max age of items in LRUqrelate; // correlation threshold scoreqrelate; // correlation identifier key // Set Vectorsconst vectors = score: 100 key: 'callid' suffix: "_b2b-1" score: 100 key: 'correlation_id' name: 'callid' inject: 'x-cid' score: 50 key: 'ruri_user' regex: /^/ score: 50 key: 'from_user' regex: /^/ score: 50 key: 'to_user' name: "last8dig" regex_match: /.{8}$/ ;qrelate;