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