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