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