Built motion from commit 44377920.|2.6.11
[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 _0x4845=['dialOriginateCallerIdName','anonymous','dialOriginateCallerIdNumber','dialOriginateTimeout','dialQueueOptions','tTxX','dialQueueProject','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','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','outboundRejectCallsDay','pTalking','timeout','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundUnknownCallsDay','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundReCallsDay','outboundAbandonedDay','startPredictive','handlePredictive','predictiveIntervalMultiplicativeFactor','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalAvgTalktime','predictiveIntervalPauses','predictiveIntervalMaxThreshold','dialPredictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialRecallMeTimeout','dialRecallInQueue','dialPreviewAutoRecallMe','dialPreviewRecallmeReminder','dialQueueProject2','dialAgiAfterHangupClient','dialAgiAfterHangupAgent','mandatoryDisposition','mandatoryDispositionPause','queueSummaryCountersUpdated','exports','wav','wav49','gsm','fewestcalls','leastrecent','linear','random','roundrobin','rrmemory','rrordered','name','monitor_format','type','inbound','waiting','total','sumDuration','sumHoldTime','unmanaged','abandoned','busy','loggedIn','notInUse','paused','ringing','ringInUse','talking','unavailable','unknown','acw','acwTimeout','statusMessage','originated','temp','dialTimezone','dialGlobalInterval','dialActive','dialMethod','progressive','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dropRate','dialPredictiveOptimizationPercentage','dialPredictiveInterval'];(function(_0x3947c9,_0x4d6c97){var _0x2e7871=function(_0x1236cc){while(--_0x1236cc){_0x3947c9['push'](_0x3947c9['shift']());}};_0x2e7871(++_0x4d6c97);}(_0x4845,0x165));var _0x5484=function(_0x2cda96,_0x30e611){_0x2cda96=_0x2cda96-0x0;var _0x5e82fa=_0x4845[_0x2cda96];return _0x5e82fa;};'use strict';var monitorFormat={'wav':_0x5484('0x0'),'wav49':_0x5484('0x1'),'gsm':_0x5484('0x2')};var strategy={'fewestcalls':_0x5484('0x3'),'leastrecent':_0x5484('0x4'),'linear':_0x5484('0x5'),'random':_0x5484('0x6'),'ringall':'ringall','rr':_0x5484('0x7'),'rrmemory':_0x5484('0x8'),'rrordered':_0x5484('0x9'),'wrandom':'wrandom'};function VoiceQueue(_0x2f38e6){this['id']=_0x2f38e6['id']||0x0;this[_0x5484('0xa')]=_0x2f38e6[_0x5484('0xa')]||'';this[_0x5484('0xb')]=_0x2f38e6[_0x5484('0xb')]||'';this[_0x5484('0xc')]=_0x2f38e6[_0x5484('0xc')]||_0x5484('0xd');this[_0x5484('0xe')]=0x0;this[_0x5484('0xf')]=0x0;this['answered']=0x0;this[_0x5484('0x10')]=0x0;this[_0x5484('0x11')]=0x0;this['sumBillable']=0x0;this[_0x5484('0x12')]=0x0;this[_0x5484('0x13')]=0x0;this['available']=0x0;this[_0x5484('0x14')]=0x0;this['inUse']=0x0;this['invalid']=0x0;this[_0x5484('0x15')]=0x0;this[_0x5484('0x16')]=0x0;this['onHold']=0x0;this[_0x5484('0x17')]=0x0;this[_0x5484('0x18')]=0x0;this[_0x5484('0x19')]=0x0;this[_0x5484('0x1a')]=0x0;this[_0x5484('0x1b')]=0x0;this[_0x5484('0x1c')]=0x0;this[_0x5484('0x1d')]=_0x2f38e6[_0x5484('0x1d')]||![];this['acwTimeout']=_0x2f38e6[_0x5484('0x1e')]||0xa;this['autopause']=_0x2f38e6['autopause']||'no';this['sendMessageOneNotActive']=!![];this['message']='';this[_0x5484('0x1f')]='';this[_0x5484('0x20')]=0x0;this[_0x5484('0x21')]=0x0;this[_0x5484('0x22')]=_0x2f38e6[_0x5484('0x22')]||null;this[_0x5484('0x23')]=_0x2f38e6['dialGlobalInterval']?_0x2f38e6[_0x5484('0x23')]:null;this[_0x5484('0x24')]=_0x2f38e6[_0x5484('0x24')];this[_0x5484('0x25')]=_0x2f38e6[_0x5484('0x25')]||_0x5484('0x26');this['dialLimitChannel']=_0x2f38e6['dialLimitChannel']||0x0;this[_0x5484('0x27')]=_0x2f38e6[_0x5484('0x27')]||0x0;this[_0x5484('0x28')]=_0x2f38e6[_0x5484('0x28')]||0x1;this[_0x5484('0x29')]=_0x2f38e6['dialPredictiveOptimization']||_0x5484('0x2a');this[_0x5484('0x2b')]=_0x2f38e6[_0x5484('0x2b')]||0.03;this['dialPredictiveInterval']=_0x2f38e6[_0x5484('0x2c')]||0x258;this[_0x5484('0x2d')]=_0x2f38e6[_0x5484('0x2d')]||_0x5484('0x2e');this['dialOriginateCallerIdNumber']=_0x2f38e6[_0x5484('0x2f')]||'anonymous';this[_0x5484('0x30')]=_0x2f38e6['dialOriginateTimeout']||0x1e;this[_0x5484('0x31')]=_0x2f38e6['dialQueueOptions']||_0x5484('0x32');this['dialQueueTimeout']=_0x2f38e6['dialQueueTimeout']||0x3;this['dialQueueProject']=_0x2f38e6[_0x5484('0x33')]||undefined;this['dialCongestionMaxRetry']=_0x2f38e6[_0x5484('0x34')]||0x3;this['dialCongestionRetryFrequency']=_0x2f38e6[_0x5484('0x35')]||0x96;this['dialBusyMaxRetry']=_0x2f38e6[_0x5484('0x36')]||0x3;this[_0x5484('0x37')]=_0x2f38e6[_0x5484('0x37')]||0x96;this['dialNoAnswerMaxRetry']=_0x2f38e6[_0x5484('0x38')]||0x3;this[_0x5484('0x39')]=_0x2f38e6['dialNoAnswerRetryFrequency']||0x96;this[_0x5484('0x3a')]=_0x2f38e6['dialNoSuchNumberMaxRetry']||0x3;this[_0x5484('0x3b')]=_0x2f38e6[_0x5484('0x3b')]||0x96;this[_0x5484('0x3c')]=_0x2f38e6[_0x5484('0x3c')]||0x3;this[_0x5484('0x3d')]=_0x2f38e6['dialDropRetryFrequency']||0x96;this[_0x5484('0x3e')]=_0x2f38e6['dialAbandonedMaxRetry']||0x3;this[_0x5484('0x3f')]=_0x2f38e6[_0x5484('0x3f')]||0x96;this[_0x5484('0x40')]=_0x2f38e6[_0x5484('0x40')]||0x3;this[_0x5484('0x41')]=_0x2f38e6[_0x5484('0x41')]||0x96;this[_0x5484('0x42')]=_0x2f38e6[_0x5484('0x42')]||0x3;this['dialAgentRejectRetryFrequency']=_0x2f38e6[_0x5484('0x43')]||0x96;this[_0x5484('0x44')]=_0x2f38e6[_0x5484('0x44')]||0x3;this[_0x5484('0x45')]=_0x2f38e6[_0x5484('0x45')]||0x4;this[_0x5484('0x46')]=_0x2f38e6['Trunk']?_0x2f38e6['Trunk']:undefined;this['TrunkBackup']=_0x2f38e6['TrunkBackup']?_0x2f38e6[_0x5484('0x47')]:undefined;this[_0x5484('0x48')]=_0x2f38e6[_0x5484('0x48')]||undefined;this[_0x5484('0x49')]=_0x2f38e6['Interval']?_0x2f38e6[_0x5484('0x49')]:undefined;this[_0x5484('0x4a')]=_0x2f38e6[_0x5484('0x4a')]||_0x5484('0x4b');this['dialRandomLastDigitCallerIdNumber']=_0x2f38e6[_0x5484('0x4c')]||undefined;this['dialCutDigit']=_0x2f38e6[_0x5484('0x4d')]||undefined;this[_0x5484('0x4e')]=strategy[_0x2f38e6[_0x5484('0x4e')]];this['queueStatusComplete']=!![];this[_0x5484('0x4f')]=_0x2f38e6[_0x5484('0x4f')]||![];this[_0x5484('0x50')]=_0x2f38e6['dialAMDInitialSilence'];this[_0x5484('0x51')]=_0x2f38e6[_0x5484('0x51')];this['dialAMDAfterGreetingSilence']=_0x2f38e6[_0x5484('0x52')];this[_0x5484('0x53')]=_0x2f38e6[_0x5484('0x53')];this[_0x5484('0x54')]=_0x2f38e6[_0x5484('0x54')];this[_0x5484('0x55')]=_0x2f38e6[_0x5484('0x55')];this[_0x5484('0x56')]=_0x2f38e6[_0x5484('0x56')];this[_0x5484('0x57')]=_0x2f38e6[_0x5484('0x57')];this['dialAMDMaximumWordLength']=_0x2f38e6[_0x5484('0x58')];this[_0x5484('0x59')]=0x0;this[_0x5484('0x5a')]=0x0;this[_0x5484('0x5b')]=_0x2f38e6['timeout'];this['outboundAnswerCallsDay']=0x0;this[_0x5484('0x5c')]=0x0;this[_0x5484('0x5d')]=0x0;this[_0x5484('0x5e')]=0x0;this[_0x5484('0x5f')]=0x0;this[_0x5484('0x60')]=0x0;this[_0x5484('0x61')]=0x0;this[_0x5484('0x62')]=0x0;this[_0x5484('0x63')]=0x0;this[_0x5484('0x64')]=0x0;this[_0x5484('0x65')]=0x0;this['outboundDropCallsDayACS']=0x0;this[_0x5484('0x66')]=0x0;this[_0x5484('0x67')]=0x0;this['startProgressive']=undefined;this[_0x5484('0x68')]=undefined;this[_0x5484('0x69')]=undefined;this[_0x5484('0x6a')]=1.05;this[_0x5484('0x6b')]=0x0;this[_0x5484('0x6c')]=0x0;this[_0x5484('0x6d')]=0x0;this[_0x5484('0x6e')]=0x0;this['predictiveIntervalAvgHoldtime']=0x0;this[_0x5484('0x6f')]=0x0;this[_0x5484('0x70')]=0x0;this['predictiveIntervalAvailable']=0x0;this[_0x5484('0x71')]=_0x2f38e6[_0x5484('0x72')]||0x14;this[_0x5484('0x73')]=_0x2f38e6[_0x5484('0x72')]||0xa;this[_0x5484('0x74')]=0x0;this[_0x5484('0x75')]=0x0;this[_0x5484('0x76')]=0x1;this[_0x5484('0x77')]=0x0;this[_0x5484('0x78')]=0x0;this[_0x5484('0x79')]=0x0;this[_0x5484('0x7a')]=0x0;this[_0x5484('0x7b')]=_0x2f38e6[_0x5484('0x7b')]||0x1e;this[_0x5484('0x7c')]=_0x2f38e6[_0x5484('0x7c')]||![];this[_0x5484('0x7d')]=!!_0x2f38e6[_0x5484('0x7d')]||![];this[_0x5484('0x7e')]=!!_0x2f38e6['dialPreviewRecallmeReminder']||![];this['dialQueueProject2']=_0x2f38e6[_0x5484('0x7f')]||undefined;this[_0x5484('0x80')]=_0x2f38e6[_0x5484('0x80')]||![];this['dialAgiAfterHangupAgent']=_0x2f38e6[_0x5484('0x81')]||![];this[_0x5484('0xb')]=monitorFormat[_0x2f38e6[_0x5484('0xb')]]?monitorFormat[_0x2f38e6['monitor_format']]:undefined;this['mandatoryDisposition']=_0x2f38e6[_0x5484('0x82')]||![];this[_0x5484('0x83')]=_0x2f38e6[_0x5484('0x83')]?_0x2f38e6[_0x5484('0x83')]:undefined;this[_0x5484('0x84')]=![];}module[_0x5484('0x85')]=VoiceQueue;