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