6638b2cb10257c6f72cb610b4cccf3ae73fefbea
[motion2.git] / server / services / ami / model / voiceQueue.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xd286=['answered','sumDuration','sumHoldTime','sumBillable','unmanaged','loggedIn','available','acw','acwTimeout','autopause','sendMessageOneNotActive','message','originated','dialTimezone','dialGlobalInterval','dialActive','dialMethod','progressive','dialLimitChannel','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dropRate','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','anonymous','dialOriginateTimeout','tTxX','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerRetryFrequency','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialGlobalMaxRetry','Trunk','TrunkBackup','dialPrefix','Interval','dialRandomLastDigitCallerIdNumber','dialCutDigit','strategy','queueStatusComplete','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','outboundRejectCallsDay','pTalking','timeout','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundDropCallsDayACS','outboundReCallsDay','outboundAbandonedDay','startProgressive','startPredictive','predictiveIntervalMultiplicativeFactor','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','dialPredictiveIntervalMaxThreshold','predictiveIntervalErlangCallsDroppedCalls','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialRecallMeTimeout','dialRecallInQueue','dialQueueProject2','dialAgiAfterHangupClient','dialAgiAfterHangupAgent','mandatoryDisposition','mandatoryDispositionPause','unknown','not_inuse','inuse','busy','invalid','unavailable','ringing','ringinuse','onhold','wav49','gsm','rrmemory','name','monitor_format','type','waiting','total'];(function(_0x3430aa,_0x57cd92){var _0x2ac5c=function(_0x3068dd){while(--_0x3068dd){_0x3430aa['push'](_0x3430aa['shift']());}};_0x2ac5c(++_0x57cd92);}(_0xd286,0x66));var _0x6d28=function(_0x59fffc,_0x1e96a2){_0x59fffc=_0x59fffc-0x0;var _0x21e467=_0xd286[_0x59fffc];return _0x21e467;};'use strict';var statusDesc=[_0x6d28('0x0'),_0x6d28('0x1'),_0x6d28('0x2'),_0x6d28('0x3'),_0x6d28('0x4'),_0x6d28('0x5'),_0x6d28('0x6'),_0x6d28('0x7'),_0x6d28('0x8')];var monitorFormat={'wav':'wav','wav49':_0x6d28('0x9'),'gsm':_0x6d28('0xa')};var strategy={'rrmemory':_0x6d28('0xb'),'roundrobin':'roundrobin'};function VoiceQueue(_0x4bc30e){this['id']=_0x4bc30e['id']||0x0;this[_0x6d28('0xc')]=_0x4bc30e[_0x6d28('0xc')]||'';this[_0x6d28('0xd')]=_0x4bc30e[_0x6d28('0xd')]||'';this[_0x6d28('0xe')]=_0x4bc30e['type']||'inbound';this[_0x6d28('0xf')]=0x0;this['talking']=0x0;this[_0x6d28('0x10')]=0x0;this[_0x6d28('0x11')]=0x0;this[_0x6d28('0x12')]=0x0;this[_0x6d28('0x13')]=0x0;this[_0x6d28('0x14')]=0x0;this[_0x6d28('0x15')]=0x0;this['abandoned']=0x0;this[_0x6d28('0x16')]=0x0;this[_0x6d28('0x17')]=0x0;this[_0x6d28('0x18')]=_0x4bc30e['acw']||![];this['acwTimeout']=_0x4bc30e[_0x6d28('0x19')]||0xa;this[_0x6d28('0x1a')]=_0x4bc30e[_0x6d28('0x1a')]||'no';this[_0x6d28('0x1b')]=!![];this[_0x6d28('0x1c')]='';this[_0x6d28('0x1d')]=0x0;this['temp']=0x0;this[_0x6d28('0x1e')]=_0x4bc30e[_0x6d28('0x1e')]||null;this['dialGlobalInterval']=_0x4bc30e[_0x6d28('0x1f')]?_0x4bc30e['dialGlobalInterval']:null;this[_0x6d28('0x20')]=_0x4bc30e[_0x6d28('0x20')];this['dialMethod']=_0x4bc30e[_0x6d28('0x21')]||_0x6d28('0x22');this[_0x6d28('0x23')]=_0x4bc30e['dialLimitChannel']||0x0;this[_0x6d28('0x24')]=_0x4bc30e[_0x6d28('0x24')]||0x0;this[_0x6d28('0x25')]=_0x4bc30e[_0x6d28('0x25')]||0x1;this[_0x6d28('0x26')]=_0x4bc30e['dialPredictiveOptimization']||_0x6d28('0x27');this[_0x6d28('0x28')]=_0x4bc30e[_0x6d28('0x28')]||0.03;this['dialPredictiveInterval']=_0x4bc30e[_0x6d28('0x29')]||0x258;this[_0x6d28('0x2a')]=_0x4bc30e[_0x6d28('0x2a')]||'anonymous';this[_0x6d28('0x2b')]=_0x4bc30e[_0x6d28('0x2b')]||_0x6d28('0x2c');this[_0x6d28('0x2d')]=_0x4bc30e[_0x6d28('0x2d')]||0x1e;this['dialQueueOptions']=_0x4bc30e['dialQueueOptions']||_0x6d28('0x2e');this['dialQueueTimeout']=_0x4bc30e[_0x6d28('0x2f')]||0x3;this[_0x6d28('0x30')]=_0x4bc30e[_0x6d28('0x30')]||undefined;this[_0x6d28('0x31')]=_0x4bc30e['dialCongestionMaxRetry']||0x3;this[_0x6d28('0x32')]=_0x4bc30e[_0x6d28('0x32')]||0x96;this[_0x6d28('0x33')]=_0x4bc30e[_0x6d28('0x33')]||0x3;this[_0x6d28('0x34')]=_0x4bc30e[_0x6d28('0x34')]||0x96;this['dialNoAnswerMaxRetry']=_0x4bc30e['dialNoAnswerMaxRetry']||0x3;this[_0x6d28('0x35')]=_0x4bc30e[_0x6d28('0x35')]||0x96;this[_0x6d28('0x36')]=_0x4bc30e['dialNoSuchNumberMaxRetry']||0x3;this[_0x6d28('0x37')]=_0x4bc30e[_0x6d28('0x37')]||0x96;this[_0x6d28('0x38')]=_0x4bc30e[_0x6d28('0x38')]||0x3;this[_0x6d28('0x39')]=_0x4bc30e['dialDropRetryFrequency']||0x96;this[_0x6d28('0x3a')]=_0x4bc30e['dialAbandonedMaxRetry']||0x3;this['dialAbandonedRetryFrequency']=_0x4bc30e['dialAbandonedRetryFrequency']||0x96;this[_0x6d28('0x3b')]=_0x4bc30e[_0x6d28('0x3b')]||0x3;this[_0x6d28('0x3c')]=_0x4bc30e['dialMachineRetryFrequency']||0x96;this[_0x6d28('0x3d')]=_0x4bc30e[_0x6d28('0x3d')]||0x3;this['dialAgentRejectRetryFrequency']=_0x4bc30e[_0x6d28('0x3e')]||0x96;this[_0x6d28('0x3f')]=_0x4bc30e[_0x6d28('0x3f')]||0x4;this['Trunk']=_0x4bc30e[_0x6d28('0x40')]?_0x4bc30e[_0x6d28('0x40')]:undefined;this[_0x6d28('0x41')]=_0x4bc30e['TrunkBackup']?_0x4bc30e['TrunkBackup']:undefined;this[_0x6d28('0x42')]=_0x4bc30e[_0x6d28('0x42')]||undefined;this[_0x6d28('0x43')]=_0x4bc30e[_0x6d28('0x43')]?_0x4bc30e['Interval']:undefined;this['dialOrderByScheduledAt']=_0x4bc30e['dialOrderByScheduledAt']||'DESC';this[_0x6d28('0x44')]=_0x4bc30e[_0x6d28('0x44')]||undefined;this[_0x6d28('0x45')]=_0x4bc30e[_0x6d28('0x45')]||undefined;this[_0x6d28('0x46')]=strategy[_0x4bc30e[_0x6d28('0x46')]]||_0x6d28('0xb');this[_0x6d28('0x47')]=!![];this[_0x6d28('0x48')]=_0x4bc30e['dialAMDActive']||![];this['dialAMDInitialSilence']=_0x4bc30e[_0x6d28('0x49')];this[_0x6d28('0x4a')]=_0x4bc30e[_0x6d28('0x4a')];this[_0x6d28('0x4b')]=_0x4bc30e[_0x6d28('0x4b')];this['dialAMDTotalAnalysisTime']=_0x4bc30e[_0x6d28('0x4c')];this['dialAMDMinWordLength']=_0x4bc30e[_0x6d28('0x4d')];this['dialAMDBetweenWordsSilence']=_0x4bc30e[_0x6d28('0x4e')];this['dialAMDMaximumNumberOfWords']=_0x4bc30e[_0x6d28('0x4f')];this[_0x6d28('0x50')]=_0x4bc30e[_0x6d28('0x50')];this[_0x6d28('0x51')]=_0x4bc30e[_0x6d28('0x51')];this[_0x6d28('0x52')]=0x0;this[_0x6d28('0x53')]=0x0;this[_0x6d28('0x54')]=_0x4bc30e['timeout'];this['outboundAnswerCallsDay']=0x0;this[_0x6d28('0x55')]=0x0;this[_0x6d28('0x56')]=0x0;this[_0x6d28('0x57')]=0x0;this[_0x6d28('0x58')]=0x0;this[_0x6d28('0x59')]=0x0;this['outboundUnknownCallsDay']=0x0;this[_0x6d28('0x5a')]=0x0;this[_0x6d28('0x5b')]=0x0;this[_0x6d28('0x5c')]=0x0;this[_0x6d28('0x5d')]=0x0;this[_0x6d28('0x5e')]=0x0;this[_0x6d28('0x5f')]=0x0;this[_0x6d28('0x60')]=0x0;this[_0x6d28('0x61')]=undefined;this[_0x6d28('0x62')]=undefined;this['handlePredictive']=undefined;this[_0x6d28('0x63')]=1.05;this[_0x6d28('0x64')]=0x0;this[_0x6d28('0x65')]=0x0;this['predictiveIntervalDroppedCallsCallersExit']=0x0;this['predictiveIntervalDroppedCallsTimeout']=0x0;this[_0x6d28('0x66')]=0x0;this['predictiveIntervalAvgTalktime']=0x0;this[_0x6d28('0x67')]=0x0;this[_0x6d28('0x68')]=0x0;this[_0x6d28('0x69')]=_0x4bc30e[_0x6d28('0x6a')]||0x14;this['predictiveIntervalMinThreshold']=_0x4bc30e['dialPredictiveIntervalMaxThreshold']||0xa;this['predictiveIntervalErlangCalls']=0x0;this[_0x6d28('0x6b')]=0x0;this['predictiveIntervalHitRate']=0x1;this[_0x6d28('0x6c')]=0x0;this[_0x6d28('0x6d')]=0x0;this[_0x6d28('0x6e')]=0x0;this[_0x6d28('0x6f')]=0x0;this[_0x6d28('0x70')]=_0x4bc30e[_0x6d28('0x70')]||0x1e;this[_0x6d28('0x71')]=_0x4bc30e['dialRecallInQueue']||![];this[_0x6d28('0x72')]=_0x4bc30e[_0x6d28('0x72')]||undefined;this[_0x6d28('0x73')]=_0x4bc30e[_0x6d28('0x73')]||![];this[_0x6d28('0x74')]=_0x4bc30e['dialAgiAfterHangupAgent']||![];this[_0x6d28('0xd')]=monitorFormat[_0x4bc30e[_0x6d28('0xd')]]?monitorFormat[_0x4bc30e[_0x6d28('0xd')]]:undefined;this['mandatoryDisposition']=_0x4bc30e[_0x6d28('0x75')]||![];this[_0x6d28('0x76')]=_0x4bc30e[_0x6d28('0x76')]?_0x4bc30e[_0x6d28('0x76')]:undefined;}module['exports']=VoiceQueue;