Built motion from commit c0cdc9d8.|2.6.28
[motion2.git] / server / services / ami / dialer / index.js
index 38d814f..3fa4828 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3c0a=['XMD-AMDMINWORDLENGTH','XMD-AMDBETWEENWORDSSILENCE','dialAMDBetweenWordsSilence','XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','XMD-AMDSILENCETHRESHOLD','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','dialAMDMaximumWordLength','XMD-VOICEQUEUEID','XMD-CAMPAIGNID','setXMDContactVariables','Contact','getCallerId','callerid','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','dialOriginateCallerIdNumber','XMD-ORIGINATECALLERIDNAME','variables','dialPrefix','trim','substring','dialCutDigit','SIP/%s/%s%s','from-sip','dialOriginateTimeout','OriginateError','[originate][error]','originate\x20action\x20Error','checkRetriveMax','dialNoAnswerRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','[rescheduleContact]\x20[Busy]','dialCongestionMaxRetry','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberMaxRetry','[rescheduleContact][NoSuchNumber]','[rescheduleContact][Drop]','dialAgentRejectMaxRetry','[rescheduleContact][AgentReject]','[callProgressDetecting]','entity\x20is\x20undefine','outboundNoSuchCallsDay','custom:agentnosuchnumber','dialNoSuchNumberRetryFrequency','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','NoAnswer','buildNoAnswerEventPayload','custom:agentnoanswer','[syncAgentComplete][createHistory][3]','reason\x203\x20ringing\x20no\x20answer','outboundBusyCallsDay','custom:agentbusy','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','stateGlobal','outboundCongestionCallsDay','Congestion','dialCongestionRetryFrequency','custom:agentcongestion','[syncAgentComplete][createHistory][8]','reason\x208\x20congestion','reason\x2011\x20abandoned','outboundRejectCallsDay','AgentReject','dialAgentRejectRetryFrequency','custom:agentreject','agentreject','[syncAgentComplete][createHistory][20]','reason\x2020\x20agentreject','[syncAgentComplete][createHistory][?]','Global','contact\x20not\x20moved','dialPredictiveOptimizationPercentage','round','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','floor','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','dialPredictiveInterval','[startMethodPredictive][StartProgressive][Loop]','dialPredictiveOptimization','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','Drop\x20in\x20this\x20interval','started\x20in\x20predictive\x20at','avgHandleTime','Predictive\x20after\x20first\x20interval','recalculate\x20predictive\x20at','getDataPredictive','startMethodPredictive','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20more\x20than\x20threshold\x20(','talking','agentBusyFactor','busyFactor','[getDataPredictive]','check\x20failure','getDataPredictiveOld','getVoiceQueueRtPauses','loggedIn','outboundQueuePauses','predictiveIntervalPauses','abandonmentRate','[CatchErlangB]','one\x20call\x20every:','[handlePredictive]','checkContactBlack','recallme','[booked][checkContactBlack]','queueStatusComplete:\x20','Queue:\x20','queuestatus','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','scheduledat','dialRecallMeTimeout','unlockContact','outboundReCallsDay','dialRecallInQueue','[rescheduleContact][dialRecallInQueue]','[Originate][HistoryDialRecallInQueue][historyCatch]','[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]','Blacklist','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','inBlackList','limitCalls','temp','getContactDialerIvr','checkContactEmpty','RUNNING','ivrTotalCallsDays','[actionOriginate]\x20','checkIsBlackListIvr','[getContactCampaign2]','dialLimitQueue','not_inuse','getContactDialer','countReScheduled','tryOriginatePredictive','[handlePredictive][limitChannel]','dialOrderByScheduledAt','[countReScheduled]\x20','checkIsBlackList','[actionOriginatePredictive]\x20','[getContactDialerPredictive]','--------\x20Drop\x20Rate\x20--------','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','m\x20=\x20','[abandonmentRate]','Ts\x20=\x20','p\x20=\x20','Amax\x20=\x20','erlangb','Interval:\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]','interval\x20=\x20','Umin\x20=\x20','exports','util','lodash','uuid','moment','./utils','./utils/hopper','../preview/util/util','../../../config/environment/','../../../config/logger','booked','predictive','predictiveCalls','syncQueueSummary','redis','defaults','localhost','socket.io-emitter','../rpc/cmHopper','../rpc/voiceQueueRt','../rpc/setting','../rpc/interval','./models/history','./models/final','./models/agentComplete','./models/hangup','env','XCALLY_IP_AGI','127.0.0.1','prototype','enqueue','tail','finally','sequence','preview','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','actions','startProgressive','ivrOriginated','queueBooked','queueBookedRR','queuesSummary','agentconnect','bind','queuecallerabandon','syncQueueCallerAbandon','originateresponse','syncOriginateResponse','agentcomplete','custom:queuesummary','custom:queuesummarycomplete','hangup','syncHangup','newexten','syncNewExten','syncVarSet','queuemember','loopCampaigns','loopClearZombieChannels','then','previewRecallmeReminderInterval','isUndefined','emit','outbound','debug','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','inspect','format','voice:queue:%s','name','isEmpty','info','-----\x20Stats\x20Predictive\x20---','predictiveIntervalTotalCalls','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAnsweredCalls','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsTimeout','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','---------------------------','predictiveIntervalAvgTalktime','Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','History\x20information\x20are\x20empty','---------\x20ErlangB\x20---------','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCalls','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCallToSecond','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangAbandonmentRate','erlangBusyFactor','merge','getSeconds','startProgressive\x20value\x20cleared','startPredictive','handlePredictive','handlePredictive\x20interval\x20cleared','error','stack','contactsRescheduled','CAMPAIGN_STATUS','CONTACTS_RESCHEDULED','[getContactDialer2][ReScheduled]','message','NO_AVAILABLE_CONTACTS','[getContactDialer2][Empty]','state','statedesc','starttime','queueStatusComplete','[unlockQueueStatus][undefined]','[booked][unlockQueueStatus]','stringify','pick','NULL_INTERVAL','Interval','Intervals','\x20INTERVAL_IS_NULL','isIVRCampaignActive','INACTIVE','\x20NOT\x20Active','isIVRCampaign','campaign:ivr:%s','campaign:save','sendMessageOneNotActive','originated','is\x20not\x20active','DISACTIVED','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','is\x20disactive','[ifTime][Action]','Error','isTrunkReachable','active','status','reachable','SIP/%s','unmonitored','checkIsTrunkReachable','Trunk','TrunkBackup','checkIfTime','ifTimeIvr','checkIfTimeIntervals','ifTime','Failure','\x20Intervals\x20is\x20null\x20','EMPTY_INTERVAL','UNKNOWN_TIMEZONE','\x20Timezone\x20unknow\x20','isArray','length','push','Action','command','iftime\x20%s,%s','interval','content','indexOf','true','catch','timezones','all','some','OVERTIME_GLOBAL_INTERVAL','OVERTIME_INTERVAL','[ifTime][promiseAll]','Global:\x20','\x20Interval\x20is\x20overtime:\x20','Timezone:\x20','resetActiveCalls','syncCampaigns','undefined','resolve','dialGlobalInterval','dialTimezone','checkDialMethod','dialMethod','progressive','handlePower','power','dialPowerLevel','silly','intervalIftime','Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:','isGlobal','AMI\x20IfTime','syncAgentConnect','queue','uniqueId','uniqueid','type','ivr','updateOriginated','YYYY-MM-DD\x20HH:mm:ss','outboundAnswerCallsDay','reason','agent','agiafterat','dialQueueProject2','dialAgiAfterHangupAgent','createHistory','droptime','dialQueueTimeout','outboundDropCallsDayTimeout','predictiveIntervalErlangCallsDroppedCalls','Drop','dropreason','TIMEOUT','countdropretry','dialDropRetryFrequency','callAdditionalPhoneAfterMin','additional','dialDropMaxRetry','rescheduleContact','add','minutes','VoiceQueueId','calleridname','calleridnum','[syncAgentComplete][createHistory][10]','swapAdditionalPhones','outboundDropCallsDayCallersExit','Abandoned','CALLEREXIT','countglobal','dialAbandonedRetryFrequency','voiceQueue','dialAbandonedMaxRetry','countabandonedretry','ContactId','ListId','CampaignId','[rescheduleContact][Abandoned]','endtime','[syncAgentComplete][createHistory][11]','channel','strategy','actionid','isNil','stateinterface','locked','rrmemory','idHopper','paused','syncQueueStatusComplete','roundrobin','[Catch][Preview][syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','_rr','unlockRR','Agent:\x20','contactAgent-idHopper:\x20','run','[booked][RR][finaly]','[booked][unlock]','[unlock2][syncQueueStatusComplete]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','responsetime','getQueue','response','Success','callProgressDetecting','variable','amdstatus','exten','dialAMDActive','outboundAnswerAgiCallsDay','HangupInAMD','membername','AMD','custom:amd','amd','MACHINE','Machine','countmachineretry','buildObj','[syncAgentComplete][createHistory][0]','countbusyretry','countnoanswerretry','countnosuchnumberretry','countagentrejectretry','dialGlobalMaxRetry','reason19\x20machine....','dialMachineMaxRetry','createStateFinal','reason\x2019\x20machine....','dialMachineRetryFrequency','[rescheduleContact][Machine]','value','HANGUP','saveInDb','[syncHangupInAMDIvr][createHistory]','countcongestionretry','ivrAnswerCallsDay','[syncHangupIvr][createHistory]','dialQueueProject','AnswerAGI','AGI','moveContactManagedDialer','[syncHangupIvr]','Normal\x20Clearing','[syncAgentComplete][createHistory]','[syncAgentComplete]','outboundUnknownCallsDay','running','isPreviewCampaign','statusMessage','getQueueCampaignStatusMessage','available','inUse','pTalking','ACTIVE','[syncQueueSummary]','compareToOutboundQueue','queueSummaryCountersUpdated','updateReportFromOutboundQueue','assign','syncQueueSummaryComplete','throttle','filter','dialPreviewRecallmeReminder','handlePreviewRecallNotifications','map','Agent','user:dialPreviewRecallReminder','checkPreviewRecallReminder','clearZombieChannels','[actions]','No\x20such\x20channel','[Dialer][checkChannel]','[Dialer][checkChannel][ivr]','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','loggerHandler','emptyContact','notFound','UserId','[emptyContact]','queueCallerAbandonCreateState','[syncQueueCallerAbandon]\x20[Drop]','user:%s','launchHandleIvr','handleIvr','actionOriginate','object','voiceQueue\x20is\x20undefine','phone','originate','contact\x20is\x20undefine','getCaller','\x22agi://%s/square,%s\x22','NONE','isOutboundQueue','dialer','xcally-motion-dialer','XMD-AMDINITIALSILENCE','dialAMDInitialSilence','XMD-AMDAFTERGREETINGSILENCE','dialAMDAfterGreetingSilence','XMD-AMDTOTALANALYSISTIME'];(function(_0x166d93,_0x301f09){var _0xba708=function(_0x349bf7){while(--_0x349bf7){_0x166d93['push'](_0x166d93['shift']());}};_0xba708(++_0x301f09);}(_0x3c0a,0xaf));var _0xa3c0=function(_0x5961a0,_0x2c4f43){_0x5961a0=_0x5961a0-0x0;var _0x727878=_0x3c0a[_0x5961a0];return _0x727878;};'use strict';var util=require(_0xa3c0('0x0'));var _=require(_0xa3c0('0x1'));var uuid=require(_0xa3c0('0x2'));var moment=require(_0xa3c0('0x3'));var rr=require('rr');var Redis=require('ioredis');var utils=require(_0xa3c0('0x4'));var hopperUtils=require(_0xa3c0('0x5'));var ut=require(_0xa3c0('0x6'));var config=require(_0xa3c0('0x7'));var logger=require(_0xa3c0('0x8'))('dialer');var loggerBooked=require('../../../config/logger')(_0xa3c0('0x9'));var loggerPredictive=require(_0xa3c0('0x8'))(_0xa3c0('0xa'));var loggerPredictiveCalls=require(_0xa3c0('0x8'))(_0xa3c0('0xb'));var loggerSyncQueueSummary=require(_0xa3c0('0x8'))(_0xa3c0('0xc'));var ami=require('../ami');config[_0xa3c0('0xd')]=_[_0xa3c0('0xe')](config['redis'],{'host':_0xa3c0('0xf'),'port':0x18eb});var io=require(_0xa3c0('0x10'))(new Redis(config['redis']));var cmHopper=require(_0xa3c0('0x11'));var voiceQueueRt=require(_0xa3c0('0x12'));var RpcSetting=require(_0xa3c0('0x13'));var Interval=require(_0xa3c0('0x14'));var Action=require('./models/action');var History=require(_0xa3c0('0x15'));var Final=require(_0xa3c0('0x16'));var AgentComplete=require(_0xa3c0('0x17'));var QueueCallerAbandon=require('./models/queueCallerAbandon');var Hangup=require(_0xa3c0('0x18'));var ipAgi=process[_0xa3c0('0x19')][_0xa3c0('0x1a')]||_0xa3c0('0x1b');var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence[_0xa3c0('0x1c')][_0xa3c0('0x1d')]=function(_0xedbef9){this[_0xa3c0('0x1e')]=this['tail']?this[_0xa3c0('0x1e')][_0xa3c0('0x1f')](_0xedbef9):_0xedbef9();};function Dialer(_0x35554e,_0x5c3eb0){this[_0xa3c0('0x20')]=new Sequence();this[_0xa3c0('0x21')]=_0x5c3eb0;this[_0xa3c0('0x22')]=_0x35554e[_0xa3c0('0x22')];this[_0xa3c0('0x23')]=_0x35554e[_0xa3c0('0x23')];this[_0xa3c0('0x24')]=_0x35554e[_0xa3c0('0x24')];this[_0xa3c0('0x25')]=_0x35554e[_0xa3c0('0x25')];this[_0xa3c0('0x26')]=config[_0xa3c0('0x26')]||0x2;this['channels']={};this[_0xa3c0('0x27')]={};this['contactsId']={};this['uniqueId']={};this['optionPredictive']={};this['startPredictive']={};this[_0xa3c0('0x28')]={};this[_0xa3c0('0x29')]={};this[_0xa3c0('0x2a')]={};this[_0xa3c0('0x2b')]={};this[_0xa3c0('0x2c')]={};ami['on'](_0xa3c0('0x2d'),this['syncAgentConnect'][_0xa3c0('0x2e')](this));ami['on'](_0xa3c0('0x2f'),this[_0xa3c0('0x30')]['bind'](this));ami['on'](_0xa3c0('0x31'),this[_0xa3c0('0x32')][_0xa3c0('0x2e')](this));ami['on'](_0xa3c0('0x33'),this['syncAgentComplete']['bind'](this));ami['on'](_0xa3c0('0x34'),this[_0xa3c0('0xc')][_0xa3c0('0x2e')](this));ami['on'](_0xa3c0('0x35'),this['syncQueueSummaryComplete']['bind'](this));ami['on'](_0xa3c0('0x36'),this[_0xa3c0('0x37')][_0xa3c0('0x2e')](this));ami['on'](_0xa3c0('0x38'),this[_0xa3c0('0x39')]['bind'](this));ami['on']('varset',this[_0xa3c0('0x3a')][_0xa3c0('0x2e')](this));ami['on'](_0xa3c0('0x3b'),this['syncQueueMember'][_0xa3c0('0x2e')](this));ami['on']('queuestatuscomplete',this['syncQueueStatusComplete'][_0xa3c0('0x2e')](this));this[_0xa3c0('0x3c')]();this[_0xa3c0('0x3d')]();RpcSetting['getSettings']()[_0xa3c0('0x3e')](function(_0x398c17){previewRecallmeReminderInterval=_0x398c17[_0xa3c0('0x3f')];});}function isNotNull(_0x457a23){return _0x457a23!==null&&!_[_0xa3c0('0x40')](_0x457a23);}function msgResponse(_0x52485d,_0x364c24,_0xabf19e){return{'action':_0x52485d,'response':_0x364c24,'message':_0xabf19e,'stack':_0xabf19e};}function emit(_0x24ffee,_0x4cbf5a,_0x2b1b8c){io['to'](_0x24ffee)[_0xa3c0('0x41')](_0x4cbf5a,_0x2b1b8c);}function emitOutboundVoiceQueueSummary(_0x54f0a6){if(_0x54f0a6['type']===_0xa3c0('0x42')){logger[_0xa3c0('0x43')](_0xa3c0('0x44'),util[_0xa3c0('0x45')](_0x54f0a6,{'showHidden':![],'depth':null}));emit(util[_0xa3c0('0x46')](_0xa3c0('0x47'),_0x54f0a6[_0xa3c0('0x48')]),'voice_queue:save',_0x54f0a6);}}function checkGetDataPredictive(_0x44a872){if(isNotNull(_0x44a872)&&!_[_0xa3c0('0x49')](_0x44a872)){loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x4b'));loggerPredictive['info']('Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x44a872[_0xa3c0('0x4c')]);loggerPredictive['info'](_0xa3c0('0x4d'),_0x44a872[_0xa3c0('0x4e')]);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x4f'),_0x44a872[_0xa3c0('0x50')]);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x51'),_0x44a872[_0xa3c0('0x52')]);loggerPredictive[_0xa3c0('0x4a')]('AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x44a872[_0xa3c0('0x53')]);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x54'),_0x44a872['predictiveIntervalAvgTalktime']);loggerPredictive['info'](_0xa3c0('0x55'));if(_0x44a872[_0xa3c0('0x4c')]>0x0){if(!_[_0xa3c0('0x40')](_0x44a872[_0xa3c0('0x56')])&&_0x44a872[_0xa3c0('0x56')]>0x0){return!![];}loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x57'));if(!_[_0xa3c0('0x40')](_0x44a872[_0xa3c0('0x53')])&&_0x44a872[_0xa3c0('0x53')]>0x0){return!![];}loggerPredictive['info']('Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive');}else{loggerPredictive['info'](_0xa3c0('0x58'));}}else{loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x59'));}return![];}function mergeDataErlangB(_0x8cddb3){return function(_0x316b19){loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x5a'));loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x5b'),_0x316b19[_0xa3c0('0x5c')]);loggerPredictive['info'](_0xa3c0('0x5d'),_0x316b19[_0xa3c0('0x5e')]);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x5f'),_0x316b19[_0xa3c0('0x60')]);loggerPredictive[_0xa3c0('0x4a')]('Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x316b19[_0xa3c0('0x61')]);loggerPredictive[_0xa3c0('0x4a')]('Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x316b19[_0xa3c0('0x60')]);loggerPredictive[_0xa3c0('0x4a')]('---------------------------');_[_0xa3c0('0x62')](_0x8cddb3,_0x316b19);};}function ifInterval(_0x414cd9,_0x219207){if(_['isUndefined'](_0x219207)){return![];}return utils[_0xa3c0('0x63')](undefined,_0x219207)<_0x414cd9*0x3c;}function clearPredictiveAttributes(_0x263fcf){if(_0x263fcf[_0xa3c0('0x28')]){_0x263fcf[_0xa3c0('0x28')]=undefined;loggerPredictive[_0xa3c0('0x43')](_0x263fcf[_0xa3c0('0x48')],_0xa3c0('0x64'));}if(_0x263fcf[_0xa3c0('0x65')]){_0x263fcf['startPredictive']=undefined;loggerPredictive[_0xa3c0('0x43')](_0x263fcf[_0xa3c0('0x48')],'startPredictive\x20value\x20cleared');}if(_0x263fcf['handlePredictive']){clearInterval(_0x263fcf['handlePredictive']);_0x263fcf[_0xa3c0('0x66')]=undefined;loggerPredictive[_0xa3c0('0x43')](_0x263fcf[_0xa3c0('0x48')],_0xa3c0('0x67'));}}function loggerCatchPredictive(_0x2a0122,_0xe7bc7){return function(_0xf7a831){loggerPredictive[_0xa3c0('0x68')](_0xe7bc7[_0xa3c0('0x48')],_0x2a0122);loggerPredictive['error'](_0xf7a831[_0xa3c0('0x69')]);clearPredictiveAttributes(_0xe7bc7);};}function loggerCatch(_0x4a2e8d){return function(_0x12c0e8){logger[_0xa3c0('0x68')](_0x4a2e8d,util[_0xa3c0('0x45')](_0x12c0e8,{'showHidden':![],'depth':null}));};}function loggerGetContactDialer(_0x2d5cd5,_0x560b67,_0x13af99){return function(_0x4281ee){utils['checkContactLowerLimitOriginate'](_0x560b67,_0x13af99,0x0);_0x560b67['temp']=0x0;logger['error'](_0x2d5cd5,util[_0xa3c0('0x45')](_0x4281ee,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x5e3281){return function(_0x6b8bb){if(isNotNull(_0x6b8bb)&&isNotNull(_0x6b8bb[0x0])){if(_0x6b8bb[0x0][_0xa3c0('0x6a')]>0x0){_0x5e3281['message']=utils[_0xa3c0('0x6b')][_0xa3c0('0x6c')];logger[_0xa3c0('0x4a')](_0xa3c0('0x6d')+_0x5e3281[_0xa3c0('0x48')],_0x6b8bb[0x0]['contactsRescheduled'],'contacts');}else{_0x5e3281[_0xa3c0('0x6e')]=utils[_0xa3c0('0x6b')][_0xa3c0('0x6f')];logger[_0xa3c0('0x4a')](_0xa3c0('0x70')+_0x5e3281['name']);}}};}function createObjHistory(_0x9eaa1f,_0x7d23c2,_0x5cb7c0,_0x10032a,_0x5571e1){_0x9eaa1f[_0xa3c0('0x6e')]=_0x5cb7c0;var _0x3910fa=new Action(_0x9eaa1f,_0x7d23c2);var _0x2d4e20=new History(_0x3910fa);_0x2d4e20[_0xa3c0('0x71')]=_0x10032a;_0x2d4e20[_0xa3c0('0x72')]=_0x5571e1;_0x2d4e20['endtime']=_0x3910fa[_0xa3c0('0x73')];return _0x2d4e20;}function unlockQueueStatus(_0x1af7a3,_0x6f0360){setTimeout(function(){if(_[_0xa3c0('0x40')](_0x1af7a3[_0xa3c0('0x74')])){loggerBooked['error'](_0xa3c0('0x75'),_0x6f0360);}_0x1af7a3[_0xa3c0('0x74')]=!![];loggerBooked[_0xa3c0('0x4a')](_0xa3c0('0x76'),_0x6f0360,JSON[_0xa3c0('0x77')](_[_0xa3c0('0x78')](_0x1af7a3,[_0xa3c0('0x48'),_0xa3c0('0x74')])));},0x1f3);}function checkInterval(_0x2d093d){return function(){if(!isNotNull(_0x2d093d['Interval'])){_0x2d093d['message']=utils[_0xa3c0('0x6b')][_0xa3c0('0x79')];throw _0x2d093d[_0xa3c0('0x48')]+'\x20INTERVAL_IS_NULL';}if(!isNotNull(_0x2d093d[_0xa3c0('0x7a')][_0xa3c0('0x7b')])){_0x2d093d['message']=utils[_0xa3c0('0x6b')][_0xa3c0('0x79')];throw _0x2d093d[_0xa3c0('0x48')]+_0xa3c0('0x7c');}if(!isNotNull(_[_0xa3c0('0x49')](_0x2d093d['Interval'][_0xa3c0('0x7b')]))){_0x2d093d['message']=utils[_0xa3c0('0x6b')][_0xa3c0('0x79')];throw _0x2d093d[_0xa3c0('0x48')]+'\x20INTERVAL_IS_NULL';}};}function checkIsIVRCampaignActive(_0x5b100b){return function(){if(!utils[_0xa3c0('0x7d')](_0x5b100b)){_0x5b100b[_0xa3c0('0x6e')]=utils[_0xa3c0('0x6b')][_0xa3c0('0x7e')];throw _0x5b100b[_0xa3c0('0x48')]+_0xa3c0('0x7f');}};}function emitCampaignSummary(_0x4d9ab2){if(utils[_0xa3c0('0x80')](_0x4d9ab2)){emit(util[_0xa3c0('0x46')](_0xa3c0('0x81'),_0x4d9ab2[_0xa3c0('0x48')]),_0xa3c0('0x82'),_0x4d9ab2);}}function loggerCatchQueueSummary(_0x3caf4c,_0x7deeab){return function(_0x5c279a){clearPredictiveAttributes(_0x7deeab);emitCampaignSummary(_0x7deeab);loggerSyncQueueSummary[_0xa3c0('0x43')](_0x3caf4c,util[_0xa3c0('0x45')](_0x5c279a,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x4593bc){if(_0x4593bc[_0xa3c0('0x83')]){if(_0x4593bc[_0xa3c0('0x84')]===0x0){_0x4593bc[_0xa3c0('0x83')]=![];_0x4593bc[_0xa3c0('0x6e')]=utils[_0xa3c0('0x6b')]['INACTIVE'];loggerSyncQueueSummary[_0xa3c0('0x43')]('[syncQueueSummary]\x20Campaign\x20Ivr:\x20',_0x4593bc['name'],_0xa3c0('0x85'));}else{_0x4593bc[_0xa3c0('0x6e')]=utils['CAMPAIGN_STATUS'][_0xa3c0('0x86')];loggerSyncQueueSummary[_0xa3c0('0x43')](_0xa3c0('0x87'),_0x4593bc['name'],_0xa3c0('0x88'));}emitCampaignSummary(_0x4593bc);}}function myreject(_0x94dad8){return function(_0x1187e0){return _0x94dad8(msgResponse(_0xa3c0('0x89'),_0xa3c0('0x8a'),JSON[_0xa3c0('0x77')](_0x1187e0)));};}Dialer[_0xa3c0('0x1c')][_0xa3c0('0x8b')]=function(_0x36c8c5){return!_[_0xa3c0('0x40')](_0x36c8c5)&&_0x36c8c5&&!_[_0xa3c0('0x40')](_0x36c8c5[_0xa3c0('0x48')])&&!_[_0xa3c0('0x40')](_0x36c8c5[_0xa3c0('0x8c')])&&_0x36c8c5['active']&&(this[_0xa3c0('0x25')][util['format']('SIP/%s',_0x36c8c5[_0xa3c0('0x48')])][_0xa3c0('0x8d')]===_0xa3c0('0x8e')||this[_0xa3c0('0x25')][util[_0xa3c0('0x46')](_0xa3c0('0x8f'),_0x36c8c5['name'])][_0xa3c0('0x8d')]===_0xa3c0('0x90'));};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x91')]=function(_0x279cc3){var _0x48e8c9=this;return function(){if(!_0x48e8c9[_0xa3c0('0x8b')](_0x279cc3[_0xa3c0('0x92')])){if(!_0x48e8c9[_0xa3c0('0x8b')](_0x279cc3[_0xa3c0('0x93')])){_0x279cc3['message']=utils['CAMPAIGN_STATUS']['TRUNK_NOT_REACHABLE'];throw _0x279cc3[_0xa3c0('0x48')]+'\x20trunk\x20is\x20not\x20reachable';}}};};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x94')]=function(_0x4806b0,_0x2eb28a,_0x4b07c9,_0x15fa95){var _0x52c41c=this;return function(){var _0x32de99=!![];return _0x52c41c[_0xa3c0('0x95')](_0x4806b0,_0x2eb28a,_0x4b07c9,_0x15fa95,_0x32de99);};};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x96')]=function(_0x1f91c1,_0x9340e7,_0x30c864,_0x1248b2){var _0x6b30c6=this;return function(){var _0x509563=![];return _0x6b30c6[_0xa3c0('0x95')](_0x1f91c1[_0xa3c0('0x7b')],_0x9340e7,_0x30c864,_0x1248b2,_0x509563);};};Dialer['prototype'][_0xa3c0('0x95')]=function(_0x53f380,_0x3448e7,_0x43e639,_0x288e41,_0xa17096){var _0x26712d=[];return new Promise(function(_0x86f40c,_0xce9b76){if(!isNotNull(_0x53f380)){_0x288e41[_0xa3c0('0x6e')]=utils['CAMPAIGN_STATUS']['NULL_INTERVAL'];return _0xce9b76(msgResponse(_0xa3c0('0x97'),_0xa3c0('0x98'),_0x43e639+_0xa3c0('0x99')));}if(_[_0xa3c0('0x49')](_0x53f380)){_0x288e41['message']=utils[_0xa3c0('0x6b')][_0xa3c0('0x9a')];return _0xce9b76(msgResponse(_0xa3c0('0x97'),_0xa3c0('0x98'),_0x43e639+'\x20Intervals\x20is\x20empty\x20'));}if(_0x3448e7&&_[_0xa3c0('0x40')](config['timezones'][_0x3448e7])){_0x288e41['message']=utils[_0xa3c0('0x6b')][_0xa3c0('0x9b')];return _0xce9b76(msgResponse(_0xa3c0('0x97'),_0xa3c0('0x98'),_0x43e639+_0xa3c0('0x9c')+_0x3448e7));}if(_[_0xa3c0('0x9d')](_0x53f380)){for(var _0x11369a=0x0;_0x11369a<_0x53f380[_0xa3c0('0x9e')];_0x11369a+=0x1){_0x26712d[_0xa3c0('0x9f')](ami[_0xa3c0('0xa0')]({'action':_0xa3c0('0xa1'),'command':util['format'](_0xa3c0('0xa2'),_0x53f380[_0x11369a][_0xa3c0('0xa3')],!_['isUndefined'](config['timezones'][_0x3448e7])?_0x3448e7:'')})[_0xa3c0('0x3e')](function(_0x37b36d){return _0x37b36d[_0xa3c0('0xa4')][_0xa3c0('0xa5')](_0xa3c0('0xa6'))>=0x0;})[_0xa3c0('0xa7')](myreject(_0xce9b76)));}}else{_0x26712d[_0xa3c0('0x9f')](ami[_0xa3c0('0xa0')]({'action':_0xa3c0('0xa1'),'command':util['format'](_0xa3c0('0xa2'),_0x53f380,!_[_0xa3c0('0x40')](config[_0xa3c0('0xa8')][_0x3448e7])?_0x3448e7:'')})[_0xa3c0('0x3e')](function(_0x50f460){return _0x50f460[_0xa3c0('0xa4')][_0xa3c0('0xa5')](_0xa3c0('0xa6'))>=0x0;})[_0xa3c0('0xa7')](myreject(_0xce9b76)));}Promise[_0xa3c0('0xa9')](_0x26712d)[_0xa3c0('0x3e')](function(_0x121c0d){var _0x265b1f=_[_0xa3c0('0xaa')](_0x121c0d);if(_0x265b1f){return _0x86f40c(_0x265b1f);}else{_0x288e41[_0xa3c0('0x6e')]=_0xa17096?utils[_0xa3c0('0x6b')][_0xa3c0('0xab')]:utils['CAMPAIGN_STATUS'][_0xa3c0('0xac')];return _0xce9b76(msgResponse(_0xa3c0('0xad'),_0xa3c0('0x98'),_0xa3c0('0xae')+_0xa17096+'\x20'+_0x43e639+_0xa3c0('0xaf')+util[_0xa3c0('0x45')](_0x53f380,{'showHidden':![],'depth':null})+_0xa3c0('0xb0')+_0x3448e7));}})['catch'](function(_0x9103f4){return _0xce9b76(msgResponse(_0xa3c0('0x97'),_0xa3c0('0x98'),JSON[_0xa3c0('0x77')](_0x9103f4)));});});};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x3c')]=function(){var _0x467af8=this;return cmHopper[_0xa3c0('0xb1')]({'active':![]},{'where':{'active':!![]}})[_0xa3c0('0x3e')](function(){setInterval(function(){_0x467af8[_0xa3c0('0xb2')]();},0x3e8);});};Dialer[_0xa3c0('0x1c')][_0xa3c0('0xb2')]=function(){var _0x7888c5=this;var _0x179c35;for(var _0x527677 in this[_0xa3c0('0x23')]){if(typeof this[_0xa3c0('0x23')][_0x527677]!==_0xa3c0('0xb3')){_0x179c35=this[_0xa3c0('0x23')][_0x527677];if(utils[_0xa3c0('0x80')](_0x179c35)&&utils[_0xa3c0('0x7d')](_0x179c35)){_0x179c35[_0xa3c0('0x83')]=!![];Promise[_0xa3c0('0xb4')]()[_0xa3c0('0x3e')](checkIsIVRCampaignActive(_0x179c35))[_0xa3c0('0x3e')](checkInterval(_0x179c35))[_0xa3c0('0x3e')](_0x7888c5[_0xa3c0('0x91')](_0x179c35))[_0xa3c0('0x3e')](_0x7888c5[_0xa3c0('0x94')](_0x179c35[_0xa3c0('0xb5')],_0x179c35[_0xa3c0('0xb6')],_0x179c35['name'],_0x179c35))['then'](_0x7888c5[_0xa3c0('0x96')](_0x179c35[_0xa3c0('0x7a')],_0x179c35[_0xa3c0('0xb6')],_0x179c35[_0xa3c0('0x48')],_0x179c35))[_0xa3c0('0x3e')](_0x7888c5['launchHandleIvr'](_0x179c35))[_0xa3c0('0xa7')](loggerCatchQueueSummary('[syncCampaigns]',_0x179c35));}else{notSendMessagesCampaign(_0x179c35);}}}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0xb7')]=function(_0x2c76df){if(_0x2c76df[_0xa3c0('0xb8')]!==_0xa3c0('0xa')){clearPredictiveAttributes(_0x2c76df);}switch(_0x2c76df[_0xa3c0('0xb8')]){case _0xa3c0('0xb9'):this[_0xa3c0('0xba')](_0x2c76df,0x1);break;case _0xa3c0('0xbb'):this['handlePower'](_0x2c76df,_0x2c76df[_0xa3c0('0xbc')]);break;case _0xa3c0('0xa'):this[_0xa3c0('0xa')](_0x2c76df);break;case _0xa3c0('0x9'):this[_0xa3c0('0xba')](_0x2c76df,0x1);break;default:logger['error']('Queue',_0x2c76df[_0xa3c0('0x48')],'method\x20not\x20recognized');}};Dialer[_0xa3c0('0x1c')]['ifTime']=function(_0x50d3c9,_0x1be558){var _0x4c0aac=_0x50d3c9['dialTimezone'];var _0x9c5869=_0x1be558?_0x50d3c9['dialGlobalInterval']:_0x50d3c9[_0xa3c0('0x7a')][_0xa3c0('0x7b')];logger[_0xa3c0('0xbd')]('Dialer::ifTime()',_0x9c5869,_0x4c0aac,_0x50d3c9['name'],util[_0xa3c0('0x46')]('Voice\x20Queue\x20%s\x20$s',_0x50d3c9[_0xa3c0('0x48')],_0x50d3c9['id']));var _0x17127a=null;return Interval[_0xa3c0('0xbe')](_0x9c5869,_0x4c0aac)[_0xa3c0('0x3e')](function(_0x1d52b9){if(_0x1d52b9===!![]){return _0x1d52b9;}else{_0x50d3c9[_0xa3c0('0x6e')]=_0x1be558?utils[_0xa3c0('0x6b')][_0xa3c0('0xab')]:utils[_0xa3c0('0x6b')]['OVERTIME_INTERVAL'];_0x17127a=msgResponse(_0xa3c0('0xad'),'Failure',_0xa3c0('0xae')+_0x1be558+'\x20'+_0x50d3c9[_0xa3c0('0x48')]+'\x20Interval\x20is\x20overtime:\x20'+util[_0xa3c0('0x45')](_0x9c5869,{'showHidden':![],'depth':null})+_0xa3c0('0xb0')+_0x4c0aac);}if(_0x17127a!==null){logger[_0xa3c0('0xbd')](_0xa3c0('0xbf'),_0x17127a);_0x17127a[_0xa3c0('0xc0')]=_0x1be558;throw _0x17127a;}})[_0xa3c0('0xa7')](function(_0x229d93){logger['error'](_0xa3c0('0xc1'),_0x229d93);throw msgResponse(_0xa3c0('0x89'),_0xa3c0('0x8a'),util['inspect'](_0x229d93,{'showHidden':![],'depth':null}));});};Dialer['prototype'][_0xa3c0('0xc2')]=function(_0x3ac2ec){if(this['voiceQueues'][_0x3ac2ec[_0xa3c0('0xc3')]]){if(this['uniqueId'][_0x3ac2ec['uniqueid']]&&this[_0xa3c0('0xc4')][_0x3ac2ec[_0xa3c0('0xc5')]][_0xa3c0('0xc6')]!==_0xa3c0('0xc7')){this[_0xa3c0('0xc8')](this['voiceQueues'][_0x3ac2ec[_0xa3c0('0xc3')]]);this['uniqueId'][_0x3ac2ec['uniqueid']]['answertime']=moment()[_0xa3c0('0x46')](_0xa3c0('0xc9'));}}};Dialer[_0xa3c0('0x1c')]['syncAgentComplete']=function(_0x4b623b){var _0x10f743=this[_0xa3c0('0xc4')][_0x4b623b[_0xa3c0('0xc5')]];if(this[_0xa3c0('0x22')][_0x4b623b['queue']]){if(_0x10f743&&_0x10f743['type']!=='ivr'){delete this[_0xa3c0('0xc4')][_0x4b623b[_0xa3c0('0xc5')]];this[_0xa3c0('0x22')][_0x4b623b['queue']][_0xa3c0('0xca')]+=0x1;var _0x5b9908=new AgentComplete(_0x10f743,_0x4b623b);if(_0x4b623b[_0xa3c0('0xcb')]===_0xa3c0('0xcc')){_0x5b9908[_0xa3c0('0xcd')]=this[_0xa3c0('0x22')][_0x4b623b[_0xa3c0('0xc3')]][_0xa3c0('0xce')]&&this['voiceQueues'][_0x4b623b[_0xa3c0('0xc3')]][_0xa3c0('0xcf')]?moment()[_0xa3c0('0x46')](_0xa3c0('0xc9')):undefined;}hopperUtils[_0xa3c0('0xd0')](_0x5b9908)['catch'](loggerCatch('[syncAgentComplete][createHistory]'));hopperUtils['moveContactManagedDialer'](_0x5b9908)['catch'](loggerCatch('[syncAgentComplete]'));}}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x30')]=function(_0x273261){var _0x2282a4=this[_0xa3c0('0xc4')][_0x273261[_0xa3c0('0xc5')]];var _0x1e99e9=this;var _0x210692=![];var _0x3d1596;var _0x2e4b7b;if(this[_0xa3c0('0x22')][_0x273261[_0xa3c0('0xc3')]]){if(_0x2282a4&&_0x2282a4['type']!==_0xa3c0('0xc7')){delete this[_0xa3c0('0xc4')][_0x273261[_0xa3c0('0xc5')]];this[_0xa3c0('0xc8')](this['voiceQueues'][_0x273261[_0xa3c0('0xc3')]]);_0x2282a4[_0xa3c0('0xd1')]=moment()[_0xa3c0('0x46')](_0xa3c0('0xc9'));var _0xb6d760=new QueueCallerAbandon(_0x2282a4,_0x273261);if(utils[_0xa3c0('0x63')](_0x2282a4[_0xa3c0('0xd1')],_0x2282a4['responsetime'])>=_0x2282a4[_0xa3c0('0xd2')]){this[_0xa3c0('0x22')][_0x273261['queue']]['predictiveIntervalDroppedCallsTimeout']+=0x1;this[_0xa3c0('0x22')][_0x273261[_0xa3c0('0xc3')]][_0xa3c0('0xd3')]+=0x1;this[_0xa3c0('0x22')][_0x273261[_0xa3c0('0xc3')]][_0xa3c0('0xd4')]+=0x1;_0xb6d760[_0xa3c0('0x71')]=0xa;_0xb6d760[_0xa3c0('0x72')]=_0xa3c0('0xd5');_0xb6d760[_0xa3c0('0xd6')]=_0xa3c0('0xd7');_0xb6d760['agiafterat']=this[_0xa3c0('0x22')][_0x273261['queue']][_0xa3c0('0xce')]?moment()[_0xa3c0('0x46')](_0xa3c0('0xc9')):undefined;_0xb6d760[_0xa3c0('0xd8')]+=0x1;_0xb6d760['countglobal']+=0x1;_0x3d1596=this[_0xa3c0('0x22')][_0x273261[_0xa3c0('0xc3')]][_0xa3c0('0xd9')];_0x2e4b7b=this[_0xa3c0('0x22')][_0x273261['queue']][_0xa3c0('0xda')];hopperUtils['verifyAdditionalPhones'](_0xb6d760,_0xb6d760[_0xa3c0('0x71')],_0x2282a4['voiceQueue'])['then'](function(_0x3ef9f4){_0x210692=_0x3ef9f4[_0xa3c0('0xdb')]==0x1;if(_0xb6d760[_0xa3c0('0xd8')]>=_0x1e99e9['voiceQueues'][_0x273261[_0xa3c0('0xc3')]][_0xa3c0('0xdc')]){_0x1e99e9['queueCallerAbandonCreateState'](_0xb6d760,_0x3ef9f4[_0xa3c0('0xdb')]);}else{hopperUtils[_0xa3c0('0xdd')]({'active':![],'countdropretry':_0xb6d760[_0xa3c0('0xd8')],'scheduledat':moment()[_0xa3c0('0xde')](_0x1e99e9[_0xa3c0('0x22')][_0x273261[_0xa3c0('0xc3')]][_0xa3c0('0xd9')],_0xa3c0('0xdf'))[_0xa3c0('0x46')](_0xa3c0('0xc9')),'ContactId':_0x2282a4['ContactId'],'ListId':_0x2282a4['ListId'],'VoiceQueueId':_0x2282a4[_0xa3c0('0xe0')]||undefined,'CampaignId':_0x2282a4['CampaignId']||undefined})[_0xa3c0('0xa7')](loggerCatch('[rescheduleContact][Drop]'));var _0x1c865a=new History(_0xb6d760);_0x1c865a[_0xa3c0('0x71')]=0xa;_0x1c865a[_0xa3c0('0x72')]=_0xa3c0('0xd5');_0x1c865a[_0xa3c0('0x73')]=moment()[_0xa3c0('0x46')]('YYYY-MM-DD\x20HH:mm:ss');_0x1c865a['endtime']=_0x1c865a[_0xa3c0('0x73')];_0x1c865a[_0xa3c0('0xe1')]=_0xb6d760[_0xa3c0('0xe1')];_0x1c865a[_0xa3c0('0xe2')]=_0xb6d760['calleridnum'];hopperUtils[_0xa3c0('0xd0')](_0x1c865a)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0xe3')));}})['then'](function(){if(_0x210692)hopperUtils[_0xa3c0('0xe4')](_0xb6d760,_0x3d1596,_0x2e4b7b)[_0xa3c0('0x3e')](function(){return 0x1;});});}else{this['voiceQueues'][_0x273261['queue']]['predictiveIntervalDroppedCallsCallersExit']+=0x1;this[_0xa3c0('0x22')][_0x273261['queue']][_0xa3c0('0xe5')]+=0x1;_0xb6d760['state']=0xb;_0xb6d760['statedesc']=_0xa3c0('0xe6');_0xb6d760[_0xa3c0('0xd6')]=_0xa3c0('0xe7');_0xb6d760['countabandonedretry']+=0x1;_0xb6d760[_0xa3c0('0xe8')]+=0x1;_0x3d1596=this[_0xa3c0('0x22')][_0x273261[_0xa3c0('0xc3')]][_0xa3c0('0xe9')];_0x2e4b7b=this[_0xa3c0('0x22')][_0x273261['queue']][_0xa3c0('0xda')];hopperUtils['verifyAdditionalPhones'](_0xb6d760,_0xb6d760['state'],_0x2282a4[_0xa3c0('0xea')])[_0xa3c0('0x3e')](function(_0x1d4c30){if(_0xb6d760['countabandonedretry']>=_0x1e99e9[_0xa3c0('0x22')][_0x273261['queue']][_0xa3c0('0xeb')]){_0x1e99e9['queueCallerAbandonCreateState'](_0xb6d760,_0x1d4c30[_0xa3c0('0xdb')]);}else{hopperUtils[_0xa3c0('0xdd')]({'active':![],'countabandonedretry':_0xb6d760[_0xa3c0('0xec')],'scheduledat':moment()[_0xa3c0('0xde')](_0x1e99e9['voiceQueues'][_0x273261[_0xa3c0('0xc3')]][_0xa3c0('0xe9')],_0xa3c0('0xdf'))[_0xa3c0('0x46')](_0xa3c0('0xc9')),'ContactId':_0x2282a4[_0xa3c0('0xed')],'ListId':_0x2282a4[_0xa3c0('0xee')],'VoiceQueueId':_0x2282a4[_0xa3c0('0xe0')]||undefined,'CampaignId':_0x2282a4[_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0xf0')));var _0x24ad64=new History(_0xb6d760);_0x24ad64['state']=0xb;_0x24ad64[_0xa3c0('0x72')]=_0xa3c0('0xe6');_0x24ad64[_0xa3c0('0x73')]=moment()[_0xa3c0('0x46')](_0xa3c0('0xc9'));_0x24ad64[_0xa3c0('0xf1')]=_0x24ad64[_0xa3c0('0x73')];_0x24ad64[_0xa3c0('0xe1')]=_0xb6d760['calleridname'];_0x24ad64['calleridnum']=_0xb6d760[_0xa3c0('0xe2')];hopperUtils['createHistory'](_0x24ad64)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0xf2')));}})[_0xa3c0('0x3e')](function(){if(_0x210692)hopperUtils['swapAdditionalPhones'](_0xb6d760,_0x3d1596,_0x2e4b7b)['then'](function(){return 0x1;});});}}}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x39')]=function(_0x105d78){if(this[_0xa3c0('0x27')][_0x105d78[_0xa3c0('0xc5')]]){this['actions'][_0x105d78[_0xa3c0('0xc5')]][_0xa3c0('0xf3')]=_0x105d78[_0xa3c0('0xf3')];}if(this[_0xa3c0('0xc4')][_0x105d78[_0xa3c0('0xc5')]]){this['uniqueId'][_0x105d78['uniqueid']][_0xa3c0('0xf3')]=_0x105d78[_0xa3c0('0xf3')];}};Dialer[_0xa3c0('0x1c')]['syncQueueMember']=function(_0x198efa){if(!this['actions'][_0x198efa['actionid']]){return;}var _0x5ab409=this[_0xa3c0('0x22')][this[_0xa3c0('0x27')][_0x198efa['actionid']][_0xa3c0('0xc3')]][_0xa3c0('0xf4')]||'rrmemory';if(_0x5ab409==='roundrobin'){if(this[_0xa3c0('0x27')][_0x198efa[_0xa3c0('0xf5')]]&&_[_0xa3c0('0xf6')](this[_0xa3c0('0x27')][_0x198efa[_0xa3c0('0xf5')]]['locked'])&&_0x198efa['status']==='1'&&_0x198efa['paused']==='0'){if(this[_0xa3c0('0x24')][_0x198efa[_0xa3c0('0xf7')]]){if(!this['agents'][_0x198efa['stateinterface']][_0xa3c0('0xf8')]){this['agents'][_0x198efa[_0xa3c0('0xf7')]][_0xa3c0('0xf8')]=!![];this[_0xa3c0('0x27')][_0x198efa['actionid']][_0xa3c0('0xf8')]=!![];this[_0xa3c0('0x27')][_0x198efa[_0xa3c0('0xf5')]][_0xa3c0('0xf7')]=_0x198efa['stateinterface'];}}}}else if(_0x5ab409===_0xa3c0('0xf9')){if(this[_0xa3c0('0x27')][_0x198efa[_0xa3c0('0xf5')]]){if(this[_0xa3c0('0x24')][_0x198efa[_0xa3c0('0xf7')]]){this[_0xa3c0('0x27')][_0x198efa['actionid']][_0xa3c0('0xf7')]=_0x198efa[_0xa3c0('0xf7')];if(_[_0xa3c0('0xf6')](this[_0xa3c0('0x2a')][this['actions'][_0x198efa['actionid']][_0xa3c0('0xc3')]])){this[_0xa3c0('0x2a')][this[_0xa3c0('0x27')][_0x198efa[_0xa3c0('0xf5')]]['queue']]=[];}this['queueBooked'][this['actions'][_0x198efa[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]][_0xa3c0('0x9f')](_[_0xa3c0('0x62')](_[_0xa3c0('0x78')](this[_0xa3c0('0x27')][_0x198efa[_0xa3c0('0xf5')]],[_0xa3c0('0xfa'),'stateinterface']),{'status':_0x198efa[_0xa3c0('0x8d')],'paused':_0x198efa[_0xa3c0('0xfb')]}));}}}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0xfc')]=function(_0x3ee725){if(!this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]]){return;}var _0x3048df=this;var _0x9a628d=this[_0xa3c0('0x22')][this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]];var _0x5761aa=_0x9a628d[_0xa3c0('0xf4')]||'rrmemory';if(_0x5761aa===_0xa3c0('0xfd')){if(this['actions'][_0x3ee725[_0xa3c0('0xf5')]]&&this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xf7')]){this[_0xa3c0('0x21')]['run'](this[_0xa3c0('0x27')][_0x3ee725['actionid']][_0xa3c0('0xfa')],this['actions'][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xf7')])[_0xa3c0('0xa7')](function(_0x2b472b){logger['error'](_0xa3c0('0xfe'),util[_0xa3c0('0x45')](_0x2b472b,{'showHidden':![],'depth':null}));})[_0xa3c0('0x1f')](function(){_0x3048df[_0xa3c0('0xc8')](_0x3048df[_0xa3c0('0x22')][_0x3048df[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]]);_0x3048df[_0xa3c0('0x24')][_0x3048df['actions'][_0x3ee725[_0xa3c0('0xf5')]]['stateinterface']][_0xa3c0('0xf8')]=![];delete _0x3048df[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]];unlockQueueStatus(_0x9a628d);});}else{this[_0xa3c0('0xc8')](this[_0xa3c0('0x22')][this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]]);hopperUtils[_0xa3c0('0xdd')]({'active':![],'ContactId':this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xed')],'ListId':this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xee')],'VoiceQueueId':this[_0xa3c0('0x27')][_0x3ee725['actionid']][_0xa3c0('0xe0')]||undefined,'CampaignId':this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]]['CampaignId']||undefined})['catch'](loggerCatch(_0xa3c0('0xff')));delete this['actions'][_0x3ee725[_0xa3c0('0xf5')]];unlockQueueStatus(_0x9a628d);}}else if(_0x5761aa===_0xa3c0('0xf9')){var _0x4b0efd;if(this[_0xa3c0('0x27')][_0x3ee725['actionid']]&&!_[_0xa3c0('0x49')](this[_0xa3c0('0x2a')][this[_0xa3c0('0x27')][_0x3ee725['actionid']][_0xa3c0('0xc3')]])){if(this[_0xa3c0('0x2b')][_0x3048df['actions'][_0x3ee725['actionid']]['queue']]){this[_0xa3c0('0x2b')][_0x3048df['actions'][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]]=this['queueBookedRR'][this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]]['queue']]?this['queueBookedRR'][this['actions'][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]]:this[_0xa3c0('0x2a')][this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]]?this['queueBooked'][this['actions'][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]]['_rr']||0x0:0x0;}this['queueBooked'][this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]][_0xa3c0('0x100')]=this['queueBookedRR'][this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]];for(var _0x5186ff=0x0;_0x5186ff<this['queueBooked'][this[_0xa3c0('0x27')][_0x3ee725['actionid']][_0xa3c0('0xc3')]][_0xa3c0('0x9e')];_0x5186ff+=0x1){_0x4b0efd=rr(this[_0xa3c0('0x2a')][this['actions'][_0x3ee725['actionid']][_0xa3c0('0xc3')]]);this[_0xa3c0('0x2b')][_0x3048df[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]]=this['queueBooked'][this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]][_0xa3c0('0x100')];if(_0x4b0efd[_0xa3c0('0x8d')]==='1'&&_0x4b0efd['paused']==='0'){break;}}if(!_[_0xa3c0('0xf6')](_0x4b0efd)){this[_0xa3c0('0x24')][_0x4b0efd[_0xa3c0('0xf7')]][_0xa3c0('0x101')]=_['isUndefined'](this[_0xa3c0('0x24')][_0x4b0efd[_0xa3c0('0xf7')]][_0xa3c0('0x101')])?!![]:this[_0xa3c0('0x24')][_0x4b0efd[_0xa3c0('0xf7')]][_0xa3c0('0x101')];}loggerBooked[_0xa3c0('0x4a')]('[booked][RR]',_0x3ee725[_0xa3c0('0xf5')],_0xa3c0('0x102'),JSON[_0xa3c0('0x77')](_['pick'](this[_0xa3c0('0x24')][_0x4b0efd[_0xa3c0('0xf7')]],['name',_0xa3c0('0x101')])),_0xa3c0('0x103'),JSON[_0xa3c0('0x77')](_0x4b0efd[_0xa3c0('0xfa')]));if(!_[_0xa3c0('0xf6')](_0x4b0efd)&&_0x4b0efd[_0xa3c0('0x8d')]==='1'&&_0x4b0efd['paused']==='0'&&this[_0xa3c0('0x24')][_0x4b0efd[_0xa3c0('0xf7')]][_0xa3c0('0x101')]){this['agents'][_0x4b0efd['stateinterface']][_0xa3c0('0x101')]=![];this[_0xa3c0('0x2a')][_0x3048df['actions'][_0x3ee725['actionid']][_0xa3c0('0xc3')]]=[];this['preview'][_0xa3c0('0x104')](_0x4b0efd[_0xa3c0('0xfa')],_0x4b0efd[_0xa3c0('0xf7')])[_0xa3c0('0xa7')](function(_0x2de0e7){logger[_0xa3c0('0x68')](_0xa3c0('0xfe'),util[_0xa3c0('0x45')](_0x2de0e7,{'showHidden':![],'depth':null}));})['finally'](function(){_0x3048df[_0xa3c0('0xc8')](_0x3048df[_0xa3c0('0x22')][_0x3048df[_0xa3c0('0x27')][_0x3ee725['actionid']]['queue']]);setTimeout(function(){_0x3048df[_0xa3c0('0x24')][_0x4b0efd[_0xa3c0('0xf7')]][_0xa3c0('0x101')]=!![];loggerBooked[_0xa3c0('0x4a')](_0xa3c0('0x105'),_0x3ee725[_0xa3c0('0xf5')],_0xa3c0('0x102'),JSON[_0xa3c0('0x77')](_['pick'](_0x3048df[_0xa3c0('0x24')][_0x4b0efd[_0xa3c0('0xf7')]],[_0xa3c0('0x48'),_0xa3c0('0x101')])),_0xa3c0('0x103'),JSON['stringify'](_0x4b0efd['idHopper']));},0xc7);delete _0x3048df[_0xa3c0('0x27')][_0x3ee725['actionid']];unlockQueueStatus(_0x9a628d,_0x3ee725[_0xa3c0('0xf5')]);});}else{loggerBooked[_0xa3c0('0x4a')](_0xa3c0('0x106'));this[_0xa3c0('0xc8')](this[_0xa3c0('0x22')][this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]]);hopperUtils[_0xa3c0('0xdd')]({'active':![],'ContactId':this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]]['ContactId'],'ListId':this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]]['ListId'],'VoiceQueueId':this[_0xa3c0('0x27')][_0x3ee725['actionid']][_0xa3c0('0xe0')]||undefined,'CampaignId':this[_0xa3c0('0x27')][_0x3ee725['actionid']][_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0xff')));delete this['actions'][_0x3ee725[_0xa3c0('0xf5')]];unlockQueueStatus(_0x9a628d);}}else{loggerBooked[_0xa3c0('0x4a')]('[booked][unlock2]');this[_0xa3c0('0xc8')](this[_0xa3c0('0x22')][this[_0xa3c0('0x27')][_0x3ee725['actionid']][_0xa3c0('0xc3')]]);hopperUtils['rescheduleContact']({'active':![],'ContactId':this['actions'][_0x3ee725['actionid']][_0xa3c0('0xed')],'ListId':this['actions'][_0x3ee725['actionid']]['ListId'],'VoiceQueueId':this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]]['VoiceQueueId']||undefined,'CampaignId':this[_0xa3c0('0x27')][_0x3ee725['actionid']][_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x107')));delete this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]];unlockQueueStatus(_0x9a628d);}}else{loggerBooked['info'](_0xa3c0('0x108'));this['updateOriginated'](this[_0xa3c0('0x22')][this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]]);hopperUtils[_0xa3c0('0xdd')]({'active':![],'ContactId':this['actions'][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xed')],'ListId':this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xee')],'VoiceQueueId':this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xe0')]||undefined,'CampaignId':this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xef')]||undefined})['catch'](loggerCatch(_0xa3c0('0x109')));delete this['actions'][_0x3ee725[_0xa3c0('0xf5')]];unlockQueueStatus(_0x9a628d);}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x32')]=function(_0x3a0bc4){var _0x48edd0=this[_0xa3c0('0x27')][_0x3a0bc4[_0xa3c0('0xf5')]];if(_0x48edd0){delete this[_0xa3c0('0x27')][_0x3a0bc4[_0xa3c0('0xf5')]];_0x48edd0[_0xa3c0('0x10a')]=moment()['format'](_0xa3c0('0xc9'));var _0x5edab5=_0x48edd0[_0xa3c0('0xc6')]==='ivr'?this[_0xa3c0('0x23')][_0x48edd0[_0xa3c0('0xc3')]]:this[_0xa3c0('0x22')][_0x48edd0[_0xa3c0('0x10b')]()];if(_0x3a0bc4[_0xa3c0('0x10c')]!==_0xa3c0('0x10d')){this[_0xa3c0('0xc8')](_0x5edab5);return this[_0xa3c0('0x10e')](_0x48edd0,_0x5edab5,_0x3a0bc4)['catch'](loggerCatch('[callProgressDetecting]\x20'));}this[_0xa3c0('0xc4')][_0x3a0bc4['uniqueid']]=_0x48edd0;}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x3a')]=function(_0x1b721e){var _0x146fb9=this;var _0x51a8c8=this[_0xa3c0('0xc4')][_0x1b721e[_0xa3c0('0xc5')]];var _0x4414d3;if(!_[_0xa3c0('0xf6')](_0x1b721e)&&!_[_0xa3c0('0xf6')](_0x1b721e[_0xa3c0('0x10f')])&&!_[_0xa3c0('0xf6')](_0x1b721e['variable'][_0xa3c0('0x110')])&&_0x1b721e[_0xa3c0('0x111')]==='xcally-motion-dialer'&&_0x51a8c8){if(_0x51a8c8[_0xa3c0('0xc6')]!==_0xa3c0('0xc7')&&this[_0xa3c0('0x22')][_0x51a8c8[_0xa3c0('0xc3')]][_0xa3c0('0x112')]&&_0x1b721e['value']==='HANGUP'){delete this[_0xa3c0('0xc4')][_0x1b721e[_0xa3c0('0xc5')]];this[_0xa3c0('0xc8')](this[_0xa3c0('0x22')][_0x51a8c8[_0xa3c0('0xc3')]]);this[_0xa3c0('0x22')][_0x51a8c8[_0xa3c0('0xc3')]]['outboundAnswerCallsDay']+=0x1;this[_0xa3c0('0x22')][_0x51a8c8[_0xa3c0('0xc3')]][_0xa3c0('0x113')]+=0x1;_0x4414d3=new Hangup(_0x51a8c8,_0x1b721e);_0x4414d3['state']=0x12;_0x4414d3[_0xa3c0('0x72')]=_0xa3c0('0x114');_0x4414d3[_0xa3c0('0x115')]=_0xa3c0('0x116');ami[_0xa3c0('0x41')](_0xa3c0('0x117'),ut['buildObj'](_0x4414d3,_0xa3c0('0x118')));this['saveInDb'](_0x4414d3,'[syncHangupInAMD][createHistory]','[syncHangupInAMD]');}if(_0x51a8c8[_0xa3c0('0xc6')]!==_0xa3c0('0xc7')&&this['voiceQueues'][_0x51a8c8[_0xa3c0('0xc3')]][_0xa3c0('0x112')]&&_0x1b721e['value']===_0xa3c0('0x119')){return new Promise(function(_0x28614b,_0x4709a8){delete _0x146fb9['uniqueId'][_0x1b721e['uniqueid']];_0x146fb9[_0xa3c0('0xc8')](_0x146fb9[_0xa3c0('0x22')][_0x51a8c8[_0xa3c0('0xc3')]]);_0x146fb9['voiceQueues'][_0x51a8c8['queue']]['outboundAnswerCallsDay']+=0x1;_0x146fb9['voiceQueues'][_0x51a8c8[_0xa3c0('0xc3')]][_0xa3c0('0x113')]+=0x1;var _0x375d65=_0x146fb9[_0xa3c0('0x22')][_0x51a8c8['queue']];var _0x59e574=new Hangup(_0x51a8c8,_0x1b721e);_0x59e574['state']=0x13;_0x59e574[_0xa3c0('0x72')]=_0xa3c0('0x11a');_0x59e574[_0xa3c0('0x115')]='AMD';_0x59e574[_0xa3c0('0x11b')]+=0x1;_0x59e574[_0xa3c0('0xe8')]+=0x1;_0x59e574[_0xa3c0('0x118')]=!![];ami[_0xa3c0('0x41')]('custom:amd',ut[_0xa3c0('0x11c')](_0x59e574,_0xa3c0('0x118')));hopperUtils[_0xa3c0('0xd0')](_0x59e574)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x11d')));if(_0x59e574[_0xa3c0('0x11e')]+_0x59e574['countcongestionretry']+_0x59e574[_0xa3c0('0x11f')]+_0x59e574[_0xa3c0('0x120')]+_0x59e574['countdropretry']+_0x59e574['countabandonedretry']+_0x59e574['countmachineretry']+_0x59e574[_0xa3c0('0x121')]>=_0x375d65[_0xa3c0('0x122')]){_0x146fb9['stateGlobal'](_0x59e574,_0x28614b,_0x4709a8,_0xa3c0('0x123'));}else{if(_0x59e574[_0xa3c0('0x11b')]>=_0x375d65[_0xa3c0('0x124')]){_0x146fb9[_0xa3c0('0x125')](_0x59e574,_0x28614b,_0x4709a8,_0xa3c0('0x126'));}else{hopperUtils[_0xa3c0('0xdd')]({'active':![],'countmachineretry':_0x59e574[_0xa3c0('0x11b')],'scheduledat':moment()[_0xa3c0('0xde')](_0x375d65[_0xa3c0('0x127')],'minutes')[_0xa3c0('0x46')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x59e574[_0xa3c0('0xed')],'ListId':_0x59e574[_0xa3c0('0xee')],'VoiceQueueId':_0x59e574[_0xa3c0('0xe0')]||undefined,'CampaignId':_0x59e574[_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x128')));_0x28614b({'reschedule':0x1});}}});}if(_0x51a8c8[_0xa3c0('0xc6')]==='ivr'&&this['campaigns'][_0x51a8c8[_0xa3c0('0xc3')]][_0xa3c0('0x112')]&&_0x1b721e[_0xa3c0('0x129')]===_0xa3c0('0x12a')){delete this['uniqueId'][_0x1b721e[_0xa3c0('0xc5')]];this[_0xa3c0('0xc8')](this[_0xa3c0('0x23')][_0x51a8c8[_0xa3c0('0xc3')]]);_0x4414d3=new Hangup(_0x51a8c8,_0x1b721e);_0x4414d3[_0xa3c0('0x71')]=0x12;_0x4414d3[_0xa3c0('0x72')]=_0xa3c0('0x114');_0x4414d3[_0xa3c0('0x115')]='AMD';ami[_0xa3c0('0x41')](_0xa3c0('0x117'),ut[_0xa3c0('0x11c')](_0x4414d3,_0xa3c0('0x118')));this[_0xa3c0('0x12b')](_0x4414d3,_0xa3c0('0x12c'),'[syncHangupInAMDIvr]');}if(_0x51a8c8['type']===_0xa3c0('0xc7')&&this[_0xa3c0('0x23')][_0x51a8c8[_0xa3c0('0xc3')]][_0xa3c0('0x112')]&&_0x1b721e['value']===_0xa3c0('0x119')){return new Promise(function(_0x3d1b29,_0x5b7874){delete _0x146fb9['uniqueId'][_0x1b721e[_0xa3c0('0xc5')]];_0x146fb9['updateOriginated'](_0x146fb9[_0xa3c0('0x23')][_0x51a8c8[_0xa3c0('0xc3')]]);_0x146fb9[_0xa3c0('0x23')][_0x51a8c8['queue']][_0xa3c0('0xca')]+=0x1;_0x146fb9[_0xa3c0('0x23')][_0x51a8c8[_0xa3c0('0xc3')]]['outboundAnswerAgiCallsDay']+=0x1;var _0x5e95f4=_0x146fb9['campaigns'][_0x51a8c8['queue']];var _0xb566e2=new Hangup(_0x51a8c8,_0x1b721e);_0xb566e2[_0xa3c0('0x71')]=0x13;_0xb566e2[_0xa3c0('0x72')]='Machine';_0xb566e2[_0xa3c0('0x115')]=_0xa3c0('0x116');_0xb566e2[_0xa3c0('0x11b')]+=0x1;_0xb566e2[_0xa3c0('0xe8')]+=0x1;_0xb566e2[_0xa3c0('0x118')]=!![];ami['emit'](_0xa3c0('0x117'),ut[_0xa3c0('0x11c')](_0xb566e2,_0xa3c0('0x118')));hopperUtils['createHistory'](_0xb566e2)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x11d')));if(_0xb566e2[_0xa3c0('0x11e')]+_0xb566e2[_0xa3c0('0x12d')]+_0xb566e2['countnoanswerretry']+_0xb566e2['countnosuchnumberretry']+_0xb566e2[_0xa3c0('0xd8')]+_0xb566e2[_0xa3c0('0xec')]+_0xb566e2[_0xa3c0('0x11b')]+_0xb566e2[_0xa3c0('0x121')]>=_0x5e95f4[_0xa3c0('0x122')]){_0x146fb9['stateGlobal'](_0xb566e2,_0x3d1b29,_0x5b7874,_0xa3c0('0x123'));}else{if(_0xb566e2['countmachineretry']>=_0x5e95f4[_0xa3c0('0x124')]){_0x146fb9[_0xa3c0('0x125')](_0xb566e2,_0x3d1b29,_0x5b7874,'reason\x2019\x20machine....');}else{hopperUtils[_0xa3c0('0xdd')]({'active':![],'countmachineretry':_0xb566e2[_0xa3c0('0x11b')],'scheduledat':moment()[_0xa3c0('0xde')](_0x5e95f4[_0xa3c0('0x127')],_0xa3c0('0xdf'))[_0xa3c0('0x46')](_0xa3c0('0xc9')),'ContactId':_0xb566e2[_0xa3c0('0xed')],'ListId':_0xb566e2[_0xa3c0('0xee')],'VoiceQueueId':_0xb566e2[_0xa3c0('0xe0')]||undefined,'CampaignId':_0xb566e2['CampaignId']||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x128')));_0x3d1b29({'reschedule':0x1});}}});}}};Dialer[_0xa3c0('0x1c')]['syncHangup']=function(_0x115ed2){var _0x2810ab=this[_0xa3c0('0xc4')][_0x115ed2[_0xa3c0('0xc5')]];var _0x35e23a;if(_0x2810ab&&_0x2810ab[_0xa3c0('0xc6')]===_0xa3c0('0xc7')){delete this[_0xa3c0('0xc4')][_0x115ed2[_0xa3c0('0xc5')]];this[_0xa3c0('0xc8')](this[_0xa3c0('0x23')][_0x2810ab['queue']]);this[_0xa3c0('0x23')][_0x2810ab[_0xa3c0('0xc3')]][_0xa3c0('0x12e')]+=0x1;_0x35e23a=new Hangup(_0x2810ab,_0x115ed2);hopperUtils['createHistory'](_0x35e23a)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x12f')));hopperUtils['moveContactManagedDialer'](_0x35e23a)[_0xa3c0('0xa7')](loggerCatch('[syncHangupIvr]'));}if(_0x2810ab&&_0x2810ab[_0xa3c0('0xc6')]!==_0xa3c0('0xc7')&&isNotNull(this['voiceQueues'][_0x2810ab[_0xa3c0('0xc3')]][_0xa3c0('0x130')])){delete this[_0xa3c0('0xc4')][_0x115ed2[_0xa3c0('0xc5')]];this[_0xa3c0('0xc8')](this['voiceQueues'][_0x2810ab[_0xa3c0('0xc3')]]);this[_0xa3c0('0x22')][_0x2810ab[_0xa3c0('0xc3')]][_0xa3c0('0xca')]+=0x1;this['voiceQueues'][_0x2810ab[_0xa3c0('0xc3')]]['outboundAnswerAgiCallsDay']+=0x1;_0x35e23a=new Hangup(_0x2810ab,_0x115ed2);_0x35e23a[_0xa3c0('0x71')]=0x10;_0x35e23a['statedesc']=_0xa3c0('0x131');_0x35e23a[_0xa3c0('0x115')]=_0xa3c0('0x132');hopperUtils['createHistory'](_0x35e23a)['catch'](loggerCatch('[syncHangupIvr][createHistory]'));hopperUtils[_0xa3c0('0x133')](_0x35e23a)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x134')));}if(_0x2810ab&&_0x2810ab[_0xa3c0('0xc6')]!==_0xa3c0('0xc7')&&!isNotNull(this[_0xa3c0('0x22')][_0x2810ab[_0xa3c0('0xc3')]]['dialQueueProject'])){if(_0x115ed2['cause-txt']===_0xa3c0('0x135')){delete this[_0xa3c0('0xc4')][_0x115ed2[_0xa3c0('0xc5')]];this[_0xa3c0('0x22')][_0x2810ab[_0xa3c0('0xc3')]][_0xa3c0('0xca')]+=0x1;const _0x51e9af=new AgentComplete(_0x2810ab,_0x115ed2);_0x51e9af[_0xa3c0('0xef')]=this['voiceQueues'][_0x2810ab[_0xa3c0('0xc3')]]['id'];hopperUtils[_0xa3c0('0xd0')](_0x51e9af)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x136')));hopperUtils[_0xa3c0('0x133')](_0x51e9af)['catch'](loggerCatch(_0xa3c0('0x137')));}else{delete this[_0xa3c0('0xc4')][_0x115ed2[_0xa3c0('0xc5')]];this[_0xa3c0('0xc8')](this[_0xa3c0('0x22')][_0x2810ab[_0xa3c0('0xc3')]]);this['voiceQueues'][_0x2810ab['queue']][_0xa3c0('0x138')]+=0x1;_0x35e23a=new Hangup(_0x2810ab,_0x115ed2);_0x35e23a[_0xa3c0('0x71')]=0xc;_0x35e23a[_0xa3c0('0x72')]=_0x115ed2['cause-txt'];_0x35e23a[_0xa3c0('0x115')]='Unknow';hopperUtils[_0xa3c0('0xd0')](_0x35e23a)[_0xa3c0('0xa7')](loggerCatch('[syncHangupIvr][createHistory]'));hopperUtils[_0xa3c0('0x133')](_0x35e23a)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x134')));}}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0xc')]=function(_0x32dac9){var _0x960323=this;if(!_0x960323[_0xa3c0('0x2c')][_0x32dac9['name']]){_0x960323[_0xa3c0('0x2c')][_0x32dac9[_0xa3c0('0x48')]]={'running':![]};}else if(_0x960323[_0xa3c0('0x2c')][_0x32dac9[_0xa3c0('0x48')]][_0xa3c0('0x139')]===!![]){return;}else if(_0x960323[_0xa3c0('0x2c')][_0x32dac9['name']][_0xa3c0('0x139')]===![]){_0x960323[_0xa3c0('0x2c')][_0x32dac9['name']][_0xa3c0('0x139')]=!![];}var _0xcdd372=_0x960323[_0xa3c0('0x22')][_0x32dac9[_0xa3c0('0x48')]];var _0x323c8c=_0xcdd372[_0xa3c0('0x6e')]!==utils[_0xa3c0('0x6b')]['INACTIVE'];var _0x22b239=utils[_0xa3c0('0x13a')](_0xcdd372);_0xcdd372[_0xa3c0('0x13b')]=utils[_0xa3c0('0x13c')](_0xcdd372,_0x960323[_0xa3c0('0x25')]);Promise[_0xa3c0('0xb4')]()[_0xa3c0('0x3e')](function(){if(_0xcdd372[_0xa3c0('0x13b')]===utils[_0xa3c0('0x6b')]['INACTIVE']){if(_0x323c8c){clearPredictiveAttributes(_0xcdd372);_0x32dac9[_0xa3c0('0x65')]=undefined;_0x32dac9['startProgressive']=undefined;}if(_0xcdd372[_0xa3c0('0x13b')]===utils[_0xa3c0('0x6b')][_0xa3c0('0x7e')]){_0x32dac9[_0xa3c0('0x13d')]=0x0;_0x32dac9[_0xa3c0('0xfb')]=0x0;_0x32dac9[_0xa3c0('0x13e')]=0x0;_0x32dac9['talking']=0x0;_0x32dac9[_0xa3c0('0x13f')]=0x0;}}else if(_0xcdd372[_0xa3c0('0x13b')]===utils[_0xa3c0('0x6b')][_0xa3c0('0x140')]&&!_0x22b239){return _0x960323[_0xa3c0('0x97')](_0xcdd372,!![])[_0xa3c0('0x3e')](function(){return _0x960323[_0xa3c0('0x97')](_0xcdd372,![]);})[_0xa3c0('0x3e')](function(){return _0x960323[_0xa3c0('0xb7')](_0xcdd372);})[_0xa3c0('0xa7')](function(_0x4b9765){loggerSyncQueueSummary[_0xa3c0('0x43')](_0xa3c0('0x141'),util[_0xa3c0('0x45')](_0x4b9765,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0xcdd372);});}else{clearPredictiveAttributes(_0xcdd372);}})['then'](function(){var _0x4cb294=_0x32dac9[_0xa3c0('0x142')](_0xcdd372);if(_0x4cb294||_0xcdd372[_0xa3c0('0x143')]){_0xcdd372[_0xa3c0('0x143')]=![];_0x32dac9[_0xa3c0('0x144')](_0xcdd372);Object[_0xa3c0('0x145')](_0xcdd372,_0x32dac9);emitOutboundVoiceQueueSummary(_0x32dac9);}_0x960323['queuesSummary'][_0xcdd372[_0xa3c0('0x48')]][_0xa3c0('0x139')]=![];})[_0xa3c0('0xa7')](function(_0x3c4efc){logger['error'](_0xa3c0('0x141'),util[_0xa3c0('0x45')](_0x3c4efc,{'showHidden':![],'depth':null}));_0x960323['queuesSummary'][_0xcdd372[_0xa3c0('0x48')]][_0xa3c0('0x139')]=![];});};Dialer['prototype'][_0xa3c0('0x146')]=_[_0xa3c0('0x147')](function(){var _0x1330eb=_[_0xa3c0('0x148')](this[_0xa3c0('0x22')],function(_0x5835b3){return _0x5835b3[_0xa3c0('0x149')];});var _0x41d9da=_['filter'](this['agents'],function(_0x385d66){return _0x385d66['online']&&_0x385d66[_0xa3c0('0x8d')]===_0xa3c0('0x8e');});if(_0x1330eb['length']>0x0&&_0x41d9da['length']>0x0){return Promise['resolve']()[_0xa3c0('0x3e')](cmHopper[_0xa3c0('0x14a')](_[_0xa3c0('0x14b')](_0x1330eb,'id'),previewRecallmeReminderInterval,_['map'](_0x41d9da,'id')))[_0xa3c0('0x3e')](function(_0x550a0a){for(var _0x18f3f1=0x0;_0x18f3f1<_0x550a0a[_0xa3c0('0x9e')];_0x18f3f1++){var _0x321fbb=_0x550a0a[_0x18f3f1][_0xa3c0('0x14c')][_0xa3c0('0x48')];if(_0x321fbb)io['to'](util[_0xa3c0('0x46')]('user:%s',_0x321fbb))['emit'](_0xa3c0('0x14d'),{'hopper':_0x550a0a[_0x18f3f1]});}})[_0xa3c0('0xa7')](function(_0x20bbdc){logger['error'](_0xa3c0('0x14e'),_0x20bbdc);});}},0x3c*0x3e8,{'leading':!![]});Dialer[_0xa3c0('0x1c')][_0xa3c0('0x3d')]=function(){var _0x2229ac=this;setInterval(function(){_0x2229ac[_0xa3c0('0x14f')](_0x2229ac[_0xa3c0('0xc4')],'[uniqueid]');_0x2229ac[_0xa3c0('0x14f')](_0x2229ac[_0xa3c0('0x27')],_0xa3c0('0x150'));},0x32c8);};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x14f')]=function(_0x5da9fd,_0x515084){var _0x1f8884=this;for(var _0x56afa7 in _0x5da9fd){if(typeof _0x5da9fd[_0x56afa7]!==_0xa3c0('0xb3')){this[_0xa3c0('0x20')][_0xa3c0('0x1d')](function(){if(!_['isNil'](_0x5da9fd[_0x56afa7])){return ami[_0xa3c0('0xa0')]({'action':'status','channel':_0x5da9fd[_0x56afa7][_0xa3c0('0xf3')]})[_0xa3c0('0xa7')](function(_0x4b6de4){if(_0x4b6de4[_0xa3c0('0x6e')]===_0xa3c0('0x151')){setTimeout(function(){if(_0x5da9fd[_0x56afa7]&&_0x5da9fd[_0x56afa7][_0xa3c0('0xc6')]!==_0xa3c0('0xc7')){_0x1f8884[_0xa3c0('0xc8')](_0x1f8884['voiceQueues'][_0x5da9fd[_0x56afa7][_0xa3c0('0xc3')]]);logger[_0xa3c0('0x68')](_0xa3c0('0x152'),_0x515084,_0x56afa7,_0x5da9fd[_0x56afa7][_0xa3c0('0xc3')]);delete _0x5da9fd[_0x56afa7];}if(_0x5da9fd[_0x56afa7]&&_0x5da9fd[_0x56afa7]['type']===_0xa3c0('0xc7')){_0x1f8884[_0xa3c0('0xc8')](_0x1f8884['campaigns'][_0x5da9fd[_0x56afa7][_0xa3c0('0xc3')]]);logger[_0xa3c0('0x68')](_0xa3c0('0x153'),_0x515084,_0x56afa7,_0x5da9fd[_0x56afa7][_0xa3c0('0xc3')]);delete _0x5da9fd[_0x56afa7];}},0x2328);}});}});}}};Dialer[_0xa3c0('0x1c')]['getVoiceQueueRtPauses']=function(_0xa2f4d6){return Promise['resolve']()[_0xa3c0('0x3e')](voiceQueueRt['getVoiceQueueRtPauses'](_0xa2f4d6))['catch'](loggerCatch('[getVoiceQueueRtPauses]\x20'));};Dialer[_0xa3c0('0x1c')]['updateOriginated']=function(_0xed797b){if(!_[_0xa3c0('0x40')](_0xed797b)&&_0xed797b!==null){if(typeof _0xed797b[_0xa3c0('0x84')]!=='undefined'){if(_0xed797b[_0xa3c0('0x84')]>0x0){_0xed797b[_0xa3c0('0x84')]-=0x1;}else{logger[_0xa3c0('0x68')](_0xa3c0('0x154'));}}}else{logger['error'](_0xa3c0('0x155'));}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x156')]=function(_0x90d917,_0x211033){var _0x22088c=this;return function(_0xd689dd){_0x22088c['updateOriginated'](_0x211033);logger[_0xa3c0('0x68')](_0x90d917,util[_0xa3c0('0x45')](_0xd689dd,{'showHidden':![],'depth':null}));};};Dialer['prototype'][_0xa3c0('0x157')]=function(_0x73a8c1,_0xf44b96,_0xf3e8c1){var _0x2c8c35={'state':0x19,'statedesc':_0xa3c0('0x158')};this['updateOriginated'](_0xf44b96);this[_0xa3c0('0x12b')](_[_0xa3c0('0x62')](_0x2c8c35,_[_0xa3c0('0x78')](_0xf3e8c1,[_0xa3c0('0xed'),'ListId',_0xa3c0('0x159'),_0xa3c0('0xe0'),_0xa3c0('0xef')])),'[emptyContact][createHistory]',_0xa3c0('0x15a'));logger[_0xa3c0('0x68')](_0x73a8c1);};Dialer['prototype'][_0xa3c0('0x12b')]=function(_0x1f5d3a,_0xd1957e,_0x443a46){hopperUtils['createHistory'](_0x1f5d3a)[_0xa3c0('0xa7')](loggerCatch(_0xd1957e));hopperUtils['moveContactManagedDialer'](_0x1f5d3a)['catch'](loggerCatch(_0x443a46));};Dialer['prototype'][_0xa3c0('0x15b')]=function(_0x30134c,_0x483f03){hopperUtils['createHistory'](_0x30134c)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x136')));if(_0x483f03==0x0){hopperUtils[_0xa3c0('0x133')](_0x30134c)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x15c')));}};Dialer['prototype'][_0xa3c0('0x14e')]=function(_0x503f0f){return Promise[_0xa3c0('0xb4')]()[_0xa3c0('0x3e')](cmHopper[_0xa3c0('0x14a')](_0x503f0f['id'],previewRecallmeReminderInterval))[_0xa3c0('0x3e')](function(_0x497165){for(var _0x5f62c7=0x0;_0x5f62c7<_0x497165[_0xa3c0('0x9e')];_0x5f62c7++){var _0x4d6e3b=_0x497165[_0x5f62c7]['Agent'][_0xa3c0('0x48')];if(_0x4d6e3b)io['to'](util[_0xa3c0('0x46')](_0xa3c0('0x15d'),_0x4d6e3b))[_0xa3c0('0x41')](_0xa3c0('0x14d'),{'hopper':_0x497165[_0x5f62c7]});}})['catch'](function(){});};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x15e')]=function(_0xbe0cf6){var _0x34109a=this;return function(){_0x34109a[_0xa3c0('0x15f')](_0xbe0cf6);};};Dialer['prototype'][_0xa3c0('0x160')]=function(_0x396b06,_0x38dce9){var _0x572105=this;var _0x296a6f=uuid['v4']();this[_0xa3c0('0x27')][_0x296a6f]=new Action(_0x396b06,_0x38dce9,_0x296a6f);return new Promise(function(_0x4b6318,_0x1e2eeb){if(_[_0xa3c0('0x40')](_0x396b06)&&typeof _0x396b06!==_0xa3c0('0x161')){return _0x1e2eeb(msgResponse('originate',_0xa3c0('0x98'),_0xa3c0('0x162')));}if(_[_0xa3c0('0x40')](_0x38dce9[_0xa3c0('0x163')])||_0x38dce9[_0xa3c0('0x163')]===null){return _0x1e2eeb(msgResponse(_0xa3c0('0x164'),_0xa3c0('0x98'),_0xa3c0('0x165')));}var _0x515870={'XMD-CALLERID':_0x572105[_0xa3c0('0x27')][_0x296a6f][_0xa3c0('0x166')](),'XMD-AGI':_0x396b06[_0xa3c0('0x130')]?util[_0xa3c0('0x46')](_0xa3c0('0x167'),ipAgi,_0x396b06[_0xa3c0('0x130')]):_0xa3c0('0x168'),'XMD-AGIAFTER':_0x396b06[_0xa3c0('0xce')]?util[_0xa3c0('0x46')](_0xa3c0('0x167'),ipAgi,_0x396b06[_0xa3c0('0xce')]):_0xa3c0('0x168'),'XMD-QUEUE':utils[_0xa3c0('0x169')](_0x396b06)?util['format']('\x22%s,%s%s,,,%s\x22',_0x396b06[_0xa3c0('0x48')],_0x396b06['dialQueueOptions']||'',_0x396b06[_0xa3c0('0xcf')]?'c':'',_0x396b06[_0xa3c0('0xd2')]||0x3):_0xa3c0('0x168'),'XMD-CONTACTID':_0x38dce9[_0xa3c0('0xed')],'XMD-CDRTYPE':_0xa3c0('0x16a'),'CALLERID(all)':_0x572105[_0xa3c0('0x27')][_0x296a6f][_0xa3c0('0x166')](),'XMD-AMD':_0x396b06[_0xa3c0('0x112')]?_0xa3c0('0x140'):_0xa3c0('0x168'),'XMD-DESTINATION':_0xa3c0('0x16b')};if(_0x396b06[_0xa3c0('0x112')]){_0x515870[_0xa3c0('0x16c')]=_0x396b06[_0xa3c0('0x16d')]||0x9c4;_0x515870['XMD-AMDGREETING']=_0x396b06['dialAMDGreeting']||0x5dc;_0x515870[_0xa3c0('0x16e')]=_0x396b06[_0xa3c0('0x16f')]||0x320;_0x515870[_0xa3c0('0x170')]=_0x396b06['dialAMDTotalAnalysisTime']||0x1388;_0x515870[_0xa3c0('0x171')]=_0x396b06['dialAMDMinWordLength']||0x64;_0x515870[_0xa3c0('0x172')]=_0x396b06[_0xa3c0('0x173')]||0x32;_0x515870[_0xa3c0('0x174')]=_0x396b06[_0xa3c0('0x175')]||0x3;_0x515870[_0xa3c0('0x176')]=_0x396b06[_0xa3c0('0x177')]||0x100;_0x515870[_0xa3c0('0x178')]=_0x396b06[_0xa3c0('0x179')]||0x1388;}if(utils[_0xa3c0('0x169')](_0x396b06)){_0x515870[_0xa3c0('0x17a')]=_0x38dce9[_0xa3c0('0xe0')];}else{_0x515870[_0xa3c0('0x17b')]=_0x38dce9[_0xa3c0('0xef')];}var _0x2e4057=utils[_0xa3c0('0x17c')](_0x38dce9[_0xa3c0('0x17d')]);Object[_0xa3c0('0x145')](_0x515870,_0x2e4057);var _0x1a7ec5=_0x572105[_0xa3c0('0x8b')](_0x396b06[_0xa3c0('0x92')])?utils[_0xa3c0('0x17e')](_0x396b06['Trunk'][_0xa3c0('0x17f')],_0x396b06[_0xa3c0('0x180')],_0x396b06[_0xa3c0('0x181')]>0x0?utils[_0xa3c0('0x182')](_0x396b06[_0xa3c0('0x183')],_0x396b06[_0xa3c0('0x181')]):_0x396b06['dialOriginateCallerIdNumber']):utils[_0xa3c0('0x17e')](_[_0xa3c0('0xf6')](_0x396b06[_0xa3c0('0x93')])?_0x396b06[_0xa3c0('0x92')]['callerid']:_0x396b06[_0xa3c0('0x93')][_0xa3c0('0x17f')],_0x396b06[_0xa3c0('0x180')],_0x396b06['dialRandomLastDigitCallerIdNumber']>0x0?utils[_0xa3c0('0x182')](_0x396b06[_0xa3c0('0x183')],_0x396b06['dialRandomLastDigitCallerIdNumber']):_0x396b06[_0xa3c0('0x183')]);if(_0x1a7ec5){_0x515870[_0xa3c0('0x184')]=_0x572105[_0xa3c0('0x27')][_0x296a6f]['originatecalleridname']=utils['extractCalleridName'](_0x1a7ec5);_0x515870['XMD-ORIGINATECALLERIDNUM']=_0x38dce9[_0xa3c0('0x163')];}_0x396b06[_0xa3c0('0x185')]=_0x515870;return ami[_0xa3c0('0xa0')]({'actionid':_0x296a6f,'action':_0xa3c0('0x164'),'channel':_0x572105[_0xa3c0('0x8b')](_0x396b06[_0xa3c0('0x92')])?util[_0xa3c0('0x46')]('SIP/%s/%s%s',_0x396b06[_0xa3c0('0x92')]['name'],isNotNull(_0x396b06[_0xa3c0('0x186')])?_0x396b06[_0xa3c0('0x186')][_0xa3c0('0x187')]()||'':'',_0x396b06['dialCutDigit']>0x0?_0x38dce9['phone'][_0xa3c0('0x188')](_0x396b06[_0xa3c0('0x189')]):_0x38dce9[_0xa3c0('0x163')]):util['format'](_0xa3c0('0x18a'),_[_0xa3c0('0xf6')](_0x396b06[_0xa3c0('0x93')])?_0x396b06[_0xa3c0('0x92')][_0xa3c0('0x48')]:_0x396b06[_0xa3c0('0x93')][_0xa3c0('0x48')],isNotNull(_0x396b06[_0xa3c0('0x186')])?_0x396b06[_0xa3c0('0x186')][_0xa3c0('0x187')]()||'':'',_0x396b06[_0xa3c0('0x189')]>0x0?_0x38dce9[_0xa3c0('0x163')]['substring'](_0x396b06[_0xa3c0('0x189')]):_0x38dce9['phone']),'callerid':_0x1a7ec5,'Exten':_0xa3c0('0x16b'),'Context':_0xa3c0('0x18b'),'Priority':'1','variable':_0x515870,'timeout':(_0x396b06[_0xa3c0('0x18c')]||0x1e)*0x3e8,'async':!![],'channelid':_0x296a6f})[_0xa3c0('0x3e')](function(_0x30bd9e){return _0x4b6318(_0x30bd9e);})[_0xa3c0('0xa7')](function(_0x84103f){_0x396b06['outboundOriginateFailureCallsDay']+=0x1;var _0x12e315=new History(_0x572105[_0xa3c0('0x27')][_0x296a6f]);logger[_0xa3c0('0x68')](util[_0xa3c0('0x46')]('[originateError]:\x20%s',JSON[_0xa3c0('0x77')](_0x84103f)));_0x12e315[_0xa3c0('0x71')]=0xe;_0x12e315['statedesc']=_0xa3c0('0x18d');_0x12e315[_0xa3c0('0x73')]=moment()['format'](_0xa3c0('0xc9'));_0x12e315[_0xa3c0('0xf1')]=_0x12e315[_0xa3c0('0x73')];hopperUtils[_0xa3c0('0xd0')](_0x12e315)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x18e')));_0x572105[_0xa3c0('0x133')](_0x12e315)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x18e')))[_0xa3c0('0x1f')](function(){delete _0x572105[_0xa3c0('0x27')][_0x296a6f];return _0x1e2eeb(msgResponse('originate',_0xa3c0('0x8a'),_0xa3c0('0x18f')));});});});};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x190')]=function(_0x467479,_0xc5d198,_0x2cad28){var _0x5e4edf=new History(_0xc5d198);if(_0x5e4edf['countbusyretry']+_0x5e4edf['countcongestionretry']+_0x5e4edf[_0xa3c0('0x11f')]+_0x5e4edf[_0xa3c0('0x120')]+_0x5e4edf['countdropretry']+_0x5e4edf[_0xa3c0('0xec')]+_0x5e4edf[_0xa3c0('0x11b')]+_0x5e4edf['countagentrejectretry']>=_0x2cad28['dialGlobalMaxRetry']-0x1){return!![];}switch(_0x467479){case 0x3:if(_0x5e4edf[_0xa3c0('0x11f')]>=_0x2cad28['dialNoAnswerMaxRetry']-0x1){return!![];}hopperUtils[_0xa3c0('0xdd')]({'active':![],'countnoanswerretry':_0x5e4edf['countnoanswerretry']+=0x1,'scheduledat':moment()[_0xa3c0('0xde')](_0x2cad28[_0xa3c0('0x191')],_0xa3c0('0xdf'))[_0xa3c0('0x46')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x5e4edf[_0xa3c0('0xed')],'ListId':_0x5e4edf[_0xa3c0('0xee')],'VoiceQueueId':_0x5e4edf[_0xa3c0('0xe0')]||undefined,'CampaignId':_0x5e4edf[_0xa3c0('0xef')]||undefined})['catch'](loggerCatch('[rescheduleContact][NoAnswer]'));break;case 0x5:if(_0x5e4edf[_0xa3c0('0x11e')]>=_0x2cad28[_0xa3c0('0x192')]-0x1){return!![];}hopperUtils[_0xa3c0('0xdd')]({'active':![],'countbusyretry':_0x5e4edf[_0xa3c0('0x11e')]+=0x1,'scheduledat':moment()[_0xa3c0('0xde')](_0x2cad28[_0xa3c0('0x193')],_0xa3c0('0xdf'))[_0xa3c0('0x46')](_0xa3c0('0xc9')),'ContactId':_0x5e4edf['ContactId'],'ListId':_0x5e4edf[_0xa3c0('0xee')],'VoiceQueueId':_0x5e4edf[_0xa3c0('0xe0')]||undefined,'CampaignId':_0x5e4edf['CampaignId']||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x194')));break;case 0x8:if(_0x5e4edf[_0xa3c0('0x12d')]>=_0x2cad28[_0xa3c0('0x195')]-0x1){return!![];}hopperUtils[_0xa3c0('0xdd')]({'active':![],'countcongestionretry':_0x5e4edf[_0xa3c0('0x12d')]+=0x1,'scheduledat':moment()[_0xa3c0('0xde')](_0x2cad28['dialCongestionRetryFrequency'],_0xa3c0('0xdf'))['format'](_0xa3c0('0xc9')),'ContactId':_0x5e4edf[_0xa3c0('0xed')],'ListId':_0x5e4edf[_0xa3c0('0xee')],'VoiceQueueId':_0x5e4edf['VoiceQueueId']||undefined,'CampaignId':_0x5e4edf[_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x196')));break;case 0x0:if(_0x5e4edf[_0xa3c0('0x120')]>=_0x2cad28[_0xa3c0('0x197')]-0x1){return!![];}else{hopperUtils[_0xa3c0('0xdd')]({'active':![],'countnosuchnumberretry':_0x5e4edf[_0xa3c0('0x120')]+=0x1,'scheduledat':moment()[_0xa3c0('0xde')](_0x2cad28['dialNoSuchNumberRetryFrequency'],'minutes')[_0xa3c0('0x46')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x5e4edf['ContactId'],'ListId':_0x5e4edf[_0xa3c0('0xee')],'VoiceQueueId':_0x5e4edf[_0xa3c0('0xe0')]||undefined,'CampaignId':_0x5e4edf['CampaignId']||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x198')));}break;case 0xa:if(_0x5e4edf[_0xa3c0('0xd8')]>=_0x2cad28['dialDropMaxRetry']-0x1){return!![];}hopperUtils[_0xa3c0('0xdd')]({'active':![],'countdropretry':_0x5e4edf[_0xa3c0('0xd8')]+=0x1,'scheduledat':moment()[_0xa3c0('0xde')](_0x2cad28[_0xa3c0('0xd9')],_0xa3c0('0xdf'))[_0xa3c0('0x46')](_0xa3c0('0xc9')),'ContactId':_0x5e4edf[_0xa3c0('0xed')],'ListId':_0x5e4edf[_0xa3c0('0xee')],'VoiceQueueId':_0x5e4edf[_0xa3c0('0xe0')]||undefined,'CampaignId':_0x5e4edf[_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x199')));break;case 0xb:if(_0x5e4edf[_0xa3c0('0xec')]>=_0x2cad28[_0xa3c0('0xeb')]-0x1){return!![];}hopperUtils[_0xa3c0('0xdd')]({'active':![],'countabandonedretry':_0x5e4edf[_0xa3c0('0xec')]+=0x1,'scheduledat':moment()[_0xa3c0('0xde')](_0x2cad28[_0xa3c0('0xe9')],_0xa3c0('0xdf'))[_0xa3c0('0x46')](_0xa3c0('0xc9')),'ContactId':_0x5e4edf[_0xa3c0('0xed')],'ListId':_0x5e4edf[_0xa3c0('0xee')],'VoiceQueueId':_0x5e4edf['VoiceQueueId']||undefined,'CampaignId':_0x5e4edf['CampaignId']||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0xf0')));break;case 0x13:if(_0x5e4edf[_0xa3c0('0x11b')]>=_0x2cad28['dialMachineMaxRetry']-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countmachineretry':_0x5e4edf[_0xa3c0('0x11b')]+=0x1,'scheduledat':moment()[_0xa3c0('0xde')](_0x2cad28[_0xa3c0('0x127')],'minutes')[_0xa3c0('0x46')](_0xa3c0('0xc9')),'ContactId':_0x5e4edf[_0xa3c0('0xed')],'ListId':_0x5e4edf['ListId'],'VoiceQueueId':_0x5e4edf['VoiceQueueId']||undefined,'CampaignId':_0x5e4edf[_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x128')));break;case 0x14:if(_0x5e4edf[_0xa3c0('0x121')]>=_0x2cad28[_0xa3c0('0x19a')]-0x1){return!![];}hopperUtils[_0xa3c0('0xdd')]({'active':![],'countagentrejectretry':_0x5e4edf[_0xa3c0('0x121')]+=0x1,'scheduledat':moment()[_0xa3c0('0xde')](_0x2cad28['dialAgentRejectRetryFrequency'],_0xa3c0('0xdf'))['format'](_0xa3c0('0xc9')),'ContactId':_0x5e4edf[_0xa3c0('0xed')],'ListId':_0x5e4edf[_0xa3c0('0xee')],'VoiceQueueId':_0x5e4edf['VoiceQueueId']||undefined,'CampaignId':_0x5e4edf[_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x19b')));break;default:return!![];}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x10e')]=function(_0x3de66d,_0x203656,_0x2a8b95){var _0x4f0121=this;var _0xd2518c=new History(_0x3de66d);var _0x48ffba=![];var _0x4b3ad3;var _0x22ebb4;return new Promise(function(_0x42240a,_0xa9883e){if(_[_0xa3c0('0x40')](_0x203656)&&typeof _0x203656!==_0xa3c0('0x161')){return _0xa9883e(msgResponse(_0xa3c0('0x19c'),_0xa3c0('0x98'),_0xa3c0('0x19d')));}if(_[_0xa3c0('0x40')](_0x2a8b95)&&typeof _0x2a8b95!=='object'){return _0xa9883e(msgResponse(_0xa3c0('0x19c'),_0xa3c0('0x98'),'evt\x20is\x20undefine'));}hopperUtils['verifyAdditionalPhones'](_0xd2518c,_0x2a8b95[_0xa3c0('0xcb')],_0x203656)['then'](function(_0x48c644){if(_0x48c644[_0xa3c0('0xdb')]==0x1)_0x48ffba=!![];switch(_0x2a8b95['reason']){case'0':_0x203656[_0xa3c0('0x19e')]+=0x1;_0xd2518c['state']=0x0;_0xd2518c['statedesc']='NoSuchNumber';_0xd2518c[_0xa3c0('0x120')]+=0x1;_0xd2518c['countglobal']+=0x1;ami[_0xa3c0('0x41')](_0xa3c0('0x19f'),ut['buildObj'](_0x3de66d,'nosuchnumber'));_0x4b3ad3=_0x203656[_0xa3c0('0x1a0')];_0x22ebb4=_0x203656[_0xa3c0('0xda')];hopperUtils[_0xa3c0('0xd0')](_0xd2518c)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x11d')));if(_0x4f0121[_0xa3c0('0x190')](0x0,_0x3de66d,_0x203656)&&!_0x48ffba){if(_0xd2518c[_0xa3c0('0x120')]>=_0x203656[_0xa3c0('0x197')]){_0x4f0121[_0xa3c0('0x125')](_0xd2518c,_0x42240a,_0xa9883e,_0xa3c0('0x1a1'));}else{_0x4f0121['stateGlobal'](_0xd2518c,_0x42240a,_0xa9883e,'reason\x200\x20no\x20such\x20number....');}}break;case'3':_0x203656[_0xa3c0('0x1a2')]+=0x1;_0xd2518c[_0xa3c0('0x71')]=0x3;_0xd2518c[_0xa3c0('0x72')]=_0xa3c0('0x1a3');_0xd2518c['countnoanswerretry']+=0x1;_0xd2518c[_0xa3c0('0xe8')]+=0x1;var _0x158bf9=ut[_0xa3c0('0x1a4')](_0x3de66d,_0x203656);ami['emit'](_0xa3c0('0x1a5'),_0x158bf9);_0x4b3ad3=_0x203656[_0xa3c0('0x191')];_0x22ebb4=_0x203656[_0xa3c0('0xda')];hopperUtils[_0xa3c0('0xd0')](_0xd2518c)['catch'](loggerCatch(_0xa3c0('0x1a6')));if(_0x4f0121['checkRetriveMax'](0x3,_0x3de66d,_0x203656)&&!_0x48ffba){if(_0xd2518c['countnoanswerretry']>=_0x203656['dialNoAnswerMaxRetry']){_0x4f0121[_0xa3c0('0x125')](_0xd2518c,_0x42240a,_0xa9883e,'reason\x203\x20ringing\x20no\x20answer');}else{_0x4f0121['stateGlobal'](_0xd2518c,_0x42240a,_0xa9883e,_0xa3c0('0x1a7'));}}break;case'5':_0x203656[_0xa3c0('0x1a8')]+=0x1;_0xd2518c[_0xa3c0('0x71')]=0x5;_0xd2518c[_0xa3c0('0x72')]='Busy';_0xd2518c[_0xa3c0('0x11e')]+=0x1;_0xd2518c[_0xa3c0('0xe8')]+=0x1;ami[_0xa3c0('0x41')](_0xa3c0('0x1a9'),ut[_0xa3c0('0x11c')](_0x3de66d,'busy'));_0x4b3ad3=_0x203656[_0xa3c0('0x193')];_0x22ebb4=_0x203656['callAdditionalPhoneAfterMin'];hopperUtils['createHistory'](_0xd2518c)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x1aa')));if(_0x4f0121[_0xa3c0('0x190')](0x5,_0x3de66d,_0x203656)&&!_0x48ffba){if(_0xd2518c[_0xa3c0('0x11e')]>=_0x203656[_0xa3c0('0x192')]){_0x4f0121[_0xa3c0('0x125')](_0xd2518c,_0x42240a,_0xa9883e,_0xa3c0('0x1ab'));}else{_0x4f0121[_0xa3c0('0x1ac')](_0xd2518c,_0x42240a,_0xa9883e,_0xa3c0('0x1ab'));}}break;case'8':_0x203656[_0xa3c0('0x1ad')]+=0x1;_0xd2518c[_0xa3c0('0x71')]=0x8;_0xd2518c['statedesc']=_0xa3c0('0x1ae');_0xd2518c['countcongestionretry']+=0x1;_0xd2518c['countglobal']+=0x1;_0x4b3ad3=_0x203656[_0xa3c0('0x1af')];_0x22ebb4=_0x203656[_0xa3c0('0xda')];ami[_0xa3c0('0x41')](_0xa3c0('0x1b0'),ut[_0xa3c0('0x11c')](_0x3de66d,'congestion'));hopperUtils['createHistory'](_0xd2518c)['catch'](loggerCatch(_0xa3c0('0x1b1')));if(_0x4f0121[_0xa3c0('0x190')](0x8,_0x3de66d,_0x203656)&&!_0x48ffba){if(_0xd2518c[_0xa3c0('0x12d')]>=_0x203656['dialCongestionMaxRetry']){_0x4f0121[_0xa3c0('0x125')](_0xd2518c,_0x42240a,_0xa9883e,_0xa3c0('0x1b2'));}else{_0x4f0121[_0xa3c0('0x1ac')](_0xd2518c,_0x42240a,_0xa9883e,_0xa3c0('0x1b2'));}}break;case'11':_0x203656['outboundAbandonedCallsDay']+=0x1;_0xd2518c[_0xa3c0('0x71')]=0xb;_0xd2518c[_0xa3c0('0x72')]='Abandoned';_0xd2518c[_0xa3c0('0xec')]+=0x1;_0xd2518c[_0xa3c0('0xe8')]+=0x1;_0x4b3ad3=_0x203656['dialAbandonedRetryFrequency'];_0x22ebb4=_0x203656[_0xa3c0('0xda')];hopperUtils[_0xa3c0('0xd0')](_0xd2518c)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0xf2')));if(_0x4f0121[_0xa3c0('0x190')](0xb,_0x3de66d,_0x203656)&&!_0x48ffba){if(_0xd2518c[_0xa3c0('0xec')]>=_0x203656['dialAbandonedMaxRetry']){_0x4f0121['createStateFinal'](_0xd2518c,_0x42240a,_0xa9883e,'reason\x2011\x20abandoned');}else{_0x4f0121['stateGlobal'](_0xd2518c,_0x42240a,_0xa9883e,_0xa3c0('0x1b3'));}}break;case'20':_0x203656[_0xa3c0('0x1b4')]+=0x1;_0xd2518c[_0xa3c0('0x71')]=0x14;_0xd2518c[_0xa3c0('0x72')]=_0xa3c0('0x1b5');_0xd2518c['countagentrejectretry']+=0x1;_0xd2518c[_0xa3c0('0xe8')]+=0x1;_0x4b3ad3=_0x203656[_0xa3c0('0x1b6')];_0x22ebb4=_0x203656[_0xa3c0('0xda')];ami[_0xa3c0('0x41')](_0xa3c0('0x1b7'),ut[_0xa3c0('0x11c')](_0x3de66d,_0xa3c0('0x1b8')));hopperUtils['createHistory'](_0xd2518c)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x1b9')));if(_0x4f0121['checkRetriveMax'](0x14,_0x3de66d,_0x203656)&&!_0x48ffba){if(_0xd2518c['countagentrejectretry']>=_0x203656[_0xa3c0('0x19a')]){_0x4f0121[_0xa3c0('0x125')](_0xd2518c,_0x42240a,_0xa9883e,'reason\x2020\x20agentreject');}else{_0x4f0121[_0xa3c0('0x1ac')](_0xd2518c,_0x42240a,_0xa9883e,_0xa3c0('0x1ba'));}}break;default:_0x203656[_0xa3c0('0x138')]+=0x1;_0xd2518c['state']=0xc;_0xd2518c[_0xa3c0('0x72')]=_0x2a8b95['reason'];_0x4b3ad3=_0x203656[_0xa3c0('0x1b6')];_0x22ebb4=_0x203656['callAdditionalPhoneAfterMin'];hopperUtils[_0xa3c0('0xd0')](_0xd2518c)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x1bb')));if(_0x4f0121[_0xa3c0('0x190')](_0x2a8b95[_0xa3c0('0xcb')],_0x3de66d,_0x203656)&&!_0x48ffba){if(_0xd2518c[_0xa3c0('0x11e')]+_0xd2518c[_0xa3c0('0x12d')]+_0xd2518c[_0xa3c0('0x11f')]+_0xd2518c[_0xa3c0('0x120')]+_0xd2518c[_0xa3c0('0xd8')]+_0xd2518c[_0xa3c0('0xec')]+_0xd2518c[_0xa3c0('0x11b')]+_0xd2518c[_0xa3c0('0x121')]>=_0x203656[_0xa3c0('0x122')]){_0x4f0121[_0xa3c0('0x1ac')](_0xd2518c,_0x42240a,_0xa9883e,_0x2a8b95[_0xa3c0('0xcb')]);}else{_0x4f0121['createStateFinal'](_0xd2518c,_0x42240a,_0xa9883e,_0x2a8b95[_0xa3c0('0xcb')]);}}}})[_0xa3c0('0x3e')](function(){if(_0x48ffba){hopperUtils[_0xa3c0('0xe4')](_0xd2518c,_0x4b3ad3,_0x22ebb4)[_0xa3c0('0x3e')](function(){return _0x42240a(0x1);});}});});};Dialer['prototype']['stateGlobal']=function(_0x5e9525,_0x14ef6a,_0x20516b,_0x3b0b50){var _0x489908=new Final(_0x5e9525);_0x489908[_0xa3c0('0x71')]=0xf;_0x489908['statedesc']=_0xa3c0('0x1bc');this[_0xa3c0('0x125')](_0x489908,_0x14ef6a,_0x20516b,_0x3b0b50);};Dialer['prototype']['createStateFinal']=function(_0x36592b,_0x5d880c,_0x9d2fa7,_0x5557fe){hopperUtils[_0xa3c0('0x133')](_0x36592b)['then'](function(){return _0x5d880c(msgResponse(_0xa3c0('0x19c'),_0xa3c0('0x10d'),_0x5557fe));})[_0xa3c0('0xa7')](function(){return _0x9d2fa7(msgResponse('[moveContactManagedDialer][0]','Failure',_0xa3c0('0x1bd')));});};Dialer[_0xa3c0('0x1c')]['predictive']=function(_0x352c86){var _0x18528c=_0x352c86[_0xa3c0('0x1be')]/0x64;var _0x8a80bd=_0x352c86[_0xa3c0('0xd3')]/(_0x352c86[_0xa3c0('0xd3')]+_0x352c86['outboundAnswerCallsDay']);var _0x1f7ab1=Math[_0xa3c0('0x1bf')](_0x352c86[_0xa3c0('0x1c0')]*(_0x352c86[_0xa3c0('0x1c1')]/0x64));var _0xc04a37=Math[_0xa3c0('0x1bf')](_0x352c86[_0xa3c0('0x1c0')]*(_0x352c86['predictiveIntervalMinThreshold']/0x64));var _0x3f694d=_0x352c86[_0xa3c0('0x13d')]+_0x352c86['talking'];var _0x1a52d5=Math[_0xa3c0('0x1c2')](_0x352c86[_0xa3c0('0x5c')]*_0x352c86['erlangAbandonmentRate']*_0x352c86[_0xa3c0('0x1c3')]*_0x352c86[_0xa3c0('0x1c4')]);if(_[_0xa3c0('0x40')](_0x352c86[_0xa3c0('0x28')])){if(!_[_0xa3c0('0x40')](_0x352c86['startPredictive'])){_0x352c86[_0xa3c0('0x65')]=undefined;loggerPredictive['error'](_0xa3c0('0x1c5'),_0xa3c0('0x1c6'));}if(!_['isUndefined'](_0x352c86['handlePredictive'])){loggerPredictive[_0xa3c0('0x68')](_0xa3c0('0x1c5'),_0xa3c0('0x1c7'));clearInterval(_0x352c86[_0xa3c0('0x66')]);_0x352c86[_0xa3c0('0x66')]=undefined;}_0x352c86[_0xa3c0('0x28')]=moment()[_0xa3c0('0x46')](_0xa3c0('0xc9'));loggerPredictive[_0xa3c0('0x4a')](_0x352c86[_0xa3c0('0x48')],_0xa3c0('0x1c8'),_0x352c86[_0xa3c0('0x28')]);this[_0xa3c0('0xba')](_0x352c86,0x1);}else if(ifInterval(_0x352c86[_0xa3c0('0x1c9')],_0x352c86[_0xa3c0('0x28')])){this[_0xa3c0('0xba')](_0x352c86,0x1);loggerPredictiveCalls['info'](_0xa3c0('0x1ca'),_0x352c86[_0xa3c0('0x28')],_0x352c86[_0xa3c0('0x48')]);_0x352c86[_0xa3c0('0x5c')]=0x0;_0x352c86[_0xa3c0('0xd4')]=0x0;}else if(_0x18528c<_0x8a80bd&&_0x352c86[_0xa3c0('0x1cb')]===_0xa3c0('0x1cc')){clearPredictiveAttributes(_0x352c86);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x1cd'),'Dropped\x20calls\x20day',_0x8a80bd,_0xa3c0('0x28'),_0x352c86[_0xa3c0('0x48')]);}else if(_0x1a52d5<_0x352c86[_0xa3c0('0xd4')]&&_0x352c86[_0xa3c0('0x1cb')]===_0xa3c0('0x1cc')){clearPredictiveAttributes(_0x352c86);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x1ce'),_0xa3c0('0x1cf'),_0x1a52d5,_0xa3c0('0x1d0'),_0x352c86['predictiveIntervalErlangCallsDroppedCalls'],'startProgressive',_0x352c86['name']);}else if(!ifInterval(_0x352c86[_0xa3c0('0x1c9')],_0x352c86['startProgressive'])&&_[_0xa3c0('0x40')](_0x352c86[_0xa3c0('0x65')])&&!_['isUndefined'](_0x352c86[_0xa3c0('0x28')])){_0x352c86['startPredictive']=moment()[_0xa3c0('0x46')]('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive[_0xa3c0('0x4a')](_0x352c86['name'],_0xa3c0('0x1d1'),_0x352c86[_0xa3c0('0x65')]);hopperUtils[_0xa3c0('0x1d2')](_0x352c86[_0xa3c0('0x1c9')])['then'](this['getDataPredictive'](_0x352c86))[_0xa3c0('0x3e')](mergeDataErlangB(_0x352c86))['then'](this['startMethodPredictive'](_0x352c86))[_0xa3c0('0xa7')](loggerCatchPredictive(_0xa3c0('0x1d3'),_0x352c86));}else if(!ifInterval(_0x352c86['dialPredictiveInterval'],_0x352c86[_0xa3c0('0x65')])){_0x352c86['predictiveIntervalErlangCallsDroppedCalls']=0x0;_0x352c86[_0xa3c0('0x65')]=moment()[_0xa3c0('0x46')]('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive['info'](_0x352c86[_0xa3c0('0x48')],_0xa3c0('0x1d4'),_0x352c86[_0xa3c0('0x65')]);clearInterval(_0x352c86['handlePredictive']);_0x352c86[_0xa3c0('0x66')]=undefined;hopperUtils[_0xa3c0('0x1d2')](_0x352c86[_0xa3c0('0x1c9')])[_0xa3c0('0x3e')](this[_0xa3c0('0x1d5')](_0x352c86))['then'](mergeDataErlangB(_0x352c86))['then'](this[_0xa3c0('0x1d6')](_0x352c86))[_0xa3c0('0xa7')](loggerCatchPredictive('Predictive\x20for\x20every\x20interval',_0x352c86));}else if(_0x352c86[_0xa3c0('0x1c0')]&&_0x3f694d<_0x352c86[_0xa3c0('0x1c0')]-_0xc04a37){clearPredictiveAttributes(_0x352c86);loggerPredictive[_0xa3c0('0x4a')](_0x352c86[_0xa3c0('0x48')],_0xa3c0('0x1d7'),_0x3f694d,')\x20are\x20less\x20than\x20threshold\x20(',_0x352c86[_0xa3c0('0x1c0')],'-',_0xc04a37,'=',_0x352c86[_0xa3c0('0x1c0')]-_0xc04a37,')');}else if(_0x352c86['predictiveIntervalAvailable']&&_0x3f694d>_0x352c86['predictiveIntervalAvailable']+_0x1f7ab1){clearPredictiveAttributes(_0x352c86);loggerPredictive['info'](_0x352c86['name'],_0xa3c0('0x1d7'),_0x3f694d,_0xa3c0('0x1d8'),_0x352c86['predictiveIntervalAvailable'],'+',_0x1f7ab1,'=',_0x352c86[_0xa3c0('0x1c0')]+_0x1f7ab1,')');}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x1d5')]=function(_0x37a736){var _0x3fdf70=this;return function(_0x34bb96){return new Promise(function(_0x5b2975,_0x225bb6){_[_0xa3c0('0x62')](_0x37a736,_0x34bb96[0x0]);if(checkGetDataPredictive(_0x34bb96[0x0])){var _0x58d7ff=_0x37a736[_0xa3c0('0x1c0')]=_0x37a736[_0xa3c0('0x1d9')]+_0x37a736[_0xa3c0('0x13d')];var _0x430331=_0x37a736[_0xa3c0('0x1c9')]*0x3c;var _0x3ac055=_0x34bb96[0x0][_0xa3c0('0x56')]+_0x34bb96[0x0][_0xa3c0('0x53')];var _0x4033a2=(_0x34bb96[0x0][_0xa3c0('0x4e')]+_0x34bb96[0x0][_0xa3c0('0x50')]+_0x34bb96[0x0][_0xa3c0('0x52')])/_0x34bb96[0x0][_0xa3c0('0x4c')];_0x37a736['predictiveIntervalHitRate']=_0x4033a2>0x0?_0x4033a2:0x1;switch(_0x37a736[_0xa3c0('0x1cb')]){case'dropRate':var _0x4f5fd4=_0x37a736['dialPredictiveOptimizationPercentage']/0x64;return _0x3fdf70['abandonmentRate'](_0x58d7ff,_0x430331,_0x3ac055,_0x4033a2,_0x4f5fd4)[_0xa3c0('0x3e')](function(_0x4dba87){return _0x5b2975(_0x4dba87);});case _0xa3c0('0x1da'):var _0x5a9f3c=_0x37a736[_0xa3c0('0x1be')]/0x64;return _0x3fdf70[_0xa3c0('0x1db')](_0x58d7ff,_0x430331,_0x3ac055,_0x4033a2,_0x5a9f3c)['then'](function(_0x5b3059){return _0x5b2975(_0x5b3059);});default:return _0x225bb6(msgResponse(_0xa3c0('0x1dc'),_0xa3c0('0x98'),'Unknown\x20Predictive'));}}else{return _0x225bb6(msgResponse('[getDataPredictive]',_0xa3c0('0x98'),_0xa3c0('0x1dd')));}});};};Dialer['prototype'][_0xa3c0('0x1de')]=function(_0x1a7f23){var _0x372965=this;return function(_0x5d733e){return new Promise(function(_0xbe880,_0x57360a){_[_0xa3c0('0x62')](_0x1a7f23,_0x5d733e[0x0]);if(checkGetDataPredictive(_0x5d733e[0x0])){loggerPredictive[_0xa3c0('0x4a')](JSON['stringify'](_0x5d733e[0x0]));if(_0x1a7f23[_0xa3c0('0x1cb')]===_0xa3c0('0x1cc')){return _0x372965[_0xa3c0('0x1df')](_0x1a7f23['id'])[_0xa3c0('0x3e')](function(_0x155162){var _0x9b6158=_0x1a7f23[_0xa3c0('0x1e0')]-_0x155162[0x0][_0xa3c0('0x1e1')];var _0x986867=_0x1a7f23[_0xa3c0('0x1c9')]*0x3c;var _0x2c4c01=_0x5d733e[0x0][_0xa3c0('0x56')]+_0x5d733e[0x0]['predictiveIntervalAvgHoldtime'];var _0x27fad6=(_0x5d733e[0x0][_0xa3c0('0x4e')]+_0x5d733e[0x0][_0xa3c0('0x50')]+_0x5d733e[0x0][_0xa3c0('0x52')])/_0x5d733e[0x0]['predictiveIntervalTotalCalls'];var _0x4c6407=_0x1a7f23[_0xa3c0('0x1be')]/0x64;_0x1a7f23[_0xa3c0('0x1e2')]=_0x155162[0x0]['outboundQueuePauses']||0x0;_0x1a7f23[_0xa3c0('0x1c3')]=_0x27fad6>0x0?_0x27fad6:0x1;return _0x372965[_0xa3c0('0x1e3')](_0x9b6158,_0x986867,_0x2c4c01,_0x27fad6,_0x4c6407);})[_0xa3c0('0x3e')](function(_0x30f487){return _0xbe880(_0x30f487);})[_0xa3c0('0xa7')](function(_0x2a0564){return _0x57360a(msgResponse(_0xa3c0('0x1e4'),_0xa3c0('0x98'),JSON[_0xa3c0('0x77')](_0x2a0564)));});}if(_0x1a7f23[_0xa3c0('0x1cb')]===_0xa3c0('0x1da')){return _0x372965[_0xa3c0('0x1df')](_0x1a7f23['id'])['then'](function(_0x15a8f1){var _0x2c40d3=_0x1a7f23[_0xa3c0('0x1e0')]-_0x15a8f1[0x0][_0xa3c0('0x1e1')];var _0x42ef13=_0x1a7f23[_0xa3c0('0x1c9')]*0x3c;var _0x3fcf5e=_0x5d733e[0x0][_0xa3c0('0x56')]+_0x5d733e[0x0][_0xa3c0('0x53')];var _0x44b6ff=(_0x5d733e[0x0]['predictiveIntervalAnsweredCalls']+_0x5d733e[0x0][_0xa3c0('0x50')]+_0x5d733e[0x0][_0xa3c0('0x52')])/_0x5d733e[0x0][_0xa3c0('0x4c')];var _0x4f90d2=_0x1a7f23['dialPredictiveOptimizationPercentage']/0x64;_0x1a7f23['predictiveIntervalPauses']=_0x15a8f1[0x0]['outboundQueuePauses']||0x0;_0x1a7f23['predictiveIntervalHitRate']=_0x44b6ff>0x0?_0x44b6ff:0x1;return _0x372965['busyFactor'](_0x2c40d3,_0x42ef13,_0x3fcf5e,_0x44b6ff,_0x4f90d2);})[_0xa3c0('0x3e')](function(_0x3a8aa6){return _0xbe880(_0x3a8aa6);})[_0xa3c0('0xa7')](function(_0x359329){return _0x57360a(msgResponse(_0xa3c0('0x1e4'),_0xa3c0('0x98'),JSON[_0xa3c0('0x77')](_0x359329)));});}}else{return _0x57360a(msgResponse(_0xa3c0('0x1dc'),_0xa3c0('0x98'),_0xa3c0('0x1dd')));}});};};Dialer[_0xa3c0('0x1c')]['startMethodPredictive']=function(_0x5540f7){var _0x2dd3a0=this;return function(){var _0x4c5da0=0x0;var _0x44598c=Math['floor'](_0x5540f7['erlangCallToSecond']*0x3e8);if(_0x44598c>0x0){_0x44598c=_0x44598c<0x64?0x64:_0x44598c;loggerPredictive['info'](_0x5540f7[_0xa3c0('0x48')],_0xa3c0('0x1e5'),_0x44598c,'milliseconds');_0x5540f7[_0xa3c0('0x66')]=setInterval(function(){_0x2dd3a0['handlePredictive'](_0x5540f7);loggerPredictiveCalls[_0xa3c0('0x4a')](_0xa3c0('0x1e6'),_0x4c5da0+=0x1);},_0x44598c);}else{loggerPredictive[_0xa3c0('0x4a')](_0x5540f7[_0xa3c0('0x48')],'fail\x20to\x20scheduled\x20calls');}};};Dialer['prototype'][_0xa3c0('0x1e7')]=function(_0xa86cf1,_0xce7564){var _0x229c1e=this;return function(_0x1c582c){if(_['isEmpty'](_0x1c582c)){if(_[_0xa3c0('0xf6')](_0xce7564[_0xa3c0('0x159')])||!_0xce7564[_0xa3c0('0x1e8')]){if(_0xa86cf1[_0xa3c0('0xb8')]===_0xa3c0('0x9')){_0xa86cf1[_0xa3c0('0x74')]=_[_0xa3c0('0x40')](_0xa86cf1['queueStatusComplete'])?!![]:_0xa86cf1['queueStatusComplete'];var _0x11be8d=uuid['v4']();_0x229c1e[_0xa3c0('0x27')][_0x11be8d]=new Action(_0xa86cf1,_0xce7564,_0x11be8d);loggerBooked['info'](_0xa3c0('0x1e9'),_0x11be8d,_0xa3c0('0x1ea'),JSON[_0xa3c0('0x77')](_0xa86cf1[_0xa3c0('0x74')]),_0xa3c0('0x1eb'),_0xa86cf1['name']);if(_0xa86cf1[_0xa3c0('0x74')]){_0xa86cf1[_0xa3c0('0x74')]=![];_0x229c1e[_0xa3c0('0x2a')][_0x229c1e[_0xa3c0('0x27')][_0x11be8d][_0xa3c0('0xc3')]]=[];ami[_0xa3c0('0xa0')]({'actionid':_0x11be8d,'action':_0xa3c0('0x1ec'),'queue':_0xa86cf1[_0xa3c0('0x48')]})['catch'](function(){_0x229c1e['updateOriginated'](_0xa86cf1);hopperUtils[_0xa3c0('0xdd')]({'active':![],'ContactId':_0x229c1e[_0xa3c0('0x27')][_0x11be8d][_0xa3c0('0xed')],'ListId':_0x229c1e[_0xa3c0('0x27')][_0x11be8d][_0xa3c0('0xee')],'VoiceQueueId':_0x229c1e[_0xa3c0('0x27')][_0x11be8d][_0xa3c0('0xe0')]||undefined,'CampaignId':_0x229c1e[_0xa3c0('0x27')][_0x11be8d][_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x1ed')));delete _0x229c1e[_0xa3c0('0x27')][_0x11be8d];});}else{loggerBooked[_0xa3c0('0x4a')](_0xa3c0('0x1ee'),JSON[_0xa3c0('0x77')](_0xa86cf1[_0xa3c0('0x74')]),_0xa3c0('0x1eb'),_0xa86cf1[_0xa3c0('0x48')]);_0x229c1e[_0xa3c0('0xc8')](_0xa86cf1);hopperUtils['rescheduleContact']({'active':![],'ContactId':_0x229c1e[_0xa3c0('0x27')][_0x11be8d][_0xa3c0('0xed')],'ListId':_0x229c1e[_0xa3c0('0x27')][_0x11be8d][_0xa3c0('0xee')],'VoiceQueueId':_0x229c1e[_0xa3c0('0x27')][_0x11be8d][_0xa3c0('0xe0')]||undefined,'CampaignId':_0x229c1e[_0xa3c0('0x27')][_0x11be8d]['CampaignId']||undefined})['catch'](loggerCatch(_0xa3c0('0x1ed')));delete _0x229c1e[_0xa3c0('0x27')][_0x11be8d];}}else{return _0x229c1e[_0xa3c0('0x160')](_0xa86cf1,_0xce7564);}}else{if(utils['getSeconds'](undefined,_0xce7564[_0xa3c0('0x1ef')])<_0xa86cf1[_0xa3c0('0x1f0')]*0x3c){if(_0xce7564['Agent']&&!_0xce7564[_0xa3c0('0x14c')]['voicePause']){_0x229c1e[_0xa3c0('0x21')][_0xa3c0('0x104')](_0xce7564['id'])[_0xa3c0('0x1f')](function(){_0x229c1e[_0xa3c0('0xc8')](_0xa86cf1);});}else{hopperUtils[_0xa3c0('0x1f1')]({'active':![]},_0xce7564['id'],0x1)[_0xa3c0('0x1f')](function(){_0x229c1e[_0xa3c0('0xc8')](_0xa86cf1);});}}else{_0xa86cf1[_0xa3c0('0x1f2')]+=0x1;_0x229c1e[_0xa3c0('0xc8')](_0xa86cf1);if(_0xa86cf1[_0xa3c0('0x1f3')]){hopperUtils[_0xa3c0('0xdd')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0xce7564[_0xa3c0('0xed')],'ListId':_0xce7564['ListId'],'VoiceQueueId':_0xce7564['VoiceQueueId']||undefined,'CampaignId':_0xce7564[_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x1f4')));hopperUtils[_0xa3c0('0xd0')](createObjHistory(_0xa86cf1,_0xce7564,utils[_0xa3c0('0x6b')]['QUEUE_RECALL'],0x17,'RecallInQueue'))['catch'](loggerCatch(_0xa3c0('0x1f5')));}else{_0x229c1e[_0xa3c0('0x12b')](createObjHistory(_0xa86cf1,_0xce7564,utils['CAMPAIGN_STATUS']['RECALL_TIMEOUT'],0x16,'RecallFailedTimeout'),_0xa3c0('0x1f6'),_0xa3c0('0x1f7'));}}}}else{_0xa86cf1['outboundBlacklistCallsDay']+=0x1;_0x229c1e[_0xa3c0('0x12b')](createObjHistory(_0xa86cf1,_0xce7564,utils[_0xa3c0('0x6b')]['BLACKLIST'],0xd,_0xa3c0('0x1f8')),_0xa3c0('0x1f9'),_0xa3c0('0x1fa'));throw _0xa3c0('0x1fb');}};};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x15f')]=function(_0x1cabaa){var _0x3d3c22=this;var _0x3f1829=_0x1cabaa[_0xa3c0('0x1fc')]-_0x1cabaa[_0xa3c0('0x84')];emitCampaignSummary(_0x1cabaa);if(_0x3f1829>0x0&&_0x1cabaa['temp']==0x0){if(_0x3f1829>this[_0xa3c0('0x26')]){_0x3f1829=this['maxNumberOriginate'];}_0x1cabaa[_0xa3c0('0x1fd')]=0x1;hopperUtils[_0xa3c0('0x1fe')](_0x1cabaa,_0x3f1829)[_0xa3c0('0x3e')](function(_0x167da6){_0x1cabaa[_0xa3c0('0x1fd')]=0x0;if(_0x167da6){if(!utils[_0xa3c0('0x1ff')](_0x167da6)){_0x1cabaa['message']=utils[_0xa3c0('0x6b')][_0xa3c0('0x6f')];logger[_0xa3c0('0x4a')]('[getContactCampaign2][Empty]'+_0x1cabaa[_0xa3c0('0x48')]);}else{_0x1cabaa[_0xa3c0('0x84')]+=_0x167da6[_0xa3c0('0x9e')];_0x1cabaa[_0xa3c0('0x6e')]=utils[_0xa3c0('0x6b')][_0xa3c0('0x200')];for(var _0x40732d=0x0;_0x40732d<_0x167da6['length'];_0x40732d+=0x1){_0x1cabaa[_0xa3c0('0x201')]+=0x1;if(_[_0xa3c0('0xf6')](_0x167da6[_0x40732d])||_['isNil'](_0x167da6[_0x40732d][_0xa3c0('0x17d')])||_[_0xa3c0('0xf6')](_0x167da6[_0x40732d]['phone'])){_0x3d3c22[_0xa3c0('0x157')](_0xa3c0('0x202'),_0x1cabaa,_0x167da6[_0x40732d]);}else{hopperUtils[_0xa3c0('0x203')](_[_0xa3c0('0x78')](_0x167da6[_0x40732d],[_0xa3c0('0xef'),'phone']))[_0xa3c0('0x3e')](_0x3d3c22[_0xa3c0('0x1e7')](_0x1cabaa,_0x167da6[_0x40732d]))['catch'](_0x3d3c22[_0xa3c0('0x156')]('[actionOriginateIvr]\x20',_0x1cabaa));}}}}})['catch'](loggerGetContactDialer(_0xa3c0('0x204'),_0x1cabaa,_0x3f1829));}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0xba')]=function(_0x575371,_0x24e235){var _0xeecc6f=this;var _0x38d1b3=[];if(_0x24e235<0x1||_0x575371['dialMethod']==='booked'){_0x24e235=0x1;}var _0xe9468f=Math['floor'](_0x575371['available']*_0x24e235)-_0x575371['originated'];if(_0x575371[_0xa3c0('0x205')]>0x0){var _0x2823f9=_0x575371[_0xa3c0('0x205')]-_0x575371['originated']-_0x575371[_0xa3c0('0x1d9')]-_0x575371['pTalking'];if(_0xe9468f>_0x2823f9){_0xe9468f=_0x2823f9;}}if(_0xe9468f>0x0&&_0x575371[_0xa3c0('0x1fd')]==0x0){if(_0x575371['dialMethod']===_0xa3c0('0x9')){_0xe9468f=0x1;}if(_0xe9468f>this[_0xa3c0('0x26')]){_0xe9468f=this[_0xa3c0('0x26')];}for(var _0x2e115f in this[_0xa3c0('0x24')]){if(typeof this[_0xa3c0('0x24')][_0x2e115f]!=='undefined'){if(this['agents'][_0x2e115f][_0xa3c0('0x71')]===_0xa3c0('0x206')&&this['agents'][_0x2e115f][_0xa3c0('0x8d')]===_0xa3c0('0x8e')){_0x38d1b3[_0xa3c0('0x9f')](this[_0xa3c0('0x24')][_0x2e115f]['id']);}}}_0x575371[_0xa3c0('0x1fd')]=0x1;hopperUtils[_0xa3c0('0x207')](_0x575371,_0x38d1b3,_0xe9468f)['then'](function(_0x471496){_0x575371[_0xa3c0('0x1fd')]=0x0;if(_0x471496){if(!utils[_0xa3c0('0x1ff')](_0x471496)){hopperUtils[_0xa3c0('0x208')](_0x575371)[_0xa3c0('0x3e')](sendMessageReschedule(_0x575371))[_0xa3c0('0xa7')](loggerCatch('[countReScheduled]\x20'));}else{_0x575371[_0xa3c0('0x84')]+=_0x471496[_0xa3c0('0x9e')];_0x575371[_0xa3c0('0x6e')]=_0x575371['dialMethod']===_0xa3c0('0x9')?utils[_0xa3c0('0x6b')][_0xa3c0('0x140')]:utils[_0xa3c0('0x6b')][_0xa3c0('0x200')];for(var _0x30ee1c=0x0;_0x30ee1c<_0x471496[_0xa3c0('0x9e')];_0x30ee1c+=0x1){if(_[_0xa3c0('0xf6')](_0x471496[_0x30ee1c])||_[_0xa3c0('0xf6')](_0x471496[_0x30ee1c][_0xa3c0('0x17d')])||_[_0xa3c0('0xf6')](_0x471496[_0x30ee1c][_0xa3c0('0x163')])){_0xeecc6f['emptyContact'](_0xa3c0('0x202'),_0x575371,_0x471496[_0x30ee1c]);}else{hopperUtils['checkIsBlackList'](_[_0xa3c0('0x78')](_0x471496[_0x30ee1c],[_0xa3c0('0xe0'),_0xa3c0('0x163')]))[_0xa3c0('0x3e')](_0xeecc6f[_0xa3c0('0x1e7')](_0x575371,_0x471496[_0x30ee1c]))[_0xa3c0('0xa7')](_0xeecc6f['loggerHandler'](_0xa3c0('0x202'),_0x575371));}}}}})[_0xa3c0('0xa7')](loggerGetContactDialer('[getContactDialer2]',_0x575371,_0xe9468f));}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x66')]=function(_0x5d0054){if(_0x5d0054['dialLimitQueue']>0x0){var _0x437dc3=_0x5d0054[_0xa3c0('0x205')]-_0x5d0054['originated']-_0x5d0054[_0xa3c0('0x1d9')];if(_0x437dc3>0x0&&_0x5d0054[_0xa3c0('0x1fd')]==0x0){this[_0xa3c0('0x209')](_0x5d0054);}else{loggerPredictiveCalls[_0xa3c0('0x4a')](_0xa3c0('0x20a'));}}else{this[_0xa3c0('0x209')](_0x5d0054);}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x209')]=function(_0x1f47cd){var _0x4e4afc=this;var _0x27ae76=[];_0x1f47cd[_0xa3c0('0x84')]+=0x1;for(var _0x3e235e in this['agents']){if(typeof this[_0xa3c0('0x24')][_0x3e235e]!=='undefined'){if(this[_0xa3c0('0x24')][_0x3e235e][_0xa3c0('0x71')]==='not_inuse'&&this[_0xa3c0('0x24')][_0x3e235e][_0xa3c0('0x8d')]===_0xa3c0('0x8e')){_0x27ae76['push'](this[_0xa3c0('0x24')][_0x3e235e]['id']);}}}_0x1f47cd[_0xa3c0('0x1fd')]=0x1;return this[_0xa3c0('0x207')](_0x1f47cd['id'],_0x27ae76,0x1,_0x1f47cd[_0xa3c0('0x20b')],_0x1f47cd)[_0xa3c0('0x3e')](function(_0x34341f){_0x1f47cd[_0xa3c0('0x1fd')]=0x1;if(_0x34341f){if(!utils[_0xa3c0('0x1ff')](_0x34341f)){utils['checkContactLowerLimitOriginate'](_0x1f47cd,0x1,0x0);return hopperUtils['countReScheduled'](_0x1f47cd)['then'](sendMessageReschedule(_0x1f47cd))[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x20c')));}else{_0x1f47cd[_0xa3c0('0x6e')]=utils[_0xa3c0('0x6b')]['RUNNING'];if(_['isNil'](_0x34341f[0x0])||_[_0xa3c0('0xf6')](_0x34341f[0x0]['Contact'])||_[_0xa3c0('0xf6')](_0x34341f[0x0]['phone'])){_0x4e4afc[_0xa3c0('0x157')](_0xa3c0('0x202'),_0x1f47cd,_0x34341f[0x0]);}else{return hopperUtils[_0xa3c0('0x20d')](_[_0xa3c0('0x78')](_0x34341f[0x0],[_0xa3c0('0xe0'),_0xa3c0('0x163')]))[_0xa3c0('0x3e')](_0x4e4afc[_0xa3c0('0x1e7')](_0x1f47cd,_0x34341f[0x0]))[_0xa3c0('0xa7')](_0x4e4afc[_0xa3c0('0x156')](_0xa3c0('0x20e'),_0x1f47cd));}}}})['catch'](loggerGetContactDialer(_0xa3c0('0x20f'),_0x1f47cd,0x1));};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x1e3')]=function(_0x3e0748,_0x487ca5,_0x4e9799,_0x4ee582,_0x251692,_0x2e9afb){loggerPredictive['info'](_0xa3c0('0x210'));loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x211'),_0x3e0748);loggerPredictive['info']('Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x487ca5);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x212'),_0x4e9799);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x213'),_0x4ee582);loggerPredictive[_0xa3c0('0x4a')]('Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x251692);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x55'));return new Promise(function(_0x3097be,_0x821e52){if(_0x3e0748<=0x0||isNaN(_0x3e0748)){return _0x821e52(msgResponse('[abandonmentRate]',_0xa3c0('0x8a'),_0xa3c0('0x214')+_0x3e0748));}if(_0x4e9799<=0x0||isNaN(_0x4e9799)){return _0x821e52(msgResponse(_0xa3c0('0x215'),_0xa3c0('0x8a'),_0xa3c0('0x216')+_0x4e9799));}if(_0x4ee582<=0x0||isNaN(_0x4ee582)){return _0x821e52(msgResponse(_0xa3c0('0x215'),_0xa3c0('0x8a'),_0xa3c0('0x217')+_0x4ee582));}if(_0x487ca5<=0x0||isNaN(_0x487ca5)){return _0x821e52(msgResponse(_0xa3c0('0x215'),'Error','interval\x20=\x20'+_0x487ca5));}if(_0x251692<=0x0||isNaN(_0x251692)){return _0x821e52(msgResponse(_0xa3c0('0x215'),_0xa3c0('0x8a'),_0xa3c0('0x218')+_0x251692));}_0x2e9afb=_0x2e9afb||0x0;var _0x51b614=0x1/_0x4e9799;var _0xe0a793=0x0;var _0x5de602=0x0;var _0x467f09=0x0;var _0x3d7a26=0x0;for(var _0x586a04=0x0;_0x467f09<_0x251692;_0x586a04+=0x1){_0x5de602=_0x586a04/_0x487ca5;_0xe0a793=(_0x4ee582*_0x5de602+_0x2e9afb)/_0x51b614;_0x467f09=utils[_0xa3c0('0x219')](_0xe0a793,_0x3e0748);_0x3d7a26=_0xe0a793/_0x3e0748*(0x1-utils['erlangb'](_0xe0a793,_0x3e0748));}return _0x3097be({'erlangCalls':_0x586a04,'erlangCallToSecond':_0x487ca5/_0x586a04,'erlangAbandonmentRate':_0x467f09,'erlangBusyFactor':_0x3d7a26});});};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x1db')]=function(_0x3d7039,_0x528c54,_0x215484,_0x1c5273,_0xe5ff9e,_0x342b78){loggerPredictive['info']('----\x20Agent\x20Busy\x20Factor\x20----');loggerPredictive[_0xa3c0('0x4a')]('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',_0x3d7039);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x21a'),_0x528c54);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x212'),_0x215484);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x213'),_0x1c5273);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x21b'),_0xe5ff9e);loggerPredictive['info'](_0xa3c0('0x55'));return new Promise(function(_0x554cd8,_0x2dbea2){if(_0x3d7039<=0x0||isNaN(_0x3d7039)){return _0x2dbea2(msgResponse(_0xa3c0('0x21c'),_0xa3c0('0x8a'),'m\x20=\x20'+_0x3d7039));}if(_0x215484<=0x0||isNaN(_0x215484)){return _0x2dbea2(msgResponse(_0xa3c0('0x21c'),'Error','Ts\x20=\x20'+_0x215484));}if(_0x1c5273<=0x0||isNaN(_0x1c5273)){return _0x2dbea2(msgResponse(_0xa3c0('0x21c'),_0xa3c0('0x8a'),'p\x20=\x20'+_0x1c5273));}if(_0x528c54<=0x0||isNaN(_0x528c54)){return _0x2dbea2(msgResponse(_0xa3c0('0x21c'),_0xa3c0('0x8a'),_0xa3c0('0x21d')+_0x528c54));}if(_0xe5ff9e<=0x0||isNaN(_0xe5ff9e)){return _0x2dbea2(msgResponse('[busyFactor]',_0xa3c0('0x8a'),_0xa3c0('0x21e')+_0xe5ff9e));}_0x342b78=_0x342b78||0x0;var _0x5659d4=0x1/_0x215484;var _0x415ca3=0x0;var _0x1b856e=0x0;var _0x585bf7=0x0;var _0x10c550=0x0;for(var _0x3a5295=0x0;_0x10c550<_0xe5ff9e;_0x3a5295+=0x1){_0x1b856e=_0x3a5295/_0x528c54;_0x415ca3=(_0x1c5273*_0x1b856e+_0x342b78)/_0x5659d4;_0x585bf7=utils[_0xa3c0('0x219')](_0x415ca3,_0x3d7039);_0x10c550=_0x415ca3/_0x3d7039*(0x1-utils[_0xa3c0('0x219')](_0x415ca3,_0x3d7039));}return _0x554cd8({'erlangCalls':_0x3a5295,'erlangCallToSecond':_0x528c54/_0x3a5295,'erlangAbandonmentRate':_0x585bf7,'erlangBusyFactor':_0x10c550});});};module[_0xa3c0('0x21f')]=Dialer;
\ No newline at end of file
+var _0x5576=['[rescheduleContact][Abandoned]','[syncAgentComplete][createHistory][11]','swapAdditionalPhones','syncNewExten','channel','syncQueueMember','actionid','strategy','rrmemory','roundrobin','isNil','locked','paused','stateinterface','push','idHopper','run','[Catch][Preview][syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','queueBookedRR','_rr','unlockRR','[booked][RR]','Agent:\x20','contactAgent-idHopper:\x20','[booked][RR][finaly]','getQueue','Success','callProgressDetecting','variable','amdstatus','exten','dialAMDActive','HANGUP','outboundAnswerAgiCallsDay','HangupInAMD','membername','AMD','custom:amd','buildObj','amd','saveInDb','[syncHangupInAMD]','value','Machine','countmachineretry','[syncAgentComplete][createHistory][0]','countbusyretry','countnosuchnumberretry','countagentrejectretry','dialGlobalMaxRetry','stateGlobal','dialMachineMaxRetry','createStateFinal','reason\x2019\x20machine....','dialMachineRetryFrequency','[rescheduleContact][Machine]','[syncHangupInAMDIvr][createHistory]','MACHINE','ivrAnswerCallsDay','[syncHangupIvr][createHistory]','[syncHangupIvr]','dialQueueProject','AnswerAGI','AGI','cause-txt','Normal\x20Clearing','Unknow','queuesSummary','running','statusMessage','getQueueCampaignStatusMessage','inUse','pTalking','compareToOutboundQueue','queueSummaryCountersUpdated','updateReportFromOutboundQueue','[syncQueueSummary]','throttle','filter','dialPreviewRecallmeReminder','handlePreviewRecallNotifications','map','user:%s','user:dialPreviewRecallReminder','checkPreviewRecallReminder','clearZombieChannels','[uniqueid]','[actions]','[Dialer][checkChannel][ivr]','getVoiceQueueRtPauses','[getVoiceQueueRtPauses]\x20','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','loggerHandler','emptyContact','notFound','UserId','Agent','handleIvr','actionOriginate','object','originate','phone','contact\x20is\x20undefine','getCaller','\x22agi://%s/square,%s\x22','NONE','isOutboundQueue','\x22%s,%s%s,,,%s\x22','dialQueueOptions','dialAgiAfterHangupAgent','ACTIVE','xcally-motion-dialer','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','XMD-AMDBETWEENWORDSSILENCE','dialAMDBetweenWordsSilence','XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','XMD-AMDSILENCETHRESHOLD','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','dialAMDMaximumWordLength','setXMDContactVariables','callerid','dialOriginateCallerIdName','getCallerIdRandom','dialOriginateCallerIdNumber','dialRandomLastDigitCallerIdNumber','XMD-ORIGINATECALLERIDNAME','extractCalleridName','XMD-ORIGINATECALLERIDNUM','variables','SIP/%s/%s%s','dialPrefix','trim','dialCutDigit','substring','from-sip','dialOriginateTimeout','outboundOriginateFailureCallsDay','OriginateError','[originate][error]','originate\x20action\x20Error','checkRetriveMax','countcongestionretry','countnoanswerretry','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialBusyMaxRetry','[rescheduleContact]\x20[Busy]','dialCongestionMaxRetry','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','[rescheduleContact][NoSuchNumber]','dialAgentRejectRetryFrequency','[rescheduleContact][AgentReject]','entity\x20is\x20undefine','evt\x20is\x20undefine','reason','outboundNoSuchCallsDay','NoSuchNumber','custom:agentnosuchnumber','nosuchnumber','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','NoAnswer','custom:agentnoanswer','[syncAgentComplete][createHistory][3]','reason\x203\x20ringing\x20no\x20answer','Busy','custom:agentbusy','busy','dialBusyRetryFrequency','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','outboundCongestionCallsDay','custom:agentcongestion','congestion','[syncAgentComplete][createHistory][8]','reason\x208\x20congestion','outboundAbandonedCallsDay','AgentReject','custom:agentreject','agentreject','dialAgentRejectMaxRetry','reason\x2020\x20agentreject','outboundUnknownCallsDay','[syncAgentComplete][createHistory][?]','Global','[callProgressDetecting]','[moveContactManagedDialer][0]','dialPredictiveOptimizationPercentage','round','predictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','available','talking','floor','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','dialPredictiveInterval','[startMethodPredictive][StartProgressive][Loop]','dropRate','Dropped\x20calls\x20day','dialPredictiveOptimization','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','started\x20in\x20predictive\x20at','avgHandleTime','getDataPredictive','Predictive\x20after\x20first\x20interval','recalculate\x20predictive\x20at','startMethodPredictive','Predictive\x20for\x20every\x20interval','predictiveIntervalAvailable','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20more\x20than\x20threshold\x20(','predictiveIntervalAnsweredCalls','predictiveIntervalHitRate','abandonmentRate','agentBusyFactor','busyFactor','[getDataPredictive]','check\x20failure','getDataPredictiveOld','loggedIn','outboundQueuePauses','predictiveIntervalTotalCalls','predictiveIntervalPauses','one\x20call\x20every:','milliseconds','[handlePredictive]','fail\x20to\x20scheduled\x20calls','checkContactBlack','recallme','booked','queueStatusComplete:\x20','Queue:\x20','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','dialRecallMeTimeout','unlockContact','outboundReCallsDay','dialRecallInQueue','[rescheduleContact][dialRecallInQueue]','QUEUE_RECALL','RecallFailedTimeout','[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]','outboundBlacklistCallsDay','BLACKLIST','Blacklist','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','inBlackList','limitCalls','temp','getContactDialerIvr','checkContactEmpty','NO_AVAILABLE_CONTACTS','[getContactCampaign2][Empty]','RUNNING','ivrTotalCallsDays','Contact','[actionOriginate]\x20','checkIsBlackListIvr','[actionOriginateIvr]\x20','[getContactCampaign2]','dialLimitQueue','not_inuse','countReScheduled','[countReScheduled]\x20','checkIsBlackList','[getContactDialer2]','tryOriginatePredictive','getContactDialer','dialOrderByScheduledAt','[actionOriginatePredictive]\x20','[getContactDialerPredictive]','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','Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[abandonmentRate]','Ts\x20=\x20','p\x20=\x20','Amax\x20=\x20','erlangb','----\x20Agent\x20Busy\x20Factor\x20----','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[busyFactor]','interval\x20=\x20','Umin\x20=\x20','exports','util','lodash','moment','ioredis','./utils','./utils/hopper','../preview/util/util','../../../config/environment/','../../../config/logger','dialer','predictive','predictiveCalls','syncQueueSummary','../ami','redis','defaults','socket.io-emitter','../rpc/cmHopper','../rpc/voiceQueueRt','../rpc/interval','./models/agentComplete','env','prototype','enqueue','tail','finally','preview','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','actions','contactsId','uniqueId','startProgressive','ivrOriginated','queueBooked','agentconnect','queuecallerabandon','syncQueueCallerAbandon','bind','originateresponse','syncOriginateResponse','agentcomplete','syncAgentComplete','custom:queuesummarycomplete','syncQueueSummaryComplete','hangup','syncHangup','newexten','varset','syncVarSet','queuemember','queuestatuscomplete','syncQueueStatusComplete','loopClearZombieChannels','getSettings','then','previewRecallmeReminderInterval','isUndefined','emit','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','format','voice:queue:%s','name','voice_queue:save','isEmpty','-----\x20Stats\x20Predictive\x20---','Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','info','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsTimeout','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsCallersExit','AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgHoldtime','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','---------------------------','predictiveIntervalAvgTalktime','Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','History\x20information\x20are\x20empty','---------\x20ErlangB\x20---------','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCalls','One\x20call\x20every:\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','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','merge','getSeconds','debug','startProgressive\x20value\x20cleared','startPredictive','startPredictive\x20value\x20cleared','handlePredictive','handlePredictive\x20interval\x20cleared','error','checkContactLowerLimitOriginate','inspect','contactsRescheduled','message','CAMPAIGN_STATUS','CONTACTS_RESCHEDULED','state','statedesc','endtime','starttime','queueStatusComplete','[unlockQueueStatus][undefined]','[booked][unlockQueueStatus]','stringify','pick','Interval','NULL_INTERVAL','\x20INTERVAL_IS_NULL','Intervals','isIVRCampaignActive','INACTIVE','\x20NOT\x20Active','campaign:ivr:%s','campaign:save','sendMessageOneNotActive','originated','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','is\x20not\x20active','DISACTIVED','is\x20disactive','[ifTime][Action]','Error','active','SIP/%s','reachable','status','unmonitored','checkIsTrunkReachable','Trunk','isTrunkReachable','TrunkBackup','TRUNK_NOT_REACHABLE','\x20trunk\x20is\x20not\x20reachable','checkIfTime','ifTimeIvr','checkIfTimeIntervals','ifTime','\x20Intervals\x20is\x20null\x20','EMPTY_INTERVAL','Failure','\x20Intervals\x20is\x20empty\x20','timezones','UNKNOWN_TIMEZONE','\x20Timezone\x20unknow\x20','isArray','length','Action','command','content','indexOf','catch','true','all','some','OVERTIME_GLOBAL_INTERVAL','OVERTIME_INTERVAL','[ifTime][promiseAll]','Global:\x20','Timezone:\x20','loopCampaigns','syncCampaigns','undefined','isIVRCampaign','resolve','dialTimezone','launchHandleIvr','[syncCampaigns]','checkDialMethod','dialMethod','progressive','handlePower','power','dialPowerLevel','Queue','dialGlobalInterval','silly','Dialer::ifTime()','Voice\x20Queue\x20%s\x20$s','intervalIftime','\x20Interval\x20is\x20overtime:\x20','Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:','isGlobal','AMI\x20IfTime','syncAgentConnect','queue','uniqueid','type','updateOriginated','answertime','YYYY-MM-DD\x20HH:mm:ss','ivr','outboundAnswerCallsDay','createHistory','[syncAgentComplete][createHistory]','moveContactManagedDialer','[syncAgentComplete]','droptime','responsetime','dialQueueTimeout','outboundDropCallsDayTimeout','predictiveIntervalErlangCallsDroppedCalls','dropreason','TIMEOUT','agiafterat','dialQueueProject2','countdropretry','countglobal','dialDropRetryFrequency','callAdditionalPhoneAfterMin','verifyAdditionalPhones','additional','dialDropMaxRetry','rescheduleContact','add','minutes','ContactId','ListId','VoiceQueueId','[rescheduleContact][Drop]','Drop','calleridname','calleridnum','outboundDropCallsDayCallersExit','Abandoned','CALLEREXIT','countabandonedretry','dialAbandonedRetryFrequency','voiceQueue','dialAbandonedMaxRetry','queueCallerAbandonCreateState','CampaignId'];(function(_0x2070da,_0x45e586){var _0x4f9fe1=function(_0x5b6f2a){while(--_0x5b6f2a){_0x2070da['push'](_0x2070da['shift']());}};_0x4f9fe1(++_0x45e586);}(_0x5576,0x12d));var _0x6557=function(_0x813d0a,_0x4fd3d7){_0x813d0a=_0x813d0a-0x0;var _0x241352=_0x5576[_0x813d0a];return _0x241352;};'use strict';var util=require(_0x6557('0x0'));var _=require(_0x6557('0x1'));var uuid=require('uuid');var moment=require(_0x6557('0x2'));var rr=require('rr');var Redis=require(_0x6557('0x3'));var utils=require(_0x6557('0x4'));var hopperUtils=require(_0x6557('0x5'));var ut=require(_0x6557('0x6'));var config=require(_0x6557('0x7'));var logger=require(_0x6557('0x8'))(_0x6557('0x9'));var loggerBooked=require(_0x6557('0x8'))('booked');var loggerPredictive=require(_0x6557('0x8'))(_0x6557('0xa'));var loggerPredictiveCalls=require('../../../config/logger')(_0x6557('0xb'));var loggerSyncQueueSummary=require(_0x6557('0x8'))(_0x6557('0xc'));var ami=require(_0x6557('0xd'));config[_0x6557('0xe')]=_[_0x6557('0xf')](config[_0x6557('0xe')],{'host':'localhost','port':0x18eb});var io=require(_0x6557('0x10'))(new Redis(config[_0x6557('0xe')]));var cmHopper=require(_0x6557('0x11'));var voiceQueueRt=require(_0x6557('0x12'));var RpcSetting=require('../rpc/setting');var Interval=require(_0x6557('0x13'));var Action=require('./models/action');var History=require('./models/history');var Final=require('./models/final');var AgentComplete=require(_0x6557('0x14'));var QueueCallerAbandon=require('./models/queueCallerAbandon');var Hangup=require('./models/hangup');var ipAgi=process[_0x6557('0x15')]['XCALLY_IP_AGI']||'127.0.0.1';var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence[_0x6557('0x16')][_0x6557('0x17')]=function(_0x4f18ff){this[_0x6557('0x18')]=this[_0x6557('0x18')]?this[_0x6557('0x18')][_0x6557('0x19')](_0x4f18ff):_0x4f18ff();};function Dialer(_0x19c1ee,_0xbc76){this['sequence']=new Sequence();this[_0x6557('0x1a')]=_0xbc76;this['voiceQueues']=_0x19c1ee[_0x6557('0x1b')];this[_0x6557('0x1c')]=_0x19c1ee['campaigns'];this[_0x6557('0x1d')]=_0x19c1ee[_0x6557('0x1d')];this[_0x6557('0x1e')]=_0x19c1ee[_0x6557('0x1e')];this[_0x6557('0x1f')]=config['maxNumberOriginate']||0x2;this['channels']={};this[_0x6557('0x20')]={};this[_0x6557('0x21')]={};this[_0x6557('0x22')]={};this['optionPredictive']={};this['startPredictive']={};this[_0x6557('0x23')]={};this[_0x6557('0x24')]={};this[_0x6557('0x25')]={};this['queueBookedRR']={};this['queuesSummary']={};ami['on'](_0x6557('0x26'),this['syncAgentConnect']['bind'](this));ami['on'](_0x6557('0x27'),this[_0x6557('0x28')][_0x6557('0x29')](this));ami['on'](_0x6557('0x2a'),this[_0x6557('0x2b')]['bind'](this));ami['on'](_0x6557('0x2c'),this[_0x6557('0x2d')][_0x6557('0x29')](this));ami['on']('custom:queuesummary',this[_0x6557('0xc')][_0x6557('0x29')](this));ami['on'](_0x6557('0x2e'),this[_0x6557('0x2f')]['bind'](this));ami['on'](_0x6557('0x30'),this[_0x6557('0x31')][_0x6557('0x29')](this));ami['on'](_0x6557('0x32'),this['syncNewExten'][_0x6557('0x29')](this));ami['on'](_0x6557('0x33'),this[_0x6557('0x34')][_0x6557('0x29')](this));ami['on'](_0x6557('0x35'),this['syncQueueMember'][_0x6557('0x29')](this));ami['on'](_0x6557('0x36'),this[_0x6557('0x37')][_0x6557('0x29')](this));this['loopCampaigns']();this[_0x6557('0x38')]();RpcSetting[_0x6557('0x39')]()[_0x6557('0x3a')](function(_0x40d27e){previewRecallmeReminderInterval=_0x40d27e[_0x6557('0x3b')];});}function isNotNull(_0xa0bb26){return _0xa0bb26!==null&&!_[_0x6557('0x3c')](_0xa0bb26);}function msgResponse(_0x151b83,_0x3bab98,_0x27a577){return{'action':_0x151b83,'response':_0x3bab98,'message':_0x27a577,'stack':_0x27a577};}function emit(_0x157627,_0x148018,_0xfee11b){io['to'](_0x157627)[_0x6557('0x3d')](_0x148018,_0xfee11b);}function emitOutboundVoiceQueueSummary(_0x266eb4){if(_0x266eb4['type']==='outbound'){logger['debug'](_0x6557('0x3e'),util['inspect'](_0x266eb4,{'showHidden':![],'depth':null}));emit(util[_0x6557('0x3f')](_0x6557('0x40'),_0x266eb4[_0x6557('0x41')]),_0x6557('0x42'),_0x266eb4);}}function checkGetDataPredictive(_0x16a989){if(isNotNull(_0x16a989)&&!_[_0x6557('0x43')](_0x16a989)){loggerPredictive['info'](_0x6557('0x44'));loggerPredictive['info'](_0x6557('0x45'),_0x16a989['predictiveIntervalTotalCalls']);loggerPredictive[_0x6557('0x46')](_0x6557('0x47'),_0x16a989['predictiveIntervalAnsweredCalls']);loggerPredictive['info'](_0x6557('0x48'),_0x16a989[_0x6557('0x49')]);loggerPredictive[_0x6557('0x46')](_0x6557('0x4a'),_0x16a989[_0x6557('0x4b')]);loggerPredictive[_0x6557('0x46')](_0x6557('0x4c'),_0x16a989[_0x6557('0x4d')]);loggerPredictive[_0x6557('0x46')](_0x6557('0x4e'),_0x16a989['predictiveIntervalAvgTalktime']);loggerPredictive[_0x6557('0x46')](_0x6557('0x4f'));if(_0x16a989['predictiveIntervalTotalCalls']>0x0){if(!_[_0x6557('0x3c')](_0x16a989[_0x6557('0x50')])&&_0x16a989[_0x6557('0x50')]>0x0){return!![];}loggerPredictive[_0x6557('0x46')](_0x6557('0x51'));if(!_[_0x6557('0x3c')](_0x16a989[_0x6557('0x4d')])&&_0x16a989[_0x6557('0x4d')]>0x0){return!![];}loggerPredictive[_0x6557('0x46')]('Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive');}else{loggerPredictive[_0x6557('0x46')](_0x6557('0x52'));}}else{loggerPredictive['info'](_0x6557('0x53'));}return![];}function mergeDataErlangB(_0x601f05){return function(_0xa09a70){loggerPredictive[_0x6557('0x46')](_0x6557('0x54'));loggerPredictive[_0x6557('0x46')](_0x6557('0x55'),_0xa09a70[_0x6557('0x56')]);loggerPredictive[_0x6557('0x46')](_0x6557('0x57'),_0xa09a70['erlangCallToSecond']);loggerPredictive[_0x6557('0x46')]('Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0xa09a70[_0x6557('0x58')]);loggerPredictive['info'](_0x6557('0x59'),_0xa09a70[_0x6557('0x5a')]);loggerPredictive[_0x6557('0x46')](_0x6557('0x5b'),_0xa09a70['erlangAbandonmentRate']);loggerPredictive[_0x6557('0x46')]('---------------------------');_[_0x6557('0x5c')](_0x601f05,_0xa09a70);};}function ifInterval(_0x3d2010,_0x2977ee){if(_[_0x6557('0x3c')](_0x2977ee)){return![];}return utils[_0x6557('0x5d')](undefined,_0x2977ee)<_0x3d2010*0x3c;}function clearPredictiveAttributes(_0x4f24f9){if(_0x4f24f9[_0x6557('0x23')]){_0x4f24f9[_0x6557('0x23')]=undefined;loggerPredictive[_0x6557('0x5e')](_0x4f24f9[_0x6557('0x41')],_0x6557('0x5f'));}if(_0x4f24f9[_0x6557('0x60')]){_0x4f24f9[_0x6557('0x60')]=undefined;loggerPredictive['debug'](_0x4f24f9['name'],_0x6557('0x61'));}if(_0x4f24f9['handlePredictive']){clearInterval(_0x4f24f9['handlePredictive']);_0x4f24f9[_0x6557('0x62')]=undefined;loggerPredictive[_0x6557('0x5e')](_0x4f24f9[_0x6557('0x41')],_0x6557('0x63'));}}function loggerCatchPredictive(_0x4bfbc7,_0x37d8fa){return function(_0xfa46f3){loggerPredictive['error'](_0x37d8fa[_0x6557('0x41')],_0x4bfbc7);loggerPredictive[_0x6557('0x64')](_0xfa46f3['stack']);clearPredictiveAttributes(_0x37d8fa);};}function loggerCatch(_0x3e7ab9){return function(_0x134374){logger[_0x6557('0x64')](_0x3e7ab9,util['inspect'](_0x134374,{'showHidden':![],'depth':null}));};}function loggerGetContactDialer(_0x4995e4,_0xd2c104,_0x429ac8){return function(_0x335beb){utils[_0x6557('0x65')](_0xd2c104,_0x429ac8,0x0);_0xd2c104['temp']=0x0;logger[_0x6557('0x64')](_0x4995e4,util[_0x6557('0x66')](_0x335beb,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x39fbed){return function(_0x202e5a){if(isNotNull(_0x202e5a)&&isNotNull(_0x202e5a[0x0])){if(_0x202e5a[0x0][_0x6557('0x67')]>0x0){_0x39fbed[_0x6557('0x68')]=utils[_0x6557('0x69')][_0x6557('0x6a')];logger[_0x6557('0x46')]('[getContactDialer2][ReScheduled]'+_0x39fbed[_0x6557('0x41')],_0x202e5a[0x0][_0x6557('0x67')],'contacts');}else{_0x39fbed['message']=utils[_0x6557('0x69')]['NO_AVAILABLE_CONTACTS'];logger[_0x6557('0x46')]('[getContactDialer2][Empty]'+_0x39fbed[_0x6557('0x41')]);}}};}function createObjHistory(_0x3e8349,_0x592088,_0x36d581,_0x2db04b,_0x5233f2){_0x3e8349[_0x6557('0x68')]=_0x36d581;var _0x69328d=new Action(_0x3e8349,_0x592088);var _0x2f388d=new History(_0x69328d);_0x2f388d[_0x6557('0x6b')]=_0x2db04b;_0x2f388d[_0x6557('0x6c')]=_0x5233f2;_0x2f388d[_0x6557('0x6d')]=_0x69328d[_0x6557('0x6e')];return _0x2f388d;}function unlockQueueStatus(_0x33afc9,_0x53b1f0){setTimeout(function(){if(_[_0x6557('0x3c')](_0x33afc9[_0x6557('0x6f')])){loggerBooked['error'](_0x6557('0x70'),_0x53b1f0);}_0x33afc9[_0x6557('0x6f')]=!![];loggerBooked['info'](_0x6557('0x71'),_0x53b1f0,JSON[_0x6557('0x72')](_[_0x6557('0x73')](_0x33afc9,[_0x6557('0x41'),_0x6557('0x6f')])));},0x1f3);}function checkInterval(_0x472bf4){return function(){if(!isNotNull(_0x472bf4[_0x6557('0x74')])){_0x472bf4[_0x6557('0x68')]=utils['CAMPAIGN_STATUS'][_0x6557('0x75')];throw _0x472bf4[_0x6557('0x41')]+_0x6557('0x76');}if(!isNotNull(_0x472bf4[_0x6557('0x74')][_0x6557('0x77')])){_0x472bf4[_0x6557('0x68')]=utils[_0x6557('0x69')]['NULL_INTERVAL'];throw _0x472bf4[_0x6557('0x41')]+_0x6557('0x76');}if(!isNotNull(_['isEmpty'](_0x472bf4['Interval'][_0x6557('0x77')]))){_0x472bf4['message']=utils['CAMPAIGN_STATUS'][_0x6557('0x75')];throw _0x472bf4['name']+_0x6557('0x76');}};}function checkIsIVRCampaignActive(_0x56637e){return function(){if(!utils[_0x6557('0x78')](_0x56637e)){_0x56637e[_0x6557('0x68')]=utils['CAMPAIGN_STATUS'][_0x6557('0x79')];throw _0x56637e['name']+_0x6557('0x7a');}};}function emitCampaignSummary(_0x45f483){if(utils['isIVRCampaign'](_0x45f483)){emit(util[_0x6557('0x3f')](_0x6557('0x7b'),_0x45f483[_0x6557('0x41')]),_0x6557('0x7c'),_0x45f483);}}function loggerCatchQueueSummary(_0x192eb3,_0x28eb5c){return function(_0x11129e){clearPredictiveAttributes(_0x28eb5c);emitCampaignSummary(_0x28eb5c);loggerSyncQueueSummary[_0x6557('0x5e')](_0x192eb3,util['inspect'](_0x11129e,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0xbe12a0){if(_0xbe12a0[_0x6557('0x7d')]){if(_0xbe12a0[_0x6557('0x7e')]===0x0){_0xbe12a0[_0x6557('0x7d')]=![];_0xbe12a0[_0x6557('0x68')]=utils['CAMPAIGN_STATUS']['INACTIVE'];loggerSyncQueueSummary[_0x6557('0x5e')](_0x6557('0x7f'),_0xbe12a0[_0x6557('0x41')],_0x6557('0x80'));}else{_0xbe12a0[_0x6557('0x68')]=utils[_0x6557('0x69')][_0x6557('0x81')];loggerSyncQueueSummary['debug'](_0x6557('0x7f'),_0xbe12a0['name'],_0x6557('0x82'));}emitCampaignSummary(_0xbe12a0);}}function myreject(_0x4728f5){return function(_0x4b24a2){return _0x4728f5(msgResponse(_0x6557('0x83'),_0x6557('0x84'),JSON['stringify'](_0x4b24a2)));};}Dialer[_0x6557('0x16')]['isTrunkReachable']=function(_0x362d99){return!_[_0x6557('0x3c')](_0x362d99)&&_0x362d99&&!_[_0x6557('0x3c')](_0x362d99['name'])&&!_[_0x6557('0x3c')](_0x362d99[_0x6557('0x85')])&&_0x362d99['active']&&(this[_0x6557('0x1e')][util['format'](_0x6557('0x86'),_0x362d99['name'])]['status']===_0x6557('0x87')||this[_0x6557('0x1e')][util['format'](_0x6557('0x86'),_0x362d99['name'])][_0x6557('0x88')]===_0x6557('0x89'));};Dialer[_0x6557('0x16')][_0x6557('0x8a')]=function(_0x7f3df1){var _0x111300=this;return function(){if(!_0x111300['isTrunkReachable'](_0x7f3df1[_0x6557('0x8b')])){if(!_0x111300[_0x6557('0x8c')](_0x7f3df1[_0x6557('0x8d')])){_0x7f3df1[_0x6557('0x68')]=utils[_0x6557('0x69')][_0x6557('0x8e')];throw _0x7f3df1[_0x6557('0x41')]+_0x6557('0x8f');}}};};Dialer[_0x6557('0x16')][_0x6557('0x90')]=function(_0x472c4b,_0x5832a1,_0x130880,_0x2af083){var _0x6a267a=this;return function(){var _0x54a9bb=!![];return _0x6a267a[_0x6557('0x91')](_0x472c4b,_0x5832a1,_0x130880,_0x2af083,_0x54a9bb);};};Dialer[_0x6557('0x16')][_0x6557('0x92')]=function(_0x125ee5,_0x715c9,_0x2821e2,_0x1e60cf){var _0x5cf8c8=this;return function(){var _0x2959b8=![];return _0x5cf8c8['ifTimeIvr'](_0x125ee5[_0x6557('0x77')],_0x715c9,_0x2821e2,_0x1e60cf,_0x2959b8);};};Dialer[_0x6557('0x16')]['ifTimeIvr']=function(_0x1572e6,_0x27b778,_0x28e5db,_0x445657,_0x428100){var _0x3e57d4=[];return new Promise(function(_0xe4d78e,_0x1950cd){if(!isNotNull(_0x1572e6)){_0x445657[_0x6557('0x68')]=utils[_0x6557('0x69')][_0x6557('0x75')];return _0x1950cd(msgResponse(_0x6557('0x93'),'Failure',_0x28e5db+_0x6557('0x94')));}if(_[_0x6557('0x43')](_0x1572e6)){_0x445657[_0x6557('0x68')]=utils[_0x6557('0x69')][_0x6557('0x95')];return _0x1950cd(msgResponse(_0x6557('0x93'),_0x6557('0x96'),_0x28e5db+_0x6557('0x97')));}if(_0x27b778&&_[_0x6557('0x3c')](config[_0x6557('0x98')][_0x27b778])){_0x445657[_0x6557('0x68')]=utils[_0x6557('0x69')][_0x6557('0x99')];return _0x1950cd(msgResponse(_0x6557('0x93'),'Failure',_0x28e5db+_0x6557('0x9a')+_0x27b778));}if(_[_0x6557('0x9b')](_0x1572e6)){for(var _0x2c863e=0x0;_0x2c863e<_0x1572e6[_0x6557('0x9c')];_0x2c863e+=0x1){_0x3e57d4['push'](ami[_0x6557('0x9d')]({'action':_0x6557('0x9e'),'command':util[_0x6557('0x3f')]('iftime\x20%s,%s',_0x1572e6[_0x2c863e]['interval'],!_[_0x6557('0x3c')](config[_0x6557('0x98')][_0x27b778])?_0x27b778:'')})[_0x6557('0x3a')](function(_0x3cf6a8){return _0x3cf6a8[_0x6557('0x9f')][_0x6557('0xa0')]('true')>=0x0;})[_0x6557('0xa1')](myreject(_0x1950cd)));}}else{_0x3e57d4['push'](ami['Action']({'action':_0x6557('0x9e'),'command':util[_0x6557('0x3f')]('iftime\x20%s,%s',_0x1572e6,!_[_0x6557('0x3c')](config['timezones'][_0x27b778])?_0x27b778:'')})[_0x6557('0x3a')](function(_0x700e81){return _0x700e81['content'][_0x6557('0xa0')](_0x6557('0xa2'))>=0x0;})['catch'](myreject(_0x1950cd)));}Promise[_0x6557('0xa3')](_0x3e57d4)[_0x6557('0x3a')](function(_0x12b837){var _0x2da4ae=_[_0x6557('0xa4')](_0x12b837);if(_0x2da4ae){return _0xe4d78e(_0x2da4ae);}else{_0x445657[_0x6557('0x68')]=_0x428100?utils[_0x6557('0x69')][_0x6557('0xa5')]:utils[_0x6557('0x69')][_0x6557('0xa6')];return _0x1950cd(msgResponse(_0x6557('0xa7'),'Failure',_0x6557('0xa8')+_0x428100+'\x20'+_0x28e5db+'\x20Interval\x20is\x20overtime:\x20'+util[_0x6557('0x66')](_0x1572e6,{'showHidden':![],'depth':null})+_0x6557('0xa9')+_0x27b778));}})[_0x6557('0xa1')](function(_0x25b796){return _0x1950cd(msgResponse('ifTime',_0x6557('0x96'),JSON[_0x6557('0x72')](_0x25b796)));});});};Dialer[_0x6557('0x16')][_0x6557('0xaa')]=function(){var _0x4e99f6=this;return cmHopper['resetActiveCalls']({'active':![]},{'where':{'active':!![]}})[_0x6557('0x3a')](function(){setInterval(function(){_0x4e99f6[_0x6557('0xab')]();},0x3e8);});};Dialer[_0x6557('0x16')][_0x6557('0xab')]=function(){var _0x1b5f94=this;var _0x5c019d;for(var _0x3a0dce in this[_0x6557('0x1c')]){if(typeof this[_0x6557('0x1c')][_0x3a0dce]!==_0x6557('0xac')){_0x5c019d=this['campaigns'][_0x3a0dce];if(utils[_0x6557('0xad')](_0x5c019d)&&utils[_0x6557('0x78')](_0x5c019d)){_0x5c019d[_0x6557('0x7d')]=!![];Promise[_0x6557('0xae')]()[_0x6557('0x3a')](checkIsIVRCampaignActive(_0x5c019d))[_0x6557('0x3a')](checkInterval(_0x5c019d))[_0x6557('0x3a')](_0x1b5f94['checkIsTrunkReachable'](_0x5c019d))[_0x6557('0x3a')](_0x1b5f94[_0x6557('0x90')](_0x5c019d['dialGlobalInterval'],_0x5c019d['dialTimezone'],_0x5c019d[_0x6557('0x41')],_0x5c019d))[_0x6557('0x3a')](_0x1b5f94[_0x6557('0x92')](_0x5c019d[_0x6557('0x74')],_0x5c019d[_0x6557('0xaf')],_0x5c019d['name'],_0x5c019d))['then'](_0x1b5f94[_0x6557('0xb0')](_0x5c019d))['catch'](loggerCatchQueueSummary(_0x6557('0xb1'),_0x5c019d));}else{notSendMessagesCampaign(_0x5c019d);}}}};Dialer[_0x6557('0x16')][_0x6557('0xb2')]=function(_0x378c09){if(_0x378c09['dialMethod']!=='predictive'){clearPredictiveAttributes(_0x378c09);}switch(_0x378c09[_0x6557('0xb3')]){case _0x6557('0xb4'):this[_0x6557('0xb5')](_0x378c09,0x1);break;case _0x6557('0xb6'):this[_0x6557('0xb5')](_0x378c09,_0x378c09[_0x6557('0xb7')]);break;case _0x6557('0xa'):this[_0x6557('0xa')](_0x378c09);break;case'booked':this[_0x6557('0xb5')](_0x378c09,0x1);break;default:logger[_0x6557('0x64')](_0x6557('0xb8'),_0x378c09[_0x6557('0x41')],'method\x20not\x20recognized');}};Dialer[_0x6557('0x16')][_0x6557('0x93')]=function(_0x387b2f,_0x253699){var _0x158af7=_0x387b2f[_0x6557('0xaf')];var _0x23ecd5=_0x253699?_0x387b2f[_0x6557('0xb9')]:_0x387b2f[_0x6557('0x74')][_0x6557('0x77')];logger[_0x6557('0xba')](_0x6557('0xbb'),_0x23ecd5,_0x158af7,_0x387b2f[_0x6557('0x41')],util[_0x6557('0x3f')](_0x6557('0xbc'),_0x387b2f[_0x6557('0x41')],_0x387b2f['id']));var _0x18b00a=null;return Interval[_0x6557('0xbd')](_0x23ecd5,_0x158af7)[_0x6557('0x3a')](function(_0x1aab2e){if(_0x1aab2e===!![]){return _0x1aab2e;}else{_0x387b2f['message']=_0x253699?utils[_0x6557('0x69')][_0x6557('0xa5')]:utils['CAMPAIGN_STATUS'][_0x6557('0xa6')];_0x18b00a=msgResponse(_0x6557('0xa7'),_0x6557('0x96'),_0x6557('0xa8')+_0x253699+'\x20'+_0x387b2f['name']+_0x6557('0xbe')+util[_0x6557('0x66')](_0x23ecd5,{'showHidden':![],'depth':null})+_0x6557('0xa9')+_0x158af7);}if(_0x18b00a!==null){logger[_0x6557('0xba')](_0x6557('0xbf'),_0x18b00a);_0x18b00a[_0x6557('0xc0')]=_0x253699;throw _0x18b00a;}})['catch'](function(_0x792cf0){logger[_0x6557('0x64')](_0x6557('0xc1'),_0x792cf0);throw msgResponse(_0x6557('0x83'),_0x6557('0x84'),util['inspect'](_0x792cf0,{'showHidden':![],'depth':null}));});};Dialer[_0x6557('0x16')][_0x6557('0xc2')]=function(_0x5ab22d){if(this[_0x6557('0x1b')][_0x5ab22d[_0x6557('0xc3')]]){if(this[_0x6557('0x22')][_0x5ab22d[_0x6557('0xc4')]]&&this[_0x6557('0x22')][_0x5ab22d['uniqueid']][_0x6557('0xc5')]!=='ivr'){this[_0x6557('0xc6')](this[_0x6557('0x1b')][_0x5ab22d['queue']]);this['uniqueId'][_0x5ab22d[_0x6557('0xc4')]][_0x6557('0xc7')]=moment()[_0x6557('0x3f')](_0x6557('0xc8'));}}};Dialer[_0x6557('0x16')][_0x6557('0x2d')]=function(_0x58fcab){var _0x39aa37=this['uniqueId'][_0x58fcab['uniqueid']];if(this['voiceQueues'][_0x58fcab[_0x6557('0xc3')]]){if(_0x39aa37&&_0x39aa37[_0x6557('0xc5')]!==_0x6557('0xc9')){delete this[_0x6557('0x22')][_0x58fcab[_0x6557('0xc4')]];this[_0x6557('0x1b')][_0x58fcab[_0x6557('0xc3')]][_0x6557('0xca')]+=0x1;var _0x10b9b4=new AgentComplete(_0x39aa37,_0x58fcab);if(_0x58fcab['reason']==='agent'){_0x10b9b4['agiafterat']=this[_0x6557('0x1b')][_0x58fcab[_0x6557('0xc3')]]['dialQueueProject2']&&this[_0x6557('0x1b')][_0x58fcab['queue']]['dialAgiAfterHangupAgent']?moment()[_0x6557('0x3f')](_0x6557('0xc8')):undefined;}hopperUtils[_0x6557('0xcb')](_0x10b9b4)[_0x6557('0xa1')](loggerCatch(_0x6557('0xcc')));hopperUtils[_0x6557('0xcd')](_0x10b9b4)['catch'](loggerCatch(_0x6557('0xce')));}}};Dialer[_0x6557('0x16')]['syncQueueCallerAbandon']=function(_0x3f16d8){var _0x2bb068=this[_0x6557('0x22')][_0x3f16d8[_0x6557('0xc4')]];var _0x2b73a7=this;var _0x47746d=![];var _0x42cd57;var _0x5a0d2f;if(this[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]]){if(_0x2bb068&&_0x2bb068['type']!=='ivr'){delete this[_0x6557('0x22')][_0x3f16d8[_0x6557('0xc4')]];this[_0x6557('0xc6')](this[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]]);_0x2bb068[_0x6557('0xcf')]=moment()[_0x6557('0x3f')](_0x6557('0xc8'));var _0x3356e1=new QueueCallerAbandon(_0x2bb068,_0x3f16d8);if(utils[_0x6557('0x5d')](_0x2bb068[_0x6557('0xcf')],_0x2bb068[_0x6557('0xd0')])>=_0x2bb068[_0x6557('0xd1')]){this[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0x49')]+=0x1;this['voiceQueues'][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xd2')]+=0x1;this[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xd3')]+=0x1;_0x3356e1[_0x6557('0x6b')]=0xa;_0x3356e1[_0x6557('0x6c')]='Drop';_0x3356e1[_0x6557('0xd4')]=_0x6557('0xd5');_0x3356e1[_0x6557('0xd6')]=this[_0x6557('0x1b')][_0x3f16d8['queue']][_0x6557('0xd7')]?moment()[_0x6557('0x3f')](_0x6557('0xc8')):undefined;_0x3356e1[_0x6557('0xd8')]+=0x1;_0x3356e1[_0x6557('0xd9')]+=0x1;_0x42cd57=this['voiceQueues'][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xda')];_0x5a0d2f=this[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xdb')];hopperUtils[_0x6557('0xdc')](_0x3356e1,_0x3356e1[_0x6557('0x6b')],_0x2bb068['voiceQueue'])[_0x6557('0x3a')](function(_0x32a99f){_0x47746d=_0x32a99f[_0x6557('0xdd')]==0x1;if(_0x3356e1[_0x6557('0xd8')]>=_0x2b73a7[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xde')]){_0x2b73a7['queueCallerAbandonCreateState'](_0x3356e1,_0x32a99f[_0x6557('0xdd')]);}else{hopperUtils[_0x6557('0xdf')]({'active':![],'countdropretry':_0x3356e1[_0x6557('0xd8')],'scheduledat':moment()[_0x6557('0xe0')](_0x2b73a7['voiceQueues'][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xda')],_0x6557('0xe1'))[_0x6557('0x3f')](_0x6557('0xc8')),'ContactId':_0x2bb068[_0x6557('0xe2')],'ListId':_0x2bb068[_0x6557('0xe3')],'VoiceQueueId':_0x2bb068[_0x6557('0xe4')]||undefined,'CampaignId':_0x2bb068['CampaignId']||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0xe5')));var _0x171167=new History(_0x3356e1);_0x171167[_0x6557('0x6b')]=0xa;_0x171167[_0x6557('0x6c')]=_0x6557('0xe6');_0x171167[_0x6557('0x6e')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x171167[_0x6557('0x6d')]=_0x171167[_0x6557('0x6e')];_0x171167[_0x6557('0xe7')]=_0x3356e1[_0x6557('0xe7')];_0x171167[_0x6557('0xe8')]=_0x3356e1[_0x6557('0xe8')];hopperUtils[_0x6557('0xcb')](_0x171167)[_0x6557('0xa1')](loggerCatch('[syncAgentComplete][createHistory][10]'));}})[_0x6557('0x3a')](function(){if(_0x47746d)hopperUtils['swapAdditionalPhones'](_0x3356e1,_0x42cd57,_0x5a0d2f)[_0x6557('0x3a')](function(){return 0x1;});});}else{this['voiceQueues'][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0x4b')]+=0x1;this[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xe9')]+=0x1;_0x3356e1['state']=0xb;_0x3356e1[_0x6557('0x6c')]=_0x6557('0xea');_0x3356e1[_0x6557('0xd4')]=_0x6557('0xeb');_0x3356e1[_0x6557('0xec')]+=0x1;_0x3356e1[_0x6557('0xd9')]+=0x1;_0x42cd57=this[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xed')];_0x5a0d2f=this[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xdb')];hopperUtils['verifyAdditionalPhones'](_0x3356e1,_0x3356e1[_0x6557('0x6b')],_0x2bb068[_0x6557('0xee')])['then'](function(_0x565c72){if(_0x3356e1[_0x6557('0xec')]>=_0x2b73a7[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xef')]){_0x2b73a7[_0x6557('0xf0')](_0x3356e1,_0x565c72[_0x6557('0xdd')]);}else{hopperUtils['rescheduleContact']({'active':![],'countabandonedretry':_0x3356e1[_0x6557('0xec')],'scheduledat':moment()[_0x6557('0xe0')](_0x2b73a7[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]]['dialAbandonedRetryFrequency'],_0x6557('0xe1'))[_0x6557('0x3f')](_0x6557('0xc8')),'ContactId':_0x2bb068[_0x6557('0xe2')],'ListId':_0x2bb068['ListId'],'VoiceQueueId':_0x2bb068[_0x6557('0xe4')]||undefined,'CampaignId':_0x2bb068[_0x6557('0xf1')]||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0xf2')));var _0x55b6ea=new History(_0x3356e1);_0x55b6ea[_0x6557('0x6b')]=0xb;_0x55b6ea['statedesc']=_0x6557('0xea');_0x55b6ea[_0x6557('0x6e')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x55b6ea[_0x6557('0x6d')]=_0x55b6ea[_0x6557('0x6e')];_0x55b6ea[_0x6557('0xe7')]=_0x3356e1[_0x6557('0xe7')];_0x55b6ea[_0x6557('0xe8')]=_0x3356e1[_0x6557('0xe8')];hopperUtils['createHistory'](_0x55b6ea)['catch'](loggerCatch(_0x6557('0xf3')));}})[_0x6557('0x3a')](function(){if(_0x47746d)hopperUtils[_0x6557('0xf4')](_0x3356e1,_0x42cd57,_0x5a0d2f)[_0x6557('0x3a')](function(){return 0x1;});});}}}};Dialer[_0x6557('0x16')][_0x6557('0xf5')]=function(_0x9aec04){if(this[_0x6557('0x20')][_0x9aec04[_0x6557('0xc4')]]){this[_0x6557('0x20')][_0x9aec04[_0x6557('0xc4')]]['channel']=_0x9aec04[_0x6557('0xf6')];}if(this[_0x6557('0x22')][_0x9aec04[_0x6557('0xc4')]]){this[_0x6557('0x22')][_0x9aec04[_0x6557('0xc4')]][_0x6557('0xf6')]=_0x9aec04[_0x6557('0xf6')];}};Dialer[_0x6557('0x16')][_0x6557('0xf7')]=function(_0x5cf04e){if(!this['actions'][_0x5cf04e[_0x6557('0xf8')]]){return;}var _0x2e419b=this[_0x6557('0x1b')][this[_0x6557('0x20')][_0x5cf04e[_0x6557('0xf8')]]['queue']][_0x6557('0xf9')]||_0x6557('0xfa');if(_0x2e419b===_0x6557('0xfb')){if(this[_0x6557('0x20')][_0x5cf04e[_0x6557('0xf8')]]&&_[_0x6557('0xfc')](this[_0x6557('0x20')][_0x5cf04e[_0x6557('0xf8')]][_0x6557('0xfd')])&&_0x5cf04e[_0x6557('0x88')]==='1'&&_0x5cf04e[_0x6557('0xfe')]==='0'){if(this[_0x6557('0x1d')][_0x5cf04e[_0x6557('0xff')]]){if(!this[_0x6557('0x1d')][_0x5cf04e[_0x6557('0xff')]]['locked']){this[_0x6557('0x1d')][_0x5cf04e[_0x6557('0xff')]]['locked']=!![];this[_0x6557('0x20')][_0x5cf04e[_0x6557('0xf8')]][_0x6557('0xfd')]=!![];this[_0x6557('0x20')][_0x5cf04e[_0x6557('0xf8')]]['stateinterface']=_0x5cf04e[_0x6557('0xff')];}}}}else if(_0x2e419b===_0x6557('0xfa')){if(this[_0x6557('0x20')][_0x5cf04e['actionid']]){if(this[_0x6557('0x1d')][_0x5cf04e[_0x6557('0xff')]]){this[_0x6557('0x20')][_0x5cf04e[_0x6557('0xf8')]]['stateinterface']=_0x5cf04e[_0x6557('0xff')];if(_[_0x6557('0xfc')](this[_0x6557('0x25')][this['actions'][_0x5cf04e[_0x6557('0xf8')]][_0x6557('0xc3')]])){this['queueBooked'][this[_0x6557('0x20')][_0x5cf04e[_0x6557('0xf8')]]['queue']]=[];}this[_0x6557('0x25')][this[_0x6557('0x20')][_0x5cf04e['actionid']][_0x6557('0xc3')]][_0x6557('0x100')](_['merge'](_[_0x6557('0x73')](this[_0x6557('0x20')][_0x5cf04e['actionid']],[_0x6557('0x101'),_0x6557('0xff')]),{'status':_0x5cf04e[_0x6557('0x88')],'paused':_0x5cf04e[_0x6557('0xfe')]}));}}}};Dialer['prototype'][_0x6557('0x37')]=function(_0x196bbe){if(!this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]]){return;}var _0x5539b4=this;var _0x2ac8eb=this[_0x6557('0x1b')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]];var _0x178b01=_0x2ac8eb[_0x6557('0xf9')]||'rrmemory';if(_0x178b01===_0x6557('0xfb')){if(this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]]&&this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xff')]){this[_0x6557('0x1a')][_0x6557('0x102')](this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0x101')],this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xff')])['catch'](function(_0x2eb130){logger['error'](_0x6557('0x103'),util['inspect'](_0x2eb130,{'showHidden':![],'depth':null}));})['finally'](function(){_0x5539b4[_0x6557('0xc6')](_0x5539b4['voiceQueues'][_0x5539b4[_0x6557('0x20')][_0x196bbe['actionid']][_0x6557('0xc3')]]);_0x5539b4[_0x6557('0x1d')][_0x5539b4['actions'][_0x196bbe['actionid']][_0x6557('0xff')]][_0x6557('0xfd')]=![];delete _0x5539b4[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]];unlockQueueStatus(_0x2ac8eb);});}else{this[_0x6557('0xc6')](this[_0x6557('0x1b')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]]);hopperUtils['rescheduleContact']({'active':![],'ContactId':this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xe2')],'ListId':this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]]['ListId'],'VoiceQueueId':this[_0x6557('0x20')][_0x196bbe['actionid']][_0x6557('0xe4')]||undefined,'CampaignId':this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xf1')]||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x104')));delete this['actions'][_0x196bbe[_0x6557('0xf8')]];unlockQueueStatus(_0x2ac8eb);}}else if(_0x178b01===_0x6557('0xfa')){var _0x247e9c;if(this[_0x6557('0x20')][_0x196bbe['actionid']]&&!_[_0x6557('0x43')](this[_0x6557('0x25')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]])){if(this['queueBookedRR'][_0x5539b4[_0x6557('0x20')][_0x196bbe['actionid']][_0x6557('0xc3')]]){this['queueBookedRR'][_0x5539b4[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]]['queue']]=this[_0x6557('0x105')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]]['queue']]?this[_0x6557('0x105')][this['actions'][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]]:this[_0x6557('0x25')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]]?this[_0x6557('0x25')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]]['queue']]['_rr']||0x0:0x0;}this[_0x6557('0x25')][this['actions'][_0x196bbe[_0x6557('0xf8')]]['queue']][_0x6557('0x106')]=this[_0x6557('0x105')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]]['queue']];for(var _0x204134=0x0;_0x204134<this[_0x6557('0x25')][this['actions'][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]]['length'];_0x204134+=0x1){_0x247e9c=rr(this[_0x6557('0x25')][this[_0x6557('0x20')][_0x196bbe['actionid']]['queue']]);this['queueBookedRR'][_0x5539b4[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]]['queue']]=this[_0x6557('0x25')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]][_0x6557('0x106')];if(_0x247e9c[_0x6557('0x88')]==='1'&&_0x247e9c['paused']==='0'){break;}}if(!_['isNil'](_0x247e9c)){this[_0x6557('0x1d')][_0x247e9c['stateinterface']]['unlockRR']=_[_0x6557('0x3c')](this[_0x6557('0x1d')][_0x247e9c['stateinterface']][_0x6557('0x107')])?!![]:this[_0x6557('0x1d')][_0x247e9c['stateinterface']][_0x6557('0x107')];}loggerBooked[_0x6557('0x46')](_0x6557('0x108'),_0x196bbe[_0x6557('0xf8')],_0x6557('0x109'),JSON[_0x6557('0x72')](_[_0x6557('0x73')](this[_0x6557('0x1d')][_0x247e9c[_0x6557('0xff')]],[_0x6557('0x41'),_0x6557('0x107')])),_0x6557('0x10a'),JSON['stringify'](_0x247e9c[_0x6557('0x101')]));if(!_[_0x6557('0xfc')](_0x247e9c)&&_0x247e9c['status']==='1'&&_0x247e9c[_0x6557('0xfe')]==='0'&&this['agents'][_0x247e9c[_0x6557('0xff')]][_0x6557('0x107')]){this[_0x6557('0x1d')][_0x247e9c['stateinterface']]['unlockRR']=![];this[_0x6557('0x25')][_0x5539b4['actions'][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]]=[];this['preview']['run'](_0x247e9c[_0x6557('0x101')],_0x247e9c[_0x6557('0xff')])[_0x6557('0xa1')](function(_0x218b51){logger[_0x6557('0x64')]('[Catch][Preview][syncQueueStatusComplete]',util[_0x6557('0x66')](_0x218b51,{'showHidden':![],'depth':null}));})[_0x6557('0x19')](function(){_0x5539b4[_0x6557('0xc6')](_0x5539b4[_0x6557('0x1b')][_0x5539b4[_0x6557('0x20')][_0x196bbe['actionid']]['queue']]);setTimeout(function(){_0x5539b4[_0x6557('0x1d')][_0x247e9c[_0x6557('0xff')]]['unlockRR']=!![];loggerBooked[_0x6557('0x46')](_0x6557('0x10b'),_0x196bbe[_0x6557('0xf8')],_0x6557('0x109'),JSON[_0x6557('0x72')](_['pick'](_0x5539b4['agents'][_0x247e9c[_0x6557('0xff')]],[_0x6557('0x41'),_0x6557('0x107')])),_0x6557('0x10a'),JSON[_0x6557('0x72')](_0x247e9c[_0x6557('0x101')]));},0xc7);delete _0x5539b4[_0x6557('0x20')][_0x196bbe['actionid']];unlockQueueStatus(_0x2ac8eb,_0x196bbe['actionid']);});}else{loggerBooked[_0x6557('0x46')]('[booked][unlock]');this[_0x6557('0xc6')](this[_0x6557('0x1b')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]]['queue']]);hopperUtils[_0x6557('0xdf')]({'active':![],'ContactId':this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xe2')],'ListId':this[_0x6557('0x20')][_0x196bbe['actionid']][_0x6557('0xe3')],'VoiceQueueId':this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xe4')]||undefined,'CampaignId':this[_0x6557('0x20')][_0x196bbe['actionid']][_0x6557('0xf1')]||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x104')));delete this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]];unlockQueueStatus(_0x2ac8eb);}}else{loggerBooked[_0x6557('0x46')]('[booked][unlock2]');this['updateOriginated'](this[_0x6557('0x1b')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]]);hopperUtils[_0x6557('0xdf')]({'active':![],'ContactId':this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xe2')],'ListId':this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xe3')],'VoiceQueueId':this['actions'][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xe4')]||undefined,'CampaignId':this[_0x6557('0x20')][_0x196bbe['actionid']][_0x6557('0xf1')]||undefined})[_0x6557('0xa1')](loggerCatch('[unlock2][syncQueueStatusComplete]'));delete this['actions'][_0x196bbe[_0x6557('0xf8')]];unlockQueueStatus(_0x2ac8eb);}}else{loggerBooked[_0x6557('0x46')]('[booked][unlock3]');this[_0x6557('0xc6')](this[_0x6557('0x1b')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]]);hopperUtils[_0x6557('0xdf')]({'active':![],'ContactId':this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xe2')],'ListId':this[_0x6557('0x20')][_0x196bbe['actionid']][_0x6557('0xe3')],'VoiceQueueId':this['actions'][_0x196bbe['actionid']][_0x6557('0xe4')]||undefined,'CampaignId':this['actions'][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xf1')]||undefined})['catch'](loggerCatch('[unlock3][syncQueueStatusComplete]'));delete this[_0x6557('0x20')][_0x196bbe['actionid']];unlockQueueStatus(_0x2ac8eb);}};Dialer[_0x6557('0x16')][_0x6557('0x2b')]=function(_0x47c9b3){var _0xeea6b4=this['actions'][_0x47c9b3['actionid']];if(_0xeea6b4){delete this[_0x6557('0x20')][_0x47c9b3[_0x6557('0xf8')]];_0xeea6b4['responsetime']=moment()[_0x6557('0x3f')](_0x6557('0xc8'));var _0x407402=_0xeea6b4[_0x6557('0xc5')]===_0x6557('0xc9')?this[_0x6557('0x1c')][_0xeea6b4['queue']]:this['voiceQueues'][_0xeea6b4[_0x6557('0x10c')]()];if(_0x47c9b3['response']!==_0x6557('0x10d')){this[_0x6557('0xc6')](_0x407402);return this[_0x6557('0x10e')](_0xeea6b4,_0x407402,_0x47c9b3)[_0x6557('0xa1')](loggerCatch('[callProgressDetecting]\x20'));}this['uniqueId'][_0x47c9b3[_0x6557('0xc4')]]=_0xeea6b4;}};Dialer['prototype'][_0x6557('0x34')]=function(_0xf34702){var _0x5578e2=this;var _0x2264a1=this[_0x6557('0x22')][_0xf34702[_0x6557('0xc4')]];var _0x32757c;if(!_[_0x6557('0xfc')](_0xf34702)&&!_['isNil'](_0xf34702[_0x6557('0x10f')])&&!_[_0x6557('0xfc')](_0xf34702['variable'][_0x6557('0x110')])&&_0xf34702[_0x6557('0x111')]==='xcally-motion-dialer'&&_0x2264a1){if(_0x2264a1[_0x6557('0xc5')]!=='ivr'&&this['voiceQueues'][_0x2264a1[_0x6557('0xc3')]][_0x6557('0x112')]&&_0xf34702['value']===_0x6557('0x113')){delete this['uniqueId'][_0xf34702['uniqueid']];this['updateOriginated'](this['voiceQueues'][_0x2264a1[_0x6557('0xc3')]]);this[_0x6557('0x1b')][_0x2264a1[_0x6557('0xc3')]][_0x6557('0xca')]+=0x1;this[_0x6557('0x1b')][_0x2264a1['queue']][_0x6557('0x114')]+=0x1;_0x32757c=new Hangup(_0x2264a1,_0xf34702);_0x32757c[_0x6557('0x6b')]=0x12;_0x32757c[_0x6557('0x6c')]=_0x6557('0x115');_0x32757c[_0x6557('0x116')]=_0x6557('0x117');ami[_0x6557('0x3d')](_0x6557('0x118'),ut[_0x6557('0x119')](_0x32757c,_0x6557('0x11a')));this[_0x6557('0x11b')](_0x32757c,'[syncHangupInAMD][createHistory]',_0x6557('0x11c'));}if(_0x2264a1[_0x6557('0xc5')]!==_0x6557('0xc9')&&this[_0x6557('0x1b')][_0x2264a1[_0x6557('0xc3')]][_0x6557('0x112')]&&_0xf34702[_0x6557('0x11d')]==='MACHINE'){return new Promise(function(_0x1c1a6e,_0xcabdfd){delete _0x5578e2[_0x6557('0x22')][_0xf34702[_0x6557('0xc4')]];_0x5578e2['updateOriginated'](_0x5578e2[_0x6557('0x1b')][_0x2264a1[_0x6557('0xc3')]]);_0x5578e2[_0x6557('0x1b')][_0x2264a1[_0x6557('0xc3')]][_0x6557('0xca')]+=0x1;_0x5578e2[_0x6557('0x1b')][_0x2264a1[_0x6557('0xc3')]]['outboundAnswerAgiCallsDay']+=0x1;var _0x236deb=_0x5578e2[_0x6557('0x1b')][_0x2264a1[_0x6557('0xc3')]];var _0x2a0eee=new Hangup(_0x2264a1,_0xf34702);_0x2a0eee[_0x6557('0x6b')]=0x13;_0x2a0eee['statedesc']=_0x6557('0x11e');_0x2a0eee['membername']=_0x6557('0x117');_0x2a0eee[_0x6557('0x11f')]+=0x1;_0x2a0eee[_0x6557('0xd9')]+=0x1;_0x2a0eee[_0x6557('0x11a')]=!![];ami[_0x6557('0x3d')](_0x6557('0x118'),ut[_0x6557('0x119')](_0x2a0eee,_0x6557('0x11a')));hopperUtils[_0x6557('0xcb')](_0x2a0eee)[_0x6557('0xa1')](loggerCatch(_0x6557('0x120')));if(_0x2a0eee[_0x6557('0x121')]+_0x2a0eee['countcongestionretry']+_0x2a0eee['countnoanswerretry']+_0x2a0eee[_0x6557('0x122')]+_0x2a0eee[_0x6557('0xd8')]+_0x2a0eee['countabandonedretry']+_0x2a0eee[_0x6557('0x11f')]+_0x2a0eee[_0x6557('0x123')]>=_0x236deb[_0x6557('0x124')]){_0x5578e2[_0x6557('0x125')](_0x2a0eee,_0x1c1a6e,_0xcabdfd,'reason19\x20machine....');}else{if(_0x2a0eee['countmachineretry']>=_0x236deb[_0x6557('0x126')]){_0x5578e2[_0x6557('0x127')](_0x2a0eee,_0x1c1a6e,_0xcabdfd,_0x6557('0x128'));}else{hopperUtils[_0x6557('0xdf')]({'active':![],'countmachineretry':_0x2a0eee[_0x6557('0x11f')],'scheduledat':moment()[_0x6557('0xe0')](_0x236deb[_0x6557('0x129')],'minutes')['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x2a0eee['ContactId'],'ListId':_0x2a0eee[_0x6557('0xe3')],'VoiceQueueId':_0x2a0eee[_0x6557('0xe4')]||undefined,'CampaignId':_0x2a0eee[_0x6557('0xf1')]||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x12a')));_0x1c1a6e({'reschedule':0x1});}}});}if(_0x2264a1[_0x6557('0xc5')]===_0x6557('0xc9')&&this['campaigns'][_0x2264a1[_0x6557('0xc3')]]['dialAMDActive']&&_0xf34702[_0x6557('0x11d')]===_0x6557('0x113')){delete this['uniqueId'][_0xf34702['uniqueid']];this['updateOriginated'](this['campaigns'][_0x2264a1['queue']]);_0x32757c=new Hangup(_0x2264a1,_0xf34702);_0x32757c[_0x6557('0x6b')]=0x12;_0x32757c[_0x6557('0x6c')]=_0x6557('0x115');_0x32757c['membername']=_0x6557('0x117');ami['emit'](_0x6557('0x118'),ut[_0x6557('0x119')](_0x32757c,'amd'));this[_0x6557('0x11b')](_0x32757c,_0x6557('0x12b'),'[syncHangupInAMDIvr]');}if(_0x2264a1[_0x6557('0xc5')]==='ivr'&&this[_0x6557('0x1c')][_0x2264a1[_0x6557('0xc3')]][_0x6557('0x112')]&&_0xf34702[_0x6557('0x11d')]===_0x6557('0x12c')){return new Promise(function(_0x46f192,_0x4606ea){delete _0x5578e2[_0x6557('0x22')][_0xf34702[_0x6557('0xc4')]];_0x5578e2[_0x6557('0xc6')](_0x5578e2['campaigns'][_0x2264a1[_0x6557('0xc3')]]);_0x5578e2['campaigns'][_0x2264a1[_0x6557('0xc3')]][_0x6557('0xca')]+=0x1;_0x5578e2['campaigns'][_0x2264a1[_0x6557('0xc3')]][_0x6557('0x114')]+=0x1;var _0x48247e=_0x5578e2[_0x6557('0x1c')][_0x2264a1['queue']];var _0x3beb03=new Hangup(_0x2264a1,_0xf34702);_0x3beb03[_0x6557('0x6b')]=0x13;_0x3beb03[_0x6557('0x6c')]=_0x6557('0x11e');_0x3beb03[_0x6557('0x116')]=_0x6557('0x117');_0x3beb03[_0x6557('0x11f')]+=0x1;_0x3beb03['countglobal']+=0x1;_0x3beb03[_0x6557('0x11a')]=!![];ami['emit'](_0x6557('0x118'),ut['buildObj'](_0x3beb03,_0x6557('0x11a')));hopperUtils[_0x6557('0xcb')](_0x3beb03)[_0x6557('0xa1')](loggerCatch(_0x6557('0x120')));if(_0x3beb03[_0x6557('0x121')]+_0x3beb03['countcongestionretry']+_0x3beb03['countnoanswerretry']+_0x3beb03[_0x6557('0x122')]+_0x3beb03[_0x6557('0xd8')]+_0x3beb03['countabandonedretry']+_0x3beb03['countmachineretry']+_0x3beb03[_0x6557('0x123')]>=_0x48247e[_0x6557('0x124')]){_0x5578e2[_0x6557('0x125')](_0x3beb03,_0x46f192,_0x4606ea,'reason19\x20machine....');}else{if(_0x3beb03[_0x6557('0x11f')]>=_0x48247e[_0x6557('0x126')]){_0x5578e2[_0x6557('0x127')](_0x3beb03,_0x46f192,_0x4606ea,'reason\x2019\x20machine....');}else{hopperUtils[_0x6557('0xdf')]({'active':![],'countmachineretry':_0x3beb03['countmachineretry'],'scheduledat':moment()[_0x6557('0xe0')](_0x48247e[_0x6557('0x129')],_0x6557('0xe1'))[_0x6557('0x3f')](_0x6557('0xc8')),'ContactId':_0x3beb03[_0x6557('0xe2')],'ListId':_0x3beb03['ListId'],'VoiceQueueId':_0x3beb03['VoiceQueueId']||undefined,'CampaignId':_0x3beb03[_0x6557('0xf1')]||undefined})['catch'](loggerCatch('[rescheduleContact][Machine]'));_0x46f192({'reschedule':0x1});}}});}}};Dialer[_0x6557('0x16')][_0x6557('0x31')]=function(_0x1ea443){var _0x303244=this[_0x6557('0x22')][_0x1ea443['uniqueid']];var _0x201565;if(_0x303244&&_0x303244[_0x6557('0xc5')]==='ivr'){delete this[_0x6557('0x22')][_0x1ea443[_0x6557('0xc4')]];this[_0x6557('0xc6')](this[_0x6557('0x1c')][_0x303244[_0x6557('0xc3')]]);this[_0x6557('0x1c')][_0x303244['queue']][_0x6557('0x12d')]+=0x1;_0x201565=new Hangup(_0x303244,_0x1ea443);hopperUtils['createHistory'](_0x201565)[_0x6557('0xa1')](loggerCatch(_0x6557('0x12e')));hopperUtils['moveContactManagedDialer'](_0x201565)[_0x6557('0xa1')](loggerCatch(_0x6557('0x12f')));}if(_0x303244&&_0x303244[_0x6557('0xc5')]!==_0x6557('0xc9')&&isNotNull(this[_0x6557('0x1b')][_0x303244['queue']][_0x6557('0x130')])){delete this[_0x6557('0x22')][_0x1ea443[_0x6557('0xc4')]];this[_0x6557('0xc6')](this['voiceQueues'][_0x303244[_0x6557('0xc3')]]);this['voiceQueues'][_0x303244[_0x6557('0xc3')]][_0x6557('0xca')]+=0x1;this[_0x6557('0x1b')][_0x303244[_0x6557('0xc3')]][_0x6557('0x114')]+=0x1;_0x201565=new Hangup(_0x303244,_0x1ea443);_0x201565[_0x6557('0x6b')]=0x10;_0x201565['statedesc']=_0x6557('0x131');_0x201565[_0x6557('0x116')]=_0x6557('0x132');hopperUtils[_0x6557('0xcb')](_0x201565)[_0x6557('0xa1')](loggerCatch(_0x6557('0x12e')));hopperUtils[_0x6557('0xcd')](_0x201565)[_0x6557('0xa1')](loggerCatch(_0x6557('0x12f')));}if(_0x303244&&_0x303244[_0x6557('0xc5')]!==_0x6557('0xc9')&&!isNotNull(this[_0x6557('0x1b')][_0x303244[_0x6557('0xc3')]][_0x6557('0x130')])){if(_0x1ea443[_0x6557('0x133')]===_0x6557('0x134')){delete this['uniqueId'][_0x1ea443[_0x6557('0xc4')]];this[_0x6557('0x1b')][_0x303244['queue']]['outboundAnswerCallsDay']+=0x1;const _0x2c7deb=new AgentComplete(_0x303244,_0x1ea443);_0x2c7deb['CampaignId']=this[_0x6557('0x1b')][_0x303244[_0x6557('0xc3')]]['id'];hopperUtils['createHistory'](_0x2c7deb)[_0x6557('0xa1')](loggerCatch(_0x6557('0xcc')));hopperUtils[_0x6557('0xcd')](_0x2c7deb)[_0x6557('0xa1')](loggerCatch('[syncAgentComplete]'));}else{delete this[_0x6557('0x22')][_0x1ea443[_0x6557('0xc4')]];this['updateOriginated'](this['voiceQueues'][_0x303244[_0x6557('0xc3')]]);this[_0x6557('0x1b')][_0x303244[_0x6557('0xc3')]]['outboundUnknownCallsDay']+=0x1;_0x201565=new Hangup(_0x303244,_0x1ea443);_0x201565['state']=0xc;_0x201565['statedesc']=_0x1ea443[_0x6557('0x133')];_0x201565['membername']=_0x6557('0x135');hopperUtils['createHistory'](_0x201565)[_0x6557('0xa1')](loggerCatch(_0x6557('0x12e')));hopperUtils[_0x6557('0xcd')](_0x201565)[_0x6557('0xa1')](loggerCatch(_0x6557('0x12f')));}}};Dialer[_0x6557('0x16')]['syncQueueSummary']=function(_0x132295){var _0x14d82c=this;if(!_0x14d82c[_0x6557('0x136')][_0x132295[_0x6557('0x41')]]){_0x14d82c[_0x6557('0x136')][_0x132295['name']]={'running':![]};}else if(_0x14d82c[_0x6557('0x136')][_0x132295[_0x6557('0x41')]][_0x6557('0x137')]===!![]){return;}else if(_0x14d82c['queuesSummary'][_0x132295[_0x6557('0x41')]]['running']===![]){_0x14d82c[_0x6557('0x136')][_0x132295[_0x6557('0x41')]][_0x6557('0x137')]=!![];}var _0x5aed7f=_0x14d82c[_0x6557('0x1b')][_0x132295['name']];var _0xc61e34=_0x5aed7f[_0x6557('0x68')]!==utils[_0x6557('0x69')][_0x6557('0x79')];var _0x545a68=utils['isPreviewCampaign'](_0x5aed7f);_0x5aed7f[_0x6557('0x138')]=utils[_0x6557('0x139')](_0x5aed7f,_0x14d82c['trunks']);Promise[_0x6557('0xae')]()[_0x6557('0x3a')](function(){if(_0x5aed7f['statusMessage']===utils[_0x6557('0x69')][_0x6557('0x79')]){if(_0xc61e34){clearPredictiveAttributes(_0x5aed7f);_0x132295[_0x6557('0x60')]=undefined;_0x132295[_0x6557('0x23')]=undefined;}if(_0x5aed7f[_0x6557('0x138')]===utils['CAMPAIGN_STATUS'][_0x6557('0x79')]){_0x132295['available']=0x0;_0x132295[_0x6557('0xfe')]=0x0;_0x132295[_0x6557('0x13a')]=0x0;_0x132295['talking']=0x0;_0x132295[_0x6557('0x13b')]=0x0;}}else if(_0x5aed7f['statusMessage']===utils[_0x6557('0x69')]['ACTIVE']&&!_0x545a68){return _0x14d82c[_0x6557('0x93')](_0x5aed7f,!![])[_0x6557('0x3a')](function(){return _0x14d82c['ifTime'](_0x5aed7f,![]);})['then'](function(){return _0x14d82c['checkDialMethod'](_0x5aed7f);})['catch'](function(_0x43ffc6){loggerSyncQueueSummary['debug']('[syncQueueSummary]',util['inspect'](_0x43ffc6,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x5aed7f);});}else{clearPredictiveAttributes(_0x5aed7f);}})[_0x6557('0x3a')](function(){var _0x105ad5=_0x132295[_0x6557('0x13c')](_0x5aed7f);if(_0x105ad5||_0x5aed7f[_0x6557('0x13d')]){_0x5aed7f['queueSummaryCountersUpdated']=![];_0x132295[_0x6557('0x13e')](_0x5aed7f);Object['assign'](_0x5aed7f,_0x132295);emitOutboundVoiceQueueSummary(_0x132295);}_0x14d82c[_0x6557('0x136')][_0x5aed7f[_0x6557('0x41')]][_0x6557('0x137')]=![];})[_0x6557('0xa1')](function(_0x4064c3){logger[_0x6557('0x64')](_0x6557('0x13f'),util[_0x6557('0x66')](_0x4064c3,{'showHidden':![],'depth':null}));_0x14d82c['queuesSummary'][_0x5aed7f[_0x6557('0x41')]]['running']=![];});};Dialer[_0x6557('0x16')][_0x6557('0x2f')]=_[_0x6557('0x140')](function(){var _0x3608db=_[_0x6557('0x141')](this[_0x6557('0x1b')],function(_0x3bf553){return _0x3bf553[_0x6557('0x142')];});var _0x440c9f=_[_0x6557('0x141')](this[_0x6557('0x1d')],function(_0x5b294b){return _0x5b294b['online']&&_0x5b294b[_0x6557('0x88')]===_0x6557('0x87');});if(_0x3608db[_0x6557('0x9c')]>0x0&&_0x440c9f[_0x6557('0x9c')]>0x0){return Promise['resolve']()[_0x6557('0x3a')](cmHopper[_0x6557('0x143')](_['map'](_0x3608db,'id'),previewRecallmeReminderInterval,_[_0x6557('0x144')](_0x440c9f,'id')))[_0x6557('0x3a')](function(_0x278949){for(var _0x29a503=0x0;_0x29a503<_0x278949[_0x6557('0x9c')];_0x29a503++){var _0x242ea1=_0x278949[_0x29a503]['Agent'][_0x6557('0x41')];if(_0x242ea1)io['to'](util[_0x6557('0x3f')](_0x6557('0x145'),_0x242ea1))['emit'](_0x6557('0x146'),{'hopper':_0x278949[_0x29a503]});}})['catch'](function(_0x3bdb94){logger[_0x6557('0x64')](_0x6557('0x147'),_0x3bdb94);});}},0x3c*0x3e8,{'leading':!![]});Dialer['prototype'][_0x6557('0x38')]=function(){var _0x4f32c3=this;setInterval(function(){_0x4f32c3[_0x6557('0x148')](_0x4f32c3[_0x6557('0x22')],_0x6557('0x149'));_0x4f32c3[_0x6557('0x148')](_0x4f32c3['actions'],_0x6557('0x14a'));},0x32c8);};Dialer[_0x6557('0x16')][_0x6557('0x148')]=function(_0x1f184c,_0x376259){var _0x13fb7a=this;for(var _0x4abb80 in _0x1f184c){if(typeof _0x1f184c[_0x4abb80]!==_0x6557('0xac')){this['sequence']['enqueue'](function(){if(!_['isNil'](_0x1f184c[_0x4abb80])){return ami[_0x6557('0x9d')]({'action':_0x6557('0x88'),'channel':_0x1f184c[_0x4abb80][_0x6557('0xf6')]})['catch'](function(_0x5b9253){if(_0x5b9253[_0x6557('0x68')]==='No\x20such\x20channel'){setTimeout(function(){if(_0x1f184c[_0x4abb80]&&_0x1f184c[_0x4abb80][_0x6557('0xc5')]!==_0x6557('0xc9')){_0x13fb7a[_0x6557('0xc6')](_0x13fb7a['voiceQueues'][_0x1f184c[_0x4abb80][_0x6557('0xc3')]]);logger[_0x6557('0x64')]('[Dialer][checkChannel]',_0x376259,_0x4abb80,_0x1f184c[_0x4abb80][_0x6557('0xc3')]);delete _0x1f184c[_0x4abb80];}if(_0x1f184c[_0x4abb80]&&_0x1f184c[_0x4abb80][_0x6557('0xc5')]===_0x6557('0xc9')){_0x13fb7a['updateOriginated'](_0x13fb7a[_0x6557('0x1c')][_0x1f184c[_0x4abb80]['queue']]);logger['error'](_0x6557('0x14b'),_0x376259,_0x4abb80,_0x1f184c[_0x4abb80]['queue']);delete _0x1f184c[_0x4abb80];}},0x2328);}});}});}}};Dialer['prototype'][_0x6557('0x14c')]=function(_0x3a9771){return Promise[_0x6557('0xae')]()[_0x6557('0x3a')](voiceQueueRt['getVoiceQueueRtPauses'](_0x3a9771))[_0x6557('0xa1')](loggerCatch(_0x6557('0x14d')));};Dialer[_0x6557('0x16')][_0x6557('0xc6')]=function(_0x177f8c){if(!_[_0x6557('0x3c')](_0x177f8c)&&_0x177f8c!==null){if(typeof _0x177f8c['originated']!=='undefined'){if(_0x177f8c[_0x6557('0x7e')]>0x0){_0x177f8c[_0x6557('0x7e')]-=0x1;}else{logger[_0x6557('0x64')](_0x6557('0x14e'));}}}else{logger[_0x6557('0x64')](_0x6557('0x14f'));}};Dialer[_0x6557('0x16')][_0x6557('0x150')]=function(_0x42c89a,_0x197ceb){var _0x53d612=this;return function(_0x4ad0b7){_0x53d612[_0x6557('0xc6')](_0x197ceb);logger[_0x6557('0x64')](_0x42c89a,util[_0x6557('0x66')](_0x4ad0b7,{'showHidden':![],'depth':null}));};};Dialer[_0x6557('0x16')][_0x6557('0x151')]=function(_0x411e87,_0x37d35b,_0x54b1b5){var _0x45632b={'state':0x19,'statedesc':_0x6557('0x152')};this[_0x6557('0xc6')](_0x37d35b);this[_0x6557('0x11b')](_[_0x6557('0x5c')](_0x45632b,_[_0x6557('0x73')](_0x54b1b5,[_0x6557('0xe2'),_0x6557('0xe3'),_0x6557('0x153'),_0x6557('0xe4'),'CampaignId'])),'[emptyContact][createHistory]','[emptyContact]');logger[_0x6557('0x64')](_0x411e87);};Dialer['prototype'][_0x6557('0x11b')]=function(_0x3147a5,_0x4e43f5,_0x3c3788){hopperUtils[_0x6557('0xcb')](_0x3147a5)[_0x6557('0xa1')](loggerCatch(_0x4e43f5));hopperUtils[_0x6557('0xcd')](_0x3147a5)['catch'](loggerCatch(_0x3c3788));};Dialer[_0x6557('0x16')][_0x6557('0xf0')]=function(_0x35c7e2,_0x3968b3){hopperUtils['createHistory'](_0x35c7e2)['catch'](loggerCatch('[syncAgentComplete][createHistory]'));if(_0x3968b3==0x0){hopperUtils[_0x6557('0xcd')](_0x35c7e2)[_0x6557('0xa1')](loggerCatch('[syncQueueCallerAbandon]\x20[Drop]'));}};Dialer[_0x6557('0x16')]['checkPreviewRecallReminder']=function(_0x474267){return Promise['resolve']()[_0x6557('0x3a')](cmHopper[_0x6557('0x143')](_0x474267['id'],previewRecallmeReminderInterval))[_0x6557('0x3a')](function(_0x498e8c){for(var _0x5702c6=0x0;_0x5702c6<_0x498e8c[_0x6557('0x9c')];_0x5702c6++){var _0x1293c2=_0x498e8c[_0x5702c6][_0x6557('0x154')]['name'];if(_0x1293c2)io['to'](util[_0x6557('0x3f')](_0x6557('0x145'),_0x1293c2))[_0x6557('0x3d')](_0x6557('0x146'),{'hopper':_0x498e8c[_0x5702c6]});}})[_0x6557('0xa1')](function(){});};Dialer['prototype'][_0x6557('0xb0')]=function(_0x20603e){var _0x3776cf=this;return function(){_0x3776cf[_0x6557('0x155')](_0x20603e);};};Dialer['prototype'][_0x6557('0x156')]=function(_0x21d215,_0x36a285){var _0x465107=this;var _0x41d785=uuid['v4']();this['actions'][_0x41d785]=new Action(_0x21d215,_0x36a285,_0x41d785);return new Promise(function(_0x1654bc,_0x5575d6){if(_[_0x6557('0x3c')](_0x21d215)&&typeof _0x21d215!==_0x6557('0x157')){return _0x5575d6(msgResponse(_0x6557('0x158'),_0x6557('0x96'),'voiceQueue\x20is\x20undefine'));}if(_['isUndefined'](_0x36a285['phone'])||_0x36a285[_0x6557('0x159')]===null){return _0x5575d6(msgResponse('originate','Failure',_0x6557('0x15a')));}var _0xa8d834={'XMD-CALLERID':_0x465107[_0x6557('0x20')][_0x41d785][_0x6557('0x15b')](),'XMD-AGI':_0x21d215['dialQueueProject']?util[_0x6557('0x3f')](_0x6557('0x15c'),ipAgi,_0x21d215[_0x6557('0x130')]):'NONE','XMD-AGIAFTER':_0x21d215[_0x6557('0xd7')]?util[_0x6557('0x3f')](_0x6557('0x15c'),ipAgi,_0x21d215['dialQueueProject2']):_0x6557('0x15d'),'XMD-QUEUE':utils[_0x6557('0x15e')](_0x21d215)?util['format'](_0x6557('0x15f'),_0x21d215['name'],_0x21d215[_0x6557('0x160')]||'',_0x21d215[_0x6557('0x161')]?'c':'',_0x21d215[_0x6557('0xd1')]||0x3):_0x6557('0x15d'),'XMD-CONTACTID':_0x36a285[_0x6557('0xe2')],'XMD-CDRTYPE':_0x6557('0x9'),'CALLERID(all)':_0x465107['actions'][_0x41d785][_0x6557('0x15b')](),'XMD-AMD':_0x21d215[_0x6557('0x112')]?_0x6557('0x162'):'NONE','XMD-DESTINATION':_0x6557('0x163')};if(_0x21d215[_0x6557('0x112')]){_0xa8d834['XMD-AMDINITIALSILENCE']=_0x21d215[_0x6557('0x164')]||0x9c4;_0xa8d834[_0x6557('0x165')]=_0x21d215['dialAMDGreeting']||0x5dc;_0xa8d834['XMD-AMDAFTERGREETINGSILENCE']=_0x21d215[_0x6557('0x166')]||0x320;_0xa8d834['XMD-AMDTOTALANALYSISTIME']=_0x21d215[_0x6557('0x167')]||0x1388;_0xa8d834['XMD-AMDMINWORDLENGTH']=_0x21d215['dialAMDMinWordLength']||0x64;_0xa8d834[_0x6557('0x168')]=_0x21d215[_0x6557('0x169')]||0x32;_0xa8d834[_0x6557('0x16a')]=_0x21d215[_0x6557('0x16b')]||0x3;_0xa8d834[_0x6557('0x16c')]=_0x21d215[_0x6557('0x16d')]||0x100;_0xa8d834[_0x6557('0x16e')]=_0x21d215[_0x6557('0x16f')]||0x1388;}if(utils[_0x6557('0x15e')](_0x21d215)){_0xa8d834['XMD-VOICEQUEUEID']=_0x36a285[_0x6557('0xe4')];}else{_0xa8d834['XMD-CAMPAIGNID']=_0x36a285[_0x6557('0xf1')];}var _0x353c43=utils[_0x6557('0x170')](_0x36a285['Contact']);Object['assign'](_0xa8d834,_0x353c43);var _0x2faf5f=_0x465107[_0x6557('0x8c')](_0x21d215[_0x6557('0x8b')])?utils['getCallerId'](_0x21d215[_0x6557('0x8b')][_0x6557('0x171')],_0x21d215[_0x6557('0x172')],_0x21d215['dialRandomLastDigitCallerIdNumber']>0x0?utils[_0x6557('0x173')](_0x21d215[_0x6557('0x174')],_0x21d215['dialRandomLastDigitCallerIdNumber']):_0x21d215[_0x6557('0x174')]):utils['getCallerId'](_['isNil'](_0x21d215[_0x6557('0x8d')])?_0x21d215[_0x6557('0x8b')][_0x6557('0x171')]:_0x21d215[_0x6557('0x8d')][_0x6557('0x171')],_0x21d215[_0x6557('0x172')],_0x21d215[_0x6557('0x175')]>0x0?utils[_0x6557('0x173')](_0x21d215[_0x6557('0x174')],_0x21d215['dialRandomLastDigitCallerIdNumber']):_0x21d215[_0x6557('0x174')]);if(_0x2faf5f){_0xa8d834[_0x6557('0x176')]=_0x465107['actions'][_0x41d785]['originatecalleridname']=utils[_0x6557('0x177')](_0x2faf5f);_0xa8d834[_0x6557('0x178')]=_0x36a285[_0x6557('0x159')];}_0x21d215[_0x6557('0x179')]=_0xa8d834;return ami[_0x6557('0x9d')]({'actionid':_0x41d785,'action':_0x6557('0x158'),'channel':_0x465107['isTrunkReachable'](_0x21d215[_0x6557('0x8b')])?util[_0x6557('0x3f')](_0x6557('0x17a'),_0x21d215[_0x6557('0x8b')]['name'],isNotNull(_0x21d215[_0x6557('0x17b')])?_0x21d215[_0x6557('0x17b')][_0x6557('0x17c')]()||'':'',_0x21d215['dialCutDigit']>0x0?_0x36a285['phone']['substring'](_0x21d215['dialCutDigit']):_0x36a285[_0x6557('0x159')]):util[_0x6557('0x3f')](_0x6557('0x17a'),_[_0x6557('0xfc')](_0x21d215[_0x6557('0x8d')])?_0x21d215[_0x6557('0x8b')][_0x6557('0x41')]:_0x21d215[_0x6557('0x8d')][_0x6557('0x41')],isNotNull(_0x21d215[_0x6557('0x17b')])?_0x21d215[_0x6557('0x17b')][_0x6557('0x17c')]()||'':'',_0x21d215[_0x6557('0x17d')]>0x0?_0x36a285[_0x6557('0x159')][_0x6557('0x17e')](_0x21d215['dialCutDigit']):_0x36a285[_0x6557('0x159')]),'callerid':_0x2faf5f,'Exten':'xcally-motion-dialer','Context':_0x6557('0x17f'),'Priority':'1','variable':_0xa8d834,'timeout':(_0x21d215[_0x6557('0x180')]||0x1e)*0x3e8,'async':!![],'channelid':_0x41d785})[_0x6557('0x3a')](function(_0x29af51){return _0x1654bc(_0x29af51);})[_0x6557('0xa1')](function(_0x13450e){_0x21d215[_0x6557('0x181')]+=0x1;var _0x3e0e55=new History(_0x465107[_0x6557('0x20')][_0x41d785]);logger[_0x6557('0x64')](util[_0x6557('0x3f')]('[originateError]:\x20%s',JSON['stringify'](_0x13450e)));_0x3e0e55[_0x6557('0x6b')]=0xe;_0x3e0e55[_0x6557('0x6c')]=_0x6557('0x182');_0x3e0e55[_0x6557('0x6e')]=moment()[_0x6557('0x3f')](_0x6557('0xc8'));_0x3e0e55[_0x6557('0x6d')]=_0x3e0e55[_0x6557('0x6e')];hopperUtils[_0x6557('0xcb')](_0x3e0e55)['catch'](loggerCatch(_0x6557('0x183')));_0x465107[_0x6557('0xcd')](_0x3e0e55)[_0x6557('0xa1')](loggerCatch('[originate][error]'))[_0x6557('0x19')](function(){delete _0x465107[_0x6557('0x20')][_0x41d785];return _0x5575d6(msgResponse(_0x6557('0x158'),_0x6557('0x84'),_0x6557('0x184')));});});});};Dialer['prototype'][_0x6557('0x185')]=function(_0x161dd9,_0x390f88,_0x34a2fe){var _0x18528a=new History(_0x390f88);if(_0x18528a['countbusyretry']+_0x18528a[_0x6557('0x186')]+_0x18528a[_0x6557('0x187')]+_0x18528a['countnosuchnumberretry']+_0x18528a[_0x6557('0xd8')]+_0x18528a[_0x6557('0xec')]+_0x18528a['countmachineretry']+_0x18528a[_0x6557('0x123')]>=_0x34a2fe['dialGlobalMaxRetry']-0x1){return!![];}switch(_0x161dd9){case 0x3:if(_0x18528a[_0x6557('0x187')]>=_0x34a2fe[_0x6557('0x188')]-0x1){return!![];}hopperUtils[_0x6557('0xdf')]({'active':![],'countnoanswerretry':_0x18528a[_0x6557('0x187')]+=0x1,'scheduledat':moment()['add'](_0x34a2fe[_0x6557('0x189')],_0x6557('0xe1'))[_0x6557('0x3f')](_0x6557('0xc8')),'ContactId':_0x18528a[_0x6557('0xe2')],'ListId':_0x18528a[_0x6557('0xe3')],'VoiceQueueId':_0x18528a[_0x6557('0xe4')]||undefined,'CampaignId':_0x18528a[_0x6557('0xf1')]||undefined})[_0x6557('0xa1')](loggerCatch('[rescheduleContact][NoAnswer]'));break;case 0x5:if(_0x18528a[_0x6557('0x121')]>=_0x34a2fe[_0x6557('0x18a')]-0x1){return!![];}hopperUtils[_0x6557('0xdf')]({'active':![],'countbusyretry':_0x18528a[_0x6557('0x121')]+=0x1,'scheduledat':moment()[_0x6557('0xe0')](_0x34a2fe['dialBusyRetryFrequency'],_0x6557('0xe1'))[_0x6557('0x3f')](_0x6557('0xc8')),'ContactId':_0x18528a[_0x6557('0xe2')],'ListId':_0x18528a[_0x6557('0xe3')],'VoiceQueueId':_0x18528a['VoiceQueueId']||undefined,'CampaignId':_0x18528a[_0x6557('0xf1')]||undefined})['catch'](loggerCatch(_0x6557('0x18b')));break;case 0x8:if(_0x18528a[_0x6557('0x186')]>=_0x34a2fe[_0x6557('0x18c')]-0x1){return!![];}hopperUtils[_0x6557('0xdf')]({'active':![],'countcongestionretry':_0x18528a[_0x6557('0x186')]+=0x1,'scheduledat':moment()[_0x6557('0xe0')](_0x34a2fe[_0x6557('0x18d')],_0x6557('0xe1'))[_0x6557('0x3f')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x18528a[_0x6557('0xe2')],'ListId':_0x18528a[_0x6557('0xe3')],'VoiceQueueId':_0x18528a[_0x6557('0xe4')]||undefined,'CampaignId':_0x18528a['CampaignId']||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x18e')));break;case 0x0:if(_0x18528a['countnosuchnumberretry']>=_0x34a2fe[_0x6557('0x18f')]-0x1){return!![];}else{hopperUtils[_0x6557('0xdf')]({'active':![],'countnosuchnumberretry':_0x18528a['countnosuchnumberretry']+=0x1,'scheduledat':moment()['add'](_0x34a2fe[_0x6557('0x190')],'minutes')['format'](_0x6557('0xc8')),'ContactId':_0x18528a[_0x6557('0xe2')],'ListId':_0x18528a[_0x6557('0xe3')],'VoiceQueueId':_0x18528a[_0x6557('0xe4')]||undefined,'CampaignId':_0x18528a['CampaignId']||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x191')));}break;case 0xa:if(_0x18528a['countdropretry']>=_0x34a2fe[_0x6557('0xde')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countdropretry':_0x18528a[_0x6557('0xd8')]+=0x1,'scheduledat':moment()[_0x6557('0xe0')](_0x34a2fe['dialDropRetryFrequency'],_0x6557('0xe1'))[_0x6557('0x3f')](_0x6557('0xc8')),'ContactId':_0x18528a[_0x6557('0xe2')],'ListId':_0x18528a[_0x6557('0xe3')],'VoiceQueueId':_0x18528a[_0x6557('0xe4')]||undefined,'CampaignId':_0x18528a['CampaignId']||undefined})['catch'](loggerCatch('[rescheduleContact][Drop]'));break;case 0xb:if(_0x18528a['countabandonedretry']>=_0x34a2fe[_0x6557('0xef')]-0x1){return!![];}hopperUtils[_0x6557('0xdf')]({'active':![],'countabandonedretry':_0x18528a[_0x6557('0xec')]+=0x1,'scheduledat':moment()[_0x6557('0xe0')](_0x34a2fe['dialAbandonedRetryFrequency'],_0x6557('0xe1'))[_0x6557('0x3f')](_0x6557('0xc8')),'ContactId':_0x18528a[_0x6557('0xe2')],'ListId':_0x18528a['ListId'],'VoiceQueueId':_0x18528a[_0x6557('0xe4')]||undefined,'CampaignId':_0x18528a['CampaignId']||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0xf2')));break;case 0x13:if(_0x18528a[_0x6557('0x11f')]>=_0x34a2fe[_0x6557('0x126')]-0x1){return!![];}hopperUtils[_0x6557('0xdf')]({'active':![],'countmachineretry':_0x18528a[_0x6557('0x11f')]+=0x1,'scheduledat':moment()[_0x6557('0xe0')](_0x34a2fe['dialMachineRetryFrequency'],_0x6557('0xe1'))['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x18528a[_0x6557('0xe2')],'ListId':_0x18528a['ListId'],'VoiceQueueId':_0x18528a[_0x6557('0xe4')]||undefined,'CampaignId':_0x18528a[_0x6557('0xf1')]||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x12a')));break;case 0x14:if(_0x18528a[_0x6557('0x123')]>=_0x34a2fe['dialAgentRejectMaxRetry']-0x1){return!![];}hopperUtils[_0x6557('0xdf')]({'active':![],'countagentrejectretry':_0x18528a[_0x6557('0x123')]+=0x1,'scheduledat':moment()['add'](_0x34a2fe[_0x6557('0x192')],_0x6557('0xe1'))[_0x6557('0x3f')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x18528a['ContactId'],'ListId':_0x18528a['ListId'],'VoiceQueueId':_0x18528a[_0x6557('0xe4')]||undefined,'CampaignId':_0x18528a[_0x6557('0xf1')]||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x193')));break;default:return!![];}};Dialer[_0x6557('0x16')][_0x6557('0x10e')]=function(_0x26641e,_0x4c1b40,_0x5ec7c2){var _0x5e005c=this;var _0x3557c6=new History(_0x26641e);var _0x47f3ec=![];var _0xbbc94;var _0x4f772b;return new Promise(function(_0x173acb,_0x2d6c87){if(_[_0x6557('0x3c')](_0x4c1b40)&&typeof _0x4c1b40!==_0x6557('0x157')){return _0x2d6c87(msgResponse('[callProgressDetecting]',_0x6557('0x96'),_0x6557('0x194')));}if(_[_0x6557('0x3c')](_0x5ec7c2)&&typeof _0x5ec7c2!==_0x6557('0x157')){return _0x2d6c87(msgResponse('[callProgressDetecting]','Failure',_0x6557('0x195')));}hopperUtils[_0x6557('0xdc')](_0x3557c6,_0x5ec7c2['reason'],_0x4c1b40)[_0x6557('0x3a')](function(_0x68f333){if(_0x68f333[_0x6557('0xdd')]==0x1)_0x47f3ec=!![];switch(_0x5ec7c2[_0x6557('0x196')]){case'0':_0x4c1b40[_0x6557('0x197')]+=0x1;_0x3557c6[_0x6557('0x6b')]=0x0;_0x3557c6['statedesc']=_0x6557('0x198');_0x3557c6[_0x6557('0x122')]+=0x1;_0x3557c6[_0x6557('0xd9')]+=0x1;ami[_0x6557('0x3d')](_0x6557('0x199'),ut[_0x6557('0x119')](_0x26641e,_0x6557('0x19a')));_0xbbc94=_0x4c1b40['dialNoSuchNumberRetryFrequency'];_0x4f772b=_0x4c1b40[_0x6557('0xdb')];hopperUtils[_0x6557('0xcb')](_0x3557c6)[_0x6557('0xa1')](loggerCatch(_0x6557('0x120')));if(_0x5e005c[_0x6557('0x185')](0x0,_0x26641e,_0x4c1b40)&&!_0x47f3ec){if(_0x3557c6[_0x6557('0x122')]>=_0x4c1b40['dialNoSuchNumberMaxRetry']){_0x5e005c['createStateFinal'](_0x3557c6,_0x173acb,_0x2d6c87,_0x6557('0x19b'));}else{_0x5e005c[_0x6557('0x125')](_0x3557c6,_0x173acb,_0x2d6c87,_0x6557('0x19b'));}}break;case'3':_0x4c1b40[_0x6557('0x19c')]+=0x1;_0x3557c6['state']=0x3;_0x3557c6[_0x6557('0x6c')]=_0x6557('0x19d');_0x3557c6[_0x6557('0x187')]+=0x1;_0x3557c6[_0x6557('0xd9')]+=0x1;var _0x24c1e2=ut['buildNoAnswerEventPayload'](_0x26641e,_0x4c1b40);ami['emit'](_0x6557('0x19e'),_0x24c1e2);_0xbbc94=_0x4c1b40[_0x6557('0x189')];_0x4f772b=_0x4c1b40[_0x6557('0xdb')];hopperUtils[_0x6557('0xcb')](_0x3557c6)[_0x6557('0xa1')](loggerCatch(_0x6557('0x19f')));if(_0x5e005c[_0x6557('0x185')](0x3,_0x26641e,_0x4c1b40)&&!_0x47f3ec){if(_0x3557c6[_0x6557('0x187')]>=_0x4c1b40[_0x6557('0x188')]){_0x5e005c[_0x6557('0x127')](_0x3557c6,_0x173acb,_0x2d6c87,'reason\x203\x20ringing\x20no\x20answer');}else{_0x5e005c[_0x6557('0x125')](_0x3557c6,_0x173acb,_0x2d6c87,_0x6557('0x1a0'));}}break;case'5':_0x4c1b40['outboundBusyCallsDay']+=0x1;_0x3557c6[_0x6557('0x6b')]=0x5;_0x3557c6[_0x6557('0x6c')]=_0x6557('0x1a1');_0x3557c6[_0x6557('0x121')]+=0x1;_0x3557c6['countglobal']+=0x1;ami[_0x6557('0x3d')](_0x6557('0x1a2'),ut[_0x6557('0x119')](_0x26641e,_0x6557('0x1a3')));_0xbbc94=_0x4c1b40[_0x6557('0x1a4')];_0x4f772b=_0x4c1b40[_0x6557('0xdb')];hopperUtils['createHistory'](_0x3557c6)[_0x6557('0xa1')](loggerCatch(_0x6557('0x1a5')));if(_0x5e005c[_0x6557('0x185')](0x5,_0x26641e,_0x4c1b40)&&!_0x47f3ec){if(_0x3557c6[_0x6557('0x121')]>=_0x4c1b40['dialBusyMaxRetry']){_0x5e005c[_0x6557('0x127')](_0x3557c6,_0x173acb,_0x2d6c87,_0x6557('0x1a6'));}else{_0x5e005c[_0x6557('0x125')](_0x3557c6,_0x173acb,_0x2d6c87,_0x6557('0x1a6'));}}break;case'8':_0x4c1b40[_0x6557('0x1a7')]+=0x1;_0x3557c6[_0x6557('0x6b')]=0x8;_0x3557c6['statedesc']='Congestion';_0x3557c6[_0x6557('0x186')]+=0x1;_0x3557c6['countglobal']+=0x1;_0xbbc94=_0x4c1b40['dialCongestionRetryFrequency'];_0x4f772b=_0x4c1b40[_0x6557('0xdb')];ami[_0x6557('0x3d')](_0x6557('0x1a8'),ut['buildObj'](_0x26641e,_0x6557('0x1a9')));hopperUtils[_0x6557('0xcb')](_0x3557c6)[_0x6557('0xa1')](loggerCatch(_0x6557('0x1aa')));if(_0x5e005c[_0x6557('0x185')](0x8,_0x26641e,_0x4c1b40)&&!_0x47f3ec){if(_0x3557c6[_0x6557('0x186')]>=_0x4c1b40[_0x6557('0x18c')]){_0x5e005c[_0x6557('0x127')](_0x3557c6,_0x173acb,_0x2d6c87,_0x6557('0x1ab'));}else{_0x5e005c[_0x6557('0x125')](_0x3557c6,_0x173acb,_0x2d6c87,'reason\x208\x20congestion');}}break;case'11':_0x4c1b40[_0x6557('0x1ac')]+=0x1;_0x3557c6[_0x6557('0x6b')]=0xb;_0x3557c6[_0x6557('0x6c')]=_0x6557('0xea');_0x3557c6[_0x6557('0xec')]+=0x1;_0x3557c6['countglobal']+=0x1;_0xbbc94=_0x4c1b40[_0x6557('0xed')];_0x4f772b=_0x4c1b40[_0x6557('0xdb')];hopperUtils[_0x6557('0xcb')](_0x3557c6)[_0x6557('0xa1')](loggerCatch(_0x6557('0xf3')));if(_0x5e005c[_0x6557('0x185')](0xb,_0x26641e,_0x4c1b40)&&!_0x47f3ec){if(_0x3557c6[_0x6557('0xec')]>=_0x4c1b40[_0x6557('0xef')]){_0x5e005c[_0x6557('0x127')](_0x3557c6,_0x173acb,_0x2d6c87,'reason\x2011\x20abandoned');}else{_0x5e005c[_0x6557('0x125')](_0x3557c6,_0x173acb,_0x2d6c87,'reason\x2011\x20abandoned');}}break;case'20':_0x4c1b40['outboundRejectCallsDay']+=0x1;_0x3557c6[_0x6557('0x6b')]=0x14;_0x3557c6[_0x6557('0x6c')]=_0x6557('0x1ad');_0x3557c6['countagentrejectretry']+=0x1;_0x3557c6[_0x6557('0xd9')]+=0x1;_0xbbc94=_0x4c1b40['dialAgentRejectRetryFrequency'];_0x4f772b=_0x4c1b40[_0x6557('0xdb')];ami['emit'](_0x6557('0x1ae'),ut[_0x6557('0x119')](_0x26641e,_0x6557('0x1af')));hopperUtils[_0x6557('0xcb')](_0x3557c6)[_0x6557('0xa1')](loggerCatch('[syncAgentComplete][createHistory][20]'));if(_0x5e005c[_0x6557('0x185')](0x14,_0x26641e,_0x4c1b40)&&!_0x47f3ec){if(_0x3557c6[_0x6557('0x123')]>=_0x4c1b40[_0x6557('0x1b0')]){_0x5e005c[_0x6557('0x127')](_0x3557c6,_0x173acb,_0x2d6c87,'reason\x2020\x20agentreject');}else{_0x5e005c['stateGlobal'](_0x3557c6,_0x173acb,_0x2d6c87,_0x6557('0x1b1'));}}break;default:_0x4c1b40[_0x6557('0x1b2')]+=0x1;_0x3557c6[_0x6557('0x6b')]=0xc;_0x3557c6[_0x6557('0x6c')]=_0x5ec7c2[_0x6557('0x196')];_0xbbc94=_0x4c1b40['dialAgentRejectRetryFrequency'];_0x4f772b=_0x4c1b40[_0x6557('0xdb')];hopperUtils['createHistory'](_0x3557c6)[_0x6557('0xa1')](loggerCatch(_0x6557('0x1b3')));if(_0x5e005c['checkRetriveMax'](_0x5ec7c2[_0x6557('0x196')],_0x26641e,_0x4c1b40)&&!_0x47f3ec){if(_0x3557c6[_0x6557('0x121')]+_0x3557c6[_0x6557('0x186')]+_0x3557c6['countnoanswerretry']+_0x3557c6[_0x6557('0x122')]+_0x3557c6[_0x6557('0xd8')]+_0x3557c6[_0x6557('0xec')]+_0x3557c6[_0x6557('0x11f')]+_0x3557c6[_0x6557('0x123')]>=_0x4c1b40[_0x6557('0x124')]){_0x5e005c[_0x6557('0x125')](_0x3557c6,_0x173acb,_0x2d6c87,_0x5ec7c2[_0x6557('0x196')]);}else{_0x5e005c['createStateFinal'](_0x3557c6,_0x173acb,_0x2d6c87,_0x5ec7c2[_0x6557('0x196')]);}}}})[_0x6557('0x3a')](function(){if(_0x47f3ec){hopperUtils['swapAdditionalPhones'](_0x3557c6,_0xbbc94,_0x4f772b)[_0x6557('0x3a')](function(){return _0x173acb(0x1);});}});});};Dialer[_0x6557('0x16')][_0x6557('0x125')]=function(_0x50bbcb,_0x341d7f,_0x38cb7f,_0x45e625){var _0x553900=new Final(_0x50bbcb);_0x553900['state']=0xf;_0x553900[_0x6557('0x6c')]=_0x6557('0x1b4');this[_0x6557('0x127')](_0x553900,_0x341d7f,_0x38cb7f,_0x45e625);};Dialer[_0x6557('0x16')][_0x6557('0x127')]=function(_0x4f2b56,_0x3c3a4e,_0x192e03,_0x27e798){hopperUtils['moveContactManagedDialer'](_0x4f2b56)[_0x6557('0x3a')](function(){return _0x3c3a4e(msgResponse(_0x6557('0x1b5'),'Success',_0x27e798));})[_0x6557('0xa1')](function(){return _0x192e03(msgResponse(_0x6557('0x1b6'),'Failure','contact\x20not\x20moved'));});};Dialer[_0x6557('0x16')]['predictive']=function(_0x55f0d5){var _0x3ad61d=_0x55f0d5[_0x6557('0x1b7')]/0x64;var _0x394e6d=_0x55f0d5[_0x6557('0xd2')]/(_0x55f0d5[_0x6557('0xd2')]+_0x55f0d5[_0x6557('0xca')]);var _0x4b4b79=Math[_0x6557('0x1b8')](_0x55f0d5['predictiveIntervalAvailable']*(_0x55f0d5[_0x6557('0x1b9')]/0x64));var _0x341ec3=Math[_0x6557('0x1b8')](_0x55f0d5['predictiveIntervalAvailable']*(_0x55f0d5[_0x6557('0x1ba')]/0x64));var _0x15278d=_0x55f0d5[_0x6557('0x1bb')]+_0x55f0d5[_0x6557('0x1bc')];var _0x457e9a=Math[_0x6557('0x1bd')](_0x55f0d5['erlangCalls']*_0x55f0d5[_0x6557('0x58')]*_0x55f0d5['predictiveIntervalHitRate']*_0x55f0d5['predictiveIntervalMultiplicativeFactor']);if(_[_0x6557('0x3c')](_0x55f0d5[_0x6557('0x23')])){if(!_[_0x6557('0x3c')](_0x55f0d5[_0x6557('0x60')])){_0x55f0d5[_0x6557('0x60')]=undefined;loggerPredictive['error'](_0x6557('0x1be'),_0x6557('0x1bf'));}if(!_[_0x6557('0x3c')](_0x55f0d5[_0x6557('0x62')])){loggerPredictive[_0x6557('0x64')]('[startMethodPredictive][StartProgressive]',_0x6557('0x1c0'));clearInterval(_0x55f0d5[_0x6557('0x62')]);_0x55f0d5[_0x6557('0x62')]=undefined;}_0x55f0d5['startProgressive']=moment()[_0x6557('0x3f')]('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive[_0x6557('0x46')](_0x55f0d5[_0x6557('0x41')],_0x6557('0x1c1'),_0x55f0d5[_0x6557('0x23')]);this[_0x6557('0xb5')](_0x55f0d5,0x1);}else if(ifInterval(_0x55f0d5[_0x6557('0x1c2')],_0x55f0d5[_0x6557('0x23')])){this['handlePower'](_0x55f0d5,0x1);loggerPredictiveCalls[_0x6557('0x46')](_0x6557('0x1c3'),_0x55f0d5[_0x6557('0x23')],_0x55f0d5[_0x6557('0x41')]);_0x55f0d5[_0x6557('0x56')]=0x0;_0x55f0d5[_0x6557('0xd3')]=0x0;}else if(_0x3ad61d<_0x394e6d&&_0x55f0d5['dialPredictiveOptimization']===_0x6557('0x1c4')){clearPredictiveAttributes(_0x55f0d5);loggerPredictive[_0x6557('0x46')]('[stopMethodPredictive][ReStartProgressive][ExceededDropDay]',_0x6557('0x1c5'),_0x394e6d,_0x6557('0x23'),_0x55f0d5[_0x6557('0x41')]);}else if(_0x457e9a<_0x55f0d5[_0x6557('0xd3')]&&_0x55f0d5[_0x6557('0x1c6')]===_0x6557('0x1c4')){clearPredictiveAttributes(_0x55f0d5);loggerPredictive[_0x6557('0x46')](_0x6557('0x1c7'),_0x6557('0x1c8'),_0x457e9a,'Drop\x20in\x20this\x20interval',_0x55f0d5[_0x6557('0xd3')],_0x6557('0x23'),_0x55f0d5['name']);}else if(!ifInterval(_0x55f0d5[_0x6557('0x1c2')],_0x55f0d5['startProgressive'])&&_[_0x6557('0x3c')](_0x55f0d5[_0x6557('0x60')])&&!_[_0x6557('0x3c')](_0x55f0d5[_0x6557('0x23')])){_0x55f0d5['startPredictive']=moment()['format'](_0x6557('0xc8'));loggerPredictive['info'](_0x55f0d5[_0x6557('0x41')],_0x6557('0x1c9'),_0x55f0d5[_0x6557('0x60')]);hopperUtils[_0x6557('0x1ca')](_0x55f0d5['dialPredictiveInterval'])[_0x6557('0x3a')](this[_0x6557('0x1cb')](_0x55f0d5))['then'](mergeDataErlangB(_0x55f0d5))['then'](this['startMethodPredictive'](_0x55f0d5))[_0x6557('0xa1')](loggerCatchPredictive(_0x6557('0x1cc'),_0x55f0d5));}else if(!ifInterval(_0x55f0d5[_0x6557('0x1c2')],_0x55f0d5[_0x6557('0x60')])){_0x55f0d5[_0x6557('0xd3')]=0x0;_0x55f0d5[_0x6557('0x60')]=moment()[_0x6557('0x3f')](_0x6557('0xc8'));loggerPredictive[_0x6557('0x46')](_0x55f0d5[_0x6557('0x41')],_0x6557('0x1cd'),_0x55f0d5[_0x6557('0x60')]);clearInterval(_0x55f0d5[_0x6557('0x62')]);_0x55f0d5[_0x6557('0x62')]=undefined;hopperUtils['avgHandleTime'](_0x55f0d5[_0x6557('0x1c2')])[_0x6557('0x3a')](this[_0x6557('0x1cb')](_0x55f0d5))[_0x6557('0x3a')](mergeDataErlangB(_0x55f0d5))[_0x6557('0x3a')](this[_0x6557('0x1ce')](_0x55f0d5))['catch'](loggerCatchPredictive(_0x6557('0x1cf'),_0x55f0d5));}else if(_0x55f0d5[_0x6557('0x1d0')]&&_0x15278d<_0x55f0d5[_0x6557('0x1d0')]-_0x341ec3){clearPredictiveAttributes(_0x55f0d5);loggerPredictive[_0x6557('0x46')](_0x55f0d5[_0x6557('0x41')],'switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',_0x15278d,')\x20are\x20less\x20than\x20threshold\x20(',_0x55f0d5[_0x6557('0x1d0')],'-',_0x341ec3,'=',_0x55f0d5[_0x6557('0x1d0')]-_0x341ec3,')');}else if(_0x55f0d5[_0x6557('0x1d0')]&&_0x15278d>_0x55f0d5['predictiveIntervalAvailable']+_0x4b4b79){clearPredictiveAttributes(_0x55f0d5);loggerPredictive[_0x6557('0x46')](_0x55f0d5[_0x6557('0x41')],_0x6557('0x1d1'),_0x15278d,_0x6557('0x1d2'),_0x55f0d5[_0x6557('0x1d0')],'+',_0x4b4b79,'=',_0x55f0d5[_0x6557('0x1d0')]+_0x4b4b79,')');}};Dialer[_0x6557('0x16')][_0x6557('0x1cb')]=function(_0x479134){var _0x33da41=this;return function(_0x3aa297){return new Promise(function(_0x3b91d1,_0x5582cb){_[_0x6557('0x5c')](_0x479134,_0x3aa297[0x0]);if(checkGetDataPredictive(_0x3aa297[0x0])){var _0x58554a=_0x479134[_0x6557('0x1d0')]=_0x479134[_0x6557('0x1bc')]+_0x479134[_0x6557('0x1bb')];var _0x18fbb9=_0x479134['dialPredictiveInterval']*0x3c;var _0x5d3ade=_0x3aa297[0x0][_0x6557('0x50')]+_0x3aa297[0x0][_0x6557('0x4d')];var _0x41c344=(_0x3aa297[0x0][_0x6557('0x1d3')]+_0x3aa297[0x0][_0x6557('0x49')]+_0x3aa297[0x0][_0x6557('0x4b')])/_0x3aa297[0x0]['predictiveIntervalTotalCalls'];_0x479134[_0x6557('0x1d4')]=_0x41c344>0x0?_0x41c344:0x1;switch(_0x479134[_0x6557('0x1c6')]){case _0x6557('0x1c4'):var _0x2f333a=_0x479134[_0x6557('0x1b7')]/0x64;return _0x33da41[_0x6557('0x1d5')](_0x58554a,_0x18fbb9,_0x5d3ade,_0x41c344,_0x2f333a)['then'](function(_0x94ba38){return _0x3b91d1(_0x94ba38);});case _0x6557('0x1d6'):var _0x4e7492=_0x479134[_0x6557('0x1b7')]/0x64;return _0x33da41[_0x6557('0x1d7')](_0x58554a,_0x18fbb9,_0x5d3ade,_0x41c344,_0x4e7492)[_0x6557('0x3a')](function(_0x4b971a){return _0x3b91d1(_0x4b971a);});default:return _0x5582cb(msgResponse(_0x6557('0x1d8'),_0x6557('0x96'),'Unknown\x20Predictive'));}}else{return _0x5582cb(msgResponse('[getDataPredictive]',_0x6557('0x96'),_0x6557('0x1d9')));}});};};Dialer[_0x6557('0x16')][_0x6557('0x1da')]=function(_0x3b1b0e){var _0xb34fb1=this;return function(_0x59e6b1){return new Promise(function(_0x4697d7,_0x5a0148){_[_0x6557('0x5c')](_0x3b1b0e,_0x59e6b1[0x0]);if(checkGetDataPredictive(_0x59e6b1[0x0])){loggerPredictive['info'](JSON['stringify'](_0x59e6b1[0x0]));if(_0x3b1b0e[_0x6557('0x1c6')]==='dropRate'){return _0xb34fb1['getVoiceQueueRtPauses'](_0x3b1b0e['id'])[_0x6557('0x3a')](function(_0x1c1147){var _0x189bae=_0x3b1b0e[_0x6557('0x1db')]-_0x1c1147[0x0][_0x6557('0x1dc')];var _0x16e9d9=_0x3b1b0e['dialPredictiveInterval']*0x3c;var _0x59c083=_0x59e6b1[0x0][_0x6557('0x50')]+_0x59e6b1[0x0][_0x6557('0x4d')];var _0x2caa38=(_0x59e6b1[0x0]['predictiveIntervalAnsweredCalls']+_0x59e6b1[0x0][_0x6557('0x49')]+_0x59e6b1[0x0][_0x6557('0x4b')])/_0x59e6b1[0x0][_0x6557('0x1dd')];var _0x448869=_0x3b1b0e['dialPredictiveOptimizationPercentage']/0x64;_0x3b1b0e[_0x6557('0x1de')]=_0x1c1147[0x0]['outboundQueuePauses']||0x0;_0x3b1b0e['predictiveIntervalHitRate']=_0x2caa38>0x0?_0x2caa38:0x1;return _0xb34fb1[_0x6557('0x1d5')](_0x189bae,_0x16e9d9,_0x59c083,_0x2caa38,_0x448869);})[_0x6557('0x3a')](function(_0x2c6310){return _0x4697d7(_0x2c6310);})[_0x6557('0xa1')](function(_0x447ade){return _0x5a0148(msgResponse('[CatchErlangB]',_0x6557('0x96'),JSON['stringify'](_0x447ade)));});}if(_0x3b1b0e[_0x6557('0x1c6')]===_0x6557('0x1d6')){return _0xb34fb1['getVoiceQueueRtPauses'](_0x3b1b0e['id'])['then'](function(_0x2fb6cf){var _0x56c14=_0x3b1b0e['loggedIn']-_0x2fb6cf[0x0][_0x6557('0x1dc')];var _0x32eafe=_0x3b1b0e['dialPredictiveInterval']*0x3c;var _0x2b1dc8=_0x59e6b1[0x0][_0x6557('0x50')]+_0x59e6b1[0x0][_0x6557('0x4d')];var _0x99b783=(_0x59e6b1[0x0][_0x6557('0x1d3')]+_0x59e6b1[0x0][_0x6557('0x49')]+_0x59e6b1[0x0][_0x6557('0x4b')])/_0x59e6b1[0x0][_0x6557('0x1dd')];var _0x1d2edc=_0x3b1b0e[_0x6557('0x1b7')]/0x64;_0x3b1b0e[_0x6557('0x1de')]=_0x2fb6cf[0x0][_0x6557('0x1dc')]||0x0;_0x3b1b0e[_0x6557('0x1d4')]=_0x99b783>0x0?_0x99b783:0x1;return _0xb34fb1[_0x6557('0x1d7')](_0x56c14,_0x32eafe,_0x2b1dc8,_0x99b783,_0x1d2edc);})[_0x6557('0x3a')](function(_0x53a26b){return _0x4697d7(_0x53a26b);})['catch'](function(_0x1c27e2){return _0x5a0148(msgResponse('[CatchErlangB]',_0x6557('0x96'),JSON['stringify'](_0x1c27e2)));});}}else{return _0x5a0148(msgResponse('[getDataPredictive]',_0x6557('0x96'),_0x6557('0x1d9')));}});};};Dialer[_0x6557('0x16')][_0x6557('0x1ce')]=function(_0x3e9318){var _0x4a1ca4=this;return function(){var _0x33f3a1=0x0;var _0x4778ee=Math['floor'](_0x3e9318['erlangCallToSecond']*0x3e8);if(_0x4778ee>0x0){_0x4778ee=_0x4778ee<0x64?0x64:_0x4778ee;loggerPredictive[_0x6557('0x46')](_0x3e9318[_0x6557('0x41')],_0x6557('0x1df'),_0x4778ee,_0x6557('0x1e0'));_0x3e9318['handlePredictive']=setInterval(function(){_0x4a1ca4[_0x6557('0x62')](_0x3e9318);loggerPredictiveCalls[_0x6557('0x46')](_0x6557('0x1e1'),_0x33f3a1+=0x1);},_0x4778ee);}else{loggerPredictive['info'](_0x3e9318['name'],_0x6557('0x1e2'));}};};Dialer['prototype'][_0x6557('0x1e3')]=function(_0x4b9350,_0x3f3955){var _0x29dee6=this;return function(_0x2904e9){if(_[_0x6557('0x43')](_0x2904e9)){if(_[_0x6557('0xfc')](_0x3f3955[_0x6557('0x153')])||!_0x3f3955[_0x6557('0x1e4')]){if(_0x4b9350['dialMethod']===_0x6557('0x1e5')){_0x4b9350['queueStatusComplete']=_[_0x6557('0x3c')](_0x4b9350['queueStatusComplete'])?!![]:_0x4b9350[_0x6557('0x6f')];var _0x26c474=uuid['v4']();_0x29dee6[_0x6557('0x20')][_0x26c474]=new Action(_0x4b9350,_0x3f3955,_0x26c474);loggerBooked['info']('[booked][checkContactBlack]',_0x26c474,_0x6557('0x1e6'),JSON[_0x6557('0x72')](_0x4b9350['queueStatusComplete']),_0x6557('0x1e7'),_0x4b9350[_0x6557('0x41')]);if(_0x4b9350[_0x6557('0x6f')]){_0x4b9350[_0x6557('0x6f')]=![];_0x29dee6[_0x6557('0x25')][_0x29dee6['actions'][_0x26c474]['queue']]=[];ami[_0x6557('0x9d')]({'actionid':_0x26c474,'action':'queuestatus','queue':_0x4b9350[_0x6557('0x41')]})[_0x6557('0xa1')](function(){_0x29dee6['updateOriginated'](_0x4b9350);hopperUtils[_0x6557('0xdf')]({'active':![],'ContactId':_0x29dee6[_0x6557('0x20')][_0x26c474]['ContactId'],'ListId':_0x29dee6[_0x6557('0x20')][_0x26c474][_0x6557('0xe3')],'VoiceQueueId':_0x29dee6[_0x6557('0x20')][_0x26c474][_0x6557('0xe4')]||undefined,'CampaignId':_0x29dee6[_0x6557('0x20')][_0x26c474]['CampaignId']||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x1e8')));delete _0x29dee6[_0x6557('0x20')][_0x26c474];});}else{loggerBooked[_0x6557('0x46')](_0x6557('0x1e9'),JSON[_0x6557('0x72')](_0x4b9350[_0x6557('0x6f')]),_0x6557('0x1e7'),_0x4b9350[_0x6557('0x41')]);_0x29dee6[_0x6557('0xc6')](_0x4b9350);hopperUtils[_0x6557('0xdf')]({'active':![],'ContactId':_0x29dee6[_0x6557('0x20')][_0x26c474][_0x6557('0xe2')],'ListId':_0x29dee6[_0x6557('0x20')][_0x26c474]['ListId'],'VoiceQueueId':_0x29dee6['actions'][_0x26c474]['VoiceQueueId']||undefined,'CampaignId':_0x29dee6['actions'][_0x26c474]['CampaignId']||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x1e8')));delete _0x29dee6[_0x6557('0x20')][_0x26c474];}}else{return _0x29dee6[_0x6557('0x156')](_0x4b9350,_0x3f3955);}}else{if(utils['getSeconds'](undefined,_0x3f3955['scheduledat'])<_0x4b9350[_0x6557('0x1ea')]*0x3c){if(_0x3f3955[_0x6557('0x154')]&&!_0x3f3955[_0x6557('0x154')]['voicePause']){_0x29dee6[_0x6557('0x1a')]['run'](_0x3f3955['id'])[_0x6557('0x19')](function(){_0x29dee6['updateOriginated'](_0x4b9350);});}else{hopperUtils[_0x6557('0x1eb')]({'active':![]},_0x3f3955['id'],0x1)[_0x6557('0x19')](function(){_0x29dee6['updateOriginated'](_0x4b9350);});}}else{_0x4b9350[_0x6557('0x1ec')]+=0x1;_0x29dee6[_0x6557('0xc6')](_0x4b9350);if(_0x4b9350[_0x6557('0x1ed')]){hopperUtils[_0x6557('0xdf')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x3f3955[_0x6557('0xe2')],'ListId':_0x3f3955['ListId'],'VoiceQueueId':_0x3f3955['VoiceQueueId']||undefined,'CampaignId':_0x3f3955[_0x6557('0xf1')]||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x1ee')));hopperUtils[_0x6557('0xcb')](createObjHistory(_0x4b9350,_0x3f3955,utils[_0x6557('0x69')][_0x6557('0x1ef')],0x17,'RecallInQueue'))[_0x6557('0xa1')](loggerCatch('[Originate][HistoryDialRecallInQueue][historyCatch]'));}else{_0x29dee6[_0x6557('0x11b')](createObjHistory(_0x4b9350,_0x3f3955,utils[_0x6557('0x69')]['RECALL_TIMEOUT'],0x16,_0x6557('0x1f0')),_0x6557('0x1f1'),_0x6557('0x1f2'));}}}}else{_0x4b9350[_0x6557('0x1f3')]+=0x1;_0x29dee6[_0x6557('0x11b')](createObjHistory(_0x4b9350,_0x3f3955,utils[_0x6557('0x69')][_0x6557('0x1f4')],0xd,_0x6557('0x1f5')),_0x6557('0x1f6'),_0x6557('0x1f7'));throw _0x6557('0x1f8');}};};Dialer[_0x6557('0x16')][_0x6557('0x155')]=function(_0x1ed555){var _0x485a88=this;var _0x302a2f=_0x1ed555[_0x6557('0x1f9')]-_0x1ed555[_0x6557('0x7e')];emitCampaignSummary(_0x1ed555);if(_0x302a2f>0x0&&_0x1ed555[_0x6557('0x1fa')]==0x0){if(_0x302a2f>this[_0x6557('0x1f')]){_0x302a2f=this[_0x6557('0x1f')];}_0x1ed555[_0x6557('0x1fa')]=0x1;hopperUtils[_0x6557('0x1fb')](_0x1ed555,_0x302a2f)[_0x6557('0x3a')](function(_0x13b0dc){_0x1ed555[_0x6557('0x1fa')]=0x0;if(_0x13b0dc){if(!utils[_0x6557('0x1fc')](_0x13b0dc)){_0x1ed555['message']=utils[_0x6557('0x69')][_0x6557('0x1fd')];logger['info'](_0x6557('0x1fe')+_0x1ed555['name']);}else{_0x1ed555[_0x6557('0x7e')]+=_0x13b0dc[_0x6557('0x9c')];_0x1ed555[_0x6557('0x68')]=utils[_0x6557('0x69')][_0x6557('0x1ff')];for(var _0x2e224e=0x0;_0x2e224e<_0x13b0dc[_0x6557('0x9c')];_0x2e224e+=0x1){_0x1ed555[_0x6557('0x200')]+=0x1;if(_[_0x6557('0xfc')](_0x13b0dc[_0x2e224e])||_[_0x6557('0xfc')](_0x13b0dc[_0x2e224e][_0x6557('0x201')])||_[_0x6557('0xfc')](_0x13b0dc[_0x2e224e]['phone'])){_0x485a88[_0x6557('0x151')](_0x6557('0x202'),_0x1ed555,_0x13b0dc[_0x2e224e]);}else{hopperUtils[_0x6557('0x203')](_[_0x6557('0x73')](_0x13b0dc[_0x2e224e],[_0x6557('0xf1'),_0x6557('0x159')]))['then'](_0x485a88['checkContactBlack'](_0x1ed555,_0x13b0dc[_0x2e224e]))[_0x6557('0xa1')](_0x485a88[_0x6557('0x150')](_0x6557('0x204'),_0x1ed555));}}}}})[_0x6557('0xa1')](loggerGetContactDialer(_0x6557('0x205'),_0x1ed555,_0x302a2f));}};Dialer[_0x6557('0x16')][_0x6557('0xb5')]=function(_0x2a41b1,_0x1d5fbc){var _0x295294=this;var _0x312ef5=[];if(_0x1d5fbc<0x1||_0x2a41b1['dialMethod']===_0x6557('0x1e5')){_0x1d5fbc=0x1;}var _0x2d3f37=Math['floor'](_0x2a41b1[_0x6557('0x1bb')]*_0x1d5fbc)-_0x2a41b1['originated'];if(_0x2a41b1[_0x6557('0x206')]>0x0){var _0x26ca26=_0x2a41b1[_0x6557('0x206')]-_0x2a41b1[_0x6557('0x7e')]-_0x2a41b1[_0x6557('0x1bc')]-_0x2a41b1[_0x6557('0x13b')];if(_0x2d3f37>_0x26ca26){_0x2d3f37=_0x26ca26;}}if(_0x2d3f37>0x0&&_0x2a41b1[_0x6557('0x1fa')]==0x0){if(_0x2a41b1[_0x6557('0xb3')]===_0x6557('0x1e5')){_0x2d3f37=0x1;}if(_0x2d3f37>this[_0x6557('0x1f')]){_0x2d3f37=this['maxNumberOriginate'];}for(var _0x59aaa2 in this[_0x6557('0x1d')]){if(typeof this[_0x6557('0x1d')][_0x59aaa2]!==_0x6557('0xac')){if(this['agents'][_0x59aaa2][_0x6557('0x6b')]===_0x6557('0x207')&&this[_0x6557('0x1d')][_0x59aaa2][_0x6557('0x88')]===_0x6557('0x87')){_0x312ef5['push'](this['agents'][_0x59aaa2]['id']);}}}_0x2a41b1['temp']=0x1;hopperUtils['getContactDialer'](_0x2a41b1,_0x312ef5,_0x2d3f37)[_0x6557('0x3a')](function(_0x55dc05){_0x2a41b1['temp']=0x0;if(_0x55dc05){if(!utils['checkContactEmpty'](_0x55dc05)){hopperUtils[_0x6557('0x208')](_0x2a41b1)['then'](sendMessageReschedule(_0x2a41b1))['catch'](loggerCatch(_0x6557('0x209')));}else{_0x2a41b1[_0x6557('0x7e')]+=_0x55dc05['length'];_0x2a41b1[_0x6557('0x68')]=_0x2a41b1[_0x6557('0xb3')]===_0x6557('0x1e5')?utils[_0x6557('0x69')][_0x6557('0x162')]:utils['CAMPAIGN_STATUS'][_0x6557('0x1ff')];for(var _0x44cf12=0x0;_0x44cf12<_0x55dc05[_0x6557('0x9c')];_0x44cf12+=0x1){if(_[_0x6557('0xfc')](_0x55dc05[_0x44cf12])||_[_0x6557('0xfc')](_0x55dc05[_0x44cf12]['Contact'])||_[_0x6557('0xfc')](_0x55dc05[_0x44cf12][_0x6557('0x159')])){_0x295294['emptyContact']('[actionOriginate]\x20',_0x2a41b1,_0x55dc05[_0x44cf12]);}else{hopperUtils[_0x6557('0x20a')](_[_0x6557('0x73')](_0x55dc05[_0x44cf12],[_0x6557('0xe4'),_0x6557('0x159')]))[_0x6557('0x3a')](_0x295294[_0x6557('0x1e3')](_0x2a41b1,_0x55dc05[_0x44cf12]))[_0x6557('0xa1')](_0x295294[_0x6557('0x150')](_0x6557('0x202'),_0x2a41b1));}}}}})['catch'](loggerGetContactDialer(_0x6557('0x20b'),_0x2a41b1,_0x2d3f37));}};Dialer['prototype'][_0x6557('0x62')]=function(_0x5ef54d){if(_0x5ef54d['dialLimitQueue']>0x0){var _0x4e9ba9=_0x5ef54d[_0x6557('0x206')]-_0x5ef54d[_0x6557('0x7e')]-_0x5ef54d[_0x6557('0x1bc')];if(_0x4e9ba9>0x0&&_0x5ef54d['temp']==0x0){this[_0x6557('0x20c')](_0x5ef54d);}else{loggerPredictiveCalls[_0x6557('0x46')]('[handlePredictive][limitChannel]');}}else{this[_0x6557('0x20c')](_0x5ef54d);}};Dialer[_0x6557('0x16')][_0x6557('0x20c')]=function(_0x8092ad){var _0x2a874d=this;var _0x96700b=[];_0x8092ad[_0x6557('0x7e')]+=0x1;for(var _0x57542f in this[_0x6557('0x1d')]){if(typeof this[_0x6557('0x1d')][_0x57542f]!==_0x6557('0xac')){if(this['agents'][_0x57542f][_0x6557('0x6b')]===_0x6557('0x207')&&this['agents'][_0x57542f][_0x6557('0x88')]==='reachable'){_0x96700b[_0x6557('0x100')](this[_0x6557('0x1d')][_0x57542f]['id']);}}}_0x8092ad[_0x6557('0x1fa')]=0x1;return this[_0x6557('0x20d')](_0x8092ad['id'],_0x96700b,0x1,_0x8092ad[_0x6557('0x20e')],_0x8092ad)[_0x6557('0x3a')](function(_0x1848af){_0x8092ad['temp']=0x1;if(_0x1848af){if(!utils['checkContactEmpty'](_0x1848af)){utils['checkContactLowerLimitOriginate'](_0x8092ad,0x1,0x0);return hopperUtils['countReScheduled'](_0x8092ad)['then'](sendMessageReschedule(_0x8092ad))['catch'](loggerCatch(_0x6557('0x209')));}else{_0x8092ad['message']=utils['CAMPAIGN_STATUS'][_0x6557('0x1ff')];if(_[_0x6557('0xfc')](_0x1848af[0x0])||_[_0x6557('0xfc')](_0x1848af[0x0][_0x6557('0x201')])||_[_0x6557('0xfc')](_0x1848af[0x0][_0x6557('0x159')])){_0x2a874d['emptyContact']('[actionOriginate]\x20',_0x8092ad,_0x1848af[0x0]);}else{return hopperUtils[_0x6557('0x20a')](_[_0x6557('0x73')](_0x1848af[0x0],[_0x6557('0xe4'),_0x6557('0x159')]))[_0x6557('0x3a')](_0x2a874d['checkContactBlack'](_0x8092ad,_0x1848af[0x0]))[_0x6557('0xa1')](_0x2a874d[_0x6557('0x150')](_0x6557('0x20f'),_0x8092ad));}}}})[_0x6557('0xa1')](loggerGetContactDialer(_0x6557('0x210'),_0x8092ad,0x1));};Dialer[_0x6557('0x16')][_0x6557('0x1d5')]=function(_0x280406,_0xea2716,_0x29b2f7,_0x48b567,_0x1cbece,_0x565a2a){loggerPredictive[_0x6557('0x46')]('--------\x20Drop\x20Rate\x20--------');loggerPredictive[_0x6557('0x46')](_0x6557('0x211'),_0x280406);loggerPredictive[_0x6557('0x46')]('Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0xea2716);loggerPredictive[_0x6557('0x46')]('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',_0x29b2f7);loggerPredictive['info']('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',_0x48b567);loggerPredictive[_0x6557('0x46')](_0x6557('0x212'),_0x1cbece);loggerPredictive['info'](_0x6557('0x4f'));return new Promise(function(_0x2591f6,_0x15ed17){if(_0x280406<=0x0||isNaN(_0x280406)){return _0x15ed17(msgResponse('[abandonmentRate]',_0x6557('0x84'),'m\x20=\x20'+_0x280406));}if(_0x29b2f7<=0x0||isNaN(_0x29b2f7)){return _0x15ed17(msgResponse(_0x6557('0x213'),_0x6557('0x84'),_0x6557('0x214')+_0x29b2f7));}if(_0x48b567<=0x0||isNaN(_0x48b567)){return _0x15ed17(msgResponse(_0x6557('0x213'),_0x6557('0x84'),_0x6557('0x215')+_0x48b567));}if(_0xea2716<=0x0||isNaN(_0xea2716)){return _0x15ed17(msgResponse(_0x6557('0x213'),_0x6557('0x84'),'interval\x20=\x20'+_0xea2716));}if(_0x1cbece<=0x0||isNaN(_0x1cbece)){return _0x15ed17(msgResponse(_0x6557('0x213'),_0x6557('0x84'),_0x6557('0x216')+_0x1cbece));}_0x565a2a=_0x565a2a||0x0;var _0x295b13=0x1/_0x29b2f7;var _0x15bd2b=0x0;var _0x1f8ae7=0x0;var _0x27e244=0x0;var _0x1f66f7=0x0;for(var _0x304606=0x0;_0x27e244<_0x1cbece;_0x304606+=0x1){_0x1f8ae7=_0x304606/_0xea2716;_0x15bd2b=(_0x48b567*_0x1f8ae7+_0x565a2a)/_0x295b13;_0x27e244=utils[_0x6557('0x217')](_0x15bd2b,_0x280406);_0x1f66f7=_0x15bd2b/_0x280406*(0x1-utils['erlangb'](_0x15bd2b,_0x280406));}return _0x2591f6({'erlangCalls':_0x304606,'erlangCallToSecond':_0xea2716/_0x304606,'erlangAbandonmentRate':_0x27e244,'erlangBusyFactor':_0x1f66f7});});};Dialer[_0x6557('0x16')]['busyFactor']=function(_0x46d488,_0x5adb40,_0xa9dc02,_0x5ceb7f,_0x2c19e9,_0x3dbd2d){loggerPredictive[_0x6557('0x46')](_0x6557('0x218'));loggerPredictive['info']('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',_0x46d488);loggerPredictive[_0x6557('0x46')](_0x6557('0x219'),_0x5adb40);loggerPredictive[_0x6557('0x46')](_0x6557('0x21a'),_0xa9dc02);loggerPredictive[_0x6557('0x46')]('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',_0x5ceb7f);loggerPredictive[_0x6557('0x46')]('Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x2c19e9);loggerPredictive[_0x6557('0x46')](_0x6557('0x4f'));return new Promise(function(_0x24b149,_0x4299b2){if(_0x46d488<=0x0||isNaN(_0x46d488)){return _0x4299b2(msgResponse('[busyFactor]',_0x6557('0x84'),'m\x20=\x20'+_0x46d488));}if(_0xa9dc02<=0x0||isNaN(_0xa9dc02)){return _0x4299b2(msgResponse('[busyFactor]',_0x6557('0x84'),_0x6557('0x214')+_0xa9dc02));}if(_0x5ceb7f<=0x0||isNaN(_0x5ceb7f)){return _0x4299b2(msgResponse(_0x6557('0x21b'),_0x6557('0x84'),_0x6557('0x215')+_0x5ceb7f));}if(_0x5adb40<=0x0||isNaN(_0x5adb40)){return _0x4299b2(msgResponse(_0x6557('0x21b'),'Error',_0x6557('0x21c')+_0x5adb40));}if(_0x2c19e9<=0x0||isNaN(_0x2c19e9)){return _0x4299b2(msgResponse('[busyFactor]',_0x6557('0x84'),_0x6557('0x21d')+_0x2c19e9));}_0x3dbd2d=_0x3dbd2d||0x0;var _0x586b60=0x1/_0xa9dc02;var _0x1adb30=0x0;var _0x6ee738=0x0;var _0x4d5c7c=0x0;var _0x46b11e=0x0;for(var _0x3b3f97=0x0;_0x46b11e<_0x2c19e9;_0x3b3f97+=0x1){_0x6ee738=_0x3b3f97/_0x5adb40;_0x1adb30=(_0x5ceb7f*_0x6ee738+_0x3dbd2d)/_0x586b60;_0x4d5c7c=utils[_0x6557('0x217')](_0x1adb30,_0x46d488);_0x46b11e=_0x1adb30/_0x46d488*(0x1-utils[_0x6557('0x217')](_0x1adb30,_0x46d488));}return _0x24b149({'erlangCalls':_0x3b3f97,'erlangCallToSecond':_0x5adb40/_0x3b3f97,'erlangAbandonmentRate':_0x4d5c7c,'erlangBusyFactor':_0x46b11e});});};module[_0x6557('0x21e')]=Dialer;
\ No newline at end of file