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