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