5d2d403cb44fa05c85d460155ed8b4470677c25b
[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 _0xae75=['dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','callAdditionalPhoneAfterMin','dialGlobalMaxRetry','Trunk','TrunkBackup','dialPrefix','Interval','dialOrderByScheduledAt','DESC','dialRandomLastDigitCallerIdNumber','dialCutDigit','strategy','queueStatusComplete','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','outboundRejectCallsDay','pTalking','timeout','outboundAnswerCallsDay','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundUnknownCallsDay','outboundOriginateFailureCallsDay','outboundDropCallsDayTimeout','outboundDropCallsDayACS','outboundReCallsDay','outboundAbandonedDay','startProgressive','startPredictive','handlePredictive','predictiveIntervalMultiplicativeFactor','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','dialPredictiveIntervalMaxThreshold','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','erlangCallToSecond','erlangAbandonmentRate','dialRecallMeTimeout','dialRecallInQueue','dialPreviewRecallmeReminder','dialQueueProject2','dialAgiAfterHangupClient','dialAgiAfterHangupAgent','mandatoryDisposition','mandatoryDispositionPause','exports','wav','wav49','fewestcalls','leastrecent','linear','random','ringall','roundrobin','rrmemory','rrordered','wrandom','name','monitor_format','type','waiting','total','sumHoldTime','sumBillable','abandoned','busy','invalid','loggedIn','notInUse','onHold','paused','ringing','talking','unavailable','acw','acwTimeout','autopause','sendMessageOneNotActive','message','originated','dialGlobalInterval','dialMethod','progressive','dialLimitChannel','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dropRate','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','anonymous','dialOriginateTimeout','dialQueueOptions','tTxX','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency'];(function(_0x66f441,_0x4997cd){var _0xc5edd7=function(_0x5864a9){while(--_0x5864a9){_0x66f441['push'](_0x66f441['shift']());}};_0xc5edd7(++_0x4997cd);}(_0xae75,0xce));var _0x5ae7=function(_0x520b00,_0x302b5d){_0x520b00=_0x520b00-0x0;var _0x4b2cca=_0xae75[_0x520b00];return _0x4b2cca;};'use strict';var monitorFormat={'wav':_0x5ae7('0x0'),'wav49':_0x5ae7('0x1'),'gsm':'gsm'};var strategy={'fewestcalls':_0x5ae7('0x2'),'leastrecent':_0x5ae7('0x3'),'linear':_0x5ae7('0x4'),'random':_0x5ae7('0x5'),'ringall':_0x5ae7('0x6'),'rr':_0x5ae7('0x7'),'rrmemory':_0x5ae7('0x8'),'rrordered':_0x5ae7('0x9'),'wrandom':_0x5ae7('0xa')};function VoiceQueue(_0x33d211){this['id']=_0x33d211['id']||0x0;this[_0x5ae7('0xb')]=_0x33d211[_0x5ae7('0xb')]||'';this[_0x5ae7('0xc')]=_0x33d211[_0x5ae7('0xc')]||'';this[_0x5ae7('0xd')]=_0x33d211[_0x5ae7('0xd')]||'inbound';this[_0x5ae7('0xe')]=0x0;this[_0x5ae7('0xf')]=0x0;this['answered']=0x0;this['sumDuration']=0x0;this[_0x5ae7('0x10')]=0x0;this[_0x5ae7('0x11')]=0x0;this['unmanaged']=0x0;this[_0x5ae7('0x12')]=0x0;this['available']=0x0;this[_0x5ae7('0x13')]=0x0;this['inUse']=0x0;this[_0x5ae7('0x14')]=0x0;this[_0x5ae7('0x15')]=0x0;this[_0x5ae7('0x16')]=0x0;this[_0x5ae7('0x17')]=0x0;this[_0x5ae7('0x18')]=0x0;this[_0x5ae7('0x19')]=0x0;this['ringInUse']=0x0;this[_0x5ae7('0x1a')]=0x0;this[_0x5ae7('0x1b')]=0x0;this['unknown']=0x0;this[_0x5ae7('0x1c')]=_0x33d211[_0x5ae7('0x1c')]||![];this[_0x5ae7('0x1d')]=_0x33d211[_0x5ae7('0x1d')]||0xa;this[_0x5ae7('0x1e')]=_0x33d211[_0x5ae7('0x1e')]||'no';this[_0x5ae7('0x1f')]=!![];this[_0x5ae7('0x20')]='';this['statusMessage']='';this[_0x5ae7('0x21')]=0x0;this['temp']=0x0;this['dialTimezone']=_0x33d211['dialTimezone']||null;this[_0x5ae7('0x22')]=_0x33d211['dialGlobalInterval']?_0x33d211['dialGlobalInterval']:null;this['dialActive']=_0x33d211['dialActive'];this[_0x5ae7('0x23')]=_0x33d211[_0x5ae7('0x23')]||_0x5ae7('0x24');this[_0x5ae7('0x25')]=_0x33d211['dialLimitChannel']||0x0;this[_0x5ae7('0x26')]=_0x33d211[_0x5ae7('0x26')]||0x0;this[_0x5ae7('0x27')]=_0x33d211[_0x5ae7('0x27')]||0x1;this[_0x5ae7('0x28')]=_0x33d211[_0x5ae7('0x28')]||_0x5ae7('0x29');this[_0x5ae7('0x2a')]=_0x33d211[_0x5ae7('0x2a')]||0.03;this[_0x5ae7('0x2b')]=_0x33d211[_0x5ae7('0x2b')]||0x258;this[_0x5ae7('0x2c')]=_0x33d211[_0x5ae7('0x2c')]||'anonymous';this[_0x5ae7('0x2d')]=_0x33d211[_0x5ae7('0x2d')]||_0x5ae7('0x2e');this[_0x5ae7('0x2f')]=_0x33d211[_0x5ae7('0x2f')]||0x1e;this['dialQueueOptions']=_0x33d211[_0x5ae7('0x30')]||_0x5ae7('0x31');this[_0x5ae7('0x32')]=_0x33d211[_0x5ae7('0x32')]||0x3;this[_0x5ae7('0x33')]=_0x33d211['dialQueueProject']||undefined;this[_0x5ae7('0x34')]=_0x33d211[_0x5ae7('0x34')]||0x3;this['dialCongestionRetryFrequency']=_0x33d211[_0x5ae7('0x35')]||0x96;this[_0x5ae7('0x36')]=_0x33d211[_0x5ae7('0x36')]||0x3;this[_0x5ae7('0x37')]=_0x33d211[_0x5ae7('0x37')]||0x96;this[_0x5ae7('0x38')]=_0x33d211[_0x5ae7('0x38')]||0x3;this[_0x5ae7('0x39')]=_0x33d211[_0x5ae7('0x39')]||0x96;this['dialNoSuchNumberMaxRetry']=_0x33d211[_0x5ae7('0x3a')]||0x3;this[_0x5ae7('0x3b')]=_0x33d211[_0x5ae7('0x3b')]||0x96;this[_0x5ae7('0x3c')]=_0x33d211[_0x5ae7('0x3c')]||0x3;this[_0x5ae7('0x3d')]=_0x33d211[_0x5ae7('0x3d')]||0x96;this['dialAbandonedMaxRetry']=_0x33d211['dialAbandonedMaxRetry']||0x3;this['dialAbandonedRetryFrequency']=_0x33d211[_0x5ae7('0x3e')]||0x96;this[_0x5ae7('0x3f')]=_0x33d211[_0x5ae7('0x3f')]||0x3;this['dialMachineRetryFrequency']=_0x33d211[_0x5ae7('0x40')]||0x96;this['dialAgentRejectMaxRetry']=_0x33d211[_0x5ae7('0x41')]||0x3;this[_0x5ae7('0x42')]=_0x33d211[_0x5ae7('0x42')]||0x96;this[_0x5ae7('0x43')]=_0x33d211[_0x5ae7('0x43')]||0x3;this[_0x5ae7('0x44')]=_0x33d211[_0x5ae7('0x44')]||0x4;this['Trunk']=_0x33d211[_0x5ae7('0x45')]?_0x33d211['Trunk']:undefined;this['TrunkBackup']=_0x33d211['TrunkBackup']?_0x33d211[_0x5ae7('0x46')]:undefined;this[_0x5ae7('0x47')]=_0x33d211[_0x5ae7('0x47')]||undefined;this[_0x5ae7('0x48')]=_0x33d211['Interval']?_0x33d211[_0x5ae7('0x48')]:undefined;this[_0x5ae7('0x49')]=_0x33d211[_0x5ae7('0x49')]||_0x5ae7('0x4a');this[_0x5ae7('0x4b')]=_0x33d211[_0x5ae7('0x4b')]||undefined;this[_0x5ae7('0x4c')]=_0x33d211[_0x5ae7('0x4c')]||undefined;this[_0x5ae7('0x4d')]=strategy[_0x33d211[_0x5ae7('0x4d')]];this[_0x5ae7('0x4e')]=!![];this[_0x5ae7('0x4f')]=_0x33d211[_0x5ae7('0x4f')]||![];this[_0x5ae7('0x50')]=_0x33d211['dialAMDInitialSilence'];this[_0x5ae7('0x51')]=_0x33d211['dialAMDGreeting'];this[_0x5ae7('0x52')]=_0x33d211['dialAMDAfterGreetingSilence'];this['dialAMDTotalAnalysisTime']=_0x33d211[_0x5ae7('0x53')];this[_0x5ae7('0x54')]=_0x33d211[_0x5ae7('0x54')];this[_0x5ae7('0x55')]=_0x33d211[_0x5ae7('0x55')];this['dialAMDMaximumNumberOfWords']=_0x33d211[_0x5ae7('0x56')];this[_0x5ae7('0x57')]=_0x33d211[_0x5ae7('0x57')];this[_0x5ae7('0x58')]=_0x33d211[_0x5ae7('0x58')];this[_0x5ae7('0x59')]=0x0;this[_0x5ae7('0x5a')]=0x0;this[_0x5ae7('0x5b')]=_0x33d211['timeout'];this[_0x5ae7('0x5c')]=0x0;this[_0x5ae7('0x5d')]=0x0;this[_0x5ae7('0x5e')]=0x0;this[_0x5ae7('0x5f')]=0x0;this[_0x5ae7('0x60')]=0x0;this[_0x5ae7('0x61')]=0x0;this[_0x5ae7('0x62')]=0x0;this['outboundBlacklistCallsDay']=0x0;this[_0x5ae7('0x63')]=0x0;this['outboundDropCallsDayCallersExit']=0x0;this[_0x5ae7('0x64')]=0x0;this[_0x5ae7('0x65')]=0x0;this[_0x5ae7('0x66')]=0x0;this[_0x5ae7('0x67')]=0x0;this[_0x5ae7('0x68')]=undefined;this[_0x5ae7('0x69')]=undefined;this[_0x5ae7('0x6a')]=undefined;this[_0x5ae7('0x6b')]=1.05;this[_0x5ae7('0x6c')]=0x0;this[_0x5ae7('0x6d')]=0x0;this[_0x5ae7('0x6e')]=0x0;this[_0x5ae7('0x6f')]=0x0;this[_0x5ae7('0x70')]=0x0;this[_0x5ae7('0x71')]=0x0;this[_0x5ae7('0x72')]=0x0;this[_0x5ae7('0x73')]=0x0;this[_0x5ae7('0x74')]=_0x33d211[_0x5ae7('0x75')]||0x14;this['predictiveIntervalMinThreshold']=_0x33d211['dialPredictiveIntervalMaxThreshold']||0xa;this[_0x5ae7('0x76')]=0x0;this[_0x5ae7('0x77')]=0x0;this['predictiveIntervalHitRate']=0x1;this['erlangCalls']=0x0;this[_0x5ae7('0x78')]=0x0;this[_0x5ae7('0x79')]=0x0;this['erlangBusyFactor']=0x0;this[_0x5ae7('0x7a')]=_0x33d211[_0x5ae7('0x7a')]||0x1e;this[_0x5ae7('0x7b')]=_0x33d211[_0x5ae7('0x7b')]||![];this['dialPreviewAutoRecallMe']=!!_0x33d211['dialPreviewAutoRecallMe']||![];this['dialPreviewRecallmeReminder']=!!_0x33d211[_0x5ae7('0x7c')]||![];this[_0x5ae7('0x7d')]=_0x33d211[_0x5ae7('0x7d')]||undefined;this[_0x5ae7('0x7e')]=_0x33d211['dialAgiAfterHangupClient']||![];this[_0x5ae7('0x7f')]=_0x33d211[_0x5ae7('0x7f')]||![];this[_0x5ae7('0xc')]=monitorFormat[_0x33d211[_0x5ae7('0xc')]]?monitorFormat[_0x33d211[_0x5ae7('0xc')]]:undefined;this[_0x5ae7('0x80')]=_0x33d211[_0x5ae7('0x80')]||![];this[_0x5ae7('0x81')]=_0x33d211[_0x5ae7('0x81')]?_0x33d211[_0x5ae7('0x81')]:undefined;this['queueSummaryCountersUpdated']=![];}module[_0x5ae7('0x82')]=VoiceQueue;