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