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