Built motion from commit c738b9ac.|2.6.25
[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 _0x4c34=['push','OVERTIME_GLOBAL_INTERVAL','OVERTIME_INTERVAL','[ifTime][promiseAll]','Global:\x20','\x20Interval\x20is\x20overtime:\x20','Timezone:\x20','resetActiveCalls','syncCampaigns','dialGlobalInterval','dialTimezone','launchHandleIvr','[syncCampaigns]','checkDialMethod','dialMethod','progressive','handlePower','power','dialPowerLevel','booked','silly','Dialer::ifTime()','Voice\x20Queue\x20%s\x20$s','intervalIftime','isGlobal','AMI\x20IfTime','queue','ivr','updateOriginated','answertime','YYYY-MM-DD\x20HH:mm:ss','uniqueid','outboundAnswerCallsDay','reason','agent','agiafterat','dialAgiAfterHangupAgent','createHistory','[syncAgentComplete][createHistory]','moveContactManagedDialer','syncQueueCallerAbandon','droptime','getSeconds','responsetime','dialQueueTimeout','outboundDropCallsDayTimeout','predictiveIntervalErlangCallsDroppedCalls','Drop','dropreason','dialQueueProject2','countglobal','dialDropRetryFrequency','callAdditionalPhoneAfterMin','verifyAdditionalPhones','voiceQueue','additional','countdropretry','dialDropMaxRetry','queueCallerAbandonCreateState','rescheduleContact','add','minutes','ContactId','ListId','VoiceQueueId','CampaignId','[rescheduleContact][Drop]','calleridname','calleridnum','swapAdditionalPhones','predictiveIntervalDroppedCallsCallersExit','outboundDropCallsDayCallersExit','Abandoned','CALLEREXIT','countabandonedretry','dialAbandonedRetryFrequency','dialAbandonedMaxRetry','channel','actionid','strategy','roundrobin','paused','agents','stateinterface','locked','rrmemory','isNil','queueBooked','run','idHopper','_rr','unlockRR','[booked][RR]','Agent:\x20','[Catch][Preview][syncQueueStatusComplete]','finally','[booked][RR][finaly]','contactAgent-idHopper:\x20','[booked][unlock2]','[unlock2][syncQueueStatusComplete]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','getQueue','callProgressDetecting','variable','amdstatus','exten','xcally-motion-dialer','dialAMDActive','value','HANGUP','outboundAnswerAgiCallsDay','HangupInAMD','membername','AMD','custom:amd','amd','saveInDb','[syncHangupInAMD][createHistory]','[syncHangupInAMD]','MACHINE','countmachineretry','buildObj','[syncAgentComplete][createHistory][0]','countcongestionretry','countnoanswerretry','countagentrejectretry','dialGlobalMaxRetry','stateGlobal','reason19\x20machine....','dialMachineMaxRetry','createStateFinal','reason\x2019\x20machine....','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','countbusyretry','countnosuchnumberretry','dialMachineRetryFrequency','ivrAnswerCallsDay','[syncHangupIvr][createHistory]','[syncHangupIvr]','dialQueueProject','AGI','cause-txt','[syncAgentComplete]','Unknow','queuesSummary','running','isPreviewCampaign','statusMessage','getQueueCampaignStatusMessage','resolve','startPredictive','available','inUse','[syncQueueSummary]','compareToOutboundQueue','queueSummaryCountersUpdated','updateReportFromOutboundQueue','filter','dialPreviewRecallmeReminder','online','map','Agent','user:%s','user:dialPreviewRecallReminder','checkPreviewRecallReminder','clearZombieChannels','[uniqueid]','[actions]','undefined','No\x20such\x20channel','getVoiceQueueRtPauses','originated','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','loggerHandler','emptyContact','UserId','[emptyContact][createHistory]','[emptyContact]','handlePreviewRecallNotifications','handleIvr','actionOriginate','originate','voiceQueue\x20is\x20undefine','phone','getCaller','\x22agi://%s/square,%s\x22','NONE','isOutboundQueue','\x22%s,%s%s,,,%s\x22','dialQueueOptions','ACTIVE','XMD-AMDINITIALSILENCE','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDGreeting','dialAMDAfterGreetingSilence','XMD-AMDTOTALANALYSISTIME','dialAMDTotalAnalysisTime','XMD-AMDMINWORDLENGTH','dialAMDMinWordLength','dialAMDBetweenWordsSilence','XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','dialAMDMaximumWordLength','XMD-VOICEQUEUEID','XMD-CAMPAIGNID','setXMDContactVariables','Contact','assign','getCallerId','callerid','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','dialOriginateCallerIdNumber','TrunkBackup','XMD-ORIGINATECALLERIDNAME','originatecalleridname','extractCalleridName','dialPrefix','trim','dialCutDigit','SIP/%s/%s%s','from-sip','dialOriginateTimeout','outboundOriginateFailureCallsDay','[originateError]:\x20%s','OriginateError','[originate][error]','originate\x20action\x20Error','checkRetriveMax','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialBusyMaxRetry','[rescheduleContact]\x20[Busy]','dialCongestionMaxRetry','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','[rescheduleContact][NoSuchNumber]','[rescheduleContact][Abandoned]','[rescheduleContact][Machine]','dialAgentRejectMaxRetry','[rescheduleContact][AgentReject]','object','[callProgressDetecting]','entity\x20is\x20undefine','evt\x20is\x20undefine','outboundNoSuchCallsDay','NoSuchNumber','custom:agentnosuchnumber','nosuchnumber','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','NoAnswer','custom:agentnoanswer','reason\x203\x20ringing\x20no\x20answer','outboundBusyCallsDay','Busy','busy','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','outboundCongestionCallsDay','Congestion','custom:agentcongestion','congestion','[syncAgentComplete][createHistory][8]','reason\x208\x20congestion','outboundAbandonedCallsDay','reason\x2011\x20abandoned','outboundRejectCallsDay','AgentReject','dialAgentRejectRetryFrequency','custom:agentreject','agentreject','[syncAgentComplete][createHistory][20]','reason\x2020\x20agentreject','outboundUnknownCallsDay','[syncAgentComplete][createHistory][?]','Success','[moveContactManagedDialer][0]','contact\x20not\x20moved','dialPredictiveOptimizationPercentage','round','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','talking','floor','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','dialPredictiveInterval','[startMethodPredictive][StartProgressive][Loop]','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','Drop\x20in\x20this\x20interval','started\x20in\x20predictive\x20at','avgHandleTime','getDataPredictive','recalculate\x20predictive\x20at','Predictive\x20for\x20every\x20interval','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20less\x20than\x20threshold\x20(','dialPredictiveOptimization','abandonmentRate','agentBusyFactor','[getDataPredictive]','Unknown\x20Predictive','check\x20failure','loggedIn','outboundQueuePauses','predictiveIntervalPauses','[CatchErlangB]','startMethodPredictive','one\x20call\x20every:','milliseconds','[handlePredictive]','checkContactBlack','queueStatusComplete:\x20','Queue:\x20','queuestatus','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','voicePause','unlockContact','outboundReCallsDay','dialRecallInQueue','QUEUE_RECALL','RecallInQueue','[Originate][HistoryDialRecallInQueue][historyCatch]','RECALL_TIMEOUT','RecallFailedTimeout','[Originate][HistoryRecallClose][historyCatch]','BLACKLIST','Blacklist','inBlackList','limitCalls','temp','checkContactEmpty','NO_AVAILABLE_CONTACTS','[getContactCampaign2][Empty]','RUNNING','[actionOriginate]\x20','checkIsBlackListIvr','[actionOriginateIvr]\x20','[getContactCampaign2]','dialLimitQueue','pTalking','not_inuse','reachable','getContactDialer','countReScheduled','[countReScheduled]\x20','checkIsBlackList','[handlePredictive][limitChannel]','tryOriginatePredictive','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','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','[abandonmentRate]','m\x20=\x20','Ts\x20=\x20','p\x20=\x20','interval\x20=\x20','Amax\x20=\x20','erlangb','busyFactor','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','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','Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[busyFactor]','Umin\x20=\x20','exports','util','uuid','moment','ioredis','./utils','./utils/hopper','../preview/util/util','../../../config/environment/','../../../config/logger','dialer','predictive','predictiveCalls','syncQueueSummary','../ami','redis','localhost','socket.io-emitter','../rpc/voiceQueueRt','../rpc/interval','./models/queueCallerAbandon','./models/hangup','env','127.0.0.1','prototype','enqueue','tail','sequence','preview','voiceQueues','campaigns','trunks','maxNumberOriginate','actions','contactsId','uniqueId','ivrOriginated','queueBookedRR','agentconnect','syncAgentConnect','bind','originateresponse','syncOriginateResponse','syncAgentComplete','custom:queuesummary','syncQueueSummaryComplete','hangup','syncHangup','newexten','syncNewExten','varset','syncVarSet','syncQueueMember','loopCampaigns','loopClearZombieChannels','getSettings','then','emit','type','outbound','debug','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','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','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','AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgTalktime','---------------------------','predictiveIntervalTotalCalls','isUndefined','predictiveIntervalAvgHoldtime','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','History\x20information\x20are\x20empty','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','erlangAbandonmentRate','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangBusyFactor','merge','startProgressive','startProgressive\x20value\x20cleared','name','startPredictive\x20value\x20cleared','handlePredictive','handlePredictive\x20interval\x20cleared','error','stack','inspect','checkContactLowerLimitOriginate','contactsRescheduled','message','CAMPAIGN_STATUS','CONTACTS_RESCHEDULED','[getContactDialer2][Empty]','state','statedesc','endtime','starttime','[unlockQueueStatus][undefined]','queueStatusComplete','stringify','pick','Interval','\x20INTERVAL_IS_NULL','NULL_INTERVAL','Intervals','isIVRCampaignActive','INACTIVE','\x20NOT\x20Active','isIVRCampaign','format','campaign:ivr:%s','campaign:save','sendMessageOneNotActive','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','is\x20not\x20active','DISACTIVED','[ifTime][Action]','Error','active','SIP/%s','status','unmonitored','checkIsTrunkReachable','isTrunkReachable','Trunk','TRUNK_NOT_REACHABLE','\x20trunk\x20is\x20not\x20reachable','checkIfTime','ifTimeIvr','ifTime','Failure','\x20Intervals\x20is\x20null\x20','EMPTY_INTERVAL','\x20Intervals\x20is\x20empty\x20','timezones','\x20Timezone\x20unknow\x20','isArray','length','Action','command','iftime\x20%s,%s','content','indexOf','true','catch'];(function(_0x31ea27,_0x5da0af){var _0x39a12b=function(_0x2a44aa){while(--_0x2a44aa){_0x31ea27['push'](_0x31ea27['shift']());}};_0x39a12b(++_0x5da0af);}(_0x4c34,0x186));var _0x44c3=function(_0x3f1647,_0x11e8d8){_0x3f1647=_0x3f1647-0x0;var _0x34b580=_0x4c34[_0x3f1647];return _0x34b580;};'use strict';var util=require(_0x44c3('0x0'));var _=require('lodash');var uuid=require(_0x44c3('0x1'));var moment=require(_0x44c3('0x2'));var rr=require('rr');var Redis=require(_0x44c3('0x3'));var utils=require(_0x44c3('0x4'));var hopperUtils=require(_0x44c3('0x5'));var ut=require(_0x44c3('0x6'));var config=require(_0x44c3('0x7'));var logger=require(_0x44c3('0x8'))(_0x44c3('0x9'));var loggerBooked=require(_0x44c3('0x8'))('booked');var loggerPredictive=require(_0x44c3('0x8'))(_0x44c3('0xa'));var loggerPredictiveCalls=require(_0x44c3('0x8'))(_0x44c3('0xb'));var loggerSyncQueueSummary=require(_0x44c3('0x8'))(_0x44c3('0xc'));var ami=require(_0x44c3('0xd'));config['redis']=_['defaults'](config[_0x44c3('0xe')],{'host':_0x44c3('0xf'),'port':0x18eb});var io=require(_0x44c3('0x10'))(new Redis(config[_0x44c3('0xe')]));var cmHopper=require('../rpc/cmHopper');var voiceQueueRt=require(_0x44c3('0x11'));var RpcSetting=require('../rpc/setting');var Interval=require(_0x44c3('0x12'));var Action=require('./models/action');var History=require('./models/history');var Final=require('./models/final');var AgentComplete=require('./models/agentComplete');var QueueCallerAbandon=require(_0x44c3('0x13'));var Hangup=require(_0x44c3('0x14'));var ipAgi=process[_0x44c3('0x15')]['XCALLY_IP_AGI']||_0x44c3('0x16');var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence[_0x44c3('0x17')][_0x44c3('0x18')]=function(_0x19b0f4){this['tail']=this['tail']?this[_0x44c3('0x19')]['finally'](_0x19b0f4):_0x19b0f4();};function Dialer(_0x12f2f1,_0x356590){this[_0x44c3('0x1a')]=new Sequence();this[_0x44c3('0x1b')]=_0x356590;this[_0x44c3('0x1c')]=_0x12f2f1[_0x44c3('0x1c')];this[_0x44c3('0x1d')]=_0x12f2f1[_0x44c3('0x1d')];this['agents']=_0x12f2f1['agents'];this['trunks']=_0x12f2f1[_0x44c3('0x1e')];this[_0x44c3('0x1f')]=config['maxNumberOriginate']||0x2;this['channels']={};this[_0x44c3('0x20')]={};this[_0x44c3('0x21')]={};this[_0x44c3('0x22')]={};this['optionPredictive']={};this['startPredictive']={};this['startProgressive']={};this[_0x44c3('0x23')]={};this['queueBooked']={};this[_0x44c3('0x24')]={};this['queuesSummary']={};ami['on'](_0x44c3('0x25'),this[_0x44c3('0x26')][_0x44c3('0x27')](this));ami['on']('queuecallerabandon',this['syncQueueCallerAbandon'][_0x44c3('0x27')](this));ami['on'](_0x44c3('0x28'),this[_0x44c3('0x29')][_0x44c3('0x27')](this));ami['on']('agentcomplete',this[_0x44c3('0x2a')][_0x44c3('0x27')](this));ami['on'](_0x44c3('0x2b'),this[_0x44c3('0xc')][_0x44c3('0x27')](this));ami['on']('custom:queuesummarycomplete',this[_0x44c3('0x2c')][_0x44c3('0x27')](this));ami['on'](_0x44c3('0x2d'),this[_0x44c3('0x2e')][_0x44c3('0x27')](this));ami['on'](_0x44c3('0x2f'),this[_0x44c3('0x30')][_0x44c3('0x27')](this));ami['on'](_0x44c3('0x31'),this[_0x44c3('0x32')][_0x44c3('0x27')](this));ami['on']('queuemember',this[_0x44c3('0x33')][_0x44c3('0x27')](this));ami['on']('queuestatuscomplete',this['syncQueueStatusComplete'][_0x44c3('0x27')](this));this[_0x44c3('0x34')]();this[_0x44c3('0x35')]();RpcSetting[_0x44c3('0x36')]()[_0x44c3('0x37')](function(_0x3c10ef){previewRecallmeReminderInterval=_0x3c10ef['previewRecallmeReminderInterval'];});}function isNotNull(_0x558bdf){return _0x558bdf!==null&&!_['isUndefined'](_0x558bdf);}function msgResponse(_0x6379a8,_0x641003,_0x264167){return{'action':_0x6379a8,'response':_0x641003,'message':_0x264167,'stack':_0x264167};}function emit(_0x580c4e,_0x3433ee,_0x40a87a){io['to'](_0x580c4e)[_0x44c3('0x38')](_0x3433ee,_0x40a87a);}function emitOutboundVoiceQueueSummary(_0x168f81){if(_0x168f81[_0x44c3('0x39')]===_0x44c3('0x3a')){logger[_0x44c3('0x3b')](_0x44c3('0x3c'),util['inspect'](_0x168f81,{'showHidden':![],'depth':null}));emit(util['format']('voice:queue:%s',_0x168f81['name']),_0x44c3('0x3d'),_0x168f81);}}function checkGetDataPredictive(_0x364098){if(isNotNull(_0x364098)&&!_[_0x44c3('0x3e')](_0x364098)){loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x40'));loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x41'),_0x364098['predictiveIntervalTotalCalls']);loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x42'),_0x364098[_0x44c3('0x43')]);loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x44'),_0x364098[_0x44c3('0x45')]);loggerPredictive[_0x44c3('0x3f')]('Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x364098['predictiveIntervalDroppedCallsCallersExit']);loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x46'),_0x364098['predictiveIntervalAvgHoldtime']);loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x47'),_0x364098[_0x44c3('0x48')]);loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x49'));if(_0x364098[_0x44c3('0x4a')]>0x0){if(!_[_0x44c3('0x4b')](_0x364098['predictiveIntervalAvgTalktime'])&&_0x364098[_0x44c3('0x48')]>0x0){return!![];}loggerPredictive[_0x44c3('0x3f')]('Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive');if(!_[_0x44c3('0x4b')](_0x364098['predictiveIntervalAvgHoldtime'])&&_0x364098[_0x44c3('0x4c')]>0x0){return!![];}loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x4d'));}else{loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x4e'));}}else{loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x4f'));}return![];}function mergeDataErlangB(_0x15cc31){return function(_0x356b46){loggerPredictive['info']('---------\x20ErlangB\x20---------');loggerPredictive['info']('Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x356b46[_0x44c3('0x50')]);loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x51'),_0x356b46[_0x44c3('0x52')]);loggerPredictive['info'](_0x44c3('0x53'),_0x356b46[_0x44c3('0x54')]);loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x55'),_0x356b46[_0x44c3('0x56')]);loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x53'),_0x356b46[_0x44c3('0x54')]);loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x49'));_[_0x44c3('0x57')](_0x15cc31,_0x356b46);};}function ifInterval(_0x113d36,_0x2b72ed){if(_[_0x44c3('0x4b')](_0x2b72ed)){return![];}return utils['getSeconds'](undefined,_0x2b72ed)<_0x113d36*0x3c;}function clearPredictiveAttributes(_0x28e747){if(_0x28e747[_0x44c3('0x58')]){_0x28e747[_0x44c3('0x58')]=undefined;loggerPredictive[_0x44c3('0x3b')](_0x28e747['name'],_0x44c3('0x59'));}if(_0x28e747['startPredictive']){_0x28e747['startPredictive']=undefined;loggerPredictive[_0x44c3('0x3b')](_0x28e747[_0x44c3('0x5a')],_0x44c3('0x5b'));}if(_0x28e747[_0x44c3('0x5c')]){clearInterval(_0x28e747[_0x44c3('0x5c')]);_0x28e747[_0x44c3('0x5c')]=undefined;loggerPredictive['debug'](_0x28e747[_0x44c3('0x5a')],_0x44c3('0x5d'));}}function loggerCatchPredictive(_0x315cc3,_0x5a6c78){return function(_0x42df1f){loggerPredictive[_0x44c3('0x5e')](_0x5a6c78[_0x44c3('0x5a')],_0x315cc3);loggerPredictive['error'](_0x42df1f[_0x44c3('0x5f')]);clearPredictiveAttributes(_0x5a6c78);};}function loggerCatch(_0x5b4a16){return function(_0x10d723){logger[_0x44c3('0x5e')](_0x5b4a16,util[_0x44c3('0x60')](_0x10d723,{'showHidden':![],'depth':null}));};}function loggerGetContactDialer(_0x2412c8,_0x2166a3,_0x58bc39){return function(_0x5efcb2){utils[_0x44c3('0x61')](_0x2166a3,_0x58bc39,0x0);_0x2166a3['temp']=0x0;logger[_0x44c3('0x5e')](_0x2412c8,util['inspect'](_0x5efcb2,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x75c93f){return function(_0xdb2b2){if(isNotNull(_0xdb2b2)&&isNotNull(_0xdb2b2[0x0])){if(_0xdb2b2[0x0][_0x44c3('0x62')]>0x0){_0x75c93f[_0x44c3('0x63')]=utils[_0x44c3('0x64')][_0x44c3('0x65')];logger[_0x44c3('0x3f')]('[getContactDialer2][ReScheduled]'+_0x75c93f[_0x44c3('0x5a')],_0xdb2b2[0x0]['contactsRescheduled'],'contacts');}else{_0x75c93f[_0x44c3('0x63')]=utils[_0x44c3('0x64')]['NO_AVAILABLE_CONTACTS'];logger[_0x44c3('0x3f')](_0x44c3('0x66')+_0x75c93f[_0x44c3('0x5a')]);}}};}function createObjHistory(_0x3228f9,_0x42352b,_0x5eb9c9,_0x23cf97,_0x2ffdfe){_0x3228f9['message']=_0x5eb9c9;var _0x279583=new Action(_0x3228f9,_0x42352b);var _0x3e63d6=new History(_0x279583);_0x3e63d6[_0x44c3('0x67')]=_0x23cf97;_0x3e63d6[_0x44c3('0x68')]=_0x2ffdfe;_0x3e63d6[_0x44c3('0x69')]=_0x279583[_0x44c3('0x6a')];return _0x3e63d6;}function unlockQueueStatus(_0x42af14,_0x3ff703){setTimeout(function(){if(_[_0x44c3('0x4b')](_0x42af14['queueStatusComplete'])){loggerBooked[_0x44c3('0x5e')](_0x44c3('0x6b'),_0x3ff703);}_0x42af14[_0x44c3('0x6c')]=!![];loggerBooked[_0x44c3('0x3f')]('[booked][unlockQueueStatus]',_0x3ff703,JSON[_0x44c3('0x6d')](_[_0x44c3('0x6e')](_0x42af14,[_0x44c3('0x5a'),_0x44c3('0x6c')])));},0x1f3);}function checkInterval(_0x3889c3){return function(){if(!isNotNull(_0x3889c3[_0x44c3('0x6f')])){_0x3889c3[_0x44c3('0x63')]=utils[_0x44c3('0x64')]['NULL_INTERVAL'];throw _0x3889c3[_0x44c3('0x5a')]+_0x44c3('0x70');}if(!isNotNull(_0x3889c3['Interval']['Intervals'])){_0x3889c3[_0x44c3('0x63')]=utils[_0x44c3('0x64')][_0x44c3('0x71')];throw _0x3889c3[_0x44c3('0x5a')]+_0x44c3('0x70');}if(!isNotNull(_[_0x44c3('0x3e')](_0x3889c3[_0x44c3('0x6f')][_0x44c3('0x72')]))){_0x3889c3[_0x44c3('0x63')]=utils[_0x44c3('0x64')][_0x44c3('0x71')];throw _0x3889c3[_0x44c3('0x5a')]+_0x44c3('0x70');}};}function checkIsIVRCampaignActive(_0x3f37f2){return function(){if(!utils[_0x44c3('0x73')](_0x3f37f2)){_0x3f37f2['message']=utils[_0x44c3('0x64')][_0x44c3('0x74')];throw _0x3f37f2[_0x44c3('0x5a')]+_0x44c3('0x75');}};}function emitCampaignSummary(_0x3903dc){if(utils[_0x44c3('0x76')](_0x3903dc)){emit(util[_0x44c3('0x77')](_0x44c3('0x78'),_0x3903dc[_0x44c3('0x5a')]),_0x44c3('0x79'),_0x3903dc);}}function loggerCatchQueueSummary(_0x31443c,_0x1cb1f2){return function(_0x2cd27c){clearPredictiveAttributes(_0x1cb1f2);emitCampaignSummary(_0x1cb1f2);loggerSyncQueueSummary[_0x44c3('0x3b')](_0x31443c,util[_0x44c3('0x60')](_0x2cd27c,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x2d910f){if(_0x2d910f[_0x44c3('0x7a')]){if(_0x2d910f['originated']===0x0){_0x2d910f[_0x44c3('0x7a')]=![];_0x2d910f[_0x44c3('0x63')]=utils[_0x44c3('0x64')][_0x44c3('0x74')];loggerSyncQueueSummary[_0x44c3('0x3b')](_0x44c3('0x7b'),_0x2d910f['name'],_0x44c3('0x7c'));}else{_0x2d910f[_0x44c3('0x63')]=utils[_0x44c3('0x64')][_0x44c3('0x7d')];loggerSyncQueueSummary[_0x44c3('0x3b')](_0x44c3('0x7b'),_0x2d910f[_0x44c3('0x5a')],'is\x20disactive');}emitCampaignSummary(_0x2d910f);}}function myreject(_0x335a4f){return function(_0x1b8220){return _0x335a4f(msgResponse(_0x44c3('0x7e'),_0x44c3('0x7f'),JSON[_0x44c3('0x6d')](_0x1b8220)));};}Dialer['prototype']['isTrunkReachable']=function(_0x4d17d9){return!_[_0x44c3('0x4b')](_0x4d17d9)&&_0x4d17d9&&!_[_0x44c3('0x4b')](_0x4d17d9[_0x44c3('0x5a')])&&!_['isUndefined'](_0x4d17d9[_0x44c3('0x80')])&&_0x4d17d9['active']&&(this[_0x44c3('0x1e')][util[_0x44c3('0x77')]('SIP/%s',_0x4d17d9[_0x44c3('0x5a')])]['status']==='reachable'||this[_0x44c3('0x1e')][util['format'](_0x44c3('0x81'),_0x4d17d9[_0x44c3('0x5a')])][_0x44c3('0x82')]===_0x44c3('0x83'));};Dialer[_0x44c3('0x17')][_0x44c3('0x84')]=function(_0xca8e3e){var _0x394fc5=this;return function(){if(!_0x394fc5[_0x44c3('0x85')](_0xca8e3e[_0x44c3('0x86')])){if(!_0x394fc5[_0x44c3('0x85')](_0xca8e3e['TrunkBackup'])){_0xca8e3e['message']=utils[_0x44c3('0x64')][_0x44c3('0x87')];throw _0xca8e3e[_0x44c3('0x5a')]+_0x44c3('0x88');}}};};Dialer[_0x44c3('0x17')][_0x44c3('0x89')]=function(_0x2288bd,_0x411418,_0x1dda35,_0xbdef7c){var _0x5c40fe=this;return function(){var _0x50a429=!![];return _0x5c40fe[_0x44c3('0x8a')](_0x2288bd,_0x411418,_0x1dda35,_0xbdef7c,_0x50a429);};};Dialer[_0x44c3('0x17')]['checkIfTimeIntervals']=function(_0x54ba34,_0xfe8a85,_0x3847c9,_0x2146bd){var _0x1b60fd=this;return function(){var _0x21ec06=![];return _0x1b60fd[_0x44c3('0x8a')](_0x54ba34[_0x44c3('0x72')],_0xfe8a85,_0x3847c9,_0x2146bd,_0x21ec06);};};Dialer[_0x44c3('0x17')][_0x44c3('0x8a')]=function(_0x284067,_0x49d553,_0x12e076,_0x4b6862,_0x509d77){var _0x1b0be4=[];return new Promise(function(_0x294ee3,_0x4c33df){if(!isNotNull(_0x284067)){_0x4b6862[_0x44c3('0x63')]=utils['CAMPAIGN_STATUS'][_0x44c3('0x71')];return _0x4c33df(msgResponse(_0x44c3('0x8b'),_0x44c3('0x8c'),_0x12e076+_0x44c3('0x8d')));}if(_['isEmpty'](_0x284067)){_0x4b6862['message']=utils[_0x44c3('0x64')][_0x44c3('0x8e')];return _0x4c33df(msgResponse(_0x44c3('0x8b'),_0x44c3('0x8c'),_0x12e076+_0x44c3('0x8f')));}if(_0x49d553&&_['isUndefined'](config[_0x44c3('0x90')][_0x49d553])){_0x4b6862[_0x44c3('0x63')]=utils[_0x44c3('0x64')]['UNKNOWN_TIMEZONE'];return _0x4c33df(msgResponse(_0x44c3('0x8b'),_0x44c3('0x8c'),_0x12e076+_0x44c3('0x91')+_0x49d553));}if(_[_0x44c3('0x92')](_0x284067)){for(var _0x5b33a6=0x0;_0x5b33a6<_0x284067[_0x44c3('0x93')];_0x5b33a6+=0x1){_0x1b0be4['push'](ami[_0x44c3('0x94')]({'action':_0x44c3('0x95'),'command':util[_0x44c3('0x77')](_0x44c3('0x96'),_0x284067[_0x5b33a6]['interval'],!_[_0x44c3('0x4b')](config[_0x44c3('0x90')][_0x49d553])?_0x49d553:'')})['then'](function(_0x93ec9e){return _0x93ec9e[_0x44c3('0x97')][_0x44c3('0x98')](_0x44c3('0x99'))>=0x0;})[_0x44c3('0x9a')](myreject(_0x4c33df)));}}else{_0x1b0be4[_0x44c3('0x9b')](ami[_0x44c3('0x94')]({'action':_0x44c3('0x95'),'command':util[_0x44c3('0x77')](_0x44c3('0x96'),_0x284067,!_[_0x44c3('0x4b')](config[_0x44c3('0x90')][_0x49d553])?_0x49d553:'')})[_0x44c3('0x37')](function(_0x25af72){return _0x25af72['content'][_0x44c3('0x98')](_0x44c3('0x99'))>=0x0;})[_0x44c3('0x9a')](myreject(_0x4c33df)));}Promise['all'](_0x1b0be4)['then'](function(_0x42805d){var _0x52f151=_['some'](_0x42805d);if(_0x52f151){return _0x294ee3(_0x52f151);}else{_0x4b6862[_0x44c3('0x63')]=_0x509d77?utils[_0x44c3('0x64')][_0x44c3('0x9c')]:utils[_0x44c3('0x64')][_0x44c3('0x9d')];return _0x4c33df(msgResponse(_0x44c3('0x9e'),_0x44c3('0x8c'),_0x44c3('0x9f')+_0x509d77+'\x20'+_0x12e076+_0x44c3('0xa0')+util[_0x44c3('0x60')](_0x284067,{'showHidden':![],'depth':null})+_0x44c3('0xa1')+_0x49d553));}})[_0x44c3('0x9a')](function(_0x484a41){return _0x4c33df(msgResponse(_0x44c3('0x8b'),_0x44c3('0x8c'),JSON['stringify'](_0x484a41)));});});};Dialer[_0x44c3('0x17')][_0x44c3('0x34')]=function(){var _0x47ed98=this;return cmHopper[_0x44c3('0xa2')]({'active':![]},{'where':{'active':!![]}})[_0x44c3('0x37')](function(){setInterval(function(){_0x47ed98[_0x44c3('0xa3')]();},0x3e8);});};Dialer[_0x44c3('0x17')]['syncCampaigns']=function(){var _0x5e2678=this;var _0x4e298d;for(var _0xa4cb89 in this[_0x44c3('0x1d')]){if(typeof this[_0x44c3('0x1d')][_0xa4cb89]!=='undefined'){_0x4e298d=this['campaigns'][_0xa4cb89];if(utils[_0x44c3('0x76')](_0x4e298d)&&utils[_0x44c3('0x73')](_0x4e298d)){_0x4e298d['sendMessageOneNotActive']=!![];Promise['resolve']()['then'](checkIsIVRCampaignActive(_0x4e298d))[_0x44c3('0x37')](checkInterval(_0x4e298d))[_0x44c3('0x37')](_0x5e2678[_0x44c3('0x84')](_0x4e298d))[_0x44c3('0x37')](_0x5e2678['checkIfTime'](_0x4e298d[_0x44c3('0xa4')],_0x4e298d[_0x44c3('0xa5')],_0x4e298d[_0x44c3('0x5a')],_0x4e298d))['then'](_0x5e2678['checkIfTimeIntervals'](_0x4e298d[_0x44c3('0x6f')],_0x4e298d[_0x44c3('0xa5')],_0x4e298d[_0x44c3('0x5a')],_0x4e298d))['then'](_0x5e2678[_0x44c3('0xa6')](_0x4e298d))['catch'](loggerCatchQueueSummary(_0x44c3('0xa7'),_0x4e298d));}else{notSendMessagesCampaign(_0x4e298d);}}}};Dialer[_0x44c3('0x17')][_0x44c3('0xa8')]=function(_0x4868e7){if(_0x4868e7[_0x44c3('0xa9')]!=='predictive'){clearPredictiveAttributes(_0x4868e7);}switch(_0x4868e7[_0x44c3('0xa9')]){case _0x44c3('0xaa'):this[_0x44c3('0xab')](_0x4868e7,0x1);break;case _0x44c3('0xac'):this[_0x44c3('0xab')](_0x4868e7,_0x4868e7[_0x44c3('0xad')]);break;case _0x44c3('0xa'):this[_0x44c3('0xa')](_0x4868e7);break;case _0x44c3('0xae'):this['handlePower'](_0x4868e7,0x1);break;default:logger[_0x44c3('0x5e')]('Queue',_0x4868e7[_0x44c3('0x5a')],'method\x20not\x20recognized');}};Dialer[_0x44c3('0x17')][_0x44c3('0x8b')]=function(_0x5e2a80,_0x4cd616){var _0x1a7d3f=_0x5e2a80[_0x44c3('0xa5')];var _0x54fa88=_0x4cd616?_0x5e2a80[_0x44c3('0xa4')]:_0x5e2a80[_0x44c3('0x6f')][_0x44c3('0x72')];logger[_0x44c3('0xaf')](_0x44c3('0xb0'),_0x54fa88,_0x1a7d3f,_0x5e2a80[_0x44c3('0x5a')],util['format'](_0x44c3('0xb1'),_0x5e2a80[_0x44c3('0x5a')],_0x5e2a80['id']));var _0x22f183=null;return Interval[_0x44c3('0xb2')](_0x54fa88,_0x1a7d3f)['then'](function(_0x147c8e){if(_0x147c8e===!![]){return _0x147c8e;}else{_0x5e2a80[_0x44c3('0x63')]=_0x4cd616?utils['CAMPAIGN_STATUS']['OVERTIME_GLOBAL_INTERVAL']:utils['CAMPAIGN_STATUS'][_0x44c3('0x9d')];_0x22f183=msgResponse(_0x44c3('0x9e'),_0x44c3('0x8c'),'Global:\x20'+_0x4cd616+'\x20'+_0x5e2a80[_0x44c3('0x5a')]+'\x20Interval\x20is\x20overtime:\x20'+util['inspect'](_0x54fa88,{'showHidden':![],'depth':null})+_0x44c3('0xa1')+_0x1a7d3f);}if(_0x22f183!==null){logger[_0x44c3('0xaf')]('Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:',_0x22f183);_0x22f183[_0x44c3('0xb3')]=_0x4cd616;throw _0x22f183;}})[_0x44c3('0x9a')](function(_0x2c29af){logger[_0x44c3('0x5e')](_0x44c3('0xb4'),_0x2c29af);throw msgResponse(_0x44c3('0x7e'),_0x44c3('0x7f'),util[_0x44c3('0x60')](_0x2c29af,{'showHidden':![],'depth':null}));});};Dialer[_0x44c3('0x17')][_0x44c3('0x26')]=function(_0x4f97aa){if(this[_0x44c3('0x1c')][_0x4f97aa[_0x44c3('0xb5')]]){if(this[_0x44c3('0x22')][_0x4f97aa['uniqueid']]&&this[_0x44c3('0x22')][_0x4f97aa['uniqueid']][_0x44c3('0x39')]!==_0x44c3('0xb6')){this[_0x44c3('0xb7')](this['voiceQueues'][_0x4f97aa[_0x44c3('0xb5')]]);this[_0x44c3('0x22')][_0x4f97aa['uniqueid']][_0x44c3('0xb8')]=moment()[_0x44c3('0x77')](_0x44c3('0xb9'));}}};Dialer[_0x44c3('0x17')][_0x44c3('0x2a')]=function(_0x3e6c42){var _0x4f3fe0=this['uniqueId'][_0x3e6c42[_0x44c3('0xba')]];if(this['voiceQueues'][_0x3e6c42[_0x44c3('0xb5')]]){if(_0x4f3fe0&&_0x4f3fe0[_0x44c3('0x39')]!=='ivr'){delete this[_0x44c3('0x22')][_0x3e6c42[_0x44c3('0xba')]];this['voiceQueues'][_0x3e6c42[_0x44c3('0xb5')]][_0x44c3('0xbb')]+=0x1;var _0x303dd4=new AgentComplete(_0x4f3fe0,_0x3e6c42);if(_0x3e6c42[_0x44c3('0xbc')]===_0x44c3('0xbd')){_0x303dd4[_0x44c3('0xbe')]=this[_0x44c3('0x1c')][_0x3e6c42['queue']]['dialQueueProject2']&&this['voiceQueues'][_0x3e6c42[_0x44c3('0xb5')]][_0x44c3('0xbf')]?moment()[_0x44c3('0x77')](_0x44c3('0xb9')):undefined;}hopperUtils[_0x44c3('0xc0')](_0x303dd4)[_0x44c3('0x9a')](loggerCatch(_0x44c3('0xc1')));hopperUtils[_0x44c3('0xc2')](_0x303dd4)[_0x44c3('0x9a')](loggerCatch('[syncAgentComplete]'));}}};Dialer['prototype'][_0x44c3('0xc3')]=function(_0x4151e9){var _0x36d5ad=this['uniqueId'][_0x4151e9[_0x44c3('0xba')]];var _0x107a89=this;var _0x29d54e=![];var _0x11e0ee;var _0x5e6fb5;if(this[_0x44c3('0x1c')][_0x4151e9['queue']]){if(_0x36d5ad&&_0x36d5ad[_0x44c3('0x39')]!==_0x44c3('0xb6')){delete this[_0x44c3('0x22')][_0x4151e9['uniqueid']];this[_0x44c3('0xb7')](this[_0x44c3('0x1c')][_0x4151e9['queue']]);_0x36d5ad[_0x44c3('0xc4')]=moment()[_0x44c3('0x77')](_0x44c3('0xb9'));var _0xc6d177=new QueueCallerAbandon(_0x36d5ad,_0x4151e9);if(utils[_0x44c3('0xc5')](_0x36d5ad['droptime'],_0x36d5ad[_0x44c3('0xc6')])>=_0x36d5ad[_0x44c3('0xc7')]){this[_0x44c3('0x1c')][_0x4151e9[_0x44c3('0xb5')]]['predictiveIntervalDroppedCallsTimeout']+=0x1;this[_0x44c3('0x1c')][_0x4151e9[_0x44c3('0xb5')]][_0x44c3('0xc8')]+=0x1;this[_0x44c3('0x1c')][_0x4151e9['queue']][_0x44c3('0xc9')]+=0x1;_0xc6d177[_0x44c3('0x67')]=0xa;_0xc6d177['statedesc']=_0x44c3('0xca');_0xc6d177[_0x44c3('0xcb')]='TIMEOUT';_0xc6d177['agiafterat']=this[_0x44c3('0x1c')][_0x4151e9['queue']][_0x44c3('0xcc')]?moment()[_0x44c3('0x77')]('YYYY-MM-DD\x20HH:mm:ss'):undefined;_0xc6d177['countdropretry']+=0x1;_0xc6d177[_0x44c3('0xcd')]+=0x1;_0x11e0ee=this[_0x44c3('0x1c')][_0x4151e9[_0x44c3('0xb5')]][_0x44c3('0xce')];_0x5e6fb5=this['voiceQueues'][_0x4151e9[_0x44c3('0xb5')]][_0x44c3('0xcf')];hopperUtils[_0x44c3('0xd0')](_0xc6d177,_0xc6d177[_0x44c3('0x67')],_0x36d5ad[_0x44c3('0xd1')])[_0x44c3('0x37')](function(_0x242afa){_0x29d54e=_0x242afa[_0x44c3('0xd2')]==0x1;if(_0xc6d177[_0x44c3('0xd3')]>=_0x107a89['voiceQueues'][_0x4151e9[_0x44c3('0xb5')]][_0x44c3('0xd4')]){_0x107a89[_0x44c3('0xd5')](_0xc6d177,_0x242afa['additional']);}else{hopperUtils[_0x44c3('0xd6')]({'active':![],'countdropretry':_0xc6d177[_0x44c3('0xd3')],'scheduledat':moment()[_0x44c3('0xd7')](_0x107a89[_0x44c3('0x1c')][_0x4151e9['queue']]['dialDropRetryFrequency'],_0x44c3('0xd8'))[_0x44c3('0x77')](_0x44c3('0xb9')),'ContactId':_0x36d5ad[_0x44c3('0xd9')],'ListId':_0x36d5ad[_0x44c3('0xda')],'VoiceQueueId':_0x36d5ad[_0x44c3('0xdb')]||undefined,'CampaignId':_0x36d5ad[_0x44c3('0xdc')]||undefined})['catch'](loggerCatch(_0x44c3('0xdd')));var _0x1153ae=new History(_0xc6d177);_0x1153ae[_0x44c3('0x67')]=0xa;_0x1153ae['statedesc']='Drop';_0x1153ae[_0x44c3('0x6a')]=moment()[_0x44c3('0x77')]('YYYY-MM-DD\x20HH:mm:ss');_0x1153ae[_0x44c3('0x69')]=_0x1153ae[_0x44c3('0x6a')];_0x1153ae[_0x44c3('0xde')]=_0xc6d177['calleridname'];_0x1153ae['calleridnum']=_0xc6d177[_0x44c3('0xdf')];hopperUtils[_0x44c3('0xc0')](_0x1153ae)[_0x44c3('0x9a')](loggerCatch('[syncAgentComplete][createHistory][10]'));}})[_0x44c3('0x37')](function(){if(_0x29d54e)hopperUtils[_0x44c3('0xe0')](_0xc6d177,_0x11e0ee,_0x5e6fb5)['then'](function(){return 0x1;});});}else{this['voiceQueues'][_0x4151e9[_0x44c3('0xb5')]][_0x44c3('0xe1')]+=0x1;this['voiceQueues'][_0x4151e9['queue']][_0x44c3('0xe2')]+=0x1;_0xc6d177[_0x44c3('0x67')]=0xb;_0xc6d177[_0x44c3('0x68')]=_0x44c3('0xe3');_0xc6d177[_0x44c3('0xcb')]=_0x44c3('0xe4');_0xc6d177[_0x44c3('0xe5')]+=0x1;_0xc6d177['countglobal']+=0x1;_0x11e0ee=this[_0x44c3('0x1c')][_0x4151e9[_0x44c3('0xb5')]][_0x44c3('0xe6')];_0x5e6fb5=this[_0x44c3('0x1c')][_0x4151e9[_0x44c3('0xb5')]][_0x44c3('0xcf')];hopperUtils[_0x44c3('0xd0')](_0xc6d177,_0xc6d177['state'],_0x36d5ad[_0x44c3('0xd1')])[_0x44c3('0x37')](function(_0x88ef80){if(_0xc6d177[_0x44c3('0xe5')]>=_0x107a89[_0x44c3('0x1c')][_0x4151e9[_0x44c3('0xb5')]][_0x44c3('0xe7')]){_0x107a89[_0x44c3('0xd5')](_0xc6d177,_0x88ef80['additional']);}else{hopperUtils[_0x44c3('0xd6')]({'active':![],'countabandonedretry':_0xc6d177['countabandonedretry'],'scheduledat':moment()[_0x44c3('0xd7')](_0x107a89['voiceQueues'][_0x4151e9[_0x44c3('0xb5')]][_0x44c3('0xe6')],'minutes')[_0x44c3('0x77')](_0x44c3('0xb9')),'ContactId':_0x36d5ad[_0x44c3('0xd9')],'ListId':_0x36d5ad['ListId'],'VoiceQueueId':_0x36d5ad[_0x44c3('0xdb')]||undefined,'CampaignId':_0x36d5ad[_0x44c3('0xdc')]||undefined})['catch'](loggerCatch('[rescheduleContact][Abandoned]'));var _0x556b3c=new History(_0xc6d177);_0x556b3c[_0x44c3('0x67')]=0xb;_0x556b3c[_0x44c3('0x68')]=_0x44c3('0xe3');_0x556b3c[_0x44c3('0x6a')]=moment()[_0x44c3('0x77')]('YYYY-MM-DD\x20HH:mm:ss');_0x556b3c[_0x44c3('0x69')]=_0x556b3c[_0x44c3('0x6a')];_0x556b3c[_0x44c3('0xde')]=_0xc6d177[_0x44c3('0xde')];_0x556b3c[_0x44c3('0xdf')]=_0xc6d177[_0x44c3('0xdf')];hopperUtils[_0x44c3('0xc0')](_0x556b3c)['catch'](loggerCatch('[syncAgentComplete][createHistory][11]'));}})[_0x44c3('0x37')](function(){if(_0x29d54e)hopperUtils[_0x44c3('0xe0')](_0xc6d177,_0x11e0ee,_0x5e6fb5)['then'](function(){return 0x1;});});}}}};Dialer['prototype']['syncNewExten']=function(_0x52b40b){if(this[_0x44c3('0x20')][_0x52b40b[_0x44c3('0xba')]]){this[_0x44c3('0x20')][_0x52b40b['uniqueid']]['channel']=_0x52b40b[_0x44c3('0xe8')];}if(this[_0x44c3('0x22')][_0x52b40b[_0x44c3('0xba')]]){this[_0x44c3('0x22')][_0x52b40b['uniqueid']][_0x44c3('0xe8')]=_0x52b40b[_0x44c3('0xe8')];}};Dialer['prototype'][_0x44c3('0x33')]=function(_0x433339){if(!this['actions'][_0x433339['actionid']]){return;}var _0x4a9667=this[_0x44c3('0x1c')][this[_0x44c3('0x20')][_0x433339[_0x44c3('0xe9')]][_0x44c3('0xb5')]][_0x44c3('0xea')]||'rrmemory';if(_0x4a9667===_0x44c3('0xeb')){if(this[_0x44c3('0x20')][_0x433339[_0x44c3('0xe9')]]&&_['isNil'](this[_0x44c3('0x20')][_0x433339[_0x44c3('0xe9')]]['locked'])&&_0x433339[_0x44c3('0x82')]==='1'&&_0x433339[_0x44c3('0xec')]==='0'){if(this[_0x44c3('0xed')][_0x433339[_0x44c3('0xee')]]){if(!this[_0x44c3('0xed')][_0x433339[_0x44c3('0xee')]][_0x44c3('0xef')]){this[_0x44c3('0xed')][_0x433339[_0x44c3('0xee')]][_0x44c3('0xef')]=!![];this[_0x44c3('0x20')][_0x433339[_0x44c3('0xe9')]][_0x44c3('0xef')]=!![];this[_0x44c3('0x20')][_0x433339[_0x44c3('0xe9')]][_0x44c3('0xee')]=_0x433339[_0x44c3('0xee')];}}}}else if(_0x4a9667===_0x44c3('0xf0')){if(this[_0x44c3('0x20')][_0x433339[_0x44c3('0xe9')]]){if(this[_0x44c3('0xed')][_0x433339[_0x44c3('0xee')]]){this['actions'][_0x433339[_0x44c3('0xe9')]][_0x44c3('0xee')]=_0x433339[_0x44c3('0xee')];if(_[_0x44c3('0xf1')](this['queueBooked'][this[_0x44c3('0x20')][_0x433339[_0x44c3('0xe9')]]['queue']])){this[_0x44c3('0xf2')][this[_0x44c3('0x20')][_0x433339[_0x44c3('0xe9')]]['queue']]=[];}this[_0x44c3('0xf2')][this[_0x44c3('0x20')][_0x433339[_0x44c3('0xe9')]][_0x44c3('0xb5')]]['push'](_[_0x44c3('0x57')](_[_0x44c3('0x6e')](this['actions'][_0x433339[_0x44c3('0xe9')]],['idHopper',_0x44c3('0xee')]),{'status':_0x433339[_0x44c3('0x82')],'paused':_0x433339[_0x44c3('0xec')]}));}}}};Dialer['prototype']['syncQueueStatusComplete']=function(_0x50e284){if(!this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]]){return;}var _0x353a63=this;var _0x39c9e0=this['voiceQueues'][this[_0x44c3('0x20')][_0x50e284['actionid']][_0x44c3('0xb5')]];var _0x3aa167=_0x39c9e0[_0x44c3('0xea')]||_0x44c3('0xf0');if(_0x3aa167===_0x44c3('0xeb')){if(this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]]&&this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]]['stateinterface']){this[_0x44c3('0x1b')][_0x44c3('0xf3')](this['actions'][_0x50e284['actionid']][_0x44c3('0xf4')],this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]]['stateinterface'])[_0x44c3('0x9a')](function(_0x1a8dc8){logger['error']('[Catch][Preview][syncQueueStatusComplete]',util[_0x44c3('0x60')](_0x1a8dc8,{'showHidden':![],'depth':null}));})['finally'](function(){_0x353a63['updateOriginated'](_0x353a63[_0x44c3('0x1c')][_0x353a63[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xb5')]]);_0x353a63[_0x44c3('0xed')][_0x353a63[_0x44c3('0x20')][_0x50e284['actionid']]['stateinterface']][_0x44c3('0xef')]=![];delete _0x353a63[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]];unlockQueueStatus(_0x39c9e0);});}else{this[_0x44c3('0xb7')](this[_0x44c3('0x1c')][this[_0x44c3('0x20')][_0x50e284['actionid']][_0x44c3('0xb5')]]);hopperUtils[_0x44c3('0xd6')]({'active':![],'ContactId':this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xd9')],'ListId':this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xda')],'VoiceQueueId':this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xdb')]||undefined,'CampaignId':this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]]['CampaignId']||undefined})[_0x44c3('0x9a')](loggerCatch('[unlock][syncQueueStatusComplete]'));delete this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]];unlockQueueStatus(_0x39c9e0);}}else if(_0x3aa167==='rrmemory'){var _0x2c6b9f;if(this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]]&&!_[_0x44c3('0x3e')](this[_0x44c3('0xf2')][this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xb5')]])){if(this[_0x44c3('0x24')][_0x353a63[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xb5')]]){this['queueBookedRR'][_0x353a63[_0x44c3('0x20')][_0x50e284['actionid']][_0x44c3('0xb5')]]=this[_0x44c3('0x24')][this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xb5')]]?this[_0x44c3('0x24')][this[_0x44c3('0x20')][_0x50e284['actionid']][_0x44c3('0xb5')]]:this[_0x44c3('0xf2')][this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xb5')]]?this[_0x44c3('0xf2')][this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]]['queue']]['_rr']||0x0:0x0;}this[_0x44c3('0xf2')][this['actions'][_0x50e284['actionid']][_0x44c3('0xb5')]][_0x44c3('0xf5')]=this['queueBookedRR'][this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xb5')]];for(var _0x18ff83=0x0;_0x18ff83<this[_0x44c3('0xf2')][this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xb5')]]['length'];_0x18ff83+=0x1){_0x2c6b9f=rr(this[_0x44c3('0xf2')][this['actions'][_0x50e284[_0x44c3('0xe9')]]['queue']]);this['queueBookedRR'][_0x353a63[_0x44c3('0x20')][_0x50e284['actionid']][_0x44c3('0xb5')]]=this[_0x44c3('0xf2')][this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xb5')]][_0x44c3('0xf5')];if(_0x2c6b9f[_0x44c3('0x82')]==='1'&&_0x2c6b9f['paused']==='0'){break;}}if(!_[_0x44c3('0xf1')](_0x2c6b9f)){this[_0x44c3('0xed')][_0x2c6b9f['stateinterface']][_0x44c3('0xf6')]=_[_0x44c3('0x4b')](this[_0x44c3('0xed')][_0x2c6b9f[_0x44c3('0xee')]][_0x44c3('0xf6')])?!![]:this[_0x44c3('0xed')][_0x2c6b9f[_0x44c3('0xee')]][_0x44c3('0xf6')];}loggerBooked['info'](_0x44c3('0xf7'),_0x50e284[_0x44c3('0xe9')],_0x44c3('0xf8'),JSON['stringify'](_[_0x44c3('0x6e')](this['agents'][_0x2c6b9f[_0x44c3('0xee')]],[_0x44c3('0x5a'),'unlockRR'])),'contactAgent-idHopper:\x20',JSON[_0x44c3('0x6d')](_0x2c6b9f[_0x44c3('0xf4')]));if(!_[_0x44c3('0xf1')](_0x2c6b9f)&&_0x2c6b9f['status']==='1'&&_0x2c6b9f[_0x44c3('0xec')]==='0'&&this['agents'][_0x2c6b9f[_0x44c3('0xee')]]['unlockRR']){this[_0x44c3('0xed')][_0x2c6b9f[_0x44c3('0xee')]][_0x44c3('0xf6')]=![];this['queueBooked'][_0x353a63['actions'][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xb5')]]=[];this[_0x44c3('0x1b')]['run'](_0x2c6b9f['idHopper'],_0x2c6b9f['stateinterface'])[_0x44c3('0x9a')](function(_0x488932){logger[_0x44c3('0x5e')](_0x44c3('0xf9'),util[_0x44c3('0x60')](_0x488932,{'showHidden':![],'depth':null}));})[_0x44c3('0xfa')](function(){_0x353a63['updateOriginated'](_0x353a63['voiceQueues'][_0x353a63[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xb5')]]);setTimeout(function(){_0x353a63['agents'][_0x2c6b9f[_0x44c3('0xee')]][_0x44c3('0xf6')]=!![];loggerBooked[_0x44c3('0x3f')](_0x44c3('0xfb'),_0x50e284[_0x44c3('0xe9')],_0x44c3('0xf8'),JSON['stringify'](_[_0x44c3('0x6e')](_0x353a63[_0x44c3('0xed')][_0x2c6b9f['stateinterface']],['name',_0x44c3('0xf6')])),_0x44c3('0xfc'),JSON['stringify'](_0x2c6b9f[_0x44c3('0xf4')]));},0xc7);delete _0x353a63[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]];unlockQueueStatus(_0x39c9e0,_0x50e284[_0x44c3('0xe9')]);});}else{loggerBooked[_0x44c3('0x3f')]('[booked][unlock]');this[_0x44c3('0xb7')](this[_0x44c3('0x1c')][this[_0x44c3('0x20')][_0x50e284['actionid']][_0x44c3('0xb5')]]);hopperUtils[_0x44c3('0xd6')]({'active':![],'ContactId':this['actions'][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xd9')],'ListId':this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xda')],'VoiceQueueId':this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xdb')]||undefined,'CampaignId':this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xdc')]||undefined})['catch'](loggerCatch('[unlock][syncQueueStatusComplete]'));delete this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]];unlockQueueStatus(_0x39c9e0);}}else{loggerBooked[_0x44c3('0x3f')](_0x44c3('0xfd'));this[_0x44c3('0xb7')](this[_0x44c3('0x1c')][this[_0x44c3('0x20')][_0x50e284['actionid']][_0x44c3('0xb5')]]);hopperUtils['rescheduleContact']({'active':![],'ContactId':this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xd9')],'ListId':this[_0x44c3('0x20')][_0x50e284['actionid']][_0x44c3('0xda')],'VoiceQueueId':this[_0x44c3('0x20')][_0x50e284['actionid']][_0x44c3('0xdb')]||undefined,'CampaignId':this[_0x44c3('0x20')][_0x50e284['actionid']][_0x44c3('0xdc')]||undefined})['catch'](loggerCatch(_0x44c3('0xfe')));delete this[_0x44c3('0x20')][_0x50e284['actionid']];unlockQueueStatus(_0x39c9e0);}}else{loggerBooked['info'](_0x44c3('0xff'));this['updateOriginated'](this[_0x44c3('0x1c')][this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xb5')]]);hopperUtils[_0x44c3('0xd6')]({'active':![],'ContactId':this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]][_0x44c3('0xd9')],'ListId':this[_0x44c3('0x20')][_0x50e284['actionid']]['ListId'],'VoiceQueueId':this['actions'][_0x50e284[_0x44c3('0xe9')]]['VoiceQueueId']||undefined,'CampaignId':this[_0x44c3('0x20')][_0x50e284[_0x44c3('0xe9')]]['CampaignId']||undefined})[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x100')));delete this['actions'][_0x50e284[_0x44c3('0xe9')]];unlockQueueStatus(_0x39c9e0);}};Dialer[_0x44c3('0x17')][_0x44c3('0x29')]=function(_0x5d2c47){var _0x12df8c=this[_0x44c3('0x20')][_0x5d2c47[_0x44c3('0xe9')]];if(_0x12df8c){delete this[_0x44c3('0x20')][_0x5d2c47[_0x44c3('0xe9')]];_0x12df8c[_0x44c3('0xc6')]=moment()[_0x44c3('0x77')]('YYYY-MM-DD\x20HH:mm:ss');var _0x5c5b1e=_0x12df8c[_0x44c3('0x39')]===_0x44c3('0xb6')?this['campaigns'][_0x12df8c[_0x44c3('0xb5')]]:this[_0x44c3('0x1c')][_0x12df8c[_0x44c3('0x101')]()];if(_0x5d2c47['response']!=='Success'){this[_0x44c3('0xb7')](_0x5c5b1e);return this[_0x44c3('0x102')](_0x12df8c,_0x5c5b1e,_0x5d2c47)[_0x44c3('0x9a')](loggerCatch('[callProgressDetecting]\x20'));}this[_0x44c3('0x22')][_0x5d2c47['uniqueid']]=_0x12df8c;}};Dialer[_0x44c3('0x17')][_0x44c3('0x32')]=function(_0x5e25f6){var _0x364cbd=this;var _0x2c2df0=this[_0x44c3('0x22')][_0x5e25f6['uniqueid']];var _0x1cf81e;if(!_[_0x44c3('0xf1')](_0x5e25f6)&&!_['isNil'](_0x5e25f6[_0x44c3('0x103')])&&!_[_0x44c3('0xf1')](_0x5e25f6['variable'][_0x44c3('0x104')])&&_0x5e25f6[_0x44c3('0x105')]===_0x44c3('0x106')&&_0x2c2df0){if(_0x2c2df0[_0x44c3('0x39')]!==_0x44c3('0xb6')&&this[_0x44c3('0x1c')][_0x2c2df0['queue']][_0x44c3('0x107')]&&_0x5e25f6[_0x44c3('0x108')]===_0x44c3('0x109')){delete this[_0x44c3('0x22')][_0x5e25f6[_0x44c3('0xba')]];this[_0x44c3('0xb7')](this[_0x44c3('0x1c')][_0x2c2df0[_0x44c3('0xb5')]]);this[_0x44c3('0x1c')][_0x2c2df0[_0x44c3('0xb5')]][_0x44c3('0xbb')]+=0x1;this[_0x44c3('0x1c')][_0x2c2df0[_0x44c3('0xb5')]][_0x44c3('0x10a')]+=0x1;_0x1cf81e=new Hangup(_0x2c2df0,_0x5e25f6);_0x1cf81e[_0x44c3('0x67')]=0x12;_0x1cf81e[_0x44c3('0x68')]=_0x44c3('0x10b');_0x1cf81e[_0x44c3('0x10c')]=_0x44c3('0x10d');ami['emit'](_0x44c3('0x10e'),ut['buildObj'](_0x1cf81e,_0x44c3('0x10f')));this[_0x44c3('0x110')](_0x1cf81e,_0x44c3('0x111'),_0x44c3('0x112'));}if(_0x2c2df0[_0x44c3('0x39')]!==_0x44c3('0xb6')&&this[_0x44c3('0x1c')][_0x2c2df0[_0x44c3('0xb5')]]['dialAMDActive']&&_0x5e25f6[_0x44c3('0x108')]===_0x44c3('0x113')){return new Promise(function(_0x568a22,_0x345372){delete _0x364cbd[_0x44c3('0x22')][_0x5e25f6['uniqueid']];_0x364cbd['updateOriginated'](_0x364cbd['voiceQueues'][_0x2c2df0[_0x44c3('0xb5')]]);_0x364cbd['voiceQueues'][_0x2c2df0[_0x44c3('0xb5')]][_0x44c3('0xbb')]+=0x1;_0x364cbd[_0x44c3('0x1c')][_0x2c2df0[_0x44c3('0xb5')]][_0x44c3('0x10a')]+=0x1;var _0x51bb12=_0x364cbd[_0x44c3('0x1c')][_0x2c2df0['queue']];var _0x59dc92=new Hangup(_0x2c2df0,_0x5e25f6);_0x59dc92[_0x44c3('0x67')]=0x13;_0x59dc92[_0x44c3('0x68')]='Machine';_0x59dc92['membername']=_0x44c3('0x10d');_0x59dc92[_0x44c3('0x114')]+=0x1;_0x59dc92[_0x44c3('0xcd')]+=0x1;_0x59dc92[_0x44c3('0x10f')]=!![];ami[_0x44c3('0x38')]('custom:amd',ut[_0x44c3('0x115')](_0x59dc92,'amd'));hopperUtils[_0x44c3('0xc0')](_0x59dc92)[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x116')));if(_0x59dc92['countbusyretry']+_0x59dc92[_0x44c3('0x117')]+_0x59dc92[_0x44c3('0x118')]+_0x59dc92['countnosuchnumberretry']+_0x59dc92[_0x44c3('0xd3')]+_0x59dc92['countabandonedretry']+_0x59dc92[_0x44c3('0x114')]+_0x59dc92[_0x44c3('0x119')]>=_0x51bb12[_0x44c3('0x11a')]){_0x364cbd[_0x44c3('0x11b')](_0x59dc92,_0x568a22,_0x345372,_0x44c3('0x11c'));}else{if(_0x59dc92[_0x44c3('0x114')]>=_0x51bb12[_0x44c3('0x11d')]){_0x364cbd[_0x44c3('0x11e')](_0x59dc92,_0x568a22,_0x345372,_0x44c3('0x11f'));}else{hopperUtils['rescheduleContact']({'active':![],'countmachineretry':_0x59dc92[_0x44c3('0x114')],'scheduledat':moment()[_0x44c3('0xd7')](_0x51bb12['dialMachineRetryFrequency'],_0x44c3('0xd8'))[_0x44c3('0x77')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x59dc92[_0x44c3('0xd9')],'ListId':_0x59dc92['ListId'],'VoiceQueueId':_0x59dc92[_0x44c3('0xdb')]||undefined,'CampaignId':_0x59dc92[_0x44c3('0xdc')]||undefined})[_0x44c3('0x9a')](loggerCatch('[rescheduleContact][Machine]'));_0x568a22({'reschedule':0x1});}}});}if(_0x2c2df0['type']===_0x44c3('0xb6')&&this[_0x44c3('0x1d')][_0x2c2df0[_0x44c3('0xb5')]][_0x44c3('0x107')]&&_0x5e25f6[_0x44c3('0x108')]===_0x44c3('0x109')){delete this[_0x44c3('0x22')][_0x5e25f6[_0x44c3('0xba')]];this['updateOriginated'](this[_0x44c3('0x1d')][_0x2c2df0[_0x44c3('0xb5')]]);_0x1cf81e=new Hangup(_0x2c2df0,_0x5e25f6);_0x1cf81e[_0x44c3('0x67')]=0x12;_0x1cf81e[_0x44c3('0x68')]=_0x44c3('0x10b');_0x1cf81e[_0x44c3('0x10c')]='AMD';ami['emit'](_0x44c3('0x10e'),ut[_0x44c3('0x115')](_0x1cf81e,_0x44c3('0x10f')));this[_0x44c3('0x110')](_0x1cf81e,_0x44c3('0x120'),_0x44c3('0x121'));}if(_0x2c2df0[_0x44c3('0x39')]==='ivr'&&this['campaigns'][_0x2c2df0[_0x44c3('0xb5')]]['dialAMDActive']&&_0x5e25f6[_0x44c3('0x108')]===_0x44c3('0x113')){return new Promise(function(_0x4b474a,_0x31c5fb){delete _0x364cbd[_0x44c3('0x22')][_0x5e25f6[_0x44c3('0xba')]];_0x364cbd[_0x44c3('0xb7')](_0x364cbd[_0x44c3('0x1d')][_0x2c2df0[_0x44c3('0xb5')]]);_0x364cbd['campaigns'][_0x2c2df0[_0x44c3('0xb5')]][_0x44c3('0xbb')]+=0x1;_0x364cbd['campaigns'][_0x2c2df0['queue']][_0x44c3('0x10a')]+=0x1;var _0x9e3eca=_0x364cbd[_0x44c3('0x1d')][_0x2c2df0[_0x44c3('0xb5')]];var _0x230dd8=new Hangup(_0x2c2df0,_0x5e25f6);_0x230dd8[_0x44c3('0x67')]=0x13;_0x230dd8[_0x44c3('0x68')]='Machine';_0x230dd8['membername']=_0x44c3('0x10d');_0x230dd8['countmachineretry']+=0x1;_0x230dd8['countglobal']+=0x1;_0x230dd8[_0x44c3('0x10f')]=!![];ami[_0x44c3('0x38')](_0x44c3('0x10e'),ut['buildObj'](_0x230dd8,_0x44c3('0x10f')));hopperUtils[_0x44c3('0xc0')](_0x230dd8)[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x116')));if(_0x230dd8[_0x44c3('0x122')]+_0x230dd8['countcongestionretry']+_0x230dd8[_0x44c3('0x118')]+_0x230dd8[_0x44c3('0x123')]+_0x230dd8[_0x44c3('0xd3')]+_0x230dd8[_0x44c3('0xe5')]+_0x230dd8[_0x44c3('0x114')]+_0x230dd8[_0x44c3('0x119')]>=_0x9e3eca['dialGlobalMaxRetry']){_0x364cbd['stateGlobal'](_0x230dd8,_0x4b474a,_0x31c5fb,_0x44c3('0x11c'));}else{if(_0x230dd8[_0x44c3('0x114')]>=_0x9e3eca['dialMachineMaxRetry']){_0x364cbd[_0x44c3('0x11e')](_0x230dd8,_0x4b474a,_0x31c5fb,_0x44c3('0x11f'));}else{hopperUtils[_0x44c3('0xd6')]({'active':![],'countmachineretry':_0x230dd8[_0x44c3('0x114')],'scheduledat':moment()[_0x44c3('0xd7')](_0x9e3eca[_0x44c3('0x124')],_0x44c3('0xd8'))[_0x44c3('0x77')](_0x44c3('0xb9')),'ContactId':_0x230dd8[_0x44c3('0xd9')],'ListId':_0x230dd8['ListId'],'VoiceQueueId':_0x230dd8[_0x44c3('0xdb')]||undefined,'CampaignId':_0x230dd8[_0x44c3('0xdc')]||undefined})[_0x44c3('0x9a')](loggerCatch('[rescheduleContact][Machine]'));_0x4b474a({'reschedule':0x1});}}});}}};Dialer[_0x44c3('0x17')][_0x44c3('0x2e')]=function(_0x34a8d8){var _0x286b93=this['uniqueId'][_0x34a8d8['uniqueid']];var _0x9125f1;if(_0x286b93&&_0x286b93['type']==='ivr'){delete this[_0x44c3('0x22')][_0x34a8d8['uniqueid']];this[_0x44c3('0xb7')](this[_0x44c3('0x1d')][_0x286b93[_0x44c3('0xb5')]]);this[_0x44c3('0x1d')][_0x286b93[_0x44c3('0xb5')]][_0x44c3('0x125')]+=0x1;_0x9125f1=new Hangup(_0x286b93,_0x34a8d8);hopperUtils['createHistory'](_0x9125f1)[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x126')));hopperUtils[_0x44c3('0xc2')](_0x9125f1)[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x127')));}if(_0x286b93&&_0x286b93[_0x44c3('0x39')]!==_0x44c3('0xb6')&&isNotNull(this[_0x44c3('0x1c')][_0x286b93[_0x44c3('0xb5')]][_0x44c3('0x128')])){delete this[_0x44c3('0x22')][_0x34a8d8[_0x44c3('0xba')]];this['updateOriginated'](this['voiceQueues'][_0x286b93[_0x44c3('0xb5')]]);this[_0x44c3('0x1c')][_0x286b93[_0x44c3('0xb5')]][_0x44c3('0xbb')]+=0x1;this[_0x44c3('0x1c')][_0x286b93[_0x44c3('0xb5')]]['outboundAnswerAgiCallsDay']+=0x1;_0x9125f1=new Hangup(_0x286b93,_0x34a8d8);_0x9125f1[_0x44c3('0x67')]=0x10;_0x9125f1[_0x44c3('0x68')]='AnswerAGI';_0x9125f1[_0x44c3('0x10c')]=_0x44c3('0x129');hopperUtils[_0x44c3('0xc0')](_0x9125f1)['catch'](loggerCatch(_0x44c3('0x126')));hopperUtils[_0x44c3('0xc2')](_0x9125f1)[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x127')));}if(_0x286b93&&_0x286b93['type']!==_0x44c3('0xb6')&&!isNotNull(this[_0x44c3('0x1c')][_0x286b93['queue']]['dialQueueProject'])){if(_0x34a8d8[_0x44c3('0x12a')]==='Normal\x20Clearing'){delete this[_0x44c3('0x22')][_0x34a8d8['uniqueid']];this[_0x44c3('0x1c')][_0x286b93[_0x44c3('0xb5')]]['outboundAnswerCallsDay']+=0x1;const _0x17ded8=new AgentComplete(_0x286b93,_0x34a8d8);_0x17ded8['CampaignId']=this['voiceQueues'][_0x286b93[_0x44c3('0xb5')]]['id'];hopperUtils['createHistory'](_0x17ded8)[_0x44c3('0x9a')](loggerCatch(_0x44c3('0xc1')));hopperUtils[_0x44c3('0xc2')](_0x17ded8)[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x12b')));}else{delete this[_0x44c3('0x22')][_0x34a8d8[_0x44c3('0xba')]];this['updateOriginated'](this['voiceQueues'][_0x286b93[_0x44c3('0xb5')]]);this[_0x44c3('0x1c')][_0x286b93[_0x44c3('0xb5')]]['outboundUnknownCallsDay']+=0x1;_0x9125f1=new Hangup(_0x286b93,_0x34a8d8);_0x9125f1[_0x44c3('0x67')]=0xc;_0x9125f1[_0x44c3('0x68')]=_0x34a8d8[_0x44c3('0x12a')];_0x9125f1[_0x44c3('0x10c')]=_0x44c3('0x12c');hopperUtils[_0x44c3('0xc0')](_0x9125f1)[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x126')));hopperUtils['moveContactManagedDialer'](_0x9125f1)[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x127')));}}};Dialer['prototype'][_0x44c3('0xc')]=function(_0x32f8bd){var _0x5638c4=this;if(!_0x5638c4[_0x44c3('0x12d')][_0x32f8bd['name']]){_0x5638c4[_0x44c3('0x12d')][_0x32f8bd[_0x44c3('0x5a')]]={'running':![]};}else if(_0x5638c4['queuesSummary'][_0x32f8bd['name']][_0x44c3('0x12e')]===!![]){return;}else if(_0x5638c4[_0x44c3('0x12d')][_0x32f8bd[_0x44c3('0x5a')]]['running']===![]){_0x5638c4['queuesSummary'][_0x32f8bd[_0x44c3('0x5a')]][_0x44c3('0x12e')]=!![];}var _0x5a70a6=_0x5638c4[_0x44c3('0x1c')][_0x32f8bd[_0x44c3('0x5a')]];var _0x48eaac=_0x5a70a6['message']!==utils[_0x44c3('0x64')]['INACTIVE'];var _0x40e5e1=utils[_0x44c3('0x12f')](_0x5a70a6);_0x5a70a6[_0x44c3('0x130')]=utils[_0x44c3('0x131')](_0x5a70a6,_0x5638c4[_0x44c3('0x1e')]);Promise[_0x44c3('0x132')]()[_0x44c3('0x37')](function(){if(_0x5a70a6[_0x44c3('0x130')]===utils['CAMPAIGN_STATUS'][_0x44c3('0x74')]){if(_0x48eaac){clearPredictiveAttributes(_0x5a70a6);_0x32f8bd[_0x44c3('0x133')]=undefined;_0x32f8bd[_0x44c3('0x58')]=undefined;}if(_0x5a70a6['statusMessage']===utils[_0x44c3('0x64')]['INACTIVE']){_0x32f8bd[_0x44c3('0x134')]=0x0;_0x32f8bd['paused']=0x0;_0x32f8bd[_0x44c3('0x135')]=0x0;_0x32f8bd['talking']=0x0;_0x32f8bd['pTalking']=0x0;}}else if(_0x5a70a6[_0x44c3('0x130')]===utils[_0x44c3('0x64')]['ACTIVE']&&!_0x40e5e1){return _0x5638c4[_0x44c3('0x8b')](_0x5a70a6,!![])['then'](function(){return _0x5638c4[_0x44c3('0x8b')](_0x5a70a6,![]);})[_0x44c3('0x37')](function(){return _0x5638c4['checkDialMethod'](_0x5a70a6);})[_0x44c3('0x9a')](function(_0x3624f1){loggerSyncQueueSummary[_0x44c3('0x3b')](_0x44c3('0x136'),util[_0x44c3('0x60')](_0x3624f1,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x5a70a6);});}else{clearPredictiveAttributes(_0x5a70a6);}})['then'](function(){var _0x34535f=_0x32f8bd[_0x44c3('0x137')](_0x5a70a6);if(_0x34535f||_0x5a70a6[_0x44c3('0x138')]){_0x5a70a6['queueSummaryCountersUpdated']=![];_0x32f8bd[_0x44c3('0x139')](_0x5a70a6);Object['assign'](_0x5a70a6,_0x32f8bd);emitOutboundVoiceQueueSummary(_0x32f8bd);}_0x5638c4[_0x44c3('0x12d')][_0x5a70a6[_0x44c3('0x5a')]]['running']=![];})[_0x44c3('0x9a')](function(_0x36f500){logger['error']('[syncQueueSummary]',util[_0x44c3('0x60')](_0x36f500,{'showHidden':![],'depth':null}));_0x5638c4['queuesSummary'][_0x5a70a6[_0x44c3('0x5a')]][_0x44c3('0x12e')]=![];});};Dialer['prototype'][_0x44c3('0x2c')]=_['throttle'](function(){var _0x4c5d7a=_[_0x44c3('0x13a')](this[_0x44c3('0x1c')],function(_0x350450){return _0x350450[_0x44c3('0x13b')];});var _0xdf01bd=_['filter'](this[_0x44c3('0xed')],function(_0x17c8c5){return _0x17c8c5[_0x44c3('0x13c')]&&_0x17c8c5[_0x44c3('0x82')]==='reachable';});if(_0x4c5d7a[_0x44c3('0x93')]>0x0&&_0xdf01bd[_0x44c3('0x93')]>0x0){return Promise[_0x44c3('0x132')]()[_0x44c3('0x37')](cmHopper['handlePreviewRecallNotifications'](_[_0x44c3('0x13d')](_0x4c5d7a,'id'),previewRecallmeReminderInterval,_[_0x44c3('0x13d')](_0xdf01bd,'id')))['then'](function(_0x19aaa7){for(var _0x582402=0x0;_0x582402<_0x19aaa7[_0x44c3('0x93')];_0x582402++){var _0x2f514e=_0x19aaa7[_0x582402][_0x44c3('0x13e')][_0x44c3('0x5a')];if(_0x2f514e)io['to'](util[_0x44c3('0x77')](_0x44c3('0x13f'),_0x2f514e))['emit'](_0x44c3('0x140'),{'hopper':_0x19aaa7[_0x582402]});}})[_0x44c3('0x9a')](function(_0x149e43){logger[_0x44c3('0x5e')](_0x44c3('0x141'),_0x149e43);});}},0x3c*0x3e8,{'leading':!![]});Dialer[_0x44c3('0x17')][_0x44c3('0x35')]=function(){var _0x437f6e=this;setInterval(function(){_0x437f6e[_0x44c3('0x142')](_0x437f6e[_0x44c3('0x22')],_0x44c3('0x143'));_0x437f6e[_0x44c3('0x142')](_0x437f6e[_0x44c3('0x20')],_0x44c3('0x144'));},0x32c8);};Dialer[_0x44c3('0x17')][_0x44c3('0x142')]=function(_0x509651,_0x201147){var _0x40b764=this;for(var _0x2a09be in _0x509651){if(typeof _0x509651[_0x2a09be]!==_0x44c3('0x145')){this[_0x44c3('0x1a')][_0x44c3('0x18')](function(){if(!_[_0x44c3('0xf1')](_0x509651[_0x2a09be])){return ami['Action']({'action':_0x44c3('0x82'),'channel':_0x509651[_0x2a09be][_0x44c3('0xe8')]})[_0x44c3('0x9a')](function(_0x36293c){if(_0x36293c[_0x44c3('0x63')]===_0x44c3('0x146')){setTimeout(function(){if(_0x509651[_0x2a09be]&&_0x509651[_0x2a09be][_0x44c3('0x39')]!==_0x44c3('0xb6')){_0x40b764[_0x44c3('0xb7')](_0x40b764[_0x44c3('0x1c')][_0x509651[_0x2a09be]['queue']]);logger[_0x44c3('0x5e')]('[Dialer][checkChannel]',_0x201147,_0x2a09be,_0x509651[_0x2a09be][_0x44c3('0xb5')]);delete _0x509651[_0x2a09be];}if(_0x509651[_0x2a09be]&&_0x509651[_0x2a09be][_0x44c3('0x39')]==='ivr'){_0x40b764[_0x44c3('0xb7')](_0x40b764[_0x44c3('0x1d')][_0x509651[_0x2a09be][_0x44c3('0xb5')]]);logger[_0x44c3('0x5e')]('[Dialer][checkChannel][ivr]',_0x201147,_0x2a09be,_0x509651[_0x2a09be][_0x44c3('0xb5')]);delete _0x509651[_0x2a09be];}},0x2328);}});}});}}};Dialer['prototype'][_0x44c3('0x147')]=function(_0x25e39e){return Promise[_0x44c3('0x132')]()[_0x44c3('0x37')](voiceQueueRt[_0x44c3('0x147')](_0x25e39e))['catch'](loggerCatch('[getVoiceQueueRtPauses]\x20'));};Dialer[_0x44c3('0x17')][_0x44c3('0xb7')]=function(_0x48e3d1){if(!_[_0x44c3('0x4b')](_0x48e3d1)&&_0x48e3d1!==null){if(typeof _0x48e3d1[_0x44c3('0x148')]!=='undefined'){if(_0x48e3d1[_0x44c3('0x148')]>0x0){_0x48e3d1[_0x44c3('0x148')]-=0x1;}else{logger[_0x44c3('0x5e')](_0x44c3('0x149'));}}}else{logger[_0x44c3('0x5e')](_0x44c3('0x14a'));}};Dialer[_0x44c3('0x17')][_0x44c3('0x14b')]=function(_0x59d064,_0x4e4153){var _0x16b559=this;return function(_0x2b44d1){_0x16b559[_0x44c3('0xb7')](_0x4e4153);logger[_0x44c3('0x5e')](_0x59d064,util['inspect'](_0x2b44d1,{'showHidden':![],'depth':null}));};};Dialer['prototype'][_0x44c3('0x14c')]=function(_0x3c96a4,_0x1ddb53,_0x33c1d9){var _0xac828e={'state':0x19,'statedesc':'notFound'};this[_0x44c3('0xb7')](_0x1ddb53);this[_0x44c3('0x110')](_['merge'](_0xac828e,_[_0x44c3('0x6e')](_0x33c1d9,[_0x44c3('0xd9'),_0x44c3('0xda'),_0x44c3('0x14d'),_0x44c3('0xdb'),_0x44c3('0xdc')])),_0x44c3('0x14e'),_0x44c3('0x14f'));logger[_0x44c3('0x5e')](_0x3c96a4);};Dialer[_0x44c3('0x17')]['saveInDb']=function(_0x21a3a0,_0x53a4e6,_0x34401b){hopperUtils[_0x44c3('0xc0')](_0x21a3a0)['catch'](loggerCatch(_0x53a4e6));hopperUtils[_0x44c3('0xc2')](_0x21a3a0)[_0x44c3('0x9a')](loggerCatch(_0x34401b));};Dialer[_0x44c3('0x17')]['queueCallerAbandonCreateState']=function(_0x209f67,_0x1a0b11){hopperUtils[_0x44c3('0xc0')](_0x209f67)['catch'](loggerCatch(_0x44c3('0xc1')));if(_0x1a0b11==0x0){hopperUtils[_0x44c3('0xc2')](_0x209f67)[_0x44c3('0x9a')](loggerCatch('[syncQueueCallerAbandon]\x20[Drop]'));}};Dialer[_0x44c3('0x17')][_0x44c3('0x141')]=function(_0x471c3a){return Promise['resolve']()[_0x44c3('0x37')](cmHopper[_0x44c3('0x150')](_0x471c3a['id'],previewRecallmeReminderInterval))[_0x44c3('0x37')](function(_0x7e1d25){for(var _0x18ec10=0x0;_0x18ec10<_0x7e1d25[_0x44c3('0x93')];_0x18ec10++){var _0x110e73=_0x7e1d25[_0x18ec10][_0x44c3('0x13e')]['name'];if(_0x110e73)io['to'](util['format'](_0x44c3('0x13f'),_0x110e73))[_0x44c3('0x38')](_0x44c3('0x140'),{'hopper':_0x7e1d25[_0x18ec10]});}})[_0x44c3('0x9a')](function(){});};Dialer[_0x44c3('0x17')][_0x44c3('0xa6')]=function(_0x38f5f8){var _0x35d40e=this;return function(){_0x35d40e[_0x44c3('0x151')](_0x38f5f8);};};Dialer[_0x44c3('0x17')][_0x44c3('0x152')]=function(_0x24c528,_0x2cac26){var _0x168fc1=this;var _0x5317ff=uuid['v4']();this['actions'][_0x5317ff]=new Action(_0x24c528,_0x2cac26,_0x5317ff);return new Promise(function(_0x49262c,_0x1599b8){if(_[_0x44c3('0x4b')](_0x24c528)&&typeof _0x24c528!=='object'){return _0x1599b8(msgResponse(_0x44c3('0x153'),_0x44c3('0x8c'),_0x44c3('0x154')));}if(_[_0x44c3('0x4b')](_0x2cac26[_0x44c3('0x155')])||_0x2cac26[_0x44c3('0x155')]===null){return _0x1599b8(msgResponse('originate',_0x44c3('0x8c'),'contact\x20is\x20undefine'));}var _0x1bef3c={'XMD-CALLERID':_0x168fc1[_0x44c3('0x20')][_0x5317ff][_0x44c3('0x156')](),'XMD-AGI':_0x24c528[_0x44c3('0x128')]?util[_0x44c3('0x77')](_0x44c3('0x157'),ipAgi,_0x24c528[_0x44c3('0x128')]):_0x44c3('0x158'),'XMD-AGIAFTER':_0x24c528[_0x44c3('0xcc')]?util[_0x44c3('0x77')](_0x44c3('0x157'),ipAgi,_0x24c528[_0x44c3('0xcc')]):_0x44c3('0x158'),'XMD-QUEUE':utils[_0x44c3('0x159')](_0x24c528)?util[_0x44c3('0x77')](_0x44c3('0x15a'),_0x24c528[_0x44c3('0x5a')],_0x24c528[_0x44c3('0x15b')]||'',_0x24c528[_0x44c3('0xbf')]?'c':'',_0x24c528[_0x44c3('0xc7')]||0x3):_0x44c3('0x158'),'XMD-CONTACTID':_0x2cac26['ContactId'],'XMD-CDRTYPE':'dialer','CALLERID(all)':_0x168fc1['actions'][_0x5317ff][_0x44c3('0x156')](),'XMD-AMD':_0x24c528[_0x44c3('0x107')]?_0x44c3('0x15c'):_0x44c3('0x158'),'XMD-DESTINATION':'xcally-motion-dialer'};if(_0x24c528['dialAMDActive']){_0x1bef3c[_0x44c3('0x15d')]=_0x24c528[_0x44c3('0x15e')]||0x9c4;_0x1bef3c[_0x44c3('0x15f')]=_0x24c528[_0x44c3('0x160')]||0x5dc;_0x1bef3c['XMD-AMDAFTERGREETINGSILENCE']=_0x24c528[_0x44c3('0x161')]||0x320;_0x1bef3c[_0x44c3('0x162')]=_0x24c528[_0x44c3('0x163')]||0x1388;_0x1bef3c[_0x44c3('0x164')]=_0x24c528[_0x44c3('0x165')]||0x64;_0x1bef3c['XMD-AMDBETWEENWORDSSILENCE']=_0x24c528[_0x44c3('0x166')]||0x32;_0x1bef3c[_0x44c3('0x167')]=_0x24c528[_0x44c3('0x168')]||0x3;_0x1bef3c['XMD-AMDSILENCETHRESHOLD']=_0x24c528[_0x44c3('0x169')]||0x100;_0x1bef3c[_0x44c3('0x16a')]=_0x24c528[_0x44c3('0x16b')]||0x1388;}if(utils[_0x44c3('0x159')](_0x24c528)){_0x1bef3c[_0x44c3('0x16c')]=_0x2cac26[_0x44c3('0xdb')];}else{_0x1bef3c[_0x44c3('0x16d')]=_0x2cac26['CampaignId'];}var _0x25f5ce=utils[_0x44c3('0x16e')](_0x2cac26[_0x44c3('0x16f')]);Object[_0x44c3('0x170')](_0x1bef3c,_0x25f5ce);var _0x4ef9f7=_0x168fc1[_0x44c3('0x85')](_0x24c528[_0x44c3('0x86')])?utils[_0x44c3('0x171')](_0x24c528[_0x44c3('0x86')][_0x44c3('0x172')],_0x24c528[_0x44c3('0x173')],_0x24c528[_0x44c3('0x174')]>0x0?utils[_0x44c3('0x175')](_0x24c528[_0x44c3('0x176')],_0x24c528[_0x44c3('0x174')]):_0x24c528['dialOriginateCallerIdNumber']):utils[_0x44c3('0x171')](_[_0x44c3('0xf1')](_0x24c528[_0x44c3('0x177')])?_0x24c528[_0x44c3('0x86')][_0x44c3('0x172')]:_0x24c528['TrunkBackup'][_0x44c3('0x172')],_0x24c528[_0x44c3('0x173')],_0x24c528['dialRandomLastDigitCallerIdNumber']>0x0?utils[_0x44c3('0x175')](_0x24c528[_0x44c3('0x176')],_0x24c528[_0x44c3('0x174')]):_0x24c528[_0x44c3('0x176')]);if(_0x4ef9f7){_0x1bef3c[_0x44c3('0x178')]=_0x168fc1[_0x44c3('0x20')][_0x5317ff][_0x44c3('0x179')]=utils[_0x44c3('0x17a')](_0x4ef9f7);_0x1bef3c['XMD-ORIGINATECALLERIDNUM']=_0x2cac26[_0x44c3('0x155')];}_0x24c528['variables']=_0x1bef3c;return ami[_0x44c3('0x94')]({'actionid':_0x5317ff,'action':_0x44c3('0x153'),'channel':_0x168fc1['isTrunkReachable'](_0x24c528['Trunk'])?util[_0x44c3('0x77')]('SIP/%s/%s%s',_0x24c528['Trunk'][_0x44c3('0x5a')],isNotNull(_0x24c528[_0x44c3('0x17b')])?_0x24c528[_0x44c3('0x17b')][_0x44c3('0x17c')]()||'':'',_0x24c528[_0x44c3('0x17d')]>0x0?_0x2cac26[_0x44c3('0x155')]['substring'](_0x24c528[_0x44c3('0x17d')]):_0x2cac26[_0x44c3('0x155')]):util['format'](_0x44c3('0x17e'),_['isNil'](_0x24c528[_0x44c3('0x177')])?_0x24c528[_0x44c3('0x86')]['name']:_0x24c528[_0x44c3('0x177')][_0x44c3('0x5a')],isNotNull(_0x24c528[_0x44c3('0x17b')])?_0x24c528[_0x44c3('0x17b')][_0x44c3('0x17c')]()||'':'',_0x24c528[_0x44c3('0x17d')]>0x0?_0x2cac26[_0x44c3('0x155')]['substring'](_0x24c528[_0x44c3('0x17d')]):_0x2cac26[_0x44c3('0x155')]),'callerid':_0x4ef9f7,'Exten':_0x44c3('0x106'),'Context':_0x44c3('0x17f'),'Priority':'1','variable':_0x1bef3c,'timeout':(_0x24c528[_0x44c3('0x180')]||0x1e)*0x3e8,'async':!![],'channelid':_0x5317ff})[_0x44c3('0x37')](function(_0x4c72d4){return _0x49262c(_0x4c72d4);})[_0x44c3('0x9a')](function(_0x43cdab){_0x24c528[_0x44c3('0x181')]+=0x1;var _0x1deae6=new History(_0x168fc1[_0x44c3('0x20')][_0x5317ff]);logger[_0x44c3('0x5e')](util[_0x44c3('0x77')](_0x44c3('0x182'),JSON['stringify'](_0x43cdab)));_0x1deae6[_0x44c3('0x67')]=0xe;_0x1deae6[_0x44c3('0x68')]=_0x44c3('0x183');_0x1deae6['starttime']=moment()[_0x44c3('0x77')](_0x44c3('0xb9'));_0x1deae6[_0x44c3('0x69')]=_0x1deae6[_0x44c3('0x6a')];hopperUtils[_0x44c3('0xc0')](_0x1deae6)[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x184')));_0x168fc1[_0x44c3('0xc2')](_0x1deae6)[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x184')))[_0x44c3('0xfa')](function(){delete _0x168fc1[_0x44c3('0x20')][_0x5317ff];return _0x1599b8(msgResponse(_0x44c3('0x153'),_0x44c3('0x7f'),_0x44c3('0x185')));});});});};Dialer[_0x44c3('0x17')][_0x44c3('0x186')]=function(_0x2239c2,_0x4241e8,_0x4de142){var _0x153e78=new History(_0x4241e8);if(_0x153e78[_0x44c3('0x122')]+_0x153e78[_0x44c3('0x117')]+_0x153e78['countnoanswerretry']+_0x153e78[_0x44c3('0x123')]+_0x153e78[_0x44c3('0xd3')]+_0x153e78[_0x44c3('0xe5')]+_0x153e78['countmachineretry']+_0x153e78[_0x44c3('0x119')]>=_0x4de142[_0x44c3('0x11a')]-0x1){return!![];}switch(_0x2239c2){case 0x3:if(_0x153e78[_0x44c3('0x118')]>=_0x4de142[_0x44c3('0x187')]-0x1){return!![];}hopperUtils[_0x44c3('0xd6')]({'active':![],'countnoanswerretry':_0x153e78[_0x44c3('0x118')]+=0x1,'scheduledat':moment()['add'](_0x4de142[_0x44c3('0x188')],_0x44c3('0xd8'))[_0x44c3('0x77')](_0x44c3('0xb9')),'ContactId':_0x153e78[_0x44c3('0xd9')],'ListId':_0x153e78['ListId'],'VoiceQueueId':_0x153e78['VoiceQueueId']||undefined,'CampaignId':_0x153e78[_0x44c3('0xdc')]||undefined})['catch'](loggerCatch('[rescheduleContact][NoAnswer]'));break;case 0x5:if(_0x153e78[_0x44c3('0x122')]>=_0x4de142[_0x44c3('0x189')]-0x1){return!![];}hopperUtils[_0x44c3('0xd6')]({'active':![],'countbusyretry':_0x153e78[_0x44c3('0x122')]+=0x1,'scheduledat':moment()[_0x44c3('0xd7')](_0x4de142['dialBusyRetryFrequency'],'minutes')[_0x44c3('0x77')](_0x44c3('0xb9')),'ContactId':_0x153e78[_0x44c3('0xd9')],'ListId':_0x153e78[_0x44c3('0xda')],'VoiceQueueId':_0x153e78[_0x44c3('0xdb')]||undefined,'CampaignId':_0x153e78[_0x44c3('0xdc')]||undefined})[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x18a')));break;case 0x8:if(_0x153e78[_0x44c3('0x117')]>=_0x4de142[_0x44c3('0x18b')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countcongestionretry':_0x153e78[_0x44c3('0x117')]+=0x1,'scheduledat':moment()['add'](_0x4de142[_0x44c3('0x18c')],'minutes')[_0x44c3('0x77')](_0x44c3('0xb9')),'ContactId':_0x153e78[_0x44c3('0xd9')],'ListId':_0x153e78['ListId'],'VoiceQueueId':_0x153e78[_0x44c3('0xdb')]||undefined,'CampaignId':_0x153e78[_0x44c3('0xdc')]||undefined})[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x18d')));break;case 0x0:if(_0x153e78[_0x44c3('0x123')]>=_0x4de142[_0x44c3('0x18e')]-0x1){return!![];}else{hopperUtils['rescheduleContact']({'active':![],'countnosuchnumberretry':_0x153e78[_0x44c3('0x123')]+=0x1,'scheduledat':moment()[_0x44c3('0xd7')](_0x4de142[_0x44c3('0x18f')],_0x44c3('0xd8'))[_0x44c3('0x77')](_0x44c3('0xb9')),'ContactId':_0x153e78[_0x44c3('0xd9')],'ListId':_0x153e78[_0x44c3('0xda')],'VoiceQueueId':_0x153e78[_0x44c3('0xdb')]||undefined,'CampaignId':_0x153e78[_0x44c3('0xdc')]||undefined})[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x190')));}break;case 0xa:if(_0x153e78[_0x44c3('0xd3')]>=_0x4de142[_0x44c3('0xd4')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countdropretry':_0x153e78['countdropretry']+=0x1,'scheduledat':moment()[_0x44c3('0xd7')](_0x4de142['dialDropRetryFrequency'],'minutes')[_0x44c3('0x77')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x153e78[_0x44c3('0xd9')],'ListId':_0x153e78['ListId'],'VoiceQueueId':_0x153e78[_0x44c3('0xdb')]||undefined,'CampaignId':_0x153e78[_0x44c3('0xdc')]||undefined})[_0x44c3('0x9a')](loggerCatch(_0x44c3('0xdd')));break;case 0xb:if(_0x153e78[_0x44c3('0xe5')]>=_0x4de142[_0x44c3('0xe7')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countabandonedretry':_0x153e78[_0x44c3('0xe5')]+=0x1,'scheduledat':moment()[_0x44c3('0xd7')](_0x4de142['dialAbandonedRetryFrequency'],_0x44c3('0xd8'))['format'](_0x44c3('0xb9')),'ContactId':_0x153e78[_0x44c3('0xd9')],'ListId':_0x153e78[_0x44c3('0xda')],'VoiceQueueId':_0x153e78[_0x44c3('0xdb')]||undefined,'CampaignId':_0x153e78['CampaignId']||undefined})[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x191')));break;case 0x13:if(_0x153e78[_0x44c3('0x114')]>=_0x4de142[_0x44c3('0x11d')]-0x1){return!![];}hopperUtils[_0x44c3('0xd6')]({'active':![],'countmachineretry':_0x153e78[_0x44c3('0x114')]+=0x1,'scheduledat':moment()[_0x44c3('0xd7')](_0x4de142[_0x44c3('0x124')],'minutes')[_0x44c3('0x77')](_0x44c3('0xb9')),'ContactId':_0x153e78[_0x44c3('0xd9')],'ListId':_0x153e78['ListId'],'VoiceQueueId':_0x153e78[_0x44c3('0xdb')]||undefined,'CampaignId':_0x153e78[_0x44c3('0xdc')]||undefined})[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x192')));break;case 0x14:if(_0x153e78[_0x44c3('0x119')]>=_0x4de142[_0x44c3('0x193')]-0x1){return!![];}hopperUtils[_0x44c3('0xd6')]({'active':![],'countagentrejectretry':_0x153e78[_0x44c3('0x119')]+=0x1,'scheduledat':moment()[_0x44c3('0xd7')](_0x4de142['dialAgentRejectRetryFrequency'],_0x44c3('0xd8'))['format'](_0x44c3('0xb9')),'ContactId':_0x153e78[_0x44c3('0xd9')],'ListId':_0x153e78[_0x44c3('0xda')],'VoiceQueueId':_0x153e78[_0x44c3('0xdb')]||undefined,'CampaignId':_0x153e78[_0x44c3('0xdc')]||undefined})[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x194')));break;default:return!![];}};Dialer[_0x44c3('0x17')][_0x44c3('0x102')]=function(_0x31141f,_0xab976f,_0x374100){var _0x48ea1a=this;var _0x15198b=new History(_0x31141f);var _0x1eb4f7=![];var _0x3c0058;var _0x22ef6c;return new Promise(function(_0x4e754c,_0x1d5bfc){if(_[_0x44c3('0x4b')](_0xab976f)&&typeof _0xab976f!==_0x44c3('0x195')){return _0x1d5bfc(msgResponse(_0x44c3('0x196'),_0x44c3('0x8c'),_0x44c3('0x197')));}if(_[_0x44c3('0x4b')](_0x374100)&&typeof _0x374100!==_0x44c3('0x195')){return _0x1d5bfc(msgResponse('[callProgressDetecting]',_0x44c3('0x8c'),_0x44c3('0x198')));}hopperUtils['verifyAdditionalPhones'](_0x15198b,_0x374100[_0x44c3('0xbc')],_0xab976f)['then'](function(_0x21e7a3){if(_0x21e7a3[_0x44c3('0xd2')]==0x1)_0x1eb4f7=!![];switch(_0x374100['reason']){case'0':_0xab976f[_0x44c3('0x199')]+=0x1;_0x15198b[_0x44c3('0x67')]=0x0;_0x15198b[_0x44c3('0x68')]=_0x44c3('0x19a');_0x15198b[_0x44c3('0x123')]+=0x1;_0x15198b[_0x44c3('0xcd')]+=0x1;ami[_0x44c3('0x38')](_0x44c3('0x19b'),ut[_0x44c3('0x115')](_0x31141f,_0x44c3('0x19c')));_0x3c0058=_0xab976f[_0x44c3('0x18f')];_0x22ef6c=_0xab976f[_0x44c3('0xcf')];hopperUtils[_0x44c3('0xc0')](_0x15198b)[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x116')));if(_0x48ea1a[_0x44c3('0x186')](0x0,_0x31141f,_0xab976f)&&!_0x1eb4f7){if(_0x15198b[_0x44c3('0x123')]>=_0xab976f['dialNoSuchNumberMaxRetry']){_0x48ea1a[_0x44c3('0x11e')](_0x15198b,_0x4e754c,_0x1d5bfc,'reason\x200\x20no\x20such\x20number....');}else{_0x48ea1a[_0x44c3('0x11b')](_0x15198b,_0x4e754c,_0x1d5bfc,_0x44c3('0x19d'));}}break;case'3':_0xab976f[_0x44c3('0x19e')]+=0x1;_0x15198b[_0x44c3('0x67')]=0x3;_0x15198b[_0x44c3('0x68')]=_0x44c3('0x19f');_0x15198b[_0x44c3('0x118')]+=0x1;_0x15198b[_0x44c3('0xcd')]+=0x1;var _0x1febad=ut['buildNoAnswerEventPayload'](_0x31141f,_0xab976f);ami[_0x44c3('0x38')](_0x44c3('0x1a0'),_0x1febad);_0x3c0058=_0xab976f['dialNoAnswerRetryFrequency'];_0x22ef6c=_0xab976f[_0x44c3('0xcf')];hopperUtils['createHistory'](_0x15198b)['catch'](loggerCatch('[syncAgentComplete][createHistory][3]'));if(_0x48ea1a[_0x44c3('0x186')](0x3,_0x31141f,_0xab976f)&&!_0x1eb4f7){if(_0x15198b[_0x44c3('0x118')]>=_0xab976f[_0x44c3('0x187')]){_0x48ea1a[_0x44c3('0x11e')](_0x15198b,_0x4e754c,_0x1d5bfc,_0x44c3('0x1a1'));}else{_0x48ea1a[_0x44c3('0x11b')](_0x15198b,_0x4e754c,_0x1d5bfc,_0x44c3('0x1a1'));}}break;case'5':_0xab976f[_0x44c3('0x1a2')]+=0x1;_0x15198b[_0x44c3('0x67')]=0x5;_0x15198b['statedesc']=_0x44c3('0x1a3');_0x15198b[_0x44c3('0x122')]+=0x1;_0x15198b['countglobal']+=0x1;ami[_0x44c3('0x38')]('custom:agentbusy',ut[_0x44c3('0x115')](_0x31141f,_0x44c3('0x1a4')));_0x3c0058=_0xab976f['dialBusyRetryFrequency'];_0x22ef6c=_0xab976f[_0x44c3('0xcf')];hopperUtils[_0x44c3('0xc0')](_0x15198b)[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x1a5')));if(_0x48ea1a['checkRetriveMax'](0x5,_0x31141f,_0xab976f)&&!_0x1eb4f7){if(_0x15198b[_0x44c3('0x122')]>=_0xab976f[_0x44c3('0x189')]){_0x48ea1a['createStateFinal'](_0x15198b,_0x4e754c,_0x1d5bfc,_0x44c3('0x1a6'));}else{_0x48ea1a[_0x44c3('0x11b')](_0x15198b,_0x4e754c,_0x1d5bfc,_0x44c3('0x1a6'));}}break;case'8':_0xab976f[_0x44c3('0x1a7')]+=0x1;_0x15198b[_0x44c3('0x67')]=0x8;_0x15198b['statedesc']=_0x44c3('0x1a8');_0x15198b[_0x44c3('0x117')]+=0x1;_0x15198b[_0x44c3('0xcd')]+=0x1;_0x3c0058=_0xab976f[_0x44c3('0x18c')];_0x22ef6c=_0xab976f[_0x44c3('0xcf')];ami[_0x44c3('0x38')](_0x44c3('0x1a9'),ut[_0x44c3('0x115')](_0x31141f,_0x44c3('0x1aa')));hopperUtils[_0x44c3('0xc0')](_0x15198b)[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x1ab')));if(_0x48ea1a[_0x44c3('0x186')](0x8,_0x31141f,_0xab976f)&&!_0x1eb4f7){if(_0x15198b[_0x44c3('0x117')]>=_0xab976f[_0x44c3('0x18b')]){_0x48ea1a[_0x44c3('0x11e')](_0x15198b,_0x4e754c,_0x1d5bfc,_0x44c3('0x1ac'));}else{_0x48ea1a['stateGlobal'](_0x15198b,_0x4e754c,_0x1d5bfc,'reason\x208\x20congestion');}}break;case'11':_0xab976f[_0x44c3('0x1ad')]+=0x1;_0x15198b[_0x44c3('0x67')]=0xb;_0x15198b[_0x44c3('0x68')]='Abandoned';_0x15198b[_0x44c3('0xe5')]+=0x1;_0x15198b['countglobal']+=0x1;_0x3c0058=_0xab976f['dialAbandonedRetryFrequency'];_0x22ef6c=_0xab976f[_0x44c3('0xcf')];hopperUtils[_0x44c3('0xc0')](_0x15198b)['catch'](loggerCatch('[syncAgentComplete][createHistory][11]'));if(_0x48ea1a[_0x44c3('0x186')](0xb,_0x31141f,_0xab976f)&&!_0x1eb4f7){if(_0x15198b[_0x44c3('0xe5')]>=_0xab976f[_0x44c3('0xe7')]){_0x48ea1a[_0x44c3('0x11e')](_0x15198b,_0x4e754c,_0x1d5bfc,_0x44c3('0x1ae'));}else{_0x48ea1a['stateGlobal'](_0x15198b,_0x4e754c,_0x1d5bfc,_0x44c3('0x1ae'));}}break;case'20':_0xab976f[_0x44c3('0x1af')]+=0x1;_0x15198b[_0x44c3('0x67')]=0x14;_0x15198b['statedesc']=_0x44c3('0x1b0');_0x15198b[_0x44c3('0x119')]+=0x1;_0x15198b[_0x44c3('0xcd')]+=0x1;_0x3c0058=_0xab976f[_0x44c3('0x1b1')];_0x22ef6c=_0xab976f[_0x44c3('0xcf')];ami[_0x44c3('0x38')](_0x44c3('0x1b2'),ut['buildObj'](_0x31141f,_0x44c3('0x1b3')));hopperUtils['createHistory'](_0x15198b)[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x1b4')));if(_0x48ea1a[_0x44c3('0x186')](0x14,_0x31141f,_0xab976f)&&!_0x1eb4f7){if(_0x15198b[_0x44c3('0x119')]>=_0xab976f[_0x44c3('0x193')]){_0x48ea1a[_0x44c3('0x11e')](_0x15198b,_0x4e754c,_0x1d5bfc,_0x44c3('0x1b5'));}else{_0x48ea1a[_0x44c3('0x11b')](_0x15198b,_0x4e754c,_0x1d5bfc,_0x44c3('0x1b5'));}}break;default:_0xab976f[_0x44c3('0x1b6')]+=0x1;_0x15198b[_0x44c3('0x67')]=0xc;_0x15198b[_0x44c3('0x68')]=_0x374100[_0x44c3('0xbc')];_0x3c0058=_0xab976f[_0x44c3('0x1b1')];_0x22ef6c=_0xab976f[_0x44c3('0xcf')];hopperUtils[_0x44c3('0xc0')](_0x15198b)[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x1b7')));if(_0x48ea1a[_0x44c3('0x186')](_0x374100[_0x44c3('0xbc')],_0x31141f,_0xab976f)&&!_0x1eb4f7){if(_0x15198b[_0x44c3('0x122')]+_0x15198b[_0x44c3('0x117')]+_0x15198b['countnoanswerretry']+_0x15198b['countnosuchnumberretry']+_0x15198b[_0x44c3('0xd3')]+_0x15198b[_0x44c3('0xe5')]+_0x15198b['countmachineretry']+_0x15198b['countagentrejectretry']>=_0xab976f[_0x44c3('0x11a')]){_0x48ea1a[_0x44c3('0x11b')](_0x15198b,_0x4e754c,_0x1d5bfc,_0x374100[_0x44c3('0xbc')]);}else{_0x48ea1a[_0x44c3('0x11e')](_0x15198b,_0x4e754c,_0x1d5bfc,_0x374100[_0x44c3('0xbc')]);}}}})['then'](function(){if(_0x1eb4f7){hopperUtils[_0x44c3('0xe0')](_0x15198b,_0x3c0058,_0x22ef6c)['then'](function(){return _0x4e754c(0x1);});}});});};Dialer[_0x44c3('0x17')][_0x44c3('0x11b')]=function(_0x454565,_0x43e54b,_0x39a6af,_0x580078){var _0x5dd872=new Final(_0x454565);_0x5dd872[_0x44c3('0x67')]=0xf;_0x5dd872[_0x44c3('0x68')]='Global';this[_0x44c3('0x11e')](_0x5dd872,_0x43e54b,_0x39a6af,_0x580078);};Dialer[_0x44c3('0x17')][_0x44c3('0x11e')]=function(_0x367491,_0x449fcc,_0x5f5252,_0x2ff558){hopperUtils[_0x44c3('0xc2')](_0x367491)['then'](function(){return _0x449fcc(msgResponse(_0x44c3('0x196'),_0x44c3('0x1b8'),_0x2ff558));})['catch'](function(){return _0x5f5252(msgResponse(_0x44c3('0x1b9'),_0x44c3('0x8c'),_0x44c3('0x1ba')));});};Dialer['prototype']['predictive']=function(_0x1a8a01){var _0x556f79=_0x1a8a01[_0x44c3('0x1bb')]/0x64;var _0xa32231=_0x1a8a01['outboundDropCallsDayTimeout']/(_0x1a8a01[_0x44c3('0xc8')]+_0x1a8a01[_0x44c3('0xbb')]);var _0x3f106c=Math[_0x44c3('0x1bc')](_0x1a8a01[_0x44c3('0x1bd')]*(_0x1a8a01[_0x44c3('0x1be')]/0x64));var _0x4fe0ee=Math['round'](_0x1a8a01[_0x44c3('0x1bd')]*(_0x1a8a01[_0x44c3('0x1bf')]/0x64));var _0x539057=_0x1a8a01[_0x44c3('0x134')]+_0x1a8a01[_0x44c3('0x1c0')];var _0x49d204=Math[_0x44c3('0x1c1')](_0x1a8a01[_0x44c3('0x50')]*_0x1a8a01[_0x44c3('0x54')]*_0x1a8a01[_0x44c3('0x1c2')]*_0x1a8a01[_0x44c3('0x1c3')]);if(_['isUndefined'](_0x1a8a01['startProgressive'])){if(!_[_0x44c3('0x4b')](_0x1a8a01[_0x44c3('0x133')])){_0x1a8a01[_0x44c3('0x133')]=undefined;loggerPredictive[_0x44c3('0x5e')](_0x44c3('0x1c4'),_0x44c3('0x1c5'));}if(!_[_0x44c3('0x4b')](_0x1a8a01[_0x44c3('0x5c')])){loggerPredictive[_0x44c3('0x5e')](_0x44c3('0x1c4'),_0x44c3('0x1c6'));clearInterval(_0x1a8a01[_0x44c3('0x5c')]);_0x1a8a01['handlePredictive']=undefined;}_0x1a8a01[_0x44c3('0x58')]=moment()[_0x44c3('0x77')](_0x44c3('0xb9'));loggerPredictive[_0x44c3('0x3f')](_0x1a8a01[_0x44c3('0x5a')],_0x44c3('0x1c7'),_0x1a8a01[_0x44c3('0x58')]);this[_0x44c3('0xab')](_0x1a8a01,0x1);}else if(ifInterval(_0x1a8a01[_0x44c3('0x1c8')],_0x1a8a01[_0x44c3('0x58')])){this['handlePower'](_0x1a8a01,0x1);loggerPredictiveCalls[_0x44c3('0x3f')](_0x44c3('0x1c9'),_0x1a8a01['startProgressive'],_0x1a8a01['name']);_0x1a8a01[_0x44c3('0x50')]=0x0;_0x1a8a01[_0x44c3('0xc9')]=0x0;}else if(_0x556f79<_0xa32231&&_0x1a8a01['dialPredictiveOptimization']===_0x44c3('0x1ca')){clearPredictiveAttributes(_0x1a8a01);loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x1cb'),_0x44c3('0x1cc'),_0xa32231,_0x44c3('0x58'),_0x1a8a01[_0x44c3('0x5a')]);}else if(_0x49d204<_0x1a8a01[_0x44c3('0xc9')]&&_0x1a8a01['dialPredictiveOptimization']==='dropRate'){clearPredictiveAttributes(_0x1a8a01);loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x1cd'),_0x44c3('0x1ce'),_0x49d204,_0x44c3('0x1cf'),_0x1a8a01[_0x44c3('0xc9')],_0x44c3('0x58'),_0x1a8a01[_0x44c3('0x5a')]);}else if(!ifInterval(_0x1a8a01['dialPredictiveInterval'],_0x1a8a01[_0x44c3('0x58')])&&_[_0x44c3('0x4b')](_0x1a8a01[_0x44c3('0x133')])&&!_[_0x44c3('0x4b')](_0x1a8a01['startProgressive'])){_0x1a8a01[_0x44c3('0x133')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive['info'](_0x1a8a01['name'],_0x44c3('0x1d0'),_0x1a8a01['startPredictive']);hopperUtils[_0x44c3('0x1d1')](_0x1a8a01[_0x44c3('0x1c8')])[_0x44c3('0x37')](this[_0x44c3('0x1d2')](_0x1a8a01))[_0x44c3('0x37')](mergeDataErlangB(_0x1a8a01))[_0x44c3('0x37')](this['startMethodPredictive'](_0x1a8a01))[_0x44c3('0x9a')](loggerCatchPredictive('Predictive\x20after\x20first\x20interval',_0x1a8a01));}else if(!ifInterval(_0x1a8a01[_0x44c3('0x1c8')],_0x1a8a01[_0x44c3('0x133')])){_0x1a8a01[_0x44c3('0xc9')]=0x0;_0x1a8a01[_0x44c3('0x133')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive[_0x44c3('0x3f')](_0x1a8a01['name'],_0x44c3('0x1d3'),_0x1a8a01[_0x44c3('0x133')]);clearInterval(_0x1a8a01[_0x44c3('0x5c')]);_0x1a8a01[_0x44c3('0x5c')]=undefined;hopperUtils['avgHandleTime'](_0x1a8a01[_0x44c3('0x1c8')])[_0x44c3('0x37')](this['getDataPredictive'](_0x1a8a01))[_0x44c3('0x37')](mergeDataErlangB(_0x1a8a01))[_0x44c3('0x37')](this['startMethodPredictive'](_0x1a8a01))[_0x44c3('0x9a')](loggerCatchPredictive(_0x44c3('0x1d4'),_0x1a8a01));}else if(_0x1a8a01['predictiveIntervalAvailable']&&_0x539057<_0x1a8a01['predictiveIntervalAvailable']-_0x4fe0ee){clearPredictiveAttributes(_0x1a8a01);loggerPredictive[_0x44c3('0x3f')](_0x1a8a01[_0x44c3('0x5a')],_0x44c3('0x1d5'),_0x539057,_0x44c3('0x1d6'),_0x1a8a01[_0x44c3('0x1bd')],'-',_0x4fe0ee,'=',_0x1a8a01[_0x44c3('0x1bd')]-_0x4fe0ee,')');}else if(_0x1a8a01[_0x44c3('0x1bd')]&&_0x539057>_0x1a8a01['predictiveIntervalAvailable']+_0x3f106c){clearPredictiveAttributes(_0x1a8a01);loggerPredictive[_0x44c3('0x3f')](_0x1a8a01[_0x44c3('0x5a')],_0x44c3('0x1d5'),_0x539057,')\x20are\x20more\x20than\x20threshold\x20(',_0x1a8a01['predictiveIntervalAvailable'],'+',_0x3f106c,'=',_0x1a8a01[_0x44c3('0x1bd')]+_0x3f106c,')');}};Dialer['prototype'][_0x44c3('0x1d2')]=function(_0xab7307){var _0x91afb3=this;return function(_0x199e1a){return new Promise(function(_0x274925,_0x2dd409){_[_0x44c3('0x57')](_0xab7307,_0x199e1a[0x0]);if(checkGetDataPredictive(_0x199e1a[0x0])){var _0x44e5dc=_0xab7307[_0x44c3('0x1bd')]=_0xab7307[_0x44c3('0x1c0')]+_0xab7307[_0x44c3('0x134')];var _0x450961=_0xab7307[_0x44c3('0x1c8')]*0x3c;var _0x1f3db0=_0x199e1a[0x0][_0x44c3('0x48')]+_0x199e1a[0x0]['predictiveIntervalAvgHoldtime'];var _0x41f233=(_0x199e1a[0x0]['predictiveIntervalAnsweredCalls']+_0x199e1a[0x0][_0x44c3('0x45')]+_0x199e1a[0x0][_0x44c3('0xe1')])/_0x199e1a[0x0]['predictiveIntervalTotalCalls'];_0xab7307[_0x44c3('0x1c2')]=_0x41f233>0x0?_0x41f233:0x1;switch(_0xab7307[_0x44c3('0x1d7')]){case'dropRate':var _0x32a2c3=_0xab7307[_0x44c3('0x1bb')]/0x64;return _0x91afb3[_0x44c3('0x1d8')](_0x44e5dc,_0x450961,_0x1f3db0,_0x41f233,_0x32a2c3)[_0x44c3('0x37')](function(_0x5b5146){return _0x274925(_0x5b5146);});case _0x44c3('0x1d9'):var _0xfa4e12=_0xab7307[_0x44c3('0x1bb')]/0x64;return _0x91afb3['busyFactor'](_0x44e5dc,_0x450961,_0x1f3db0,_0x41f233,_0xfa4e12)[_0x44c3('0x37')](function(_0x4bc65a){return _0x274925(_0x4bc65a);});default:return _0x2dd409(msgResponse(_0x44c3('0x1da'),_0x44c3('0x8c'),_0x44c3('0x1db')));}}else{return _0x2dd409(msgResponse(_0x44c3('0x1da'),'Failure',_0x44c3('0x1dc')));}});};};Dialer[_0x44c3('0x17')]['getDataPredictiveOld']=function(_0x99a64){var _0x5d455e=this;return function(_0x43cea8){return new Promise(function(_0x470259,_0x125b85){_[_0x44c3('0x57')](_0x99a64,_0x43cea8[0x0]);if(checkGetDataPredictive(_0x43cea8[0x0])){loggerPredictive['info'](JSON['stringify'](_0x43cea8[0x0]));if(_0x99a64[_0x44c3('0x1d7')]===_0x44c3('0x1ca')){return _0x5d455e[_0x44c3('0x147')](_0x99a64['id'])[_0x44c3('0x37')](function(_0x2d83ab){var _0x3e7514=_0x99a64[_0x44c3('0x1dd')]-_0x2d83ab[0x0][_0x44c3('0x1de')];var _0x3845d8=_0x99a64[_0x44c3('0x1c8')]*0x3c;var _0x2bc524=_0x43cea8[0x0][_0x44c3('0x48')]+_0x43cea8[0x0][_0x44c3('0x4c')];var _0x5976c7=(_0x43cea8[0x0]['predictiveIntervalAnsweredCalls']+_0x43cea8[0x0][_0x44c3('0x45')]+_0x43cea8[0x0][_0x44c3('0xe1')])/_0x43cea8[0x0]['predictiveIntervalTotalCalls'];var _0x1369a2=_0x99a64[_0x44c3('0x1bb')]/0x64;_0x99a64[_0x44c3('0x1df')]=_0x2d83ab[0x0][_0x44c3('0x1de')]||0x0;_0x99a64['predictiveIntervalHitRate']=_0x5976c7>0x0?_0x5976c7:0x1;return _0x5d455e['abandonmentRate'](_0x3e7514,_0x3845d8,_0x2bc524,_0x5976c7,_0x1369a2);})['then'](function(_0x3136a2){return _0x470259(_0x3136a2);})[_0x44c3('0x9a')](function(_0x235bb5){return _0x125b85(msgResponse(_0x44c3('0x1e0'),_0x44c3('0x8c'),JSON[_0x44c3('0x6d')](_0x235bb5)));});}if(_0x99a64['dialPredictiveOptimization']===_0x44c3('0x1d9')){return _0x5d455e[_0x44c3('0x147')](_0x99a64['id'])[_0x44c3('0x37')](function(_0x245b96){var _0x3da49c=_0x99a64['loggedIn']-_0x245b96[0x0][_0x44c3('0x1de')];var _0x25ee2f=_0x99a64[_0x44c3('0x1c8')]*0x3c;var _0x33257e=_0x43cea8[0x0][_0x44c3('0x48')]+_0x43cea8[0x0]['predictiveIntervalAvgHoldtime'];var _0x2591e4=(_0x43cea8[0x0][_0x44c3('0x43')]+_0x43cea8[0x0][_0x44c3('0x45')]+_0x43cea8[0x0][_0x44c3('0xe1')])/_0x43cea8[0x0][_0x44c3('0x4a')];var _0x260c52=_0x99a64[_0x44c3('0x1bb')]/0x64;_0x99a64[_0x44c3('0x1df')]=_0x245b96[0x0][_0x44c3('0x1de')]||0x0;_0x99a64[_0x44c3('0x1c2')]=_0x2591e4>0x0?_0x2591e4:0x1;return _0x5d455e['busyFactor'](_0x3da49c,_0x25ee2f,_0x33257e,_0x2591e4,_0x260c52);})[_0x44c3('0x37')](function(_0x97b324){return _0x470259(_0x97b324);})[_0x44c3('0x9a')](function(_0x1fb417){return _0x125b85(msgResponse(_0x44c3('0x1e0'),_0x44c3('0x8c'),JSON['stringify'](_0x1fb417)));});}}else{return _0x125b85(msgResponse(_0x44c3('0x1da'),_0x44c3('0x8c'),'check\x20failure'));}});};};Dialer['prototype'][_0x44c3('0x1e1')]=function(_0xd12e0a){var _0x1bfe69=this;return function(){var _0xa38a80=0x0;var _0x15dcc0=Math[_0x44c3('0x1c1')](_0xd12e0a[_0x44c3('0x52')]*0x3e8);if(_0x15dcc0>0x0){_0x15dcc0=_0x15dcc0<0x64?0x64:_0x15dcc0;loggerPredictive[_0x44c3('0x3f')](_0xd12e0a[_0x44c3('0x5a')],_0x44c3('0x1e2'),_0x15dcc0,_0x44c3('0x1e3'));_0xd12e0a[_0x44c3('0x5c')]=setInterval(function(){_0x1bfe69['handlePredictive'](_0xd12e0a);loggerPredictiveCalls[_0x44c3('0x3f')](_0x44c3('0x1e4'),_0xa38a80+=0x1);},_0x15dcc0);}else{loggerPredictive[_0x44c3('0x3f')](_0xd12e0a['name'],'fail\x20to\x20scheduled\x20calls');}};};Dialer[_0x44c3('0x17')][_0x44c3('0x1e5')]=function(_0x4b52d9,_0x4d1714){var _0x10adb4=this;return function(_0x43d179){if(_['isEmpty'](_0x43d179)){if(_[_0x44c3('0xf1')](_0x4d1714[_0x44c3('0x14d')])||!_0x4d1714['recallme']){if(_0x4b52d9[_0x44c3('0xa9')]===_0x44c3('0xae')){_0x4b52d9['queueStatusComplete']=_[_0x44c3('0x4b')](_0x4b52d9[_0x44c3('0x6c')])?!![]:_0x4b52d9['queueStatusComplete'];var _0x3000e5=uuid['v4']();_0x10adb4[_0x44c3('0x20')][_0x3000e5]=new Action(_0x4b52d9,_0x4d1714,_0x3000e5);loggerBooked[_0x44c3('0x3f')]('[booked][checkContactBlack]',_0x3000e5,_0x44c3('0x1e6'),JSON[_0x44c3('0x6d')](_0x4b52d9[_0x44c3('0x6c')]),_0x44c3('0x1e7'),_0x4b52d9[_0x44c3('0x5a')]);if(_0x4b52d9[_0x44c3('0x6c')]){_0x4b52d9[_0x44c3('0x6c')]=![];_0x10adb4[_0x44c3('0xf2')][_0x10adb4[_0x44c3('0x20')][_0x3000e5][_0x44c3('0xb5')]]=[];ami[_0x44c3('0x94')]({'actionid':_0x3000e5,'action':_0x44c3('0x1e8'),'queue':_0x4b52d9[_0x44c3('0x5a')]})[_0x44c3('0x9a')](function(){_0x10adb4[_0x44c3('0xb7')](_0x4b52d9);hopperUtils[_0x44c3('0xd6')]({'active':![],'ContactId':_0x10adb4[_0x44c3('0x20')][_0x3000e5][_0x44c3('0xd9')],'ListId':_0x10adb4[_0x44c3('0x20')][_0x3000e5][_0x44c3('0xda')],'VoiceQueueId':_0x10adb4['actions'][_0x3000e5][_0x44c3('0xdb')]||undefined,'CampaignId':_0x10adb4['actions'][_0x3000e5][_0x44c3('0xdc')]||undefined})[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x1e9')));delete _0x10adb4[_0x44c3('0x20')][_0x3000e5];});}else{loggerBooked[_0x44c3('0x3f')](_0x44c3('0x1ea'),JSON[_0x44c3('0x6d')](_0x4b52d9['queueStatusComplete']),_0x44c3('0x1e7'),_0x4b52d9['name']);_0x10adb4['updateOriginated'](_0x4b52d9);hopperUtils[_0x44c3('0xd6')]({'active':![],'ContactId':_0x10adb4[_0x44c3('0x20')][_0x3000e5][_0x44c3('0xd9')],'ListId':_0x10adb4[_0x44c3('0x20')][_0x3000e5][_0x44c3('0xda')],'VoiceQueueId':_0x10adb4[_0x44c3('0x20')][_0x3000e5]['VoiceQueueId']||undefined,'CampaignId':_0x10adb4[_0x44c3('0x20')][_0x3000e5][_0x44c3('0xdc')]||undefined})['catch'](loggerCatch(_0x44c3('0x1e9')));delete _0x10adb4[_0x44c3('0x20')][_0x3000e5];}}else{return _0x10adb4[_0x44c3('0x152')](_0x4b52d9,_0x4d1714);}}else{if(utils['getSeconds'](undefined,_0x4d1714['scheduledat'])<_0x4b52d9['dialRecallMeTimeout']*0x3c){if(_0x4d1714[_0x44c3('0x13e')]&&!_0x4d1714[_0x44c3('0x13e')][_0x44c3('0x1eb')]){_0x10adb4[_0x44c3('0x1b')]['run'](_0x4d1714['id'])['finally'](function(){_0x10adb4[_0x44c3('0xb7')](_0x4b52d9);});}else{hopperUtils[_0x44c3('0x1ec')]({'active':![]},_0x4d1714['id'],0x1)[_0x44c3('0xfa')](function(){_0x10adb4[_0x44c3('0xb7')](_0x4b52d9);});}}else{_0x4b52d9[_0x44c3('0x1ed')]+=0x1;_0x10adb4[_0x44c3('0xb7')](_0x4b52d9);if(_0x4b52d9[_0x44c3('0x1ee')]){hopperUtils[_0x44c3('0xd6')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x4d1714['ContactId'],'ListId':_0x4d1714[_0x44c3('0xda')],'VoiceQueueId':_0x4d1714[_0x44c3('0xdb')]||undefined,'CampaignId':_0x4d1714[_0x44c3('0xdc')]||undefined})[_0x44c3('0x9a')](loggerCatch('[rescheduleContact][dialRecallInQueue]'));hopperUtils[_0x44c3('0xc0')](createObjHistory(_0x4b52d9,_0x4d1714,utils[_0x44c3('0x64')][_0x44c3('0x1ef')],0x17,_0x44c3('0x1f0')))[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x1f1')));}else{_0x10adb4['saveInDb'](createObjHistory(_0x4b52d9,_0x4d1714,utils[_0x44c3('0x64')][_0x44c3('0x1f2')],0x16,_0x44c3('0x1f3')),_0x44c3('0x1f4'),'[Originate][HistoryRecallClose]');}}}}else{_0x4b52d9['outboundBlacklistCallsDay']+=0x1;_0x10adb4[_0x44c3('0x110')](createObjHistory(_0x4b52d9,_0x4d1714,utils['CAMPAIGN_STATUS'][_0x44c3('0x1f5')],0xd,_0x44c3('0x1f6')),'[Originate][historyBlacklist]','[Originate][MoveBlacklist]');throw _0x44c3('0x1f7');}};};Dialer[_0x44c3('0x17')][_0x44c3('0x151')]=function(_0x2ac093){var _0x10a1b3=this;var _0x2d853b=_0x2ac093[_0x44c3('0x1f8')]-_0x2ac093[_0x44c3('0x148')];emitCampaignSummary(_0x2ac093);if(_0x2d853b>0x0&&_0x2ac093[_0x44c3('0x1f9')]==0x0){if(_0x2d853b>this[_0x44c3('0x1f')]){_0x2d853b=this[_0x44c3('0x1f')];}_0x2ac093['temp']=0x1;hopperUtils['getContactDialerIvr'](_0x2ac093,_0x2d853b)[_0x44c3('0x37')](function(_0x365465){_0x2ac093[_0x44c3('0x1f9')]=0x0;if(_0x365465){if(!utils[_0x44c3('0x1fa')](_0x365465)){_0x2ac093['message']=utils[_0x44c3('0x64')][_0x44c3('0x1fb')];logger[_0x44c3('0x3f')](_0x44c3('0x1fc')+_0x2ac093[_0x44c3('0x5a')]);}else{_0x2ac093[_0x44c3('0x148')]+=_0x365465[_0x44c3('0x93')];_0x2ac093[_0x44c3('0x63')]=utils[_0x44c3('0x64')][_0x44c3('0x1fd')];for(var _0x21aa24=0x0;_0x21aa24<_0x365465[_0x44c3('0x93')];_0x21aa24+=0x1){_0x2ac093['ivrTotalCallsDays']+=0x1;if(_['isNil'](_0x365465[_0x21aa24])||_[_0x44c3('0xf1')](_0x365465[_0x21aa24]['Contact'])||_['isNil'](_0x365465[_0x21aa24][_0x44c3('0x155')])){_0x10a1b3[_0x44c3('0x14c')](_0x44c3('0x1fe'),_0x2ac093,_0x365465[_0x21aa24]);}else{hopperUtils[_0x44c3('0x1ff')](_['pick'](_0x365465[_0x21aa24],[_0x44c3('0xdc'),_0x44c3('0x155')]))['then'](_0x10a1b3[_0x44c3('0x1e5')](_0x2ac093,_0x365465[_0x21aa24]))['catch'](_0x10a1b3[_0x44c3('0x14b')](_0x44c3('0x200'),_0x2ac093));}}}}})[_0x44c3('0x9a')](loggerGetContactDialer(_0x44c3('0x201'),_0x2ac093,_0x2d853b));}};Dialer['prototype'][_0x44c3('0xab')]=function(_0x26341c,_0x2f6dc6){var _0x3a9dee=this;var _0x3a5167=[];if(_0x2f6dc6<0x1||_0x26341c[_0x44c3('0xa9')]===_0x44c3('0xae')){_0x2f6dc6=0x1;}var _0x199152=Math[_0x44c3('0x1c1')](_0x26341c[_0x44c3('0x134')]*_0x2f6dc6)-_0x26341c[_0x44c3('0x148')];if(_0x26341c[_0x44c3('0x202')]>0x0){var _0x11e759=_0x26341c[_0x44c3('0x202')]-_0x26341c[_0x44c3('0x148')]-_0x26341c[_0x44c3('0x1c0')]-_0x26341c[_0x44c3('0x203')];if(_0x199152>_0x11e759){_0x199152=_0x11e759;}}if(_0x199152>0x0&&_0x26341c[_0x44c3('0x1f9')]==0x0){if(_0x26341c[_0x44c3('0xa9')]===_0x44c3('0xae')){_0x199152=0x1;}if(_0x199152>this[_0x44c3('0x1f')]){_0x199152=this['maxNumberOriginate'];}for(var _0x48195d in this[_0x44c3('0xed')]){if(typeof this['agents'][_0x48195d]!==_0x44c3('0x145')){if(this[_0x44c3('0xed')][_0x48195d][_0x44c3('0x67')]===_0x44c3('0x204')&&this[_0x44c3('0xed')][_0x48195d]['status']===_0x44c3('0x205')){_0x3a5167[_0x44c3('0x9b')](this[_0x44c3('0xed')][_0x48195d]['id']);}}}_0x26341c['temp']=0x1;hopperUtils[_0x44c3('0x206')](_0x26341c,_0x3a5167,_0x199152)['then'](function(_0x4427bb){_0x26341c[_0x44c3('0x1f9')]=0x0;if(_0x4427bb){if(!utils[_0x44c3('0x1fa')](_0x4427bb)){hopperUtils[_0x44c3('0x207')](_0x26341c)['then'](sendMessageReschedule(_0x26341c))[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x208')));}else{_0x26341c[_0x44c3('0x148')]+=_0x4427bb['length'];_0x26341c[_0x44c3('0x63')]=_0x26341c[_0x44c3('0xa9')]===_0x44c3('0xae')?utils[_0x44c3('0x64')][_0x44c3('0x15c')]:utils[_0x44c3('0x64')][_0x44c3('0x1fd')];for(var _0x6cbf03=0x0;_0x6cbf03<_0x4427bb[_0x44c3('0x93')];_0x6cbf03+=0x1){if(_[_0x44c3('0xf1')](_0x4427bb[_0x6cbf03])||_['isNil'](_0x4427bb[_0x6cbf03]['Contact'])||_['isNil'](_0x4427bb[_0x6cbf03]['phone'])){_0x3a9dee[_0x44c3('0x14c')](_0x44c3('0x1fe'),_0x26341c,_0x4427bb[_0x6cbf03]);}else{hopperUtils[_0x44c3('0x209')](_['pick'](_0x4427bb[_0x6cbf03],[_0x44c3('0xdb'),_0x44c3('0x155')]))[_0x44c3('0x37')](_0x3a9dee[_0x44c3('0x1e5')](_0x26341c,_0x4427bb[_0x6cbf03]))['catch'](_0x3a9dee[_0x44c3('0x14b')](_0x44c3('0x1fe'),_0x26341c));}}}}})[_0x44c3('0x9a')](loggerGetContactDialer('[getContactDialer2]',_0x26341c,_0x199152));}};Dialer['prototype'][_0x44c3('0x5c')]=function(_0x1100cf){if(_0x1100cf[_0x44c3('0x202')]>0x0){var _0x368c4d=_0x1100cf['dialLimitQueue']-_0x1100cf[_0x44c3('0x148')]-_0x1100cf['talking'];if(_0x368c4d>0x0&&_0x1100cf[_0x44c3('0x1f9')]==0x0){this['tryOriginatePredictive'](_0x1100cf);}else{loggerPredictiveCalls[_0x44c3('0x3f')](_0x44c3('0x20a'));}}else{this['tryOriginatePredictive'](_0x1100cf);}};Dialer[_0x44c3('0x17')][_0x44c3('0x20b')]=function(_0x2cbe1f){var _0x634b8c=this;var _0x5ad0bb=[];_0x2cbe1f[_0x44c3('0x148')]+=0x1;for(var _0xb6b4ff in this[_0x44c3('0xed')]){if(typeof this[_0x44c3('0xed')][_0xb6b4ff]!=='undefined'){if(this['agents'][_0xb6b4ff][_0x44c3('0x67')]===_0x44c3('0x204')&&this['agents'][_0xb6b4ff][_0x44c3('0x82')]===_0x44c3('0x205')){_0x5ad0bb[_0x44c3('0x9b')](this[_0x44c3('0xed')][_0xb6b4ff]['id']);}}}_0x2cbe1f[_0x44c3('0x1f9')]=0x1;return this[_0x44c3('0x206')](_0x2cbe1f['id'],_0x5ad0bb,0x1,_0x2cbe1f[_0x44c3('0x20c')],_0x2cbe1f)[_0x44c3('0x37')](function(_0xaf6e79){_0x2cbe1f[_0x44c3('0x1f9')]=0x1;if(_0xaf6e79){if(!utils['checkContactEmpty'](_0xaf6e79)){utils[_0x44c3('0x61')](_0x2cbe1f,0x1,0x0);return hopperUtils[_0x44c3('0x207')](_0x2cbe1f)[_0x44c3('0x37')](sendMessageReschedule(_0x2cbe1f))[_0x44c3('0x9a')](loggerCatch(_0x44c3('0x208')));}else{_0x2cbe1f['message']=utils[_0x44c3('0x64')]['RUNNING'];if(_[_0x44c3('0xf1')](_0xaf6e79[0x0])||_[_0x44c3('0xf1')](_0xaf6e79[0x0][_0x44c3('0x16f')])||_[_0x44c3('0xf1')](_0xaf6e79[0x0]['phone'])){_0x634b8c[_0x44c3('0x14c')](_0x44c3('0x1fe'),_0x2cbe1f,_0xaf6e79[0x0]);}else{return hopperUtils[_0x44c3('0x209')](_[_0x44c3('0x6e')](_0xaf6e79[0x0],[_0x44c3('0xdb'),_0x44c3('0x155')]))[_0x44c3('0x37')](_0x634b8c[_0x44c3('0x1e5')](_0x2cbe1f,_0xaf6e79[0x0]))[_0x44c3('0x9a')](_0x634b8c[_0x44c3('0x14b')](_0x44c3('0x20d'),_0x2cbe1f));}}}})[_0x44c3('0x9a')](loggerGetContactDialer(_0x44c3('0x20e'),_0x2cbe1f,0x1));};Dialer[_0x44c3('0x17')][_0x44c3('0x1d8')]=function(_0x42b347,_0x213b3e,_0x471a80,_0x27d5da,_0x3399cc,_0x3016df){loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x20f'));loggerPredictive[_0x44c3('0x3f')]('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',_0x42b347);loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x210'),_0x213b3e);loggerPredictive[_0x44c3('0x3f')]('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',_0x471a80);loggerPredictive['info'](_0x44c3('0x211'),_0x27d5da);loggerPredictive['info'](_0x44c3('0x212'),_0x3399cc);loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x49'));return new Promise(function(_0x103969,_0x5b4ca7){if(_0x42b347<=0x0||isNaN(_0x42b347)){return _0x5b4ca7(msgResponse(_0x44c3('0x213'),'Error',_0x44c3('0x214')+_0x42b347));}if(_0x471a80<=0x0||isNaN(_0x471a80)){return _0x5b4ca7(msgResponse(_0x44c3('0x213'),_0x44c3('0x7f'),_0x44c3('0x215')+_0x471a80));}if(_0x27d5da<=0x0||isNaN(_0x27d5da)){return _0x5b4ca7(msgResponse(_0x44c3('0x213'),'Error',_0x44c3('0x216')+_0x27d5da));}if(_0x213b3e<=0x0||isNaN(_0x213b3e)){return _0x5b4ca7(msgResponse(_0x44c3('0x213'),_0x44c3('0x7f'),_0x44c3('0x217')+_0x213b3e));}if(_0x3399cc<=0x0||isNaN(_0x3399cc)){return _0x5b4ca7(msgResponse(_0x44c3('0x213'),'Error',_0x44c3('0x218')+_0x3399cc));}_0x3016df=_0x3016df||0x0;var _0x35fe59=0x1/_0x471a80;var _0x47c3cb=0x0;var _0x13eb0b=0x0;var _0x37fb87=0x0;var _0x592973=0x0;for(var _0x13bdf1=0x0;_0x37fb87<_0x3399cc;_0x13bdf1+=0x1){_0x13eb0b=_0x13bdf1/_0x213b3e;_0x47c3cb=(_0x27d5da*_0x13eb0b+_0x3016df)/_0x35fe59;_0x37fb87=utils[_0x44c3('0x219')](_0x47c3cb,_0x42b347);_0x592973=_0x47c3cb/_0x42b347*(0x1-utils[_0x44c3('0x219')](_0x47c3cb,_0x42b347));}return _0x103969({'erlangCalls':_0x13bdf1,'erlangCallToSecond':_0x213b3e/_0x13bdf1,'erlangAbandonmentRate':_0x37fb87,'erlangBusyFactor':_0x592973});});};Dialer[_0x44c3('0x17')][_0x44c3('0x21a')]=function(_0x236c78,_0x4701a6,_0x310657,_0x414ee1,_0x55b4e7,_0x3fffdd){loggerPredictive[_0x44c3('0x3f')]('----\x20Agent\x20Busy\x20Factor\x20----');loggerPredictive['info'](_0x44c3('0x21b'),_0x236c78);loggerPredictive['info'](_0x44c3('0x210'),_0x4701a6);loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x21c'),_0x310657);loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x211'),_0x414ee1);loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x21d'),_0x55b4e7);loggerPredictive[_0x44c3('0x3f')](_0x44c3('0x49'));return new Promise(function(_0x6d06d6,_0x536ad7){if(_0x236c78<=0x0||isNaN(_0x236c78)){return _0x536ad7(msgResponse(_0x44c3('0x21e'),_0x44c3('0x7f'),_0x44c3('0x214')+_0x236c78));}if(_0x310657<=0x0||isNaN(_0x310657)){return _0x536ad7(msgResponse(_0x44c3('0x21e'),_0x44c3('0x7f'),_0x44c3('0x215')+_0x310657));}if(_0x414ee1<=0x0||isNaN(_0x414ee1)){return _0x536ad7(msgResponse(_0x44c3('0x21e'),_0x44c3('0x7f'),_0x44c3('0x216')+_0x414ee1));}if(_0x4701a6<=0x0||isNaN(_0x4701a6)){return _0x536ad7(msgResponse(_0x44c3('0x21e'),_0x44c3('0x7f'),'interval\x20=\x20'+_0x4701a6));}if(_0x55b4e7<=0x0||isNaN(_0x55b4e7)){return _0x536ad7(msgResponse(_0x44c3('0x21e'),_0x44c3('0x7f'),_0x44c3('0x21f')+_0x55b4e7));}_0x3fffdd=_0x3fffdd||0x0;var _0x3f94c3=0x1/_0x310657;var _0x5e8bde=0x0;var _0x4cbef4=0x0;var _0xeb13d4=0x0;var _0x483737=0x0;for(var _0x377c83=0x0;_0x483737<_0x55b4e7;_0x377c83+=0x1){_0x4cbef4=_0x377c83/_0x4701a6;_0x5e8bde=(_0x414ee1*_0x4cbef4+_0x3fffdd)/_0x3f94c3;_0xeb13d4=utils[_0x44c3('0x219')](_0x5e8bde,_0x236c78);_0x483737=_0x5e8bde/_0x236c78*(0x1-utils['erlangb'](_0x5e8bde,_0x236c78));}return _0x6d06d6({'erlangCalls':_0x377c83,'erlangCallToSecond':_0x4701a6/_0x377c83,'erlangAbandonmentRate':_0xeb13d4,'erlangBusyFactor':_0x483737});});};module[_0x44c3('0x220')]=Dialer;