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