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