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