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