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