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