Built motion from commit 37e1ed56.|2.6.29
[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 _0x9f57=['ivrOriginated','queueBookedRR','agentconnect','syncAgentConnect','bind','queuecallerabandon','syncQueueCallerAbandon','originateresponse','agentcomplete','syncAgentComplete','custom:queuesummarycomplete','syncQueueSummaryComplete','hangup','newexten','syncNewExten','varset','syncVarSet','queuemember','syncQueueMember','queuestatuscomplete','syncQueueStatusComplete','getSettings','then','previewRecallmeReminderInterval','isUndefined','emit','type','outbound','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','inspect','format','voice_queue:save','isEmpty','info','-----\x20Stats\x20Predictive\x20---','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','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsCallersExit','AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgHoldtime','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgTalktime','---------------------------','Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','---------\x20ErlangB\x20---------','erlangCalls','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','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangBusyFactor','erlangAbandonmentRate','getSeconds','debug','name','startPredictive\x20value\x20cleared','handlePredictive','handlePredictive\x20interval\x20cleared','stack','checkContactLowerLimitOriginate','temp','error','contactsRescheduled','message','CAMPAIGN_STATUS','CONTACTS_RESCHEDULED','[getContactDialer2][ReScheduled]','contacts','NO_AVAILABLE_CONTACTS','state','endtime','queueStatusComplete','[unlockQueueStatus][undefined]','pick','NULL_INTERVAL','Intervals','Interval','isIVRCampaignActive','INACTIVE','\x20NOT\x20Active','isIVRCampaign','campaign:ivr:%s','campaign:save','sendMessageOneNotActive','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','DISACTIVED','[ifTime][Action]','Error','stringify','isTrunkReachable','active','status','reachable','SIP/%s','prototype','Trunk','TrunkBackup','\x20trunk\x20is\x20not\x20reachable','checkIfTime','ifTimeIvr','ifTime','Failure','\x20Intervals\x20is\x20null\x20','timezones','UNKNOWN_TIMEZONE','\x20Timezone\x20unknow\x20','length','push','Action','iftime\x20%s,%s','interval','content','indexOf','catch','command','true','all','OVERTIME_GLOBAL_INTERVAL','OVERTIME_INTERVAL','\x20Interval\x20is\x20overtime:\x20','Timezone:\x20','loopCampaigns','dialTimezone','checkIfTimeIntervals','launchHandleIvr','checkDialMethod','dialMethod','progressive','handlePower','dialPowerLevel','silly','Dialer::ifTime()','Voice\x20Queue\x20%s\x20$s','[ifTime][promiseAll]','Global:\x20','Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:','isGlobal','AMI\x20IfTime','queue','uniqueid','updateOriginated','answertime','YYYY-MM-DD\x20HH:mm:ss','ivr','outboundAnswerCallsDay','agent','agiafterat','dialQueueProject2','dialAgiAfterHangupAgent','createHistory','[syncAgentComplete][createHistory]','moveContactManagedDialer','[syncAgentComplete]','droptime','responsetime','outboundDropCallsDayTimeout','statedesc','Drop','TIMEOUT','countdropretry','countglobal','dialDropRetryFrequency','callAdditionalPhoneAfterMin','verifyAdditionalPhones','queueCallerAbandonCreateState','additional','add','ContactId','ListId','CampaignId','[rescheduleContact][Drop]','starttime','calleridname','calleridnum','[syncAgentComplete][createHistory][10]','Abandoned','dropreason','CALLEREXIT','countabandonedretry','dialAbandonedRetryFrequency','minutes','VoiceQueueId','[syncAgentComplete][createHistory][11]','channel','actionid','strategy','rrmemory','roundrobin','isNil','locked','paused','stateinterface','queueBooked','merge','idHopper','run','[Catch][Preview][syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','_rr','unlockRR','Agent:\x20','contactAgent-idHopper:\x20','[booked][RR][finaly]','[booked][unlock]','rescheduleContact','[booked][unlock2]','[unlock2][syncQueueStatusComplete]','[booked][unlock3]','callProgressDetecting','[callProgressDetecting]\x20','variable','amdstatus','exten','xcally-motion-dialer','value','outboundAnswerAgiCallsDay','HangupInAMD','membername','AMD','buildObj','saveInDb','[syncHangupInAMD][createHistory]','[syncHangupInAMD]','dialAMDActive','MACHINE','countmachineretry','amd','[syncAgentComplete][createHistory][0]','countcongestionretry','countnoanswerretry','countnosuchnumberretry','stateGlobal','reason19\x20machine....','dialMachineMaxRetry','createStateFinal','reason\x2019\x20machine....','dialMachineRetryFrequency','[rescheduleContact][Machine]','custom:amd','[syncHangupInAMDIvr][createHistory]','Machine','countbusyretry','countagentrejectretry','dialGlobalMaxRetry','syncHangup','ivrAnswerCallsDay','[syncHangupIvr]','[syncHangupIvr][createHistory]','dialQueueProject','cause-txt','Normal\x20Clearing','outboundUnknownCallsDay','Unknow','queuesSummary','running','isPreviewCampaign','statusMessage','getQueueCampaignStatusMessage','resolve','available','inUse','talking','pTalking','ACTIVE','compareToOutboundQueue','queueSummaryCountersUpdated','assign','[syncQueueSummary]','filter','online','handlePreviewRecallNotifications','map','user:%s','user:dialPreviewRecallReminder','checkPreviewRecallReminder','loopClearZombieChannels','[uniqueid]','clearZombieChannels','[actions]','[Dialer][checkChannel]','getVoiceQueueRtPauses','[getVoiceQueueRtPauses]\x20','undefined','[updateOriginated]\x20object\x20originated\x20is\x20negative','emptyContact','notFound','UserId','[emptyContact][createHistory]','[emptyContact]','[syncQueueCallerAbandon]\x20[Drop]','Agent','handleIvr','actionOriginate','object','originate','voiceQueue\x20is\x20undefine','phone','contact\x20is\x20undefine','getCaller','\x22agi://%s/square,%s\x22','NONE','isOutboundQueue','\x22%s,%s%s,,,%s\x22','dialQueueTimeout','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDTotalAnalysisTime','XMD-AMDMINWORDLENGTH','XMD-AMDBETWEENWORDSSILENCE','dialAMDBetweenWordsSilence','XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','XMD-AMDSILENCETHRESHOLD','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','XMD-VOICEQUEUEID','XMD-CAMPAIGNID','Contact','callerid','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','dialOriginateCallerIdNumber','getCallerId','XMD-ORIGINATECALLERIDNAME','originatecalleridname','extractCalleridName','SIP/%s/%s%s','trim','dialCutDigit','substring','dialPrefix','from-sip','dialOriginateTimeout','outboundOriginateFailureCallsDay','[originateError]:\x20%s','OriginateError','[originate][error]','originate\x20action\x20Error','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','[rescheduleContact][NoAnswer]','dialBusyMaxRetry','[rescheduleContact]\x20[Busy]','dialCongestionMaxRetry','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberMaxRetry','[rescheduleContact][NoSuchNumber]','dialDropMaxRetry','dialAbandonedMaxRetry','[rescheduleContact][Abandoned]','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','[callProgressDetecting]','evt\x20is\x20undefine','reason','outboundNoSuchCallsDay','NoSuchNumber','custom:agentnosuchnumber','nosuchnumber','dialNoSuchNumberRetryFrequency','checkRetriveMax','reason\x200\x20no\x20such\x20number....','buildNoAnswerEventPayload','custom:agentnoanswer','[syncAgentComplete][createHistory][3]','reason\x203\x20ringing\x20no\x20answer','custom:agentbusy','dialBusyRetryFrequency','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','outboundCongestionCallsDay','Congestion','congestion','[syncAgentComplete][createHistory][8]','reason\x208\x20congestion','outboundAbandonedCallsDay','reason\x2011\x20abandoned','outboundRejectCallsDay','agentreject','[syncAgentComplete][createHistory][20]','reason\x2020\x20agentreject','Success','[moveContactManagedDialer][0]','contact\x20not\x20moved','dialPredictiveOptimizationPercentage','round','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','floor','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','[startMethodPredictive][StartProgressive]','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','dialPredictiveInterval','predictiveIntervalErlangCallsDroppedCalls','dialPredictiveOptimization','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','avgHandleTime','getDataPredictive','startMethodPredictive','Predictive\x20after\x20first\x20interval','recalculate\x20predictive\x20at','Predictive\x20for\x20every\x20interval','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20less\x20than\x20threshold\x20(','dropRate','abandonmentRate','agentBusyFactor','Unknown\x20Predictive','[getDataPredictive]','check\x20failure','getDataPredictiveOld','loggedIn','outboundQueuePauses','predictiveIntervalPauses','[CatchErlangB]','busyFactor','one\x20call\x20every:','[handlePredictive]','fail\x20to\x20scheduled\x20calls','recallme','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','unlockContact','outboundReCallsDay','dialRecallInQueue','[rescheduleContact][dialRecallInQueue]','QUEUE_RECALL','RecallInQueue','[Originate][HistoryDialRecallInQueue][historyCatch]','RECALL_TIMEOUT','RecallFailedTimeout','[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]','outboundBlacklistCallsDay','BLACKLIST','Blacklist','[Originate][MoveBlacklist]','inBlackList','limitCalls','originated','checkContactEmpty','[getContactCampaign2][Empty]','RUNNING','ivrTotalCallsDays','[actionOriginate]\x20','checkContactBlack','[actionOriginateIvr]\x20','dialLimitQueue','getContactDialer','[countReScheduled]\x20','checkIsBlackList','loggerHandler','[getContactDialer2]','tryOriginatePredictive','[handlePredictive][limitChannel]','not_inuse','dialOrderByScheduledAt','[actionOriginatePredictive]\x20','[getContactDialerPredictive]','--------\x20Drop\x20Rate\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','Amax\x20=\x20','erlangb','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','[busyFactor]','Umin\x20=\x20','exports','lodash','uuid','moment','ioredis','../preview/util/util','../../../config/environment/','dialer','../../../config/logger','booked','predictive','predictiveCalls','syncQueueSummary','../ami','redis','defaults','localhost','socket.io-emitter','../rpc/voiceQueueRt','../rpc/setting','./models/action','./models/history','./models/final','./models/agentComplete','./models/hangup','env','127.0.0.1','enqueue','tail','finally','sequence','preview','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','actions','contactsId','uniqueId','optionPredictive','startPredictive','startProgressive'];(function(_0x4588b8,_0x5d2f04){var _0x2755c6=function(_0x2584a9){while(--_0x2584a9){_0x4588b8['push'](_0x4588b8['shift']());}};_0x2755c6(++_0x5d2f04);}(_0x9f57,0x1e6));var _0x79f5=function(_0x52c9f9,_0xe66f3f){_0x52c9f9=_0x52c9f9-0x0;var _0xcdb940=_0x9f57[_0x52c9f9];return _0xcdb940;};'use strict';var util=require('util');var _=require(_0x79f5('0x0'));var uuid=require(_0x79f5('0x1'));var moment=require(_0x79f5('0x2'));var rr=require('rr');var Redis=require(_0x79f5('0x3'));var utils=require('./utils');var hopperUtils=require('./utils/hopper');var ut=require(_0x79f5('0x4'));var config=require(_0x79f5('0x5'));var logger=require('../../../config/logger')(_0x79f5('0x6'));var loggerBooked=require(_0x79f5('0x7'))(_0x79f5('0x8'));var loggerPredictive=require(_0x79f5('0x7'))(_0x79f5('0x9'));var loggerPredictiveCalls=require(_0x79f5('0x7'))(_0x79f5('0xa'));var loggerSyncQueueSummary=require('../../../config/logger')(_0x79f5('0xb'));var ami=require(_0x79f5('0xc'));config[_0x79f5('0xd')]=_[_0x79f5('0xe')](config[_0x79f5('0xd')],{'host':_0x79f5('0xf'),'port':0x18eb});var io=require(_0x79f5('0x10'))(new Redis(config[_0x79f5('0xd')]));var cmHopper=require('../rpc/cmHopper');var voiceQueueRt=require(_0x79f5('0x11'));var RpcSetting=require(_0x79f5('0x12'));var Interval=require('../rpc/interval');var Action=require(_0x79f5('0x13'));var History=require(_0x79f5('0x14'));var Final=require(_0x79f5('0x15'));var AgentComplete=require(_0x79f5('0x16'));var QueueCallerAbandon=require('./models/queueCallerAbandon');var Hangup=require(_0x79f5('0x17'));var ipAgi=process[_0x79f5('0x18')]['XCALLY_IP_AGI']||_0x79f5('0x19');var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence['prototype'][_0x79f5('0x1a')]=function(_0x53dc19){this[_0x79f5('0x1b')]=this['tail']?this[_0x79f5('0x1b')][_0x79f5('0x1c')](_0x53dc19):_0x53dc19();};function Dialer(_0x45d03d,_0x4db53b){this[_0x79f5('0x1d')]=new Sequence();this[_0x79f5('0x1e')]=_0x4db53b;this[_0x79f5('0x1f')]=_0x45d03d['voiceQueues'];this[_0x79f5('0x20')]=_0x45d03d[_0x79f5('0x20')];this['agents']=_0x45d03d[_0x79f5('0x21')];this[_0x79f5('0x22')]=_0x45d03d[_0x79f5('0x22')];this[_0x79f5('0x23')]=config[_0x79f5('0x23')]||0x2;this['channels']={};this[_0x79f5('0x24')]={};this[_0x79f5('0x25')]={};this[_0x79f5('0x26')]={};this[_0x79f5('0x27')]={};this[_0x79f5('0x28')]={};this[_0x79f5('0x29')]={};this[_0x79f5('0x2a')]={};this['queueBooked']={};this[_0x79f5('0x2b')]={};this['queuesSummary']={};ami['on'](_0x79f5('0x2c'),this[_0x79f5('0x2d')][_0x79f5('0x2e')](this));ami['on'](_0x79f5('0x2f'),this[_0x79f5('0x30')][_0x79f5('0x2e')](this));ami['on'](_0x79f5('0x31'),this['syncOriginateResponse'][_0x79f5('0x2e')](this));ami['on'](_0x79f5('0x32'),this[_0x79f5('0x33')][_0x79f5('0x2e')](this));ami['on']('custom:queuesummary',this[_0x79f5('0xb')][_0x79f5('0x2e')](this));ami['on'](_0x79f5('0x34'),this[_0x79f5('0x35')]['bind'](this));ami['on'](_0x79f5('0x36'),this['syncHangup']['bind'](this));ami['on'](_0x79f5('0x37'),this[_0x79f5('0x38')]['bind'](this));ami['on'](_0x79f5('0x39'),this[_0x79f5('0x3a')][_0x79f5('0x2e')](this));ami['on'](_0x79f5('0x3b'),this[_0x79f5('0x3c')][_0x79f5('0x2e')](this));ami['on'](_0x79f5('0x3d'),this[_0x79f5('0x3e')][_0x79f5('0x2e')](this));this['loopCampaigns']();this['loopClearZombieChannels']();RpcSetting[_0x79f5('0x3f')]()[_0x79f5('0x40')](function(_0x59561d){previewRecallmeReminderInterval=_0x59561d[_0x79f5('0x41')];});}function isNotNull(_0x3d57e0){return _0x3d57e0!==null&&!_[_0x79f5('0x42')](_0x3d57e0);}function msgResponse(_0x471967,_0x38a4a8,_0x18f36f){return{'action':_0x471967,'response':_0x38a4a8,'message':_0x18f36f,'stack':_0x18f36f};}function emit(_0x383f6b,_0x38151a,_0x512912){io['to'](_0x383f6b)[_0x79f5('0x43')](_0x38151a,_0x512912);}function emitOutboundVoiceQueueSummary(_0x407446){if(_0x407446[_0x79f5('0x44')]===_0x79f5('0x45')){logger['debug'](_0x79f5('0x46'),util[_0x79f5('0x47')](_0x407446,{'showHidden':![],'depth':null}));emit(util[_0x79f5('0x48')]('voice:queue:%s',_0x407446['name']),_0x79f5('0x49'),_0x407446);}}function checkGetDataPredictive(_0x336c8e){if(isNotNull(_0x336c8e)&&!_[_0x79f5('0x4a')](_0x336c8e)){loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x4c'));loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x4d'),_0x336c8e[_0x79f5('0x4e')]);loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x4f'),_0x336c8e[_0x79f5('0x50')]);loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x51'),_0x336c8e[_0x79f5('0x52')]);loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x53'),_0x336c8e[_0x79f5('0x54')]);loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x55'),_0x336c8e[_0x79f5('0x56')]);loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x57'),_0x336c8e[_0x79f5('0x58')]);loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x59'));if(_0x336c8e[_0x79f5('0x4e')]>0x0){if(!_[_0x79f5('0x42')](_0x336c8e['predictiveIntervalAvgTalktime'])&&_0x336c8e[_0x79f5('0x58')]>0x0){return!![];}loggerPredictive['info'](_0x79f5('0x5a'));if(!_[_0x79f5('0x42')](_0x336c8e['predictiveIntervalAvgHoldtime'])&&_0x336c8e[_0x79f5('0x56')]>0x0){return!![];}loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x5b'));}else{loggerPredictive[_0x79f5('0x4b')]('Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive');}}else{loggerPredictive[_0x79f5('0x4b')]('History\x20information\x20are\x20empty');}return![];}function mergeDataErlangB(_0x4e9304){return function(_0x5c832b){loggerPredictive['info'](_0x79f5('0x5c'));loggerPredictive['info']('Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x5c832b[_0x79f5('0x5d')]);loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x5e'),_0x5c832b[_0x79f5('0x5f')]);loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x60'),_0x5c832b['erlangAbandonmentRate']);loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x61'),_0x5c832b[_0x79f5('0x62')]);loggerPredictive['info'](_0x79f5('0x60'),_0x5c832b[_0x79f5('0x63')]);loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x59'));_['merge'](_0x4e9304,_0x5c832b);};}function ifInterval(_0x440e6e,_0x22a6b2){if(_[_0x79f5('0x42')](_0x22a6b2)){return![];}return utils[_0x79f5('0x64')](undefined,_0x22a6b2)<_0x440e6e*0x3c;}function clearPredictiveAttributes(_0xd34ed8){if(_0xd34ed8[_0x79f5('0x29')]){_0xd34ed8[_0x79f5('0x29')]=undefined;loggerPredictive[_0x79f5('0x65')](_0xd34ed8[_0x79f5('0x66')],'startProgressive\x20value\x20cleared');}if(_0xd34ed8[_0x79f5('0x28')]){_0xd34ed8[_0x79f5('0x28')]=undefined;loggerPredictive[_0x79f5('0x65')](_0xd34ed8[_0x79f5('0x66')],_0x79f5('0x67'));}if(_0xd34ed8[_0x79f5('0x68')]){clearInterval(_0xd34ed8[_0x79f5('0x68')]);_0xd34ed8[_0x79f5('0x68')]=undefined;loggerPredictive[_0x79f5('0x65')](_0xd34ed8[_0x79f5('0x66')],_0x79f5('0x69'));}}function loggerCatchPredictive(_0x5d252d,_0x815c4f){return function(_0x152d57){loggerPredictive['error'](_0x815c4f['name'],_0x5d252d);loggerPredictive['error'](_0x152d57[_0x79f5('0x6a')]);clearPredictiveAttributes(_0x815c4f);};}function loggerCatch(_0x1fece5){return function(_0x40151b){logger['error'](_0x1fece5,util[_0x79f5('0x47')](_0x40151b,{'showHidden':![],'depth':null}));};}function loggerGetContactDialer(_0x236b1e,_0x2ebc61,_0x4fe8f8){return function(_0xcbef7){utils[_0x79f5('0x6b')](_0x2ebc61,_0x4fe8f8,0x0);_0x2ebc61[_0x79f5('0x6c')]=0x0;logger[_0x79f5('0x6d')](_0x236b1e,util[_0x79f5('0x47')](_0xcbef7,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x3ce88a){return function(_0x1fc867){if(isNotNull(_0x1fc867)&&isNotNull(_0x1fc867[0x0])){if(_0x1fc867[0x0][_0x79f5('0x6e')]>0x0){_0x3ce88a[_0x79f5('0x6f')]=utils[_0x79f5('0x70')][_0x79f5('0x71')];logger[_0x79f5('0x4b')](_0x79f5('0x72')+_0x3ce88a[_0x79f5('0x66')],_0x1fc867[0x0][_0x79f5('0x6e')],_0x79f5('0x73'));}else{_0x3ce88a[_0x79f5('0x6f')]=utils['CAMPAIGN_STATUS'][_0x79f5('0x74')];logger[_0x79f5('0x4b')]('[getContactDialer2][Empty]'+_0x3ce88a[_0x79f5('0x66')]);}}};}function createObjHistory(_0x3af68a,_0xe29f0c,_0x5d53e5,_0x466cbe,_0x39a5ea){_0x3af68a[_0x79f5('0x6f')]=_0x5d53e5;var _0x1213f1=new Action(_0x3af68a,_0xe29f0c);var _0x26483b=new History(_0x1213f1);_0x26483b[_0x79f5('0x75')]=_0x466cbe;_0x26483b['statedesc']=_0x39a5ea;_0x26483b[_0x79f5('0x76')]=_0x1213f1['starttime'];return _0x26483b;}function unlockQueueStatus(_0x245fc7,_0x410757){setTimeout(function(){if(_[_0x79f5('0x42')](_0x245fc7[_0x79f5('0x77')])){loggerBooked[_0x79f5('0x6d')](_0x79f5('0x78'),_0x410757);}_0x245fc7[_0x79f5('0x77')]=!![];loggerBooked[_0x79f5('0x4b')]('[booked][unlockQueueStatus]',_0x410757,JSON['stringify'](_[_0x79f5('0x79')](_0x245fc7,[_0x79f5('0x66'),_0x79f5('0x77')])));},0x1f3);}function checkInterval(_0x15a898){return function(){if(!isNotNull(_0x15a898['Interval'])){_0x15a898[_0x79f5('0x6f')]=utils[_0x79f5('0x70')][_0x79f5('0x7a')];throw _0x15a898['name']+'\x20INTERVAL_IS_NULL';}if(!isNotNull(_0x15a898['Interval'][_0x79f5('0x7b')])){_0x15a898[_0x79f5('0x6f')]=utils[_0x79f5('0x70')][_0x79f5('0x7a')];throw _0x15a898[_0x79f5('0x66')]+'\x20INTERVAL_IS_NULL';}if(!isNotNull(_[_0x79f5('0x4a')](_0x15a898[_0x79f5('0x7c')][_0x79f5('0x7b')]))){_0x15a898['message']=utils[_0x79f5('0x70')][_0x79f5('0x7a')];throw _0x15a898['name']+'\x20INTERVAL_IS_NULL';}};}function checkIsIVRCampaignActive(_0x31db69){return function(){if(!utils[_0x79f5('0x7d')](_0x31db69)){_0x31db69[_0x79f5('0x6f')]=utils[_0x79f5('0x70')][_0x79f5('0x7e')];throw _0x31db69['name']+_0x79f5('0x7f');}};}function emitCampaignSummary(_0x3c3648){if(utils[_0x79f5('0x80')](_0x3c3648)){emit(util[_0x79f5('0x48')](_0x79f5('0x81'),_0x3c3648['name']),_0x79f5('0x82'),_0x3c3648);}}function loggerCatchQueueSummary(_0x41d448,_0x5bfff6){return function(_0x1af6ba){clearPredictiveAttributes(_0x5bfff6);emitCampaignSummary(_0x5bfff6);loggerSyncQueueSummary[_0x79f5('0x65')](_0x41d448,util[_0x79f5('0x47')](_0x1af6ba,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x20c0e6){if(_0x20c0e6[_0x79f5('0x83')]){if(_0x20c0e6['originated']===0x0){_0x20c0e6[_0x79f5('0x83')]=![];_0x20c0e6['message']=utils[_0x79f5('0x70')][_0x79f5('0x7e')];loggerSyncQueueSummary[_0x79f5('0x65')](_0x79f5('0x84'),_0x20c0e6[_0x79f5('0x66')],'is\x20not\x20active');}else{_0x20c0e6[_0x79f5('0x6f')]=utils[_0x79f5('0x70')][_0x79f5('0x85')];loggerSyncQueueSummary[_0x79f5('0x65')](_0x79f5('0x84'),_0x20c0e6[_0x79f5('0x66')],'is\x20disactive');}emitCampaignSummary(_0x20c0e6);}}function myreject(_0x345169){return function(_0x308a5f){return _0x345169(msgResponse(_0x79f5('0x86'),_0x79f5('0x87'),JSON[_0x79f5('0x88')](_0x308a5f)));};}Dialer['prototype'][_0x79f5('0x89')]=function(_0x561089){return!_[_0x79f5('0x42')](_0x561089)&&_0x561089&&!_[_0x79f5('0x42')](_0x561089[_0x79f5('0x66')])&&!_['isUndefined'](_0x561089['active'])&&_0x561089[_0x79f5('0x8a')]&&(this['trunks'][util[_0x79f5('0x48')]('SIP/%s',_0x561089[_0x79f5('0x66')])][_0x79f5('0x8b')]===_0x79f5('0x8c')||this['trunks'][util[_0x79f5('0x48')](_0x79f5('0x8d'),_0x561089[_0x79f5('0x66')])][_0x79f5('0x8b')]==='unmonitored');};Dialer[_0x79f5('0x8e')]['checkIsTrunkReachable']=function(_0xbc3325){var _0x150e56=this;return function(){if(!_0x150e56[_0x79f5('0x89')](_0xbc3325[_0x79f5('0x8f')])){if(!_0x150e56['isTrunkReachable'](_0xbc3325[_0x79f5('0x90')])){_0xbc3325[_0x79f5('0x6f')]=utils[_0x79f5('0x70')]['TRUNK_NOT_REACHABLE'];throw _0xbc3325['name']+_0x79f5('0x91');}}};};Dialer[_0x79f5('0x8e')][_0x79f5('0x92')]=function(_0x91249d,_0x4e8582,_0x3e5491,_0x2c69e6){var _0x12d212=this;return function(){var _0x487b53=!![];return _0x12d212[_0x79f5('0x93')](_0x91249d,_0x4e8582,_0x3e5491,_0x2c69e6,_0x487b53);};};Dialer['prototype']['checkIfTimeIntervals']=function(_0x2c304b,_0x5c8ea7,_0x2a1afb,_0x40eadb){var _0x550737=this;return function(){var _0x299ddd=![];return _0x550737[_0x79f5('0x93')](_0x2c304b[_0x79f5('0x7b')],_0x5c8ea7,_0x2a1afb,_0x40eadb,_0x299ddd);};};Dialer[_0x79f5('0x8e')][_0x79f5('0x93')]=function(_0x4b74fa,_0x1cbcdf,_0xa1c6b,_0xcc220e,_0x346683){var _0x12f606=[];return new Promise(function(_0x107b12,_0x1afbd8){if(!isNotNull(_0x4b74fa)){_0xcc220e[_0x79f5('0x6f')]=utils[_0x79f5('0x70')][_0x79f5('0x7a')];return _0x1afbd8(msgResponse(_0x79f5('0x94'),_0x79f5('0x95'),_0xa1c6b+_0x79f5('0x96')));}if(_[_0x79f5('0x4a')](_0x4b74fa)){_0xcc220e[_0x79f5('0x6f')]=utils[_0x79f5('0x70')]['EMPTY_INTERVAL'];return _0x1afbd8(msgResponse(_0x79f5('0x94'),_0x79f5('0x95'),_0xa1c6b+'\x20Intervals\x20is\x20empty\x20'));}if(_0x1cbcdf&&_[_0x79f5('0x42')](config[_0x79f5('0x97')][_0x1cbcdf])){_0xcc220e['message']=utils[_0x79f5('0x70')][_0x79f5('0x98')];return _0x1afbd8(msgResponse(_0x79f5('0x94'),_0x79f5('0x95'),_0xa1c6b+_0x79f5('0x99')+_0x1cbcdf));}if(_['isArray'](_0x4b74fa)){for(var _0x4825e3=0x0;_0x4825e3<_0x4b74fa[_0x79f5('0x9a')];_0x4825e3+=0x1){_0x12f606[_0x79f5('0x9b')](ami[_0x79f5('0x9c')]({'action':'command','command':util[_0x79f5('0x48')](_0x79f5('0x9d'),_0x4b74fa[_0x4825e3][_0x79f5('0x9e')],!_['isUndefined'](config[_0x79f5('0x97')][_0x1cbcdf])?_0x1cbcdf:'')})[_0x79f5('0x40')](function(_0x17d687){return _0x17d687[_0x79f5('0x9f')][_0x79f5('0xa0')]('true')>=0x0;})[_0x79f5('0xa1')](myreject(_0x1afbd8)));}}else{_0x12f606[_0x79f5('0x9b')](ami[_0x79f5('0x9c')]({'action':_0x79f5('0xa2'),'command':util[_0x79f5('0x48')](_0x79f5('0x9d'),_0x4b74fa,!_[_0x79f5('0x42')](config['timezones'][_0x1cbcdf])?_0x1cbcdf:'')})[_0x79f5('0x40')](function(_0x570762){return _0x570762['content'][_0x79f5('0xa0')](_0x79f5('0xa3'))>=0x0;})[_0x79f5('0xa1')](myreject(_0x1afbd8)));}Promise[_0x79f5('0xa4')](_0x12f606)['then'](function(_0x5a64f1){var _0x57ba91=_['some'](_0x5a64f1);if(_0x57ba91){return _0x107b12(_0x57ba91);}else{_0xcc220e[_0x79f5('0x6f')]=_0x346683?utils[_0x79f5('0x70')][_0x79f5('0xa5')]:utils[_0x79f5('0x70')][_0x79f5('0xa6')];return _0x1afbd8(msgResponse('[ifTime][promiseAll]',_0x79f5('0x95'),'Global:\x20'+_0x346683+'\x20'+_0xa1c6b+_0x79f5('0xa7')+util['inspect'](_0x4b74fa,{'showHidden':![],'depth':null})+_0x79f5('0xa8')+_0x1cbcdf));}})[_0x79f5('0xa1')](function(_0x14b2cc){return _0x1afbd8(msgResponse(_0x79f5('0x94'),_0x79f5('0x95'),JSON[_0x79f5('0x88')](_0x14b2cc)));});});};Dialer['prototype'][_0x79f5('0xa9')]=function(){var _0xe2305=this;return cmHopper['resetActiveCalls']({'active':![]},{'where':{'active':!![]}})[_0x79f5('0x40')](function(){setInterval(function(){_0xe2305['syncCampaigns']();},0x3e8);});};Dialer[_0x79f5('0x8e')]['syncCampaigns']=function(){var _0x56efa9=this;var _0x5615c5;for(var _0x52acfa in this[_0x79f5('0x20')]){if(typeof this['campaigns'][_0x52acfa]!=='undefined'){_0x5615c5=this[_0x79f5('0x20')][_0x52acfa];if(utils['isIVRCampaign'](_0x5615c5)&&utils[_0x79f5('0x7d')](_0x5615c5)){_0x5615c5[_0x79f5('0x83')]=!![];Promise['resolve']()[_0x79f5('0x40')](checkIsIVRCampaignActive(_0x5615c5))[_0x79f5('0x40')](checkInterval(_0x5615c5))[_0x79f5('0x40')](_0x56efa9['checkIsTrunkReachable'](_0x5615c5))['then'](_0x56efa9['checkIfTime'](_0x5615c5['dialGlobalInterval'],_0x5615c5[_0x79f5('0xaa')],_0x5615c5[_0x79f5('0x66')],_0x5615c5))['then'](_0x56efa9[_0x79f5('0xab')](_0x5615c5[_0x79f5('0x7c')],_0x5615c5[_0x79f5('0xaa')],_0x5615c5[_0x79f5('0x66')],_0x5615c5))[_0x79f5('0x40')](_0x56efa9[_0x79f5('0xac')](_0x5615c5))[_0x79f5('0xa1')](loggerCatchQueueSummary('[syncCampaigns]',_0x5615c5));}else{notSendMessagesCampaign(_0x5615c5);}}}};Dialer[_0x79f5('0x8e')][_0x79f5('0xad')]=function(_0x35778a){if(_0x35778a[_0x79f5('0xae')]!=='predictive'){clearPredictiveAttributes(_0x35778a);}switch(_0x35778a['dialMethod']){case _0x79f5('0xaf'):this[_0x79f5('0xb0')](_0x35778a,0x1);break;case'power':this[_0x79f5('0xb0')](_0x35778a,_0x35778a[_0x79f5('0xb1')]);break;case'predictive':this[_0x79f5('0x9')](_0x35778a);break;case _0x79f5('0x8'):this[_0x79f5('0xb0')](_0x35778a,0x1);break;default:logger[_0x79f5('0x6d')]('Queue',_0x35778a[_0x79f5('0x66')],'method\x20not\x20recognized');}};Dialer['prototype'][_0x79f5('0x94')]=function(_0x5df39a,_0x44824a){var _0x5c04cf=_0x5df39a['dialTimezone'];var _0x4a74b8=_0x44824a?_0x5df39a['dialGlobalInterval']:_0x5df39a['Interval']['Intervals'];logger[_0x79f5('0xb2')](_0x79f5('0xb3'),_0x4a74b8,_0x5c04cf,_0x5df39a[_0x79f5('0x66')],util[_0x79f5('0x48')](_0x79f5('0xb4'),_0x5df39a['name'],_0x5df39a['id']));var _0x45f781=null;return Interval['intervalIftime'](_0x4a74b8,_0x5c04cf)['then'](function(_0x4a07b6){if(_0x4a07b6===!![]){return _0x4a07b6;}else{_0x5df39a['message']=_0x44824a?utils[_0x79f5('0x70')][_0x79f5('0xa5')]:utils['CAMPAIGN_STATUS']['OVERTIME_INTERVAL'];_0x45f781=msgResponse(_0x79f5('0xb5'),_0x79f5('0x95'),_0x79f5('0xb6')+_0x44824a+'\x20'+_0x5df39a[_0x79f5('0x66')]+'\x20Interval\x20is\x20overtime:\x20'+util['inspect'](_0x4a74b8,{'showHidden':![],'depth':null})+'Timezone:\x20'+_0x5c04cf);}if(_0x45f781!==null){logger['silly'](_0x79f5('0xb7'),_0x45f781);_0x45f781[_0x79f5('0xb8')]=_0x44824a;throw _0x45f781;}})['catch'](function(_0x76f23b){logger[_0x79f5('0x6d')](_0x79f5('0xb9'),_0x76f23b);throw msgResponse(_0x79f5('0x86'),_0x79f5('0x87'),util[_0x79f5('0x47')](_0x76f23b,{'showHidden':![],'depth':null}));});};Dialer[_0x79f5('0x8e')][_0x79f5('0x2d')]=function(_0x196e67){if(this[_0x79f5('0x1f')][_0x196e67[_0x79f5('0xba')]]){if(this['uniqueId'][_0x196e67[_0x79f5('0xbb')]]&&this[_0x79f5('0x26')][_0x196e67[_0x79f5('0xbb')]][_0x79f5('0x44')]!=='ivr'){this[_0x79f5('0xbc')](this[_0x79f5('0x1f')][_0x196e67[_0x79f5('0xba')]]);this['uniqueId'][_0x196e67[_0x79f5('0xbb')]][_0x79f5('0xbd')]=moment()['format'](_0x79f5('0xbe'));}}};Dialer[_0x79f5('0x8e')][_0x79f5('0x33')]=function(_0x46a90a){var _0x2113eb=this[_0x79f5('0x26')][_0x46a90a[_0x79f5('0xbb')]];if(this[_0x79f5('0x1f')][_0x46a90a[_0x79f5('0xba')]]){if(_0x2113eb&&_0x2113eb['type']!==_0x79f5('0xbf')){delete this[_0x79f5('0x26')][_0x46a90a[_0x79f5('0xbb')]];this[_0x79f5('0x1f')][_0x46a90a[_0x79f5('0xba')]][_0x79f5('0xc0')]+=0x1;var _0x14c6e6=new AgentComplete(_0x2113eb,_0x46a90a);if(_0x46a90a['reason']===_0x79f5('0xc1')){_0x14c6e6[_0x79f5('0xc2')]=this[_0x79f5('0x1f')][_0x46a90a[_0x79f5('0xba')]][_0x79f5('0xc3')]&&this[_0x79f5('0x1f')][_0x46a90a[_0x79f5('0xba')]][_0x79f5('0xc4')]?moment()['format'](_0x79f5('0xbe')):undefined;}hopperUtils[_0x79f5('0xc5')](_0x14c6e6)[_0x79f5('0xa1')](loggerCatch(_0x79f5('0xc6')));hopperUtils[_0x79f5('0xc7')](_0x14c6e6)[_0x79f5('0xa1')](loggerCatch(_0x79f5('0xc8')));}}};Dialer['prototype'][_0x79f5('0x30')]=function(_0x4fceda){var _0x563658=this['uniqueId'][_0x4fceda[_0x79f5('0xbb')]];var _0xe4edd3=this;var _0x30fa4a=![];var _0x2a2d1b;var _0x3b544d;if(this[_0x79f5('0x1f')][_0x4fceda[_0x79f5('0xba')]]){if(_0x563658&&_0x563658[_0x79f5('0x44')]!==_0x79f5('0xbf')){delete this['uniqueId'][_0x4fceda[_0x79f5('0xbb')]];this[_0x79f5('0xbc')](this[_0x79f5('0x1f')][_0x4fceda[_0x79f5('0xba')]]);_0x563658['droptime']=moment()[_0x79f5('0x48')]('YYYY-MM-DD\x20HH:mm:ss');var _0x4005b2=new QueueCallerAbandon(_0x563658,_0x4fceda);if(utils[_0x79f5('0x64')](_0x563658[_0x79f5('0xc9')],_0x563658[_0x79f5('0xca')])>=_0x563658['dialQueueTimeout']){this[_0x79f5('0x1f')][_0x4fceda[_0x79f5('0xba')]]['predictiveIntervalDroppedCallsTimeout']+=0x1;this[_0x79f5('0x1f')][_0x4fceda[_0x79f5('0xba')]][_0x79f5('0xcb')]+=0x1;this[_0x79f5('0x1f')][_0x4fceda[_0x79f5('0xba')]]['predictiveIntervalErlangCallsDroppedCalls']+=0x1;_0x4005b2['state']=0xa;_0x4005b2[_0x79f5('0xcc')]=_0x79f5('0xcd');_0x4005b2['dropreason']=_0x79f5('0xce');_0x4005b2['agiafterat']=this[_0x79f5('0x1f')][_0x4fceda[_0x79f5('0xba')]][_0x79f5('0xc3')]?moment()['format']('YYYY-MM-DD\x20HH:mm:ss'):undefined;_0x4005b2[_0x79f5('0xcf')]+=0x1;_0x4005b2[_0x79f5('0xd0')]+=0x1;_0x2a2d1b=this[_0x79f5('0x1f')][_0x4fceda[_0x79f5('0xba')]][_0x79f5('0xd1')];_0x3b544d=this[_0x79f5('0x1f')][_0x4fceda[_0x79f5('0xba')]][_0x79f5('0xd2')];hopperUtils[_0x79f5('0xd3')](_0x4005b2,_0x4005b2[_0x79f5('0x75')],_0x563658['voiceQueue'])[_0x79f5('0x40')](function(_0xd9d0fc){_0x30fa4a=_0xd9d0fc['additional']==0x1;if(_0x4005b2['countdropretry']>=_0xe4edd3[_0x79f5('0x1f')][_0x4fceda['queue']]['dialDropMaxRetry']){_0xe4edd3[_0x79f5('0xd4')](_0x4005b2,_0xd9d0fc[_0x79f5('0xd5')]);}else{hopperUtils['rescheduleContact']({'active':![],'countdropretry':_0x4005b2[_0x79f5('0xcf')],'scheduledat':moment()[_0x79f5('0xd6')](_0xe4edd3[_0x79f5('0x1f')][_0x4fceda[_0x79f5('0xba')]][_0x79f5('0xd1')],'minutes')[_0x79f5('0x48')](_0x79f5('0xbe')),'ContactId':_0x563658[_0x79f5('0xd7')],'ListId':_0x563658[_0x79f5('0xd8')],'VoiceQueueId':_0x563658['VoiceQueueId']||undefined,'CampaignId':_0x563658[_0x79f5('0xd9')]||undefined})[_0x79f5('0xa1')](loggerCatch(_0x79f5('0xda')));var _0x3e5039=new History(_0x4005b2);_0x3e5039['state']=0xa;_0x3e5039[_0x79f5('0xcc')]=_0x79f5('0xcd');_0x3e5039[_0x79f5('0xdb')]=moment()[_0x79f5('0x48')](_0x79f5('0xbe'));_0x3e5039[_0x79f5('0x76')]=_0x3e5039[_0x79f5('0xdb')];_0x3e5039[_0x79f5('0xdc')]=_0x4005b2[_0x79f5('0xdc')];_0x3e5039[_0x79f5('0xdd')]=_0x4005b2[_0x79f5('0xdd')];hopperUtils[_0x79f5('0xc5')](_0x3e5039)[_0x79f5('0xa1')](loggerCatch(_0x79f5('0xde')));}})[_0x79f5('0x40')](function(){if(_0x30fa4a)hopperUtils['swapAdditionalPhones'](_0x4005b2,_0x2a2d1b,_0x3b544d)['then'](function(){return 0x1;});});}else{this[_0x79f5('0x1f')][_0x4fceda[_0x79f5('0xba')]][_0x79f5('0x54')]+=0x1;this[_0x79f5('0x1f')][_0x4fceda[_0x79f5('0xba')]]['outboundDropCallsDayCallersExit']+=0x1;_0x4005b2['state']=0xb;_0x4005b2['statedesc']=_0x79f5('0xdf');_0x4005b2[_0x79f5('0xe0')]=_0x79f5('0xe1');_0x4005b2[_0x79f5('0xe2')]+=0x1;_0x4005b2[_0x79f5('0xd0')]+=0x1;_0x2a2d1b=this[_0x79f5('0x1f')][_0x4fceda['queue']][_0x79f5('0xe3')];_0x3b544d=this[_0x79f5('0x1f')][_0x4fceda[_0x79f5('0xba')]]['callAdditionalPhoneAfterMin'];hopperUtils[_0x79f5('0xd3')](_0x4005b2,_0x4005b2[_0x79f5('0x75')],_0x563658['voiceQueue'])[_0x79f5('0x40')](function(_0x4eac75){if(_0x4005b2[_0x79f5('0xe2')]>=_0xe4edd3[_0x79f5('0x1f')][_0x4fceda[_0x79f5('0xba')]]['dialAbandonedMaxRetry']){_0xe4edd3[_0x79f5('0xd4')](_0x4005b2,_0x4eac75[_0x79f5('0xd5')]);}else{hopperUtils['rescheduleContact']({'active':![],'countabandonedretry':_0x4005b2[_0x79f5('0xe2')],'scheduledat':moment()[_0x79f5('0xd6')](_0xe4edd3['voiceQueues'][_0x4fceda[_0x79f5('0xba')]][_0x79f5('0xe3')],_0x79f5('0xe4'))[_0x79f5('0x48')](_0x79f5('0xbe')),'ContactId':_0x563658[_0x79f5('0xd7')],'ListId':_0x563658[_0x79f5('0xd8')],'VoiceQueueId':_0x563658[_0x79f5('0xe5')]||undefined,'CampaignId':_0x563658[_0x79f5('0xd9')]||undefined})[_0x79f5('0xa1')](loggerCatch('[rescheduleContact][Abandoned]'));var _0x49c07d=new History(_0x4005b2);_0x49c07d[_0x79f5('0x75')]=0xb;_0x49c07d[_0x79f5('0xcc')]='Abandoned';_0x49c07d['starttime']=moment()[_0x79f5('0x48')]('YYYY-MM-DD\x20HH:mm:ss');_0x49c07d[_0x79f5('0x76')]=_0x49c07d[_0x79f5('0xdb')];_0x49c07d['calleridname']=_0x4005b2[_0x79f5('0xdc')];_0x49c07d[_0x79f5('0xdd')]=_0x4005b2['calleridnum'];hopperUtils[_0x79f5('0xc5')](_0x49c07d)['catch'](loggerCatch(_0x79f5('0xe6')));}})[_0x79f5('0x40')](function(){if(_0x30fa4a)hopperUtils['swapAdditionalPhones'](_0x4005b2,_0x2a2d1b,_0x3b544d)[_0x79f5('0x40')](function(){return 0x1;});});}}}};Dialer[_0x79f5('0x8e')][_0x79f5('0x38')]=function(_0x858934){if(this[_0x79f5('0x24')][_0x858934[_0x79f5('0xbb')]]){this['actions'][_0x858934['uniqueid']]['channel']=_0x858934[_0x79f5('0xe7')];}if(this[_0x79f5('0x26')][_0x858934[_0x79f5('0xbb')]]){this[_0x79f5('0x26')][_0x858934[_0x79f5('0xbb')]][_0x79f5('0xe7')]=_0x858934[_0x79f5('0xe7')];}};Dialer[_0x79f5('0x8e')][_0x79f5('0x3c')]=function(_0x15a307){if(!this[_0x79f5('0x24')][_0x15a307[_0x79f5('0xe8')]]){return;}var _0x3c167e=this[_0x79f5('0x1f')][this['actions'][_0x15a307['actionid']][_0x79f5('0xba')]][_0x79f5('0xe9')]||_0x79f5('0xea');if(_0x3c167e===_0x79f5('0xeb')){if(this[_0x79f5('0x24')][_0x15a307['actionid']]&&_[_0x79f5('0xec')](this[_0x79f5('0x24')][_0x15a307[_0x79f5('0xe8')]][_0x79f5('0xed')])&&_0x15a307[_0x79f5('0x8b')]==='1'&&_0x15a307[_0x79f5('0xee')]==='0'){if(this[_0x79f5('0x21')][_0x15a307[_0x79f5('0xef')]]){if(!this['agents'][_0x15a307[_0x79f5('0xef')]]['locked']){this[_0x79f5('0x21')][_0x15a307[_0x79f5('0xef')]]['locked']=!![];this['actions'][_0x15a307[_0x79f5('0xe8')]][_0x79f5('0xed')]=!![];this[_0x79f5('0x24')][_0x15a307['actionid']][_0x79f5('0xef')]=_0x15a307[_0x79f5('0xef')];}}}}else if(_0x3c167e===_0x79f5('0xea')){if(this[_0x79f5('0x24')][_0x15a307['actionid']]){if(this[_0x79f5('0x21')][_0x15a307['stateinterface']]){this[_0x79f5('0x24')][_0x15a307['actionid']][_0x79f5('0xef')]=_0x15a307[_0x79f5('0xef')];if(_[_0x79f5('0xec')](this[_0x79f5('0xf0')][this[_0x79f5('0x24')][_0x15a307[_0x79f5('0xe8')]][_0x79f5('0xba')]])){this[_0x79f5('0xf0')][this[_0x79f5('0x24')][_0x15a307[_0x79f5('0xe8')]][_0x79f5('0xba')]]=[];}this[_0x79f5('0xf0')][this['actions'][_0x15a307['actionid']][_0x79f5('0xba')]][_0x79f5('0x9b')](_[_0x79f5('0xf1')](_[_0x79f5('0x79')](this[_0x79f5('0x24')][_0x15a307[_0x79f5('0xe8')]],[_0x79f5('0xf2'),'stateinterface']),{'status':_0x15a307[_0x79f5('0x8b')],'paused':_0x15a307['paused']}));}}}};Dialer[_0x79f5('0x8e')][_0x79f5('0x3e')]=function(_0x3a5889){if(!this['actions'][_0x3a5889[_0x79f5('0xe8')]]){return;}var _0x203555=this;var _0x3ffd5f=this[_0x79f5('0x1f')][this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xba')]];var _0x22d6a9=_0x3ffd5f[_0x79f5('0xe9')]||_0x79f5('0xea');if(_0x22d6a9===_0x79f5('0xeb')){if(this['actions'][_0x3a5889[_0x79f5('0xe8')]]&&this[_0x79f5('0x24')][_0x3a5889['actionid']]['stateinterface']){this[_0x79f5('0x1e')][_0x79f5('0xf3')](this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xf2')],this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xef')])[_0x79f5('0xa1')](function(_0x1e47c7){logger[_0x79f5('0x6d')](_0x79f5('0xf4'),util[_0x79f5('0x47')](_0x1e47c7,{'showHidden':![],'depth':null}));})['finally'](function(){_0x203555[_0x79f5('0xbc')](_0x203555[_0x79f5('0x1f')][_0x203555[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]]['queue']]);_0x203555['agents'][_0x203555['actions'][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xef')]][_0x79f5('0xed')]=![];delete _0x203555[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]];unlockQueueStatus(_0x3ffd5f);});}else{this[_0x79f5('0xbc')](this[_0x79f5('0x1f')][this[_0x79f5('0x24')][_0x3a5889['actionid']][_0x79f5('0xba')]]);hopperUtils['rescheduleContact']({'active':![],'ContactId':this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xd7')],'ListId':this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xd8')],'VoiceQueueId':this['actions'][_0x3a5889['actionid']][_0x79f5('0xe5')]||undefined,'CampaignId':this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xd9')]||undefined})[_0x79f5('0xa1')](loggerCatch(_0x79f5('0xf5')));delete this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]];unlockQueueStatus(_0x3ffd5f);}}else if(_0x22d6a9===_0x79f5('0xea')){var _0x309415;if(this[_0x79f5('0x24')][_0x3a5889['actionid']]&&!_[_0x79f5('0x4a')](this[_0x79f5('0xf0')][this[_0x79f5('0x24')][_0x3a5889['actionid']]['queue']])){if(this['queueBookedRR'][_0x203555[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xba')]]){this[_0x79f5('0x2b')][_0x203555['actions'][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xba')]]=this['queueBookedRR'][this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xba')]]?this[_0x79f5('0x2b')][this[_0x79f5('0x24')][_0x3a5889['actionid']][_0x79f5('0xba')]]:this[_0x79f5('0xf0')][this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xba')]]?this[_0x79f5('0xf0')][this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xba')]][_0x79f5('0xf6')]||0x0:0x0;}this['queueBooked'][this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xba')]][_0x79f5('0xf6')]=this['queueBookedRR'][this[_0x79f5('0x24')][_0x3a5889['actionid']][_0x79f5('0xba')]];for(var _0x5592af=0x0;_0x5592af<this[_0x79f5('0xf0')][this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xba')]][_0x79f5('0x9a')];_0x5592af+=0x1){_0x309415=rr(this[_0x79f5('0xf0')][this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]]['queue']]);this[_0x79f5('0x2b')][_0x203555['actions'][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xba')]]=this[_0x79f5('0xf0')][this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]]['queue']]['_rr'];if(_0x309415[_0x79f5('0x8b')]==='1'&&_0x309415[_0x79f5('0xee')]==='0'){break;}}if(!_[_0x79f5('0xec')](_0x309415)){this[_0x79f5('0x21')][_0x309415[_0x79f5('0xef')]][_0x79f5('0xf7')]=_[_0x79f5('0x42')](this[_0x79f5('0x21')][_0x309415['stateinterface']]['unlockRR'])?!![]:this[_0x79f5('0x21')][_0x309415[_0x79f5('0xef')]][_0x79f5('0xf7')];}loggerBooked['info']('[booked][RR]',_0x3a5889[_0x79f5('0xe8')],_0x79f5('0xf8'),JSON[_0x79f5('0x88')](_[_0x79f5('0x79')](this[_0x79f5('0x21')][_0x309415['stateinterface']],[_0x79f5('0x66'),_0x79f5('0xf7')])),_0x79f5('0xf9'),JSON[_0x79f5('0x88')](_0x309415[_0x79f5('0xf2')]));if(!_[_0x79f5('0xec')](_0x309415)&&_0x309415[_0x79f5('0x8b')]==='1'&&_0x309415['paused']==='0'&&this[_0x79f5('0x21')][_0x309415[_0x79f5('0xef')]][_0x79f5('0xf7')]){this[_0x79f5('0x21')][_0x309415['stateinterface']][_0x79f5('0xf7')]=![];this[_0x79f5('0xf0')][_0x203555[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xba')]]=[];this['preview']['run'](_0x309415['idHopper'],_0x309415[_0x79f5('0xef')])[_0x79f5('0xa1')](function(_0x554d61){logger[_0x79f5('0x6d')](_0x79f5('0xf4'),util[_0x79f5('0x47')](_0x554d61,{'showHidden':![],'depth':null}));})[_0x79f5('0x1c')](function(){_0x203555['updateOriginated'](_0x203555[_0x79f5('0x1f')][_0x203555[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xba')]]);setTimeout(function(){_0x203555[_0x79f5('0x21')][_0x309415[_0x79f5('0xef')]][_0x79f5('0xf7')]=!![];loggerBooked[_0x79f5('0x4b')](_0x79f5('0xfa'),_0x3a5889['actionid'],_0x79f5('0xf8'),JSON[_0x79f5('0x88')](_[_0x79f5('0x79')](_0x203555['agents'][_0x309415[_0x79f5('0xef')]],['name',_0x79f5('0xf7')])),_0x79f5('0xf9'),JSON[_0x79f5('0x88')](_0x309415[_0x79f5('0xf2')]));},0xc7);delete _0x203555[_0x79f5('0x24')][_0x3a5889['actionid']];unlockQueueStatus(_0x3ffd5f,_0x3a5889['actionid']);});}else{loggerBooked[_0x79f5('0x4b')](_0x79f5('0xfb'));this[_0x79f5('0xbc')](this[_0x79f5('0x1f')][this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]]['queue']]);hopperUtils[_0x79f5('0xfc')]({'active':![],'ContactId':this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xd7')],'ListId':this['actions'][_0x3a5889['actionid']]['ListId'],'VoiceQueueId':this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xe5')]||undefined,'CampaignId':this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xd9')]||undefined})['catch'](loggerCatch(_0x79f5('0xf5')));delete this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]];unlockQueueStatus(_0x3ffd5f);}}else{loggerBooked[_0x79f5('0x4b')](_0x79f5('0xfd'));this['updateOriginated'](this['voiceQueues'][this['actions'][_0x3a5889[_0x79f5('0xe8')]]['queue']]);hopperUtils[_0x79f5('0xfc')]({'active':![],'ContactId':this['actions'][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xd7')],'ListId':this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]]['ListId'],'VoiceQueueId':this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xe5')]||undefined,'CampaignId':this['actions'][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xd9')]||undefined})[_0x79f5('0xa1')](loggerCatch(_0x79f5('0xfe')));delete this[_0x79f5('0x24')][_0x3a5889['actionid']];unlockQueueStatus(_0x3ffd5f);}}else{loggerBooked[_0x79f5('0x4b')](_0x79f5('0xff'));this[_0x79f5('0xbc')](this[_0x79f5('0x1f')][this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]]['queue']]);hopperUtils[_0x79f5('0xfc')]({'active':![],'ContactId':this[_0x79f5('0x24')][_0x3a5889['actionid']]['ContactId'],'ListId':this[_0x79f5('0x24')][_0x3a5889['actionid']][_0x79f5('0xd8')],'VoiceQueueId':this[_0x79f5('0x24')][_0x3a5889[_0x79f5('0xe8')]]['VoiceQueueId']||undefined,'CampaignId':this['actions'][_0x3a5889[_0x79f5('0xe8')]][_0x79f5('0xd9')]||undefined})[_0x79f5('0xa1')](loggerCatch('[unlock3][syncQueueStatusComplete]'));delete this[_0x79f5('0x24')][_0x3a5889['actionid']];unlockQueueStatus(_0x3ffd5f);}};Dialer[_0x79f5('0x8e')]['syncOriginateResponse']=function(_0x251a32){var _0x465488=this[_0x79f5('0x24')][_0x251a32[_0x79f5('0xe8')]];if(_0x465488){delete this[_0x79f5('0x24')][_0x251a32['actionid']];_0x465488[_0x79f5('0xca')]=moment()[_0x79f5('0x48')](_0x79f5('0xbe'));var _0x388e7f=_0x465488[_0x79f5('0x44')]===_0x79f5('0xbf')?this[_0x79f5('0x20')][_0x465488['queue']]:this['voiceQueues'][_0x465488['getQueue']()];if(_0x251a32['response']!=='Success'){this[_0x79f5('0xbc')](_0x388e7f);return this[_0x79f5('0x100')](_0x465488,_0x388e7f,_0x251a32)['catch'](loggerCatch(_0x79f5('0x101')));}this[_0x79f5('0x26')][_0x251a32['uniqueid']]=_0x465488;}};Dialer[_0x79f5('0x8e')][_0x79f5('0x3a')]=function(_0x127e5f){var _0x301fab=this;var _0x1e5709=this[_0x79f5('0x26')][_0x127e5f[_0x79f5('0xbb')]];var _0x14a57c;if(!_['isNil'](_0x127e5f)&&!_['isNil'](_0x127e5f[_0x79f5('0x102')])&&!_[_0x79f5('0xec')](_0x127e5f['variable'][_0x79f5('0x103')])&&_0x127e5f[_0x79f5('0x104')]===_0x79f5('0x105')&&_0x1e5709){if(_0x1e5709[_0x79f5('0x44')]!==_0x79f5('0xbf')&&this['voiceQueues'][_0x1e5709[_0x79f5('0xba')]]['dialAMDActive']&&_0x127e5f[_0x79f5('0x106')]==='HANGUP'){delete this['uniqueId'][_0x127e5f[_0x79f5('0xbb')]];this[_0x79f5('0xbc')](this[_0x79f5('0x1f')][_0x1e5709[_0x79f5('0xba')]]);this[_0x79f5('0x1f')][_0x1e5709[_0x79f5('0xba')]][_0x79f5('0xc0')]+=0x1;this[_0x79f5('0x1f')][_0x1e5709[_0x79f5('0xba')]][_0x79f5('0x107')]+=0x1;_0x14a57c=new Hangup(_0x1e5709,_0x127e5f);_0x14a57c[_0x79f5('0x75')]=0x12;_0x14a57c[_0x79f5('0xcc')]=_0x79f5('0x108');_0x14a57c[_0x79f5('0x109')]=_0x79f5('0x10a');ami[_0x79f5('0x43')]('custom:amd',ut[_0x79f5('0x10b')](_0x14a57c,'amd'));this[_0x79f5('0x10c')](_0x14a57c,_0x79f5('0x10d'),_0x79f5('0x10e'));}if(_0x1e5709[_0x79f5('0x44')]!=='ivr'&&this['voiceQueues'][_0x1e5709['queue']][_0x79f5('0x10f')]&&_0x127e5f['value']===_0x79f5('0x110')){return new Promise(function(_0x207016,_0x25f756){delete _0x301fab[_0x79f5('0x26')][_0x127e5f[_0x79f5('0xbb')]];_0x301fab['updateOriginated'](_0x301fab['voiceQueues'][_0x1e5709[_0x79f5('0xba')]]);_0x301fab[_0x79f5('0x1f')][_0x1e5709[_0x79f5('0xba')]]['outboundAnswerCallsDay']+=0x1;_0x301fab[_0x79f5('0x1f')][_0x1e5709['queue']][_0x79f5('0x107')]+=0x1;var _0x5e6730=_0x301fab[_0x79f5('0x1f')][_0x1e5709[_0x79f5('0xba')]];var _0x32f0b8=new Hangup(_0x1e5709,_0x127e5f);_0x32f0b8['state']=0x13;_0x32f0b8['statedesc']='Machine';_0x32f0b8['membername']=_0x79f5('0x10a');_0x32f0b8[_0x79f5('0x111')]+=0x1;_0x32f0b8[_0x79f5('0xd0')]+=0x1;_0x32f0b8[_0x79f5('0x112')]=!![];ami[_0x79f5('0x43')]('custom:amd',ut[_0x79f5('0x10b')](_0x32f0b8,_0x79f5('0x112')));hopperUtils[_0x79f5('0xc5')](_0x32f0b8)[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x113')));if(_0x32f0b8['countbusyretry']+_0x32f0b8[_0x79f5('0x114')]+_0x32f0b8[_0x79f5('0x115')]+_0x32f0b8[_0x79f5('0x116')]+_0x32f0b8[_0x79f5('0xcf')]+_0x32f0b8[_0x79f5('0xe2')]+_0x32f0b8[_0x79f5('0x111')]+_0x32f0b8['countagentrejectretry']>=_0x5e6730['dialGlobalMaxRetry']){_0x301fab[_0x79f5('0x117')](_0x32f0b8,_0x207016,_0x25f756,_0x79f5('0x118'));}else{if(_0x32f0b8[_0x79f5('0x111')]>=_0x5e6730[_0x79f5('0x119')]){_0x301fab[_0x79f5('0x11a')](_0x32f0b8,_0x207016,_0x25f756,_0x79f5('0x11b'));}else{hopperUtils[_0x79f5('0xfc')]({'active':![],'countmachineretry':_0x32f0b8[_0x79f5('0x111')],'scheduledat':moment()[_0x79f5('0xd6')](_0x5e6730[_0x79f5('0x11c')],'minutes')['format'](_0x79f5('0xbe')),'ContactId':_0x32f0b8[_0x79f5('0xd7')],'ListId':_0x32f0b8[_0x79f5('0xd8')],'VoiceQueueId':_0x32f0b8['VoiceQueueId']||undefined,'CampaignId':_0x32f0b8[_0x79f5('0xd9')]||undefined})['catch'](loggerCatch(_0x79f5('0x11d')));_0x207016({'reschedule':0x1});}}});}if(_0x1e5709[_0x79f5('0x44')]===_0x79f5('0xbf')&&this[_0x79f5('0x20')][_0x1e5709[_0x79f5('0xba')]]['dialAMDActive']&&_0x127e5f[_0x79f5('0x106')]==='HANGUP'){delete this['uniqueId'][_0x127e5f[_0x79f5('0xbb')]];this[_0x79f5('0xbc')](this[_0x79f5('0x20')][_0x1e5709[_0x79f5('0xba')]]);_0x14a57c=new Hangup(_0x1e5709,_0x127e5f);_0x14a57c[_0x79f5('0x75')]=0x12;_0x14a57c[_0x79f5('0xcc')]=_0x79f5('0x108');_0x14a57c['membername']=_0x79f5('0x10a');ami['emit'](_0x79f5('0x11e'),ut['buildObj'](_0x14a57c,_0x79f5('0x112')));this[_0x79f5('0x10c')](_0x14a57c,_0x79f5('0x11f'),'[syncHangupInAMDIvr]');}if(_0x1e5709[_0x79f5('0x44')]===_0x79f5('0xbf')&&this[_0x79f5('0x20')][_0x1e5709[_0x79f5('0xba')]]['dialAMDActive']&&_0x127e5f['value']==='MACHINE'){return new Promise(function(_0x565199,_0x2ec2b5){delete _0x301fab[_0x79f5('0x26')][_0x127e5f[_0x79f5('0xbb')]];_0x301fab[_0x79f5('0xbc')](_0x301fab['campaigns'][_0x1e5709[_0x79f5('0xba')]]);_0x301fab[_0x79f5('0x20')][_0x1e5709[_0x79f5('0xba')]][_0x79f5('0xc0')]+=0x1;_0x301fab[_0x79f5('0x20')][_0x1e5709['queue']][_0x79f5('0x107')]+=0x1;var _0x428c21=_0x301fab[_0x79f5('0x20')][_0x1e5709['queue']];var _0x410cda=new Hangup(_0x1e5709,_0x127e5f);_0x410cda[_0x79f5('0x75')]=0x13;_0x410cda[_0x79f5('0xcc')]=_0x79f5('0x120');_0x410cda[_0x79f5('0x109')]=_0x79f5('0x10a');_0x410cda[_0x79f5('0x111')]+=0x1;_0x410cda[_0x79f5('0xd0')]+=0x1;_0x410cda['amd']=!![];ami[_0x79f5('0x43')]('custom:amd',ut[_0x79f5('0x10b')](_0x410cda,_0x79f5('0x112')));hopperUtils[_0x79f5('0xc5')](_0x410cda)[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x113')));if(_0x410cda[_0x79f5('0x121')]+_0x410cda[_0x79f5('0x114')]+_0x410cda['countnoanswerretry']+_0x410cda[_0x79f5('0x116')]+_0x410cda[_0x79f5('0xcf')]+_0x410cda[_0x79f5('0xe2')]+_0x410cda[_0x79f5('0x111')]+_0x410cda[_0x79f5('0x122')]>=_0x428c21[_0x79f5('0x123')]){_0x301fab[_0x79f5('0x117')](_0x410cda,_0x565199,_0x2ec2b5,'reason19\x20machine....');}else{if(_0x410cda[_0x79f5('0x111')]>=_0x428c21[_0x79f5('0x119')]){_0x301fab[_0x79f5('0x11a')](_0x410cda,_0x565199,_0x2ec2b5,_0x79f5('0x11b'));}else{hopperUtils[_0x79f5('0xfc')]({'active':![],'countmachineretry':_0x410cda[_0x79f5('0x111')],'scheduledat':moment()[_0x79f5('0xd6')](_0x428c21[_0x79f5('0x11c')],'minutes')[_0x79f5('0x48')](_0x79f5('0xbe')),'ContactId':_0x410cda['ContactId'],'ListId':_0x410cda[_0x79f5('0xd8')],'VoiceQueueId':_0x410cda[_0x79f5('0xe5')]||undefined,'CampaignId':_0x410cda[_0x79f5('0xd9')]||undefined})[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x11d')));_0x565199({'reschedule':0x1});}}});}}};Dialer[_0x79f5('0x8e')][_0x79f5('0x124')]=function(_0xdc9b6c){var _0x52b5f3=this[_0x79f5('0x26')][_0xdc9b6c[_0x79f5('0xbb')]];var _0x2dd459;if(_0x52b5f3&&_0x52b5f3[_0x79f5('0x44')]===_0x79f5('0xbf')){delete this[_0x79f5('0x26')][_0xdc9b6c[_0x79f5('0xbb')]];this[_0x79f5('0xbc')](this[_0x79f5('0x20')][_0x52b5f3[_0x79f5('0xba')]]);this['campaigns'][_0x52b5f3[_0x79f5('0xba')]][_0x79f5('0x125')]+=0x1;_0x2dd459=new Hangup(_0x52b5f3,_0xdc9b6c);hopperUtils['createHistory'](_0x2dd459)[_0x79f5('0xa1')](loggerCatch('[syncHangupIvr][createHistory]'));hopperUtils[_0x79f5('0xc7')](_0x2dd459)[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x126')));}if(_0x52b5f3&&_0x52b5f3['type']!==_0x79f5('0xbf')&&isNotNull(this[_0x79f5('0x1f')][_0x52b5f3[_0x79f5('0xba')]]['dialQueueProject'])){delete this[_0x79f5('0x26')][_0xdc9b6c['uniqueid']];this[_0x79f5('0xbc')](this[_0x79f5('0x1f')][_0x52b5f3[_0x79f5('0xba')]]);this['voiceQueues'][_0x52b5f3['queue']][_0x79f5('0xc0')]+=0x1;this[_0x79f5('0x1f')][_0x52b5f3[_0x79f5('0xba')]][_0x79f5('0x107')]+=0x1;_0x2dd459=new Hangup(_0x52b5f3,_0xdc9b6c);_0x2dd459[_0x79f5('0x75')]=0x10;_0x2dd459[_0x79f5('0xcc')]='AnswerAGI';_0x2dd459['membername']='AGI';hopperUtils[_0x79f5('0xc5')](_0x2dd459)[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x127')));hopperUtils[_0x79f5('0xc7')](_0x2dd459)[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x126')));}if(_0x52b5f3&&_0x52b5f3['type']!==_0x79f5('0xbf')&&!isNotNull(this[_0x79f5('0x1f')][_0x52b5f3[_0x79f5('0xba')]][_0x79f5('0x128')])){if(_0xdc9b6c[_0x79f5('0x129')]===_0x79f5('0x12a')){delete this[_0x79f5('0x26')][_0xdc9b6c[_0x79f5('0xbb')]];this[_0x79f5('0x1f')][_0x52b5f3[_0x79f5('0xba')]]['outboundAnswerCallsDay']+=0x1;const _0x106d75=new AgentComplete(_0x52b5f3,_0xdc9b6c);_0x106d75[_0x79f5('0xd9')]=this[_0x79f5('0x1f')][_0x52b5f3[_0x79f5('0xba')]]['id'];hopperUtils[_0x79f5('0xc5')](_0x106d75)[_0x79f5('0xa1')](loggerCatch(_0x79f5('0xc6')));hopperUtils[_0x79f5('0xc7')](_0x106d75)[_0x79f5('0xa1')](loggerCatch(_0x79f5('0xc8')));}else{delete this['uniqueId'][_0xdc9b6c[_0x79f5('0xbb')]];this[_0x79f5('0xbc')](this[_0x79f5('0x1f')][_0x52b5f3[_0x79f5('0xba')]]);this[_0x79f5('0x1f')][_0x52b5f3['queue']][_0x79f5('0x12b')]+=0x1;_0x2dd459=new Hangup(_0x52b5f3,_0xdc9b6c);_0x2dd459[_0x79f5('0x75')]=0xc;_0x2dd459[_0x79f5('0xcc')]=_0xdc9b6c[_0x79f5('0x129')];_0x2dd459[_0x79f5('0x109')]=_0x79f5('0x12c');hopperUtils[_0x79f5('0xc5')](_0x2dd459)[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x127')));hopperUtils[_0x79f5('0xc7')](_0x2dd459)[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x126')));}}};Dialer['prototype'][_0x79f5('0xb')]=function(_0x1e89e){var _0x2b28a7=this;if(!_0x2b28a7['queuesSummary'][_0x1e89e[_0x79f5('0x66')]]){_0x2b28a7[_0x79f5('0x12d')][_0x1e89e[_0x79f5('0x66')]]={'running':![]};}else if(_0x2b28a7[_0x79f5('0x12d')][_0x1e89e['name']][_0x79f5('0x12e')]===!![]){return;}else if(_0x2b28a7[_0x79f5('0x12d')][_0x1e89e[_0x79f5('0x66')]][_0x79f5('0x12e')]===![]){_0x2b28a7[_0x79f5('0x12d')][_0x1e89e[_0x79f5('0x66')]][_0x79f5('0x12e')]=!![];}var _0x53809c=_0x2b28a7['voiceQueues'][_0x1e89e[_0x79f5('0x66')]];var _0x28b266=_0x53809c['message']!==utils[_0x79f5('0x70')][_0x79f5('0x7e')];var _0x4f1494=utils[_0x79f5('0x12f')](_0x53809c);_0x53809c[_0x79f5('0x130')]=utils[_0x79f5('0x131')](_0x53809c,_0x2b28a7[_0x79f5('0x22')]);Promise[_0x79f5('0x132')]()['then'](function(){if(_0x53809c[_0x79f5('0x130')]===utils[_0x79f5('0x70')]['INACTIVE']){if(_0x28b266){clearPredictiveAttributes(_0x53809c);_0x1e89e[_0x79f5('0x28')]=undefined;_0x1e89e[_0x79f5('0x29')]=undefined;}if(_0x53809c[_0x79f5('0x130')]===utils['CAMPAIGN_STATUS'][_0x79f5('0x7e')]){_0x1e89e[_0x79f5('0x133')]=0x0;_0x1e89e[_0x79f5('0xee')]=0x0;_0x1e89e[_0x79f5('0x134')]=0x0;_0x1e89e[_0x79f5('0x135')]=0x0;_0x1e89e[_0x79f5('0x136')]=0x0;}}else if(_0x53809c[_0x79f5('0x130')]===utils[_0x79f5('0x70')][_0x79f5('0x137')]&&!_0x4f1494){return _0x2b28a7[_0x79f5('0x94')](_0x53809c,!![])[_0x79f5('0x40')](function(){return _0x2b28a7[_0x79f5('0x94')](_0x53809c,![]);})[_0x79f5('0x40')](function(){return _0x2b28a7[_0x79f5('0xad')](_0x53809c);})[_0x79f5('0xa1')](function(_0x12ccc0){loggerSyncQueueSummary[_0x79f5('0x65')]('[syncQueueSummary]',util[_0x79f5('0x47')](_0x12ccc0,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x53809c);});}else{clearPredictiveAttributes(_0x53809c);}})[_0x79f5('0x40')](function(){var _0x38bc4f=_0x1e89e[_0x79f5('0x138')](_0x53809c);if(_0x38bc4f||_0x53809c[_0x79f5('0x139')]){_0x53809c['queueSummaryCountersUpdated']=![];_0x1e89e['updateReportFromOutboundQueue'](_0x53809c);Object[_0x79f5('0x13a')](_0x53809c,_0x1e89e);emitOutboundVoiceQueueSummary(_0x1e89e);}_0x2b28a7[_0x79f5('0x12d')][_0x53809c[_0x79f5('0x66')]][_0x79f5('0x12e')]=![];})['catch'](function(_0xe6c25f){logger[_0x79f5('0x6d')](_0x79f5('0x13b'),util[_0x79f5('0x47')](_0xe6c25f,{'showHidden':![],'depth':null}));_0x2b28a7[_0x79f5('0x12d')][_0x53809c[_0x79f5('0x66')]][_0x79f5('0x12e')]=![];});};Dialer[_0x79f5('0x8e')][_0x79f5('0x35')]=_['throttle'](function(){var _0x33012c=_[_0x79f5('0x13c')](this['voiceQueues'],function(_0x23de32){return _0x23de32['dialPreviewRecallmeReminder'];});var _0x6e1b9d=_[_0x79f5('0x13c')](this[_0x79f5('0x21')],function(_0x5d9d0f){return _0x5d9d0f[_0x79f5('0x13d')]&&_0x5d9d0f['status']==='reachable';});if(_0x33012c[_0x79f5('0x9a')]>0x0&&_0x6e1b9d[_0x79f5('0x9a')]>0x0){return Promise['resolve']()[_0x79f5('0x40')](cmHopper[_0x79f5('0x13e')](_[_0x79f5('0x13f')](_0x33012c,'id'),previewRecallmeReminderInterval,_[_0x79f5('0x13f')](_0x6e1b9d,'id')))[_0x79f5('0x40')](function(_0x17e825){for(var _0x1de590=0x0;_0x1de590<_0x17e825[_0x79f5('0x9a')];_0x1de590++){var _0x5c7337=_0x17e825[_0x1de590]['Agent'][_0x79f5('0x66')];if(_0x5c7337)io['to'](util[_0x79f5('0x48')](_0x79f5('0x140'),_0x5c7337))[_0x79f5('0x43')](_0x79f5('0x141'),{'hopper':_0x17e825[_0x1de590]});}})['catch'](function(_0x3ded23){logger[_0x79f5('0x6d')](_0x79f5('0x142'),_0x3ded23);});}},0x3c*0x3e8,{'leading':!![]});Dialer[_0x79f5('0x8e')][_0x79f5('0x143')]=function(){var _0x21c658=this;setInterval(function(){_0x21c658['clearZombieChannels'](_0x21c658[_0x79f5('0x26')],_0x79f5('0x144'));_0x21c658[_0x79f5('0x145')](_0x21c658[_0x79f5('0x24')],_0x79f5('0x146'));},0x32c8);};Dialer['prototype'][_0x79f5('0x145')]=function(_0x92d03c,_0x1e0cb0){var _0x258d3e=this;for(var _0x4124bd in _0x92d03c){if(typeof _0x92d03c[_0x4124bd]!=='undefined'){this[_0x79f5('0x1d')][_0x79f5('0x1a')](function(){if(!_[_0x79f5('0xec')](_0x92d03c[_0x4124bd])){return ami[_0x79f5('0x9c')]({'action':_0x79f5('0x8b'),'channel':_0x92d03c[_0x4124bd][_0x79f5('0xe7')]})['catch'](function(_0x195026){if(_0x195026[_0x79f5('0x6f')]==='No\x20such\x20channel'){setTimeout(function(){if(_0x92d03c[_0x4124bd]&&_0x92d03c[_0x4124bd][_0x79f5('0x44')]!==_0x79f5('0xbf')){_0x258d3e['updateOriginated'](_0x258d3e[_0x79f5('0x1f')][_0x92d03c[_0x4124bd][_0x79f5('0xba')]]);logger['error'](_0x79f5('0x147'),_0x1e0cb0,_0x4124bd,_0x92d03c[_0x4124bd][_0x79f5('0xba')]);delete _0x92d03c[_0x4124bd];}if(_0x92d03c[_0x4124bd]&&_0x92d03c[_0x4124bd][_0x79f5('0x44')]==='ivr'){_0x258d3e[_0x79f5('0xbc')](_0x258d3e[_0x79f5('0x20')][_0x92d03c[_0x4124bd][_0x79f5('0xba')]]);logger[_0x79f5('0x6d')]('[Dialer][checkChannel][ivr]',_0x1e0cb0,_0x4124bd,_0x92d03c[_0x4124bd][_0x79f5('0xba')]);delete _0x92d03c[_0x4124bd];}},0x2328);}});}});}}};Dialer['prototype'][_0x79f5('0x148')]=function(_0x26bd58){return Promise['resolve']()[_0x79f5('0x40')](voiceQueueRt[_0x79f5('0x148')](_0x26bd58))[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x149')));};Dialer['prototype'][_0x79f5('0xbc')]=function(_0x4e7079){if(!_[_0x79f5('0x42')](_0x4e7079)&&_0x4e7079!==null){if(typeof _0x4e7079['originated']!==_0x79f5('0x14a')){if(_0x4e7079['originated']>0x0){_0x4e7079['originated']-=0x1;}else{logger[_0x79f5('0x6d')](_0x79f5('0x14b'));}}}else{logger[_0x79f5('0x6d')]('[updateOriginated]\x20is\x20null\x20or\x20undefined');}};Dialer[_0x79f5('0x8e')]['loggerHandler']=function(_0x190e02,_0x2416d6){var _0x4b35e3=this;return function(_0x43599b){_0x4b35e3['updateOriginated'](_0x2416d6);logger['error'](_0x190e02,util['inspect'](_0x43599b,{'showHidden':![],'depth':null}));};};Dialer[_0x79f5('0x8e')][_0x79f5('0x14c')]=function(_0x15ee3d,_0x33c777,_0x4d5072){var _0x50953c={'state':0x19,'statedesc':_0x79f5('0x14d')};this[_0x79f5('0xbc')](_0x33c777);this[_0x79f5('0x10c')](_[_0x79f5('0xf1')](_0x50953c,_[_0x79f5('0x79')](_0x4d5072,[_0x79f5('0xd7'),_0x79f5('0xd8'),_0x79f5('0x14e'),_0x79f5('0xe5'),_0x79f5('0xd9')])),_0x79f5('0x14f'),_0x79f5('0x150'));logger[_0x79f5('0x6d')](_0x15ee3d);};Dialer[_0x79f5('0x8e')]['saveInDb']=function(_0x4c68be,_0x490b4b,_0x75f785){hopperUtils[_0x79f5('0xc5')](_0x4c68be)[_0x79f5('0xa1')](loggerCatch(_0x490b4b));hopperUtils[_0x79f5('0xc7')](_0x4c68be)[_0x79f5('0xa1')](loggerCatch(_0x75f785));};Dialer[_0x79f5('0x8e')][_0x79f5('0xd4')]=function(_0x2d91fe,_0x21ffac){hopperUtils['createHistory'](_0x2d91fe)[_0x79f5('0xa1')](loggerCatch(_0x79f5('0xc6')));if(_0x21ffac==0x0){hopperUtils[_0x79f5('0xc7')](_0x2d91fe)['catch'](loggerCatch(_0x79f5('0x151')));}};Dialer[_0x79f5('0x8e')][_0x79f5('0x142')]=function(_0x5b2d0f){return Promise['resolve']()[_0x79f5('0x40')](cmHopper[_0x79f5('0x13e')](_0x5b2d0f['id'],previewRecallmeReminderInterval))['then'](function(_0x5361f3){for(var _0x1776cd=0x0;_0x1776cd<_0x5361f3['length'];_0x1776cd++){var _0x50cb67=_0x5361f3[_0x1776cd][_0x79f5('0x152')]['name'];if(_0x50cb67)io['to'](util[_0x79f5('0x48')](_0x79f5('0x140'),_0x50cb67))['emit'](_0x79f5('0x141'),{'hopper':_0x5361f3[_0x1776cd]});}})['catch'](function(){});};Dialer[_0x79f5('0x8e')][_0x79f5('0xac')]=function(_0x4b918c){var _0x252a7d=this;return function(){_0x252a7d[_0x79f5('0x153')](_0x4b918c);};};Dialer[_0x79f5('0x8e')][_0x79f5('0x154')]=function(_0x3e6758,_0x49d8d8){var _0x218930=this;var _0x5d58a5=uuid['v4']();this[_0x79f5('0x24')][_0x5d58a5]=new Action(_0x3e6758,_0x49d8d8,_0x5d58a5);return new Promise(function(_0x23fb15,_0x2b1bff){if(_[_0x79f5('0x42')](_0x3e6758)&&typeof _0x3e6758!==_0x79f5('0x155')){return _0x2b1bff(msgResponse(_0x79f5('0x156'),'Failure',_0x79f5('0x157')));}if(_[_0x79f5('0x42')](_0x49d8d8[_0x79f5('0x158')])||_0x49d8d8[_0x79f5('0x158')]===null){return _0x2b1bff(msgResponse(_0x79f5('0x156'),_0x79f5('0x95'),_0x79f5('0x159')));}var _0x1c7b5f={'XMD-CALLERID':_0x218930[_0x79f5('0x24')][_0x5d58a5][_0x79f5('0x15a')](),'XMD-AGI':_0x3e6758[_0x79f5('0x128')]?util[_0x79f5('0x48')](_0x79f5('0x15b'),ipAgi,_0x3e6758[_0x79f5('0x128')]):_0x79f5('0x15c'),'XMD-AGIAFTER':_0x3e6758[_0x79f5('0xc3')]?util[_0x79f5('0x48')]('\x22agi://%s/square,%s\x22',ipAgi,_0x3e6758['dialQueueProject2']):_0x79f5('0x15c'),'XMD-QUEUE':utils[_0x79f5('0x15d')](_0x3e6758)?util['format'](_0x79f5('0x15e'),_0x3e6758[_0x79f5('0x66')],_0x3e6758['dialQueueOptions']||'',_0x3e6758[_0x79f5('0xc4')]?'c':'',_0x3e6758[_0x79f5('0x15f')]||0x3):_0x79f5('0x15c'),'XMD-CONTACTID':_0x49d8d8[_0x79f5('0xd7')],'XMD-CDRTYPE':_0x79f5('0x6'),'CALLERID(all)':_0x218930['actions'][_0x5d58a5][_0x79f5('0x15a')](),'XMD-AMD':_0x3e6758['dialAMDActive']?_0x79f5('0x137'):'NONE','XMD-DESTINATION':'xcally-motion-dialer'};if(_0x3e6758[_0x79f5('0x10f')]){_0x1c7b5f['XMD-AMDINITIALSILENCE']=_0x3e6758[_0x79f5('0x160')]||0x9c4;_0x1c7b5f[_0x79f5('0x161')]=_0x3e6758['dialAMDGreeting']||0x5dc;_0x1c7b5f['XMD-AMDAFTERGREETINGSILENCE']=_0x3e6758['dialAMDAfterGreetingSilence']||0x320;_0x1c7b5f['XMD-AMDTOTALANALYSISTIME']=_0x3e6758[_0x79f5('0x162')]||0x1388;_0x1c7b5f[_0x79f5('0x163')]=_0x3e6758['dialAMDMinWordLength']||0x64;_0x1c7b5f[_0x79f5('0x164')]=_0x3e6758[_0x79f5('0x165')]||0x32;_0x1c7b5f[_0x79f5('0x166')]=_0x3e6758[_0x79f5('0x167')]||0x3;_0x1c7b5f[_0x79f5('0x168')]=_0x3e6758[_0x79f5('0x169')]||0x100;_0x1c7b5f[_0x79f5('0x16a')]=_0x3e6758['dialAMDMaximumWordLength']||0x1388;}if(utils[_0x79f5('0x15d')](_0x3e6758)){_0x1c7b5f[_0x79f5('0x16b')]=_0x49d8d8['VoiceQueueId'];}else{_0x1c7b5f[_0x79f5('0x16c')]=_0x49d8d8['CampaignId'];}var _0x3502c9=utils['setXMDContactVariables'](_0x49d8d8[_0x79f5('0x16d')]);Object[_0x79f5('0x13a')](_0x1c7b5f,_0x3502c9);var _0x4c83f0=_0x218930['isTrunkReachable'](_0x3e6758[_0x79f5('0x8f')])?utils['getCallerId'](_0x3e6758[_0x79f5('0x8f')][_0x79f5('0x16e')],_0x3e6758['dialOriginateCallerIdName'],_0x3e6758[_0x79f5('0x16f')]>0x0?utils[_0x79f5('0x170')](_0x3e6758[_0x79f5('0x171')],_0x3e6758[_0x79f5('0x16f')]):_0x3e6758[_0x79f5('0x171')]):utils[_0x79f5('0x172')](_[_0x79f5('0xec')](_0x3e6758[_0x79f5('0x90')])?_0x3e6758['Trunk'][_0x79f5('0x16e')]:_0x3e6758[_0x79f5('0x90')]['callerid'],_0x3e6758['dialOriginateCallerIdName'],_0x3e6758['dialRandomLastDigitCallerIdNumber']>0x0?utils[_0x79f5('0x170')](_0x3e6758[_0x79f5('0x171')],_0x3e6758[_0x79f5('0x16f')]):_0x3e6758['dialOriginateCallerIdNumber']);if(_0x4c83f0){_0x1c7b5f[_0x79f5('0x173')]=_0x218930['actions'][_0x5d58a5][_0x79f5('0x174')]=utils[_0x79f5('0x175')](_0x4c83f0);_0x1c7b5f['XMD-ORIGINATECALLERIDNUM']=_0x49d8d8[_0x79f5('0x158')];}_0x3e6758['variables']=_0x1c7b5f;return ami[_0x79f5('0x9c')]({'actionid':_0x5d58a5,'action':_0x79f5('0x156'),'channel':_0x218930['isTrunkReachable'](_0x3e6758[_0x79f5('0x8f')])?util[_0x79f5('0x48')](_0x79f5('0x176'),_0x3e6758[_0x79f5('0x8f')][_0x79f5('0x66')],isNotNull(_0x3e6758['dialPrefix'])?_0x3e6758['dialPrefix'][_0x79f5('0x177')]()||'':'',_0x3e6758[_0x79f5('0x178')]>0x0?_0x49d8d8[_0x79f5('0x158')][_0x79f5('0x179')](_0x3e6758[_0x79f5('0x178')]):_0x49d8d8[_0x79f5('0x158')]):util[_0x79f5('0x48')]('SIP/%s/%s%s',_[_0x79f5('0xec')](_0x3e6758[_0x79f5('0x90')])?_0x3e6758['Trunk'][_0x79f5('0x66')]:_0x3e6758['TrunkBackup'][_0x79f5('0x66')],isNotNull(_0x3e6758[_0x79f5('0x17a')])?_0x3e6758['dialPrefix'][_0x79f5('0x177')]()||'':'',_0x3e6758[_0x79f5('0x178')]>0x0?_0x49d8d8['phone'][_0x79f5('0x179')](_0x3e6758['dialCutDigit']):_0x49d8d8[_0x79f5('0x158')]),'callerid':_0x4c83f0,'Exten':_0x79f5('0x105'),'Context':_0x79f5('0x17b'),'Priority':'1','variable':_0x1c7b5f,'timeout':(_0x3e6758[_0x79f5('0x17c')]||0x1e)*0x3e8,'async':!![],'channelid':_0x5d58a5})['then'](function(_0x11fe63){return _0x23fb15(_0x11fe63);})[_0x79f5('0xa1')](function(_0x5da9ea){_0x3e6758[_0x79f5('0x17d')]+=0x1;var _0x5e45fc=new History(_0x218930[_0x79f5('0x24')][_0x5d58a5]);logger['error'](util['format'](_0x79f5('0x17e'),JSON['stringify'](_0x5da9ea)));_0x5e45fc['state']=0xe;_0x5e45fc[_0x79f5('0xcc')]=_0x79f5('0x17f');_0x5e45fc[_0x79f5('0xdb')]=moment()[_0x79f5('0x48')]('YYYY-MM-DD\x20HH:mm:ss');_0x5e45fc[_0x79f5('0x76')]=_0x5e45fc[_0x79f5('0xdb')];hopperUtils[_0x79f5('0xc5')](_0x5e45fc)[_0x79f5('0xa1')](loggerCatch('[originate][error]'));_0x218930[_0x79f5('0xc7')](_0x5e45fc)[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x180')))[_0x79f5('0x1c')](function(){delete _0x218930[_0x79f5('0x24')][_0x5d58a5];return _0x2b1bff(msgResponse(_0x79f5('0x156'),_0x79f5('0x87'),_0x79f5('0x181')));});});});};Dialer[_0x79f5('0x8e')]['checkRetriveMax']=function(_0x36fc6d,_0x26f96d,_0x2fcf10){var _0x1b7f97=new History(_0x26f96d);if(_0x1b7f97[_0x79f5('0x121')]+_0x1b7f97[_0x79f5('0x114')]+_0x1b7f97[_0x79f5('0x115')]+_0x1b7f97[_0x79f5('0x116')]+_0x1b7f97[_0x79f5('0xcf')]+_0x1b7f97[_0x79f5('0xe2')]+_0x1b7f97['countmachineretry']+_0x1b7f97[_0x79f5('0x122')]>=_0x2fcf10['dialGlobalMaxRetry']-0x1){return!![];}switch(_0x36fc6d){case 0x3:if(_0x1b7f97[_0x79f5('0x115')]>=_0x2fcf10[_0x79f5('0x182')]-0x1){return!![];}hopperUtils[_0x79f5('0xfc')]({'active':![],'countnoanswerretry':_0x1b7f97['countnoanswerretry']+=0x1,'scheduledat':moment()['add'](_0x2fcf10[_0x79f5('0x183')],_0x79f5('0xe4'))[_0x79f5('0x48')](_0x79f5('0xbe')),'ContactId':_0x1b7f97[_0x79f5('0xd7')],'ListId':_0x1b7f97['ListId'],'VoiceQueueId':_0x1b7f97['VoiceQueueId']||undefined,'CampaignId':_0x1b7f97[_0x79f5('0xd9')]||undefined})[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x184')));break;case 0x5:if(_0x1b7f97[_0x79f5('0x121')]>=_0x2fcf10[_0x79f5('0x185')]-0x1){return!![];}hopperUtils[_0x79f5('0xfc')]({'active':![],'countbusyretry':_0x1b7f97['countbusyretry']+=0x1,'scheduledat':moment()[_0x79f5('0xd6')](_0x2fcf10['dialBusyRetryFrequency'],_0x79f5('0xe4'))[_0x79f5('0x48')](_0x79f5('0xbe')),'ContactId':_0x1b7f97[_0x79f5('0xd7')],'ListId':_0x1b7f97[_0x79f5('0xd8')],'VoiceQueueId':_0x1b7f97[_0x79f5('0xe5')]||undefined,'CampaignId':_0x1b7f97['CampaignId']||undefined})[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x186')));break;case 0x8:if(_0x1b7f97[_0x79f5('0x114')]>=_0x2fcf10[_0x79f5('0x187')]-0x1){return!![];}hopperUtils[_0x79f5('0xfc')]({'active':![],'countcongestionretry':_0x1b7f97[_0x79f5('0x114')]+=0x1,'scheduledat':moment()[_0x79f5('0xd6')](_0x2fcf10[_0x79f5('0x188')],_0x79f5('0xe4'))[_0x79f5('0x48')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x1b7f97[_0x79f5('0xd7')],'ListId':_0x1b7f97[_0x79f5('0xd8')],'VoiceQueueId':_0x1b7f97[_0x79f5('0xe5')]||undefined,'CampaignId':_0x1b7f97[_0x79f5('0xd9')]||undefined})[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x189')));break;case 0x0:if(_0x1b7f97[_0x79f5('0x116')]>=_0x2fcf10[_0x79f5('0x18a')]-0x1){return!![];}else{hopperUtils[_0x79f5('0xfc')]({'active':![],'countnosuchnumberretry':_0x1b7f97[_0x79f5('0x116')]+=0x1,'scheduledat':moment()[_0x79f5('0xd6')](_0x2fcf10['dialNoSuchNumberRetryFrequency'],'minutes')[_0x79f5('0x48')](_0x79f5('0xbe')),'ContactId':_0x1b7f97['ContactId'],'ListId':_0x1b7f97[_0x79f5('0xd8')],'VoiceQueueId':_0x1b7f97[_0x79f5('0xe5')]||undefined,'CampaignId':_0x1b7f97[_0x79f5('0xd9')]||undefined})['catch'](loggerCatch(_0x79f5('0x18b')));}break;case 0xa:if(_0x1b7f97[_0x79f5('0xcf')]>=_0x2fcf10[_0x79f5('0x18c')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countdropretry':_0x1b7f97[_0x79f5('0xcf')]+=0x1,'scheduledat':moment()[_0x79f5('0xd6')](_0x2fcf10[_0x79f5('0xd1')],_0x79f5('0xe4'))[_0x79f5('0x48')](_0x79f5('0xbe')),'ContactId':_0x1b7f97['ContactId'],'ListId':_0x1b7f97['ListId'],'VoiceQueueId':_0x1b7f97[_0x79f5('0xe5')]||undefined,'CampaignId':_0x1b7f97[_0x79f5('0xd9')]||undefined})['catch'](loggerCatch('[rescheduleContact][Drop]'));break;case 0xb:if(_0x1b7f97[_0x79f5('0xe2')]>=_0x2fcf10[_0x79f5('0x18d')]-0x1){return!![];}hopperUtils[_0x79f5('0xfc')]({'active':![],'countabandonedretry':_0x1b7f97[_0x79f5('0xe2')]+=0x1,'scheduledat':moment()[_0x79f5('0xd6')](_0x2fcf10['dialAbandonedRetryFrequency'],_0x79f5('0xe4'))['format'](_0x79f5('0xbe')),'ContactId':_0x1b7f97['ContactId'],'ListId':_0x1b7f97[_0x79f5('0xd8')],'VoiceQueueId':_0x1b7f97[_0x79f5('0xe5')]||undefined,'CampaignId':_0x1b7f97[_0x79f5('0xd9')]||undefined})[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x18e')));break;case 0x13:if(_0x1b7f97[_0x79f5('0x111')]>=_0x2fcf10[_0x79f5('0x119')]-0x1){return!![];}hopperUtils[_0x79f5('0xfc')]({'active':![],'countmachineretry':_0x1b7f97[_0x79f5('0x111')]+=0x1,'scheduledat':moment()[_0x79f5('0xd6')](_0x2fcf10[_0x79f5('0x11c')],_0x79f5('0xe4'))[_0x79f5('0x48')](_0x79f5('0xbe')),'ContactId':_0x1b7f97[_0x79f5('0xd7')],'ListId':_0x1b7f97[_0x79f5('0xd8')],'VoiceQueueId':_0x1b7f97[_0x79f5('0xe5')]||undefined,'CampaignId':_0x1b7f97[_0x79f5('0xd9')]||undefined})[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x11d')));break;case 0x14:if(_0x1b7f97['countagentrejectretry']>=_0x2fcf10[_0x79f5('0x18f')]-0x1){return!![];}hopperUtils[_0x79f5('0xfc')]({'active':![],'countagentrejectretry':_0x1b7f97['countagentrejectretry']+=0x1,'scheduledat':moment()['add'](_0x2fcf10[_0x79f5('0x190')],_0x79f5('0xe4'))['format'](_0x79f5('0xbe')),'ContactId':_0x1b7f97[_0x79f5('0xd7')],'ListId':_0x1b7f97['ListId'],'VoiceQueueId':_0x1b7f97[_0x79f5('0xe5')]||undefined,'CampaignId':_0x1b7f97[_0x79f5('0xd9')]||undefined})[_0x79f5('0xa1')](loggerCatch('[rescheduleContact][AgentReject]'));break;default:return!![];}};Dialer[_0x79f5('0x8e')]['callProgressDetecting']=function(_0x32f236,_0x1f9743,_0x4168c1){var _0x61816d=this;var _0x3dcfc1=new History(_0x32f236);var _0x300b29=![];var _0x4503e4;var _0x522cdf;return new Promise(function(_0x3b4f10,_0x2fbaaf){if(_['isUndefined'](_0x1f9743)&&typeof _0x1f9743!=='object'){return _0x2fbaaf(msgResponse(_0x79f5('0x191'),'Failure','entity\x20is\x20undefine'));}if(_[_0x79f5('0x42')](_0x4168c1)&&typeof _0x4168c1!==_0x79f5('0x155')){return _0x2fbaaf(msgResponse(_0x79f5('0x191'),'Failure',_0x79f5('0x192')));}hopperUtils[_0x79f5('0xd3')](_0x3dcfc1,_0x4168c1['reason'],_0x1f9743)[_0x79f5('0x40')](function(_0x3f6714){if(_0x3f6714['additional']==0x1)_0x300b29=!![];switch(_0x4168c1[_0x79f5('0x193')]){case'0':_0x1f9743[_0x79f5('0x194')]+=0x1;_0x3dcfc1[_0x79f5('0x75')]=0x0;_0x3dcfc1['statedesc']=_0x79f5('0x195');_0x3dcfc1['countnosuchnumberretry']+=0x1;_0x3dcfc1[_0x79f5('0xd0')]+=0x1;ami[_0x79f5('0x43')](_0x79f5('0x196'),ut['buildObj'](_0x32f236,_0x79f5('0x197')));_0x4503e4=_0x1f9743[_0x79f5('0x198')];_0x522cdf=_0x1f9743[_0x79f5('0xd2')];hopperUtils[_0x79f5('0xc5')](_0x3dcfc1)[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x113')));if(_0x61816d[_0x79f5('0x199')](0x0,_0x32f236,_0x1f9743)&&!_0x300b29){if(_0x3dcfc1[_0x79f5('0x116')]>=_0x1f9743[_0x79f5('0x18a')]){_0x61816d[_0x79f5('0x11a')](_0x3dcfc1,_0x3b4f10,_0x2fbaaf,_0x79f5('0x19a'));}else{_0x61816d[_0x79f5('0x117')](_0x3dcfc1,_0x3b4f10,_0x2fbaaf,_0x79f5('0x19a'));}}break;case'3':_0x1f9743['outboundNoAnswerCallsDay']+=0x1;_0x3dcfc1[_0x79f5('0x75')]=0x3;_0x3dcfc1[_0x79f5('0xcc')]='NoAnswer';_0x3dcfc1[_0x79f5('0x115')]+=0x1;_0x3dcfc1[_0x79f5('0xd0')]+=0x1;var _0x4f232d=ut[_0x79f5('0x19b')](_0x32f236,_0x1f9743);ami[_0x79f5('0x43')](_0x79f5('0x19c'),_0x4f232d);_0x4503e4=_0x1f9743[_0x79f5('0x183')];_0x522cdf=_0x1f9743['callAdditionalPhoneAfterMin'];hopperUtils[_0x79f5('0xc5')](_0x3dcfc1)['catch'](loggerCatch(_0x79f5('0x19d')));if(_0x61816d[_0x79f5('0x199')](0x3,_0x32f236,_0x1f9743)&&!_0x300b29){if(_0x3dcfc1[_0x79f5('0x115')]>=_0x1f9743['dialNoAnswerMaxRetry']){_0x61816d[_0x79f5('0x11a')](_0x3dcfc1,_0x3b4f10,_0x2fbaaf,_0x79f5('0x19e'));}else{_0x61816d[_0x79f5('0x117')](_0x3dcfc1,_0x3b4f10,_0x2fbaaf,_0x79f5('0x19e'));}}break;case'5':_0x1f9743['outboundBusyCallsDay']+=0x1;_0x3dcfc1[_0x79f5('0x75')]=0x5;_0x3dcfc1[_0x79f5('0xcc')]='Busy';_0x3dcfc1[_0x79f5('0x121')]+=0x1;_0x3dcfc1['countglobal']+=0x1;ami[_0x79f5('0x43')](_0x79f5('0x19f'),ut['buildObj'](_0x32f236,'busy'));_0x4503e4=_0x1f9743[_0x79f5('0x1a0')];_0x522cdf=_0x1f9743[_0x79f5('0xd2')];hopperUtils[_0x79f5('0xc5')](_0x3dcfc1)[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x1a1')));if(_0x61816d[_0x79f5('0x199')](0x5,_0x32f236,_0x1f9743)&&!_0x300b29){if(_0x3dcfc1['countbusyretry']>=_0x1f9743['dialBusyMaxRetry']){_0x61816d[_0x79f5('0x11a')](_0x3dcfc1,_0x3b4f10,_0x2fbaaf,_0x79f5('0x1a2'));}else{_0x61816d[_0x79f5('0x117')](_0x3dcfc1,_0x3b4f10,_0x2fbaaf,'reason\x205\x20busy');}}break;case'8':_0x1f9743[_0x79f5('0x1a3')]+=0x1;_0x3dcfc1[_0x79f5('0x75')]=0x8;_0x3dcfc1[_0x79f5('0xcc')]=_0x79f5('0x1a4');_0x3dcfc1[_0x79f5('0x114')]+=0x1;_0x3dcfc1[_0x79f5('0xd0')]+=0x1;_0x4503e4=_0x1f9743[_0x79f5('0x188')];_0x522cdf=_0x1f9743[_0x79f5('0xd2')];ami[_0x79f5('0x43')]('custom:agentcongestion',ut[_0x79f5('0x10b')](_0x32f236,_0x79f5('0x1a5')));hopperUtils[_0x79f5('0xc5')](_0x3dcfc1)['catch'](loggerCatch(_0x79f5('0x1a6')));if(_0x61816d[_0x79f5('0x199')](0x8,_0x32f236,_0x1f9743)&&!_0x300b29){if(_0x3dcfc1[_0x79f5('0x114')]>=_0x1f9743[_0x79f5('0x187')]){_0x61816d['createStateFinal'](_0x3dcfc1,_0x3b4f10,_0x2fbaaf,_0x79f5('0x1a7'));}else{_0x61816d[_0x79f5('0x117')](_0x3dcfc1,_0x3b4f10,_0x2fbaaf,_0x79f5('0x1a7'));}}break;case'11':_0x1f9743[_0x79f5('0x1a8')]+=0x1;_0x3dcfc1[_0x79f5('0x75')]=0xb;_0x3dcfc1[_0x79f5('0xcc')]=_0x79f5('0xdf');_0x3dcfc1[_0x79f5('0xe2')]+=0x1;_0x3dcfc1[_0x79f5('0xd0')]+=0x1;_0x4503e4=_0x1f9743['dialAbandonedRetryFrequency'];_0x522cdf=_0x1f9743[_0x79f5('0xd2')];hopperUtils['createHistory'](_0x3dcfc1)['catch'](loggerCatch(_0x79f5('0xe6')));if(_0x61816d[_0x79f5('0x199')](0xb,_0x32f236,_0x1f9743)&&!_0x300b29){if(_0x3dcfc1[_0x79f5('0xe2')]>=_0x1f9743[_0x79f5('0x18d')]){_0x61816d[_0x79f5('0x11a')](_0x3dcfc1,_0x3b4f10,_0x2fbaaf,_0x79f5('0x1a9'));}else{_0x61816d[_0x79f5('0x117')](_0x3dcfc1,_0x3b4f10,_0x2fbaaf,'reason\x2011\x20abandoned');}}break;case'20':_0x1f9743[_0x79f5('0x1aa')]+=0x1;_0x3dcfc1[_0x79f5('0x75')]=0x14;_0x3dcfc1[_0x79f5('0xcc')]='AgentReject';_0x3dcfc1[_0x79f5('0x122')]+=0x1;_0x3dcfc1[_0x79f5('0xd0')]+=0x1;_0x4503e4=_0x1f9743[_0x79f5('0x190')];_0x522cdf=_0x1f9743[_0x79f5('0xd2')];ami[_0x79f5('0x43')]('custom:agentreject',ut[_0x79f5('0x10b')](_0x32f236,_0x79f5('0x1ab')));hopperUtils['createHistory'](_0x3dcfc1)['catch'](loggerCatch(_0x79f5('0x1ac')));if(_0x61816d['checkRetriveMax'](0x14,_0x32f236,_0x1f9743)&&!_0x300b29){if(_0x3dcfc1[_0x79f5('0x122')]>=_0x1f9743[_0x79f5('0x18f')]){_0x61816d[_0x79f5('0x11a')](_0x3dcfc1,_0x3b4f10,_0x2fbaaf,_0x79f5('0x1ad'));}else{_0x61816d[_0x79f5('0x117')](_0x3dcfc1,_0x3b4f10,_0x2fbaaf,'reason\x2020\x20agentreject');}}break;default:_0x1f9743[_0x79f5('0x12b')]+=0x1;_0x3dcfc1[_0x79f5('0x75')]=0xc;_0x3dcfc1[_0x79f5('0xcc')]=_0x4168c1[_0x79f5('0x193')];_0x4503e4=_0x1f9743[_0x79f5('0x190')];_0x522cdf=_0x1f9743[_0x79f5('0xd2')];hopperUtils[_0x79f5('0xc5')](_0x3dcfc1)['catch'](loggerCatch('[syncAgentComplete][createHistory][?]'));if(_0x61816d[_0x79f5('0x199')](_0x4168c1['reason'],_0x32f236,_0x1f9743)&&!_0x300b29){if(_0x3dcfc1[_0x79f5('0x121')]+_0x3dcfc1[_0x79f5('0x114')]+_0x3dcfc1[_0x79f5('0x115')]+_0x3dcfc1[_0x79f5('0x116')]+_0x3dcfc1[_0x79f5('0xcf')]+_0x3dcfc1[_0x79f5('0xe2')]+_0x3dcfc1[_0x79f5('0x111')]+_0x3dcfc1[_0x79f5('0x122')]>=_0x1f9743[_0x79f5('0x123')]){_0x61816d['stateGlobal'](_0x3dcfc1,_0x3b4f10,_0x2fbaaf,_0x4168c1[_0x79f5('0x193')]);}else{_0x61816d[_0x79f5('0x11a')](_0x3dcfc1,_0x3b4f10,_0x2fbaaf,_0x4168c1[_0x79f5('0x193')]);}}}})[_0x79f5('0x40')](function(){if(_0x300b29){hopperUtils['swapAdditionalPhones'](_0x3dcfc1,_0x4503e4,_0x522cdf)[_0x79f5('0x40')](function(){return _0x3b4f10(0x1);});}});});};Dialer['prototype'][_0x79f5('0x117')]=function(_0x57c557,_0x21f059,_0x44a563,_0x211d6b){var _0x353fc2=new Final(_0x57c557);_0x353fc2[_0x79f5('0x75')]=0xf;_0x353fc2[_0x79f5('0xcc')]='Global';this[_0x79f5('0x11a')](_0x353fc2,_0x21f059,_0x44a563,_0x211d6b);};Dialer[_0x79f5('0x8e')][_0x79f5('0x11a')]=function(_0x2b1f8e,_0x56e4c9,_0x49feb2,_0x48f35d){hopperUtils[_0x79f5('0xc7')](_0x2b1f8e)[_0x79f5('0x40')](function(){return _0x56e4c9(msgResponse(_0x79f5('0x191'),_0x79f5('0x1ae'),_0x48f35d));})[_0x79f5('0xa1')](function(){return _0x49feb2(msgResponse(_0x79f5('0x1af'),_0x79f5('0x95'),_0x79f5('0x1b0')));});};Dialer[_0x79f5('0x8e')][_0x79f5('0x9')]=function(_0x5ef334){var _0x15d7ea=_0x5ef334[_0x79f5('0x1b1')]/0x64;var _0x1791ca=_0x5ef334['outboundDropCallsDayTimeout']/(_0x5ef334[_0x79f5('0xcb')]+_0x5ef334[_0x79f5('0xc0')]);var _0x121c3f=Math[_0x79f5('0x1b2')](_0x5ef334[_0x79f5('0x1b3')]*(_0x5ef334[_0x79f5('0x1b4')]/0x64));var _0x2195ff=Math['round'](_0x5ef334[_0x79f5('0x1b3')]*(_0x5ef334['predictiveIntervalMinThreshold']/0x64));var _0xc88d95=_0x5ef334[_0x79f5('0x133')]+_0x5ef334[_0x79f5('0x135')];var _0x313965=Math[_0x79f5('0x1b5')](_0x5ef334['erlangCalls']*_0x5ef334[_0x79f5('0x63')]*_0x5ef334[_0x79f5('0x1b6')]*_0x5ef334[_0x79f5('0x1b7')]);if(_[_0x79f5('0x42')](_0x5ef334[_0x79f5('0x29')])){if(!_['isUndefined'](_0x5ef334[_0x79f5('0x28')])){_0x5ef334['startPredictive']=undefined;loggerPredictive[_0x79f5('0x6d')](_0x79f5('0x1b8'),'check\x20predictive\x20is\x20not\x20undefine');}if(!_[_0x79f5('0x42')](_0x5ef334[_0x79f5('0x68')])){loggerPredictive['error'](_0x79f5('0x1b8'),_0x79f5('0x1b9'));clearInterval(_0x5ef334[_0x79f5('0x68')]);_0x5ef334[_0x79f5('0x68')]=undefined;}_0x5ef334[_0x79f5('0x29')]=moment()[_0x79f5('0x48')](_0x79f5('0xbe'));loggerPredictive[_0x79f5('0x4b')](_0x5ef334[_0x79f5('0x66')],_0x79f5('0x1ba'),_0x5ef334[_0x79f5('0x29')]);this[_0x79f5('0xb0')](_0x5ef334,0x1);}else if(ifInterval(_0x5ef334[_0x79f5('0x1bb')],_0x5ef334[_0x79f5('0x29')])){this[_0x79f5('0xb0')](_0x5ef334,0x1);loggerPredictiveCalls[_0x79f5('0x4b')]('[startMethodPredictive][StartProgressive][Loop]',_0x5ef334[_0x79f5('0x29')],_0x5ef334[_0x79f5('0x66')]);_0x5ef334[_0x79f5('0x5d')]=0x0;_0x5ef334[_0x79f5('0x1bc')]=0x0;}else if(_0x15d7ea<_0x1791ca&&_0x5ef334[_0x79f5('0x1bd')]==='dropRate'){clearPredictiveAttributes(_0x5ef334);loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x1be'),_0x79f5('0x1bf'),_0x1791ca,_0x79f5('0x29'),_0x5ef334[_0x79f5('0x66')]);}else if(_0x313965<_0x5ef334['predictiveIntervalErlangCallsDroppedCalls']&&_0x5ef334['dialPredictiveOptimization']==='dropRate'){clearPredictiveAttributes(_0x5ef334);loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x1c0'),_0x79f5('0x1c1'),_0x313965,'Drop\x20in\x20this\x20interval',_0x5ef334['predictiveIntervalErlangCallsDroppedCalls'],_0x79f5('0x29'),_0x5ef334[_0x79f5('0x66')]);}else if(!ifInterval(_0x5ef334[_0x79f5('0x1bb')],_0x5ef334[_0x79f5('0x29')])&&_[_0x79f5('0x42')](_0x5ef334[_0x79f5('0x28')])&&!_[_0x79f5('0x42')](_0x5ef334[_0x79f5('0x29')])){_0x5ef334[_0x79f5('0x28')]=moment()[_0x79f5('0x48')](_0x79f5('0xbe'));loggerPredictive[_0x79f5('0x4b')](_0x5ef334[_0x79f5('0x66')],'started\x20in\x20predictive\x20at',_0x5ef334['startPredictive']);hopperUtils[_0x79f5('0x1c2')](_0x5ef334[_0x79f5('0x1bb')])[_0x79f5('0x40')](this[_0x79f5('0x1c3')](_0x5ef334))[_0x79f5('0x40')](mergeDataErlangB(_0x5ef334))['then'](this[_0x79f5('0x1c4')](_0x5ef334))['catch'](loggerCatchPredictive(_0x79f5('0x1c5'),_0x5ef334));}else if(!ifInterval(_0x5ef334[_0x79f5('0x1bb')],_0x5ef334[_0x79f5('0x28')])){_0x5ef334['predictiveIntervalErlangCallsDroppedCalls']=0x0;_0x5ef334[_0x79f5('0x28')]=moment()[_0x79f5('0x48')]('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive[_0x79f5('0x4b')](_0x5ef334['name'],_0x79f5('0x1c6'),_0x5ef334[_0x79f5('0x28')]);clearInterval(_0x5ef334[_0x79f5('0x68')]);_0x5ef334[_0x79f5('0x68')]=undefined;hopperUtils[_0x79f5('0x1c2')](_0x5ef334[_0x79f5('0x1bb')])['then'](this[_0x79f5('0x1c3')](_0x5ef334))['then'](mergeDataErlangB(_0x5ef334))['then'](this[_0x79f5('0x1c4')](_0x5ef334))[_0x79f5('0xa1')](loggerCatchPredictive(_0x79f5('0x1c7'),_0x5ef334));}else if(_0x5ef334[_0x79f5('0x1b3')]&&_0xc88d95<_0x5ef334['predictiveIntervalAvailable']-_0x2195ff){clearPredictiveAttributes(_0x5ef334);loggerPredictive[_0x79f5('0x4b')](_0x5ef334[_0x79f5('0x66')],_0x79f5('0x1c8'),_0xc88d95,_0x79f5('0x1c9'),_0x5ef334[_0x79f5('0x1b3')],'-',_0x2195ff,'=',_0x5ef334[_0x79f5('0x1b3')]-_0x2195ff,')');}else if(_0x5ef334[_0x79f5('0x1b3')]&&_0xc88d95>_0x5ef334[_0x79f5('0x1b3')]+_0x121c3f){clearPredictiveAttributes(_0x5ef334);loggerPredictive[_0x79f5('0x4b')](_0x5ef334['name'],_0x79f5('0x1c8'),_0xc88d95,')\x20are\x20more\x20than\x20threshold\x20(',_0x5ef334[_0x79f5('0x1b3')],'+',_0x121c3f,'=',_0x5ef334['predictiveIntervalAvailable']+_0x121c3f,')');}};Dialer[_0x79f5('0x8e')]['getDataPredictive']=function(_0x35a3e1){var _0x55dc0c=this;return function(_0x43b948){return new Promise(function(_0xd20625,_0x58e5da){_[_0x79f5('0xf1')](_0x35a3e1,_0x43b948[0x0]);if(checkGetDataPredictive(_0x43b948[0x0])){var _0x699b84=_0x35a3e1[_0x79f5('0x1b3')]=_0x35a3e1[_0x79f5('0x135')]+_0x35a3e1[_0x79f5('0x133')];var _0x447a2d=_0x35a3e1[_0x79f5('0x1bb')]*0x3c;var _0x57587a=_0x43b948[0x0][_0x79f5('0x58')]+_0x43b948[0x0]['predictiveIntervalAvgHoldtime'];var _0x562b20=(_0x43b948[0x0][_0x79f5('0x50')]+_0x43b948[0x0][_0x79f5('0x52')]+_0x43b948[0x0]['predictiveIntervalDroppedCallsCallersExit'])/_0x43b948[0x0][_0x79f5('0x4e')];_0x35a3e1[_0x79f5('0x1b6')]=_0x562b20>0x0?_0x562b20:0x1;switch(_0x35a3e1[_0x79f5('0x1bd')]){case _0x79f5('0x1ca'):var _0x3b6701=_0x35a3e1[_0x79f5('0x1b1')]/0x64;return _0x55dc0c[_0x79f5('0x1cb')](_0x699b84,_0x447a2d,_0x57587a,_0x562b20,_0x3b6701)['then'](function(_0x8f4fa1){return _0xd20625(_0x8f4fa1);});case _0x79f5('0x1cc'):var _0x295ef5=_0x35a3e1['dialPredictiveOptimizationPercentage']/0x64;return _0x55dc0c['busyFactor'](_0x699b84,_0x447a2d,_0x57587a,_0x562b20,_0x295ef5)[_0x79f5('0x40')](function(_0x54e675){return _0xd20625(_0x54e675);});default:return _0x58e5da(msgResponse('[getDataPredictive]',_0x79f5('0x95'),_0x79f5('0x1cd')));}}else{return _0x58e5da(msgResponse(_0x79f5('0x1ce'),_0x79f5('0x95'),_0x79f5('0x1cf')));}});};};Dialer['prototype'][_0x79f5('0x1d0')]=function(_0x17be01){var _0x1e52fc=this;return function(_0x315faa){return new Promise(function(_0xaf6c3c,_0x4d91db){_[_0x79f5('0xf1')](_0x17be01,_0x315faa[0x0]);if(checkGetDataPredictive(_0x315faa[0x0])){loggerPredictive[_0x79f5('0x4b')](JSON[_0x79f5('0x88')](_0x315faa[0x0]));if(_0x17be01[_0x79f5('0x1bd')]===_0x79f5('0x1ca')){return _0x1e52fc[_0x79f5('0x148')](_0x17be01['id'])[_0x79f5('0x40')](function(_0x463cbd){var _0x9a8163=_0x17be01[_0x79f5('0x1d1')]-_0x463cbd[0x0][_0x79f5('0x1d2')];var _0x5b1742=_0x17be01[_0x79f5('0x1bb')]*0x3c;var _0x1da8b4=_0x315faa[0x0][_0x79f5('0x58')]+_0x315faa[0x0][_0x79f5('0x56')];var _0x1976fb=(_0x315faa[0x0]['predictiveIntervalAnsweredCalls']+_0x315faa[0x0][_0x79f5('0x52')]+_0x315faa[0x0][_0x79f5('0x54')])/_0x315faa[0x0][_0x79f5('0x4e')];var _0x4fc387=_0x17be01['dialPredictiveOptimizationPercentage']/0x64;_0x17be01[_0x79f5('0x1d3')]=_0x463cbd[0x0][_0x79f5('0x1d2')]||0x0;_0x17be01[_0x79f5('0x1b6')]=_0x1976fb>0x0?_0x1976fb:0x1;return _0x1e52fc[_0x79f5('0x1cb')](_0x9a8163,_0x5b1742,_0x1da8b4,_0x1976fb,_0x4fc387);})['then'](function(_0x2a8c2c){return _0xaf6c3c(_0x2a8c2c);})['catch'](function(_0x4e9b50){return _0x4d91db(msgResponse(_0x79f5('0x1d4'),'Failure',JSON[_0x79f5('0x88')](_0x4e9b50)));});}if(_0x17be01[_0x79f5('0x1bd')]===_0x79f5('0x1cc')){return _0x1e52fc[_0x79f5('0x148')](_0x17be01['id'])[_0x79f5('0x40')](function(_0x31249f){var _0xbbc1f9=_0x17be01[_0x79f5('0x1d1')]-_0x31249f[0x0][_0x79f5('0x1d2')];var _0x280a35=_0x17be01[_0x79f5('0x1bb')]*0x3c;var _0xa6a0de=_0x315faa[0x0][_0x79f5('0x58')]+_0x315faa[0x0][_0x79f5('0x56')];var _0x182110=(_0x315faa[0x0]['predictiveIntervalAnsweredCalls']+_0x315faa[0x0][_0x79f5('0x52')]+_0x315faa[0x0][_0x79f5('0x54')])/_0x315faa[0x0][_0x79f5('0x4e')];var _0x587e00=_0x17be01[_0x79f5('0x1b1')]/0x64;_0x17be01['predictiveIntervalPauses']=_0x31249f[0x0]['outboundQueuePauses']||0x0;_0x17be01['predictiveIntervalHitRate']=_0x182110>0x0?_0x182110:0x1;return _0x1e52fc[_0x79f5('0x1d5')](_0xbbc1f9,_0x280a35,_0xa6a0de,_0x182110,_0x587e00);})[_0x79f5('0x40')](function(_0x454778){return _0xaf6c3c(_0x454778);})['catch'](function(_0x34c2cc){return _0x4d91db(msgResponse(_0x79f5('0x1d4'),_0x79f5('0x95'),JSON[_0x79f5('0x88')](_0x34c2cc)));});}}else{return _0x4d91db(msgResponse(_0x79f5('0x1ce'),'Failure',_0x79f5('0x1cf')));}});};};Dialer[_0x79f5('0x8e')][_0x79f5('0x1c4')]=function(_0x328d47){var _0x28e9ef=this;return function(){var _0x588995=0x0;var _0x4a912e=Math['floor'](_0x328d47[_0x79f5('0x5f')]*0x3e8);if(_0x4a912e>0x0){_0x4a912e=_0x4a912e<0x64?0x64:_0x4a912e;loggerPredictive[_0x79f5('0x4b')](_0x328d47[_0x79f5('0x66')],_0x79f5('0x1d6'),_0x4a912e,'milliseconds');_0x328d47[_0x79f5('0x68')]=setInterval(function(){_0x28e9ef[_0x79f5('0x68')](_0x328d47);loggerPredictiveCalls[_0x79f5('0x4b')](_0x79f5('0x1d7'),_0x588995+=0x1);},_0x4a912e);}else{loggerPredictive['info'](_0x328d47[_0x79f5('0x66')],_0x79f5('0x1d8'));}};};Dialer[_0x79f5('0x8e')]['checkContactBlack']=function(_0x3b8503,_0x37d5ab){var _0x330317=this;return function(_0x1de55a){if(_[_0x79f5('0x4a')](_0x1de55a)){if(_['isNil'](_0x37d5ab[_0x79f5('0x14e')])||!_0x37d5ab[_0x79f5('0x1d9')]){if(_0x3b8503['dialMethod']===_0x79f5('0x8')){_0x3b8503['queueStatusComplete']=_[_0x79f5('0x42')](_0x3b8503['queueStatusComplete'])?!![]:_0x3b8503[_0x79f5('0x77')];var _0x68d087=uuid['v4']();_0x330317[_0x79f5('0x24')][_0x68d087]=new Action(_0x3b8503,_0x37d5ab,_0x68d087);loggerBooked[_0x79f5('0x4b')]('[booked][checkContactBlack]',_0x68d087,'queueStatusComplete:\x20',JSON[_0x79f5('0x88')](_0x3b8503[_0x79f5('0x77')]),'Queue:\x20',_0x3b8503[_0x79f5('0x66')]);if(_0x3b8503[_0x79f5('0x77')]){_0x3b8503[_0x79f5('0x77')]=![];_0x330317['queueBooked'][_0x330317[_0x79f5('0x24')][_0x68d087][_0x79f5('0xba')]]=[];ami['Action']({'actionid':_0x68d087,'action':'queuestatus','queue':_0x3b8503[_0x79f5('0x66')]})[_0x79f5('0xa1')](function(){_0x330317[_0x79f5('0xbc')](_0x3b8503);hopperUtils[_0x79f5('0xfc')]({'active':![],'ContactId':_0x330317[_0x79f5('0x24')][_0x68d087][_0x79f5('0xd7')],'ListId':_0x330317['actions'][_0x68d087][_0x79f5('0xd8')],'VoiceQueueId':_0x330317['actions'][_0x68d087][_0x79f5('0xe5')]||undefined,'CampaignId':_0x330317[_0x79f5('0x24')][_0x68d087]['CampaignId']||undefined})[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x1da')));delete _0x330317[_0x79f5('0x24')][_0x68d087];});}else{loggerBooked[_0x79f5('0x4b')](_0x79f5('0x1db'),JSON[_0x79f5('0x88')](_0x3b8503[_0x79f5('0x77')]),'Queue:\x20',_0x3b8503[_0x79f5('0x66')]);_0x330317[_0x79f5('0xbc')](_0x3b8503);hopperUtils[_0x79f5('0xfc')]({'active':![],'ContactId':_0x330317['actions'][_0x68d087][_0x79f5('0xd7')],'ListId':_0x330317[_0x79f5('0x24')][_0x68d087][_0x79f5('0xd8')],'VoiceQueueId':_0x330317['actions'][_0x68d087]['VoiceQueueId']||undefined,'CampaignId':_0x330317[_0x79f5('0x24')][_0x68d087][_0x79f5('0xd9')]||undefined})[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x1da')));delete _0x330317[_0x79f5('0x24')][_0x68d087];}}else{return _0x330317[_0x79f5('0x154')](_0x3b8503,_0x37d5ab);}}else{if(utils['getSeconds'](undefined,_0x37d5ab['scheduledat'])<_0x3b8503['dialRecallMeTimeout']*0x3c){if(_0x37d5ab['Agent']&&!_0x37d5ab['Agent']['voicePause']){_0x330317[_0x79f5('0x1e')][_0x79f5('0xf3')](_0x37d5ab['id'])[_0x79f5('0x1c')](function(){_0x330317[_0x79f5('0xbc')](_0x3b8503);});}else{hopperUtils[_0x79f5('0x1dc')]({'active':![]},_0x37d5ab['id'],0x1)[_0x79f5('0x1c')](function(){_0x330317[_0x79f5('0xbc')](_0x3b8503);});}}else{_0x3b8503[_0x79f5('0x1dd')]+=0x1;_0x330317['updateOriginated'](_0x3b8503);if(_0x3b8503[_0x79f5('0x1de')]){hopperUtils[_0x79f5('0xfc')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x37d5ab[_0x79f5('0xd7')],'ListId':_0x37d5ab[_0x79f5('0xd8')],'VoiceQueueId':_0x37d5ab[_0x79f5('0xe5')]||undefined,'CampaignId':_0x37d5ab[_0x79f5('0xd9')]||undefined})[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x1df')));hopperUtils[_0x79f5('0xc5')](createObjHistory(_0x3b8503,_0x37d5ab,utils[_0x79f5('0x70')][_0x79f5('0x1e0')],0x17,_0x79f5('0x1e1')))[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x1e2')));}else{_0x330317[_0x79f5('0x10c')](createObjHistory(_0x3b8503,_0x37d5ab,utils[_0x79f5('0x70')][_0x79f5('0x1e3')],0x16,_0x79f5('0x1e4')),_0x79f5('0x1e5'),_0x79f5('0x1e6'));}}}}else{_0x3b8503[_0x79f5('0x1e7')]+=0x1;_0x330317[_0x79f5('0x10c')](createObjHistory(_0x3b8503,_0x37d5ab,utils['CAMPAIGN_STATUS'][_0x79f5('0x1e8')],0xd,_0x79f5('0x1e9')),'[Originate][historyBlacklist]',_0x79f5('0x1ea'));throw _0x79f5('0x1eb');}};};Dialer[_0x79f5('0x8e')][_0x79f5('0x153')]=function(_0x1b5c0a){var _0x5e9fe7=this;var _0x539b63=_0x1b5c0a[_0x79f5('0x1ec')]-_0x1b5c0a[_0x79f5('0x1ed')];emitCampaignSummary(_0x1b5c0a);if(_0x539b63>0x0&&_0x1b5c0a[_0x79f5('0x6c')]==0x0){if(_0x539b63>this[_0x79f5('0x23')]){_0x539b63=this[_0x79f5('0x23')];}_0x1b5c0a['temp']=0x1;hopperUtils['getContactDialerIvr'](_0x1b5c0a,_0x539b63)[_0x79f5('0x40')](function(_0x2bea54){_0x1b5c0a[_0x79f5('0x6c')]=0x0;if(_0x2bea54){if(!utils[_0x79f5('0x1ee')](_0x2bea54)){_0x1b5c0a[_0x79f5('0x6f')]=utils[_0x79f5('0x70')]['NO_AVAILABLE_CONTACTS'];logger['info'](_0x79f5('0x1ef')+_0x1b5c0a[_0x79f5('0x66')]);}else{_0x1b5c0a['originated']+=_0x2bea54['length'];_0x1b5c0a['message']=utils['CAMPAIGN_STATUS'][_0x79f5('0x1f0')];for(var _0x5d4ed1=0x0;_0x5d4ed1<_0x2bea54[_0x79f5('0x9a')];_0x5d4ed1+=0x1){_0x1b5c0a[_0x79f5('0x1f1')]+=0x1;if(_[_0x79f5('0xec')](_0x2bea54[_0x5d4ed1])||_['isNil'](_0x2bea54[_0x5d4ed1][_0x79f5('0x16d')])||_[_0x79f5('0xec')](_0x2bea54[_0x5d4ed1][_0x79f5('0x158')])){_0x5e9fe7[_0x79f5('0x14c')](_0x79f5('0x1f2'),_0x1b5c0a,_0x2bea54[_0x5d4ed1]);}else{hopperUtils['checkIsBlackListIvr'](_[_0x79f5('0x79')](_0x2bea54[_0x5d4ed1],[_0x79f5('0xd9'),_0x79f5('0x158')]))[_0x79f5('0x40')](_0x5e9fe7[_0x79f5('0x1f3')](_0x1b5c0a,_0x2bea54[_0x5d4ed1]))[_0x79f5('0xa1')](_0x5e9fe7['loggerHandler'](_0x79f5('0x1f4'),_0x1b5c0a));}}}}})[_0x79f5('0xa1')](loggerGetContactDialer('[getContactCampaign2]',_0x1b5c0a,_0x539b63));}};Dialer[_0x79f5('0x8e')][_0x79f5('0xb0')]=function(_0x479aae,_0x4a4c64){var _0x37219f=this;var _0x10f3c2=[];if(_0x4a4c64<0x1||_0x479aae['dialMethod']==='booked'){_0x4a4c64=0x1;}var _0xe956a=Math['floor'](_0x479aae[_0x79f5('0x133')]*_0x4a4c64)-_0x479aae[_0x79f5('0x1ed')];if(_0x479aae[_0x79f5('0x1f5')]>0x0){var _0x2eef38=_0x479aae['dialLimitQueue']-_0x479aae[_0x79f5('0x1ed')]-_0x479aae[_0x79f5('0x135')]-_0x479aae[_0x79f5('0x136')];if(_0xe956a>_0x2eef38){_0xe956a=_0x2eef38;}}if(_0xe956a>0x0&&_0x479aae[_0x79f5('0x6c')]==0x0){if(_0x479aae[_0x79f5('0xae')]===_0x79f5('0x8')){_0xe956a=0x1;}if(_0xe956a>this['maxNumberOriginate']){_0xe956a=this['maxNumberOriginate'];}for(var _0x5cc9d0 in this['agents']){if(typeof this['agents'][_0x5cc9d0]!==_0x79f5('0x14a')){if(this[_0x79f5('0x21')][_0x5cc9d0][_0x79f5('0x75')]==='not_inuse'&&this[_0x79f5('0x21')][_0x5cc9d0][_0x79f5('0x8b')]==='reachable'){_0x10f3c2['push'](this['agents'][_0x5cc9d0]['id']);}}}_0x479aae[_0x79f5('0x6c')]=0x1;hopperUtils[_0x79f5('0x1f6')](_0x479aae,_0x10f3c2,_0xe956a)['then'](function(_0x5682cd){_0x479aae[_0x79f5('0x6c')]=0x0;if(_0x5682cd){if(!utils[_0x79f5('0x1ee')](_0x5682cd)){hopperUtils['countReScheduled'](_0x479aae)[_0x79f5('0x40')](sendMessageReschedule(_0x479aae))[_0x79f5('0xa1')](loggerCatch(_0x79f5('0x1f7')));}else{_0x479aae['originated']+=_0x5682cd['length'];_0x479aae[_0x79f5('0x6f')]=_0x479aae[_0x79f5('0xae')]==='booked'?utils[_0x79f5('0x70')]['ACTIVE']:utils[_0x79f5('0x70')][_0x79f5('0x1f0')];for(var _0x372dca=0x0;_0x372dca<_0x5682cd[_0x79f5('0x9a')];_0x372dca+=0x1){if(_[_0x79f5('0xec')](_0x5682cd[_0x372dca])||_[_0x79f5('0xec')](_0x5682cd[_0x372dca][_0x79f5('0x16d')])||_[_0x79f5('0xec')](_0x5682cd[_0x372dca]['phone'])){_0x37219f[_0x79f5('0x14c')]('[actionOriginate]\x20',_0x479aae,_0x5682cd[_0x372dca]);}else{hopperUtils[_0x79f5('0x1f8')](_[_0x79f5('0x79')](_0x5682cd[_0x372dca],[_0x79f5('0xe5'),_0x79f5('0x158')]))[_0x79f5('0x40')](_0x37219f[_0x79f5('0x1f3')](_0x479aae,_0x5682cd[_0x372dca]))[_0x79f5('0xa1')](_0x37219f[_0x79f5('0x1f9')](_0x79f5('0x1f2'),_0x479aae));}}}}})[_0x79f5('0xa1')](loggerGetContactDialer(_0x79f5('0x1fa'),_0x479aae,_0xe956a));}};Dialer[_0x79f5('0x8e')][_0x79f5('0x68')]=function(_0xc48da2){if(_0xc48da2[_0x79f5('0x1f5')]>0x0){var _0x415b13=_0xc48da2[_0x79f5('0x1f5')]-_0xc48da2[_0x79f5('0x1ed')]-_0xc48da2[_0x79f5('0x135')];if(_0x415b13>0x0&&_0xc48da2[_0x79f5('0x6c')]==0x0){this[_0x79f5('0x1fb')](_0xc48da2);}else{loggerPredictiveCalls[_0x79f5('0x4b')](_0x79f5('0x1fc'));}}else{this['tryOriginatePredictive'](_0xc48da2);}};Dialer[_0x79f5('0x8e')][_0x79f5('0x1fb')]=function(_0x2cf3b5){var _0x8341c5=this;var _0x2bef43=[];_0x2cf3b5[_0x79f5('0x1ed')]+=0x1;for(var _0x56e99d in this[_0x79f5('0x21')]){if(typeof this[_0x79f5('0x21')][_0x56e99d]!==_0x79f5('0x14a')){if(this[_0x79f5('0x21')][_0x56e99d][_0x79f5('0x75')]===_0x79f5('0x1fd')&&this[_0x79f5('0x21')][_0x56e99d][_0x79f5('0x8b')]==='reachable'){_0x2bef43[_0x79f5('0x9b')](this[_0x79f5('0x21')][_0x56e99d]['id']);}}}_0x2cf3b5[_0x79f5('0x6c')]=0x1;return this['getContactDialer'](_0x2cf3b5['id'],_0x2bef43,0x1,_0x2cf3b5[_0x79f5('0x1fe')],_0x2cf3b5)[_0x79f5('0x40')](function(_0x3546c7){_0x2cf3b5[_0x79f5('0x6c')]=0x1;if(_0x3546c7){if(!utils[_0x79f5('0x1ee')](_0x3546c7)){utils[_0x79f5('0x6b')](_0x2cf3b5,0x1,0x0);return hopperUtils['countReScheduled'](_0x2cf3b5)[_0x79f5('0x40')](sendMessageReschedule(_0x2cf3b5))[_0x79f5('0xa1')](loggerCatch('[countReScheduled]\x20'));}else{_0x2cf3b5[_0x79f5('0x6f')]=utils['CAMPAIGN_STATUS'][_0x79f5('0x1f0')];if(_[_0x79f5('0xec')](_0x3546c7[0x0])||_[_0x79f5('0xec')](_0x3546c7[0x0][_0x79f5('0x16d')])||_[_0x79f5('0xec')](_0x3546c7[0x0][_0x79f5('0x158')])){_0x8341c5[_0x79f5('0x14c')]('[actionOriginate]\x20',_0x2cf3b5,_0x3546c7[0x0]);}else{return hopperUtils[_0x79f5('0x1f8')](_[_0x79f5('0x79')](_0x3546c7[0x0],[_0x79f5('0xe5'),_0x79f5('0x158')]))[_0x79f5('0x40')](_0x8341c5['checkContactBlack'](_0x2cf3b5,_0x3546c7[0x0]))[_0x79f5('0xa1')](_0x8341c5[_0x79f5('0x1f9')](_0x79f5('0x1ff'),_0x2cf3b5));}}}})['catch'](loggerGetContactDialer(_0x79f5('0x200'),_0x2cf3b5,0x1));};Dialer[_0x79f5('0x8e')][_0x79f5('0x1cb')]=function(_0x234091,_0x339a2f,_0x240d59,_0x376373,_0x50a4f3,_0x8ffb44){loggerPredictive['info'](_0x79f5('0x201'));loggerPredictive[_0x79f5('0x4b')]('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',_0x234091);loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x202'),_0x339a2f);loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x203'),_0x240d59);loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x204'),_0x376373);loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x205'),_0x50a4f3);loggerPredictive['info']('---------------------------');return new Promise(function(_0x90396f,_0x3d2349){if(_0x234091<=0x0||isNaN(_0x234091)){return _0x3d2349(msgResponse('[abandonmentRate]',_0x79f5('0x87'),_0x79f5('0x206')+_0x234091));}if(_0x240d59<=0x0||isNaN(_0x240d59)){return _0x3d2349(msgResponse(_0x79f5('0x207'),_0x79f5('0x87'),_0x79f5('0x208')+_0x240d59));}if(_0x376373<=0x0||isNaN(_0x376373)){return _0x3d2349(msgResponse('[abandonmentRate]',_0x79f5('0x87'),_0x79f5('0x209')+_0x376373));}if(_0x339a2f<=0x0||isNaN(_0x339a2f)){return _0x3d2349(msgResponse(_0x79f5('0x207'),_0x79f5('0x87'),'interval\x20=\x20'+_0x339a2f));}if(_0x50a4f3<=0x0||isNaN(_0x50a4f3)){return _0x3d2349(msgResponse('[abandonmentRate]',_0x79f5('0x87'),_0x79f5('0x20a')+_0x50a4f3));}_0x8ffb44=_0x8ffb44||0x0;var _0x1fd8a8=0x1/_0x240d59;var _0x16b4bb=0x0;var _0x4405c5=0x0;var _0x228f43=0x0;var _0x3b82c6=0x0;for(var _0x52a747=0x0;_0x228f43<_0x50a4f3;_0x52a747+=0x1){_0x4405c5=_0x52a747/_0x339a2f;_0x16b4bb=(_0x376373*_0x4405c5+_0x8ffb44)/_0x1fd8a8;_0x228f43=utils[_0x79f5('0x20b')](_0x16b4bb,_0x234091);_0x3b82c6=_0x16b4bb/_0x234091*(0x1-utils[_0x79f5('0x20b')](_0x16b4bb,_0x234091));}return _0x90396f({'erlangCalls':_0x52a747,'erlangCallToSecond':_0x339a2f/_0x52a747,'erlangAbandonmentRate':_0x228f43,'erlangBusyFactor':_0x3b82c6});});};Dialer[_0x79f5('0x8e')][_0x79f5('0x1d5')]=function(_0x35f46d,_0x3d8dc0,_0x4b9d5d,_0x589c04,_0x6f6ca5,_0x516a47){loggerPredictive['info']('----\x20Agent\x20Busy\x20Factor\x20----');loggerPredictive['info'](_0x79f5('0x20c'),_0x35f46d);loggerPredictive[_0x79f5('0x4b')](_0x79f5('0x202'),_0x3d8dc0);loggerPredictive[_0x79f5('0x4b')]('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',_0x4b9d5d);loggerPredictive[_0x79f5('0x4b')]('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',_0x589c04);loggerPredictive[_0x79f5('0x4b')]('Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x6f6ca5);loggerPredictive['info']('---------------------------');return new Promise(function(_0x9b71bc,_0x4b8c3d){if(_0x35f46d<=0x0||isNaN(_0x35f46d)){return _0x4b8c3d(msgResponse(_0x79f5('0x20d'),'Error',_0x79f5('0x206')+_0x35f46d));}if(_0x4b9d5d<=0x0||isNaN(_0x4b9d5d)){return _0x4b8c3d(msgResponse(_0x79f5('0x20d'),'Error',_0x79f5('0x208')+_0x4b9d5d));}if(_0x589c04<=0x0||isNaN(_0x589c04)){return _0x4b8c3d(msgResponse(_0x79f5('0x20d'),_0x79f5('0x87'),'p\x20=\x20'+_0x589c04));}if(_0x3d8dc0<=0x0||isNaN(_0x3d8dc0)){return _0x4b8c3d(msgResponse(_0x79f5('0x20d'),_0x79f5('0x87'),'interval\x20=\x20'+_0x3d8dc0));}if(_0x6f6ca5<=0x0||isNaN(_0x6f6ca5)){return _0x4b8c3d(msgResponse(_0x79f5('0x20d'),_0x79f5('0x87'),_0x79f5('0x20e')+_0x6f6ca5));}_0x516a47=_0x516a47||0x0;var _0x4fe35f=0x1/_0x4b9d5d;var _0x40255c=0x0;var _0x6c6faa=0x0;var _0xb44b53=0x0;var _0x1096ac=0x0;for(var _0x16a7a2=0x0;_0x1096ac<_0x6f6ca5;_0x16a7a2+=0x1){_0x6c6faa=_0x16a7a2/_0x3d8dc0;_0x40255c=(_0x589c04*_0x6c6faa+_0x516a47)/_0x4fe35f;_0xb44b53=utils[_0x79f5('0x20b')](_0x40255c,_0x35f46d);_0x1096ac=_0x40255c/_0x35f46d*(0x1-utils[_0x79f5('0x20b')](_0x40255c,_0x35f46d));}return _0x9b71bc({'erlangCalls':_0x16a7a2,'erlangCallToSecond':_0x3d8dc0/_0x16a7a2,'erlangAbandonmentRate':_0xb44b53,'erlangBusyFactor':_0x1096ac});});};module[_0x79f5('0x20f')]=Dialer;