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