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