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