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