Built motion from commit bbec7235.|2.6.20
[motion2.git] / server / services / ami / dialer / index.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 _0xefb9=['membername','buildObj','saveInDb','[syncHangupInAMD]','value','Machine','AMD','amd','[syncAgentComplete][createHistory][0]','countnosuchnumberretry','countmachineretry','countagentrejectretry','dialGlobalMaxRetry','stateGlobal','dialMachineMaxRetry','createStateFinal','dialMachineRetryFrequency','[rescheduleContact][Machine]','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','MACHINE','custom:amd','countbusyretry','countcongestionretry','countnoanswerretry','reason19\x20machine....','reason\x2019\x20machine....','ivrAnswerCallsDay','[syncHangupIvr][createHistory]','[syncHangupIvr]','dialQueueProject','AnswerAGI','outboundUnknownCallsDay','cause-txt','Unknow','running','isPreviewCampaign','getQueueCampaignStatusMessage','statusMessage','available','inUse','talking','ACTIVE','checkDialMethod','[syncQueueSummary]','compareToOutboundQueue','queueSummaryCountersUpdated','assign','throttle','filter','handlePreviewRecallNotifications','map','Agent','checkPreviewRecallReminder','clearZombieChannels','[uniqueid]','[actions]','sequence','[Dialer][checkChannel]','[Dialer][checkChannel][ivr]','getVoiceQueueRtPauses','undefined','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','emptyContact','notFound','UserId','[emptyContact][createHistory]','user:%s','user:dialPreviewRecallReminder','actionOriginate','originate','voiceQueue\x20is\x20undefine','phone','contact\x20is\x20undefine','getCaller','NONE','\x22agi://%s/square,%s\x22','isOutboundQueue','dialQueueOptions','XMD-AMDINITIALSILENCE','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDGreeting','XMD-AMDAFTERGREETINGSILENCE','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','XMD-AMDMINWORDLENGTH','dialAMDMinWordLength','XMD-AMDBETWEENWORDSSILENCE','dialAMDBetweenWordsSilence','XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','dialAMDMaximumWordLength','XMD-CAMPAIGNID','Contact','Trunk','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','dialOriginateCallerIdNumber','TrunkBackup','callerid','getCallerIdRandom','XMD-ORIGINATECALLERIDNAME','extractCalleridName','XMD-ORIGINATECALLERIDNUM','SIP/%s/%s%s','dialPrefix','dialCutDigit','substring','from-sip','dialOriginateTimeout','outboundOriginateFailureCallsDay','OriginateError','[originate][error]','Error','originate\x20action\x20Error','checkRetriveMax','[rescheduleContact][NoAnswer]','dialBusyMaxRetry','[rescheduleContact]\x20[Busy]','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialNoSuchNumberRetryFrequency','[rescheduleContact][Abandoned]','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','[rescheduleContact][AgentReject]','object','[callProgressDetecting]','entity\x20is\x20undefine','evt\x20is\x20undefine','NoSuchNumber','custom:agentnosuchnumber','nosuchnumber','dialNoSuchNumberMaxRetry','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','NoAnswer','buildNoAnswerEventPayload','dialNoAnswerRetryFrequency','[syncAgentComplete][createHistory][3]','dialNoAnswerMaxRetry','reason\x203\x20ringing\x20no\x20answer','Busy','custom:agentbusy','busy','dialBusyRetryFrequency','[syncAgentComplete][createHistory][5]','outboundCongestionCallsDay','Congestion','custom:agentcongestion','[syncAgentComplete][createHistory][8]','reason\x208\x20congestion','reason\x2011\x20abandoned','outboundRejectCallsDay','AgentReject','custom:agentreject','agentreject','[syncAgentComplete][createHistory][20]','[syncAgentComplete][createHistory][?]','Global','[moveContactManagedDialer][0]','dialPredictiveOptimizationPercentage','round','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','floor','erlangCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','dialPredictiveInterval','[startMethodPredictive][StartProgressive][Loop]','dialPredictiveOptimization','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Drop\x20in\x20this\x20interval','startMethodPredictive','Predictive\x20after\x20first\x20interval','recalculate\x20predictive\x20at','avgHandleTime','getDataPredictive','Predictive\x20for\x20every\x20interval',')\x20are\x20less\x20than\x20threshold\x20(','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20more\x20than\x20threshold\x20(','abandonmentRate','agentBusyFactor','[getDataPredictive]','Unknown\x20Predictive','getDataPredictiveOld','loggedIn','outboundQueuePauses','predictiveIntervalPauses','[CatchErlangB]','busyFactor','one\x20call\x20every:','milliseconds','fail\x20to\x20scheduled\x20calls','checkContactBlack','recallme','[booked][checkContactBlack]','Queue:\x20','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','scheduledat','dialRecallMeTimeout','voicePause','unlockContact','outboundReCallsDay','dialRecallInQueue','[rescheduleContact][dialRecallInQueue]','RecallInQueue','[Originate][HistoryDialRecallInQueue][historyCatch]','RECALL_TIMEOUT','RecallFailedTimeout','[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]','Blacklist','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','handleIvr','limitCalls','temp','getContactDialerIvr','checkContactEmpty','[actionOriginate]\x20','checkIsBlackListIvr','loggerHandler','[actionOriginateIvr]\x20','[getContactCampaign2]','dialLimitQueue','pTalking','not_inuse','countReScheduled','[countReScheduled]\x20','RUNNING','checkIsBlackList','[getContactDialer2]','tryOriginatePredictive','[actionOriginatePredictive]\x20','[getContactDialerPredictive]','--------\x20Drop\x20Rate\x20--------','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','m\x20=\x20','[abandonmentRate]','Ts\x20=\x20','p\x20=\x20','interval\x20=\x20','Amax\x20=\x20','erlangb','----\x20Agent\x20Busy\x20Factor\x20----','Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[busyFactor]','Umin\x20=\x20','util','lodash','moment','ioredis','./utils','./utils/hopper','../preview/util/util','../../../config/environment/','../../../config/logger','dialer','booked','predictive','predictiveCalls','syncQueueSummary','../ami','redis','defaults','../rpc/cmHopper','../rpc/setting','../rpc/interval','./models/history','./models/final','./models/agentComplete','./models/queueCallerAbandon','./models/hangup','env','XCALLY_IP_AGI','127.0.0.1','enqueue','tail','finally','preview','voiceQueues','campaigns','trunks','maxNumberOriginate','channels','actions','uniqueId','optionPredictive','startPredictive','startProgressive','queueBooked','queueBookedRR','queuesSummary','agentconnect','queuecallerabandon','syncQueueCallerAbandon','bind','originateresponse','agentcomplete','custom:queuesummarycomplete','syncQueueSummaryComplete','syncHangup','newexten','syncNewExten','varset','syncVarSet','queuemember','syncQueueStatusComplete','loopCampaigns','loopClearZombieChannels','getSettings','previewRecallmeReminderInterval','isUndefined','emit','outbound','debug','format','voice:queue:%s','name','voice_queue:save','info','Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalTotalCalls','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAnsweredCalls','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsTimeout','predictiveIntervalAvgTalktime','Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive','predictiveIntervalAvgHoldtime','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','---------\x20ErlangB\x20---------','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCallToSecond','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangBusyFactor','erlangAbandonmentRate','---------------------------','merge','getSeconds','startProgressive\x20value\x20cleared','handlePredictive','handlePredictive\x20interval\x20cleared','error','checkContactLowerLimitOriginate','inspect','contactsRescheduled','CONTACTS_RESCHEDULED','contacts','CAMPAIGN_STATUS','NO_AVAILABLE_CONTACTS','[getContactDialer2][Empty]','starttime','queueStatusComplete','[unlockQueueStatus][undefined]','pick','Interval','message','NULL_INTERVAL','\x20INTERVAL_IS_NULL','Intervals','isEmpty','INACTIVE','\x20NOT\x20Active','isIVRCampaign','campaign:ivr:%s','campaign:save','sendMessageOneNotActive','originated','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','is\x20not\x20active','[ifTime][Action]','stringify','isTrunkReachable','active','status','reachable','SIP/%s','unmonitored','prototype','checkIsTrunkReachable','TRUNK_NOT_REACHABLE','\x20trunk\x20is\x20not\x20reachable','checkIfTime','checkIfTimeIntervals','ifTimeIvr','ifTime','Failure','\x20Intervals\x20is\x20null\x20','EMPTY_INTERVAL','\x20Intervals\x20is\x20empty\x20','timezones','UNKNOWN_TIMEZONE','\x20Timezone\x20unknow\x20','isArray','length','Action','command','iftime\x20%s,%s','interval','then','content','true','push','catch','all','some','OVERTIME_INTERVAL','[ifTime][promiseAll]','Global:\x20','\x20Interval\x20is\x20overtime:\x20','Timezone:\x20','resetActiveCalls','syncCampaigns','isIVRCampaignActive','resolve','dialGlobalInterval','dialMethod','progressive','handlePower','dialPowerLevel','Queue','method\x20not\x20recognized','dialTimezone','silly','Dialer::ifTime()','Voice\x20Queue\x20%s\x20$s','intervalIftime','OVERTIME_GLOBAL_INTERVAL','Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:','isGlobal','queue','uniqueid','type','ivr','updateOriginated','answertime','YYYY-MM-DD\x20HH:mm:ss','syncAgentComplete','outboundAnswerCallsDay','reason','agent','agiafterat','dialQueueProject2','dialAgiAfterHangupAgent','createHistory','[syncAgentComplete][createHistory]','moveContactManagedDialer','[syncAgentComplete]','droptime','dialQueueTimeout','outboundDropCallsDayTimeout','predictiveIntervalErlangCallsDroppedCalls','statedesc','Drop','dropreason','dialDropRetryFrequency','callAdditionalPhoneAfterMin','verifyAdditionalPhones','state','additional','dialDropMaxRetry','queueCallerAbandonCreateState','rescheduleContact','countdropretry','minutes','ContactId','ListId','VoiceQueueId','CampaignId','[rescheduleContact][Drop]','endtime','calleridname','calleridnum','[syncAgentComplete][createHistory][10]','swapAdditionalPhones','predictiveIntervalDroppedCallsCallersExit','Abandoned','CALLEREXIT','countabandonedretry','countglobal','dialAbandonedRetryFrequency','voiceQueue','dialAbandonedMaxRetry','add','[syncAgentComplete][createHistory][11]','channel','syncQueueMember','actionid','strategy','isNil','paused','agents','stateinterface','locked','rrmemory','run','idHopper','[Catch][Preview][syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','_rr','unlockRR','[booked][RR]','Agent:\x20','contactAgent-idHopper:\x20','[booked][RR][finaly]','[booked][unlock]','[booked][unlock2]','[unlock2][syncQueueStatusComplete]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','syncOriginateResponse','responsetime','getQueue','response','Success','callProgressDetecting','[callProgressDetecting]\x20','variable','amdstatus','exten','xcally-motion-dialer','dialAMDActive','HANGUP','outboundAnswerAgiCallsDay','HangupInAMD'];(function(_0x218cec,_0x5797e0){var _0x1a1756=function(_0x1980e9){while(--_0x1980e9){_0x218cec['push'](_0x218cec['shift']());}};_0x1a1756(++_0x5797e0);}(_0xefb9,0x10a));var _0x9efb=function(_0x409251,_0x40f525){_0x409251=_0x409251-0x0;var _0x216f47=_0xefb9[_0x409251];return _0x216f47;};'use strict';var util=require(_0x9efb('0x0'));var _=require(_0x9efb('0x1'));var uuid=require('uuid');var moment=require(_0x9efb('0x2'));var rr=require('rr');var Redis=require(_0x9efb('0x3'));var utils=require(_0x9efb('0x4'));var hopperUtils=require(_0x9efb('0x5'));var ut=require(_0x9efb('0x6'));var config=require(_0x9efb('0x7'));var logger=require(_0x9efb('0x8'))(_0x9efb('0x9'));var loggerBooked=require(_0x9efb('0x8'))(_0x9efb('0xa'));var loggerPredictive=require(_0x9efb('0x8'))(_0x9efb('0xb'));var loggerPredictiveCalls=require('../../../config/logger')(_0x9efb('0xc'));var loggerSyncQueueSummary=require(_0x9efb('0x8'))(_0x9efb('0xd'));var ami=require(_0x9efb('0xe'));config[_0x9efb('0xf')]=_[_0x9efb('0x10')](config[_0x9efb('0xf')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x9efb('0xf')]));var cmHopper=require(_0x9efb('0x11'));var voiceQueueRt=require('../rpc/voiceQueueRt');var RpcSetting=require(_0x9efb('0x12'));var Interval=require(_0x9efb('0x13'));var Action=require('./models/action');var History=require(_0x9efb('0x14'));var Final=require(_0x9efb('0x15'));var AgentComplete=require(_0x9efb('0x16'));var QueueCallerAbandon=require(_0x9efb('0x17'));var Hangup=require(_0x9efb('0x18'));var ipAgi=process[_0x9efb('0x19')][_0x9efb('0x1a')]||_0x9efb('0x1b');var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence['prototype'][_0x9efb('0x1c')]=function(_0x4a53f9){this[_0x9efb('0x1d')]=this['tail']?this[_0x9efb('0x1d')][_0x9efb('0x1e')](_0x4a53f9):_0x4a53f9();};function Dialer(_0x3b1ed3,_0xd5088f){this['sequence']=new Sequence();this[_0x9efb('0x1f')]=_0xd5088f;this['voiceQueues']=_0x3b1ed3[_0x9efb('0x20')];this[_0x9efb('0x21')]=_0x3b1ed3[_0x9efb('0x21')];this['agents']=_0x3b1ed3['agents'];this[_0x9efb('0x22')]=_0x3b1ed3[_0x9efb('0x22')];this[_0x9efb('0x23')]=config[_0x9efb('0x23')]||0x2;this[_0x9efb('0x24')]={};this[_0x9efb('0x25')]={};this['contactsId']={};this[_0x9efb('0x26')]={};this[_0x9efb('0x27')]={};this[_0x9efb('0x28')]={};this[_0x9efb('0x29')]={};this['ivrOriginated']={};this[_0x9efb('0x2a')]={};this[_0x9efb('0x2b')]={};this[_0x9efb('0x2c')]={};ami['on'](_0x9efb('0x2d'),this['syncAgentConnect']['bind'](this));ami['on'](_0x9efb('0x2e'),this[_0x9efb('0x2f')][_0x9efb('0x30')](this));ami['on'](_0x9efb('0x31'),this['syncOriginateResponse'][_0x9efb('0x30')](this));ami['on'](_0x9efb('0x32'),this['syncAgentComplete'][_0x9efb('0x30')](this));ami['on']('custom:queuesummary',this[_0x9efb('0xd')][_0x9efb('0x30')](this));ami['on'](_0x9efb('0x33'),this[_0x9efb('0x34')][_0x9efb('0x30')](this));ami['on']('hangup',this[_0x9efb('0x35')]['bind'](this));ami['on'](_0x9efb('0x36'),this[_0x9efb('0x37')][_0x9efb('0x30')](this));ami['on'](_0x9efb('0x38'),this[_0x9efb('0x39')][_0x9efb('0x30')](this));ami['on'](_0x9efb('0x3a'),this['syncQueueMember'][_0x9efb('0x30')](this));ami['on']('queuestatuscomplete',this[_0x9efb('0x3b')][_0x9efb('0x30')](this));this[_0x9efb('0x3c')]();this[_0x9efb('0x3d')]();RpcSetting[_0x9efb('0x3e')]()['then'](function(_0x593b88){previewRecallmeReminderInterval=_0x593b88[_0x9efb('0x3f')];});}function isNotNull(_0x4c5a10){return _0x4c5a10!==null&&!_[_0x9efb('0x40')](_0x4c5a10);}function msgResponse(_0x103553,_0x5210e9,_0x117bd6){return{'action':_0x103553,'response':_0x5210e9,'message':_0x117bd6,'stack':_0x117bd6};}function emit(_0x5893ab,_0x3ea9ca,_0x21eff5){io['to'](_0x5893ab)[_0x9efb('0x41')](_0x3ea9ca,_0x21eff5);}function emitOutboundVoiceQueueSummary(_0x2b9250){if(_0x2b9250['type']===_0x9efb('0x42')){logger[_0x9efb('0x43')]('[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:',util['inspect'](_0x2b9250,{'showHidden':![],'depth':null}));emit(util[_0x9efb('0x44')](_0x9efb('0x45'),_0x2b9250[_0x9efb('0x46')]),_0x9efb('0x47'),_0x2b9250);}}function checkGetDataPredictive(_0x40694a){if(isNotNull(_0x40694a)&&!_['isEmpty'](_0x40694a)){loggerPredictive[_0x9efb('0x48')]('-----\x20Stats\x20Predictive\x20---');loggerPredictive[_0x9efb('0x48')](_0x9efb('0x49'),_0x40694a[_0x9efb('0x4a')]);loggerPredictive[_0x9efb('0x48')](_0x9efb('0x4b'),_0x40694a[_0x9efb('0x4c')]);loggerPredictive[_0x9efb('0x48')](_0x9efb('0x4d'),_0x40694a[_0x9efb('0x4e')]);loggerPredictive[_0x9efb('0x48')]('Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x40694a['predictiveIntervalDroppedCallsCallersExit']);loggerPredictive['info']('AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x40694a['predictiveIntervalAvgHoldtime']);loggerPredictive[_0x9efb('0x48')]('AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x40694a['predictiveIntervalAvgTalktime']);loggerPredictive[_0x9efb('0x48')]('---------------------------');if(_0x40694a[_0x9efb('0x4a')]>0x0){if(!_[_0x9efb('0x40')](_0x40694a[_0x9efb('0x4f')])&&_0x40694a['predictiveIntervalAvgTalktime']>0x0){return!![];}loggerPredictive[_0x9efb('0x48')](_0x9efb('0x50'));if(!_[_0x9efb('0x40')](_0x40694a[_0x9efb('0x51')])&&_0x40694a[_0x9efb('0x51')]>0x0){return!![];}loggerPredictive[_0x9efb('0x48')](_0x9efb('0x52'));}else{loggerPredictive[_0x9efb('0x48')](_0x9efb('0x53'));}}else{loggerPredictive[_0x9efb('0x48')]('History\x20information\x20are\x20empty');}return![];}function mergeDataErlangB(_0x2669ce){return function(_0x5bec57){loggerPredictive[_0x9efb('0x48')](_0x9efb('0x54'));loggerPredictive['info'](_0x9efb('0x55'),_0x5bec57['erlangCalls']);loggerPredictive['info'](_0x9efb('0x56'),_0x5bec57[_0x9efb('0x57')]);loggerPredictive[_0x9efb('0x48')](_0x9efb('0x58'),_0x5bec57['erlangAbandonmentRate']);loggerPredictive[_0x9efb('0x48')]('Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x5bec57[_0x9efb('0x59')]);loggerPredictive[_0x9efb('0x48')](_0x9efb('0x58'),_0x5bec57[_0x9efb('0x5a')]);loggerPredictive['info'](_0x9efb('0x5b'));_[_0x9efb('0x5c')](_0x2669ce,_0x5bec57);};}function ifInterval(_0x41e326,_0x3d39b2){if(_[_0x9efb('0x40')](_0x3d39b2)){return![];}return utils[_0x9efb('0x5d')](undefined,_0x3d39b2)<_0x41e326*0x3c;}function clearPredictiveAttributes(_0x226572){if(_0x226572[_0x9efb('0x29')]){_0x226572[_0x9efb('0x29')]=undefined;loggerPredictive[_0x9efb('0x43')](_0x226572[_0x9efb('0x46')],_0x9efb('0x5e'));}if(_0x226572[_0x9efb('0x28')]){_0x226572['startPredictive']=undefined;loggerPredictive['debug'](_0x226572[_0x9efb('0x46')],'startPredictive\x20value\x20cleared');}if(_0x226572[_0x9efb('0x5f')]){clearInterval(_0x226572[_0x9efb('0x5f')]);_0x226572[_0x9efb('0x5f')]=undefined;loggerPredictive[_0x9efb('0x43')](_0x226572[_0x9efb('0x46')],_0x9efb('0x60'));}}function loggerCatchPredictive(_0x23e0d3,_0xd89a47){return function(_0x26cdc6){loggerPredictive['error'](_0xd89a47[_0x9efb('0x46')],_0x23e0d3);loggerPredictive[_0x9efb('0x61')](_0x26cdc6['stack']);clearPredictiveAttributes(_0xd89a47);};}function loggerCatch(_0x151a7e){return function(_0x1eb031){logger[_0x9efb('0x61')](_0x151a7e,util['inspect'](_0x1eb031,{'showHidden':![],'depth':null}));};}function loggerGetContactDialer(_0x37817b,_0x346baf,_0xe2288b){return function(_0x2b480f){utils[_0x9efb('0x62')](_0x346baf,_0xe2288b,0x0);_0x346baf['temp']=0x0;logger[_0x9efb('0x61')](_0x37817b,util[_0x9efb('0x63')](_0x2b480f,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x32a477){return function(_0x53a224){if(isNotNull(_0x53a224)&&isNotNull(_0x53a224[0x0])){if(_0x53a224[0x0][_0x9efb('0x64')]>0x0){_0x32a477['message']=utils['CAMPAIGN_STATUS'][_0x9efb('0x65')];logger['info']('[getContactDialer2][ReScheduled]'+_0x32a477[_0x9efb('0x46')],_0x53a224[0x0]['contactsRescheduled'],_0x9efb('0x66'));}else{_0x32a477['message']=utils[_0x9efb('0x67')][_0x9efb('0x68')];logger[_0x9efb('0x48')](_0x9efb('0x69')+_0x32a477[_0x9efb('0x46')]);}}};}function createObjHistory(_0x5c3aac,_0x4607b2,_0x218434,_0x1c5e22,_0x40f081){_0x5c3aac['message']=_0x218434;var _0x15c936=new Action(_0x5c3aac,_0x4607b2);var _0x1184d3=new History(_0x15c936);_0x1184d3['state']=_0x1c5e22;_0x1184d3['statedesc']=_0x40f081;_0x1184d3['endtime']=_0x15c936[_0x9efb('0x6a')];return _0x1184d3;}function unlockQueueStatus(_0x3f88f0,_0x1985e1){setTimeout(function(){if(_['isUndefined'](_0x3f88f0[_0x9efb('0x6b')])){loggerBooked[_0x9efb('0x61')](_0x9efb('0x6c'),_0x1985e1);}_0x3f88f0['queueStatusComplete']=!![];loggerBooked[_0x9efb('0x48')]('[booked][unlockQueueStatus]',_0x1985e1,JSON['stringify'](_[_0x9efb('0x6d')](_0x3f88f0,[_0x9efb('0x46'),_0x9efb('0x6b')])));},0x1f3);}function checkInterval(_0x2666dc){return function(){if(!isNotNull(_0x2666dc[_0x9efb('0x6e')])){_0x2666dc[_0x9efb('0x6f')]=utils[_0x9efb('0x67')][_0x9efb('0x70')];throw _0x2666dc[_0x9efb('0x46')]+_0x9efb('0x71');}if(!isNotNull(_0x2666dc[_0x9efb('0x6e')][_0x9efb('0x72')])){_0x2666dc[_0x9efb('0x6f')]=utils[_0x9efb('0x67')][_0x9efb('0x70')];throw _0x2666dc[_0x9efb('0x46')]+_0x9efb('0x71');}if(!isNotNull(_[_0x9efb('0x73')](_0x2666dc[_0x9efb('0x6e')][_0x9efb('0x72')]))){_0x2666dc[_0x9efb('0x6f')]=utils[_0x9efb('0x67')][_0x9efb('0x70')];throw _0x2666dc[_0x9efb('0x46')]+_0x9efb('0x71');}};}function checkIsIVRCampaignActive(_0x56b143){return function(){if(!utils['isIVRCampaignActive'](_0x56b143)){_0x56b143[_0x9efb('0x6f')]=utils[_0x9efb('0x67')][_0x9efb('0x74')];throw _0x56b143[_0x9efb('0x46')]+_0x9efb('0x75');}};}function emitCampaignSummary(_0x4ba4be){if(utils[_0x9efb('0x76')](_0x4ba4be)){emit(util[_0x9efb('0x44')](_0x9efb('0x77'),_0x4ba4be[_0x9efb('0x46')]),_0x9efb('0x78'),_0x4ba4be);}}function loggerCatchQueueSummary(_0x42811b,_0x590224){return function(_0x32fafb){clearPredictiveAttributes(_0x590224);emitCampaignSummary(_0x590224);loggerSyncQueueSummary[_0x9efb('0x43')](_0x42811b,util['inspect'](_0x32fafb,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x17ccd1){if(_0x17ccd1[_0x9efb('0x79')]){if(_0x17ccd1[_0x9efb('0x7a')]===0x0){_0x17ccd1[_0x9efb('0x79')]=![];_0x17ccd1[_0x9efb('0x6f')]=utils[_0x9efb('0x67')][_0x9efb('0x74')];loggerSyncQueueSummary[_0x9efb('0x43')](_0x9efb('0x7b'),_0x17ccd1[_0x9efb('0x46')],_0x9efb('0x7c'));}else{_0x17ccd1[_0x9efb('0x6f')]=utils[_0x9efb('0x67')]['DISACTIVED'];loggerSyncQueueSummary[_0x9efb('0x43')]('[syncQueueSummary]\x20Campaign\x20Ivr:\x20',_0x17ccd1[_0x9efb('0x46')],'is\x20disactive');}emitCampaignSummary(_0x17ccd1);}}function myreject(_0x2a131a){return function(_0xec13b9){return _0x2a131a(msgResponse(_0x9efb('0x7d'),'Error',JSON[_0x9efb('0x7e')](_0xec13b9)));};}Dialer['prototype'][_0x9efb('0x7f')]=function(_0x5c9b92){return!_[_0x9efb('0x40')](_0x5c9b92)&&_0x5c9b92&&!_[_0x9efb('0x40')](_0x5c9b92[_0x9efb('0x46')])&&!_[_0x9efb('0x40')](_0x5c9b92['active'])&&_0x5c9b92[_0x9efb('0x80')]&&(this[_0x9efb('0x22')][util[_0x9efb('0x44')]('SIP/%s',_0x5c9b92[_0x9efb('0x46')])][_0x9efb('0x81')]===_0x9efb('0x82')||this['trunks'][util['format'](_0x9efb('0x83'),_0x5c9b92['name'])][_0x9efb('0x81')]===_0x9efb('0x84'));};Dialer[_0x9efb('0x85')][_0x9efb('0x86')]=function(_0x4cd8da){var _0x478818=this;return function(){if(!_0x478818[_0x9efb('0x7f')](_0x4cd8da['Trunk'])){if(!_0x478818[_0x9efb('0x7f')](_0x4cd8da['TrunkBackup'])){_0x4cd8da['message']=utils['CAMPAIGN_STATUS'][_0x9efb('0x87')];throw _0x4cd8da[_0x9efb('0x46')]+_0x9efb('0x88');}}};};Dialer[_0x9efb('0x85')][_0x9efb('0x89')]=function(_0x1c76ee,_0x3e8d97,_0x3e8b5b,_0x406735){var _0x272c42=this;return function(){var _0x73c556=!![];return _0x272c42['ifTimeIvr'](_0x1c76ee,_0x3e8d97,_0x3e8b5b,_0x406735,_0x73c556);};};Dialer[_0x9efb('0x85')][_0x9efb('0x8a')]=function(_0x40b22b,_0x51984e,_0x499a03,_0xf2cb26){var _0x573554=this;return function(){var _0xb5d908=![];return _0x573554[_0x9efb('0x8b')](_0x40b22b[_0x9efb('0x72')],_0x51984e,_0x499a03,_0xf2cb26,_0xb5d908);};};Dialer[_0x9efb('0x85')][_0x9efb('0x8b')]=function(_0x4bcdaf,_0x300dc8,_0x315dae,_0x2283e4,_0x413523){var _0x3270f6=[];return new Promise(function(_0x410ef9,_0x335dc1){if(!isNotNull(_0x4bcdaf)){_0x2283e4[_0x9efb('0x6f')]=utils[_0x9efb('0x67')][_0x9efb('0x70')];return _0x335dc1(msgResponse(_0x9efb('0x8c'),_0x9efb('0x8d'),_0x315dae+_0x9efb('0x8e')));}if(_[_0x9efb('0x73')](_0x4bcdaf)){_0x2283e4['message']=utils['CAMPAIGN_STATUS'][_0x9efb('0x8f')];return _0x335dc1(msgResponse(_0x9efb('0x8c'),_0x9efb('0x8d'),_0x315dae+_0x9efb('0x90')));}if(_0x300dc8&&_[_0x9efb('0x40')](config[_0x9efb('0x91')][_0x300dc8])){_0x2283e4[_0x9efb('0x6f')]=utils[_0x9efb('0x67')][_0x9efb('0x92')];return _0x335dc1(msgResponse(_0x9efb('0x8c'),'Failure',_0x315dae+_0x9efb('0x93')+_0x300dc8));}if(_[_0x9efb('0x94')](_0x4bcdaf)){for(var _0x3e3627=0x0;_0x3e3627<_0x4bcdaf[_0x9efb('0x95')];_0x3e3627+=0x1){_0x3270f6['push'](ami[_0x9efb('0x96')]({'action':_0x9efb('0x97'),'command':util[_0x9efb('0x44')](_0x9efb('0x98'),_0x4bcdaf[_0x3e3627][_0x9efb('0x99')],!_['isUndefined'](config[_0x9efb('0x91')][_0x300dc8])?_0x300dc8:'')})[_0x9efb('0x9a')](function(_0x4aa4e7){return _0x4aa4e7[_0x9efb('0x9b')]['indexOf'](_0x9efb('0x9c'))>=0x0;})['catch'](myreject(_0x335dc1)));}}else{_0x3270f6[_0x9efb('0x9d')](ami['Action']({'action':_0x9efb('0x97'),'command':util[_0x9efb('0x44')](_0x9efb('0x98'),_0x4bcdaf,!_[_0x9efb('0x40')](config['timezones'][_0x300dc8])?_0x300dc8:'')})[_0x9efb('0x9a')](function(_0x5c21eb){return _0x5c21eb[_0x9efb('0x9b')]['indexOf']('true')>=0x0;})[_0x9efb('0x9e')](myreject(_0x335dc1)));}Promise[_0x9efb('0x9f')](_0x3270f6)[_0x9efb('0x9a')](function(_0xa84ba6){var _0x5bfc0d=_[_0x9efb('0xa0')](_0xa84ba6);if(_0x5bfc0d){return _0x410ef9(_0x5bfc0d);}else{_0x2283e4['message']=_0x413523?utils[_0x9efb('0x67')]['OVERTIME_GLOBAL_INTERVAL']:utils[_0x9efb('0x67')][_0x9efb('0xa1')];return _0x335dc1(msgResponse(_0x9efb('0xa2'),_0x9efb('0x8d'),_0x9efb('0xa3')+_0x413523+'\x20'+_0x315dae+_0x9efb('0xa4')+util[_0x9efb('0x63')](_0x4bcdaf,{'showHidden':![],'depth':null})+_0x9efb('0xa5')+_0x300dc8));}})['catch'](function(_0x5768f5){return _0x335dc1(msgResponse('ifTime',_0x9efb('0x8d'),JSON[_0x9efb('0x7e')](_0x5768f5)));});});};Dialer[_0x9efb('0x85')][_0x9efb('0x3c')]=function(){var _0x29c56d=this;return cmHopper[_0x9efb('0xa6')]({'active':![]},{'where':{'active':!![]}})[_0x9efb('0x9a')](function(){setInterval(function(){_0x29c56d[_0x9efb('0xa7')]();},0x3e8);});};Dialer[_0x9efb('0x85')][_0x9efb('0xa7')]=function(){var _0x116db4=this;var _0x231939;for(var _0x5b6ecc in this[_0x9efb('0x21')]){if(typeof this['campaigns'][_0x5b6ecc]!=='undefined'){_0x231939=this[_0x9efb('0x21')][_0x5b6ecc];if(utils[_0x9efb('0x76')](_0x231939)&&utils[_0x9efb('0xa8')](_0x231939)){_0x231939[_0x9efb('0x79')]=!![];Promise[_0x9efb('0xa9')]()['then'](checkIsIVRCampaignActive(_0x231939))[_0x9efb('0x9a')](checkInterval(_0x231939))[_0x9efb('0x9a')](_0x116db4[_0x9efb('0x86')](_0x231939))['then'](_0x116db4[_0x9efb('0x89')](_0x231939[_0x9efb('0xaa')],_0x231939['dialTimezone'],_0x231939['name'],_0x231939))[_0x9efb('0x9a')](_0x116db4['checkIfTimeIntervals'](_0x231939[_0x9efb('0x6e')],_0x231939['dialTimezone'],_0x231939[_0x9efb('0x46')],_0x231939))[_0x9efb('0x9a')](_0x116db4['launchHandleIvr'](_0x231939))[_0x9efb('0x9e')](loggerCatchQueueSummary('[syncCampaigns]',_0x231939));}else{notSendMessagesCampaign(_0x231939);}}}};Dialer['prototype']['checkDialMethod']=function(_0x149f13){if(_0x149f13[_0x9efb('0xab')]!==_0x9efb('0xb')){clearPredictiveAttributes(_0x149f13);}switch(_0x149f13['dialMethod']){case _0x9efb('0xac'):this['handlePower'](_0x149f13,0x1);break;case'power':this[_0x9efb('0xad')](_0x149f13,_0x149f13[_0x9efb('0xae')]);break;case _0x9efb('0xb'):this[_0x9efb('0xb')](_0x149f13);break;case _0x9efb('0xa'):this[_0x9efb('0xad')](_0x149f13,0x1);break;default:logger['error'](_0x9efb('0xaf'),_0x149f13['name'],_0x9efb('0xb0'));}};Dialer[_0x9efb('0x85')][_0x9efb('0x8c')]=function(_0x41e5a0,_0x5c701a){var _0x1919f0=_0x41e5a0[_0x9efb('0xb1')];var _0xe1a7ce=_0x5c701a?_0x41e5a0['dialGlobalInterval']:_0x41e5a0[_0x9efb('0x6e')][_0x9efb('0x72')];logger[_0x9efb('0xb2')](_0x9efb('0xb3'),_0xe1a7ce,_0x1919f0,_0x41e5a0[_0x9efb('0x46')],util[_0x9efb('0x44')](_0x9efb('0xb4'),_0x41e5a0['name'],_0x41e5a0['id']));var _0x242d69=null;return Interval[_0x9efb('0xb5')](_0xe1a7ce,_0x1919f0)[_0x9efb('0x9a')](function(_0x48d430){if(_0x48d430===!![]){return _0x48d430;}else{_0x41e5a0['message']=_0x5c701a?utils['CAMPAIGN_STATUS'][_0x9efb('0xb6')]:utils[_0x9efb('0x67')][_0x9efb('0xa1')];_0x242d69=msgResponse(_0x9efb('0xa2'),_0x9efb('0x8d'),_0x9efb('0xa3')+_0x5c701a+'\x20'+_0x41e5a0[_0x9efb('0x46')]+_0x9efb('0xa4')+util[_0x9efb('0x63')](_0xe1a7ce,{'showHidden':![],'depth':null})+_0x9efb('0xa5')+_0x1919f0);}if(_0x242d69!==null){logger[_0x9efb('0xb2')](_0x9efb('0xb7'),_0x242d69);_0x242d69[_0x9efb('0xb8')]=_0x5c701a;throw _0x242d69;}})[_0x9efb('0x9e')](function(_0x32d19d){logger['error']('AMI\x20IfTime',_0x32d19d);throw msgResponse(_0x9efb('0x7d'),'Error',util['inspect'](_0x32d19d,{'showHidden':![],'depth':null}));});};Dialer[_0x9efb('0x85')]['syncAgentConnect']=function(_0x391829){if(this[_0x9efb('0x20')][_0x391829[_0x9efb('0xb9')]]){if(this[_0x9efb('0x26')][_0x391829[_0x9efb('0xba')]]&&this[_0x9efb('0x26')][_0x391829[_0x9efb('0xba')]][_0x9efb('0xbb')]!==_0x9efb('0xbc')){this[_0x9efb('0xbd')](this[_0x9efb('0x20')][_0x391829[_0x9efb('0xb9')]]);this[_0x9efb('0x26')][_0x391829['uniqueid']][_0x9efb('0xbe')]=moment()[_0x9efb('0x44')](_0x9efb('0xbf'));}}};Dialer[_0x9efb('0x85')][_0x9efb('0xc0')]=function(_0xf283aa){var _0x481627=this[_0x9efb('0x26')][_0xf283aa[_0x9efb('0xba')]];if(this['voiceQueues'][_0xf283aa[_0x9efb('0xb9')]]){if(_0x481627&&_0x481627[_0x9efb('0xbb')]!==_0x9efb('0xbc')){delete this[_0x9efb('0x26')][_0xf283aa[_0x9efb('0xba')]];this[_0x9efb('0x20')][_0xf283aa['queue']][_0x9efb('0xc1')]+=0x1;var _0x392723=new AgentComplete(_0x481627,_0xf283aa);if(_0xf283aa[_0x9efb('0xc2')]===_0x9efb('0xc3')){_0x392723[_0x9efb('0xc4')]=this[_0x9efb('0x20')][_0xf283aa[_0x9efb('0xb9')]][_0x9efb('0xc5')]&&this[_0x9efb('0x20')][_0xf283aa[_0x9efb('0xb9')]][_0x9efb('0xc6')]?moment()[_0x9efb('0x44')](_0x9efb('0xbf')):undefined;}hopperUtils[_0x9efb('0xc7')](_0x392723)['catch'](loggerCatch(_0x9efb('0xc8')));hopperUtils[_0x9efb('0xc9')](_0x392723)['catch'](loggerCatch(_0x9efb('0xca')));}}};Dialer['prototype'][_0x9efb('0x2f')]=function(_0x1540f5){var _0x46d038=this['uniqueId'][_0x1540f5[_0x9efb('0xba')]];var _0x14af56=this;var _0x472a48=![];var _0x38f1a0;var _0x2359ce;if(this[_0x9efb('0x20')][_0x1540f5[_0x9efb('0xb9')]]){if(_0x46d038&&_0x46d038['type']!=='ivr'){delete this[_0x9efb('0x26')][_0x1540f5[_0x9efb('0xba')]];this[_0x9efb('0xbd')](this[_0x9efb('0x20')][_0x1540f5['queue']]);_0x46d038[_0x9efb('0xcb')]=moment()['format'](_0x9efb('0xbf'));var _0x566831=new QueueCallerAbandon(_0x46d038,_0x1540f5);if(utils['getSeconds'](_0x46d038[_0x9efb('0xcb')],_0x46d038['responsetime'])>=_0x46d038[_0x9efb('0xcc')]){this[_0x9efb('0x20')][_0x1540f5[_0x9efb('0xb9')]][_0x9efb('0x4e')]+=0x1;this[_0x9efb('0x20')][_0x1540f5[_0x9efb('0xb9')]][_0x9efb('0xcd')]+=0x1;this[_0x9efb('0x20')][_0x1540f5[_0x9efb('0xb9')]][_0x9efb('0xce')]+=0x1;_0x566831['state']=0xa;_0x566831[_0x9efb('0xcf')]=_0x9efb('0xd0');_0x566831[_0x9efb('0xd1')]='TIMEOUT';_0x566831[_0x9efb('0xc4')]=this[_0x9efb('0x20')][_0x1540f5[_0x9efb('0xb9')]][_0x9efb('0xc5')]?moment()[_0x9efb('0x44')](_0x9efb('0xbf')):undefined;_0x566831['countdropretry']+=0x1;_0x566831['countglobal']+=0x1;_0x38f1a0=this[_0x9efb('0x20')][_0x1540f5['queue']][_0x9efb('0xd2')];_0x2359ce=this[_0x9efb('0x20')][_0x1540f5[_0x9efb('0xb9')]][_0x9efb('0xd3')];hopperUtils[_0x9efb('0xd4')](_0x566831,_0x566831[_0x9efb('0xd5')],_0x46d038['voiceQueue'])['then'](function(_0x541ed8){_0x472a48=_0x541ed8[_0x9efb('0xd6')]==0x1;if(_0x566831['countdropretry']>=_0x14af56[_0x9efb('0x20')][_0x1540f5[_0x9efb('0xb9')]][_0x9efb('0xd7')]){_0x14af56[_0x9efb('0xd8')](_0x566831,_0x541ed8[_0x9efb('0xd6')]);}else{hopperUtils[_0x9efb('0xd9')]({'active':![],'countdropretry':_0x566831[_0x9efb('0xda')],'scheduledat':moment()['add'](_0x14af56['voiceQueues'][_0x1540f5[_0x9efb('0xb9')]][_0x9efb('0xd2')],_0x9efb('0xdb'))[_0x9efb('0x44')](_0x9efb('0xbf')),'ContactId':_0x46d038[_0x9efb('0xdc')],'ListId':_0x46d038[_0x9efb('0xdd')],'VoiceQueueId':_0x46d038[_0x9efb('0xde')]||undefined,'CampaignId':_0x46d038[_0x9efb('0xdf')]||undefined})['catch'](loggerCatch(_0x9efb('0xe0')));var _0x171b52=new History(_0x566831);_0x171b52[_0x9efb('0xd5')]=0xa;_0x171b52[_0x9efb('0xcf')]=_0x9efb('0xd0');_0x171b52[_0x9efb('0x6a')]=moment()[_0x9efb('0x44')](_0x9efb('0xbf'));_0x171b52[_0x9efb('0xe1')]=_0x171b52[_0x9efb('0x6a')];_0x171b52[_0x9efb('0xe2')]=_0x566831[_0x9efb('0xe2')];_0x171b52['calleridnum']=_0x566831[_0x9efb('0xe3')];hopperUtils[_0x9efb('0xc7')](_0x171b52)[_0x9efb('0x9e')](loggerCatch(_0x9efb('0xe4')));}})[_0x9efb('0x9a')](function(){if(_0x472a48)hopperUtils[_0x9efb('0xe5')](_0x566831,_0x38f1a0,_0x2359ce)['then'](function(){return 0x1;});});}else{this['voiceQueues'][_0x1540f5['queue']][_0x9efb('0xe6')]+=0x1;this[_0x9efb('0x20')][_0x1540f5[_0x9efb('0xb9')]]['outboundDropCallsDayCallersExit']+=0x1;_0x566831[_0x9efb('0xd5')]=0xb;_0x566831[_0x9efb('0xcf')]=_0x9efb('0xe7');_0x566831[_0x9efb('0xd1')]=_0x9efb('0xe8');_0x566831[_0x9efb('0xe9')]+=0x1;_0x566831[_0x9efb('0xea')]+=0x1;_0x38f1a0=this[_0x9efb('0x20')][_0x1540f5['queue']][_0x9efb('0xeb')];_0x2359ce=this['voiceQueues'][_0x1540f5[_0x9efb('0xb9')]]['callAdditionalPhoneAfterMin'];hopperUtils[_0x9efb('0xd4')](_0x566831,_0x566831['state'],_0x46d038[_0x9efb('0xec')])[_0x9efb('0x9a')](function(_0x502786){if(_0x566831['countabandonedretry']>=_0x14af56['voiceQueues'][_0x1540f5[_0x9efb('0xb9')]][_0x9efb('0xed')]){_0x14af56[_0x9efb('0xd8')](_0x566831,_0x502786['additional']);}else{hopperUtils[_0x9efb('0xd9')]({'active':![],'countabandonedretry':_0x566831[_0x9efb('0xe9')],'scheduledat':moment()[_0x9efb('0xee')](_0x14af56[_0x9efb('0x20')][_0x1540f5[_0x9efb('0xb9')]][_0x9efb('0xeb')],_0x9efb('0xdb'))[_0x9efb('0x44')](_0x9efb('0xbf')),'ContactId':_0x46d038[_0x9efb('0xdc')],'ListId':_0x46d038[_0x9efb('0xdd')],'VoiceQueueId':_0x46d038[_0x9efb('0xde')]||undefined,'CampaignId':_0x46d038['CampaignId']||undefined})[_0x9efb('0x9e')](loggerCatch('[rescheduleContact][Abandoned]'));var _0x44c300=new History(_0x566831);_0x44c300['state']=0xb;_0x44c300['statedesc']=_0x9efb('0xe7');_0x44c300['starttime']=moment()['format'](_0x9efb('0xbf'));_0x44c300[_0x9efb('0xe1')]=_0x44c300[_0x9efb('0x6a')];_0x44c300[_0x9efb('0xe2')]=_0x566831[_0x9efb('0xe2')];_0x44c300['calleridnum']=_0x566831['calleridnum'];hopperUtils[_0x9efb('0xc7')](_0x44c300)[_0x9efb('0x9e')](loggerCatch(_0x9efb('0xef')));}})['then'](function(){if(_0x472a48)hopperUtils['swapAdditionalPhones'](_0x566831,_0x38f1a0,_0x2359ce)[_0x9efb('0x9a')](function(){return 0x1;});});}}}};Dialer[_0x9efb('0x85')][_0x9efb('0x37')]=function(_0x5b4512){if(this['actions'][_0x5b4512[_0x9efb('0xba')]]){this['actions'][_0x5b4512[_0x9efb('0xba')]][_0x9efb('0xf0')]=_0x5b4512[_0x9efb('0xf0')];}if(this[_0x9efb('0x26')][_0x5b4512[_0x9efb('0xba')]]){this[_0x9efb('0x26')][_0x5b4512[_0x9efb('0xba')]][_0x9efb('0xf0')]=_0x5b4512[_0x9efb('0xf0')];}};Dialer[_0x9efb('0x85')][_0x9efb('0xf1')]=function(_0x394d66){if(!this[_0x9efb('0x25')][_0x394d66['actionid']]){return;}var _0x31c4d0=this['voiceQueues'][this['actions'][_0x394d66[_0x9efb('0xf2')]][_0x9efb('0xb9')]][_0x9efb('0xf3')]||'rrmemory';if(_0x31c4d0==='roundrobin'){if(this[_0x9efb('0x25')][_0x394d66[_0x9efb('0xf2')]]&&_[_0x9efb('0xf4')](this[_0x9efb('0x25')][_0x394d66[_0x9efb('0xf2')]]['locked'])&&_0x394d66[_0x9efb('0x81')]==='1'&&_0x394d66[_0x9efb('0xf5')]==='0'){if(this[_0x9efb('0xf6')][_0x394d66[_0x9efb('0xf7')]]){if(!this[_0x9efb('0xf6')][_0x394d66[_0x9efb('0xf7')]][_0x9efb('0xf8')]){this[_0x9efb('0xf6')][_0x394d66[_0x9efb('0xf7')]]['locked']=!![];this[_0x9efb('0x25')][_0x394d66[_0x9efb('0xf2')]]['locked']=!![];this[_0x9efb('0x25')][_0x394d66[_0x9efb('0xf2')]][_0x9efb('0xf7')]=_0x394d66['stateinterface'];}}}}else if(_0x31c4d0===_0x9efb('0xf9')){if(this['actions'][_0x394d66[_0x9efb('0xf2')]]){if(this[_0x9efb('0xf6')][_0x394d66['stateinterface']]){this[_0x9efb('0x25')][_0x394d66['actionid']][_0x9efb('0xf7')]=_0x394d66[_0x9efb('0xf7')];if(_['isNil'](this[_0x9efb('0x2a')][this['actions'][_0x394d66[_0x9efb('0xf2')]][_0x9efb('0xb9')]])){this[_0x9efb('0x2a')][this[_0x9efb('0x25')][_0x394d66['actionid']][_0x9efb('0xb9')]]=[];}this[_0x9efb('0x2a')][this[_0x9efb('0x25')][_0x394d66['actionid']][_0x9efb('0xb9')]][_0x9efb('0x9d')](_[_0x9efb('0x5c')](_[_0x9efb('0x6d')](this['actions'][_0x394d66['actionid']],['idHopper',_0x9efb('0xf7')]),{'status':_0x394d66[_0x9efb('0x81')],'paused':_0x394d66[_0x9efb('0xf5')]}));}}}};Dialer['prototype'][_0x9efb('0x3b')]=function(_0x2c9ccd){if(!this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]]){return;}var _0x553ade=this;var _0x493902=this[_0x9efb('0x20')][this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]]['queue']];var _0x442b4b=_0x493902[_0x9efb('0xf3')]||_0x9efb('0xf9');if(_0x442b4b==='roundrobin'){if(this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]]&&this[_0x9efb('0x25')][_0x2c9ccd['actionid']]['stateinterface']){this[_0x9efb('0x1f')][_0x9efb('0xfa')](this['actions'][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xfb')],this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xf7')])['catch'](function(_0x471c45){logger['error'](_0x9efb('0xfc'),util[_0x9efb('0x63')](_0x471c45,{'showHidden':![],'depth':null}));})['finally'](function(){_0x553ade[_0x9efb('0xbd')](_0x553ade[_0x9efb('0x20')][_0x553ade['actions'][_0x2c9ccd[_0x9efb('0xf2')]]['queue']]);_0x553ade[_0x9efb('0xf6')][_0x553ade[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xf7')]]['locked']=![];delete _0x553ade[_0x9efb('0x25')][_0x2c9ccd['actionid']];unlockQueueStatus(_0x493902);});}else{this['updateOriginated'](this[_0x9efb('0x20')][this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xb9')]]);hopperUtils[_0x9efb('0xd9')]({'active':![],'ContactId':this['actions'][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xdc')],'ListId':this['actions'][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xdd')],'VoiceQueueId':this['actions'][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xde')]||undefined,'CampaignId':this['actions'][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xdf')]||undefined})[_0x9efb('0x9e')](loggerCatch(_0x9efb('0xfd')));delete this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]];unlockQueueStatus(_0x493902);}}else if(_0x442b4b==='rrmemory'){var _0x24b94d;if(this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]]&&!_[_0x9efb('0x73')](this[_0x9efb('0x2a')][this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]]['queue']])){if(this[_0x9efb('0x2b')][_0x553ade[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]]['queue']]){this[_0x9efb('0x2b')][_0x553ade[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xb9')]]=this['queueBookedRR'][this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xb9')]]?this[_0x9efb('0x2b')][this[_0x9efb('0x25')][_0x2c9ccd['actionid']][_0x9efb('0xb9')]]:this['queueBooked'][this[_0x9efb('0x25')][_0x2c9ccd['actionid']]['queue']]?this['queueBooked'][this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]]['queue']][_0x9efb('0xfe')]||0x0:0x0;}this[_0x9efb('0x2a')][this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xb9')]][_0x9efb('0xfe')]=this['queueBookedRR'][this['actions'][_0x2c9ccd['actionid']][_0x9efb('0xb9')]];for(var _0xcd95bd=0x0;_0xcd95bd<this[_0x9efb('0x2a')][this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xb9')]][_0x9efb('0x95')];_0xcd95bd+=0x1){_0x24b94d=rr(this[_0x9efb('0x2a')][this['actions'][_0x2c9ccd[_0x9efb('0xf2')]]['queue']]);this[_0x9efb('0x2b')][_0x553ade[_0x9efb('0x25')][_0x2c9ccd['actionid']][_0x9efb('0xb9')]]=this[_0x9efb('0x2a')][this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xb9')]]['_rr'];if(_0x24b94d[_0x9efb('0x81')]==='1'&&_0x24b94d['paused']==='0'){break;}}if(!_[_0x9efb('0xf4')](_0x24b94d)){this[_0x9efb('0xf6')][_0x24b94d[_0x9efb('0xf7')]]['unlockRR']=_[_0x9efb('0x40')](this[_0x9efb('0xf6')][_0x24b94d[_0x9efb('0xf7')]]['unlockRR'])?!![]:this[_0x9efb('0xf6')][_0x24b94d[_0x9efb('0xf7')]][_0x9efb('0xff')];}loggerBooked[_0x9efb('0x48')](_0x9efb('0x100'),_0x2c9ccd[_0x9efb('0xf2')],_0x9efb('0x101'),JSON[_0x9efb('0x7e')](_[_0x9efb('0x6d')](this[_0x9efb('0xf6')][_0x24b94d[_0x9efb('0xf7')]],[_0x9efb('0x46'),_0x9efb('0xff')])),_0x9efb('0x102'),JSON['stringify'](_0x24b94d[_0x9efb('0xfb')]));if(!_[_0x9efb('0xf4')](_0x24b94d)&&_0x24b94d[_0x9efb('0x81')]==='1'&&_0x24b94d['paused']==='0'&&this['agents'][_0x24b94d['stateinterface']][_0x9efb('0xff')]){this[_0x9efb('0xf6')][_0x24b94d[_0x9efb('0xf7')]][_0x9efb('0xff')]=![];this[_0x9efb('0x2a')][_0x553ade[_0x9efb('0x25')][_0x2c9ccd['actionid']][_0x9efb('0xb9')]]=[];this[_0x9efb('0x1f')]['run'](_0x24b94d[_0x9efb('0xfb')],_0x24b94d[_0x9efb('0xf7')])[_0x9efb('0x9e')](function(_0x449edc){logger['error']('[Catch][Preview][syncQueueStatusComplete]',util[_0x9efb('0x63')](_0x449edc,{'showHidden':![],'depth':null}));})[_0x9efb('0x1e')](function(){_0x553ade[_0x9efb('0xbd')](_0x553ade[_0x9efb('0x20')][_0x553ade[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xb9')]]);setTimeout(function(){_0x553ade['agents'][_0x24b94d[_0x9efb('0xf7')]][_0x9efb('0xff')]=!![];loggerBooked[_0x9efb('0x48')](_0x9efb('0x103'),_0x2c9ccd[_0x9efb('0xf2')],'Agent:\x20',JSON['stringify'](_[_0x9efb('0x6d')](_0x553ade[_0x9efb('0xf6')][_0x24b94d['stateinterface']],[_0x9efb('0x46'),'unlockRR'])),'contactAgent-idHopper:\x20',JSON[_0x9efb('0x7e')](_0x24b94d[_0x9efb('0xfb')]));},0xc7);delete _0x553ade[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]];unlockQueueStatus(_0x493902,_0x2c9ccd['actionid']);});}else{loggerBooked[_0x9efb('0x48')](_0x9efb('0x104'));this[_0x9efb('0xbd')](this[_0x9efb('0x20')][this[_0x9efb('0x25')][_0x2c9ccd['actionid']]['queue']]);hopperUtils['rescheduleContact']({'active':![],'ContactId':this[_0x9efb('0x25')][_0x2c9ccd['actionid']]['ContactId'],'ListId':this['actions'][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xdd')],'VoiceQueueId':this['actions'][_0x2c9ccd[_0x9efb('0xf2')]]['VoiceQueueId']||undefined,'CampaignId':this['actions'][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xdf')]||undefined})[_0x9efb('0x9e')](loggerCatch(_0x9efb('0xfd')));delete this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]];unlockQueueStatus(_0x493902);}}else{loggerBooked[_0x9efb('0x48')](_0x9efb('0x105'));this[_0x9efb('0xbd')](this[_0x9efb('0x20')][this['actions'][_0x2c9ccd[_0x9efb('0xf2')]]['queue']]);hopperUtils[_0x9efb('0xd9')]({'active':![],'ContactId':this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xdc')],'ListId':this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xdd')],'VoiceQueueId':this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xde')]||undefined,'CampaignId':this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xdf')]||undefined})['catch'](loggerCatch(_0x9efb('0x106')));delete this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]];unlockQueueStatus(_0x493902);}}else{loggerBooked[_0x9efb('0x48')](_0x9efb('0x107'));this[_0x9efb('0xbd')](this['voiceQueues'][this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xb9')]]);hopperUtils['rescheduleContact']({'active':![],'ContactId':this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xdc')],'ListId':this['actions'][_0x2c9ccd['actionid']][_0x9efb('0xdd')],'VoiceQueueId':this[_0x9efb('0x25')][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xde')]||undefined,'CampaignId':this['actions'][_0x2c9ccd[_0x9efb('0xf2')]][_0x9efb('0xdf')]||undefined})['catch'](loggerCatch(_0x9efb('0x108')));delete this['actions'][_0x2c9ccd['actionid']];unlockQueueStatus(_0x493902);}};Dialer[_0x9efb('0x85')][_0x9efb('0x109')]=function(_0x2e7b2a){var _0x5a7acd=this[_0x9efb('0x25')][_0x2e7b2a['actionid']];if(_0x5a7acd){delete this['actions'][_0x2e7b2a[_0x9efb('0xf2')]];_0x5a7acd[_0x9efb('0x10a')]=moment()[_0x9efb('0x44')](_0x9efb('0xbf'));var _0x2c82cf=_0x5a7acd[_0x9efb('0xbb')]===_0x9efb('0xbc')?this[_0x9efb('0x21')][_0x5a7acd[_0x9efb('0xb9')]]:this[_0x9efb('0x20')][_0x5a7acd[_0x9efb('0x10b')]()];if(_0x2e7b2a[_0x9efb('0x10c')]!==_0x9efb('0x10d')){this[_0x9efb('0xbd')](_0x2c82cf);return this[_0x9efb('0x10e')](_0x5a7acd,_0x2c82cf,_0x2e7b2a)[_0x9efb('0x9e')](loggerCatch(_0x9efb('0x10f')));}this['uniqueId'][_0x2e7b2a['uniqueid']]=_0x5a7acd;}};Dialer[_0x9efb('0x85')][_0x9efb('0x39')]=function(_0x40e0cd){var _0x1eab98=this;var _0x5eae9b=this[_0x9efb('0x26')][_0x40e0cd[_0x9efb('0xba')]];var _0x14d6ea;if(!_['isNil'](_0x40e0cd)&&!_[_0x9efb('0xf4')](_0x40e0cd[_0x9efb('0x110')])&&!_[_0x9efb('0xf4')](_0x40e0cd[_0x9efb('0x110')][_0x9efb('0x111')])&&_0x40e0cd[_0x9efb('0x112')]===_0x9efb('0x113')&&_0x5eae9b){if(_0x5eae9b['type']!=='ivr'&&this[_0x9efb('0x20')][_0x5eae9b[_0x9efb('0xb9')]][_0x9efb('0x114')]&&_0x40e0cd['value']===_0x9efb('0x115')){delete this['uniqueId'][_0x40e0cd[_0x9efb('0xba')]];this[_0x9efb('0xbd')](this['voiceQueues'][_0x5eae9b[_0x9efb('0xb9')]]);this[_0x9efb('0x20')][_0x5eae9b['queue']][_0x9efb('0xc1')]+=0x1;this['voiceQueues'][_0x5eae9b[_0x9efb('0xb9')]][_0x9efb('0x116')]+=0x1;_0x14d6ea=new Hangup(_0x5eae9b,_0x40e0cd);_0x14d6ea[_0x9efb('0xd5')]=0x12;_0x14d6ea[_0x9efb('0xcf')]=_0x9efb('0x117');_0x14d6ea[_0x9efb('0x118')]='AMD';ami[_0x9efb('0x41')]('custom:amd',ut[_0x9efb('0x119')](_0x14d6ea,'amd'));this[_0x9efb('0x11a')](_0x14d6ea,'[syncHangupInAMD][createHistory]',_0x9efb('0x11b'));}if(_0x5eae9b[_0x9efb('0xbb')]!==_0x9efb('0xbc')&&this['voiceQueues'][_0x5eae9b[_0x9efb('0xb9')]][_0x9efb('0x114')]&&_0x40e0cd[_0x9efb('0x11c')]==='MACHINE'){return new Promise(function(_0x1d0d27,_0x48981b){delete _0x1eab98[_0x9efb('0x26')][_0x40e0cd[_0x9efb('0xba')]];_0x1eab98[_0x9efb('0xbd')](_0x1eab98[_0x9efb('0x20')][_0x5eae9b[_0x9efb('0xb9')]]);_0x1eab98[_0x9efb('0x20')][_0x5eae9b[_0x9efb('0xb9')]][_0x9efb('0xc1')]+=0x1;_0x1eab98[_0x9efb('0x20')][_0x5eae9b[_0x9efb('0xb9')]][_0x9efb('0x116')]+=0x1;var _0x46b413=_0x1eab98['voiceQueues'][_0x5eae9b[_0x9efb('0xb9')]];var _0x12b99f=new Hangup(_0x5eae9b,_0x40e0cd);_0x12b99f[_0x9efb('0xd5')]=0x13;_0x12b99f['statedesc']=_0x9efb('0x11d');_0x12b99f['membername']=_0x9efb('0x11e');_0x12b99f['countmachineretry']+=0x1;_0x12b99f[_0x9efb('0xea')]+=0x1;_0x12b99f[_0x9efb('0x11f')]=!![];ami[_0x9efb('0x41')]('custom:amd',ut[_0x9efb('0x119')](_0x12b99f,_0x9efb('0x11f')));hopperUtils[_0x9efb('0xc7')](_0x12b99f)[_0x9efb('0x9e')](loggerCatch(_0x9efb('0x120')));if(_0x12b99f['countbusyretry']+_0x12b99f['countcongestionretry']+_0x12b99f['countnoanswerretry']+_0x12b99f[_0x9efb('0x121')]+_0x12b99f[_0x9efb('0xda')]+_0x12b99f['countabandonedretry']+_0x12b99f[_0x9efb('0x122')]+_0x12b99f[_0x9efb('0x123')]>=_0x46b413[_0x9efb('0x124')]){_0x1eab98[_0x9efb('0x125')](_0x12b99f,_0x1d0d27,_0x48981b,'reason19\x20machine....');}else{if(_0x12b99f[_0x9efb('0x122')]>=_0x46b413[_0x9efb('0x126')]){_0x1eab98[_0x9efb('0x127')](_0x12b99f,_0x1d0d27,_0x48981b,'reason\x2019\x20machine....');}else{hopperUtils[_0x9efb('0xd9')]({'active':![],'countmachineretry':_0x12b99f['countmachineretry'],'scheduledat':moment()[_0x9efb('0xee')](_0x46b413[_0x9efb('0x128')],'minutes')[_0x9efb('0x44')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x12b99f[_0x9efb('0xdc')],'ListId':_0x12b99f['ListId'],'VoiceQueueId':_0x12b99f[_0x9efb('0xde')]||undefined,'CampaignId':_0x12b99f[_0x9efb('0xdf')]||undefined})['catch'](loggerCatch(_0x9efb('0x129')));_0x1d0d27({'reschedule':0x1});}}});}if(_0x5eae9b[_0x9efb('0xbb')]==='ivr'&&this[_0x9efb('0x21')][_0x5eae9b[_0x9efb('0xb9')]][_0x9efb('0x114')]&&_0x40e0cd[_0x9efb('0x11c')]===_0x9efb('0x115')){delete this['uniqueId'][_0x40e0cd[_0x9efb('0xba')]];this['updateOriginated'](this[_0x9efb('0x21')][_0x5eae9b[_0x9efb('0xb9')]]);_0x14d6ea=new Hangup(_0x5eae9b,_0x40e0cd);_0x14d6ea[_0x9efb('0xd5')]=0x12;_0x14d6ea[_0x9efb('0xcf')]=_0x9efb('0x117');_0x14d6ea[_0x9efb('0x118')]=_0x9efb('0x11e');ami[_0x9efb('0x41')]('custom:amd',ut[_0x9efb('0x119')](_0x14d6ea,'amd'));this[_0x9efb('0x11a')](_0x14d6ea,_0x9efb('0x12a'),_0x9efb('0x12b'));}if(_0x5eae9b['type']===_0x9efb('0xbc')&&this[_0x9efb('0x21')][_0x5eae9b[_0x9efb('0xb9')]][_0x9efb('0x114')]&&_0x40e0cd[_0x9efb('0x11c')]===_0x9efb('0x12c')){return new Promise(function(_0xb9d598,_0x4a68b6){delete _0x1eab98['uniqueId'][_0x40e0cd[_0x9efb('0xba')]];_0x1eab98[_0x9efb('0xbd')](_0x1eab98['campaigns'][_0x5eae9b['queue']]);_0x1eab98[_0x9efb('0x21')][_0x5eae9b[_0x9efb('0xb9')]][_0x9efb('0xc1')]+=0x1;_0x1eab98[_0x9efb('0x21')][_0x5eae9b[_0x9efb('0xb9')]][_0x9efb('0x116')]+=0x1;var _0x4da9f6=_0x1eab98['campaigns'][_0x5eae9b[_0x9efb('0xb9')]];var _0xe867b4=new Hangup(_0x5eae9b,_0x40e0cd);_0xe867b4[_0x9efb('0xd5')]=0x13;_0xe867b4[_0x9efb('0xcf')]=_0x9efb('0x11d');_0xe867b4[_0x9efb('0x118')]='AMD';_0xe867b4[_0x9efb('0x122')]+=0x1;_0xe867b4[_0x9efb('0xea')]+=0x1;_0xe867b4['amd']=!![];ami[_0x9efb('0x41')](_0x9efb('0x12d'),ut[_0x9efb('0x119')](_0xe867b4,_0x9efb('0x11f')));hopperUtils['createHistory'](_0xe867b4)[_0x9efb('0x9e')](loggerCatch(_0x9efb('0x120')));if(_0xe867b4[_0x9efb('0x12e')]+_0xe867b4[_0x9efb('0x12f')]+_0xe867b4[_0x9efb('0x130')]+_0xe867b4[_0x9efb('0x121')]+_0xe867b4[_0x9efb('0xda')]+_0xe867b4[_0x9efb('0xe9')]+_0xe867b4['countmachineretry']+_0xe867b4[_0x9efb('0x123')]>=_0x4da9f6[_0x9efb('0x124')]){_0x1eab98['stateGlobal'](_0xe867b4,_0xb9d598,_0x4a68b6,_0x9efb('0x131'));}else{if(_0xe867b4[_0x9efb('0x122')]>=_0x4da9f6[_0x9efb('0x126')]){_0x1eab98[_0x9efb('0x127')](_0xe867b4,_0xb9d598,_0x4a68b6,_0x9efb('0x132'));}else{hopperUtils[_0x9efb('0xd9')]({'active':![],'countmachineretry':_0xe867b4[_0x9efb('0x122')],'scheduledat':moment()[_0x9efb('0xee')](_0x4da9f6[_0x9efb('0x128')],_0x9efb('0xdb'))[_0x9efb('0x44')](_0x9efb('0xbf')),'ContactId':_0xe867b4[_0x9efb('0xdc')],'ListId':_0xe867b4[_0x9efb('0xdd')],'VoiceQueueId':_0xe867b4[_0x9efb('0xde')]||undefined,'CampaignId':_0xe867b4['CampaignId']||undefined})[_0x9efb('0x9e')](loggerCatch('[rescheduleContact][Machine]'));_0xb9d598({'reschedule':0x1});}}});}}};Dialer[_0x9efb('0x85')][_0x9efb('0x35')]=function(_0x285e3d){var _0x560217=this[_0x9efb('0x26')][_0x285e3d[_0x9efb('0xba')]];var _0x36fb3d;if(_0x560217&&_0x560217[_0x9efb('0xbb')]===_0x9efb('0xbc')){delete this[_0x9efb('0x26')][_0x285e3d['uniqueid']];this[_0x9efb('0xbd')](this[_0x9efb('0x21')][_0x560217[_0x9efb('0xb9')]]);this[_0x9efb('0x21')][_0x560217[_0x9efb('0xb9')]][_0x9efb('0x133')]+=0x1;_0x36fb3d=new Hangup(_0x560217,_0x285e3d);hopperUtils[_0x9efb('0xc7')](_0x36fb3d)[_0x9efb('0x9e')](loggerCatch(_0x9efb('0x134')));hopperUtils['moveContactManagedDialer'](_0x36fb3d)['catch'](loggerCatch(_0x9efb('0x135')));}if(_0x560217&&_0x560217[_0x9efb('0xbb')]!==_0x9efb('0xbc')&&isNotNull(this[_0x9efb('0x20')][_0x560217[_0x9efb('0xb9')]][_0x9efb('0x136')])){delete this[_0x9efb('0x26')][_0x285e3d[_0x9efb('0xba')]];this[_0x9efb('0xbd')](this[_0x9efb('0x20')][_0x560217[_0x9efb('0xb9')]]);this['voiceQueues'][_0x560217['queue']]['outboundAnswerCallsDay']+=0x1;this[_0x9efb('0x20')][_0x560217['queue']][_0x9efb('0x116')]+=0x1;_0x36fb3d=new Hangup(_0x560217,_0x285e3d);_0x36fb3d['state']=0x10;_0x36fb3d['statedesc']=_0x9efb('0x137');_0x36fb3d[_0x9efb('0x118')]='AGI';hopperUtils[_0x9efb('0xc7')](_0x36fb3d)[_0x9efb('0x9e')](loggerCatch(_0x9efb('0x134')));hopperUtils[_0x9efb('0xc9')](_0x36fb3d)[_0x9efb('0x9e')](loggerCatch(_0x9efb('0x135')));}if(_0x560217&&_0x560217['type']!=='ivr'&&!isNotNull(this[_0x9efb('0x20')][_0x560217[_0x9efb('0xb9')]][_0x9efb('0x136')])){delete this[_0x9efb('0x26')][_0x285e3d['uniqueid']];this[_0x9efb('0xbd')](this[_0x9efb('0x20')][_0x560217[_0x9efb('0xb9')]]);this['voiceQueues'][_0x560217[_0x9efb('0xb9')]][_0x9efb('0x138')]+=0x1;_0x36fb3d=new Hangup(_0x560217,_0x285e3d);_0x36fb3d[_0x9efb('0xd5')]=0xc;_0x36fb3d[_0x9efb('0xcf')]=_0x285e3d[_0x9efb('0x139')];_0x36fb3d[_0x9efb('0x118')]=_0x9efb('0x13a');hopperUtils[_0x9efb('0xc7')](_0x36fb3d)[_0x9efb('0x9e')](loggerCatch(_0x9efb('0x134')));hopperUtils['moveContactManagedDialer'](_0x36fb3d)[_0x9efb('0x9e')](loggerCatch(_0x9efb('0x135')));}};Dialer[_0x9efb('0x85')]['syncQueueSummary']=function(_0x4d120f){var _0x4cd292=this;if(!_0x4cd292[_0x9efb('0x2c')][_0x4d120f[_0x9efb('0x46')]]){_0x4cd292[_0x9efb('0x2c')][_0x4d120f[_0x9efb('0x46')]]={'running':![]};}else if(_0x4cd292[_0x9efb('0x2c')][_0x4d120f[_0x9efb('0x46')]]['running']===!![]){return;}else if(_0x4cd292[_0x9efb('0x2c')][_0x4d120f[_0x9efb('0x46')]][_0x9efb('0x13b')]===![]){_0x4cd292[_0x9efb('0x2c')][_0x4d120f['name']][_0x9efb('0x13b')]=!![];}var _0x4a2669=_0x4cd292[_0x9efb('0x20')][_0x4d120f['name']];var _0x1664b0=_0x4a2669[_0x9efb('0x6f')]!==utils['CAMPAIGN_STATUS'][_0x9efb('0x74')];var _0x393b43=utils[_0x9efb('0x13c')](_0x4a2669);_0x4a2669['statusMessage']=utils[_0x9efb('0x13d')](_0x4a2669,_0x4cd292[_0x9efb('0x22')]);Promise[_0x9efb('0xa9')]()['then'](function(){if(_0x4a2669[_0x9efb('0x13e')]===utils[_0x9efb('0x67')]['INACTIVE']){if(_0x1664b0){clearPredictiveAttributes(_0x4a2669);_0x4d120f[_0x9efb('0x28')]=undefined;_0x4d120f[_0x9efb('0x29')]=undefined;}if(_0x4a2669[_0x9efb('0x13e')]===utils[_0x9efb('0x67')][_0x9efb('0x74')]){_0x4d120f[_0x9efb('0x13f')]=0x0;_0x4d120f['paused']=0x0;_0x4d120f[_0x9efb('0x140')]=0x0;_0x4d120f[_0x9efb('0x141')]=0x0;_0x4d120f['pTalking']=0x0;}}else if(_0x4a2669[_0x9efb('0x13e')]===utils[_0x9efb('0x67')][_0x9efb('0x142')]&&!_0x393b43){return _0x4cd292['ifTime'](_0x4a2669,!![])[_0x9efb('0x9a')](function(){return _0x4cd292[_0x9efb('0x8c')](_0x4a2669,![]);})[_0x9efb('0x9a')](function(){return _0x4cd292[_0x9efb('0x143')](_0x4a2669);})[_0x9efb('0x9e')](function(_0x206b8e){loggerSyncQueueSummary[_0x9efb('0x43')](_0x9efb('0x144'),util[_0x9efb('0x63')](_0x206b8e,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x4a2669);});}else{clearPredictiveAttributes(_0x4a2669);}})[_0x9efb('0x9a')](function(){var _0x4de860=_0x4d120f[_0x9efb('0x145')](_0x4a2669);if(_0x4de860||_0x4a2669[_0x9efb('0x146')]){_0x4a2669[_0x9efb('0x146')]=![];_0x4d120f['updateReportFromOutboundQueue'](_0x4a2669);Object[_0x9efb('0x147')](_0x4a2669,_0x4d120f);emitOutboundVoiceQueueSummary(_0x4d120f);}_0x4cd292[_0x9efb('0x2c')][_0x4a2669[_0x9efb('0x46')]][_0x9efb('0x13b')]=![];})[_0x9efb('0x9e')](function(_0x1d68bc){logger['error'](_0x9efb('0x144'),util['inspect'](_0x1d68bc,{'showHidden':![],'depth':null}));_0x4cd292['queuesSummary'][_0x4a2669[_0x9efb('0x46')]][_0x9efb('0x13b')]=![];});};Dialer[_0x9efb('0x85')][_0x9efb('0x34')]=_[_0x9efb('0x148')](function(){var _0x234976=_['filter'](this[_0x9efb('0x20')],function(_0x5a3f84){return _0x5a3f84['dialPreviewRecallmeReminder'];});var _0x3c701d=_[_0x9efb('0x149')](this[_0x9efb('0xf6')],function(_0x2d7d99){return _0x2d7d99['online']&&_0x2d7d99['status']===_0x9efb('0x82');});if(_0x234976[_0x9efb('0x95')]>0x0&&_0x3c701d['length']>0x0){return Promise[_0x9efb('0xa9')]()[_0x9efb('0x9a')](cmHopper[_0x9efb('0x14a')](_[_0x9efb('0x14b')](_0x234976,'id'),previewRecallmeReminderInterval,_[_0x9efb('0x14b')](_0x3c701d,'id')))[_0x9efb('0x9a')](function(_0x184bca){for(var _0x535225=0x0;_0x535225<_0x184bca[_0x9efb('0x95')];_0x535225++){var _0x2a295d=_0x184bca[_0x535225][_0x9efb('0x14c')][_0x9efb('0x46')];if(_0x2a295d)io['to'](util[_0x9efb('0x44')]('user:%s',_0x2a295d))['emit']('user:dialPreviewRecallReminder',{'hopper':_0x184bca[_0x535225]});}})[_0x9efb('0x9e')](function(_0x22f778){logger['error'](_0x9efb('0x14d'),_0x22f778);});}},0x3c*0x3e8,{'leading':!![]});Dialer['prototype'][_0x9efb('0x3d')]=function(){var _0x3815c5=this;setInterval(function(){_0x3815c5[_0x9efb('0x14e')](_0x3815c5['uniqueId'],_0x9efb('0x14f'));_0x3815c5[_0x9efb('0x14e')](_0x3815c5[_0x9efb('0x25')],_0x9efb('0x150'));},0x32c8);};Dialer[_0x9efb('0x85')][_0x9efb('0x14e')]=function(_0x297194,_0x3ef149){var _0xe12438=this;for(var _0x11e029 in _0x297194){if(typeof _0x297194[_0x11e029]!=='undefined'){this[_0x9efb('0x151')]['enqueue'](function(){if(!_[_0x9efb('0xf4')](_0x297194[_0x11e029])){return ami[_0x9efb('0x96')]({'action':'status','channel':_0x297194[_0x11e029][_0x9efb('0xf0')]})[_0x9efb('0x9e')](function(_0x3c956f){if(_0x3c956f[_0x9efb('0x6f')]==='No\x20such\x20channel'){setTimeout(function(){if(_0x297194[_0x11e029]&&_0x297194[_0x11e029][_0x9efb('0xbb')]!==_0x9efb('0xbc')){_0xe12438[_0x9efb('0xbd')](_0xe12438['voiceQueues'][_0x297194[_0x11e029][_0x9efb('0xb9')]]);logger[_0x9efb('0x61')](_0x9efb('0x152'),_0x3ef149,_0x11e029,_0x297194[_0x11e029][_0x9efb('0xb9')]);delete _0x297194[_0x11e029];}if(_0x297194[_0x11e029]&&_0x297194[_0x11e029][_0x9efb('0xbb')]===_0x9efb('0xbc')){_0xe12438[_0x9efb('0xbd')](_0xe12438[_0x9efb('0x21')][_0x297194[_0x11e029][_0x9efb('0xb9')]]);logger[_0x9efb('0x61')](_0x9efb('0x153'),_0x3ef149,_0x11e029,_0x297194[_0x11e029][_0x9efb('0xb9')]);delete _0x297194[_0x11e029];}},0x2328);}});}});}}};Dialer[_0x9efb('0x85')][_0x9efb('0x154')]=function(_0x1946f5){return Promise[_0x9efb('0xa9')]()[_0x9efb('0x9a')](voiceQueueRt['getVoiceQueueRtPauses'](_0x1946f5))[_0x9efb('0x9e')](loggerCatch('[getVoiceQueueRtPauses]\x20'));};Dialer[_0x9efb('0x85')]['updateOriginated']=function(_0x7c8920){if(!_[_0x9efb('0x40')](_0x7c8920)&&_0x7c8920!==null){if(typeof _0x7c8920['originated']!==_0x9efb('0x155')){if(_0x7c8920[_0x9efb('0x7a')]>0x0){_0x7c8920[_0x9efb('0x7a')]-=0x1;}else{logger['error'](_0x9efb('0x156'));}}}else{logger[_0x9efb('0x61')](_0x9efb('0x157'));}};Dialer[_0x9efb('0x85')]['loggerHandler']=function(_0x5f2ad9,_0x3135fa){var _0x4bcbcc=this;return function(_0x3a3e6a){_0x4bcbcc['updateOriginated'](_0x3135fa);logger[_0x9efb('0x61')](_0x5f2ad9,util[_0x9efb('0x63')](_0x3a3e6a,{'showHidden':![],'depth':null}));};};Dialer[_0x9efb('0x85')][_0x9efb('0x158')]=function(_0x27ceb3,_0x558c3d,_0x479ee9){var _0x4c83f8={'state':0x19,'statedesc':_0x9efb('0x159')};this[_0x9efb('0xbd')](_0x558c3d);this[_0x9efb('0x11a')](_[_0x9efb('0x5c')](_0x4c83f8,_[_0x9efb('0x6d')](_0x479ee9,[_0x9efb('0xdc'),_0x9efb('0xdd'),_0x9efb('0x15a'),'VoiceQueueId',_0x9efb('0xdf')])),_0x9efb('0x15b'),'[emptyContact]');logger[_0x9efb('0x61')](_0x27ceb3);};Dialer[_0x9efb('0x85')]['saveInDb']=function(_0x3c3572,_0x4081f1,_0x4940fd){hopperUtils[_0x9efb('0xc7')](_0x3c3572)[_0x9efb('0x9e')](loggerCatch(_0x4081f1));hopperUtils[_0x9efb('0xc9')](_0x3c3572)[_0x9efb('0x9e')](loggerCatch(_0x4940fd));};Dialer['prototype'][_0x9efb('0xd8')]=function(_0x5d2ce1,_0x1b1a88){hopperUtils[_0x9efb('0xc7')](_0x5d2ce1)[_0x9efb('0x9e')](loggerCatch('[syncAgentComplete][createHistory]'));if(_0x1b1a88==0x0){hopperUtils[_0x9efb('0xc9')](_0x5d2ce1)['catch'](loggerCatch('[syncQueueCallerAbandon]\x20[Drop]'));}};Dialer[_0x9efb('0x85')][_0x9efb('0x14d')]=function(_0xa11278){return Promise['resolve']()['then'](cmHopper[_0x9efb('0x14a')](_0xa11278['id'],previewRecallmeReminderInterval))[_0x9efb('0x9a')](function(_0x5d3a81){for(var _0xe5b3fe=0x0;_0xe5b3fe<_0x5d3a81['length'];_0xe5b3fe++){var _0x4c72c1=_0x5d3a81[_0xe5b3fe][_0x9efb('0x14c')][_0x9efb('0x46')];if(_0x4c72c1)io['to'](util[_0x9efb('0x44')](_0x9efb('0x15c'),_0x4c72c1))[_0x9efb('0x41')](_0x9efb('0x15d'),{'hopper':_0x5d3a81[_0xe5b3fe]});}})[_0x9efb('0x9e')](function(){});};Dialer[_0x9efb('0x85')]['launchHandleIvr']=function(_0x219dc5){var _0x2a34e2=this;return function(){_0x2a34e2['handleIvr'](_0x219dc5);};};Dialer[_0x9efb('0x85')][_0x9efb('0x15e')]=function(_0x38c50f,_0x507923){var _0x83184=this;var _0x410c8b=uuid['v4']();this[_0x9efb('0x25')][_0x410c8b]=new Action(_0x38c50f,_0x507923,_0x410c8b);return new Promise(function(_0x3efa34,_0x1b2a59){if(_[_0x9efb('0x40')](_0x38c50f)&&typeof _0x38c50f!=='object'){return _0x1b2a59(msgResponse(_0x9efb('0x15f'),'Failure',_0x9efb('0x160')));}if(_[_0x9efb('0x40')](_0x507923[_0x9efb('0x161')])||_0x507923['phone']===null){return _0x1b2a59(msgResponse(_0x9efb('0x15f'),_0x9efb('0x8d'),_0x9efb('0x162')));}var _0x5d8522={'XMD-CALLERID':_0x83184['actions'][_0x410c8b][_0x9efb('0x163')](),'XMD-AGI':_0x38c50f[_0x9efb('0x136')]?util[_0x9efb('0x44')]('\x22agi://%s/square,%s\x22',ipAgi,_0x38c50f[_0x9efb('0x136')]):_0x9efb('0x164'),'XMD-AGIAFTER':_0x38c50f[_0x9efb('0xc5')]?util['format'](_0x9efb('0x165'),ipAgi,_0x38c50f[_0x9efb('0xc5')]):'NONE','XMD-QUEUE':utils[_0x9efb('0x166')](_0x38c50f)?util[_0x9efb('0x44')]('\x22%s,%s%s,,,%s\x22',_0x38c50f[_0x9efb('0x46')],_0x38c50f[_0x9efb('0x167')]||'',_0x38c50f[_0x9efb('0xc6')]?'c':'',_0x38c50f['dialQueueTimeout']||0x3):'NONE','XMD-CONTACTID':_0x507923[_0x9efb('0xdc')],'XMD-CDRTYPE':_0x9efb('0x9'),'CALLERID(all)':_0x83184['actions'][_0x410c8b][_0x9efb('0x163')](),'XMD-AMD':_0x38c50f[_0x9efb('0x114')]?'ACTIVE':_0x9efb('0x164'),'XMD-DESTINATION':_0x9efb('0x113')};if(_0x38c50f[_0x9efb('0x114')]){_0x5d8522[_0x9efb('0x168')]=_0x38c50f[_0x9efb('0x169')]||0x9c4;_0x5d8522[_0x9efb('0x16a')]=_0x38c50f[_0x9efb('0x16b')]||0x5dc;_0x5d8522[_0x9efb('0x16c')]=_0x38c50f[_0x9efb('0x16d')]||0x320;_0x5d8522['XMD-AMDTOTALANALYSISTIME']=_0x38c50f[_0x9efb('0x16e')]||0x1388;_0x5d8522[_0x9efb('0x16f')]=_0x38c50f[_0x9efb('0x170')]||0x64;_0x5d8522[_0x9efb('0x171')]=_0x38c50f[_0x9efb('0x172')]||0x32;_0x5d8522[_0x9efb('0x173')]=_0x38c50f[_0x9efb('0x174')]||0x3;_0x5d8522['XMD-AMDSILENCETHRESHOLD']=_0x38c50f[_0x9efb('0x175')]||0x100;_0x5d8522[_0x9efb('0x176')]=_0x38c50f[_0x9efb('0x177')]||0x1388;}if(utils['isOutboundQueue'](_0x38c50f)){_0x5d8522['XMD-VOICEQUEUEID']=_0x507923['VoiceQueueId'];}else{_0x5d8522[_0x9efb('0x178')]=_0x507923[_0x9efb('0xdf')];}var _0xfba742=utils['setXMDContactVariables'](_0x507923[_0x9efb('0x179')]);Object['assign'](_0x5d8522,_0xfba742);var _0x380a23=_0x83184[_0x9efb('0x7f')](_0x38c50f[_0x9efb('0x17a')])?utils['getCallerId'](_0x38c50f[_0x9efb('0x17a')]['callerid'],_0x38c50f[_0x9efb('0x17b')],_0x38c50f[_0x9efb('0x17c')]>0x0?utils['getCallerIdRandom'](_0x38c50f[_0x9efb('0x17d')],_0x38c50f['dialRandomLastDigitCallerIdNumber']):_0x38c50f[_0x9efb('0x17d')]):utils['getCallerId'](_[_0x9efb('0xf4')](_0x38c50f[_0x9efb('0x17e')])?_0x38c50f[_0x9efb('0x17a')][_0x9efb('0x17f')]:_0x38c50f[_0x9efb('0x17e')][_0x9efb('0x17f')],_0x38c50f[_0x9efb('0x17b')],_0x38c50f[_0x9efb('0x17c')]>0x0?utils[_0x9efb('0x180')](_0x38c50f[_0x9efb('0x17d')],_0x38c50f[_0x9efb('0x17c')]):_0x38c50f[_0x9efb('0x17d')]);if(_0x380a23){_0x5d8522[_0x9efb('0x181')]=_0x83184[_0x9efb('0x25')][_0x410c8b]['originatecalleridname']=utils[_0x9efb('0x182')](_0x380a23);_0x5d8522[_0x9efb('0x183')]=_0x507923[_0x9efb('0x161')];}_0x38c50f['variables']=_0x5d8522;return ami[_0x9efb('0x96')]({'actionid':_0x410c8b,'action':_0x9efb('0x15f'),'channel':_0x83184[_0x9efb('0x7f')](_0x38c50f[_0x9efb('0x17a')])?util[_0x9efb('0x44')](_0x9efb('0x184'),_0x38c50f[_0x9efb('0x17a')]['name'],isNotNull(_0x38c50f[_0x9efb('0x185')])?_0x38c50f['dialPrefix']['trim']()||'':'',_0x38c50f[_0x9efb('0x186')]>0x0?_0x507923[_0x9efb('0x161')][_0x9efb('0x187')](_0x38c50f[_0x9efb('0x186')]):_0x507923[_0x9efb('0x161')]):util[_0x9efb('0x44')](_0x9efb('0x184'),_[_0x9efb('0xf4')](_0x38c50f[_0x9efb('0x17e')])?_0x38c50f[_0x9efb('0x17a')][_0x9efb('0x46')]:_0x38c50f[_0x9efb('0x17e')][_0x9efb('0x46')],isNotNull(_0x38c50f[_0x9efb('0x185')])?_0x38c50f['dialPrefix']['trim']()||'':'',_0x38c50f[_0x9efb('0x186')]>0x0?_0x507923[_0x9efb('0x161')][_0x9efb('0x187')](_0x38c50f[_0x9efb('0x186')]):_0x507923[_0x9efb('0x161')]),'callerid':_0x380a23,'Exten':_0x9efb('0x113'),'Context':_0x9efb('0x188'),'Priority':'1','variable':_0x5d8522,'timeout':(_0x38c50f[_0x9efb('0x189')]||0x1e)*0x3e8,'async':!![],'channelid':_0x410c8b})[_0x9efb('0x9a')](function(_0x690510){return _0x3efa34(_0x690510);})[_0x9efb('0x9e')](function(_0x2cab21){_0x38c50f[_0x9efb('0x18a')]+=0x1;var _0x575c90=new History(_0x83184[_0x9efb('0x25')][_0x410c8b]);logger['error'](util[_0x9efb('0x44')]('[originateError]:\x20%s',JSON[_0x9efb('0x7e')](_0x2cab21)));_0x575c90[_0x9efb('0xd5')]=0xe;_0x575c90[_0x9efb('0xcf')]=_0x9efb('0x18b');_0x575c90[_0x9efb('0x6a')]=moment()[_0x9efb('0x44')]('YYYY-MM-DD\x20HH:mm:ss');_0x575c90[_0x9efb('0xe1')]=_0x575c90['starttime'];hopperUtils[_0x9efb('0xc7')](_0x575c90)[_0x9efb('0x9e')](loggerCatch('[originate][error]'));_0x83184['moveContactManagedDialer'](_0x575c90)['catch'](loggerCatch(_0x9efb('0x18c')))['finally'](function(){delete _0x83184[_0x9efb('0x25')][_0x410c8b];return _0x1b2a59(msgResponse(_0x9efb('0x15f'),_0x9efb('0x18d'),_0x9efb('0x18e')));});});});};Dialer[_0x9efb('0x85')][_0x9efb('0x18f')]=function(_0xabc0f9,_0x376e9a,_0x242777){var _0xfb7257=new History(_0x376e9a);if(_0xfb7257['countbusyretry']+_0xfb7257[_0x9efb('0x12f')]+_0xfb7257[_0x9efb('0x130')]+_0xfb7257['countnosuchnumberretry']+_0xfb7257[_0x9efb('0xda')]+_0xfb7257['countabandonedretry']+_0xfb7257[_0x9efb('0x122')]+_0xfb7257[_0x9efb('0x123')]>=_0x242777['dialGlobalMaxRetry']-0x1){return!![];}switch(_0xabc0f9){case 0x3:if(_0xfb7257[_0x9efb('0x130')]>=_0x242777['dialNoAnswerMaxRetry']-0x1){return!![];}hopperUtils[_0x9efb('0xd9')]({'active':![],'countnoanswerretry':_0xfb7257[_0x9efb('0x130')]+=0x1,'scheduledat':moment()[_0x9efb('0xee')](_0x242777['dialNoAnswerRetryFrequency'],'minutes')['format'](_0x9efb('0xbf')),'ContactId':_0xfb7257[_0x9efb('0xdc')],'ListId':_0xfb7257[_0x9efb('0xdd')],'VoiceQueueId':_0xfb7257['VoiceQueueId']||undefined,'CampaignId':_0xfb7257['CampaignId']||undefined})[_0x9efb('0x9e')](loggerCatch(_0x9efb('0x190')));break;case 0x5:if(_0xfb7257['countbusyretry']>=_0x242777[_0x9efb('0x191')]-0x1){return!![];}hopperUtils[_0x9efb('0xd9')]({'active':![],'countbusyretry':_0xfb7257['countbusyretry']+=0x1,'scheduledat':moment()['add'](_0x242777['dialBusyRetryFrequency'],_0x9efb('0xdb'))[_0x9efb('0x44')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0xfb7257[_0x9efb('0xdc')],'ListId':_0xfb7257['ListId'],'VoiceQueueId':_0xfb7257[_0x9efb('0xde')]||undefined,'CampaignId':_0xfb7257[_0x9efb('0xdf')]||undefined})['catch'](loggerCatch(_0x9efb('0x192')));break;case 0x8:if(_0xfb7257[_0x9efb('0x12f')]>=_0x242777[_0x9efb('0x193')]-0x1){return!![];}hopperUtils[_0x9efb('0xd9')]({'active':![],'countcongestionretry':_0xfb7257[_0x9efb('0x12f')]+=0x1,'scheduledat':moment()[_0x9efb('0xee')](_0x242777[_0x9efb('0x194')],_0x9efb('0xdb'))['format'](_0x9efb('0xbf')),'ContactId':_0xfb7257[_0x9efb('0xdc')],'ListId':_0xfb7257[_0x9efb('0xdd')],'VoiceQueueId':_0xfb7257[_0x9efb('0xde')]||undefined,'CampaignId':_0xfb7257['CampaignId']||undefined})['catch'](loggerCatch('[rescheduleContact]\x20[Congestion]'));break;case 0x0:if(_0xfb7257[_0x9efb('0x121')]>=_0x242777['dialNoSuchNumberMaxRetry']-0x1){return!![];}else{hopperUtils[_0x9efb('0xd9')]({'active':![],'countnosuchnumberretry':_0xfb7257['countnosuchnumberretry']+=0x1,'scheduledat':moment()['add'](_0x242777[_0x9efb('0x195')],'minutes')[_0x9efb('0x44')](_0x9efb('0xbf')),'ContactId':_0xfb7257[_0x9efb('0xdc')],'ListId':_0xfb7257['ListId'],'VoiceQueueId':_0xfb7257[_0x9efb('0xde')]||undefined,'CampaignId':_0xfb7257[_0x9efb('0xdf')]||undefined})[_0x9efb('0x9e')](loggerCatch('[rescheduleContact][NoSuchNumber]'));}break;case 0xa:if(_0xfb7257[_0x9efb('0xda')]>=_0x242777[_0x9efb('0xd7')]-0x1){return!![];}hopperUtils[_0x9efb('0xd9')]({'active':![],'countdropretry':_0xfb7257['countdropretry']+=0x1,'scheduledat':moment()[_0x9efb('0xee')](_0x242777['dialDropRetryFrequency'],_0x9efb('0xdb'))[_0x9efb('0x44')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0xfb7257[_0x9efb('0xdc')],'ListId':_0xfb7257[_0x9efb('0xdd')],'VoiceQueueId':_0xfb7257[_0x9efb('0xde')]||undefined,'CampaignId':_0xfb7257[_0x9efb('0xdf')]||undefined})[_0x9efb('0x9e')](loggerCatch('[rescheduleContact][Drop]'));break;case 0xb:if(_0xfb7257[_0x9efb('0xe9')]>=_0x242777[_0x9efb('0xed')]-0x1){return!![];}hopperUtils[_0x9efb('0xd9')]({'active':![],'countabandonedretry':_0xfb7257['countabandonedretry']+=0x1,'scheduledat':moment()[_0x9efb('0xee')](_0x242777['dialAbandonedRetryFrequency'],_0x9efb('0xdb'))[_0x9efb('0x44')](_0x9efb('0xbf')),'ContactId':_0xfb7257[_0x9efb('0xdc')],'ListId':_0xfb7257['ListId'],'VoiceQueueId':_0xfb7257[_0x9efb('0xde')]||undefined,'CampaignId':_0xfb7257[_0x9efb('0xdf')]||undefined})[_0x9efb('0x9e')](loggerCatch(_0x9efb('0x196')));break;case 0x13:if(_0xfb7257['countmachineretry']>=_0x242777['dialMachineMaxRetry']-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countmachineretry':_0xfb7257[_0x9efb('0x122')]+=0x1,'scheduledat':moment()[_0x9efb('0xee')](_0x242777[_0x9efb('0x128')],_0x9efb('0xdb'))[_0x9efb('0x44')](_0x9efb('0xbf')),'ContactId':_0xfb7257[_0x9efb('0xdc')],'ListId':_0xfb7257[_0x9efb('0xdd')],'VoiceQueueId':_0xfb7257['VoiceQueueId']||undefined,'CampaignId':_0xfb7257[_0x9efb('0xdf')]||undefined})['catch'](loggerCatch(_0x9efb('0x129')));break;case 0x14:if(_0xfb7257['countagentrejectretry']>=_0x242777[_0x9efb('0x197')]-0x1){return!![];}hopperUtils[_0x9efb('0xd9')]({'active':![],'countagentrejectretry':_0xfb7257[_0x9efb('0x123')]+=0x1,'scheduledat':moment()[_0x9efb('0xee')](_0x242777[_0x9efb('0x198')],_0x9efb('0xdb'))['format'](_0x9efb('0xbf')),'ContactId':_0xfb7257[_0x9efb('0xdc')],'ListId':_0xfb7257[_0x9efb('0xdd')],'VoiceQueueId':_0xfb7257[_0x9efb('0xde')]||undefined,'CampaignId':_0xfb7257[_0x9efb('0xdf')]||undefined})['catch'](loggerCatch(_0x9efb('0x199')));break;default:return!![];}};Dialer['prototype'][_0x9efb('0x10e')]=function(_0x12b26c,_0x18571,_0x58c3fa){var _0x151782=this;var _0x219ccb=new History(_0x12b26c);var _0x3cc409=![];var _0x354926;var _0x515345;return new Promise(function(_0x3979d2,_0x5b58ca){if(_['isUndefined'](_0x18571)&&typeof _0x18571!==_0x9efb('0x19a')){return _0x5b58ca(msgResponse(_0x9efb('0x19b'),_0x9efb('0x8d'),_0x9efb('0x19c')));}if(_['isUndefined'](_0x58c3fa)&&typeof _0x58c3fa!==_0x9efb('0x19a')){return _0x5b58ca(msgResponse(_0x9efb('0x19b'),_0x9efb('0x8d'),_0x9efb('0x19d')));}hopperUtils['verifyAdditionalPhones'](_0x219ccb,_0x58c3fa['reason'],_0x18571)[_0x9efb('0x9a')](function(_0x49ea5e){if(_0x49ea5e['additional']==0x1)_0x3cc409=!![];switch(_0x58c3fa[_0x9efb('0xc2')]){case'0':_0x18571['outboundNoSuchCallsDay']+=0x1;_0x219ccb[_0x9efb('0xd5')]=0x0;_0x219ccb[_0x9efb('0xcf')]=_0x9efb('0x19e');_0x219ccb[_0x9efb('0x121')]+=0x1;_0x219ccb['countglobal']+=0x1;ami['emit'](_0x9efb('0x19f'),ut[_0x9efb('0x119')](_0x12b26c,_0x9efb('0x1a0')));_0x354926=_0x18571[_0x9efb('0x195')];_0x515345=_0x18571[_0x9efb('0xd3')];hopperUtils['createHistory'](_0x219ccb)[_0x9efb('0x9e')](loggerCatch(_0x9efb('0x120')));if(_0x151782[_0x9efb('0x18f')](0x0,_0x12b26c,_0x18571)&&!_0x3cc409){if(_0x219ccb['countnosuchnumberretry']>=_0x18571[_0x9efb('0x1a1')]){_0x151782[_0x9efb('0x127')](_0x219ccb,_0x3979d2,_0x5b58ca,_0x9efb('0x1a2'));}else{_0x151782[_0x9efb('0x125')](_0x219ccb,_0x3979d2,_0x5b58ca,'reason\x200\x20no\x20such\x20number....');}}break;case'3':_0x18571[_0x9efb('0x1a3')]+=0x1;_0x219ccb[_0x9efb('0xd5')]=0x3;_0x219ccb[_0x9efb('0xcf')]=_0x9efb('0x1a4');_0x219ccb[_0x9efb('0x130')]+=0x1;_0x219ccb['countglobal']+=0x1;var _0x45474b=ut[_0x9efb('0x1a5')](_0x12b26c,_0x18571);ami[_0x9efb('0x41')]('custom:agentnoanswer',_0x45474b);_0x354926=_0x18571[_0x9efb('0x1a6')];_0x515345=_0x18571[_0x9efb('0xd3')];hopperUtils[_0x9efb('0xc7')](_0x219ccb)[_0x9efb('0x9e')](loggerCatch(_0x9efb('0x1a7')));if(_0x151782[_0x9efb('0x18f')](0x3,_0x12b26c,_0x18571)&&!_0x3cc409){if(_0x219ccb['countnoanswerretry']>=_0x18571[_0x9efb('0x1a8')]){_0x151782[_0x9efb('0x127')](_0x219ccb,_0x3979d2,_0x5b58ca,'reason\x203\x20ringing\x20no\x20answer');}else{_0x151782[_0x9efb('0x125')](_0x219ccb,_0x3979d2,_0x5b58ca,_0x9efb('0x1a9'));}}break;case'5':_0x18571['outboundBusyCallsDay']+=0x1;_0x219ccb[_0x9efb('0xd5')]=0x5;_0x219ccb[_0x9efb('0xcf')]=_0x9efb('0x1aa');_0x219ccb[_0x9efb('0x12e')]+=0x1;_0x219ccb['countglobal']+=0x1;ami[_0x9efb('0x41')](_0x9efb('0x1ab'),ut['buildObj'](_0x12b26c,_0x9efb('0x1ac')));_0x354926=_0x18571[_0x9efb('0x1ad')];_0x515345=_0x18571['callAdditionalPhoneAfterMin'];hopperUtils[_0x9efb('0xc7')](_0x219ccb)[_0x9efb('0x9e')](loggerCatch(_0x9efb('0x1ae')));if(_0x151782[_0x9efb('0x18f')](0x5,_0x12b26c,_0x18571)&&!_0x3cc409){if(_0x219ccb[_0x9efb('0x12e')]>=_0x18571[_0x9efb('0x191')]){_0x151782[_0x9efb('0x127')](_0x219ccb,_0x3979d2,_0x5b58ca,'reason\x205\x20busy');}else{_0x151782[_0x9efb('0x125')](_0x219ccb,_0x3979d2,_0x5b58ca,'reason\x205\x20busy');}}break;case'8':_0x18571[_0x9efb('0x1af')]+=0x1;_0x219ccb[_0x9efb('0xd5')]=0x8;_0x219ccb[_0x9efb('0xcf')]=_0x9efb('0x1b0');_0x219ccb[_0x9efb('0x12f')]+=0x1;_0x219ccb[_0x9efb('0xea')]+=0x1;_0x354926=_0x18571[_0x9efb('0x194')];_0x515345=_0x18571[_0x9efb('0xd3')];ami[_0x9efb('0x41')](_0x9efb('0x1b1'),ut[_0x9efb('0x119')](_0x12b26c,'congestion'));hopperUtils['createHistory'](_0x219ccb)[_0x9efb('0x9e')](loggerCatch(_0x9efb('0x1b2')));if(_0x151782['checkRetriveMax'](0x8,_0x12b26c,_0x18571)&&!_0x3cc409){if(_0x219ccb['countcongestionretry']>=_0x18571[_0x9efb('0x193')]){_0x151782[_0x9efb('0x127')](_0x219ccb,_0x3979d2,_0x5b58ca,_0x9efb('0x1b3'));}else{_0x151782['stateGlobal'](_0x219ccb,_0x3979d2,_0x5b58ca,_0x9efb('0x1b3'));}}break;case'11':_0x18571['outboundAbandonedCallsDay']+=0x1;_0x219ccb[_0x9efb('0xd5')]=0xb;_0x219ccb['statedesc']=_0x9efb('0xe7');_0x219ccb[_0x9efb('0xe9')]+=0x1;_0x219ccb[_0x9efb('0xea')]+=0x1;_0x354926=_0x18571['dialAbandonedRetryFrequency'];_0x515345=_0x18571['callAdditionalPhoneAfterMin'];hopperUtils[_0x9efb('0xc7')](_0x219ccb)[_0x9efb('0x9e')](loggerCatch('[syncAgentComplete][createHistory][11]'));if(_0x151782[_0x9efb('0x18f')](0xb,_0x12b26c,_0x18571)&&!_0x3cc409){if(_0x219ccb['countabandonedretry']>=_0x18571[_0x9efb('0xed')]){_0x151782['createStateFinal'](_0x219ccb,_0x3979d2,_0x5b58ca,_0x9efb('0x1b4'));}else{_0x151782[_0x9efb('0x125')](_0x219ccb,_0x3979d2,_0x5b58ca,'reason\x2011\x20abandoned');}}break;case'20':_0x18571[_0x9efb('0x1b5')]+=0x1;_0x219ccb['state']=0x14;_0x219ccb[_0x9efb('0xcf')]=_0x9efb('0x1b6');_0x219ccb[_0x9efb('0x123')]+=0x1;_0x219ccb[_0x9efb('0xea')]+=0x1;_0x354926=_0x18571[_0x9efb('0x198')];_0x515345=_0x18571[_0x9efb('0xd3')];ami[_0x9efb('0x41')](_0x9efb('0x1b7'),ut[_0x9efb('0x119')](_0x12b26c,_0x9efb('0x1b8')));hopperUtils[_0x9efb('0xc7')](_0x219ccb)[_0x9efb('0x9e')](loggerCatch(_0x9efb('0x1b9')));if(_0x151782[_0x9efb('0x18f')](0x14,_0x12b26c,_0x18571)&&!_0x3cc409){if(_0x219ccb[_0x9efb('0x123')]>=_0x18571[_0x9efb('0x197')]){_0x151782['createStateFinal'](_0x219ccb,_0x3979d2,_0x5b58ca,'reason\x2020\x20agentreject');}else{_0x151782['stateGlobal'](_0x219ccb,_0x3979d2,_0x5b58ca,'reason\x2020\x20agentreject');}}break;default:_0x18571[_0x9efb('0x138')]+=0x1;_0x219ccb[_0x9efb('0xd5')]=0xc;_0x219ccb[_0x9efb('0xcf')]=_0x58c3fa['reason'];_0x354926=_0x18571[_0x9efb('0x198')];_0x515345=_0x18571['callAdditionalPhoneAfterMin'];hopperUtils['createHistory'](_0x219ccb)[_0x9efb('0x9e')](loggerCatch(_0x9efb('0x1ba')));if(_0x151782[_0x9efb('0x18f')](_0x58c3fa[_0x9efb('0xc2')],_0x12b26c,_0x18571)&&!_0x3cc409){if(_0x219ccb[_0x9efb('0x12e')]+_0x219ccb['countcongestionretry']+_0x219ccb[_0x9efb('0x130')]+_0x219ccb[_0x9efb('0x121')]+_0x219ccb[_0x9efb('0xda')]+_0x219ccb[_0x9efb('0xe9')]+_0x219ccb[_0x9efb('0x122')]+_0x219ccb[_0x9efb('0x123')]>=_0x18571[_0x9efb('0x124')]){_0x151782[_0x9efb('0x125')](_0x219ccb,_0x3979d2,_0x5b58ca,_0x58c3fa['reason']);}else{_0x151782['createStateFinal'](_0x219ccb,_0x3979d2,_0x5b58ca,_0x58c3fa[_0x9efb('0xc2')]);}}}})[_0x9efb('0x9a')](function(){if(_0x3cc409){hopperUtils['swapAdditionalPhones'](_0x219ccb,_0x354926,_0x515345)['then'](function(){return _0x3979d2(0x1);});}});});};Dialer[_0x9efb('0x85')][_0x9efb('0x125')]=function(_0x25e903,_0x2e6e66,_0x2d5b78,_0x1802a0){var _0x14f87e=new Final(_0x25e903);_0x14f87e[_0x9efb('0xd5')]=0xf;_0x14f87e[_0x9efb('0xcf')]=_0x9efb('0x1bb');this[_0x9efb('0x127')](_0x14f87e,_0x2e6e66,_0x2d5b78,_0x1802a0);};Dialer[_0x9efb('0x85')]['createStateFinal']=function(_0x4c0327,_0x10f844,_0x30e816,_0x409132){hopperUtils[_0x9efb('0xc9')](_0x4c0327)[_0x9efb('0x9a')](function(){return _0x10f844(msgResponse(_0x9efb('0x19b'),_0x9efb('0x10d'),_0x409132));})[_0x9efb('0x9e')](function(){return _0x30e816(msgResponse(_0x9efb('0x1bc'),_0x9efb('0x8d'),'contact\x20not\x20moved'));});};Dialer['prototype'][_0x9efb('0xb')]=function(_0x31ec59){var _0x4d0a88=_0x31ec59[_0x9efb('0x1bd')]/0x64;var _0x39bb58=_0x31ec59[_0x9efb('0xcd')]/(_0x31ec59[_0x9efb('0xcd')]+_0x31ec59[_0x9efb('0xc1')]);var _0x5172a8=Math[_0x9efb('0x1be')](_0x31ec59[_0x9efb('0x1bf')]*(_0x31ec59[_0x9efb('0x1c0')]/0x64));var _0x557fa7=Math[_0x9efb('0x1be')](_0x31ec59[_0x9efb('0x1bf')]*(_0x31ec59[_0x9efb('0x1c1')]/0x64));var _0x3ddee2=_0x31ec59[_0x9efb('0x13f')]+_0x31ec59['talking'];var _0x10896e=Math[_0x9efb('0x1c2')](_0x31ec59[_0x9efb('0x1c3')]*_0x31ec59[_0x9efb('0x5a')]*_0x31ec59[_0x9efb('0x1c4')]*_0x31ec59[_0x9efb('0x1c5')]);if(_[_0x9efb('0x40')](_0x31ec59['startProgressive'])){if(!_[_0x9efb('0x40')](_0x31ec59['startPredictive'])){_0x31ec59[_0x9efb('0x28')]=undefined;loggerPredictive[_0x9efb('0x61')](_0x9efb('0x1c6'),_0x9efb('0x1c7'));}if(!_[_0x9efb('0x40')](_0x31ec59[_0x9efb('0x5f')])){loggerPredictive[_0x9efb('0x61')](_0x9efb('0x1c6'),'check\x20handlePredictive\x20is\x20not\x20undefine');clearInterval(_0x31ec59[_0x9efb('0x5f')]);_0x31ec59[_0x9efb('0x5f')]=undefined;}_0x31ec59[_0x9efb('0x29')]=moment()['format'](_0x9efb('0xbf'));loggerPredictive['info'](_0x31ec59['name'],_0x9efb('0x1c8'),_0x31ec59[_0x9efb('0x29')]);this[_0x9efb('0xad')](_0x31ec59,0x1);}else if(ifInterval(_0x31ec59[_0x9efb('0x1c9')],_0x31ec59[_0x9efb('0x29')])){this[_0x9efb('0xad')](_0x31ec59,0x1);loggerPredictiveCalls[_0x9efb('0x48')](_0x9efb('0x1ca'),_0x31ec59['startProgressive'],_0x31ec59[_0x9efb('0x46')]);_0x31ec59['erlangCalls']=0x0;_0x31ec59[_0x9efb('0xce')]=0x0;}else if(_0x4d0a88<_0x39bb58&&_0x31ec59[_0x9efb('0x1cb')]==='dropRate'){clearPredictiveAttributes(_0x31ec59);loggerPredictive['info'](_0x9efb('0x1cc'),'Dropped\x20calls\x20day',_0x39bb58,'startProgressive',_0x31ec59['name']);}else if(_0x10896e<_0x31ec59[_0x9efb('0xce')]&&_0x31ec59[_0x9efb('0x1cb')]===_0x9efb('0x1cd')){clearPredictiveAttributes(_0x31ec59);loggerPredictive['info'](_0x9efb('0x1ce'),'Max\x20Drop\x20',_0x10896e,_0x9efb('0x1cf'),_0x31ec59['predictiveIntervalErlangCallsDroppedCalls'],_0x9efb('0x29'),_0x31ec59[_0x9efb('0x46')]);}else if(!ifInterval(_0x31ec59[_0x9efb('0x1c9')],_0x31ec59['startProgressive'])&&_[_0x9efb('0x40')](_0x31ec59['startPredictive'])&&!_[_0x9efb('0x40')](_0x31ec59[_0x9efb('0x29')])){_0x31ec59[_0x9efb('0x28')]=moment()[_0x9efb('0x44')](_0x9efb('0xbf'));loggerPredictive[_0x9efb('0x48')](_0x31ec59[_0x9efb('0x46')],'started\x20in\x20predictive\x20at',_0x31ec59['startPredictive']);hopperUtils['avgHandleTime'](_0x31ec59[_0x9efb('0x1c9')])[_0x9efb('0x9a')](this['getDataPredictive'](_0x31ec59))['then'](mergeDataErlangB(_0x31ec59))[_0x9efb('0x9a')](this[_0x9efb('0x1d0')](_0x31ec59))['catch'](loggerCatchPredictive(_0x9efb('0x1d1'),_0x31ec59));}else if(!ifInterval(_0x31ec59[_0x9efb('0x1c9')],_0x31ec59[_0x9efb('0x28')])){_0x31ec59[_0x9efb('0xce')]=0x0;_0x31ec59[_0x9efb('0x28')]=moment()[_0x9efb('0x44')](_0x9efb('0xbf'));loggerPredictive[_0x9efb('0x48')](_0x31ec59['name'],_0x9efb('0x1d2'),_0x31ec59[_0x9efb('0x28')]);clearInterval(_0x31ec59[_0x9efb('0x5f')]);_0x31ec59['handlePredictive']=undefined;hopperUtils[_0x9efb('0x1d3')](_0x31ec59['dialPredictiveInterval'])['then'](this[_0x9efb('0x1d4')](_0x31ec59))[_0x9efb('0x9a')](mergeDataErlangB(_0x31ec59))[_0x9efb('0x9a')](this[_0x9efb('0x1d0')](_0x31ec59))['catch'](loggerCatchPredictive(_0x9efb('0x1d5'),_0x31ec59));}else if(_0x31ec59[_0x9efb('0x1bf')]&&_0x3ddee2<_0x31ec59[_0x9efb('0x1bf')]-_0x557fa7){clearPredictiveAttributes(_0x31ec59);loggerPredictive['info'](_0x31ec59[_0x9efb('0x46')],'switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',_0x3ddee2,_0x9efb('0x1d6'),_0x31ec59[_0x9efb('0x1bf')],'-',_0x557fa7,'=',_0x31ec59['predictiveIntervalAvailable']-_0x557fa7,')');}else if(_0x31ec59['predictiveIntervalAvailable']&&_0x3ddee2>_0x31ec59[_0x9efb('0x1bf')]+_0x5172a8){clearPredictiveAttributes(_0x31ec59);loggerPredictive[_0x9efb('0x48')](_0x31ec59['name'],_0x9efb('0x1d7'),_0x3ddee2,_0x9efb('0x1d8'),_0x31ec59[_0x9efb('0x1bf')],'+',_0x5172a8,'=',_0x31ec59[_0x9efb('0x1bf')]+_0x5172a8,')');}};Dialer[_0x9efb('0x85')][_0x9efb('0x1d4')]=function(_0x16c786){var _0x2f2441=this;return function(_0x5c49e0){return new Promise(function(_0x5bd79e,_0x70e4ec){_['merge'](_0x16c786,_0x5c49e0[0x0]);if(checkGetDataPredictive(_0x5c49e0[0x0])){var _0x17022e=_0x16c786[_0x9efb('0x1bf')]=_0x16c786[_0x9efb('0x141')]+_0x16c786[_0x9efb('0x13f')];var _0x330e7=_0x16c786[_0x9efb('0x1c9')]*0x3c;var _0x43813b=_0x5c49e0[0x0][_0x9efb('0x4f')]+_0x5c49e0[0x0][_0x9efb('0x51')];var _0x53ca47=(_0x5c49e0[0x0]['predictiveIntervalAnsweredCalls']+_0x5c49e0[0x0][_0x9efb('0x4e')]+_0x5c49e0[0x0][_0x9efb('0xe6')])/_0x5c49e0[0x0][_0x9efb('0x4a')];_0x16c786['predictiveIntervalHitRate']=_0x53ca47>0x0?_0x53ca47:0x1;switch(_0x16c786[_0x9efb('0x1cb')]){case'dropRate':var _0xec843e=_0x16c786[_0x9efb('0x1bd')]/0x64;return _0x2f2441[_0x9efb('0x1d9')](_0x17022e,_0x330e7,_0x43813b,_0x53ca47,_0xec843e)['then'](function(_0x21e1b2){return _0x5bd79e(_0x21e1b2);});case _0x9efb('0x1da'):var _0x1df65d=_0x16c786[_0x9efb('0x1bd')]/0x64;return _0x2f2441['busyFactor'](_0x17022e,_0x330e7,_0x43813b,_0x53ca47,_0x1df65d)[_0x9efb('0x9a')](function(_0x406423){return _0x5bd79e(_0x406423);});default:return _0x70e4ec(msgResponse(_0x9efb('0x1db'),'Failure',_0x9efb('0x1dc')));}}else{return _0x70e4ec(msgResponse(_0x9efb('0x1db'),'Failure','check\x20failure'));}});};};Dialer[_0x9efb('0x85')][_0x9efb('0x1dd')]=function(_0x168b2f){var _0xa17bdf=this;return function(_0x5e60ca){return new Promise(function(_0x57ea30,_0x4aad4d){_[_0x9efb('0x5c')](_0x168b2f,_0x5e60ca[0x0]);if(checkGetDataPredictive(_0x5e60ca[0x0])){loggerPredictive[_0x9efb('0x48')](JSON[_0x9efb('0x7e')](_0x5e60ca[0x0]));if(_0x168b2f[_0x9efb('0x1cb')]==='dropRate'){return _0xa17bdf[_0x9efb('0x154')](_0x168b2f['id'])[_0x9efb('0x9a')](function(_0xd2f1ac){var _0x19635c=_0x168b2f[_0x9efb('0x1de')]-_0xd2f1ac[0x0][_0x9efb('0x1df')];var _0x368b02=_0x168b2f[_0x9efb('0x1c9')]*0x3c;var _0xd70e8c=_0x5e60ca[0x0][_0x9efb('0x4f')]+_0x5e60ca[0x0][_0x9efb('0x51')];var _0x4b0da0=(_0x5e60ca[0x0]['predictiveIntervalAnsweredCalls']+_0x5e60ca[0x0][_0x9efb('0x4e')]+_0x5e60ca[0x0][_0x9efb('0xe6')])/_0x5e60ca[0x0][_0x9efb('0x4a')];var _0x456e57=_0x168b2f['dialPredictiveOptimizationPercentage']/0x64;_0x168b2f[_0x9efb('0x1e0')]=_0xd2f1ac[0x0]['outboundQueuePauses']||0x0;_0x168b2f['predictiveIntervalHitRate']=_0x4b0da0>0x0?_0x4b0da0:0x1;return _0xa17bdf[_0x9efb('0x1d9')](_0x19635c,_0x368b02,_0xd70e8c,_0x4b0da0,_0x456e57);})[_0x9efb('0x9a')](function(_0x21fda6){return _0x57ea30(_0x21fda6);})[_0x9efb('0x9e')](function(_0x8e2b26){return _0x4aad4d(msgResponse(_0x9efb('0x1e1'),'Failure',JSON[_0x9efb('0x7e')](_0x8e2b26)));});}if(_0x168b2f[_0x9efb('0x1cb')]===_0x9efb('0x1da')){return _0xa17bdf[_0x9efb('0x154')](_0x168b2f['id'])['then'](function(_0x3542fa){var _0x4971e7=_0x168b2f['loggedIn']-_0x3542fa[0x0]['outboundQueuePauses'];var _0x485bb6=_0x168b2f[_0x9efb('0x1c9')]*0x3c;var _0x5a7d1e=_0x5e60ca[0x0][_0x9efb('0x4f')]+_0x5e60ca[0x0]['predictiveIntervalAvgHoldtime'];var _0xd3f909=(_0x5e60ca[0x0][_0x9efb('0x4c')]+_0x5e60ca[0x0]['predictiveIntervalDroppedCallsTimeout']+_0x5e60ca[0x0][_0x9efb('0xe6')])/_0x5e60ca[0x0][_0x9efb('0x4a')];var _0x3d13cc=_0x168b2f['dialPredictiveOptimizationPercentage']/0x64;_0x168b2f[_0x9efb('0x1e0')]=_0x3542fa[0x0]['outboundQueuePauses']||0x0;_0x168b2f['predictiveIntervalHitRate']=_0xd3f909>0x0?_0xd3f909:0x1;return _0xa17bdf[_0x9efb('0x1e2')](_0x4971e7,_0x485bb6,_0x5a7d1e,_0xd3f909,_0x3d13cc);})[_0x9efb('0x9a')](function(_0x3c9f4d){return _0x57ea30(_0x3c9f4d);})[_0x9efb('0x9e')](function(_0x4bd5ae){return _0x4aad4d(msgResponse('[CatchErlangB]',_0x9efb('0x8d'),JSON['stringify'](_0x4bd5ae)));});}}else{return _0x4aad4d(msgResponse(_0x9efb('0x1db'),'Failure','check\x20failure'));}});};};Dialer[_0x9efb('0x85')][_0x9efb('0x1d0')]=function(_0x56bc74){var _0x68cc7d=this;return function(){var _0x308ad7=0x0;var _0xeaf8f5=Math[_0x9efb('0x1c2')](_0x56bc74[_0x9efb('0x57')]*0x3e8);if(_0xeaf8f5>0x0){_0xeaf8f5=_0xeaf8f5<0x64?0x64:_0xeaf8f5;loggerPredictive[_0x9efb('0x48')](_0x56bc74[_0x9efb('0x46')],_0x9efb('0x1e3'),_0xeaf8f5,_0x9efb('0x1e4'));_0x56bc74[_0x9efb('0x5f')]=setInterval(function(){_0x68cc7d[_0x9efb('0x5f')](_0x56bc74);loggerPredictiveCalls[_0x9efb('0x48')]('[handlePredictive]',_0x308ad7+=0x1);},_0xeaf8f5);}else{loggerPredictive[_0x9efb('0x48')](_0x56bc74[_0x9efb('0x46')],_0x9efb('0x1e5'));}};};Dialer['prototype'][_0x9efb('0x1e6')]=function(_0x633981,_0x2665ff){var _0x54d0b7=this;return function(_0x58c27d){if(_[_0x9efb('0x73')](_0x58c27d)){if(_['isNil'](_0x2665ff[_0x9efb('0x15a')])||!_0x2665ff[_0x9efb('0x1e7')]){if(_0x633981[_0x9efb('0xab')]===_0x9efb('0xa')){_0x633981[_0x9efb('0x6b')]=_[_0x9efb('0x40')](_0x633981['queueStatusComplete'])?!![]:_0x633981[_0x9efb('0x6b')];var _0x5e7ce2=uuid['v4']();_0x54d0b7['actions'][_0x5e7ce2]=new Action(_0x633981,_0x2665ff,_0x5e7ce2);loggerBooked[_0x9efb('0x48')](_0x9efb('0x1e8'),_0x5e7ce2,'queueStatusComplete:\x20',JSON[_0x9efb('0x7e')](_0x633981['queueStatusComplete']),_0x9efb('0x1e9'),_0x633981['name']);if(_0x633981[_0x9efb('0x6b')]){_0x633981[_0x9efb('0x6b')]=![];_0x54d0b7[_0x9efb('0x2a')][_0x54d0b7['actions'][_0x5e7ce2][_0x9efb('0xb9')]]=[];ami[_0x9efb('0x96')]({'actionid':_0x5e7ce2,'action':'queuestatus','queue':_0x633981[_0x9efb('0x46')]})[_0x9efb('0x9e')](function(){_0x54d0b7[_0x9efb('0xbd')](_0x633981);hopperUtils[_0x9efb('0xd9')]({'active':![],'ContactId':_0x54d0b7['actions'][_0x5e7ce2][_0x9efb('0xdc')],'ListId':_0x54d0b7[_0x9efb('0x25')][_0x5e7ce2][_0x9efb('0xdd')],'VoiceQueueId':_0x54d0b7[_0x9efb('0x25')][_0x5e7ce2][_0x9efb('0xde')]||undefined,'CampaignId':_0x54d0b7['actions'][_0x5e7ce2][_0x9efb('0xdf')]||undefined})['catch'](loggerCatch(_0x9efb('0x1ea')));delete _0x54d0b7[_0x9efb('0x25')][_0x5e7ce2];});}else{loggerBooked[_0x9efb('0x48')](_0x9efb('0x1eb'),JSON[_0x9efb('0x7e')](_0x633981[_0x9efb('0x6b')]),_0x9efb('0x1e9'),_0x633981[_0x9efb('0x46')]);_0x54d0b7[_0x9efb('0xbd')](_0x633981);hopperUtils[_0x9efb('0xd9')]({'active':![],'ContactId':_0x54d0b7[_0x9efb('0x25')][_0x5e7ce2][_0x9efb('0xdc')],'ListId':_0x54d0b7[_0x9efb('0x25')][_0x5e7ce2][_0x9efb('0xdd')],'VoiceQueueId':_0x54d0b7[_0x9efb('0x25')][_0x5e7ce2][_0x9efb('0xde')]||undefined,'CampaignId':_0x54d0b7[_0x9efb('0x25')][_0x5e7ce2][_0x9efb('0xdf')]||undefined})[_0x9efb('0x9e')](loggerCatch(_0x9efb('0x1ea')));delete _0x54d0b7[_0x9efb('0x25')][_0x5e7ce2];}}else{return _0x54d0b7[_0x9efb('0x15e')](_0x633981,_0x2665ff);}}else{if(utils[_0x9efb('0x5d')](undefined,_0x2665ff[_0x9efb('0x1ec')])<_0x633981[_0x9efb('0x1ed')]*0x3c){if(_0x2665ff[_0x9efb('0x14c')]&&!_0x2665ff[_0x9efb('0x14c')][_0x9efb('0x1ee')]){_0x54d0b7[_0x9efb('0x1f')][_0x9efb('0xfa')](_0x2665ff['id'])[_0x9efb('0x1e')](function(){_0x54d0b7[_0x9efb('0xbd')](_0x633981);});}else{hopperUtils[_0x9efb('0x1ef')]({'active':![]},_0x2665ff['id'],0x1)[_0x9efb('0x1e')](function(){_0x54d0b7[_0x9efb('0xbd')](_0x633981);});}}else{_0x633981[_0x9efb('0x1f0')]+=0x1;_0x54d0b7[_0x9efb('0xbd')](_0x633981);if(_0x633981[_0x9efb('0x1f1')]){hopperUtils[_0x9efb('0xd9')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x2665ff['ContactId'],'ListId':_0x2665ff[_0x9efb('0xdd')],'VoiceQueueId':_0x2665ff[_0x9efb('0xde')]||undefined,'CampaignId':_0x2665ff[_0x9efb('0xdf')]||undefined})[_0x9efb('0x9e')](loggerCatch(_0x9efb('0x1f2')));hopperUtils[_0x9efb('0xc7')](createObjHistory(_0x633981,_0x2665ff,utils['CAMPAIGN_STATUS']['QUEUE_RECALL'],0x17,_0x9efb('0x1f3')))['catch'](loggerCatch(_0x9efb('0x1f4')));}else{_0x54d0b7[_0x9efb('0x11a')](createObjHistory(_0x633981,_0x2665ff,utils['CAMPAIGN_STATUS'][_0x9efb('0x1f5')],0x16,_0x9efb('0x1f6')),_0x9efb('0x1f7'),_0x9efb('0x1f8'));}}}}else{_0x633981['outboundBlacklistCallsDay']+=0x1;_0x54d0b7[_0x9efb('0x11a')](createObjHistory(_0x633981,_0x2665ff,utils[_0x9efb('0x67')]['BLACKLIST'],0xd,_0x9efb('0x1f9')),_0x9efb('0x1fa'),_0x9efb('0x1fb'));throw'inBlackList';}};};Dialer[_0x9efb('0x85')][_0x9efb('0x1fc')]=function(_0x297e4b){var _0x2e6d40=this;var _0x3aed8f=_0x297e4b[_0x9efb('0x1fd')]-_0x297e4b[_0x9efb('0x7a')];emitCampaignSummary(_0x297e4b);if(_0x3aed8f>0x0&&_0x297e4b[_0x9efb('0x1fe')]==0x0){if(_0x3aed8f>this[_0x9efb('0x23')]){_0x3aed8f=this[_0x9efb('0x23')];}_0x297e4b[_0x9efb('0x1fe')]=0x1;hopperUtils[_0x9efb('0x1ff')](_0x297e4b,_0x3aed8f)[_0x9efb('0x9a')](function(_0x4b5a96){_0x297e4b[_0x9efb('0x1fe')]=0x0;if(_0x4b5a96){if(!utils[_0x9efb('0x200')](_0x4b5a96)){_0x297e4b[_0x9efb('0x6f')]=utils['CAMPAIGN_STATUS']['NO_AVAILABLE_CONTACTS'];logger[_0x9efb('0x48')]('[getContactCampaign2][Empty]'+_0x297e4b[_0x9efb('0x46')]);}else{_0x297e4b['originated']+=_0x4b5a96[_0x9efb('0x95')];_0x297e4b['message']=utils[_0x9efb('0x67')]['RUNNING'];for(var _0x3db59b=0x0;_0x3db59b<_0x4b5a96[_0x9efb('0x95')];_0x3db59b+=0x1){_0x297e4b['ivrTotalCallsDays']+=0x1;if(_['isNil'](_0x4b5a96[_0x3db59b])||_[_0x9efb('0xf4')](_0x4b5a96[_0x3db59b][_0x9efb('0x179')])||_[_0x9efb('0xf4')](_0x4b5a96[_0x3db59b]['phone'])){_0x2e6d40[_0x9efb('0x158')](_0x9efb('0x201'),_0x297e4b,_0x4b5a96[_0x3db59b]);}else{hopperUtils[_0x9efb('0x202')](_[_0x9efb('0x6d')](_0x4b5a96[_0x3db59b],[_0x9efb('0xdf'),_0x9efb('0x161')]))['then'](_0x2e6d40['checkContactBlack'](_0x297e4b,_0x4b5a96[_0x3db59b]))['catch'](_0x2e6d40[_0x9efb('0x203')](_0x9efb('0x204'),_0x297e4b));}}}}})['catch'](loggerGetContactDialer(_0x9efb('0x205'),_0x297e4b,_0x3aed8f));}};Dialer['prototype'][_0x9efb('0xad')]=function(_0x5befcb,_0x575bda){var _0x5139ab=this;var _0x476b3b=[];if(_0x575bda<0x1||_0x5befcb[_0x9efb('0xab')]==='booked'){_0x575bda=0x1;}var _0x59b85d=Math['floor'](_0x5befcb[_0x9efb('0x13f')]*_0x575bda)-_0x5befcb[_0x9efb('0x7a')];if(_0x5befcb[_0x9efb('0x206')]>0x0){var _0x28561a=_0x5befcb['dialLimitQueue']-_0x5befcb[_0x9efb('0x7a')]-_0x5befcb['talking']-_0x5befcb[_0x9efb('0x207')];if(_0x59b85d>_0x28561a){_0x59b85d=_0x28561a;}}if(_0x59b85d>0x0&&_0x5befcb[_0x9efb('0x1fe')]==0x0){if(_0x5befcb['dialMethod']==='booked'){_0x59b85d=0x1;}if(_0x59b85d>this[_0x9efb('0x23')]){_0x59b85d=this['maxNumberOriginate'];}for(var _0x29b70f in this['agents']){if(typeof this['agents'][_0x29b70f]!==_0x9efb('0x155')){if(this[_0x9efb('0xf6')][_0x29b70f][_0x9efb('0xd5')]===_0x9efb('0x208')&&this[_0x9efb('0xf6')][_0x29b70f][_0x9efb('0x81')]==='reachable'){_0x476b3b[_0x9efb('0x9d')](this[_0x9efb('0xf6')][_0x29b70f]['id']);}}}_0x5befcb[_0x9efb('0x1fe')]=0x1;hopperUtils['getContactDialer'](_0x5befcb,_0x476b3b,_0x59b85d)[_0x9efb('0x9a')](function(_0x110040){_0x5befcb[_0x9efb('0x1fe')]=0x0;if(_0x110040){if(!utils[_0x9efb('0x200')](_0x110040)){hopperUtils[_0x9efb('0x209')](_0x5befcb)['then'](sendMessageReschedule(_0x5befcb))['catch'](loggerCatch(_0x9efb('0x20a')));}else{_0x5befcb['originated']+=_0x110040[_0x9efb('0x95')];_0x5befcb[_0x9efb('0x6f')]=_0x5befcb['dialMethod']===_0x9efb('0xa')?utils[_0x9efb('0x67')][_0x9efb('0x142')]:utils[_0x9efb('0x67')][_0x9efb('0x20b')];for(var _0x5b9e10=0x0;_0x5b9e10<_0x110040['length'];_0x5b9e10+=0x1){if(_[_0x9efb('0xf4')](_0x110040[_0x5b9e10])||_[_0x9efb('0xf4')](_0x110040[_0x5b9e10][_0x9efb('0x179')])||_[_0x9efb('0xf4')](_0x110040[_0x5b9e10][_0x9efb('0x161')])){_0x5139ab['emptyContact']('[actionOriginate]\x20',_0x5befcb,_0x110040[_0x5b9e10]);}else{hopperUtils[_0x9efb('0x20c')](_[_0x9efb('0x6d')](_0x110040[_0x5b9e10],[_0x9efb('0xde'),_0x9efb('0x161')]))[_0x9efb('0x9a')](_0x5139ab[_0x9efb('0x1e6')](_0x5befcb,_0x110040[_0x5b9e10]))['catch'](_0x5139ab[_0x9efb('0x203')](_0x9efb('0x201'),_0x5befcb));}}}}})['catch'](loggerGetContactDialer(_0x9efb('0x20d'),_0x5befcb,_0x59b85d));}};Dialer[_0x9efb('0x85')][_0x9efb('0x5f')]=function(_0x2dc466){if(_0x2dc466['dialLimitQueue']>0x0){var _0x4398b2=_0x2dc466['dialLimitQueue']-_0x2dc466[_0x9efb('0x7a')]-_0x2dc466[_0x9efb('0x141')];if(_0x4398b2>0x0&&_0x2dc466['temp']==0x0){this[_0x9efb('0x20e')](_0x2dc466);}else{loggerPredictiveCalls[_0x9efb('0x48')]('[handlePredictive][limitChannel]');}}else{this[_0x9efb('0x20e')](_0x2dc466);}};Dialer['prototype'][_0x9efb('0x20e')]=function(_0x27424f){var _0x1987dc=this;var _0x52c0e5=[];_0x27424f[_0x9efb('0x7a')]+=0x1;for(var _0x7816b4 in this[_0x9efb('0xf6')]){if(typeof this[_0x9efb('0xf6')][_0x7816b4]!==_0x9efb('0x155')){if(this[_0x9efb('0xf6')][_0x7816b4][_0x9efb('0xd5')]===_0x9efb('0x208')&&this[_0x9efb('0xf6')][_0x7816b4]['status']===_0x9efb('0x82')){_0x52c0e5['push'](this[_0x9efb('0xf6')][_0x7816b4]['id']);}}}_0x27424f[_0x9efb('0x1fe')]=0x1;return this['getContactDialer'](_0x27424f['id'],_0x52c0e5,0x1,_0x27424f['dialOrderByScheduledAt'],_0x27424f)[_0x9efb('0x9a')](function(_0xa4fe95){_0x27424f[_0x9efb('0x1fe')]=0x1;if(_0xa4fe95){if(!utils['checkContactEmpty'](_0xa4fe95)){utils['checkContactLowerLimitOriginate'](_0x27424f,0x1,0x0);return hopperUtils[_0x9efb('0x209')](_0x27424f)['then'](sendMessageReschedule(_0x27424f))[_0x9efb('0x9e')](loggerCatch(_0x9efb('0x20a')));}else{_0x27424f['message']=utils['CAMPAIGN_STATUS'][_0x9efb('0x20b')];if(_[_0x9efb('0xf4')](_0xa4fe95[0x0])||_[_0x9efb('0xf4')](_0xa4fe95[0x0][_0x9efb('0x179')])||_['isNil'](_0xa4fe95[0x0][_0x9efb('0x161')])){_0x1987dc['emptyContact'](_0x9efb('0x201'),_0x27424f,_0xa4fe95[0x0]);}else{return hopperUtils[_0x9efb('0x20c')](_[_0x9efb('0x6d')](_0xa4fe95[0x0],[_0x9efb('0xde'),_0x9efb('0x161')]))['then'](_0x1987dc[_0x9efb('0x1e6')](_0x27424f,_0xa4fe95[0x0]))[_0x9efb('0x9e')](_0x1987dc[_0x9efb('0x203')](_0x9efb('0x20f'),_0x27424f));}}}})[_0x9efb('0x9e')](loggerGetContactDialer(_0x9efb('0x210'),_0x27424f,0x1));};Dialer[_0x9efb('0x85')][_0x9efb('0x1d9')]=function(_0x255171,_0x517451,_0x80cd59,_0x5b0276,_0x2f0297,_0x1c9fc4){loggerPredictive[_0x9efb('0x48')](_0x9efb('0x211'));loggerPredictive[_0x9efb('0x48')](_0x9efb('0x212'),_0x255171);loggerPredictive['info'](_0x9efb('0x213'),_0x517451);loggerPredictive['info'](_0x9efb('0x214'),_0x80cd59);loggerPredictive['info'](_0x9efb('0x215'),_0x5b0276);loggerPredictive[_0x9efb('0x48')](_0x9efb('0x216'),_0x2f0297);loggerPredictive[_0x9efb('0x48')]('---------------------------');return new Promise(function(_0x2be95d,_0x55367d){if(_0x255171<=0x0||isNaN(_0x255171)){return _0x55367d(msgResponse('[abandonmentRate]','Error',_0x9efb('0x217')+_0x255171));}if(_0x80cd59<=0x0||isNaN(_0x80cd59)){return _0x55367d(msgResponse(_0x9efb('0x218'),_0x9efb('0x18d'),_0x9efb('0x219')+_0x80cd59));}if(_0x5b0276<=0x0||isNaN(_0x5b0276)){return _0x55367d(msgResponse(_0x9efb('0x218'),'Error',_0x9efb('0x21a')+_0x5b0276));}if(_0x517451<=0x0||isNaN(_0x517451)){return _0x55367d(msgResponse('[abandonmentRate]','Error',_0x9efb('0x21b')+_0x517451));}if(_0x2f0297<=0x0||isNaN(_0x2f0297)){return _0x55367d(msgResponse(_0x9efb('0x218'),'Error',_0x9efb('0x21c')+_0x2f0297));}_0x1c9fc4=_0x1c9fc4||0x0;var _0x49d57f=0x1/_0x80cd59;var _0x460c7d=0x0;var _0x452242=0x0;var _0x3001fa=0x0;var _0x3fcc80=0x0;for(var _0x587df0=0x0;_0x3001fa<_0x2f0297;_0x587df0+=0x1){_0x452242=_0x587df0/_0x517451;_0x460c7d=(_0x5b0276*_0x452242+_0x1c9fc4)/_0x49d57f;_0x3001fa=utils[_0x9efb('0x21d')](_0x460c7d,_0x255171);_0x3fcc80=_0x460c7d/_0x255171*(0x1-utils['erlangb'](_0x460c7d,_0x255171));}return _0x2be95d({'erlangCalls':_0x587df0,'erlangCallToSecond':_0x517451/_0x587df0,'erlangAbandonmentRate':_0x3001fa,'erlangBusyFactor':_0x3fcc80});});};Dialer[_0x9efb('0x85')][_0x9efb('0x1e2')]=function(_0x48dcc7,_0x1ddefc,_0x341213,_0x18a8d0,_0x4b9596,_0xac66d0){loggerPredictive[_0x9efb('0x48')](_0x9efb('0x21e'));loggerPredictive[_0x9efb('0x48')](_0x9efb('0x212'),_0x48dcc7);loggerPredictive[_0x9efb('0x48')](_0x9efb('0x213'),_0x1ddefc);loggerPredictive[_0x9efb('0x48')](_0x9efb('0x214'),_0x341213);loggerPredictive[_0x9efb('0x48')]('P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x18a8d0);loggerPredictive[_0x9efb('0x48')](_0x9efb('0x21f'),_0x4b9596);loggerPredictive[_0x9efb('0x48')](_0x9efb('0x5b'));return new Promise(function(_0x566da2,_0x151c36){if(_0x48dcc7<=0x0||isNaN(_0x48dcc7)){return _0x151c36(msgResponse('[busyFactor]',_0x9efb('0x18d'),_0x9efb('0x217')+_0x48dcc7));}if(_0x341213<=0x0||isNaN(_0x341213)){return _0x151c36(msgResponse('[busyFactor]',_0x9efb('0x18d'),_0x9efb('0x219')+_0x341213));}if(_0x18a8d0<=0x0||isNaN(_0x18a8d0)){return _0x151c36(msgResponse(_0x9efb('0x220'),_0x9efb('0x18d'),_0x9efb('0x21a')+_0x18a8d0));}if(_0x1ddefc<=0x0||isNaN(_0x1ddefc)){return _0x151c36(msgResponse(_0x9efb('0x220'),_0x9efb('0x18d'),'interval\x20=\x20'+_0x1ddefc));}if(_0x4b9596<=0x0||isNaN(_0x4b9596)){return _0x151c36(msgResponse(_0x9efb('0x220'),_0x9efb('0x18d'),_0x9efb('0x221')+_0x4b9596));}_0xac66d0=_0xac66d0||0x0;var _0x30a723=0x1/_0x341213;var _0x180bbb=0x0;var _0x1d3bf0=0x0;var _0x94a2a=0x0;var _0x2a0f0b=0x0;for(var _0x36ad63=0x0;_0x2a0f0b<_0x4b9596;_0x36ad63+=0x1){_0x1d3bf0=_0x36ad63/_0x1ddefc;_0x180bbb=(_0x18a8d0*_0x1d3bf0+_0xac66d0)/_0x30a723;_0x94a2a=utils['erlangb'](_0x180bbb,_0x48dcc7);_0x2a0f0b=_0x180bbb/_0x48dcc7*(0x1-utils['erlangb'](_0x180bbb,_0x48dcc7));}return _0x566da2({'erlangCalls':_0x36ad63,'erlangCallToSecond':_0x1ddefc/_0x36ad63,'erlangAbandonmentRate':_0x94a2a,'erlangBusyFactor':_0x2a0f0b});});};module['exports']=Dialer;