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