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