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