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