Built motion from commit 0d14f64c.|2.6.34
[motion2.git] / server / services / ami / dialer / index.js
index c725a53..bb49e59 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8bb2=['[syncAgentComplete][createHistory][11]','reason\x2011\x20abandoned','outboundRejectCallsDay','agentreject','[syncAgentComplete][createHistory][20]','reason\x2020\x20agentreject','[syncAgentComplete][createHistory][?]','Global','[moveContactManagedDialer][0]','contact\x20not\x20moved','dialPredictiveOptimizationPercentage','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','round','predictiveIntervalMinThreshold','available','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','check\x20predictive\x20is\x20not\x20undefine','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','[startMethodPredictive][StartProgressive][Loop]','dialPredictiveOptimization','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','dialPredictiveInterval','getDataPredictive','startMethodPredictive','recalculate\x20predictive\x20at','Predictive\x20for\x20every\x20interval','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20more\x20than\x20threshold\x20(','Unknown\x20Predictive','[getDataPredictive]','check\x20failure','loggedIn','outboundQueuePauses','predictiveIntervalPauses','[CatchErlangB]','agentBusyFactor','milliseconds','[handlePredictive]','checkContactBlack','queuestatus','[checkContactBlack]','[unlockOriginate][syncQueueStatusComplete]','Queue:\x20','dialRecallMeTimeout','voicePause','unlockContact','outboundReCallsDay','QUEUE_RECALL','RecallInQueue','[Originate][HistoryDialRecallInQueue][historyCatch]','RECALL_TIMEOUT','RecallFailedTimeout','outboundBlacklistCallsDay','BLACKLIST','[Originate][MoveBlacklist]','inBlackList','limitCalls','temp','getContactDialerIvr','NO_AVAILABLE_CONTACTS','[getContactCampaign2][Empty]','RUNNING','ivrTotalCallsDays','Contact','[actionOriginate]\x20','[actionOriginateIvr]','floor','dialLimitQueue','not_inuse','checkContactEmpty','countReScheduled','checkIsBlackList','[actionOriginate]','[handlePredictive][limitChannel]','tryOriginatePredictive','getContactDialer','dialOrderByScheduledAt','checkContactLowerLimitOriginate','[actionOriginatePredictive]','[getContactCampaign2]','abandonmentRate','--------\x20Drop\x20Rate\x20--------','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[abandonmentRate]','m\x20=\x20','p\x20=\x20','Amax\x20=\x20','erlangb','busyFactor','----\x20Agent\x20Busy\x20Factor\x20----','Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[busyFactor]','Ts\x20=\x20','Umin\x20=\x20','exports','util','lodash','moment','./utils','./utils/hopper','../preview/util/util','../../../config/environment/','../../../config/logger','dialer','booked','predictive','predictiveCalls','syncQueueSummary','redis','defaults','localhost','socket.io-emitter','../rpc/voiceQueueRt','../rpc/setting','../rpc/interval','./models/action','./models/history','./models/final','./models/queueCallerAbandon','./models/hangup','XCALLY_IP_AGI','127.0.0.1','prototype','enqueue','tail','finally','sequence','preview','agents','trunks','maxNumberOriginate','channels','uniqueId','optionPredictive','startProgressive','ivrOriginated','queueBooked','queueBookedRR','queuesSummary','agentconnect','syncAgentConnect','bind','queuecallerabandon','syncQueueCallerAbandon','originateresponse','syncOriginateResponse','syncAgentComplete','custom:queuesummary','custom:queuesummarycomplete','syncNewExten','varset','syncVarSet','queuemember','syncQueueStatusComplete','loopCampaigns','loopClearZombieChannels','getSettings','previewRecallmeReminderInterval','type','outbound','debug','inspect','voice:queue:%s','name','isEmpty','-----\x20Stats\x20Predictive\x20---','info','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','---------------------------','isUndefined','Avg\x20Talk\x20Time\x20is\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','erlangBusyFactor','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','getSeconds','startProgressive\x20value\x20cleared','startPredictive','startPredictive\x20value\x20cleared','handlePredictive','handlePredictive\x20interval\x20cleared','error','stack','contactsRescheduled','CONTACTS_RESCHEDULED','[getContactDialer2][ReScheduled]','message','CAMPAIGN_STATUS','[getContactDialer2][Empty]','state','statedesc','endtime','starttime','queueStatusComplete','[unlockQueueStatus][undefined]','stringify','pick','Interval','NULL_INTERVAL','\x20INTERVAL_IS_NULL','INACTIVE','\x20NOT\x20Active','format','sendMessageOneNotActive','originated','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','is\x20not\x20active','DISACTIVED','Error','isTrunkReachable','active','reachable','status','checkIsTrunkReachable','Trunk','TRUNK_NOT_REACHABLE','\x20trunk\x20is\x20not\x20reachable','checkIfTime','ifTimeIvr','Intervals','ifTime','Failure','\x20Intervals\x20is\x20null\x20','timezones','UNKNOWN_TIMEZONE','length','push','Action','command','iftime\x20%s,%s','then','content','indexOf','true','catch','some','OVERTIME_GLOBAL_INTERVAL','OVERTIME_INTERVAL','[ifTime][promiseAll]','Global:\x20','\x20Interval\x20is\x20overtime:\x20','Timezone:\x20','resetActiveCalls','syncCampaigns','campaigns','undefined','isIVRCampaignActive','resolve','dialGlobalInterval','checkIfTimeIntervals','dialTimezone','launchHandleIvr','[syncCampaigns]','checkDialMethod','dialMethod','handlePower','power','dialPowerLevel','method\x20not\x20recognized','Dialer::ifTime()','Voice\x20Queue\x20%s\x20$s','intervalIftime','silly','Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:','isGlobal','AMI\x20IfTime','[ifTime][Action]','queue','uniqueid','ivr','voiceQueues','[syncAgentConnect]','answertime','outboundAnswerCallsDay','agent','agiafterat','dialQueueProject2','dialAgiAfterHangupAgent','YYYY-MM-DD\x20HH:mm:ss','[syncAgentComplete][createHistory]','moveContactManagedDialer','[syncAgentComplete]','decrementOriginate','[syncQueueCallerAbandon]','droptime','dialQueueTimeout','predictiveIntervalErlangCallsDroppedCalls','dropreason','countdropretry','dialDropRetryFrequency','verifyAdditionalPhones','voiceQueue','additional','dialDropMaxRetry','queueCallerAbandonCreateState','rescheduleContact','ContactId','ListId','VoiceQueueId','CampaignId','[rescheduleContact][Drop]','calleridname','calleridnum','[syncAgentComplete][createHistory][10]','swapAdditionalPhones','outboundDropCallsDayCallersExit','countabandonedretry','countglobal','dialAbandonedRetryFrequency','callAdditionalPhoneAfterMin','dialAbandonedMaxRetry','add','[rescheduleContact][Abandoned]','Abandoned','createHistory','actions','channel','syncQueueMember','actionid','strategy','roundrobin','isNil','paused','stateinterface','locked','rrmemory','merge','idHopper','run','[Catch][Preview][syncQueueStatusComplete]','[syncQueueStatusComplete]','_rr','unlockRR','[booked][RR]','Agent:\x20','contactAgent-idHopper:\x20','[booked][unlock]','[unlock][syncQueueStatusComplete]','[booked][unlock2]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','responsetime','getQueue','response','Success','[syncOriginateResponse]','callProgressDetecting','variable','amdstatus','exten','xcally-motion-dialer','dialAMDActive','value','HANGUP','[syncVarSet]','outboundAnswerAgiCallsDay','HangupInAMD','membername','AMD','emit','custom:amd','buildObj','amd','saveInDb','[syncHangupInAMD][createHistory]','[syncHangupInAMD]','[syncAgentComplete][createHistory][0]','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countmachineretry','countagentrejectretry','dialGlobalMaxRetry','reason19\x20machine....','dialMachineMaxRetry','createStateFinal','dialMachineRetryFrequency','minutes','[rescheduleContact][Machine]','[syncHangupInAMDIvr][createHistory]','MACHINE','Machine','reason\x2019\x20machine....','syncHangup','ivrAnswerCallsDay','[syncAgentCompleteIvr][createHistory]','[syncAgentCompleteIvr]','[syncHangupIvr][createHistory]','[syncHangupIvr]','dialQueueProject','[syncHangup]','AnswerAGI','AGI','[syncHangup2]','outboundUnknownCallsDay','cause-txt','Unknown','[syncHangup][createHistory]','running','isPreviewCampaign','statusMessage','getQueueCampaignStatusMessage','talking','pTalking','ACTIVE','queueSummaryCountersUpdated','updateReportFromOutboundQueue','[syncQueueSummary]','throttle','filter','dialPreviewRecallmeReminder','map','Agent','user:dialPreviewRecallReminder','checkPreviewRecallReminder','clearZombieChannels','[uniqueid]','[actions]','No\x20such\x20channel','[clearZombieChannels]','[Dialer][checkChannel]','[Dialer][checkChannel][ivr]','[getVoiceQueueRtPauses]\x20','emptyContact','notFound','UserId','[emptyContact][createHistory]','[emptyContact]','handlePreviewRecallNotifications','user:%s','handleIvr','actionOriginate','object','originate','phone','contact\x20is\x20undefine','getCaller','\x22agi://%s/square,%s\x22','NONE','isOutboundQueue','\x22%s,%s%s,,,%s\x22','dialQueueOptions','XMD-AMDINITIALSILENCE','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDAfterGreetingSilence','XMD-AMDTOTALANALYSISTIME','XMD-AMDMINWORDLENGTH','XMD-AMDBETWEENWORDSSILENCE','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','XMD-AMDSILENCETHRESHOLD','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','dialAMDMaximumWordLength','XMD-VOICEQUEUEID','XMD-CAMPAIGNID','setXMDContactVariables','callerid','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','dialOriginateCallerIdNumber','getCallerId','TrunkBackup','dialOriginateCallerIdName','XMD-ORIGINATECALLERIDNAME','originatecalleridname','extractCalleridName','dialPrefix','trim','dialCutDigit','substring','SIP/%s/%s%s','from-sip','dialOriginateTimeout','[originateError]:\x20%s','OriginateError','[originate][error]','originate\x20action\x20Error','checkRetriveMax','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialBusyMaxRetry','[rescheduleContact]\x20[Busy]','dialCongestionMaxRetry','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','[rescheduleContact][AgentReject]','[callProgressDetecting]','evt\x20is\x20undefine','reason','outboundNoSuchCallsDay','NoSuchNumber','nosuchnumber','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','NoAnswer','buildNoAnswerEventPayload','[syncAgentComplete][createHistory][3]','reason\x203\x20ringing\x20no\x20answer','stateGlobal','outboundBusyCallsDay','custom:agentbusy','busy','dialBusyRetryFrequency','reason\x205\x20busy','outboundCongestionCallsDay','Congestion','custom:agentcongestion','congestion','[syncAgentComplete][createHistory][8]','reason\x208\x20congestion'];(function(_0x39096d,_0x51f8a0){var _0x13da4f=function(_0x11e6b2){while(--_0x11e6b2){_0x39096d['push'](_0x39096d['shift']());}};_0x13da4f(++_0x51f8a0);}(_0x8bb2,0x69));var _0x28bb=function(_0x4fdcc0,_0x560a01){_0x4fdcc0=_0x4fdcc0-0x0;var _0xc0ce94=_0x8bb2[_0x4fdcc0];return _0xc0ce94;};'use strict';var util=require(_0x28bb('0x0'));var _=require(_0x28bb('0x1'));var uuid=require('uuid');var moment=require(_0x28bb('0x2'));var rr=require('rr');var Redis=require('ioredis');var utils=require(_0x28bb('0x3'));var hopperUtils=require(_0x28bb('0x4'));var ut=require(_0x28bb('0x5'));var config=require(_0x28bb('0x6'));var logger=require(_0x28bb('0x7'))(_0x28bb('0x8'));var loggerBooked=require(_0x28bb('0x7'))(_0x28bb('0x9'));var loggerPredictive=require(_0x28bb('0x7'))(_0x28bb('0xa'));var loggerPredictiveCalls=require(_0x28bb('0x7'))(_0x28bb('0xb'));var loggerSyncQueueSummary=require(_0x28bb('0x7'))(_0x28bb('0xc'));var ami=require('../ami');config[_0x28bb('0xd')]=_[_0x28bb('0xe')](config[_0x28bb('0xd')],{'host':_0x28bb('0xf'),'port':0x18eb});var io=require(_0x28bb('0x10'))(new Redis(config['redis']));var cmHopper=require('../rpc/cmHopper');var voiceQueueRt=require(_0x28bb('0x11'));var RpcSetting=require(_0x28bb('0x12'));var Interval=require(_0x28bb('0x13'));var Action=require(_0x28bb('0x14'));var History=require(_0x28bb('0x15'));var Final=require(_0x28bb('0x16'));var AgentComplete=require('./models/agentComplete');var QueueCallerAbandon=require(_0x28bb('0x17'));var Hangup=require(_0x28bb('0x18'));var ipAgi=process['env'][_0x28bb('0x19')]||_0x28bb('0x1a');var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence[_0x28bb('0x1b')][_0x28bb('0x1c')]=function(_0x598bbe){this[_0x28bb('0x1d')]=this[_0x28bb('0x1d')]?this['tail'][_0x28bb('0x1e')](_0x598bbe):_0x598bbe();};function Dialer(_0xee83dc,_0x2de3ba){this[_0x28bb('0x1f')]=new Sequence();this[_0x28bb('0x20')]=_0x2de3ba;this['voiceQueues']=_0xee83dc['voiceQueues'];this['campaigns']=_0xee83dc['campaigns'];this[_0x28bb('0x21')]=_0xee83dc['agents'];this[_0x28bb('0x22')]=_0xee83dc[_0x28bb('0x22')];this[_0x28bb('0x23')]=config[_0x28bb('0x23')]||0x2;this[_0x28bb('0x24')]={};this['actions']={};this['contactsId']={};this[_0x28bb('0x25')]={};this[_0x28bb('0x26')]={};this['startPredictive']={};this[_0x28bb('0x27')]={};this[_0x28bb('0x28')]={};this[_0x28bb('0x29')]={};this[_0x28bb('0x2a')]={};this[_0x28bb('0x2b')]={};ami['on'](_0x28bb('0x2c'),this[_0x28bb('0x2d')][_0x28bb('0x2e')](this));ami['on'](_0x28bb('0x2f'),this[_0x28bb('0x30')]['bind'](this));ami['on'](_0x28bb('0x31'),this[_0x28bb('0x32')][_0x28bb('0x2e')](this));ami['on']('agentcomplete',this[_0x28bb('0x33')][_0x28bb('0x2e')](this));ami['on'](_0x28bb('0x34'),this[_0x28bb('0xc')]['bind'](this));ami['on'](_0x28bb('0x35'),this['syncQueueSummaryComplete'][_0x28bb('0x2e')](this));ami['on']('hangup',this['syncHangup'][_0x28bb('0x2e')](this));ami['on']('newexten',this[_0x28bb('0x36')][_0x28bb('0x2e')](this));ami['on'](_0x28bb('0x37'),this[_0x28bb('0x38')][_0x28bb('0x2e')](this));ami['on'](_0x28bb('0x39'),this['syncQueueMember'][_0x28bb('0x2e')](this));ami['on']('queuestatuscomplete',this[_0x28bb('0x3a')][_0x28bb('0x2e')](this));this[_0x28bb('0x3b')]();this[_0x28bb('0x3c')]();RpcSetting[_0x28bb('0x3d')]()['then'](function(_0x12c3a1){previewRecallmeReminderInterval=_0x12c3a1[_0x28bb('0x3e')];});}function isNotNull(_0x563f89){return _0x563f89!==null&&!_['isUndefined'](_0x563f89);}function msgResponse(_0x50b19a,_0x2f9221,_0x3cb29c){return{'action':_0x50b19a,'response':_0x2f9221,'message':_0x3cb29c,'stack':_0x3cb29c};}function emit(_0x34c76e,_0x33b1d6,_0x5e775a){io['to'](_0x34c76e)['emit'](_0x33b1d6,_0x5e775a);}function emitOutboundVoiceQueueSummary(_0x456999){if(_0x456999[_0x28bb('0x3f')]===_0x28bb('0x40')){logger[_0x28bb('0x41')]('[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:',util[_0x28bb('0x42')](_0x456999,{'showHidden':![],'depth':null}));emit(util['format'](_0x28bb('0x43'),_0x456999[_0x28bb('0x44')]),'voice_queue:save',_0x456999);}}function checkGetDataPredictive(_0x20c0e5){if(isNotNull(_0x20c0e5)&&!_[_0x28bb('0x45')](_0x20c0e5)){loggerPredictive['info'](_0x28bb('0x46'));loggerPredictive[_0x28bb('0x47')]('Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x20c0e5[_0x28bb('0x48')]);loggerPredictive['info'](_0x28bb('0x49'),_0x20c0e5[_0x28bb('0x4a')]);loggerPredictive['info'](_0x28bb('0x4b'),_0x20c0e5[_0x28bb('0x4c')]);loggerPredictive[_0x28bb('0x47')](_0x28bb('0x4d'),_0x20c0e5[_0x28bb('0x4e')]);loggerPredictive[_0x28bb('0x47')]('AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x20c0e5[_0x28bb('0x4f')]);loggerPredictive[_0x28bb('0x47')](_0x28bb('0x50'),_0x20c0e5[_0x28bb('0x51')]);loggerPredictive[_0x28bb('0x47')](_0x28bb('0x52'));if(_0x20c0e5[_0x28bb('0x48')]>0x0){if(!_[_0x28bb('0x53')](_0x20c0e5[_0x28bb('0x51')])&&_0x20c0e5[_0x28bb('0x51')]>0x0){return!![];}loggerPredictive[_0x28bb('0x47')](_0x28bb('0x54'));if(!_[_0x28bb('0x53')](_0x20c0e5[_0x28bb('0x4f')])&&_0x20c0e5[_0x28bb('0x4f')]>0x0){return!![];}loggerPredictive[_0x28bb('0x47')]('Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive');}else{loggerPredictive[_0x28bb('0x47')]('Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive');}}else{loggerPredictive[_0x28bb('0x47')](_0x28bb('0x55'));}return![];}function mergeDataErlangB(_0x11c5ee){return function(_0x1eef6d){loggerPredictive[_0x28bb('0x47')](_0x28bb('0x56'));loggerPredictive['info'](_0x28bb('0x57'),_0x1eef6d[_0x28bb('0x58')]);loggerPredictive[_0x28bb('0x47')](_0x28bb('0x59'),_0x1eef6d['erlangCallToSecond']);loggerPredictive[_0x28bb('0x47')]('Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x1eef6d[_0x28bb('0x5a')]);loggerPredictive[_0x28bb('0x47')]('Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x1eef6d[_0x28bb('0x5b')]);loggerPredictive[_0x28bb('0x47')](_0x28bb('0x5c'),_0x1eef6d['erlangAbandonmentRate']);loggerPredictive[_0x28bb('0x47')](_0x28bb('0x52'));_['merge'](_0x11c5ee,_0x1eef6d);};}function ifInterval(_0x895555,_0x1cd8e6){if(_['isUndefined'](_0x1cd8e6)){return![];}return utils[_0x28bb('0x5d')](undefined,_0x1cd8e6)<_0x895555*0x3c;}function clearPredictiveAttributes(_0x23fa87){if(_0x23fa87['startProgressive']){_0x23fa87[_0x28bb('0x27')]=undefined;loggerPredictive['debug'](_0x23fa87[_0x28bb('0x44')],_0x28bb('0x5e'));}if(_0x23fa87[_0x28bb('0x5f')]){_0x23fa87[_0x28bb('0x5f')]=undefined;loggerPredictive['debug'](_0x23fa87[_0x28bb('0x44')],_0x28bb('0x60'));}if(_0x23fa87[_0x28bb('0x61')]){clearInterval(_0x23fa87['handlePredictive']);_0x23fa87[_0x28bb('0x61')]=undefined;loggerPredictive[_0x28bb('0x41')](_0x23fa87[_0x28bb('0x44')],_0x28bb('0x62'));}}function loggerCatchPredictive(_0x4f20a8,_0x51b720){return function(_0x3df6b3){loggerPredictive['error'](_0x51b720[_0x28bb('0x44')],_0x4f20a8);loggerPredictive[_0x28bb('0x63')](_0x3df6b3[_0x28bb('0x64')]);clearPredictiveAttributes(_0x51b720);};}function loggerCatch(_0x4c264e){return function(_0x49ec04){logger[_0x28bb('0x63')](_0x4c264e,util[_0x28bb('0x42')](_0x49ec04,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x5af03c){return function(_0x39bf9d){if(isNotNull(_0x39bf9d)&&isNotNull(_0x39bf9d[0x0])){if(_0x39bf9d[0x0][_0x28bb('0x65')]>0x0){_0x5af03c['message']=utils['CAMPAIGN_STATUS'][_0x28bb('0x66')];logger[_0x28bb('0x47')](_0x28bb('0x67')+_0x5af03c['name'],_0x39bf9d[0x0]['contactsRescheduled'],'contacts');}else{_0x5af03c[_0x28bb('0x68')]=utils[_0x28bb('0x69')]['NO_AVAILABLE_CONTACTS'];logger[_0x28bb('0x47')](_0x28bb('0x6a')+_0x5af03c[_0x28bb('0x44')]);}}};}function createObjHistory(_0x3a8279,_0x3aa71b,_0x11c0a6,_0x3bbf43,_0x32f2a2){_0x3a8279[_0x28bb('0x68')]=_0x11c0a6;var _0x2a2be7=new Action(_0x3a8279,_0x3aa71b);var _0x1079af=new History(_0x2a2be7);_0x1079af[_0x28bb('0x6b')]=_0x3bbf43;_0x1079af[_0x28bb('0x6c')]=_0x32f2a2;_0x1079af[_0x28bb('0x6d')]=_0x2a2be7[_0x28bb('0x6e')];return _0x1079af;}function unlockQueueStatus(_0x241d3c,_0x358513){setTimeout(function(){if(_['isUndefined'](_0x241d3c[_0x28bb('0x6f')])){loggerBooked[_0x28bb('0x63')](_0x28bb('0x70'),_0x358513);}_0x241d3c['queueStatusComplete']=!![];loggerBooked[_0x28bb('0x47')]('[booked][unlockQueueStatus]',_0x358513,JSON[_0x28bb('0x71')](_[_0x28bb('0x72')](_0x241d3c,[_0x28bb('0x44'),'queueStatusComplete'])));},0x1f3);}function checkInterval(_0x37327e){return function(){if(!isNotNull(_0x37327e[_0x28bb('0x73')])){_0x37327e['message']=utils[_0x28bb('0x69')][_0x28bb('0x74')];throw _0x37327e[_0x28bb('0x44')]+'\x20INTERVAL_IS_NULL';}if(!isNotNull(_0x37327e['Interval']['Intervals'])){_0x37327e[_0x28bb('0x68')]=utils['CAMPAIGN_STATUS'][_0x28bb('0x74')];throw _0x37327e[_0x28bb('0x44')]+_0x28bb('0x75');}if(!isNotNull(_['isEmpty'](_0x37327e[_0x28bb('0x73')]['Intervals']))){_0x37327e['message']=utils[_0x28bb('0x69')][_0x28bb('0x74')];throw _0x37327e['name']+_0x28bb('0x75');}};}function checkIsIVRCampaignActive(_0x504bae){return function(){if(!utils['isIVRCampaignActive'](_0x504bae)){_0x504bae['message']=utils['CAMPAIGN_STATUS'][_0x28bb('0x76')];throw _0x504bae[_0x28bb('0x44')]+_0x28bb('0x77');}};}function emitCampaignSummary(_0x5d0333){if(utils['isIVRCampaign'](_0x5d0333)){emit(util[_0x28bb('0x78')]('campaign:ivr:%s',_0x5d0333[_0x28bb('0x44')]),'campaign:save',_0x5d0333);}}function loggerCatchQueueSummary(_0x4731d9,_0x3393cc){return function(_0x11ffd2){clearPredictiveAttributes(_0x3393cc);emitCampaignSummary(_0x3393cc);loggerSyncQueueSummary[_0x28bb('0x41')](_0x4731d9,util[_0x28bb('0x42')](_0x11ffd2,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x1e8613){if(_0x1e8613[_0x28bb('0x79')]){if(_0x1e8613[_0x28bb('0x7a')]===0x0){_0x1e8613[_0x28bb('0x79')]=![];_0x1e8613[_0x28bb('0x68')]=utils[_0x28bb('0x69')][_0x28bb('0x76')];loggerSyncQueueSummary[_0x28bb('0x41')](_0x28bb('0x7b'),_0x1e8613['name'],_0x28bb('0x7c'));}else{_0x1e8613[_0x28bb('0x68')]=utils[_0x28bb('0x69')][_0x28bb('0x7d')];loggerSyncQueueSummary[_0x28bb('0x41')](_0x28bb('0x7b'),_0x1e8613['name'],'is\x20deactivated');}emitCampaignSummary(_0x1e8613);}}function myreject(_0x41e4d1){return function(_0x203f7d){return _0x41e4d1(msgResponse('[ifTime][Action]',_0x28bb('0x7e'),JSON[_0x28bb('0x71')](_0x203f7d)));};}Dialer[_0x28bb('0x1b')][_0x28bb('0x7f')]=function(_0x34912d){return!_['isUndefined'](_0x34912d)&&_0x34912d&&!_[_0x28bb('0x53')](_0x34912d[_0x28bb('0x44')])&&!_[_0x28bb('0x53')](_0x34912d['active'])&&_0x34912d[_0x28bb('0x80')]&&(this[_0x28bb('0x22')][util[_0x28bb('0x78')]('SIP/%s',_0x34912d[_0x28bb('0x44')])]['status']===_0x28bb('0x81')||this['trunks'][util[_0x28bb('0x78')]('SIP/%s',_0x34912d[_0x28bb('0x44')])][_0x28bb('0x82')]==='unmonitored');};Dialer[_0x28bb('0x1b')][_0x28bb('0x83')]=function(_0x16b156){var _0x469f03=this;return function(){if(!_0x469f03['isTrunkReachable'](_0x16b156[_0x28bb('0x84')])){if(!_0x469f03[_0x28bb('0x7f')](_0x16b156['TrunkBackup'])){_0x16b156[_0x28bb('0x68')]=utils[_0x28bb('0x69')][_0x28bb('0x85')];throw _0x16b156['name']+_0x28bb('0x86');}}};};Dialer['prototype'][_0x28bb('0x87')]=function(_0x40ec79,_0xa34221,_0xbfaadd,_0x49ac37){var _0x43e2a1=this;return function(){var _0x3291d9=!![];return _0x43e2a1[_0x28bb('0x88')](_0x40ec79,_0xa34221,_0xbfaadd,_0x49ac37,_0x3291d9);};};Dialer[_0x28bb('0x1b')]['checkIfTimeIntervals']=function(_0x22b237,_0x174f80,_0x237d27,_0x50e497){var _0x361c47=this;return function(){var _0x611264=![];return _0x361c47[_0x28bb('0x88')](_0x22b237[_0x28bb('0x89')],_0x174f80,_0x237d27,_0x50e497,_0x611264);};};Dialer[_0x28bb('0x1b')][_0x28bb('0x88')]=function(_0xd4b8b7,_0x8a5b35,_0x267c05,_0x35d904,_0x15bc1f){var _0xac8057=[];return new Promise(function(_0x5051d8,_0x17b061){if(!isNotNull(_0xd4b8b7)){_0x35d904[_0x28bb('0x68')]=utils[_0x28bb('0x69')][_0x28bb('0x74')];return _0x17b061(msgResponse(_0x28bb('0x8a'),_0x28bb('0x8b'),_0x267c05+_0x28bb('0x8c')));}if(_[_0x28bb('0x45')](_0xd4b8b7)){_0x35d904[_0x28bb('0x68')]=utils[_0x28bb('0x69')]['EMPTY_INTERVAL'];return _0x17b061(msgResponse(_0x28bb('0x8a'),_0x28bb('0x8b'),_0x267c05+'\x20Intervals\x20is\x20empty\x20'));}if(_0x8a5b35&&_[_0x28bb('0x53')](config[_0x28bb('0x8d')][_0x8a5b35])){_0x35d904[_0x28bb('0x68')]=utils[_0x28bb('0x69')][_0x28bb('0x8e')];return _0x17b061(msgResponse(_0x28bb('0x8a'),'Failure',_0x267c05+'\x20Timezone\x20unknow\x20'+_0x8a5b35));}if(_['isArray'](_0xd4b8b7)){for(var _0x53b13f=0x0;_0x53b13f<_0xd4b8b7[_0x28bb('0x8f')];_0x53b13f+=0x1){_0xac8057[_0x28bb('0x90')](ami[_0x28bb('0x91')]({'action':_0x28bb('0x92'),'command':util[_0x28bb('0x78')](_0x28bb('0x93'),_0xd4b8b7[_0x53b13f]['interval'],!_[_0x28bb('0x53')](config[_0x28bb('0x8d')][_0x8a5b35])?_0x8a5b35:'')})[_0x28bb('0x94')](function(_0x177e36){return _0x177e36[_0x28bb('0x95')][_0x28bb('0x96')](_0x28bb('0x97'))>=0x0;})[_0x28bb('0x98')](myreject(_0x17b061)));}}else{_0xac8057[_0x28bb('0x90')](ami[_0x28bb('0x91')]({'action':_0x28bb('0x92'),'command':util[_0x28bb('0x78')](_0x28bb('0x93'),_0xd4b8b7,!_[_0x28bb('0x53')](config[_0x28bb('0x8d')][_0x8a5b35])?_0x8a5b35:'')})[_0x28bb('0x94')](function(_0xa5b2e4){return _0xa5b2e4[_0x28bb('0x95')][_0x28bb('0x96')](_0x28bb('0x97'))>=0x0;})[_0x28bb('0x98')](myreject(_0x17b061)));}Promise['all'](_0xac8057)['then'](function(_0x2c60a3){var _0x493593=_[_0x28bb('0x99')](_0x2c60a3);if(_0x493593){return _0x5051d8(_0x493593);}else{_0x35d904[_0x28bb('0x68')]=_0x15bc1f?utils[_0x28bb('0x69')][_0x28bb('0x9a')]:utils[_0x28bb('0x69')][_0x28bb('0x9b')];return _0x17b061(msgResponse(_0x28bb('0x9c'),_0x28bb('0x8b'),_0x28bb('0x9d')+_0x15bc1f+'\x20'+_0x267c05+_0x28bb('0x9e')+util[_0x28bb('0x42')](_0xd4b8b7,{'showHidden':![],'depth':null})+_0x28bb('0x9f')+_0x8a5b35));}})[_0x28bb('0x98')](function(_0x5bec27){return _0x17b061(msgResponse('ifTime',_0x28bb('0x8b'),JSON['stringify'](_0x5bec27)));});});};Dialer[_0x28bb('0x1b')][_0x28bb('0x3b')]=function(){var _0x43055b=this;return cmHopper[_0x28bb('0xa0')]({'active':![]},{'where':{'active':!![]}})[_0x28bb('0x94')](function(){setInterval(function(){_0x43055b[_0x28bb('0xa1')]();},0x3e8);});};Dialer[_0x28bb('0x1b')][_0x28bb('0xa1')]=function(){var _0x183b39=this;var _0x2921bd;for(var _0x125540 in this[_0x28bb('0xa2')]){if(typeof this['campaigns'][_0x125540]!==_0x28bb('0xa3')){_0x2921bd=this[_0x28bb('0xa2')][_0x125540];if(utils['isIVRCampaign'](_0x2921bd)&&utils[_0x28bb('0xa4')](_0x2921bd)){_0x2921bd[_0x28bb('0x79')]=!![];Promise[_0x28bb('0xa5')]()[_0x28bb('0x94')](checkIsIVRCampaignActive(_0x2921bd))[_0x28bb('0x94')](checkInterval(_0x2921bd))['then'](_0x183b39['checkIsTrunkReachable'](_0x2921bd))[_0x28bb('0x94')](_0x183b39[_0x28bb('0x87')](_0x2921bd[_0x28bb('0xa6')],_0x2921bd['dialTimezone'],_0x2921bd['name'],_0x2921bd))['then'](_0x183b39[_0x28bb('0xa7')](_0x2921bd[_0x28bb('0x73')],_0x2921bd[_0x28bb('0xa8')],_0x2921bd[_0x28bb('0x44')],_0x2921bd))[_0x28bb('0x94')](_0x183b39[_0x28bb('0xa9')](_0x2921bd))['catch'](loggerCatchQueueSummary(_0x28bb('0xaa'),_0x2921bd));}else{notSendMessagesCampaign(_0x2921bd);}}}};Dialer[_0x28bb('0x1b')][_0x28bb('0xab')]=function(_0x802a6a){if(_0x802a6a[_0x28bb('0xac')]!==_0x28bb('0xa')){clearPredictiveAttributes(_0x802a6a);}switch(_0x802a6a['dialMethod']){case'progressive':this[_0x28bb('0xad')](_0x802a6a,0x1);break;case _0x28bb('0xae'):this[_0x28bb('0xad')](_0x802a6a,_0x802a6a[_0x28bb('0xaf')]);break;case _0x28bb('0xa'):this[_0x28bb('0xa')](_0x802a6a);break;case _0x28bb('0x9'):this['handlePower'](_0x802a6a,0x1);break;default:logger[_0x28bb('0x63')]('Queue',_0x802a6a[_0x28bb('0x44')],_0x28bb('0xb0'));}};Dialer[_0x28bb('0x1b')]['ifTime']=function(_0x4876e3,_0x414864){var _0x27a1d3=_0x4876e3[_0x28bb('0xa8')];var _0x2fe784=_0x414864?_0x4876e3[_0x28bb('0xa6')]:_0x4876e3[_0x28bb('0x73')][_0x28bb('0x89')];logger['silly'](_0x28bb('0xb1'),_0x2fe784,_0x27a1d3,_0x4876e3[_0x28bb('0x44')],util[_0x28bb('0x78')](_0x28bb('0xb2'),_0x4876e3['name'],_0x4876e3['id']));var _0x5f0741=null;return Interval[_0x28bb('0xb3')](_0x2fe784,_0x27a1d3)[_0x28bb('0x94')](function(_0x5f3c38){if(_0x5f3c38===!![]){return _0x5f3c38;}else{_0x4876e3['message']=_0x414864?utils[_0x28bb('0x69')]['OVERTIME_GLOBAL_INTERVAL']:utils[_0x28bb('0x69')]['OVERTIME_INTERVAL'];_0x5f0741=msgResponse(_0x28bb('0x9c'),'Failure',_0x28bb('0x9d')+_0x414864+'\x20'+_0x4876e3[_0x28bb('0x44')]+_0x28bb('0x9e')+util[_0x28bb('0x42')](_0x2fe784,{'showHidden':![],'depth':null})+_0x28bb('0x9f')+_0x27a1d3);}if(_0x5f0741!==null){logger[_0x28bb('0xb4')](_0x28bb('0xb5'),_0x5f0741);_0x5f0741[_0x28bb('0xb6')]=_0x414864;throw _0x5f0741;}})[_0x28bb('0x98')](function(_0x17c18b){logger['error'](_0x28bb('0xb7'),_0x17c18b);throw msgResponse(_0x28bb('0xb8'),_0x28bb('0x7e'),util[_0x28bb('0x42')](_0x17c18b,{'showHidden':![],'depth':null}));});};Dialer[_0x28bb('0x1b')][_0x28bb('0x2d')]=function(_0x39eb34){if(this['voiceQueues'][_0x39eb34[_0x28bb('0xb9')]]){if(this[_0x28bb('0x25')][_0x39eb34[_0x28bb('0xba')]]&&this['uniqueId'][_0x39eb34['uniqueid']][_0x28bb('0x3f')]!==_0x28bb('0xbb')){utils['decrementOriginate'](this[_0x28bb('0xbc')][_0x39eb34['queue']],_0x28bb('0xbd'));this[_0x28bb('0x25')][_0x39eb34[_0x28bb('0xba')]][_0x28bb('0xbe')]=moment()[_0x28bb('0x78')]('YYYY-MM-DD\x20HH:mm:ss');}}};Dialer['prototype'][_0x28bb('0x33')]=function(_0x6e89fa){var _0x1ddd12=this[_0x28bb('0x25')][_0x6e89fa[_0x28bb('0xba')]];if(this['voiceQueues'][_0x6e89fa[_0x28bb('0xb9')]]){if(_0x1ddd12&&_0x1ddd12[_0x28bb('0x3f')]!==_0x28bb('0xbb')){delete this[_0x28bb('0x25')][_0x6e89fa['uniqueid']];this['voiceQueues'][_0x6e89fa[_0x28bb('0xb9')]][_0x28bb('0xbf')]+=0x1;var _0x4a3045=new AgentComplete(_0x1ddd12,_0x6e89fa);if(_0x6e89fa['reason']===_0x28bb('0xc0')){_0x4a3045[_0x28bb('0xc1')]=this[_0x28bb('0xbc')][_0x6e89fa[_0x28bb('0xb9')]][_0x28bb('0xc2')]&&this[_0x28bb('0xbc')][_0x6e89fa[_0x28bb('0xb9')]][_0x28bb('0xc3')]?moment()['format'](_0x28bb('0xc4')):undefined;}hopperUtils['createHistory'](_0x4a3045)[_0x28bb('0x98')](loggerCatch(_0x28bb('0xc5')));hopperUtils[_0x28bb('0xc6')](_0x4a3045)[_0x28bb('0x98')](loggerCatch(_0x28bb('0xc7')));}}};Dialer[_0x28bb('0x1b')][_0x28bb('0x30')]=function(_0x262caf){var _0x3641f6=this[_0x28bb('0x25')][_0x262caf[_0x28bb('0xba')]];var _0x3c3fbc=this;var _0x11a4cd=![];var _0x480f7d;var _0x314083;if(this[_0x28bb('0xbc')][_0x262caf[_0x28bb('0xb9')]]){if(_0x3641f6&&_0x3641f6[_0x28bb('0x3f')]!==_0x28bb('0xbb')){delete this[_0x28bb('0x25')][_0x262caf['uniqueid']];utils[_0x28bb('0xc8')](this['voiceQueues'][_0x262caf[_0x28bb('0xb9')]],_0x28bb('0xc9'));_0x3641f6[_0x28bb('0xca')]=moment()[_0x28bb('0x78')](_0x28bb('0xc4'));var _0x2290ee=new QueueCallerAbandon(_0x3641f6,_0x262caf);if(utils[_0x28bb('0x5d')](_0x3641f6[_0x28bb('0xca')],_0x3641f6['responsetime'])>=_0x3641f6[_0x28bb('0xcb')]){this['voiceQueues'][_0x262caf[_0x28bb('0xb9')]][_0x28bb('0x4c')]+=0x1;this[_0x28bb('0xbc')][_0x262caf[_0x28bb('0xb9')]]['outboundDropCallsDayTimeout']+=0x1;this['voiceQueues'][_0x262caf['queue']][_0x28bb('0xcc')]+=0x1;_0x2290ee['state']=0xa;_0x2290ee[_0x28bb('0x6c')]='Drop';_0x2290ee[_0x28bb('0xcd')]='TIMEOUT';_0x2290ee['agiafterat']=this[_0x28bb('0xbc')][_0x262caf[_0x28bb('0xb9')]][_0x28bb('0xc2')]?moment()[_0x28bb('0x78')](_0x28bb('0xc4')):undefined;_0x2290ee[_0x28bb('0xce')]+=0x1;_0x2290ee['countglobal']+=0x1;_0x480f7d=this[_0x28bb('0xbc')][_0x262caf[_0x28bb('0xb9')]][_0x28bb('0xcf')];_0x314083=this[_0x28bb('0xbc')][_0x262caf[_0x28bb('0xb9')]]['callAdditionalPhoneAfterMin'];hopperUtils[_0x28bb('0xd0')](_0x2290ee,_0x2290ee[_0x28bb('0x6b')],_0x3641f6[_0x28bb('0xd1')])['then'](function(_0x2c16ff){_0x11a4cd=_0x2c16ff[_0x28bb('0xd2')]==0x1;if(_0x2290ee['countdropretry']>=_0x3c3fbc[_0x28bb('0xbc')][_0x262caf['queue']][_0x28bb('0xd3')]){_0x3c3fbc[_0x28bb('0xd4')](_0x2290ee,_0x2c16ff[_0x28bb('0xd2')]);}else{hopperUtils[_0x28bb('0xd5')]({'active':![],'countdropretry':_0x2290ee[_0x28bb('0xce')],'scheduledat':moment()['add'](_0x3c3fbc[_0x28bb('0xbc')][_0x262caf['queue']][_0x28bb('0xcf')],'minutes')[_0x28bb('0x78')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x3641f6[_0x28bb('0xd6')],'ListId':_0x3641f6[_0x28bb('0xd7')],'VoiceQueueId':_0x3641f6[_0x28bb('0xd8')]||undefined,'CampaignId':_0x3641f6[_0x28bb('0xd9')]||undefined})[_0x28bb('0x98')](loggerCatch(_0x28bb('0xda')));var _0x5597ec=new History(_0x2290ee);_0x5597ec[_0x28bb('0x6b')]=0xa;_0x5597ec['statedesc']='Drop';_0x5597ec['starttime']=moment()[_0x28bb('0x78')]('YYYY-MM-DD\x20HH:mm:ss');_0x5597ec['endtime']=_0x5597ec[_0x28bb('0x6e')];_0x5597ec[_0x28bb('0xdb')]=_0x2290ee['calleridname'];_0x5597ec[_0x28bb('0xdc')]=_0x2290ee['calleridnum'];hopperUtils['createHistory'](_0x5597ec)['catch'](loggerCatch(_0x28bb('0xdd')));}})[_0x28bb('0x94')](function(){if(_0x11a4cd)hopperUtils[_0x28bb('0xde')](_0x2290ee,_0x480f7d,_0x314083)[_0x28bb('0x94')](function(){return 0x1;});});}else{this['voiceQueues'][_0x262caf['queue']][_0x28bb('0x4e')]+=0x1;this[_0x28bb('0xbc')][_0x262caf[_0x28bb('0xb9')]][_0x28bb('0xdf')]+=0x1;_0x2290ee[_0x28bb('0x6b')]=0xb;_0x2290ee[_0x28bb('0x6c')]='Abandoned';_0x2290ee[_0x28bb('0xcd')]='CALLEREXIT';_0x2290ee[_0x28bb('0xe0')]+=0x1;_0x2290ee[_0x28bb('0xe1')]+=0x1;_0x480f7d=this[_0x28bb('0xbc')][_0x262caf['queue']][_0x28bb('0xe2')];_0x314083=this[_0x28bb('0xbc')][_0x262caf[_0x28bb('0xb9')]][_0x28bb('0xe3')];hopperUtils[_0x28bb('0xd0')](_0x2290ee,_0x2290ee['state'],_0x3641f6['voiceQueue'])[_0x28bb('0x94')](function(_0x14cfac){if(_0x2290ee['countabandonedretry']>=_0x3c3fbc[_0x28bb('0xbc')][_0x262caf['queue']][_0x28bb('0xe4')]){_0x3c3fbc[_0x28bb('0xd4')](_0x2290ee,_0x14cfac[_0x28bb('0xd2')]);}else{hopperUtils[_0x28bb('0xd5')]({'active':![],'countabandonedretry':_0x2290ee[_0x28bb('0xe0')],'scheduledat':moment()[_0x28bb('0xe5')](_0x3c3fbc[_0x28bb('0xbc')][_0x262caf['queue']]['dialAbandonedRetryFrequency'],'minutes')[_0x28bb('0x78')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x3641f6[_0x28bb('0xd6')],'ListId':_0x3641f6[_0x28bb('0xd7')],'VoiceQueueId':_0x3641f6[_0x28bb('0xd8')]||undefined,'CampaignId':_0x3641f6['CampaignId']||undefined})[_0x28bb('0x98')](loggerCatch(_0x28bb('0xe6')));var _0x63eb5f=new History(_0x2290ee);_0x63eb5f['state']=0xb;_0x63eb5f['statedesc']=_0x28bb('0xe7');_0x63eb5f[_0x28bb('0x6e')]=moment()[_0x28bb('0x78')]('YYYY-MM-DD\x20HH:mm:ss');_0x63eb5f[_0x28bb('0x6d')]=_0x63eb5f['starttime'];_0x63eb5f[_0x28bb('0xdb')]=_0x2290ee[_0x28bb('0xdb')];_0x63eb5f[_0x28bb('0xdc')]=_0x2290ee[_0x28bb('0xdc')];hopperUtils[_0x28bb('0xe8')](_0x63eb5f)[_0x28bb('0x98')](loggerCatch('[syncAgentComplete][createHistory][11]'));}})[_0x28bb('0x94')](function(){if(_0x11a4cd)hopperUtils[_0x28bb('0xde')](_0x2290ee,_0x480f7d,_0x314083)[_0x28bb('0x94')](function(){return 0x1;});});}}}};Dialer[_0x28bb('0x1b')][_0x28bb('0x36')]=function(_0x4219da){if(this[_0x28bb('0xe9')][_0x4219da['uniqueid']]){this['actions'][_0x4219da[_0x28bb('0xba')]][_0x28bb('0xea')]=_0x4219da[_0x28bb('0xea')];}if(this[_0x28bb('0x25')][_0x4219da[_0x28bb('0xba')]]){this[_0x28bb('0x25')][_0x4219da[_0x28bb('0xba')]][_0x28bb('0xea')]=_0x4219da[_0x28bb('0xea')];}};Dialer[_0x28bb('0x1b')][_0x28bb('0xeb')]=function(_0x208d29){if(!this[_0x28bb('0xe9')][_0x208d29[_0x28bb('0xec')]]){return;}var _0x1507e0=this[_0x28bb('0xbc')][this[_0x28bb('0xe9')][_0x208d29[_0x28bb('0xec')]][_0x28bb('0xb9')]][_0x28bb('0xed')]||'rrmemory';if(_0x1507e0===_0x28bb('0xee')){if(this[_0x28bb('0xe9')][_0x208d29['actionid']]&&_[_0x28bb('0xef')](this['actions'][_0x208d29['actionid']]['locked'])&&_0x208d29['status']==='1'&&_0x208d29[_0x28bb('0xf0')]==='0'){if(this['agents'][_0x208d29[_0x28bb('0xf1')]]){if(!this[_0x28bb('0x21')][_0x208d29[_0x28bb('0xf1')]][_0x28bb('0xf2')]){this[_0x28bb('0x21')][_0x208d29[_0x28bb('0xf1')]][_0x28bb('0xf2')]=!![];this[_0x28bb('0xe9')][_0x208d29[_0x28bb('0xec')]][_0x28bb('0xf2')]=!![];this[_0x28bb('0xe9')][_0x208d29[_0x28bb('0xec')]][_0x28bb('0xf1')]=_0x208d29[_0x28bb('0xf1')];}}}}else if(_0x1507e0===_0x28bb('0xf3')){if(this['actions'][_0x208d29[_0x28bb('0xec')]]){if(this[_0x28bb('0x21')][_0x208d29['stateinterface']]){this[_0x28bb('0xe9')][_0x208d29[_0x28bb('0xec')]]['stateinterface']=_0x208d29[_0x28bb('0xf1')];if(_[_0x28bb('0xef')](this[_0x28bb('0x29')][this['actions'][_0x208d29[_0x28bb('0xec')]][_0x28bb('0xb9')]])){this[_0x28bb('0x29')][this[_0x28bb('0xe9')][_0x208d29[_0x28bb('0xec')]]['queue']]=[];}this[_0x28bb('0x29')][this['actions'][_0x208d29[_0x28bb('0xec')]][_0x28bb('0xb9')]]['push'](_[_0x28bb('0xf4')](_[_0x28bb('0x72')](this[_0x28bb('0xe9')][_0x208d29[_0x28bb('0xec')]],[_0x28bb('0xf5'),_0x28bb('0xf1')]),{'status':_0x208d29['status'],'paused':_0x208d29['paused']}));}}}};Dialer[_0x28bb('0x1b')][_0x28bb('0x3a')]=function(_0x46a6d2){if(!this[_0x28bb('0xe9')][_0x46a6d2['actionid']]){return;}var _0x550ebd=this;var _0x4adb44=this[_0x28bb('0xbc')][this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xb9')]];var _0x4f0342=_0x4adb44[_0x28bb('0xed')]||_0x28bb('0xf3');if(_0x4f0342===_0x28bb('0xee')){if(this['actions'][_0x46a6d2['actionid']]&&this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xf1')]){this[_0x28bb('0x20')][_0x28bb('0xf6')](this['actions'][_0x46a6d2['actionid']]['idHopper'],this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xf1')])[_0x28bb('0x98')](function(_0x4c5323){logger[_0x28bb('0x63')](_0x28bb('0xf7'),util[_0x28bb('0x42')](_0x4c5323,{'showHidden':![],'depth':null}));})['finally'](function(){utils[_0x28bb('0xc8')](_0x550ebd[_0x28bb('0xbc')][_0x550ebd[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xb9')]],_0x28bb('0xf8'));_0x550ebd[_0x28bb('0x21')][_0x550ebd[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xf1')]][_0x28bb('0xf2')]=![];delete _0x550ebd[_0x28bb('0xe9')][_0x46a6d2['actionid']];unlockQueueStatus(_0x4adb44);});}else{utils[_0x28bb('0xc8')](this[_0x28bb('0xbc')][this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xb9')]],_0x28bb('0xf8'));hopperUtils[_0x28bb('0xd5')]({'active':![],'ContactId':this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xd6')],'ListId':this[_0x28bb('0xe9')][_0x46a6d2['actionid']][_0x28bb('0xd7')],'VoiceQueueId':this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xd8')]||undefined,'CampaignId':this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xd9')]||undefined})[_0x28bb('0x98')](loggerCatch('[unlock][syncQueueStatusComplete]'));delete this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]];unlockQueueStatus(_0x4adb44);}}else if(_0x4f0342==='rrmemory'){var _0x4564fc;if(this[_0x28bb('0xe9')][_0x46a6d2['actionid']]&&!_[_0x28bb('0x45')](this[_0x28bb('0x29')][this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xb9')]])){if(this['queueBookedRR'][_0x550ebd[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xb9')]]){this[_0x28bb('0x2a')][_0x550ebd['actions'][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xb9')]]=this[_0x28bb('0x2a')][this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]]['queue']]?this[_0x28bb('0x2a')][this['actions'][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xb9')]]:this[_0x28bb('0x29')][this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xb9')]]?this[_0x28bb('0x29')][this[_0x28bb('0xe9')][_0x46a6d2['actionid']][_0x28bb('0xb9')]][_0x28bb('0xf9')]||0x0:0x0;}this[_0x28bb('0x29')][this['actions'][_0x46a6d2['actionid']]['queue']][_0x28bb('0xf9')]=this[_0x28bb('0x2a')][this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xb9')]];for(var _0x675f5e=0x0;_0x675f5e<this[_0x28bb('0x29')][this['actions'][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xb9')]][_0x28bb('0x8f')];_0x675f5e+=0x1){_0x4564fc=rr(this[_0x28bb('0x29')][this[_0x28bb('0xe9')][_0x46a6d2['actionid']]['queue']]);this['queueBookedRR'][_0x550ebd[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]]['queue']]=this[_0x28bb('0x29')][this[_0x28bb('0xe9')][_0x46a6d2['actionid']]['queue']][_0x28bb('0xf9')];if(_0x4564fc[_0x28bb('0x82')]==='1'&&_0x4564fc[_0x28bb('0xf0')]==='0'){break;}}if(!_[_0x28bb('0xef')](_0x4564fc)){this[_0x28bb('0x21')][_0x4564fc[_0x28bb('0xf1')]]['unlockRR']=_['isUndefined'](this[_0x28bb('0x21')][_0x4564fc['stateinterface']][_0x28bb('0xfa')])?!![]:this[_0x28bb('0x21')][_0x4564fc[_0x28bb('0xf1')]]['unlockRR'];}loggerBooked[_0x28bb('0x47')](_0x28bb('0xfb'),_0x46a6d2['actionid'],_0x28bb('0xfc'),JSON['stringify'](_[_0x28bb('0x72')](this[_0x28bb('0x21')][_0x4564fc[_0x28bb('0xf1')]],[_0x28bb('0x44'),_0x28bb('0xfa')])),_0x28bb('0xfd'),JSON['stringify'](_0x4564fc[_0x28bb('0xf5')]));if(!_[_0x28bb('0xef')](_0x4564fc)&&_0x4564fc[_0x28bb('0x82')]==='1'&&_0x4564fc[_0x28bb('0xf0')]==='0'&&this['agents'][_0x4564fc[_0x28bb('0xf1')]]['unlockRR']){this[_0x28bb('0x21')][_0x4564fc[_0x28bb('0xf1')]][_0x28bb('0xfa')]=![];this[_0x28bb('0x29')][_0x550ebd[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]]['queue']]=[];this[_0x28bb('0x20')][_0x28bb('0xf6')](_0x4564fc['idHopper'],_0x4564fc['stateinterface'])[_0x28bb('0x98')](function(_0x65de75){logger['error'](_0x28bb('0xf7'),util[_0x28bb('0x42')](_0x65de75,{'showHidden':![],'depth':null}));})[_0x28bb('0x1e')](function(){utils[_0x28bb('0xc8')](_0x550ebd[_0x28bb('0xbc')][_0x550ebd['actions'][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xb9')]],_0x28bb('0xf8'));setTimeout(function(){_0x550ebd['agents'][_0x4564fc['stateinterface']][_0x28bb('0xfa')]=!![];loggerBooked[_0x28bb('0x47')]('[booked][RR][finaly]',_0x46a6d2[_0x28bb('0xec')],_0x28bb('0xfc'),JSON[_0x28bb('0x71')](_[_0x28bb('0x72')](_0x550ebd[_0x28bb('0x21')][_0x4564fc[_0x28bb('0xf1')]],['name',_0x28bb('0xfa')])),_0x28bb('0xfd'),JSON['stringify'](_0x4564fc[_0x28bb('0xf5')]));},0xc7);delete _0x550ebd[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]];unlockQueueStatus(_0x4adb44,_0x46a6d2[_0x28bb('0xec')]);});}else{loggerBooked[_0x28bb('0x47')](_0x28bb('0xfe'));utils['decrementOriginate'](this[_0x28bb('0xbc')][this[_0x28bb('0xe9')][_0x46a6d2['actionid']][_0x28bb('0xb9')]],_0x28bb('0xf8'));hopperUtils[_0x28bb('0xd5')]({'active':![],'ContactId':this['actions'][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xd6')],'ListId':this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]]['ListId'],'VoiceQueueId':this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]]['VoiceQueueId']||undefined,'CampaignId':this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xd9')]||undefined})[_0x28bb('0x98')](loggerCatch(_0x28bb('0xff')));delete this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]];unlockQueueStatus(_0x4adb44);}}else{loggerBooked[_0x28bb('0x47')](_0x28bb('0x100'));utils[_0x28bb('0xc8')](this['voiceQueues'][this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xb9')]],_0x28bb('0xf8'));hopperUtils[_0x28bb('0xd5')]({'active':![],'ContactId':this['actions'][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xd6')],'ListId':this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xd7')],'VoiceQueueId':this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]]['VoiceQueueId']||undefined,'CampaignId':this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]]['CampaignId']||undefined})[_0x28bb('0x98')](loggerCatch('[unlock2][syncQueueStatusComplete]'));delete this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]];unlockQueueStatus(_0x4adb44);}}else{loggerBooked[_0x28bb('0x47')](_0x28bb('0x101'));utils[_0x28bb('0xc8')](this[_0x28bb('0xbc')][this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]]['queue']],_0x28bb('0xf8'));hopperUtils['rescheduleContact']({'active':![],'ContactId':this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]]['ContactId'],'ListId':this['actions'][_0x46a6d2['actionid']][_0x28bb('0xd7')],'VoiceQueueId':this['actions'][_0x46a6d2[_0x28bb('0xec')]][_0x28bb('0xd8')]||undefined,'CampaignId':this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]]['CampaignId']||undefined})['catch'](loggerCatch(_0x28bb('0x102')));delete this[_0x28bb('0xe9')][_0x46a6d2[_0x28bb('0xec')]];unlockQueueStatus(_0x4adb44);}};Dialer['prototype'][_0x28bb('0x32')]=function(_0x4b072e){var _0x4ef0c1=this[_0x28bb('0xe9')][_0x4b072e['actionid']];if(_0x4ef0c1){delete this['actions'][_0x4b072e[_0x28bb('0xec')]];_0x4ef0c1[_0x28bb('0x103')]=moment()[_0x28bb('0x78')](_0x28bb('0xc4'));var _0x264027=_0x4ef0c1[_0x28bb('0x3f')]===_0x28bb('0xbb')?this['campaigns'][_0x4ef0c1[_0x28bb('0xb9')]]:this[_0x28bb('0xbc')][_0x4ef0c1[_0x28bb('0x104')]()];if(_0x4b072e[_0x28bb('0x105')]!==_0x28bb('0x106')){utils[_0x28bb('0xc8')](_0x264027,_0x28bb('0x107'));return this[_0x28bb('0x108')](_0x4ef0c1,_0x264027,_0x4b072e)[_0x28bb('0x98')](loggerCatch('[callProgressDetecting]\x20'));}this[_0x28bb('0x25')][_0x4b072e[_0x28bb('0xba')]]=_0x4ef0c1;}};Dialer[_0x28bb('0x1b')]['syncVarSet']=function(_0x5b2c51){var _0x2ac37b=this;var _0x51adb6=this['uniqueId'][_0x5b2c51[_0x28bb('0xba')]];var _0x3ae872;if(!_['isNil'](_0x5b2c51)&&!_[_0x28bb('0xef')](_0x5b2c51[_0x28bb('0x109')])&&!_[_0x28bb('0xef')](_0x5b2c51['variable'][_0x28bb('0x10a')])&&_0x5b2c51[_0x28bb('0x10b')]===_0x28bb('0x10c')&&_0x51adb6){if(_0x51adb6[_0x28bb('0x3f')]!==_0x28bb('0xbb')&&this[_0x28bb('0xbc')][_0x51adb6[_0x28bb('0xb9')]][_0x28bb('0x10d')]&&_0x5b2c51[_0x28bb('0x10e')]===_0x28bb('0x10f')){delete this[_0x28bb('0x25')][_0x5b2c51[_0x28bb('0xba')]];utils['decrementOriginate'](this[_0x28bb('0xbc')][_0x51adb6['queue']],_0x28bb('0x110'));this['voiceQueues'][_0x51adb6[_0x28bb('0xb9')]][_0x28bb('0xbf')]+=0x1;this['voiceQueues'][_0x51adb6[_0x28bb('0xb9')]][_0x28bb('0x111')]+=0x1;_0x3ae872=new Hangup(_0x51adb6,_0x5b2c51);_0x3ae872[_0x28bb('0x6b')]=0x12;_0x3ae872[_0x28bb('0x6c')]=_0x28bb('0x112');_0x3ae872[_0x28bb('0x113')]=_0x28bb('0x114');ami[_0x28bb('0x115')](_0x28bb('0x116'),ut[_0x28bb('0x117')](_0x3ae872,_0x28bb('0x118')));this[_0x28bb('0x119')](_0x3ae872,_0x28bb('0x11a'),_0x28bb('0x11b'));}if(_0x51adb6['type']!==_0x28bb('0xbb')&&this[_0x28bb('0xbc')][_0x51adb6[_0x28bb('0xb9')]][_0x28bb('0x10d')]&&_0x5b2c51['value']==='MACHINE'){return new Promise(function(_0x49ac04,_0x312835){delete _0x2ac37b[_0x28bb('0x25')][_0x5b2c51[_0x28bb('0xba')]];utils[_0x28bb('0xc8')](_0x2ac37b['voiceQueues'][_0x51adb6[_0x28bb('0xb9')]],_0x28bb('0x110'));_0x2ac37b[_0x28bb('0xbc')][_0x51adb6[_0x28bb('0xb9')]]['outboundAnswerCallsDay']+=0x1;_0x2ac37b[_0x28bb('0xbc')][_0x51adb6[_0x28bb('0xb9')]]['outboundAnswerAgiCallsDay']+=0x1;var _0x3accce=_0x2ac37b[_0x28bb('0xbc')][_0x51adb6['queue']];var _0x53cc0e=new Hangup(_0x51adb6,_0x5b2c51);_0x53cc0e[_0x28bb('0x6b')]=0x13;_0x53cc0e['statedesc']='Machine';_0x53cc0e[_0x28bb('0x113')]=_0x28bb('0x114');_0x53cc0e['countmachineretry']+=0x1;_0x53cc0e['countglobal']+=0x1;_0x53cc0e[_0x28bb('0x118')]=!![];ami['emit'](_0x28bb('0x116'),ut[_0x28bb('0x117')](_0x53cc0e,_0x28bb('0x118')));hopperUtils[_0x28bb('0xe8')](_0x53cc0e)[_0x28bb('0x98')](loggerCatch(_0x28bb('0x11c')));if(_0x53cc0e[_0x28bb('0x11d')]+_0x53cc0e[_0x28bb('0x11e')]+_0x53cc0e[_0x28bb('0x11f')]+_0x53cc0e[_0x28bb('0x120')]+_0x53cc0e[_0x28bb('0xce')]+_0x53cc0e[_0x28bb('0xe0')]+_0x53cc0e[_0x28bb('0x121')]+_0x53cc0e[_0x28bb('0x122')]>=_0x3accce[_0x28bb('0x123')]){_0x2ac37b['stateGlobal'](_0x53cc0e,_0x49ac04,_0x312835,_0x28bb('0x124'));}else{if(_0x53cc0e[_0x28bb('0x121')]>=_0x3accce[_0x28bb('0x125')]){_0x2ac37b[_0x28bb('0x126')](_0x53cc0e,_0x49ac04,_0x312835,'reason\x2019\x20machine....');}else{hopperUtils[_0x28bb('0xd5')]({'active':![],'countmachineretry':_0x53cc0e[_0x28bb('0x121')],'scheduledat':moment()[_0x28bb('0xe5')](_0x3accce[_0x28bb('0x127')],_0x28bb('0x128'))['format'](_0x28bb('0xc4')),'ContactId':_0x53cc0e['ContactId'],'ListId':_0x53cc0e[_0x28bb('0xd7')],'VoiceQueueId':_0x53cc0e[_0x28bb('0xd8')]||undefined,'CampaignId':_0x53cc0e[_0x28bb('0xd9')]||undefined})[_0x28bb('0x98')](loggerCatch(_0x28bb('0x129')));_0x49ac04({'reschedule':0x1});}}});}if(_0x51adb6[_0x28bb('0x3f')]==='ivr'&&this[_0x28bb('0xa2')][_0x51adb6[_0x28bb('0xb9')]][_0x28bb('0x10d')]&&_0x5b2c51[_0x28bb('0x10e')]===_0x28bb('0x10f')){delete this[_0x28bb('0x25')][_0x5b2c51[_0x28bb('0xba')]];utils[_0x28bb('0xc8')](this[_0x28bb('0xa2')][_0x51adb6[_0x28bb('0xb9')]],_0x28bb('0x110'));_0x3ae872=new Hangup(_0x51adb6,_0x5b2c51);_0x3ae872[_0x28bb('0x6b')]=0x12;_0x3ae872[_0x28bb('0x6c')]=_0x28bb('0x112');_0x3ae872['membername']=_0x28bb('0x114');ami[_0x28bb('0x115')](_0x28bb('0x116'),ut[_0x28bb('0x117')](_0x3ae872,_0x28bb('0x118')));this[_0x28bb('0x119')](_0x3ae872,_0x28bb('0x12a'),'[syncHangupInAMDIvr]');}if(_0x51adb6[_0x28bb('0x3f')]===_0x28bb('0xbb')&&this[_0x28bb('0xa2')][_0x51adb6['queue']][_0x28bb('0x10d')]&&_0x5b2c51['value']===_0x28bb('0x12b')){return new Promise(function(_0x2b2a8f,_0x5aeafc){delete _0x2ac37b['uniqueId'][_0x5b2c51[_0x28bb('0xba')]];utils[_0x28bb('0xc8')](_0x2ac37b[_0x28bb('0xa2')][_0x51adb6[_0x28bb('0xb9')]],'[syncVarSet]');_0x2ac37b[_0x28bb('0xa2')][_0x51adb6[_0x28bb('0xb9')]][_0x28bb('0xbf')]+=0x1;_0x2ac37b['campaigns'][_0x51adb6[_0x28bb('0xb9')]][_0x28bb('0x111')]+=0x1;var _0x10c44c=_0x2ac37b[_0x28bb('0xa2')][_0x51adb6[_0x28bb('0xb9')]];var _0x10d9bf=new Hangup(_0x51adb6,_0x5b2c51);_0x10d9bf[_0x28bb('0x6b')]=0x13;_0x10d9bf[_0x28bb('0x6c')]=_0x28bb('0x12c');_0x10d9bf[_0x28bb('0x113')]=_0x28bb('0x114');_0x10d9bf[_0x28bb('0x121')]+=0x1;_0x10d9bf[_0x28bb('0xe1')]+=0x1;_0x10d9bf[_0x28bb('0x118')]=!![];ami['emit'](_0x28bb('0x116'),ut[_0x28bb('0x117')](_0x10d9bf,_0x28bb('0x118')));hopperUtils['createHistory'](_0x10d9bf)[_0x28bb('0x98')](loggerCatch(_0x28bb('0x11c')));if(_0x10d9bf[_0x28bb('0x11d')]+_0x10d9bf['countcongestionretry']+_0x10d9bf['countnoanswerretry']+_0x10d9bf[_0x28bb('0x120')]+_0x10d9bf[_0x28bb('0xce')]+_0x10d9bf['countabandonedretry']+_0x10d9bf['countmachineretry']+_0x10d9bf[_0x28bb('0x122')]>=_0x10c44c['dialGlobalMaxRetry']){_0x2ac37b['stateGlobal'](_0x10d9bf,_0x2b2a8f,_0x5aeafc,_0x28bb('0x124'));}else{if(_0x10d9bf[_0x28bb('0x121')]>=_0x10c44c[_0x28bb('0x125')]){_0x2ac37b['createStateFinal'](_0x10d9bf,_0x2b2a8f,_0x5aeafc,_0x28bb('0x12d'));}else{hopperUtils[_0x28bb('0xd5')]({'active':![],'countmachineretry':_0x10d9bf[_0x28bb('0x121')],'scheduledat':moment()['add'](_0x10c44c[_0x28bb('0x127')],_0x28bb('0x128'))['format'](_0x28bb('0xc4')),'ContactId':_0x10d9bf[_0x28bb('0xd6')],'ListId':_0x10d9bf['ListId'],'VoiceQueueId':_0x10d9bf[_0x28bb('0xd8')]||undefined,'CampaignId':_0x10d9bf[_0x28bb('0xd9')]||undefined})[_0x28bb('0x98')](loggerCatch(_0x28bb('0x129')));_0x2b2a8f({'reschedule':0x1});}}});}}};Dialer[_0x28bb('0x1b')][_0x28bb('0x12e')]=function(_0x4bcce8){var _0x53ad1b=this[_0x28bb('0x25')][_0x4bcce8[_0x28bb('0xba')]];var _0x561493;if(!_0x53ad1b){return;}if(_0x53ad1b[_0x28bb('0x3f')]==='ivr'){delete this['uniqueId'][_0x4bcce8[_0x28bb('0xba')]];utils['decrementOriginate'](this[_0x28bb('0xa2')][_0x53ad1b['queue']],'[syncHangup]');this[_0x28bb('0xa2')][_0x53ad1b[_0x28bb('0xb9')]][_0x28bb('0x12f')]+=0x1;if(_0x4bcce8['cause-txt']==='Normal\x20Clearing'){const _0x2ee2bd=new AgentComplete(_0x53ad1b,_0x4bcce8);_0x2ee2bd[_0x28bb('0xd9')]=this[_0x28bb('0xa2')][_0x53ad1b[_0x28bb('0xb9')]]['id'];hopperUtils[_0x28bb('0xe8')](_0x2ee2bd)[_0x28bb('0x98')](loggerCatch(_0x28bb('0x130')));hopperUtils['moveContactManagedDialer'](_0x2ee2bd)[_0x28bb('0x98')](loggerCatch(_0x28bb('0x131')));}else{_0x561493=new Hangup(_0x53ad1b,_0x4bcce8);hopperUtils[_0x28bb('0xe8')](_0x561493)[_0x28bb('0x98')](loggerCatch(_0x28bb('0x132')));hopperUtils[_0x28bb('0xc6')](_0x561493)[_0x28bb('0x98')](loggerCatch(_0x28bb('0x133')));}}else{if(isNotNull(this[_0x28bb('0xbc')][_0x53ad1b[_0x28bb('0xb9')]][_0x28bb('0x134')])){delete this[_0x28bb('0x25')][_0x4bcce8[_0x28bb('0xba')]];utils[_0x28bb('0xc8')](this[_0x28bb('0xbc')][_0x53ad1b['queue']],_0x28bb('0x135'));this[_0x28bb('0xbc')][_0x53ad1b[_0x28bb('0xb9')]][_0x28bb('0xbf')]+=0x1;this['voiceQueues'][_0x53ad1b['queue']][_0x28bb('0x111')]+=0x1;_0x561493=new Hangup(_0x53ad1b,_0x4bcce8);_0x561493[_0x28bb('0x6b')]=0x10;_0x561493[_0x28bb('0x6c')]=_0x28bb('0x136');_0x561493[_0x28bb('0x113')]=_0x28bb('0x137');hopperUtils['createHistory'](_0x561493)[_0x28bb('0x98')](loggerCatch(_0x28bb('0x132')));hopperUtils['moveContactManagedDialer'](_0x561493)[_0x28bb('0x98')](loggerCatch('[syncHangupIvr]'));}else{delete this['uniqueId'][_0x4bcce8[_0x28bb('0xba')]];utils[_0x28bb('0xc8')](this[_0x28bb('0xbc')][_0x53ad1b[_0x28bb('0xb9')]],_0x28bb('0x138'));if(_0x4bcce8['cause-txt']==='Normal\x20Clearing'){this[_0x28bb('0xbc')][_0x53ad1b[_0x28bb('0xb9')]][_0x28bb('0xbf')]+=0x1;const _0x24afef=new AgentComplete(_0x53ad1b,_0x4bcce8);_0x24afef['VoiceQueueId']=this[_0x28bb('0xbc')][_0x53ad1b[_0x28bb('0xb9')]]['id'];hopperUtils[_0x28bb('0xe8')](_0x24afef)['catch'](loggerCatch('[syncAgentComplete][createHistory]'));hopperUtils[_0x28bb('0xc6')](_0x24afef)['catch'](loggerCatch(_0x28bb('0xc7')));}else{this[_0x28bb('0xbc')][_0x53ad1b['queue']][_0x28bb('0x139')]+=0x1;_0x561493=new Hangup(_0x53ad1b,_0x4bcce8);_0x561493[_0x28bb('0x6b')]=0xc;_0x561493[_0x28bb('0x6c')]=_0x4bcce8[_0x28bb('0x13a')];_0x561493[_0x28bb('0x113')]=_0x28bb('0x13b');hopperUtils[_0x28bb('0xe8')](_0x561493)[_0x28bb('0x98')](loggerCatch(_0x28bb('0x13c')));hopperUtils[_0x28bb('0xc6')](_0x561493)[_0x28bb('0x98')](loggerCatch(_0x28bb('0x135')));}}}};Dialer[_0x28bb('0x1b')][_0x28bb('0xc')]=function(_0x2eb69a){var _0x218868=this;if(!_0x218868[_0x28bb('0x2b')][_0x2eb69a[_0x28bb('0x44')]]){_0x218868[_0x28bb('0x2b')][_0x2eb69a['name']]={'running':![]};}else if(_0x218868[_0x28bb('0x2b')][_0x2eb69a[_0x28bb('0x44')]]['running']===!![]){return;}else if(_0x218868[_0x28bb('0x2b')][_0x2eb69a[_0x28bb('0x44')]]['running']===![]){_0x218868['queuesSummary'][_0x2eb69a[_0x28bb('0x44')]][_0x28bb('0x13d')]=!![];}var _0x240188=_0x218868[_0x28bb('0xbc')][_0x2eb69a[_0x28bb('0x44')]];var _0x28f957=_0x240188[_0x28bb('0x68')]!==utils[_0x28bb('0x69')]['INACTIVE'];var _0x5b5542=utils[_0x28bb('0x13e')](_0x240188);_0x240188[_0x28bb('0x13f')]=utils[_0x28bb('0x140')](_0x240188,_0x218868[_0x28bb('0x22')]);Promise['resolve']()[_0x28bb('0x94')](function(){if(_0x240188['statusMessage']===utils['CAMPAIGN_STATUS'][_0x28bb('0x76')]){if(_0x28f957){clearPredictiveAttributes(_0x240188);_0x2eb69a[_0x28bb('0x5f')]=undefined;_0x2eb69a[_0x28bb('0x27')]=undefined;}if(_0x240188['statusMessage']===utils[_0x28bb('0x69')][_0x28bb('0x76')]){_0x2eb69a['available']=0x0;_0x2eb69a[_0x28bb('0xf0')]=0x0;_0x2eb69a['inUse']=0x0;_0x2eb69a[_0x28bb('0x141')]=0x0;_0x2eb69a[_0x28bb('0x142')]=0x0;}}else if(_0x240188[_0x28bb('0x13f')]===utils[_0x28bb('0x69')][_0x28bb('0x143')]&&!_0x5b5542){return _0x218868['ifTime'](_0x240188,!![])[_0x28bb('0x94')](function(){return _0x218868[_0x28bb('0x8a')](_0x240188,![]);})[_0x28bb('0x94')](function(){return _0x218868[_0x28bb('0xab')](_0x240188);})['catch'](function(_0x55c575){loggerSyncQueueSummary['debug']('[syncQueueSummary]',util['inspect'](_0x55c575,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x240188);});}else{clearPredictiveAttributes(_0x240188);}})[_0x28bb('0x94')](function(){var _0x45d21a=_0x2eb69a['compareToOutboundQueue'](_0x240188);if(_0x45d21a||_0x240188['queueSummaryCountersUpdated']){_0x240188[_0x28bb('0x144')]=![];_0x2eb69a[_0x28bb('0x145')](_0x240188);Object['assign'](_0x240188,_0x2eb69a);emitOutboundVoiceQueueSummary(_0x2eb69a);}_0x218868[_0x28bb('0x2b')][_0x240188[_0x28bb('0x44')]]['running']=![];})[_0x28bb('0x98')](function(_0x3f1cd0){logger[_0x28bb('0x63')](_0x28bb('0x146'),util[_0x28bb('0x42')](_0x3f1cd0,{'showHidden':![],'depth':null}));_0x218868[_0x28bb('0x2b')][_0x240188[_0x28bb('0x44')]]['running']=![];});};Dialer[_0x28bb('0x1b')]['syncQueueSummaryComplete']=_[_0x28bb('0x147')](function(){var _0x1edd13=_[_0x28bb('0x148')](this['voiceQueues'],function(_0x338500){return _0x338500[_0x28bb('0x149')];});var _0x3f930d=_[_0x28bb('0x148')](this[_0x28bb('0x21')],function(_0x21d4a6){return _0x21d4a6['online']&&_0x21d4a6[_0x28bb('0x82')]===_0x28bb('0x81');});if(_0x1edd13[_0x28bb('0x8f')]>0x0&&_0x3f930d['length']>0x0){return Promise[_0x28bb('0xa5')]()[_0x28bb('0x94')](cmHopper['handlePreviewRecallNotifications'](_[_0x28bb('0x14a')](_0x1edd13,'id'),previewRecallmeReminderInterval,_[_0x28bb('0x14a')](_0x3f930d,'id')))[_0x28bb('0x94')](function(_0x23fe49){for(var _0x5d168e=0x0;_0x5d168e<_0x23fe49['length'];_0x5d168e++){var _0x3fc019=_0x23fe49[_0x5d168e][_0x28bb('0x14b')][_0x28bb('0x44')];if(_0x3fc019)io['to'](util[_0x28bb('0x78')]('user:%s',_0x3fc019))[_0x28bb('0x115')](_0x28bb('0x14c'),{'hopper':_0x23fe49[_0x5d168e]});}})['catch'](function(_0x4b4c57){logger[_0x28bb('0x63')](_0x28bb('0x14d'),_0x4b4c57);});}},0x3c*0x3e8,{'leading':!![]});Dialer[_0x28bb('0x1b')]['loopClearZombieChannels']=function(){var _0x153435=this;setInterval(function(){_0x153435[_0x28bb('0x14e')](_0x153435[_0x28bb('0x25')],_0x28bb('0x14f'));_0x153435[_0x28bb('0x14e')](_0x153435[_0x28bb('0xe9')],_0x28bb('0x150'));},0x32c8);};Dialer['prototype'][_0x28bb('0x14e')]=function(_0x241383,_0x4654b8){var _0x227aa4=this;for(var _0x320183 in _0x241383){if(typeof _0x241383[_0x320183]!==_0x28bb('0xa3')){this[_0x28bb('0x1f')][_0x28bb('0x1c')](function(){if(!_['isNil'](_0x241383[_0x320183])){return ami[_0x28bb('0x91')]({'action':_0x28bb('0x82'),'channel':_0x241383[_0x320183][_0x28bb('0xea')]})[_0x28bb('0x98')](function(_0x44fd46){if(_0x44fd46['message']===_0x28bb('0x151')){setTimeout(function(){if(_0x241383[_0x320183]&&_0x241383[_0x320183][_0x28bb('0x3f')]!==_0x28bb('0xbb')){utils[_0x28bb('0xc8')](_0x227aa4[_0x28bb('0xbc')][_0x241383[_0x320183][_0x28bb('0xb9')]],_0x28bb('0x152'));logger['error'](_0x28bb('0x153'),_0x4654b8,_0x320183,_0x241383[_0x320183][_0x28bb('0xb9')]);delete _0x241383[_0x320183];}if(_0x241383[_0x320183]&&_0x241383[_0x320183][_0x28bb('0x3f')]===_0x28bb('0xbb')){utils[_0x28bb('0xc8')](_0x227aa4['campaigns'][_0x241383[_0x320183][_0x28bb('0xb9')]],_0x28bb('0x152'));logger[_0x28bb('0x63')](_0x28bb('0x154'),_0x4654b8,_0x320183,_0x241383[_0x320183][_0x28bb('0xb9')]);delete _0x241383[_0x320183];}},0x2328);}});}});}}};Dialer[_0x28bb('0x1b')]['getVoiceQueueRtPauses']=function(_0x4e05b4){return Promise[_0x28bb('0xa5')]()[_0x28bb('0x94')](voiceQueueRt['getVoiceQueueRtPauses'](_0x4e05b4))[_0x28bb('0x98')](loggerCatch(_0x28bb('0x155')));};Dialer[_0x28bb('0x1b')][_0x28bb('0x156')]=function(_0x301689,_0x35bc83,_0x256935){var _0x6f6ed={'state':0x19,'statedesc':_0x28bb('0x157')};utils[_0x28bb('0xc8')](_0x35bc83,'[emptyContact]'+_0x301689);this['saveInDb'](_['merge'](_0x6f6ed,_[_0x28bb('0x72')](_0x256935,['ContactId',_0x28bb('0xd7'),_0x28bb('0x158'),'VoiceQueueId','CampaignId'])),_0x28bb('0x159'),_0x28bb('0x15a'));logger[_0x28bb('0x63')](_0x301689);};Dialer[_0x28bb('0x1b')][_0x28bb('0x119')]=function(_0x283adb,_0x2b3ddb,_0x3c7ad5){hopperUtils[_0x28bb('0xe8')](_0x283adb)[_0x28bb('0x98')](loggerCatch(_0x2b3ddb));hopperUtils[_0x28bb('0xc6')](_0x283adb)[_0x28bb('0x98')](loggerCatch(_0x3c7ad5));};Dialer[_0x28bb('0x1b')][_0x28bb('0xd4')]=function(_0x4bf57b,_0x14bef0){hopperUtils[_0x28bb('0xe8')](_0x4bf57b)[_0x28bb('0x98')](loggerCatch(_0x28bb('0xc5')));if(_0x14bef0==0x0){hopperUtils[_0x28bb('0xc6')](_0x4bf57b)[_0x28bb('0x98')](loggerCatch('[syncQueueCallerAbandon]\x20[Drop]'));}};Dialer[_0x28bb('0x1b')][_0x28bb('0x14d')]=function(_0x214736){return Promise[_0x28bb('0xa5')]()[_0x28bb('0x94')](cmHopper[_0x28bb('0x15b')](_0x214736['id'],previewRecallmeReminderInterval))[_0x28bb('0x94')](function(_0x2775d7){for(var _0x29aab6=0x0;_0x29aab6<_0x2775d7[_0x28bb('0x8f')];_0x29aab6++){var _0xb05894=_0x2775d7[_0x29aab6][_0x28bb('0x14b')][_0x28bb('0x44')];if(_0xb05894)io['to'](util[_0x28bb('0x78')](_0x28bb('0x15c'),_0xb05894))['emit'](_0x28bb('0x14c'),{'hopper':_0x2775d7[_0x29aab6]});}})[_0x28bb('0x98')](function(){});};Dialer['prototype'][_0x28bb('0xa9')]=function(_0x4f4cd6){var _0x21d773=this;return function(){_0x21d773[_0x28bb('0x15d')](_0x4f4cd6);};};Dialer[_0x28bb('0x1b')][_0x28bb('0x15e')]=function(_0x4ecd04,_0x3f61e5){var _0x206991=this;var _0x3d8c5c=uuid['v4']();this['actions'][_0x3d8c5c]=new Action(_0x4ecd04,_0x3f61e5,_0x3d8c5c);return new Promise(function(_0x57597d,_0x182a98){if(_[_0x28bb('0x53')](_0x4ecd04)&&typeof _0x4ecd04!==_0x28bb('0x15f')){return _0x182a98(msgResponse(_0x28bb('0x160'),_0x28bb('0x8b'),'voiceQueue\x20is\x20undefine'));}if(_['isUndefined'](_0x3f61e5[_0x28bb('0x161')])||_0x3f61e5[_0x28bb('0x161')]===null){return _0x182a98(msgResponse(_0x28bb('0x160'),'Failure',_0x28bb('0x162')));}var _0xa15ad9={'XMD-CALLERID':_0x206991[_0x28bb('0xe9')][_0x3d8c5c][_0x28bb('0x163')](),'XMD-AGI':_0x4ecd04[_0x28bb('0x134')]?util[_0x28bb('0x78')](_0x28bb('0x164'),ipAgi,_0x4ecd04[_0x28bb('0x134')]):_0x28bb('0x165'),'XMD-AGIAFTER':_0x4ecd04[_0x28bb('0xc2')]?util['format']('\x22agi://%s/square,%s\x22',ipAgi,_0x4ecd04[_0x28bb('0xc2')]):'NONE','XMD-QUEUE':utils[_0x28bb('0x166')](_0x4ecd04)?util[_0x28bb('0x78')](_0x28bb('0x167'),_0x4ecd04[_0x28bb('0x44')],_0x4ecd04[_0x28bb('0x168')]||'',_0x4ecd04[_0x28bb('0xc3')]?'c':'',_0x4ecd04[_0x28bb('0xcb')]||0x3):_0x28bb('0x165'),'XMD-CONTACTID':_0x3f61e5[_0x28bb('0xd6')],'XMD-CDRTYPE':_0x28bb('0x8'),'CALLERID(all)':_0x206991['actions'][_0x3d8c5c]['getCaller'](),'XMD-AMD':_0x4ecd04['dialAMDActive']?_0x28bb('0x143'):'NONE','XMD-DESTINATION':_0x28bb('0x10c')};if(_0x4ecd04[_0x28bb('0x10d')]){_0xa15ad9[_0x28bb('0x169')]=_0x4ecd04[_0x28bb('0x16a')]||0x9c4;_0xa15ad9[_0x28bb('0x16b')]=_0x4ecd04['dialAMDGreeting']||0x5dc;_0xa15ad9['XMD-AMDAFTERGREETINGSILENCE']=_0x4ecd04[_0x28bb('0x16c')]||0x320;_0xa15ad9[_0x28bb('0x16d')]=_0x4ecd04['dialAMDTotalAnalysisTime']||0x1388;_0xa15ad9[_0x28bb('0x16e')]=_0x4ecd04['dialAMDMinWordLength']||0x64;_0xa15ad9[_0x28bb('0x16f')]=_0x4ecd04[_0x28bb('0x170')]||0x32;_0xa15ad9['XMD-AMDMAXIMUMNUMBEROFWORDS']=_0x4ecd04[_0x28bb('0x171')]||0x3;_0xa15ad9[_0x28bb('0x172')]=_0x4ecd04[_0x28bb('0x173')]||0x100;_0xa15ad9[_0x28bb('0x174')]=_0x4ecd04[_0x28bb('0x175')]||0x1388;}if(utils[_0x28bb('0x166')](_0x4ecd04)){_0xa15ad9[_0x28bb('0x176')]=_0x3f61e5[_0x28bb('0xd8')];}else{_0xa15ad9[_0x28bb('0x177')]=_0x3f61e5['CampaignId'];}var _0x58e5d3=utils[_0x28bb('0x178')](_0x3f61e5['Contact']);Object['assign'](_0xa15ad9,_0x58e5d3);var _0x1fbda7=_0x206991['isTrunkReachable'](_0x4ecd04[_0x28bb('0x84')])?utils['getCallerId'](_0x4ecd04['Trunk'][_0x28bb('0x179')],_0x4ecd04['dialOriginateCallerIdName'],_0x4ecd04[_0x28bb('0x17a')]>0x0?utils[_0x28bb('0x17b')](_0x4ecd04[_0x28bb('0x17c')],_0x4ecd04[_0x28bb('0x17a')]):_0x4ecd04[_0x28bb('0x17c')]):utils[_0x28bb('0x17d')](_['isNil'](_0x4ecd04[_0x28bb('0x17e')])?_0x4ecd04[_0x28bb('0x84')][_0x28bb('0x179')]:_0x4ecd04['TrunkBackup'][_0x28bb('0x179')],_0x4ecd04[_0x28bb('0x17f')],_0x4ecd04['dialRandomLastDigitCallerIdNumber']>0x0?utils[_0x28bb('0x17b')](_0x4ecd04[_0x28bb('0x17c')],_0x4ecd04['dialRandomLastDigitCallerIdNumber']):_0x4ecd04[_0x28bb('0x17c')]);if(_0x1fbda7){_0xa15ad9[_0x28bb('0x180')]=_0x206991['actions'][_0x3d8c5c][_0x28bb('0x181')]=utils[_0x28bb('0x182')](_0x1fbda7);_0xa15ad9['XMD-ORIGINATECALLERIDNUM']=_0x3f61e5[_0x28bb('0x161')];}_0x4ecd04['variables']=_0xa15ad9;return ami[_0x28bb('0x91')]({'actionid':_0x3d8c5c,'action':_0x28bb('0x160'),'channel':_0x206991[_0x28bb('0x7f')](_0x4ecd04['Trunk'])?util['format']('SIP/%s/%s%s',_0x4ecd04[_0x28bb('0x84')][_0x28bb('0x44')],isNotNull(_0x4ecd04[_0x28bb('0x183')])?_0x4ecd04[_0x28bb('0x183')][_0x28bb('0x184')]()||'':'',_0x4ecd04[_0x28bb('0x185')]>0x0?_0x3f61e5[_0x28bb('0x161')][_0x28bb('0x186')](_0x4ecd04[_0x28bb('0x185')]):_0x3f61e5['phone']):util[_0x28bb('0x78')](_0x28bb('0x187'),_['isNil'](_0x4ecd04[_0x28bb('0x17e')])?_0x4ecd04[_0x28bb('0x84')][_0x28bb('0x44')]:_0x4ecd04[_0x28bb('0x17e')][_0x28bb('0x44')],isNotNull(_0x4ecd04[_0x28bb('0x183')])?_0x4ecd04[_0x28bb('0x183')][_0x28bb('0x184')]()||'':'',_0x4ecd04[_0x28bb('0x185')]>0x0?_0x3f61e5[_0x28bb('0x161')][_0x28bb('0x186')](_0x4ecd04[_0x28bb('0x185')]):_0x3f61e5[_0x28bb('0x161')]),'callerid':_0x1fbda7,'Exten':_0x28bb('0x10c'),'Context':_0x28bb('0x188'),'Priority':'1','variable':_0xa15ad9,'timeout':(_0x4ecd04[_0x28bb('0x189')]||0x1e)*0x3e8,'async':!![],'channelid':_0x3d8c5c})[_0x28bb('0x94')](function(_0xe3d73a){return _0x57597d(_0xe3d73a);})[_0x28bb('0x98')](function(_0x3072b5){_0x4ecd04['outboundOriginateFailureCallsDay']+=0x1;var _0x4e83fd=new History(_0x206991['actions'][_0x3d8c5c]);logger['error'](util[_0x28bb('0x78')](_0x28bb('0x18a'),JSON[_0x28bb('0x71')](_0x3072b5)));_0x4e83fd['state']=0xe;_0x4e83fd['statedesc']=_0x28bb('0x18b');_0x4e83fd[_0x28bb('0x6e')]=moment()[_0x28bb('0x78')](_0x28bb('0xc4'));_0x4e83fd[_0x28bb('0x6d')]=_0x4e83fd[_0x28bb('0x6e')];hopperUtils[_0x28bb('0xe8')](_0x4e83fd)['catch'](loggerCatch(_0x28bb('0x18c')));_0x206991[_0x28bb('0xc6')](_0x4e83fd)[_0x28bb('0x98')](loggerCatch(_0x28bb('0x18c')))['finally'](function(){delete _0x206991[_0x28bb('0xe9')][_0x3d8c5c];return _0x182a98(msgResponse(_0x28bb('0x160'),_0x28bb('0x7e'),_0x28bb('0x18d')));});});});};Dialer[_0x28bb('0x1b')][_0x28bb('0x18e')]=function(_0x3970c8,_0x1f33ad,_0x1d542a){var _0x3dcf85=new History(_0x1f33ad);if(_0x3dcf85[_0x28bb('0x11d')]+_0x3dcf85[_0x28bb('0x11e')]+_0x3dcf85[_0x28bb('0x11f')]+_0x3dcf85[_0x28bb('0x120')]+_0x3dcf85[_0x28bb('0xce')]+_0x3dcf85[_0x28bb('0xe0')]+_0x3dcf85['countmachineretry']+_0x3dcf85[_0x28bb('0x122')]>=_0x1d542a[_0x28bb('0x123')]-0x1){return!![];}switch(_0x3970c8){case 0x3:if(_0x3dcf85[_0x28bb('0x11f')]>=_0x1d542a[_0x28bb('0x18f')]-0x1){return!![];}hopperUtils[_0x28bb('0xd5')]({'active':![],'countnoanswerretry':_0x3dcf85[_0x28bb('0x11f')]+=0x1,'scheduledat':moment()[_0x28bb('0xe5')](_0x1d542a[_0x28bb('0x190')],'minutes')[_0x28bb('0x78')](_0x28bb('0xc4')),'ContactId':_0x3dcf85[_0x28bb('0xd6')],'ListId':_0x3dcf85[_0x28bb('0xd7')],'VoiceQueueId':_0x3dcf85[_0x28bb('0xd8')]||undefined,'CampaignId':_0x3dcf85[_0x28bb('0xd9')]||undefined})[_0x28bb('0x98')](loggerCatch('[rescheduleContact][NoAnswer]'));break;case 0x5:if(_0x3dcf85['countbusyretry']>=_0x1d542a[_0x28bb('0x191')]-0x1){return!![];}hopperUtils[_0x28bb('0xd5')]({'active':![],'countbusyretry':_0x3dcf85[_0x28bb('0x11d')]+=0x1,'scheduledat':moment()[_0x28bb('0xe5')](_0x1d542a['dialBusyRetryFrequency'],_0x28bb('0x128'))['format'](_0x28bb('0xc4')),'ContactId':_0x3dcf85[_0x28bb('0xd6')],'ListId':_0x3dcf85['ListId'],'VoiceQueueId':_0x3dcf85[_0x28bb('0xd8')]||undefined,'CampaignId':_0x3dcf85[_0x28bb('0xd9')]||undefined})[_0x28bb('0x98')](loggerCatch(_0x28bb('0x192')));break;case 0x8:if(_0x3dcf85[_0x28bb('0x11e')]>=_0x1d542a[_0x28bb('0x193')]-0x1){return!![];}hopperUtils[_0x28bb('0xd5')]({'active':![],'countcongestionretry':_0x3dcf85[_0x28bb('0x11e')]+=0x1,'scheduledat':moment()[_0x28bb('0xe5')](_0x1d542a[_0x28bb('0x194')],'minutes')[_0x28bb('0x78')](_0x28bb('0xc4')),'ContactId':_0x3dcf85[_0x28bb('0xd6')],'ListId':_0x3dcf85[_0x28bb('0xd7')],'VoiceQueueId':_0x3dcf85[_0x28bb('0xd8')]||undefined,'CampaignId':_0x3dcf85[_0x28bb('0xd9')]||undefined})[_0x28bb('0x98')](loggerCatch(_0x28bb('0x195')));break;case 0x0:if(_0x3dcf85[_0x28bb('0x120')]>=_0x1d542a[_0x28bb('0x196')]-0x1){return!![];}else{hopperUtils[_0x28bb('0xd5')]({'active':![],'countnosuchnumberretry':_0x3dcf85['countnosuchnumberretry']+=0x1,'scheduledat':moment()['add'](_0x1d542a[_0x28bb('0x197')],_0x28bb('0x128'))['format'](_0x28bb('0xc4')),'ContactId':_0x3dcf85[_0x28bb('0xd6')],'ListId':_0x3dcf85[_0x28bb('0xd7')],'VoiceQueueId':_0x3dcf85[_0x28bb('0xd8')]||undefined,'CampaignId':_0x3dcf85[_0x28bb('0xd9')]||undefined})[_0x28bb('0x98')](loggerCatch('[rescheduleContact][NoSuchNumber]'));}break;case 0xa:if(_0x3dcf85['countdropretry']>=_0x1d542a[_0x28bb('0xd3')]-0x1){return!![];}hopperUtils[_0x28bb('0xd5')]({'active':![],'countdropretry':_0x3dcf85[_0x28bb('0xce')]+=0x1,'scheduledat':moment()[_0x28bb('0xe5')](_0x1d542a[_0x28bb('0xcf')],_0x28bb('0x128'))[_0x28bb('0x78')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x3dcf85['ContactId'],'ListId':_0x3dcf85[_0x28bb('0xd7')],'VoiceQueueId':_0x3dcf85[_0x28bb('0xd8')]||undefined,'CampaignId':_0x3dcf85[_0x28bb('0xd9')]||undefined})['catch'](loggerCatch(_0x28bb('0xda')));break;case 0xb:if(_0x3dcf85[_0x28bb('0xe0')]>=_0x1d542a['dialAbandonedMaxRetry']-0x1){return!![];}hopperUtils[_0x28bb('0xd5')]({'active':![],'countabandonedretry':_0x3dcf85[_0x28bb('0xe0')]+=0x1,'scheduledat':moment()[_0x28bb('0xe5')](_0x1d542a[_0x28bb('0xe2')],_0x28bb('0x128'))[_0x28bb('0x78')](_0x28bb('0xc4')),'ContactId':_0x3dcf85['ContactId'],'ListId':_0x3dcf85[_0x28bb('0xd7')],'VoiceQueueId':_0x3dcf85[_0x28bb('0xd8')]||undefined,'CampaignId':_0x3dcf85[_0x28bb('0xd9')]||undefined})[_0x28bb('0x98')](loggerCatch('[rescheduleContact][Abandoned]'));break;case 0x13:if(_0x3dcf85[_0x28bb('0x121')]>=_0x1d542a[_0x28bb('0x125')]-0x1){return!![];}hopperUtils[_0x28bb('0xd5')]({'active':![],'countmachineretry':_0x3dcf85['countmachineretry']+=0x1,'scheduledat':moment()[_0x28bb('0xe5')](_0x1d542a['dialMachineRetryFrequency'],_0x28bb('0x128'))[_0x28bb('0x78')](_0x28bb('0xc4')),'ContactId':_0x3dcf85['ContactId'],'ListId':_0x3dcf85[_0x28bb('0xd7')],'VoiceQueueId':_0x3dcf85['VoiceQueueId']||undefined,'CampaignId':_0x3dcf85['CampaignId']||undefined})[_0x28bb('0x98')](loggerCatch('[rescheduleContact][Machine]'));break;case 0x14:if(_0x3dcf85[_0x28bb('0x122')]>=_0x1d542a[_0x28bb('0x198')]-0x1){return!![];}hopperUtils[_0x28bb('0xd5')]({'active':![],'countagentrejectretry':_0x3dcf85[_0x28bb('0x122')]+=0x1,'scheduledat':moment()[_0x28bb('0xe5')](_0x1d542a[_0x28bb('0x199')],'minutes')['format'](_0x28bb('0xc4')),'ContactId':_0x3dcf85[_0x28bb('0xd6')],'ListId':_0x3dcf85[_0x28bb('0xd7')],'VoiceQueueId':_0x3dcf85['VoiceQueueId']||undefined,'CampaignId':_0x3dcf85['CampaignId']||undefined})['catch'](loggerCatch(_0x28bb('0x19a')));break;default:return!![];}};Dialer['prototype'][_0x28bb('0x108')]=function(_0x2424a6,_0x1af9f8,_0xa333a4){var _0x5bd5b3=this;var _0x326103=new History(_0x2424a6);var _0x593bf5=![];var _0x36efee;var _0x410e12;return new Promise(function(_0x3b9c4a,_0x441f64){if(_[_0x28bb('0x53')](_0x1af9f8)&&typeof _0x1af9f8!=='object'){return _0x441f64(msgResponse(_0x28bb('0x19b'),'Failure','entity\x20is\x20undefine'));}if(_[_0x28bb('0x53')](_0xa333a4)&&typeof _0xa333a4!==_0x28bb('0x15f')){return _0x441f64(msgResponse('[callProgressDetecting]',_0x28bb('0x8b'),_0x28bb('0x19c')));}hopperUtils['verifyAdditionalPhones'](_0x326103,_0xa333a4[_0x28bb('0x19d')],_0x1af9f8)[_0x28bb('0x94')](function(_0x2905a2){if(_0x2905a2[_0x28bb('0xd2')]==0x1)_0x593bf5=!![];switch(_0xa333a4[_0x28bb('0x19d')]){case'0':_0x1af9f8[_0x28bb('0x19e')]+=0x1;_0x326103['state']=0x0;_0x326103[_0x28bb('0x6c')]=_0x28bb('0x19f');_0x326103[_0x28bb('0x120')]+=0x1;_0x326103['countglobal']+=0x1;ami['emit']('custom:agentnosuchnumber',ut[_0x28bb('0x117')](_0x2424a6,_0x28bb('0x1a0')));_0x36efee=_0x1af9f8[_0x28bb('0x197')];_0x410e12=_0x1af9f8[_0x28bb('0xe3')];hopperUtils[_0x28bb('0xe8')](_0x326103)[_0x28bb('0x98')](loggerCatch(_0x28bb('0x11c')));if(_0x5bd5b3['checkRetriveMax'](0x0,_0x2424a6,_0x1af9f8)&&!_0x593bf5){if(_0x326103[_0x28bb('0x120')]>=_0x1af9f8[_0x28bb('0x196')]){_0x5bd5b3[_0x28bb('0x126')](_0x326103,_0x3b9c4a,_0x441f64,'reason\x200\x20no\x20such\x20number....');}else{_0x5bd5b3['stateGlobal'](_0x326103,_0x3b9c4a,_0x441f64,_0x28bb('0x1a1'));}}break;case'3':_0x1af9f8[_0x28bb('0x1a2')]+=0x1;_0x326103[_0x28bb('0x6b')]=0x3;_0x326103[_0x28bb('0x6c')]=_0x28bb('0x1a3');_0x326103[_0x28bb('0x11f')]+=0x1;_0x326103[_0x28bb('0xe1')]+=0x1;var _0x2a597d=ut[_0x28bb('0x1a4')](_0x2424a6,_0x1af9f8);ami[_0x28bb('0x115')]('custom:agentnoanswer',_0x2a597d);_0x36efee=_0x1af9f8[_0x28bb('0x190')];_0x410e12=_0x1af9f8[_0x28bb('0xe3')];hopperUtils[_0x28bb('0xe8')](_0x326103)['catch'](loggerCatch(_0x28bb('0x1a5')));if(_0x5bd5b3['checkRetriveMax'](0x3,_0x2424a6,_0x1af9f8)&&!_0x593bf5){if(_0x326103[_0x28bb('0x11f')]>=_0x1af9f8['dialNoAnswerMaxRetry']){_0x5bd5b3[_0x28bb('0x126')](_0x326103,_0x3b9c4a,_0x441f64,_0x28bb('0x1a6'));}else{_0x5bd5b3[_0x28bb('0x1a7')](_0x326103,_0x3b9c4a,_0x441f64,_0x28bb('0x1a6'));}}break;case'5':_0x1af9f8[_0x28bb('0x1a8')]+=0x1;_0x326103[_0x28bb('0x6b')]=0x5;_0x326103[_0x28bb('0x6c')]='Busy';_0x326103[_0x28bb('0x11d')]+=0x1;_0x326103[_0x28bb('0xe1')]+=0x1;ami[_0x28bb('0x115')](_0x28bb('0x1a9'),ut[_0x28bb('0x117')](_0x2424a6,_0x28bb('0x1aa')));_0x36efee=_0x1af9f8[_0x28bb('0x1ab')];_0x410e12=_0x1af9f8['callAdditionalPhoneAfterMin'];hopperUtils['createHistory'](_0x326103)[_0x28bb('0x98')](loggerCatch('[syncAgentComplete][createHistory][5]'));if(_0x5bd5b3['checkRetriveMax'](0x5,_0x2424a6,_0x1af9f8)&&!_0x593bf5){if(_0x326103[_0x28bb('0x11d')]>=_0x1af9f8[_0x28bb('0x191')]){_0x5bd5b3['createStateFinal'](_0x326103,_0x3b9c4a,_0x441f64,_0x28bb('0x1ac'));}else{_0x5bd5b3[_0x28bb('0x1a7')](_0x326103,_0x3b9c4a,_0x441f64,_0x28bb('0x1ac'));}}break;case'8':_0x1af9f8[_0x28bb('0x1ad')]+=0x1;_0x326103[_0x28bb('0x6b')]=0x8;_0x326103[_0x28bb('0x6c')]=_0x28bb('0x1ae');_0x326103[_0x28bb('0x11e')]+=0x1;_0x326103['countglobal']+=0x1;_0x36efee=_0x1af9f8[_0x28bb('0x194')];_0x410e12=_0x1af9f8['callAdditionalPhoneAfterMin'];ami[_0x28bb('0x115')](_0x28bb('0x1af'),ut[_0x28bb('0x117')](_0x2424a6,_0x28bb('0x1b0')));hopperUtils[_0x28bb('0xe8')](_0x326103)[_0x28bb('0x98')](loggerCatch(_0x28bb('0x1b1')));if(_0x5bd5b3['checkRetriveMax'](0x8,_0x2424a6,_0x1af9f8)&&!_0x593bf5){if(_0x326103[_0x28bb('0x11e')]>=_0x1af9f8[_0x28bb('0x193')]){_0x5bd5b3[_0x28bb('0x126')](_0x326103,_0x3b9c4a,_0x441f64,_0x28bb('0x1b2'));}else{_0x5bd5b3[_0x28bb('0x1a7')](_0x326103,_0x3b9c4a,_0x441f64,_0x28bb('0x1b2'));}}break;case'11':_0x1af9f8['outboundAbandonedCallsDay']+=0x1;_0x326103[_0x28bb('0x6b')]=0xb;_0x326103[_0x28bb('0x6c')]=_0x28bb('0xe7');_0x326103[_0x28bb('0xe0')]+=0x1;_0x326103[_0x28bb('0xe1')]+=0x1;_0x36efee=_0x1af9f8[_0x28bb('0xe2')];_0x410e12=_0x1af9f8[_0x28bb('0xe3')];hopperUtils[_0x28bb('0xe8')](_0x326103)[_0x28bb('0x98')](loggerCatch(_0x28bb('0x1b3')));if(_0x5bd5b3[_0x28bb('0x18e')](0xb,_0x2424a6,_0x1af9f8)&&!_0x593bf5){if(_0x326103[_0x28bb('0xe0')]>=_0x1af9f8['dialAbandonedMaxRetry']){_0x5bd5b3[_0x28bb('0x126')](_0x326103,_0x3b9c4a,_0x441f64,'reason\x2011\x20abandoned');}else{_0x5bd5b3['stateGlobal'](_0x326103,_0x3b9c4a,_0x441f64,_0x28bb('0x1b4'));}}break;case'20':_0x1af9f8[_0x28bb('0x1b5')]+=0x1;_0x326103[_0x28bb('0x6b')]=0x14;_0x326103[_0x28bb('0x6c')]='AgentReject';_0x326103[_0x28bb('0x122')]+=0x1;_0x326103['countglobal']+=0x1;_0x36efee=_0x1af9f8['dialAgentRejectRetryFrequency'];_0x410e12=_0x1af9f8[_0x28bb('0xe3')];ami[_0x28bb('0x115')]('custom:agentreject',ut[_0x28bb('0x117')](_0x2424a6,_0x28bb('0x1b6')));hopperUtils[_0x28bb('0xe8')](_0x326103)[_0x28bb('0x98')](loggerCatch(_0x28bb('0x1b7')));if(_0x5bd5b3[_0x28bb('0x18e')](0x14,_0x2424a6,_0x1af9f8)&&!_0x593bf5){if(_0x326103[_0x28bb('0x122')]>=_0x1af9f8['dialAgentRejectMaxRetry']){_0x5bd5b3[_0x28bb('0x126')](_0x326103,_0x3b9c4a,_0x441f64,'reason\x2020\x20agentreject');}else{_0x5bd5b3[_0x28bb('0x1a7')](_0x326103,_0x3b9c4a,_0x441f64,_0x28bb('0x1b8'));}}break;default:_0x1af9f8[_0x28bb('0x139')]+=0x1;_0x326103[_0x28bb('0x6b')]=0xc;_0x326103[_0x28bb('0x6c')]=_0xa333a4[_0x28bb('0x19d')];_0x36efee=_0x1af9f8[_0x28bb('0x199')];_0x410e12=_0x1af9f8[_0x28bb('0xe3')];hopperUtils[_0x28bb('0xe8')](_0x326103)[_0x28bb('0x98')](loggerCatch(_0x28bb('0x1b9')));if(_0x5bd5b3[_0x28bb('0x18e')](_0xa333a4[_0x28bb('0x19d')],_0x2424a6,_0x1af9f8)&&!_0x593bf5){if(_0x326103[_0x28bb('0x11d')]+_0x326103[_0x28bb('0x11e')]+_0x326103[_0x28bb('0x11f')]+_0x326103['countnosuchnumberretry']+_0x326103[_0x28bb('0xce')]+_0x326103[_0x28bb('0xe0')]+_0x326103[_0x28bb('0x121')]+_0x326103[_0x28bb('0x122')]>=_0x1af9f8['dialGlobalMaxRetry']){_0x5bd5b3[_0x28bb('0x1a7')](_0x326103,_0x3b9c4a,_0x441f64,_0xa333a4[_0x28bb('0x19d')]);}else{_0x5bd5b3[_0x28bb('0x126')](_0x326103,_0x3b9c4a,_0x441f64,_0xa333a4[_0x28bb('0x19d')]);}}}})[_0x28bb('0x94')](function(){if(_0x593bf5){hopperUtils['swapAdditionalPhones'](_0x326103,_0x36efee,_0x410e12)[_0x28bb('0x94')](function(){return _0x3b9c4a(0x1);});}});});};Dialer[_0x28bb('0x1b')][_0x28bb('0x1a7')]=function(_0x3ca136,_0x5d9668,_0xb08982,_0x149b30){var _0x5cca4c=new Final(_0x3ca136);_0x5cca4c[_0x28bb('0x6b')]=0xf;_0x5cca4c['statedesc']=_0x28bb('0x1ba');this[_0x28bb('0x126')](_0x5cca4c,_0x5d9668,_0xb08982,_0x149b30);};Dialer['prototype'][_0x28bb('0x126')]=function(_0x41fdd0,_0x51d1c6,_0x234c7d,_0x2ef6f3){hopperUtils[_0x28bb('0xc6')](_0x41fdd0)[_0x28bb('0x94')](function(){return _0x51d1c6(msgResponse(_0x28bb('0x19b'),_0x28bb('0x106'),_0x2ef6f3));})['catch'](function(){return _0x234c7d(msgResponse(_0x28bb('0x1bb'),_0x28bb('0x8b'),_0x28bb('0x1bc')));});};Dialer['prototype']['predictive']=function(_0x10887e){var _0x418ae0=_0x10887e[_0x28bb('0x1bd')]/0x64;var _0x1a91e4=_0x10887e['outboundDropCallsDayTimeout']/(_0x10887e['outboundDropCallsDayTimeout']+_0x10887e[_0x28bb('0xbf')]);var _0x490d5f=Math['round'](_0x10887e[_0x28bb('0x1be')]*(_0x10887e[_0x28bb('0x1bf')]/0x64));var _0x3d4d16=Math[_0x28bb('0x1c0')](_0x10887e[_0x28bb('0x1be')]*(_0x10887e[_0x28bb('0x1c1')]/0x64));var _0x404d8d=_0x10887e[_0x28bb('0x1c2')]+_0x10887e[_0x28bb('0x141')];var _0x129506=Math['floor'](_0x10887e['erlangCalls']*_0x10887e['erlangAbandonmentRate']*_0x10887e[_0x28bb('0x1c3')]*_0x10887e[_0x28bb('0x1c4')]);if(_[_0x28bb('0x53')](_0x10887e[_0x28bb('0x27')])){if(!_[_0x28bb('0x53')](_0x10887e[_0x28bb('0x5f')])){_0x10887e[_0x28bb('0x5f')]=undefined;loggerPredictive[_0x28bb('0x63')]('[startMethodPredictive][StartProgressive]',_0x28bb('0x1c5'));}if(!_['isUndefined'](_0x10887e['handlePredictive'])){loggerPredictive[_0x28bb('0x63')]('[startMethodPredictive][StartProgressive]',_0x28bb('0x1c6'));clearInterval(_0x10887e['handlePredictive']);_0x10887e[_0x28bb('0x61')]=undefined;}_0x10887e[_0x28bb('0x27')]=moment()[_0x28bb('0x78')]('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive[_0x28bb('0x47')](_0x10887e[_0x28bb('0x44')],_0x28bb('0x1c7'),_0x10887e[_0x28bb('0x27')]);this['handlePower'](_0x10887e,0x1);}else if(ifInterval(_0x10887e['dialPredictiveInterval'],_0x10887e['startProgressive'])){this[_0x28bb('0xad')](_0x10887e,0x1);loggerPredictiveCalls[_0x28bb('0x47')](_0x28bb('0x1c8'),_0x10887e[_0x28bb('0x27')],_0x10887e[_0x28bb('0x44')]);_0x10887e[_0x28bb('0x58')]=0x0;_0x10887e[_0x28bb('0xcc')]=0x0;}else if(_0x418ae0<_0x1a91e4&&_0x10887e[_0x28bb('0x1c9')]==='dropRate'){clearPredictiveAttributes(_0x10887e);loggerPredictive[_0x28bb('0x47')](_0x28bb('0x1ca'),_0x28bb('0x1cb'),_0x1a91e4,_0x28bb('0x27'),_0x10887e[_0x28bb('0x44')]);}else if(_0x129506<_0x10887e[_0x28bb('0xcc')]&&_0x10887e[_0x28bb('0x1c9')]===_0x28bb('0x1cc')){clearPredictiveAttributes(_0x10887e);loggerPredictive[_0x28bb('0x47')](_0x28bb('0x1cd'),_0x28bb('0x1ce'),_0x129506,'Drop\x20in\x20this\x20interval',_0x10887e[_0x28bb('0xcc')],_0x28bb('0x27'),_0x10887e[_0x28bb('0x44')]);}else if(!ifInterval(_0x10887e[_0x28bb('0x1cf')],_0x10887e[_0x28bb('0x27')])&&_['isUndefined'](_0x10887e[_0x28bb('0x5f')])&&!_['isUndefined'](_0x10887e[_0x28bb('0x27')])){_0x10887e[_0x28bb('0x5f')]=moment()[_0x28bb('0x78')](_0x28bb('0xc4'));loggerPredictive['info'](_0x10887e['name'],'started\x20in\x20predictive\x20at',_0x10887e[_0x28bb('0x5f')]);hopperUtils['avgHandleTime'](_0x10887e['dialPredictiveInterval'])['then'](this[_0x28bb('0x1d0')](_0x10887e))['then'](mergeDataErlangB(_0x10887e))[_0x28bb('0x94')](this[_0x28bb('0x1d1')](_0x10887e))[_0x28bb('0x98')](loggerCatchPredictive('Predictive\x20after\x20first\x20interval',_0x10887e));}else if(!ifInterval(_0x10887e[_0x28bb('0x1cf')],_0x10887e[_0x28bb('0x5f')])){_0x10887e[_0x28bb('0xcc')]=0x0;_0x10887e['startPredictive']=moment()['format'](_0x28bb('0xc4'));loggerPredictive[_0x28bb('0x47')](_0x10887e[_0x28bb('0x44')],_0x28bb('0x1d2'),_0x10887e[_0x28bb('0x5f')]);clearInterval(_0x10887e[_0x28bb('0x61')]);_0x10887e[_0x28bb('0x61')]=undefined;hopperUtils['avgHandleTime'](_0x10887e[_0x28bb('0x1cf')])[_0x28bb('0x94')](this[_0x28bb('0x1d0')](_0x10887e))[_0x28bb('0x94')](mergeDataErlangB(_0x10887e))[_0x28bb('0x94')](this['startMethodPredictive'](_0x10887e))['catch'](loggerCatchPredictive(_0x28bb('0x1d3'),_0x10887e));}else if(_0x10887e['predictiveIntervalAvailable']&&_0x404d8d<_0x10887e[_0x28bb('0x1be')]-_0x3d4d16){clearPredictiveAttributes(_0x10887e);loggerPredictive['info'](_0x10887e[_0x28bb('0x44')],_0x28bb('0x1d4'),_0x404d8d,')\x20are\x20less\x20than\x20threshold\x20(',_0x10887e[_0x28bb('0x1be')],'-',_0x3d4d16,'=',_0x10887e[_0x28bb('0x1be')]-_0x3d4d16,')');}else if(_0x10887e[_0x28bb('0x1be')]&&_0x404d8d>_0x10887e[_0x28bb('0x1be')]+_0x490d5f){clearPredictiveAttributes(_0x10887e);loggerPredictive[_0x28bb('0x47')](_0x10887e[_0x28bb('0x44')],_0x28bb('0x1d4'),_0x404d8d,_0x28bb('0x1d5'),_0x10887e['predictiveIntervalAvailable'],'+',_0x490d5f,'=',_0x10887e[_0x28bb('0x1be')]+_0x490d5f,')');}};Dialer['prototype'][_0x28bb('0x1d0')]=function(_0x289fdc){var _0xb40b76=this;return function(_0x3107fd){return new Promise(function(_0x4c2f67,_0x26e78a){_['merge'](_0x289fdc,_0x3107fd[0x0]);if(checkGetDataPredictive(_0x3107fd[0x0])){var _0x1f737f=_0x289fdc[_0x28bb('0x1be')]=_0x289fdc[_0x28bb('0x141')]+_0x289fdc[_0x28bb('0x1c2')];var _0x2819e1=_0x289fdc['dialPredictiveInterval']*0x3c;var _0x29f073=_0x3107fd[0x0][_0x28bb('0x51')]+_0x3107fd[0x0]['predictiveIntervalAvgHoldtime'];var _0x16511b=(_0x3107fd[0x0]['predictiveIntervalAnsweredCalls']+_0x3107fd[0x0]['predictiveIntervalDroppedCallsTimeout']+_0x3107fd[0x0][_0x28bb('0x4e')])/_0x3107fd[0x0][_0x28bb('0x48')];_0x289fdc[_0x28bb('0x1c3')]=_0x16511b>0x0?_0x16511b:0x1;switch(_0x289fdc['dialPredictiveOptimization']){case _0x28bb('0x1cc'):var _0x3dbdcd=_0x289fdc['dialPredictiveOptimizationPercentage']/0x64;return _0xb40b76['abandonmentRate'](_0x1f737f,_0x2819e1,_0x29f073,_0x16511b,_0x3dbdcd)[_0x28bb('0x94')](function(_0x247ad9){return _0x4c2f67(_0x247ad9);});case'agentBusyFactor':var _0x3399b7=_0x289fdc[_0x28bb('0x1bd')]/0x64;return _0xb40b76['busyFactor'](_0x1f737f,_0x2819e1,_0x29f073,_0x16511b,_0x3399b7)[_0x28bb('0x94')](function(_0x1d2999){return _0x4c2f67(_0x1d2999);});default:return _0x26e78a(msgResponse('[getDataPredictive]','Failure',_0x28bb('0x1d6')));}}else{return _0x26e78a(msgResponse(_0x28bb('0x1d7'),_0x28bb('0x8b'),_0x28bb('0x1d8')));}});};};Dialer[_0x28bb('0x1b')]['getDataPredictiveOld']=function(_0x5e2de3){var _0x40f3c2=this;return function(_0x5f552e){return new Promise(function(_0x1e2063,_0x1e92e6){_[_0x28bb('0xf4')](_0x5e2de3,_0x5f552e[0x0]);if(checkGetDataPredictive(_0x5f552e[0x0])){loggerPredictive['info'](JSON[_0x28bb('0x71')](_0x5f552e[0x0]));if(_0x5e2de3['dialPredictiveOptimization']===_0x28bb('0x1cc')){return _0x40f3c2['getVoiceQueueRtPauses'](_0x5e2de3['id'])[_0x28bb('0x94')](function(_0x2fbfca){var _0xd6f76=_0x5e2de3[_0x28bb('0x1d9')]-_0x2fbfca[0x0][_0x28bb('0x1da')];var _0x38ae0a=_0x5e2de3[_0x28bb('0x1cf')]*0x3c;var _0x40fb19=_0x5f552e[0x0][_0x28bb('0x51')]+_0x5f552e[0x0]['predictiveIntervalAvgHoldtime'];var _0x5c40b8=(_0x5f552e[0x0][_0x28bb('0x4a')]+_0x5f552e[0x0][_0x28bb('0x4c')]+_0x5f552e[0x0][_0x28bb('0x4e')])/_0x5f552e[0x0][_0x28bb('0x48')];var _0x5487b5=_0x5e2de3[_0x28bb('0x1bd')]/0x64;_0x5e2de3[_0x28bb('0x1db')]=_0x2fbfca[0x0][_0x28bb('0x1da')]||0x0;_0x5e2de3[_0x28bb('0x1c3')]=_0x5c40b8>0x0?_0x5c40b8:0x1;return _0x40f3c2['abandonmentRate'](_0xd6f76,_0x38ae0a,_0x40fb19,_0x5c40b8,_0x5487b5);})[_0x28bb('0x94')](function(_0x4be504){return _0x1e2063(_0x4be504);})['catch'](function(_0x59ff41){return _0x1e92e6(msgResponse(_0x28bb('0x1dc'),_0x28bb('0x8b'),JSON[_0x28bb('0x71')](_0x59ff41)));});}if(_0x5e2de3['dialPredictiveOptimization']===_0x28bb('0x1dd')){return _0x40f3c2['getVoiceQueueRtPauses'](_0x5e2de3['id'])['then'](function(_0x8453ed){var _0x12f9a4=_0x5e2de3[_0x28bb('0x1d9')]-_0x8453ed[0x0][_0x28bb('0x1da')];var _0x1bc78e=_0x5e2de3[_0x28bb('0x1cf')]*0x3c;var _0x37c0c8=_0x5f552e[0x0]['predictiveIntervalAvgTalktime']+_0x5f552e[0x0][_0x28bb('0x4f')];var _0x28da06=(_0x5f552e[0x0][_0x28bb('0x4a')]+_0x5f552e[0x0][_0x28bb('0x4c')]+_0x5f552e[0x0][_0x28bb('0x4e')])/_0x5f552e[0x0][_0x28bb('0x48')];var _0x25fbba=_0x5e2de3['dialPredictiveOptimizationPercentage']/0x64;_0x5e2de3[_0x28bb('0x1db')]=_0x8453ed[0x0]['outboundQueuePauses']||0x0;_0x5e2de3[_0x28bb('0x1c3')]=_0x28da06>0x0?_0x28da06:0x1;return _0x40f3c2['busyFactor'](_0x12f9a4,_0x1bc78e,_0x37c0c8,_0x28da06,_0x25fbba);})['then'](function(_0x200784){return _0x1e2063(_0x200784);})[_0x28bb('0x98')](function(_0x15b8ff){return _0x1e92e6(msgResponse(_0x28bb('0x1dc'),_0x28bb('0x8b'),JSON[_0x28bb('0x71')](_0x15b8ff)));});}}else{return _0x1e92e6(msgResponse(_0x28bb('0x1d7'),_0x28bb('0x8b'),_0x28bb('0x1d8')));}});};};Dialer[_0x28bb('0x1b')][_0x28bb('0x1d1')]=function(_0x44ec0d){var _0x7a58e0=this;return function(){var _0x22681c=0x0;var _0xc40ac6=Math['floor'](_0x44ec0d['erlangCallToSecond']*0x3e8);if(_0xc40ac6>0x0){_0xc40ac6=_0xc40ac6<0x64?0x64:_0xc40ac6;loggerPredictive[_0x28bb('0x47')](_0x44ec0d[_0x28bb('0x44')],'one\x20call\x20every:',_0xc40ac6,_0x28bb('0x1de'));_0x44ec0d[_0x28bb('0x61')]=setInterval(function(){_0x7a58e0[_0x28bb('0x61')](_0x44ec0d);loggerPredictiveCalls[_0x28bb('0x47')](_0x28bb('0x1df'),_0x22681c+=0x1);},_0xc40ac6);}else{loggerPredictive[_0x28bb('0x47')](_0x44ec0d['name'],'fail\x20to\x20scheduled\x20calls');}};};Dialer[_0x28bb('0x1b')][_0x28bb('0x1e0')]=function(_0x34446b,_0x6e3084){var _0x2dcc34=this;return function(_0x3038b9){if(_[_0x28bb('0x45')](_0x3038b9)){if(_['isNil'](_0x6e3084['UserId'])||!_0x6e3084['recallme']){if(_0x34446b[_0x28bb('0xac')]===_0x28bb('0x9')){_0x34446b[_0x28bb('0x6f')]=_[_0x28bb('0x53')](_0x34446b['queueStatusComplete'])?!![]:_0x34446b[_0x28bb('0x6f')];var _0x7d71e9=uuid['v4']();_0x2dcc34[_0x28bb('0xe9')][_0x7d71e9]=new Action(_0x34446b,_0x6e3084,_0x7d71e9);loggerBooked[_0x28bb('0x47')]('[booked][checkContactBlack]',_0x7d71e9,'queueStatusComplete:\x20',JSON[_0x28bb('0x71')](_0x34446b[_0x28bb('0x6f')]),'Queue:\x20',_0x34446b[_0x28bb('0x44')]);if(_0x34446b[_0x28bb('0x6f')]){_0x34446b[_0x28bb('0x6f')]=![];_0x2dcc34[_0x28bb('0x29')][_0x2dcc34['actions'][_0x7d71e9][_0x28bb('0xb9')]]=[];ami[_0x28bb('0x91')]({'actionid':_0x7d71e9,'action':_0x28bb('0x1e1'),'queue':_0x34446b[_0x28bb('0x44')]})[_0x28bb('0x98')](function(){utils['decrementOriginate'](_0x34446b,_0x28bb('0x1e2'));hopperUtils[_0x28bb('0xd5')]({'active':![],'ContactId':_0x2dcc34[_0x28bb('0xe9')][_0x7d71e9][_0x28bb('0xd6')],'ListId':_0x2dcc34[_0x28bb('0xe9')][_0x7d71e9]['ListId'],'VoiceQueueId':_0x2dcc34[_0x28bb('0xe9')][_0x7d71e9]['VoiceQueueId']||undefined,'CampaignId':_0x2dcc34[_0x28bb('0xe9')][_0x7d71e9][_0x28bb('0xd9')]||undefined})[_0x28bb('0x98')](loggerCatch(_0x28bb('0x1e3')));delete _0x2dcc34[_0x28bb('0xe9')][_0x7d71e9];});}else{loggerBooked[_0x28bb('0x47')]('[booked][checkContactBlack][else]',JSON[_0x28bb('0x71')](_0x34446b[_0x28bb('0x6f')]),_0x28bb('0x1e4'),_0x34446b[_0x28bb('0x44')]);utils[_0x28bb('0xc8')](_0x34446b,_0x28bb('0x1e2'));hopperUtils[_0x28bb('0xd5')]({'active':![],'ContactId':_0x2dcc34['actions'][_0x7d71e9][_0x28bb('0xd6')],'ListId':_0x2dcc34['actions'][_0x7d71e9][_0x28bb('0xd7')],'VoiceQueueId':_0x2dcc34[_0x28bb('0xe9')][_0x7d71e9]['VoiceQueueId']||undefined,'CampaignId':_0x2dcc34[_0x28bb('0xe9')][_0x7d71e9]['CampaignId']||undefined})[_0x28bb('0x98')](loggerCatch('[unlockOriginate][syncQueueStatusComplete]'));delete _0x2dcc34[_0x28bb('0xe9')][_0x7d71e9];}}else{return _0x2dcc34['actionOriginate'](_0x34446b,_0x6e3084);}}else{if(utils['getSeconds'](undefined,_0x6e3084['scheduledat'])<_0x34446b[_0x28bb('0x1e5')]*0x3c){if(_0x6e3084[_0x28bb('0x14b')]&&!_0x6e3084[_0x28bb('0x14b')][_0x28bb('0x1e6')]){_0x2dcc34['preview']['run'](_0x6e3084['id'])[_0x28bb('0x1e')](function(){utils[_0x28bb('0xc8')](_0x34446b,_0x28bb('0x1e2'));});}else{hopperUtils[_0x28bb('0x1e7')]({'active':![]},_0x6e3084['id'],0x1)[_0x28bb('0x1e')](function(){utils['decrementOriginate'](_0x34446b,_0x28bb('0x1e2'));});}}else{_0x34446b[_0x28bb('0x1e8')]+=0x1;utils[_0x28bb('0xc8')](_0x34446b,_0x28bb('0x1e2'));if(_0x34446b['dialRecallInQueue']){hopperUtils['rescheduleContact']({'active':![],'recallme':![],'UserId':null,'ContactId':_0x6e3084[_0x28bb('0xd6')],'ListId':_0x6e3084[_0x28bb('0xd7')],'VoiceQueueId':_0x6e3084['VoiceQueueId']||undefined,'CampaignId':_0x6e3084[_0x28bb('0xd9')]||undefined})[_0x28bb('0x98')](loggerCatch('[rescheduleContact][dialRecallInQueue]'));hopperUtils[_0x28bb('0xe8')](createObjHistory(_0x34446b,_0x6e3084,utils['CAMPAIGN_STATUS'][_0x28bb('0x1e9')],0x17,_0x28bb('0x1ea')))[_0x28bb('0x98')](loggerCatch(_0x28bb('0x1eb')));}else{_0x2dcc34[_0x28bb('0x119')](createObjHistory(_0x34446b,_0x6e3084,utils['CAMPAIGN_STATUS'][_0x28bb('0x1ec')],0x16,_0x28bb('0x1ed')),'[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]');}}}}else{_0x34446b[_0x28bb('0x1ee')]+=0x1;_0x2dcc34[_0x28bb('0x119')](createObjHistory(_0x34446b,_0x6e3084,utils[_0x28bb('0x69')][_0x28bb('0x1ef')],0xd,'Blacklist'),'[Originate][historyBlacklist]',_0x28bb('0x1f0'));throw _0x28bb('0x1f1');}};};Dialer['prototype'][_0x28bb('0x15d')]=function(_0x5cb566){var _0x4275a9=this;var _0x5a0578=_0x5cb566[_0x28bb('0x1f2')]-_0x5cb566['originated'];emitCampaignSummary(_0x5cb566);if(_0x5a0578>0x0&&_0x5cb566[_0x28bb('0x1f3')]==0x0){if(_0x5a0578>this[_0x28bb('0x23')]){_0x5a0578=this[_0x28bb('0x23')];}_0x5cb566[_0x28bb('0x1f3')]=0x1;hopperUtils[_0x28bb('0x1f4')](_0x5cb566,_0x5a0578)[_0x28bb('0x94')](function(_0x44aa09){_0x5cb566[_0x28bb('0x1f3')]=0x0;if(_0x44aa09){if(!utils['checkContactEmpty'](_0x44aa09)){_0x5cb566[_0x28bb('0x68')]=utils['CAMPAIGN_STATUS'][_0x28bb('0x1f5')];logger[_0x28bb('0x47')](_0x28bb('0x1f6')+_0x5cb566[_0x28bb('0x44')]);}else{_0x5cb566[_0x28bb('0x7a')]+=_0x44aa09[_0x28bb('0x8f')];_0x5cb566['message']=utils[_0x28bb('0x69')][_0x28bb('0x1f7')];for(var _0x36dd87=0x0;_0x36dd87<_0x44aa09['length'];_0x36dd87+=0x1){_0x5cb566[_0x28bb('0x1f8')]+=0x1;if(_[_0x28bb('0xef')](_0x44aa09[_0x36dd87])||_[_0x28bb('0xef')](_0x44aa09[_0x36dd87][_0x28bb('0x1f9')])||_[_0x28bb('0xef')](_0x44aa09[_0x36dd87]['phone'])){_0x4275a9[_0x28bb('0x156')](_0x28bb('0x1fa'),_0x5cb566,_0x44aa09[_0x36dd87]);}else{hopperUtils['checkIsBlackListIvr'](_[_0x28bb('0x72')](_0x44aa09[_0x36dd87],[_0x28bb('0xd9'),_0x28bb('0x161')]))['then'](_0x4275a9[_0x28bb('0x1e0')](_0x5cb566,_0x44aa09[_0x36dd87]))[_0x28bb('0x98')](function(_0xba8366){logger[_0x28bb('0x63')](_0x28bb('0x1fb'),_0xba8366);utils[_0x28bb('0xc8')](_0x5cb566,'[handleIvr]');});}}}}})[_0x28bb('0x98')](function(_0x53a050){_0x5cb566[_0x28bb('0x1f3')]=0x0;logger[_0x28bb('0x63')]('[getContactCampaign2]',_0x53a050);});}};Dialer[_0x28bb('0x1b')][_0x28bb('0xad')]=function(_0x43d439,_0x12d344){var _0x3a58e7=this;var _0x1670d0=[];if(_0x12d344<0x1||_0x43d439[_0x28bb('0xac')]===_0x28bb('0x9')){_0x12d344=0x1;}var _0x2eafa3=Math[_0x28bb('0x1fc')](_0x43d439[_0x28bb('0x1c2')]*_0x12d344)-_0x43d439[_0x28bb('0x7a')];if(_0x43d439['dialLimitQueue']>0x0){var _0x5e09f7=_0x43d439[_0x28bb('0x1fd')]-_0x43d439['originated']-_0x43d439[_0x28bb('0x141')]-_0x43d439[_0x28bb('0x142')];if(_0x2eafa3>_0x5e09f7){_0x2eafa3=_0x5e09f7;}}if(_0x2eafa3>0x0&&_0x43d439[_0x28bb('0x1f3')]==0x0){if(_0x43d439['dialMethod']===_0x28bb('0x9')){_0x2eafa3=0x1;}if(_0x2eafa3>this[_0x28bb('0x23')]){_0x2eafa3=this[_0x28bb('0x23')];}for(var _0x9f32b2 in this['agents']){if(typeof this[_0x28bb('0x21')][_0x9f32b2]!==_0x28bb('0xa3')){if(this[_0x28bb('0x21')][_0x9f32b2][_0x28bb('0x6b')]===_0x28bb('0x1fe')&&this['agents'][_0x9f32b2]['status']==='reachable'){_0x1670d0['push'](this[_0x28bb('0x21')][_0x9f32b2]['id']);}}}_0x43d439[_0x28bb('0x1f3')]=0x1;hopperUtils['getContactDialer'](_0x43d439,_0x1670d0,_0x2eafa3)[_0x28bb('0x94')](function(_0x7ef4b4){_0x43d439[_0x28bb('0x1f3')]=0x0;if(_0x7ef4b4){if(!utils[_0x28bb('0x1ff')](_0x7ef4b4)){hopperUtils[_0x28bb('0x200')](_0x43d439)[_0x28bb('0x94')](sendMessageReschedule(_0x43d439))['catch'](loggerCatch('[countReScheduled]\x20'));}else{_0x43d439[_0x28bb('0x7a')]+=_0x7ef4b4[_0x28bb('0x8f')];_0x43d439[_0x28bb('0x68')]=_0x43d439['dialMethod']==='booked'?utils[_0x28bb('0x69')][_0x28bb('0x143')]:utils[_0x28bb('0x69')][_0x28bb('0x1f7')];for(var _0x2423b6=0x0;_0x2423b6<_0x7ef4b4['length'];_0x2423b6+=0x1){if(_['isNil'](_0x7ef4b4[_0x2423b6])||_[_0x28bb('0xef')](_0x7ef4b4[_0x2423b6]['Contact'])||_[_0x28bb('0xef')](_0x7ef4b4[_0x2423b6][_0x28bb('0x161')])){_0x3a58e7[_0x28bb('0x156')](_0x28bb('0x1fa'),_0x43d439,_0x7ef4b4[_0x2423b6]);}else{hopperUtils[_0x28bb('0x201')](_[_0x28bb('0x72')](_0x7ef4b4[_0x2423b6],[_0x28bb('0xd8'),'phone']))['then'](_0x3a58e7[_0x28bb('0x1e0')](_0x43d439,_0x7ef4b4[_0x2423b6]))['catch'](function(_0x1c5df9){logger[_0x28bb('0x63')](_0x28bb('0x202'),_0x1c5df9);utils[_0x28bb('0xc8')](_0x43d439,'[handlePower]');});}}}}})['catch'](function(_0x41e2ce){_0x43d439[_0x28bb('0x1f3')]=0x0;logger['error']('[getContactCampaign2]',_0x41e2ce);});}};Dialer[_0x28bb('0x1b')]['handlePredictive']=function(_0x523370){if(_0x523370[_0x28bb('0x1fd')]>0x0){var _0x3118c6=_0x523370[_0x28bb('0x1fd')]-_0x523370[_0x28bb('0x7a')]-_0x523370['talking'];if(_0x3118c6>0x0&&_0x523370[_0x28bb('0x1f3')]==0x0){this['tryOriginatePredictive'](_0x523370);}else{loggerPredictiveCalls['info'](_0x28bb('0x203'));}}else{this[_0x28bb('0x204')](_0x523370);}};Dialer[_0x28bb('0x1b')][_0x28bb('0x204')]=function(_0x23bd06){var _0x2fb5f9=this;var _0x55f930=[];_0x23bd06[_0x28bb('0x7a')]+=0x1;for(var _0x4a7828 in this[_0x28bb('0x21')]){if(typeof this[_0x28bb('0x21')][_0x4a7828]!==_0x28bb('0xa3')){if(this[_0x28bb('0x21')][_0x4a7828][_0x28bb('0x6b')]===_0x28bb('0x1fe')&&this[_0x28bb('0x21')][_0x4a7828][_0x28bb('0x82')]===_0x28bb('0x81')){_0x55f930[_0x28bb('0x90')](this[_0x28bb('0x21')][_0x4a7828]['id']);}}}_0x23bd06['temp']=0x1;return this[_0x28bb('0x205')](_0x23bd06['id'],_0x55f930,0x1,_0x23bd06[_0x28bb('0x206')],_0x23bd06)[_0x28bb('0x94')](function(_0x524f29){_0x23bd06[_0x28bb('0x1f3')]=0x1;if(_0x524f29){if(!utils[_0x28bb('0x1ff')](_0x524f29)){utils[_0x28bb('0x207')](_0x23bd06,0x1,0x0);return hopperUtils[_0x28bb('0x200')](_0x23bd06)[_0x28bb('0x94')](sendMessageReschedule(_0x23bd06))['catch'](loggerCatch('[countReScheduled]\x20'));}else{_0x23bd06[_0x28bb('0x68')]=utils[_0x28bb('0x69')][_0x28bb('0x1f7')];if(_[_0x28bb('0xef')](_0x524f29[0x0])||_[_0x28bb('0xef')](_0x524f29[0x0][_0x28bb('0x1f9')])||_[_0x28bb('0xef')](_0x524f29[0x0][_0x28bb('0x161')])){_0x2fb5f9['emptyContact'](_0x28bb('0x1fa'),_0x23bd06,_0x524f29[0x0]);}else{return hopperUtils['checkIsBlackList'](_[_0x28bb('0x72')](_0x524f29[0x0],[_0x28bb('0xd8'),_0x28bb('0x161')]))[_0x28bb('0x94')](_0x2fb5f9[_0x28bb('0x1e0')](_0x23bd06,_0x524f29[0x0]))[_0x28bb('0x98')](function(_0x21c94e){logger[_0x28bb('0x63')]('[actionOriginatePredictive]',_0x21c94e);utils[_0x28bb('0xc8')](_0x23bd06,_0x28bb('0x208'));});}}}})['catch'](function(_0x20bab4){_0x23bd06[_0x28bb('0x1f3')]=0x0;logger['error'](_0x28bb('0x209'),_0x20bab4);});};Dialer[_0x28bb('0x1b')][_0x28bb('0x20a')]=function(_0xa85045,_0x1f4757,_0x3ce103,_0x40a31b,_0x517ff2,_0x2b7c2d){loggerPredictive[_0x28bb('0x47')](_0x28bb('0x20b'));loggerPredictive[_0x28bb('0x47')](_0x28bb('0x20c'),_0xa85045);loggerPredictive[_0x28bb('0x47')](_0x28bb('0x20d'),_0x1f4757);loggerPredictive[_0x28bb('0x47')](_0x28bb('0x20e'),_0x3ce103);loggerPredictive['info'](_0x28bb('0x20f'),_0x40a31b);loggerPredictive[_0x28bb('0x47')]('Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x517ff2);loggerPredictive['info']('---------------------------');return new Promise(function(_0x18c56e,_0x3bb658){if(_0xa85045<=0x0||isNaN(_0xa85045)){return _0x3bb658(msgResponse(_0x28bb('0x210'),_0x28bb('0x7e'),_0x28bb('0x211')+_0xa85045));}if(_0x3ce103<=0x0||isNaN(_0x3ce103)){return _0x3bb658(msgResponse(_0x28bb('0x210'),_0x28bb('0x7e'),'Ts\x20=\x20'+_0x3ce103));}if(_0x40a31b<=0x0||isNaN(_0x40a31b)){return _0x3bb658(msgResponse(_0x28bb('0x210'),_0x28bb('0x7e'),_0x28bb('0x212')+_0x40a31b));}if(_0x1f4757<=0x0||isNaN(_0x1f4757)){return _0x3bb658(msgResponse('[abandonmentRate]',_0x28bb('0x7e'),'interval\x20=\x20'+_0x1f4757));}if(_0x517ff2<=0x0||isNaN(_0x517ff2)){return _0x3bb658(msgResponse(_0x28bb('0x210'),_0x28bb('0x7e'),_0x28bb('0x213')+_0x517ff2));}_0x2b7c2d=_0x2b7c2d||0x0;var _0x459dee=0x1/_0x3ce103;var _0x211a69=0x0;var _0x35168c=0x0;var _0x1c3c4b=0x0;var _0x3d3f22=0x0;for(var _0x3cc4a4=0x0;_0x1c3c4b<_0x517ff2;_0x3cc4a4+=0x1){_0x35168c=_0x3cc4a4/_0x1f4757;_0x211a69=(_0x40a31b*_0x35168c+_0x2b7c2d)/_0x459dee;_0x1c3c4b=utils[_0x28bb('0x214')](_0x211a69,_0xa85045);_0x3d3f22=_0x211a69/_0xa85045*(0x1-utils['erlangb'](_0x211a69,_0xa85045));}return _0x18c56e({'erlangCalls':_0x3cc4a4,'erlangCallToSecond':_0x1f4757/_0x3cc4a4,'erlangAbandonmentRate':_0x1c3c4b,'erlangBusyFactor':_0x3d3f22});});};Dialer[_0x28bb('0x1b')][_0x28bb('0x215')]=function(_0x531aa8,_0x1d55c8,_0x25ff9b,_0x70af8c,_0x3c8039,_0x531233){loggerPredictive[_0x28bb('0x47')](_0x28bb('0x216'));loggerPredictive[_0x28bb('0x47')](_0x28bb('0x20c'),_0x531aa8);loggerPredictive[_0x28bb('0x47')](_0x28bb('0x20d'),_0x1d55c8);loggerPredictive[_0x28bb('0x47')]('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',_0x25ff9b);loggerPredictive[_0x28bb('0x47')]('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',_0x70af8c);loggerPredictive['info'](_0x28bb('0x217'),_0x3c8039);loggerPredictive[_0x28bb('0x47')](_0x28bb('0x52'));return new Promise(function(_0x229ab4,_0x4d2d23){if(_0x531aa8<=0x0||isNaN(_0x531aa8)){return _0x4d2d23(msgResponse(_0x28bb('0x218'),_0x28bb('0x7e'),_0x28bb('0x211')+_0x531aa8));}if(_0x25ff9b<=0x0||isNaN(_0x25ff9b)){return _0x4d2d23(msgResponse('[busyFactor]',_0x28bb('0x7e'),_0x28bb('0x219')+_0x25ff9b));}if(_0x70af8c<=0x0||isNaN(_0x70af8c)){return _0x4d2d23(msgResponse(_0x28bb('0x218'),'Error',_0x28bb('0x212')+_0x70af8c));}if(_0x1d55c8<=0x0||isNaN(_0x1d55c8)){return _0x4d2d23(msgResponse(_0x28bb('0x218'),'Error','interval\x20=\x20'+_0x1d55c8));}if(_0x3c8039<=0x0||isNaN(_0x3c8039)){return _0x4d2d23(msgResponse(_0x28bb('0x218'),'Error',_0x28bb('0x21a')+_0x3c8039));}_0x531233=_0x531233||0x0;var _0x4c3925=0x1/_0x25ff9b;var _0x583f53=0x0;var _0x26b5aa=0x0;var _0x70216=0x0;var _0x4dd6a0=0x0;for(var _0x132810=0x0;_0x4dd6a0<_0x3c8039;_0x132810+=0x1){_0x26b5aa=_0x132810/_0x1d55c8;_0x583f53=(_0x70af8c*_0x26b5aa+_0x531233)/_0x4c3925;_0x70216=utils[_0x28bb('0x214')](_0x583f53,_0x531aa8);_0x4dd6a0=_0x583f53/_0x531aa8*(0x1-utils[_0x28bb('0x214')](_0x583f53,_0x531aa8));}return _0x229ab4({'erlangCalls':_0x132810,'erlangCallToSecond':_0x1d55c8/_0x132810,'erlangAbandonmentRate':_0x70216,'erlangBusyFactor':_0x4dd6a0});});};module[_0x28bb('0x21b')]=Dialer;
\ No newline at end of file
+var _0x6bc9=['[syncAgentComplete][createHistory][20]','reason\x2020\x20agentreject','[syncAgentComplete][createHistory][?]','Global','dialPredictiveOptimizationPercentage','round','predictiveIntervalAvailable','predictiveIntervalMinThreshold','available','floor','erlangCalls','predictiveIntervalHitRate','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','[startMethodPredictive][StartProgressive][Loop]','dialPredictiveOptimization','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','Drop\x20in\x20this\x20interval','dialPredictiveInterval','started\x20in\x20predictive\x20at','getDataPredictive','startMethodPredictive','Predictive\x20after\x20first\x20interval','recalculate\x20predictive\x20at','avgHandleTime','Predictive\x20for\x20every\x20interval','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20more\x20than\x20threshold\x20(','abandonmentRate','agentBusyFactor','busyFactor','Unknown\x20Predictive','[getDataPredictive]','getDataPredictiveOld','loggedIn','outboundQueuePauses','predictiveIntervalPauses','[CatchErlangB]','one\x20call\x20every:','milliseconds','[handlePredictive]','fail\x20to\x20scheduled\x20calls','checkContactBlack','recallme','Queue:\x20','queuestatus','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','[checkContactBlack]','getSeconds','scheduledat','dialRecallMeTimeout','Agent','voicePause','outboundReCallsDay','dialRecallInQueue','[rescheduleContact][dialRecallInQueue]','QUEUE_RECALL','RecallInQueue','[Originate][HistoryDialRecallInQueue][historyCatch]','RECALL_TIMEOUT','RecallFailedTimeout','[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]','BLACKLIST','[Originate][historyBlacklist]','inBlackList','limitCalls','originated','temp','getContactDialerIvr','checkContactEmpty','[getContactCampaign2][Empty]','RUNNING','Contact','[actionOriginateIvr]','[getContactCampaign2]','dialLimitQueue','not_inuse','getContactDialer','[countReScheduled]\x20','emptyContact','[actionOriginate]\x20','checkIsBlackList','[handlePower]','dialOrderByScheduledAt','checkContactLowerLimitOriginate','countReScheduled','[actionOriginatePredictive]','--------\x20Drop\x20Rate\x20--------','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[abandonmentRate]','m\x20=\x20','Ts\x20=\x20','p\x20=\x20','interval\x20=\x20','Amax\x20=\x20','erlangb','----\x20Agent\x20Busy\x20Factor\x20----','[busyFactor]','Umin\x20=\x20','exports','util','lodash','uuid','moment','./utils','./utils/hopper','../../../config/environment/','dialer','../../../config/logger','booked','predictive','syncQueueSummary','redis','defaults','socket.io-emitter','../rpc/voiceQueueRt','../rpc/setting','../rpc/interval','./models/action','./models/history','./models/final','./models/agentComplete','./models/queueCallerAbandon','./models/hangup','env','XCALLY_IP_AGI','127.0.0.1','prototype','tail','sequence','preview','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','channels','contactsId','optionPredictive','startPredictive','startProgressive','queuesSummary','agentconnect','syncAgentConnect','bind','queuecallerabandon','syncQueueCallerAbandon','originateresponse','custom:queuesummary','custom:queuesummarycomplete','syncQueueSummaryComplete','hangup','newexten','syncNewExten','varset','syncVarSet','syncQueueStatusComplete','loopCampaigns','getSettings','then','previewRecallmeReminderInterval','isUndefined','emit','type','outbound','debug','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','inspect','format','voice:queue:%s','isEmpty','-----\x20Stats\x20Predictive\x20---','info','Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsTimeout','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsCallersExit','AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgHoldtime','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgTalktime','---------------------------','Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','History\x20information\x20are\x20empty','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangBusyFactor','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangAbandonmentRate','merge','name','startProgressive\x20value\x20cleared','startPredictive\x20value\x20cleared','handlePredictive','handlePredictive\x20interval\x20cleared','error','contactsRescheduled','CAMPAIGN_STATUS','CONTACTS_RESCHEDULED','[getContactDialer2][ReScheduled]','contacts','message','NO_AVAILABLE_CONTACTS','[getContactDialer2][Empty]','statedesc','endtime','starttime','queueStatusComplete','[unlockQueueStatus][undefined]','[booked][unlockQueueStatus]','stringify','pick','Interval','NULL_INTERVAL','\x20INTERVAL_IS_NULL','Intervals','isIVRCampaignActive','INACTIVE','\x20NOT\x20Active','isIVRCampaign','campaign:ivr:%s','campaign:save','sendMessageOneNotActive','is\x20not\x20active','is\x20deactivated','[ifTime][Action]','Error','isTrunkReachable','active','SIP/%s','status','reachable','TrunkBackup','TRUNK_NOT_REACHABLE','checkIfTime','ifTimeIvr','checkIfTimeIntervals','ifTime','Failure','\x20Intervals\x20is\x20null\x20','EMPTY_INTERVAL','\x20Intervals\x20is\x20empty\x20','timezones','UNKNOWN_TIMEZONE','\x20Timezone\x20unknow\x20','isArray','length','push','command','content','true','Action','iftime\x20%s,%s','indexOf','catch','all','some','OVERTIME_GLOBAL_INTERVAL','OVERTIME_INTERVAL','[ifTime][promiseAll]','Global:\x20','Timezone:\x20','resetActiveCalls','syncCampaigns','undefined','resolve','checkIsTrunkReachable','dialTimezone','launchHandleIvr','checkDialMethod','dialMethod','progressive','handlePower','power','dialPowerLevel','Queue','method\x20not\x20recognized','dialGlobalInterval','silly','Dialer::ifTime()','\x20Interval\x20is\x20overtime:\x20','queue','uniqueId','uniqueid','ivr','decrementOriginate','[syncAgentConnect]','YYYY-MM-DD\x20HH:mm:ss','syncAgentComplete','outboundAnswerCallsDay','reason','agent','agiafterat','dialQueueProject2','dialAgiAfterHangupAgent','createHistory','[syncAgentComplete][createHistory]','moveContactManagedDialer','[syncAgentComplete]','droptime','dialQueueTimeout','outboundDropCallsDayTimeout','predictiveIntervalErlangCallsDroppedCalls','state','countdropretry','countglobal','dialDropRetryFrequency','verifyAdditionalPhones','voiceQueue','additional','dialDropMaxRetry','queueCallerAbandonCreateState','add','minutes','CampaignId','Drop','calleridname','calleridnum','swapAdditionalPhones','outboundDropCallsDayCallersExit','Abandoned','dropreason','CALLEREXIT','countabandonedretry','dialAbandonedRetryFrequency','callAdditionalPhoneAfterMin','dialAbandonedMaxRetry','ContactId','ListId','VoiceQueueId','[rescheduleContact][Abandoned]','actions','channel','syncQueueMember','actionid','strategy','rrmemory','roundrobin','locked','paused','stateinterface','isNil','queueBooked','idHopper','run','[syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','queueBookedRR','_rr','unlockRR','[booked][RR]','Agent:\x20','contactAgent-idHopper:\x20','[Catch][Preview][syncQueueStatusComplete]','finally','[booked][RR][finaly]','[booked][unlock2]','rescheduleContact','[unlock2][syncQueueStatusComplete]','[unlock3][syncQueueStatusComplete]','syncOriginateResponse','responsetime','response','[syncOriginateResponse]','callProgressDetecting','[callProgressDetecting]\x20','variable','amdstatus','exten','xcally-motion-dialer','value','[syncVarSet]','HangupInAMD','membername','AMD','custom:amd','amd','saveInDb','[syncHangupInAMD][createHistory]','[syncHangupInAMD]','dialAMDActive','MACHINE','Machine','countmachineretry','[syncAgentComplete][createHistory][0]','countbusyretry','countnoanswerretry','dialGlobalMaxRetry','stateGlobal','reason19\x20machine....','dialMachineMaxRetry','createStateFinal','reason\x2019\x20machine....','dialMachineRetryFrequency','[rescheduleContact][Machine]','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','buildObj','countcongestionretry','countagentrejectretry','[syncHangup]','ivrAnswerCallsDay','cause-txt','Normal\x20Clearing','[syncAgentCompleteIvr][createHistory]','[syncAgentCompleteIvr]','[syncHangupIvr][createHistory]','[syncHangupIvr]','dialQueueProject','outboundAnswerAgiCallsDay','AnswerAGI','AGI','[syncHangup2]','outboundUnknownCallsDay','Unknown','[syncHangup][createHistory]','running','statusMessage','inUse','talking','pTalking','ACTIVE','[syncQueueSummary]','compareToOutboundQueue','queueSummaryCountersUpdated','updateReportFromOutboundQueue','assign','throttle','online','handlePreviewRecallNotifications','map','user:%s','loopClearZombieChannels','clearZombieChannels','[uniqueid]','[actions]','enqueue','[clearZombieChannels]','[Dialer][checkChannel]','getVoiceQueueRtPauses','notFound','[emptyContact]','UserId','[emptyContact][createHistory]','[syncQueueCallerAbandon]\x20[Drop]','user:dialPreviewRecallReminder','handleIvr','actionOriginate','originate','voiceQueue\x20is\x20undefine','phone','NONE','\x22agi://%s/square,%s\x22','isOutboundQueue','\x22%s,%s%s,,,%s\x22','getCaller','XMD-AMDINITIALSILENCE','XMD-AMDGREETING','dialAMDGreeting','XMD-AMDAFTERGREETINGSILENCE','dialAMDAfterGreetingSilence','XMD-AMDTOTALANALYSISTIME','XMD-AMDMINWORDLENGTH','dialAMDMinWordLength','XMD-AMDBETWEENWORDSSILENCE','dialAMDBetweenWordsSilence','XMD-AMDMAXIMUMNUMBEROFWORDS','XMD-CAMPAIGNID','Trunk','getCallerId','callerid','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','dialOriginateCallerIdNumber','XMD-ORIGINATECALLERIDNAME','originatecalleridname','extractCalleridName','XMD-ORIGINATECALLERIDNUM','SIP/%s/%s%s','dialPrefix','trim','dialCutDigit','substring','[originate][error]','checkRetriveMax','dialNoAnswerRetryFrequency','[rescheduleContact][NoAnswer]','dialBusyMaxRetry','dialBusyRetryFrequency','[rescheduleContact]\x20[Busy]','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','countnosuchnumberretry','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','[rescheduleContact][Drop]','dialAgentRejectMaxRetry','[rescheduleContact][AgentReject]','[callProgressDetecting]','entity\x20is\x20undefine','outboundNoSuchCallsDay','NoSuchNumber','custom:agentnosuchnumber','nosuchnumber','reason\x200\x20no\x20such\x20number....','NoAnswer','buildNoAnswerEventPayload','custom:agentnoanswer','[syncAgentComplete][createHistory][3]','dialNoAnswerMaxRetry','reason\x203\x20ringing\x20no\x20answer','outboundBusyCallsDay','Busy','custom:agentbusy','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','Congestion','custom:agentcongestion','congestion','dialCongestionMaxRetry','reason\x208\x20congestion','outboundAbandonedCallsDay','[syncAgentComplete][createHistory][11]','reason\x2011\x20abandoned','AgentReject','dialAgentRejectRetryFrequency','custom:agentreject'];(function(_0x3e9d4b,_0x154bbe){var _0x51f812=function(_0x5e620e){while(--_0x5e620e){_0x3e9d4b['push'](_0x3e9d4b['shift']());}};_0x51f812(++_0x154bbe);}(_0x6bc9,0x6f));var _0x96bc=function(_0x786e9,_0x1a029){_0x786e9=_0x786e9-0x0;var _0x1f891b=_0x6bc9[_0x786e9];return _0x1f891b;};'use strict';var util=require(_0x96bc('0x0'));var _=require(_0x96bc('0x1'));var uuid=require(_0x96bc('0x2'));var moment=require(_0x96bc('0x3'));var rr=require('rr');var Redis=require('ioredis');var utils=require(_0x96bc('0x4'));var hopperUtils=require(_0x96bc('0x5'));var ut=require('../preview/util/util');var config=require(_0x96bc('0x6'));var logger=require('../../../config/logger')(_0x96bc('0x7'));var loggerBooked=require(_0x96bc('0x8'))(_0x96bc('0x9'));var loggerPredictive=require(_0x96bc('0x8'))(_0x96bc('0xa'));var loggerPredictiveCalls=require(_0x96bc('0x8'))('predictiveCalls');var loggerSyncQueueSummary=require(_0x96bc('0x8'))(_0x96bc('0xb'));var ami=require('../ami');config[_0x96bc('0xc')]=_[_0x96bc('0xd')](config[_0x96bc('0xc')],{'host':'localhost','port':0x18eb});var io=require(_0x96bc('0xe'))(new Redis(config[_0x96bc('0xc')]));var cmHopper=require('../rpc/cmHopper');var voiceQueueRt=require(_0x96bc('0xf'));var RpcSetting=require(_0x96bc('0x10'));var Interval=require(_0x96bc('0x11'));var Action=require(_0x96bc('0x12'));var History=require(_0x96bc('0x13'));var Final=require(_0x96bc('0x14'));var AgentComplete=require(_0x96bc('0x15'));var QueueCallerAbandon=require(_0x96bc('0x16'));var Hangup=require(_0x96bc('0x17'));var ipAgi=process[_0x96bc('0x18')][_0x96bc('0x19')]||_0x96bc('0x1a');var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence[_0x96bc('0x1b')]['enqueue']=function(_0x124454){this[_0x96bc('0x1c')]=this[_0x96bc('0x1c')]?this[_0x96bc('0x1c')]['finally'](_0x124454):_0x124454();};function Dialer(_0x479235,_0x3a2dad){this[_0x96bc('0x1d')]=new Sequence();this[_0x96bc('0x1e')]=_0x3a2dad;this[_0x96bc('0x1f')]=_0x479235['voiceQueues'];this[_0x96bc('0x20')]=_0x479235[_0x96bc('0x20')];this[_0x96bc('0x21')]=_0x479235[_0x96bc('0x21')];this[_0x96bc('0x22')]=_0x479235[_0x96bc('0x22')];this[_0x96bc('0x23')]=config['maxNumberOriginate']||0x2;this[_0x96bc('0x24')]={};this['actions']={};this[_0x96bc('0x25')]={};this['uniqueId']={};this[_0x96bc('0x26')]={};this[_0x96bc('0x27')]={};this[_0x96bc('0x28')]={};this['ivrOriginated']={};this['queueBooked']={};this['queueBookedRR']={};this[_0x96bc('0x29')]={};ami['on'](_0x96bc('0x2a'),this[_0x96bc('0x2b')][_0x96bc('0x2c')](this));ami['on'](_0x96bc('0x2d'),this[_0x96bc('0x2e')][_0x96bc('0x2c')](this));ami['on'](_0x96bc('0x2f'),this['syncOriginateResponse'][_0x96bc('0x2c')](this));ami['on']('agentcomplete',this['syncAgentComplete'][_0x96bc('0x2c')](this));ami['on'](_0x96bc('0x30'),this[_0x96bc('0xb')]['bind'](this));ami['on'](_0x96bc('0x31'),this[_0x96bc('0x32')]['bind'](this));ami['on'](_0x96bc('0x33'),this['syncHangup']['bind'](this));ami['on'](_0x96bc('0x34'),this[_0x96bc('0x35')]['bind'](this));ami['on'](_0x96bc('0x36'),this[_0x96bc('0x37')][_0x96bc('0x2c')](this));ami['on']('queuemember',this['syncQueueMember'][_0x96bc('0x2c')](this));ami['on']('queuestatuscomplete',this[_0x96bc('0x38')]['bind'](this));this[_0x96bc('0x39')]();this['loopClearZombieChannels']();RpcSetting[_0x96bc('0x3a')]()[_0x96bc('0x3b')](function(_0x173fef){previewRecallmeReminderInterval=_0x173fef[_0x96bc('0x3c')];});}function isNotNull(_0x52ef0a){return _0x52ef0a!==null&&!_[_0x96bc('0x3d')](_0x52ef0a);}function msgResponse(_0xd7d35a,_0x577c0f,_0xa5b8){return{'action':_0xd7d35a,'response':_0x577c0f,'message':_0xa5b8,'stack':_0xa5b8};}function emit(_0x1c9f87,_0x7c25e9,_0x27bea0){io['to'](_0x1c9f87)[_0x96bc('0x3e')](_0x7c25e9,_0x27bea0);}function emitOutboundVoiceQueueSummary(_0x29cec2){if(_0x29cec2[_0x96bc('0x3f')]===_0x96bc('0x40')){logger[_0x96bc('0x41')](_0x96bc('0x42'),util[_0x96bc('0x43')](_0x29cec2,{'showHidden':![],'depth':null}));emit(util[_0x96bc('0x44')](_0x96bc('0x45'),_0x29cec2['name']),'voice_queue:save',_0x29cec2);}}function checkGetDataPredictive(_0x12fc28){if(isNotNull(_0x12fc28)&&!_[_0x96bc('0x46')](_0x12fc28)){loggerPredictive['info'](_0x96bc('0x47'));loggerPredictive[_0x96bc('0x48')](_0x96bc('0x49'),_0x12fc28[_0x96bc('0x4a')]);loggerPredictive[_0x96bc('0x48')]('Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x12fc28[_0x96bc('0x4b')]);loggerPredictive[_0x96bc('0x48')](_0x96bc('0x4c'),_0x12fc28[_0x96bc('0x4d')]);loggerPredictive['info'](_0x96bc('0x4e'),_0x12fc28[_0x96bc('0x4f')]);loggerPredictive[_0x96bc('0x48')](_0x96bc('0x50'),_0x12fc28[_0x96bc('0x51')]);loggerPredictive['info'](_0x96bc('0x52'),_0x12fc28[_0x96bc('0x53')]);loggerPredictive[_0x96bc('0x48')](_0x96bc('0x54'));if(_0x12fc28[_0x96bc('0x4a')]>0x0){if(!_[_0x96bc('0x3d')](_0x12fc28['predictiveIntervalAvgTalktime'])&&_0x12fc28['predictiveIntervalAvgTalktime']>0x0){return!![];}loggerPredictive['info'](_0x96bc('0x55'));if(!_['isUndefined'](_0x12fc28[_0x96bc('0x51')])&&_0x12fc28[_0x96bc('0x51')]>0x0){return!![];}loggerPredictive['info'](_0x96bc('0x56'));}else{loggerPredictive[_0x96bc('0x48')](_0x96bc('0x57'));}}else{loggerPredictive['info'](_0x96bc('0x58'));}return![];}function mergeDataErlangB(_0x14b81d){return function(_0x21d2f3){loggerPredictive[_0x96bc('0x48')]('---------\x20ErlangB\x20---------');loggerPredictive[_0x96bc('0x48')](_0x96bc('0x59'),_0x21d2f3['erlangCalls']);loggerPredictive[_0x96bc('0x48')](_0x96bc('0x5a'),_0x21d2f3['erlangCallToSecond']);loggerPredictive[_0x96bc('0x48')]('Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x21d2f3['erlangAbandonmentRate']);loggerPredictive[_0x96bc('0x48')]('Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x21d2f3[_0x96bc('0x5b')]);loggerPredictive[_0x96bc('0x48')](_0x96bc('0x5c'),_0x21d2f3[_0x96bc('0x5d')]);loggerPredictive[_0x96bc('0x48')](_0x96bc('0x54'));_[_0x96bc('0x5e')](_0x14b81d,_0x21d2f3);};}function ifInterval(_0x1ca088,_0x23b388){if(_[_0x96bc('0x3d')](_0x23b388)){return![];}return utils['getSeconds'](undefined,_0x23b388)<_0x1ca088*0x3c;}function clearPredictiveAttributes(_0x3b43de){if(_0x3b43de[_0x96bc('0x28')]){_0x3b43de[_0x96bc('0x28')]=undefined;loggerPredictive[_0x96bc('0x41')](_0x3b43de[_0x96bc('0x5f')],_0x96bc('0x60'));}if(_0x3b43de[_0x96bc('0x27')]){_0x3b43de[_0x96bc('0x27')]=undefined;loggerPredictive[_0x96bc('0x41')](_0x3b43de['name'],_0x96bc('0x61'));}if(_0x3b43de[_0x96bc('0x62')]){clearInterval(_0x3b43de['handlePredictive']);_0x3b43de[_0x96bc('0x62')]=undefined;loggerPredictive[_0x96bc('0x41')](_0x3b43de[_0x96bc('0x5f')],_0x96bc('0x63'));}}function loggerCatchPredictive(_0x2db083,_0x24ff5d){return function(_0x54637e){loggerPredictive[_0x96bc('0x64')](_0x24ff5d[_0x96bc('0x5f')],_0x2db083);loggerPredictive[_0x96bc('0x64')](_0x54637e['stack']);clearPredictiveAttributes(_0x24ff5d);};}function loggerCatch(_0x578525){return function(_0x577e7c){logger[_0x96bc('0x64')](_0x578525,util[_0x96bc('0x43')](_0x577e7c,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x20529b){return function(_0xda6f41){if(isNotNull(_0xda6f41)&&isNotNull(_0xda6f41[0x0])){if(_0xda6f41[0x0][_0x96bc('0x65')]>0x0){_0x20529b['message']=utils[_0x96bc('0x66')][_0x96bc('0x67')];logger[_0x96bc('0x48')](_0x96bc('0x68')+_0x20529b[_0x96bc('0x5f')],_0xda6f41[0x0][_0x96bc('0x65')],_0x96bc('0x69'));}else{_0x20529b[_0x96bc('0x6a')]=utils['CAMPAIGN_STATUS'][_0x96bc('0x6b')];logger[_0x96bc('0x48')](_0x96bc('0x6c')+_0x20529b[_0x96bc('0x5f')]);}}};}function createObjHistory(_0x10205c,_0x4dcd13,_0x307360,_0x58c4b3,_0x36ae1f){_0x10205c[_0x96bc('0x6a')]=_0x307360;var _0x25414a=new Action(_0x10205c,_0x4dcd13);var _0xe51053=new History(_0x25414a);_0xe51053['state']=_0x58c4b3;_0xe51053[_0x96bc('0x6d')]=_0x36ae1f;_0xe51053[_0x96bc('0x6e')]=_0x25414a[_0x96bc('0x6f')];return _0xe51053;}function unlockQueueStatus(_0x8ab052,_0x4af223){setTimeout(function(){if(_['isUndefined'](_0x8ab052[_0x96bc('0x70')])){loggerBooked[_0x96bc('0x64')](_0x96bc('0x71'),_0x4af223);}_0x8ab052[_0x96bc('0x70')]=!![];loggerBooked[_0x96bc('0x48')](_0x96bc('0x72'),_0x4af223,JSON[_0x96bc('0x73')](_[_0x96bc('0x74')](_0x8ab052,[_0x96bc('0x5f'),_0x96bc('0x70')])));},0x1f3);}function checkInterval(_0x5d5856){return function(){if(!isNotNull(_0x5d5856[_0x96bc('0x75')])){_0x5d5856[_0x96bc('0x6a')]=utils[_0x96bc('0x66')][_0x96bc('0x76')];throw _0x5d5856[_0x96bc('0x5f')]+_0x96bc('0x77');}if(!isNotNull(_0x5d5856[_0x96bc('0x75')][_0x96bc('0x78')])){_0x5d5856[_0x96bc('0x6a')]=utils['CAMPAIGN_STATUS'][_0x96bc('0x76')];throw _0x5d5856[_0x96bc('0x5f')]+'\x20INTERVAL_IS_NULL';}if(!isNotNull(_['isEmpty'](_0x5d5856[_0x96bc('0x75')][_0x96bc('0x78')]))){_0x5d5856[_0x96bc('0x6a')]=utils[_0x96bc('0x66')]['NULL_INTERVAL'];throw _0x5d5856[_0x96bc('0x5f')]+_0x96bc('0x77');}};}function checkIsIVRCampaignActive(_0x4123b8){return function(){if(!utils[_0x96bc('0x79')](_0x4123b8)){_0x4123b8[_0x96bc('0x6a')]=utils['CAMPAIGN_STATUS'][_0x96bc('0x7a')];throw _0x4123b8[_0x96bc('0x5f')]+_0x96bc('0x7b');}};}function emitCampaignSummary(_0x4e6ca1){if(utils[_0x96bc('0x7c')](_0x4e6ca1)){emit(util[_0x96bc('0x44')](_0x96bc('0x7d'),_0x4e6ca1[_0x96bc('0x5f')]),_0x96bc('0x7e'),_0x4e6ca1);}}function loggerCatchQueueSummary(_0x122a86,_0x5a085a){return function(_0x4906f0){clearPredictiveAttributes(_0x5a085a);emitCampaignSummary(_0x5a085a);loggerSyncQueueSummary[_0x96bc('0x41')](_0x122a86,util[_0x96bc('0x43')](_0x4906f0,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x238f12){if(_0x238f12[_0x96bc('0x7f')]){if(_0x238f12['originated']===0x0){_0x238f12[_0x96bc('0x7f')]=![];_0x238f12['message']=utils[_0x96bc('0x66')][_0x96bc('0x7a')];loggerSyncQueueSummary[_0x96bc('0x41')]('[syncQueueSummary]\x20Campaign\x20Ivr:\x20',_0x238f12['name'],_0x96bc('0x80'));}else{_0x238f12[_0x96bc('0x6a')]=utils[_0x96bc('0x66')]['DISACTIVED'];loggerSyncQueueSummary[_0x96bc('0x41')]('[syncQueueSummary]\x20Campaign\x20Ivr:\x20',_0x238f12[_0x96bc('0x5f')],_0x96bc('0x81'));}emitCampaignSummary(_0x238f12);}}function myreject(_0x2fe3e6){return function(_0x401a4e){return _0x2fe3e6(msgResponse(_0x96bc('0x82'),_0x96bc('0x83'),JSON['stringify'](_0x401a4e)));};}Dialer[_0x96bc('0x1b')][_0x96bc('0x84')]=function(_0x567dac){return!_[_0x96bc('0x3d')](_0x567dac)&&_0x567dac&&!_[_0x96bc('0x3d')](_0x567dac[_0x96bc('0x5f')])&&!_[_0x96bc('0x3d')](_0x567dac[_0x96bc('0x85')])&&_0x567dac['active']&&(this[_0x96bc('0x22')][util[_0x96bc('0x44')](_0x96bc('0x86'),_0x567dac[_0x96bc('0x5f')])][_0x96bc('0x87')]===_0x96bc('0x88')||this[_0x96bc('0x22')][util[_0x96bc('0x44')](_0x96bc('0x86'),_0x567dac[_0x96bc('0x5f')])][_0x96bc('0x87')]==='unmonitored');};Dialer['prototype']['checkIsTrunkReachable']=function(_0x1cad87){var _0x149891=this;return function(){if(!_0x149891[_0x96bc('0x84')](_0x1cad87['Trunk'])){if(!_0x149891[_0x96bc('0x84')](_0x1cad87[_0x96bc('0x89')])){_0x1cad87[_0x96bc('0x6a')]=utils['CAMPAIGN_STATUS'][_0x96bc('0x8a')];throw _0x1cad87[_0x96bc('0x5f')]+'\x20trunk\x20is\x20not\x20reachable';}}};};Dialer[_0x96bc('0x1b')][_0x96bc('0x8b')]=function(_0x5a7e4a,_0x556e28,_0xd53e5e,_0x4936e9){var _0x485141=this;return function(){var _0x3a5f1d=!![];return _0x485141[_0x96bc('0x8c')](_0x5a7e4a,_0x556e28,_0xd53e5e,_0x4936e9,_0x3a5f1d);};};Dialer[_0x96bc('0x1b')][_0x96bc('0x8d')]=function(_0x13157c,_0x59606b,_0x3d866f,_0xab0cc8){var _0x146ded=this;return function(){var _0x3a250d=![];return _0x146ded[_0x96bc('0x8c')](_0x13157c[_0x96bc('0x78')],_0x59606b,_0x3d866f,_0xab0cc8,_0x3a250d);};};Dialer[_0x96bc('0x1b')][_0x96bc('0x8c')]=function(_0x58a3bc,_0x16ca1b,_0x539e89,_0x5098b8,_0x38f400){var _0x6bbd2f=[];return new Promise(function(_0x13c592,_0x377328){if(!isNotNull(_0x58a3bc)){_0x5098b8[_0x96bc('0x6a')]=utils[_0x96bc('0x66')][_0x96bc('0x76')];return _0x377328(msgResponse(_0x96bc('0x8e'),_0x96bc('0x8f'),_0x539e89+_0x96bc('0x90')));}if(_['isEmpty'](_0x58a3bc)){_0x5098b8[_0x96bc('0x6a')]=utils[_0x96bc('0x66')][_0x96bc('0x91')];return _0x377328(msgResponse(_0x96bc('0x8e'),_0x96bc('0x8f'),_0x539e89+_0x96bc('0x92')));}if(_0x16ca1b&&_['isUndefined'](config[_0x96bc('0x93')][_0x16ca1b])){_0x5098b8[_0x96bc('0x6a')]=utils['CAMPAIGN_STATUS'][_0x96bc('0x94')];return _0x377328(msgResponse(_0x96bc('0x8e'),'Failure',_0x539e89+_0x96bc('0x95')+_0x16ca1b));}if(_[_0x96bc('0x96')](_0x58a3bc)){for(var _0x4de6f2=0x0;_0x4de6f2<_0x58a3bc[_0x96bc('0x97')];_0x4de6f2+=0x1){_0x6bbd2f[_0x96bc('0x98')](ami['Action']({'action':_0x96bc('0x99'),'command':util['format']('iftime\x20%s,%s',_0x58a3bc[_0x4de6f2]['interval'],!_[_0x96bc('0x3d')](config[_0x96bc('0x93')][_0x16ca1b])?_0x16ca1b:'')})[_0x96bc('0x3b')](function(_0x4208c9){return _0x4208c9[_0x96bc('0x9a')]['indexOf'](_0x96bc('0x9b'))>=0x0;})['catch'](myreject(_0x377328)));}}else{_0x6bbd2f[_0x96bc('0x98')](ami[_0x96bc('0x9c')]({'action':'command','command':util[_0x96bc('0x44')](_0x96bc('0x9d'),_0x58a3bc,!_[_0x96bc('0x3d')](config[_0x96bc('0x93')][_0x16ca1b])?_0x16ca1b:'')})[_0x96bc('0x3b')](function(_0x5aeb8d){return _0x5aeb8d['content'][_0x96bc('0x9e')](_0x96bc('0x9b'))>=0x0;})[_0x96bc('0x9f')](myreject(_0x377328)));}Promise[_0x96bc('0xa0')](_0x6bbd2f)[_0x96bc('0x3b')](function(_0x4d3ab8){var _0x20449f=_[_0x96bc('0xa1')](_0x4d3ab8);if(_0x20449f){return _0x13c592(_0x20449f);}else{_0x5098b8[_0x96bc('0x6a')]=_0x38f400?utils[_0x96bc('0x66')][_0x96bc('0xa2')]:utils[_0x96bc('0x66')][_0x96bc('0xa3')];return _0x377328(msgResponse(_0x96bc('0xa4'),'Failure',_0x96bc('0xa5')+_0x38f400+'\x20'+_0x539e89+'\x20Interval\x20is\x20overtime:\x20'+util[_0x96bc('0x43')](_0x58a3bc,{'showHidden':![],'depth':null})+_0x96bc('0xa6')+_0x16ca1b));}})[_0x96bc('0x9f')](function(_0x569080){return _0x377328(msgResponse(_0x96bc('0x8e'),_0x96bc('0x8f'),JSON['stringify'](_0x569080)));});});};Dialer['prototype'][_0x96bc('0x39')]=function(){var _0x2d419f=this;return cmHopper[_0x96bc('0xa7')]({'active':![]},{'where':{'active':!![]}})[_0x96bc('0x3b')](function(){setInterval(function(){_0x2d419f[_0x96bc('0xa8')]();},0x3e8);});};Dialer[_0x96bc('0x1b')][_0x96bc('0xa8')]=function(){var _0x510d09=this;var _0x284c44;for(var _0xaa38e1 in this[_0x96bc('0x20')]){if(typeof this['campaigns'][_0xaa38e1]!==_0x96bc('0xa9')){_0x284c44=this[_0x96bc('0x20')][_0xaa38e1];if(utils[_0x96bc('0x7c')](_0x284c44)&&utils[_0x96bc('0x79')](_0x284c44)){_0x284c44[_0x96bc('0x7f')]=!![];Promise[_0x96bc('0xaa')]()['then'](checkIsIVRCampaignActive(_0x284c44))[_0x96bc('0x3b')](checkInterval(_0x284c44))[_0x96bc('0x3b')](_0x510d09[_0x96bc('0xab')](_0x284c44))[_0x96bc('0x3b')](_0x510d09[_0x96bc('0x8b')](_0x284c44['dialGlobalInterval'],_0x284c44[_0x96bc('0xac')],_0x284c44[_0x96bc('0x5f')],_0x284c44))[_0x96bc('0x3b')](_0x510d09[_0x96bc('0x8d')](_0x284c44[_0x96bc('0x75')],_0x284c44['dialTimezone'],_0x284c44[_0x96bc('0x5f')],_0x284c44))[_0x96bc('0x3b')](_0x510d09[_0x96bc('0xad')](_0x284c44))[_0x96bc('0x9f')](loggerCatchQueueSummary('[syncCampaigns]',_0x284c44));}else{notSendMessagesCampaign(_0x284c44);}}}};Dialer[_0x96bc('0x1b')][_0x96bc('0xae')]=function(_0x30f79e){if(_0x30f79e[_0x96bc('0xaf')]!==_0x96bc('0xa')){clearPredictiveAttributes(_0x30f79e);}switch(_0x30f79e[_0x96bc('0xaf')]){case _0x96bc('0xb0'):this[_0x96bc('0xb1')](_0x30f79e,0x1);break;case _0x96bc('0xb2'):this[_0x96bc('0xb1')](_0x30f79e,_0x30f79e[_0x96bc('0xb3')]);break;case _0x96bc('0xa'):this['predictive'](_0x30f79e);break;case _0x96bc('0x9'):this['handlePower'](_0x30f79e,0x1);break;default:logger[_0x96bc('0x64')](_0x96bc('0xb4'),_0x30f79e[_0x96bc('0x5f')],_0x96bc('0xb5'));}};Dialer[_0x96bc('0x1b')]['ifTime']=function(_0x12368b,_0x2cd8ca){var _0x14c7f2=_0x12368b[_0x96bc('0xac')];var _0xd3d592=_0x2cd8ca?_0x12368b[_0x96bc('0xb6')]:_0x12368b[_0x96bc('0x75')][_0x96bc('0x78')];logger[_0x96bc('0xb7')](_0x96bc('0xb8'),_0xd3d592,_0x14c7f2,_0x12368b[_0x96bc('0x5f')],util[_0x96bc('0x44')]('Voice\x20Queue\x20%s\x20$s',_0x12368b[_0x96bc('0x5f')],_0x12368b['id']));var _0x13fd4b=null;return Interval['intervalIftime'](_0xd3d592,_0x14c7f2)[_0x96bc('0x3b')](function(_0x14a0c1){if(_0x14a0c1===!![]){return _0x14a0c1;}else{_0x12368b[_0x96bc('0x6a')]=_0x2cd8ca?utils['CAMPAIGN_STATUS']['OVERTIME_GLOBAL_INTERVAL']:utils[_0x96bc('0x66')][_0x96bc('0xa3')];_0x13fd4b=msgResponse(_0x96bc('0xa4'),_0x96bc('0x8f'),'Global:\x20'+_0x2cd8ca+'\x20'+_0x12368b[_0x96bc('0x5f')]+_0x96bc('0xb9')+util[_0x96bc('0x43')](_0xd3d592,{'showHidden':![],'depth':null})+_0x96bc('0xa6')+_0x14c7f2);}if(_0x13fd4b!==null){logger['silly']('Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:',_0x13fd4b);_0x13fd4b['isGlobal']=_0x2cd8ca;throw _0x13fd4b;}})[_0x96bc('0x9f')](function(_0x2951b2){logger[_0x96bc('0x64')]('AMI\x20IfTime',_0x2951b2);throw msgResponse(_0x96bc('0x82'),'Error',util[_0x96bc('0x43')](_0x2951b2,{'showHidden':![],'depth':null}));});};Dialer[_0x96bc('0x1b')][_0x96bc('0x2b')]=function(_0x34921d){if(this[_0x96bc('0x1f')][_0x34921d[_0x96bc('0xba')]]){if(this[_0x96bc('0xbb')][_0x34921d['uniqueid']]&&this['uniqueId'][_0x34921d[_0x96bc('0xbc')]]['type']!==_0x96bc('0xbd')){utils[_0x96bc('0xbe')](this[_0x96bc('0x1f')][_0x34921d[_0x96bc('0xba')]],_0x96bc('0xbf'));this['uniqueId'][_0x34921d[_0x96bc('0xbc')]]['answertime']=moment()['format'](_0x96bc('0xc0'));}}};Dialer['prototype'][_0x96bc('0xc1')]=function(_0x3326fe){var _0x4aad27=this[_0x96bc('0xbb')][_0x3326fe['uniqueid']];if(this[_0x96bc('0x1f')][_0x3326fe[_0x96bc('0xba')]]){if(_0x4aad27&&_0x4aad27[_0x96bc('0x3f')]!=='ivr'){delete this[_0x96bc('0xbb')][_0x3326fe[_0x96bc('0xbc')]];this['voiceQueues'][_0x3326fe[_0x96bc('0xba')]][_0x96bc('0xc2')]+=0x1;var _0x453c68=new AgentComplete(_0x4aad27,_0x3326fe);if(_0x3326fe[_0x96bc('0xc3')]===_0x96bc('0xc4')){_0x453c68[_0x96bc('0xc5')]=this[_0x96bc('0x1f')][_0x3326fe[_0x96bc('0xba')]][_0x96bc('0xc6')]&&this[_0x96bc('0x1f')][_0x3326fe['queue']][_0x96bc('0xc7')]?moment()[_0x96bc('0x44')]('YYYY-MM-DD\x20HH:mm:ss'):undefined;}hopperUtils[_0x96bc('0xc8')](_0x453c68)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0xc9')));hopperUtils[_0x96bc('0xca')](_0x453c68)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0xcb')));}}};Dialer[_0x96bc('0x1b')][_0x96bc('0x2e')]=function(_0x2ee9da){var _0xc12bd4=this[_0x96bc('0xbb')][_0x2ee9da[_0x96bc('0xbc')]];var _0x387297=this;var _0x5e24f4=![];var _0xc69518;var _0xb5a7c3;if(this[_0x96bc('0x1f')][_0x2ee9da['queue']]){if(_0xc12bd4&&_0xc12bd4[_0x96bc('0x3f')]!==_0x96bc('0xbd')){delete this['uniqueId'][_0x2ee9da[_0x96bc('0xbc')]];utils[_0x96bc('0xbe')](this[_0x96bc('0x1f')][_0x2ee9da[_0x96bc('0xba')]],'[syncQueueCallerAbandon]');_0xc12bd4[_0x96bc('0xcc')]=moment()[_0x96bc('0x44')](_0x96bc('0xc0'));var _0x4cd11e=new QueueCallerAbandon(_0xc12bd4,_0x2ee9da);if(utils['getSeconds'](_0xc12bd4['droptime'],_0xc12bd4['responsetime'])>=_0xc12bd4[_0x96bc('0xcd')]){this[_0x96bc('0x1f')][_0x2ee9da['queue']][_0x96bc('0x4d')]+=0x1;this[_0x96bc('0x1f')][_0x2ee9da['queue']][_0x96bc('0xce')]+=0x1;this[_0x96bc('0x1f')][_0x2ee9da[_0x96bc('0xba')]][_0x96bc('0xcf')]+=0x1;_0x4cd11e[_0x96bc('0xd0')]=0xa;_0x4cd11e[_0x96bc('0x6d')]='Drop';_0x4cd11e['dropreason']='TIMEOUT';_0x4cd11e['agiafterat']=this[_0x96bc('0x1f')][_0x2ee9da[_0x96bc('0xba')]][_0x96bc('0xc6')]?moment()[_0x96bc('0x44')](_0x96bc('0xc0')):undefined;_0x4cd11e[_0x96bc('0xd1')]+=0x1;_0x4cd11e[_0x96bc('0xd2')]+=0x1;_0xc69518=this[_0x96bc('0x1f')][_0x2ee9da[_0x96bc('0xba')]][_0x96bc('0xd3')];_0xb5a7c3=this[_0x96bc('0x1f')][_0x2ee9da[_0x96bc('0xba')]]['callAdditionalPhoneAfterMin'];hopperUtils[_0x96bc('0xd4')](_0x4cd11e,_0x4cd11e[_0x96bc('0xd0')],_0xc12bd4[_0x96bc('0xd5')])[_0x96bc('0x3b')](function(_0x1e1d0c){_0x5e24f4=_0x1e1d0c[_0x96bc('0xd6')]==0x1;if(_0x4cd11e[_0x96bc('0xd1')]>=_0x387297[_0x96bc('0x1f')][_0x2ee9da[_0x96bc('0xba')]][_0x96bc('0xd7')]){_0x387297[_0x96bc('0xd8')](_0x4cd11e,_0x1e1d0c['additional']);}else{hopperUtils['rescheduleContact']({'active':![],'countdropretry':_0x4cd11e[_0x96bc('0xd1')],'scheduledat':moment()[_0x96bc('0xd9')](_0x387297[_0x96bc('0x1f')][_0x2ee9da[_0x96bc('0xba')]][_0x96bc('0xd3')],_0x96bc('0xda'))[_0x96bc('0x44')](_0x96bc('0xc0')),'ContactId':_0xc12bd4['ContactId'],'ListId':_0xc12bd4['ListId'],'VoiceQueueId':_0xc12bd4['VoiceQueueId']||undefined,'CampaignId':_0xc12bd4[_0x96bc('0xdb')]||undefined})[_0x96bc('0x9f')](loggerCatch('[rescheduleContact][Drop]'));var _0x4d0b80=new History(_0x4cd11e);_0x4d0b80['state']=0xa;_0x4d0b80[_0x96bc('0x6d')]=_0x96bc('0xdc');_0x4d0b80[_0x96bc('0x6f')]=moment()[_0x96bc('0x44')](_0x96bc('0xc0'));_0x4d0b80[_0x96bc('0x6e')]=_0x4d0b80[_0x96bc('0x6f')];_0x4d0b80[_0x96bc('0xdd')]=_0x4cd11e[_0x96bc('0xdd')];_0x4d0b80[_0x96bc('0xde')]=_0x4cd11e[_0x96bc('0xde')];hopperUtils[_0x96bc('0xc8')](_0x4d0b80)[_0x96bc('0x9f')](loggerCatch('[syncAgentComplete][createHistory][10]'));}})[_0x96bc('0x3b')](function(){if(_0x5e24f4)hopperUtils[_0x96bc('0xdf')](_0x4cd11e,_0xc69518,_0xb5a7c3)[_0x96bc('0x3b')](function(){return 0x1;});});}else{this[_0x96bc('0x1f')][_0x2ee9da['queue']][_0x96bc('0x4f')]+=0x1;this[_0x96bc('0x1f')][_0x2ee9da[_0x96bc('0xba')]][_0x96bc('0xe0')]+=0x1;_0x4cd11e[_0x96bc('0xd0')]=0xb;_0x4cd11e[_0x96bc('0x6d')]=_0x96bc('0xe1');_0x4cd11e[_0x96bc('0xe2')]=_0x96bc('0xe3');_0x4cd11e[_0x96bc('0xe4')]+=0x1;_0x4cd11e['countglobal']+=0x1;_0xc69518=this[_0x96bc('0x1f')][_0x2ee9da[_0x96bc('0xba')]][_0x96bc('0xe5')];_0xb5a7c3=this[_0x96bc('0x1f')][_0x2ee9da[_0x96bc('0xba')]][_0x96bc('0xe6')];hopperUtils[_0x96bc('0xd4')](_0x4cd11e,_0x4cd11e[_0x96bc('0xd0')],_0xc12bd4[_0x96bc('0xd5')])['then'](function(_0x1cf4a6){if(_0x4cd11e[_0x96bc('0xe4')]>=_0x387297[_0x96bc('0x1f')][_0x2ee9da[_0x96bc('0xba')]][_0x96bc('0xe7')]){_0x387297[_0x96bc('0xd8')](_0x4cd11e,_0x1cf4a6[_0x96bc('0xd6')]);}else{hopperUtils['rescheduleContact']({'active':![],'countabandonedretry':_0x4cd11e[_0x96bc('0xe4')],'scheduledat':moment()[_0x96bc('0xd9')](_0x387297[_0x96bc('0x1f')][_0x2ee9da[_0x96bc('0xba')]]['dialAbandonedRetryFrequency'],_0x96bc('0xda'))[_0x96bc('0x44')](_0x96bc('0xc0')),'ContactId':_0xc12bd4[_0x96bc('0xe8')],'ListId':_0xc12bd4[_0x96bc('0xe9')],'VoiceQueueId':_0xc12bd4[_0x96bc('0xea')]||undefined,'CampaignId':_0xc12bd4[_0x96bc('0xdb')]||undefined})[_0x96bc('0x9f')](loggerCatch(_0x96bc('0xeb')));var _0x4c06ab=new History(_0x4cd11e);_0x4c06ab['state']=0xb;_0x4c06ab[_0x96bc('0x6d')]='Abandoned';_0x4c06ab[_0x96bc('0x6f')]=moment()['format'](_0x96bc('0xc0'));_0x4c06ab[_0x96bc('0x6e')]=_0x4c06ab['starttime'];_0x4c06ab[_0x96bc('0xdd')]=_0x4cd11e['calleridname'];_0x4c06ab[_0x96bc('0xde')]=_0x4cd11e[_0x96bc('0xde')];hopperUtils[_0x96bc('0xc8')](_0x4c06ab)['catch'](loggerCatch('[syncAgentComplete][createHistory][11]'));}})[_0x96bc('0x3b')](function(){if(_0x5e24f4)hopperUtils['swapAdditionalPhones'](_0x4cd11e,_0xc69518,_0xb5a7c3)['then'](function(){return 0x1;});});}}}};Dialer['prototype'][_0x96bc('0x35')]=function(_0x336f58){if(this['actions'][_0x336f58[_0x96bc('0xbc')]]){this[_0x96bc('0xec')][_0x336f58[_0x96bc('0xbc')]][_0x96bc('0xed')]=_0x336f58[_0x96bc('0xed')];}if(this[_0x96bc('0xbb')][_0x336f58['uniqueid']]){this[_0x96bc('0xbb')][_0x336f58[_0x96bc('0xbc')]][_0x96bc('0xed')]=_0x336f58[_0x96bc('0xed')];}};Dialer[_0x96bc('0x1b')][_0x96bc('0xee')]=function(_0x3997f0){if(!this[_0x96bc('0xec')][_0x3997f0[_0x96bc('0xef')]]){return;}var _0x37f1aa=this[_0x96bc('0x1f')][this[_0x96bc('0xec')][_0x3997f0[_0x96bc('0xef')]][_0x96bc('0xba')]][_0x96bc('0xf0')]||_0x96bc('0xf1');if(_0x37f1aa===_0x96bc('0xf2')){if(this[_0x96bc('0xec')][_0x3997f0[_0x96bc('0xef')]]&&_['isNil'](this[_0x96bc('0xec')][_0x3997f0['actionid']][_0x96bc('0xf3')])&&_0x3997f0['status']==='1'&&_0x3997f0[_0x96bc('0xf4')]==='0'){if(this[_0x96bc('0x21')][_0x3997f0[_0x96bc('0xf5')]]){if(!this[_0x96bc('0x21')][_0x3997f0['stateinterface']][_0x96bc('0xf3')]){this[_0x96bc('0x21')][_0x3997f0[_0x96bc('0xf5')]]['locked']=!![];this[_0x96bc('0xec')][_0x3997f0[_0x96bc('0xef')]][_0x96bc('0xf3')]=!![];this['actions'][_0x3997f0[_0x96bc('0xef')]][_0x96bc('0xf5')]=_0x3997f0[_0x96bc('0xf5')];}}}}else if(_0x37f1aa===_0x96bc('0xf1')){if(this[_0x96bc('0xec')][_0x3997f0[_0x96bc('0xef')]]){if(this['agents'][_0x3997f0[_0x96bc('0xf5')]]){this[_0x96bc('0xec')][_0x3997f0[_0x96bc('0xef')]][_0x96bc('0xf5')]=_0x3997f0['stateinterface'];if(_[_0x96bc('0xf6')](this[_0x96bc('0xf7')][this[_0x96bc('0xec')][_0x3997f0['actionid']][_0x96bc('0xba')]])){this['queueBooked'][this[_0x96bc('0xec')][_0x3997f0[_0x96bc('0xef')]][_0x96bc('0xba')]]=[];}this[_0x96bc('0xf7')][this['actions'][_0x3997f0[_0x96bc('0xef')]][_0x96bc('0xba')]][_0x96bc('0x98')](_[_0x96bc('0x5e')](_[_0x96bc('0x74')](this[_0x96bc('0xec')][_0x3997f0[_0x96bc('0xef')]],[_0x96bc('0xf8'),_0x96bc('0xf5')]),{'status':_0x3997f0[_0x96bc('0x87')],'paused':_0x3997f0['paused']}));}}}};Dialer[_0x96bc('0x1b')][_0x96bc('0x38')]=function(_0x5ed70e){if(!this['actions'][_0x5ed70e['actionid']]){return;}var _0x46e78d=this;var _0x3cb487=this['voiceQueues'][this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]]['queue']];var _0x592004=_0x3cb487['strategy']||_0x96bc('0xf1');if(_0x592004===_0x96bc('0xf2')){if(this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]]&&this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xf5')]){this[_0x96bc('0x1e')][_0x96bc('0xf9')](this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xf8')],this['actions'][_0x5ed70e[_0x96bc('0xef')]]['stateinterface'])['catch'](function(_0x1e89a6){logger[_0x96bc('0x64')]('[Catch][Preview][syncQueueStatusComplete]',util[_0x96bc('0x43')](_0x1e89a6,{'showHidden':![],'depth':null}));})['finally'](function(){utils[_0x96bc('0xbe')](_0x46e78d[_0x96bc('0x1f')][_0x46e78d[_0x96bc('0xec')][_0x5ed70e['actionid']][_0x96bc('0xba')]],_0x96bc('0xfa'));_0x46e78d[_0x96bc('0x21')][_0x46e78d[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]]['stateinterface']][_0x96bc('0xf3')]=![];delete _0x46e78d[_0x96bc('0xec')][_0x5ed70e['actionid']];unlockQueueStatus(_0x3cb487);});}else{utils[_0x96bc('0xbe')](this['voiceQueues'][this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xba')]],_0x96bc('0xfa'));hopperUtils['rescheduleContact']({'active':![],'ContactId':this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xe8')],'ListId':this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]]['ListId'],'VoiceQueueId':this['actions'][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xea')]||undefined,'CampaignId':this['actions'][_0x5ed70e[_0x96bc('0xef')]]['CampaignId']||undefined})['catch'](loggerCatch(_0x96bc('0xfb')));delete this['actions'][_0x5ed70e['actionid']];unlockQueueStatus(_0x3cb487);}}else if(_0x592004===_0x96bc('0xf1')){var _0x407e12;if(this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]]&&!_[_0x96bc('0x46')](this[_0x96bc('0xf7')][this[_0x96bc('0xec')][_0x5ed70e['actionid']][_0x96bc('0xba')]])){if(this[_0x96bc('0xfc')][_0x46e78d[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xba')]]){this[_0x96bc('0xfc')][_0x46e78d[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xba')]]=this[_0x96bc('0xfc')][this['actions'][_0x5ed70e['actionid']][_0x96bc('0xba')]]?this[_0x96bc('0xfc')][this[_0x96bc('0xec')][_0x5ed70e['actionid']][_0x96bc('0xba')]]:this['queueBooked'][this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xba')]]?this[_0x96bc('0xf7')][this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xba')]]['_rr']||0x0:0x0;}this[_0x96bc('0xf7')][this[_0x96bc('0xec')][_0x5ed70e['actionid']][_0x96bc('0xba')]][_0x96bc('0xfd')]=this[_0x96bc('0xfc')][this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xba')]];for(var _0x2b6b4d=0x0;_0x2b6b4d<this[_0x96bc('0xf7')][this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xba')]][_0x96bc('0x97')];_0x2b6b4d+=0x1){_0x407e12=rr(this[_0x96bc('0xf7')][this[_0x96bc('0xec')][_0x5ed70e['actionid']][_0x96bc('0xba')]]);this['queueBookedRR'][_0x46e78d['actions'][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xba')]]=this[_0x96bc('0xf7')][this['actions'][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xba')]][_0x96bc('0xfd')];if(_0x407e12[_0x96bc('0x87')]==='1'&&_0x407e12[_0x96bc('0xf4')]==='0'){break;}}if(!_[_0x96bc('0xf6')](_0x407e12)){this[_0x96bc('0x21')][_0x407e12[_0x96bc('0xf5')]][_0x96bc('0xfe')]=_[_0x96bc('0x3d')](this['agents'][_0x407e12['stateinterface']][_0x96bc('0xfe')])?!![]:this[_0x96bc('0x21')][_0x407e12[_0x96bc('0xf5')]][_0x96bc('0xfe')];}loggerBooked[_0x96bc('0x48')](_0x96bc('0xff'),_0x5ed70e[_0x96bc('0xef')],_0x96bc('0x100'),JSON[_0x96bc('0x73')](_[_0x96bc('0x74')](this['agents'][_0x407e12[_0x96bc('0xf5')]],[_0x96bc('0x5f'),'unlockRR'])),_0x96bc('0x101'),JSON[_0x96bc('0x73')](_0x407e12[_0x96bc('0xf8')]));if(!_[_0x96bc('0xf6')](_0x407e12)&&_0x407e12[_0x96bc('0x87')]==='1'&&_0x407e12['paused']==='0'&&this[_0x96bc('0x21')][_0x407e12[_0x96bc('0xf5')]][_0x96bc('0xfe')]){this[_0x96bc('0x21')][_0x407e12[_0x96bc('0xf5')]][_0x96bc('0xfe')]=![];this[_0x96bc('0xf7')][_0x46e78d[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xba')]]=[];this['preview'][_0x96bc('0xf9')](_0x407e12['idHopper'],_0x407e12[_0x96bc('0xf5')])[_0x96bc('0x9f')](function(_0x33b054){logger[_0x96bc('0x64')](_0x96bc('0x102'),util[_0x96bc('0x43')](_0x33b054,{'showHidden':![],'depth':null}));})[_0x96bc('0x103')](function(){utils[_0x96bc('0xbe')](_0x46e78d[_0x96bc('0x1f')][_0x46e78d[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xba')]],_0x96bc('0xfa'));setTimeout(function(){_0x46e78d['agents'][_0x407e12[_0x96bc('0xf5')]][_0x96bc('0xfe')]=!![];loggerBooked[_0x96bc('0x48')](_0x96bc('0x104'),_0x5ed70e[_0x96bc('0xef')],_0x96bc('0x100'),JSON[_0x96bc('0x73')](_[_0x96bc('0x74')](_0x46e78d[_0x96bc('0x21')][_0x407e12[_0x96bc('0xf5')]],['name',_0x96bc('0xfe')])),'contactAgent-idHopper:\x20',JSON[_0x96bc('0x73')](_0x407e12['idHopper']));},0xc7);delete _0x46e78d['actions'][_0x5ed70e[_0x96bc('0xef')]];unlockQueueStatus(_0x3cb487,_0x5ed70e[_0x96bc('0xef')]);});}else{loggerBooked[_0x96bc('0x48')]('[booked][unlock]');utils[_0x96bc('0xbe')](this[_0x96bc('0x1f')][this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xba')]],'[syncQueueStatusComplete]');hopperUtils['rescheduleContact']({'active':![],'ContactId':this['actions'][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xe8')],'ListId':this[_0x96bc('0xec')][_0x5ed70e['actionid']][_0x96bc('0xe9')],'VoiceQueueId':this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]]['VoiceQueueId']||undefined,'CampaignId':this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xdb')]||undefined})[_0x96bc('0x9f')](loggerCatch('[unlock][syncQueueStatusComplete]'));delete this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]];unlockQueueStatus(_0x3cb487);}}else{loggerBooked['info'](_0x96bc('0x105'));utils[_0x96bc('0xbe')](this[_0x96bc('0x1f')][this[_0x96bc('0xec')][_0x5ed70e['actionid']]['queue']],_0x96bc('0xfa'));hopperUtils[_0x96bc('0x106')]({'active':![],'ContactId':this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xe8')],'ListId':this['actions'][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xe9')],'VoiceQueueId':this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xea')]||undefined,'CampaignId':this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xdb')]||undefined})[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x107')));delete this['actions'][_0x5ed70e['actionid']];unlockQueueStatus(_0x3cb487);}}else{loggerBooked[_0x96bc('0x48')]('[booked][unlock3]');utils[_0x96bc('0xbe')](this['voiceQueues'][this['actions'][_0x5ed70e['actionid']]['queue']],_0x96bc('0xfa'));hopperUtils[_0x96bc('0x106')]({'active':![],'ContactId':this[_0x96bc('0xec')][_0x5ed70e['actionid']]['ContactId'],'ListId':this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xe9')],'VoiceQueueId':this[_0x96bc('0xec')][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xea')]||undefined,'CampaignId':this['actions'][_0x5ed70e[_0x96bc('0xef')]][_0x96bc('0xdb')]||undefined})[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x108')));delete this[_0x96bc('0xec')][_0x5ed70e['actionid']];unlockQueueStatus(_0x3cb487);}};Dialer[_0x96bc('0x1b')][_0x96bc('0x109')]=function(_0x11f48e){var _0x1607f9=this[_0x96bc('0xec')][_0x11f48e[_0x96bc('0xef')]];if(_0x1607f9){delete this[_0x96bc('0xec')][_0x11f48e[_0x96bc('0xef')]];_0x1607f9[_0x96bc('0x10a')]=moment()[_0x96bc('0x44')](_0x96bc('0xc0'));var _0x275f04=_0x1607f9['type']==='ivr'?this[_0x96bc('0x20')][_0x1607f9[_0x96bc('0xba')]]:this[_0x96bc('0x1f')][_0x1607f9['getQueue']()];if(_0x11f48e[_0x96bc('0x10b')]!=='Success'){utils[_0x96bc('0xbe')](_0x275f04,_0x96bc('0x10c'));return this[_0x96bc('0x10d')](_0x1607f9,_0x275f04,_0x11f48e)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x10e')));}this['uniqueId'][_0x11f48e[_0x96bc('0xbc')]]=_0x1607f9;}};Dialer[_0x96bc('0x1b')][_0x96bc('0x37')]=function(_0xeed896){var _0x34d1a0=this;var _0x1142b8=this[_0x96bc('0xbb')][_0xeed896[_0x96bc('0xbc')]];var _0x2c2bd6;if(!_[_0x96bc('0xf6')](_0xeed896)&&!_['isNil'](_0xeed896[_0x96bc('0x10f')])&&!_[_0x96bc('0xf6')](_0xeed896[_0x96bc('0x10f')][_0x96bc('0x110')])&&_0xeed896[_0x96bc('0x111')]===_0x96bc('0x112')&&_0x1142b8){if(_0x1142b8[_0x96bc('0x3f')]!==_0x96bc('0xbd')&&this['voiceQueues'][_0x1142b8[_0x96bc('0xba')]]['dialAMDActive']&&_0xeed896[_0x96bc('0x113')]==='HANGUP'){delete this['uniqueId'][_0xeed896[_0x96bc('0xbc')]];utils['decrementOriginate'](this[_0x96bc('0x1f')][_0x1142b8[_0x96bc('0xba')]],_0x96bc('0x114'));this[_0x96bc('0x1f')][_0x1142b8[_0x96bc('0xba')]][_0x96bc('0xc2')]+=0x1;this[_0x96bc('0x1f')][_0x1142b8[_0x96bc('0xba')]]['outboundAnswerAgiCallsDay']+=0x1;_0x2c2bd6=new Hangup(_0x1142b8,_0xeed896);_0x2c2bd6[_0x96bc('0xd0')]=0x12;_0x2c2bd6[_0x96bc('0x6d')]=_0x96bc('0x115');_0x2c2bd6[_0x96bc('0x116')]=_0x96bc('0x117');ami[_0x96bc('0x3e')](_0x96bc('0x118'),ut['buildObj'](_0x2c2bd6,_0x96bc('0x119')));this[_0x96bc('0x11a')](_0x2c2bd6,_0x96bc('0x11b'),_0x96bc('0x11c'));}if(_0x1142b8[_0x96bc('0x3f')]!=='ivr'&&this[_0x96bc('0x1f')][_0x1142b8[_0x96bc('0xba')]][_0x96bc('0x11d')]&&_0xeed896['value']===_0x96bc('0x11e')){return new Promise(function(_0x296df5,_0x5e4c5c){delete _0x34d1a0[_0x96bc('0xbb')][_0xeed896['uniqueid']];utils[_0x96bc('0xbe')](_0x34d1a0[_0x96bc('0x1f')][_0x1142b8[_0x96bc('0xba')]],_0x96bc('0x114'));_0x34d1a0[_0x96bc('0x1f')][_0x1142b8[_0x96bc('0xba')]][_0x96bc('0xc2')]+=0x1;_0x34d1a0['voiceQueues'][_0x1142b8[_0x96bc('0xba')]]['outboundAnswerAgiCallsDay']+=0x1;var _0x3d6ab4=_0x34d1a0[_0x96bc('0x1f')][_0x1142b8[_0x96bc('0xba')]];var _0x312a48=new Hangup(_0x1142b8,_0xeed896);_0x312a48[_0x96bc('0xd0')]=0x13;_0x312a48['statedesc']=_0x96bc('0x11f');_0x312a48[_0x96bc('0x116')]=_0x96bc('0x117');_0x312a48[_0x96bc('0x120')]+=0x1;_0x312a48[_0x96bc('0xd2')]+=0x1;_0x312a48['amd']=!![];ami[_0x96bc('0x3e')](_0x96bc('0x118'),ut['buildObj'](_0x312a48,_0x96bc('0x119')));hopperUtils[_0x96bc('0xc8')](_0x312a48)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x121')));if(_0x312a48[_0x96bc('0x122')]+_0x312a48['countcongestionretry']+_0x312a48[_0x96bc('0x123')]+_0x312a48['countnosuchnumberretry']+_0x312a48[_0x96bc('0xd1')]+_0x312a48['countabandonedretry']+_0x312a48[_0x96bc('0x120')]+_0x312a48['countagentrejectretry']>=_0x3d6ab4[_0x96bc('0x124')]){_0x34d1a0[_0x96bc('0x125')](_0x312a48,_0x296df5,_0x5e4c5c,_0x96bc('0x126'));}else{if(_0x312a48[_0x96bc('0x120')]>=_0x3d6ab4[_0x96bc('0x127')]){_0x34d1a0[_0x96bc('0x128')](_0x312a48,_0x296df5,_0x5e4c5c,_0x96bc('0x129'));}else{hopperUtils[_0x96bc('0x106')]({'active':![],'countmachineretry':_0x312a48['countmachineretry'],'scheduledat':moment()[_0x96bc('0xd9')](_0x3d6ab4[_0x96bc('0x12a')],'minutes')[_0x96bc('0x44')](_0x96bc('0xc0')),'ContactId':_0x312a48[_0x96bc('0xe8')],'ListId':_0x312a48[_0x96bc('0xe9')],'VoiceQueueId':_0x312a48[_0x96bc('0xea')]||undefined,'CampaignId':_0x312a48[_0x96bc('0xdb')]||undefined})[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x12b')));_0x296df5({'reschedule':0x1});}}});}if(_0x1142b8[_0x96bc('0x3f')]===_0x96bc('0xbd')&&this[_0x96bc('0x20')][_0x1142b8[_0x96bc('0xba')]][_0x96bc('0x11d')]&&_0xeed896[_0x96bc('0x113')]==='HANGUP'){delete this[_0x96bc('0xbb')][_0xeed896['uniqueid']];utils[_0x96bc('0xbe')](this['campaigns'][_0x1142b8[_0x96bc('0xba')]],'[syncVarSet]');_0x2c2bd6=new Hangup(_0x1142b8,_0xeed896);_0x2c2bd6[_0x96bc('0xd0')]=0x12;_0x2c2bd6[_0x96bc('0x6d')]=_0x96bc('0x115');_0x2c2bd6[_0x96bc('0x116')]='AMD';ami[_0x96bc('0x3e')](_0x96bc('0x118'),ut['buildObj'](_0x2c2bd6,'amd'));this[_0x96bc('0x11a')](_0x2c2bd6,_0x96bc('0x12c'),_0x96bc('0x12d'));}if(_0x1142b8[_0x96bc('0x3f')]==='ivr'&&this[_0x96bc('0x20')][_0x1142b8[_0x96bc('0xba')]][_0x96bc('0x11d')]&&_0xeed896[_0x96bc('0x113')]===_0x96bc('0x11e')){return new Promise(function(_0x326fa7,_0x521211){delete _0x34d1a0[_0x96bc('0xbb')][_0xeed896[_0x96bc('0xbc')]];utils['decrementOriginate'](_0x34d1a0[_0x96bc('0x20')][_0x1142b8[_0x96bc('0xba')]],'[syncVarSet]');_0x34d1a0[_0x96bc('0x20')][_0x1142b8[_0x96bc('0xba')]]['outboundAnswerCallsDay']+=0x1;_0x34d1a0[_0x96bc('0x20')][_0x1142b8[_0x96bc('0xba')]]['outboundAnswerAgiCallsDay']+=0x1;var _0x496783=_0x34d1a0[_0x96bc('0x20')][_0x1142b8[_0x96bc('0xba')]];var _0x3837b9=new Hangup(_0x1142b8,_0xeed896);_0x3837b9[_0x96bc('0xd0')]=0x13;_0x3837b9[_0x96bc('0x6d')]=_0x96bc('0x11f');_0x3837b9[_0x96bc('0x116')]=_0x96bc('0x117');_0x3837b9[_0x96bc('0x120')]+=0x1;_0x3837b9['countglobal']+=0x1;_0x3837b9[_0x96bc('0x119')]=!![];ami[_0x96bc('0x3e')](_0x96bc('0x118'),ut[_0x96bc('0x12e')](_0x3837b9,_0x96bc('0x119')));hopperUtils[_0x96bc('0xc8')](_0x3837b9)[_0x96bc('0x9f')](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x3837b9[_0x96bc('0x122')]+_0x3837b9[_0x96bc('0x12f')]+_0x3837b9[_0x96bc('0x123')]+_0x3837b9['countnosuchnumberretry']+_0x3837b9[_0x96bc('0xd1')]+_0x3837b9[_0x96bc('0xe4')]+_0x3837b9[_0x96bc('0x120')]+_0x3837b9[_0x96bc('0x130')]>=_0x496783['dialGlobalMaxRetry']){_0x34d1a0[_0x96bc('0x125')](_0x3837b9,_0x326fa7,_0x521211,'reason19\x20machine....');}else{if(_0x3837b9[_0x96bc('0x120')]>=_0x496783['dialMachineMaxRetry']){_0x34d1a0['createStateFinal'](_0x3837b9,_0x326fa7,_0x521211,_0x96bc('0x129'));}else{hopperUtils[_0x96bc('0x106')]({'active':![],'countmachineretry':_0x3837b9[_0x96bc('0x120')],'scheduledat':moment()[_0x96bc('0xd9')](_0x496783['dialMachineRetryFrequency'],_0x96bc('0xda'))[_0x96bc('0x44')](_0x96bc('0xc0')),'ContactId':_0x3837b9[_0x96bc('0xe8')],'ListId':_0x3837b9[_0x96bc('0xe9')],'VoiceQueueId':_0x3837b9['VoiceQueueId']||undefined,'CampaignId':_0x3837b9[_0x96bc('0xdb')]||undefined})['catch'](loggerCatch(_0x96bc('0x12b')));_0x326fa7({'reschedule':0x1});}}});}}};Dialer[_0x96bc('0x1b')]['syncHangup']=function(_0x39d151){var _0x807451=this[_0x96bc('0xbb')][_0x39d151[_0x96bc('0xbc')]];var _0x383498;if(!_0x807451){return;}if(_0x807451[_0x96bc('0x3f')]===_0x96bc('0xbd')){delete this[_0x96bc('0xbb')][_0x39d151[_0x96bc('0xbc')]];utils[_0x96bc('0xbe')](this['campaigns'][_0x807451[_0x96bc('0xba')]],_0x96bc('0x131'));this[_0x96bc('0x20')][_0x807451['queue']][_0x96bc('0x132')]+=0x1;if(_0x39d151[_0x96bc('0x133')]===_0x96bc('0x134')){const _0xfa3caa=new AgentComplete(_0x807451,_0x39d151);_0xfa3caa[_0x96bc('0xdb')]=this[_0x96bc('0x20')][_0x807451[_0x96bc('0xba')]]['id'];hopperUtils[_0x96bc('0xc8')](_0xfa3caa)['catch'](loggerCatch(_0x96bc('0x135')));hopperUtils[_0x96bc('0xca')](_0xfa3caa)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x136')));}else{_0x383498=new Hangup(_0x807451,_0x39d151);hopperUtils['createHistory'](_0x383498)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x137')));hopperUtils[_0x96bc('0xca')](_0x383498)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x138')));}}else{if(isNotNull(this[_0x96bc('0x1f')][_0x807451['queue']][_0x96bc('0x139')])){delete this[_0x96bc('0xbb')][_0x39d151['uniqueid']];utils['decrementOriginate'](this[_0x96bc('0x1f')][_0x807451[_0x96bc('0xba')]],'[syncHangup]');this[_0x96bc('0x1f')][_0x807451['queue']][_0x96bc('0xc2')]+=0x1;this[_0x96bc('0x1f')][_0x807451[_0x96bc('0xba')]][_0x96bc('0x13a')]+=0x1;_0x383498=new Hangup(_0x807451,_0x39d151);_0x383498[_0x96bc('0xd0')]=0x10;_0x383498[_0x96bc('0x6d')]=_0x96bc('0x13b');_0x383498['membername']=_0x96bc('0x13c');hopperUtils['createHistory'](_0x383498)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x137')));hopperUtils[_0x96bc('0xca')](_0x383498)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x138')));}else{delete this[_0x96bc('0xbb')][_0x39d151[_0x96bc('0xbc')]];utils['decrementOriginate'](this['voiceQueues'][_0x807451[_0x96bc('0xba')]],_0x96bc('0x13d'));if(_0x39d151['cause-txt']===_0x96bc('0x134')){this[_0x96bc('0x1f')][_0x807451['queue']]['outboundAnswerCallsDay']+=0x1;const _0x16a747=new AgentComplete(_0x807451,_0x39d151);_0x16a747[_0x96bc('0xea')]=this[_0x96bc('0x1f')][_0x807451['queue']]['id'];hopperUtils[_0x96bc('0xc8')](_0x16a747)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0xc9')));hopperUtils['moveContactManagedDialer'](_0x16a747)['catch'](loggerCatch(_0x96bc('0xcb')));}else{this[_0x96bc('0x1f')][_0x807451[_0x96bc('0xba')]][_0x96bc('0x13e')]+=0x1;_0x383498=new Hangup(_0x807451,_0x39d151);_0x383498[_0x96bc('0xd0')]=0xc;_0x383498[_0x96bc('0x6d')]=_0x39d151['cause-txt'];_0x383498[_0x96bc('0x116')]=_0x96bc('0x13f');hopperUtils['createHistory'](_0x383498)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x140')));hopperUtils[_0x96bc('0xca')](_0x383498)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x131')));}}}};Dialer['prototype'][_0x96bc('0xb')]=function(_0x2dccb8){var _0x5a82a6=this;if(!_0x5a82a6[_0x96bc('0x29')][_0x2dccb8['name']]){_0x5a82a6[_0x96bc('0x29')][_0x2dccb8[_0x96bc('0x5f')]]={'running':![]};}else if(_0x5a82a6['queuesSummary'][_0x2dccb8[_0x96bc('0x5f')]][_0x96bc('0x141')]===!![]){return;}else if(_0x5a82a6[_0x96bc('0x29')][_0x2dccb8[_0x96bc('0x5f')]][_0x96bc('0x141')]===![]){_0x5a82a6[_0x96bc('0x29')][_0x2dccb8[_0x96bc('0x5f')]][_0x96bc('0x141')]=!![];}var _0x5d3b8a=_0x5a82a6[_0x96bc('0x1f')][_0x2dccb8[_0x96bc('0x5f')]];var _0x354bcf=_0x5d3b8a[_0x96bc('0x6a')]!==utils['CAMPAIGN_STATUS'][_0x96bc('0x7a')];var _0x2fc91b=utils['isPreviewCampaign'](_0x5d3b8a);_0x5d3b8a[_0x96bc('0x142')]=utils['getQueueCampaignStatusMessage'](_0x5d3b8a,_0x5a82a6[_0x96bc('0x22')]);Promise[_0x96bc('0xaa')]()[_0x96bc('0x3b')](function(){if(_0x5d3b8a[_0x96bc('0x142')]===utils[_0x96bc('0x66')][_0x96bc('0x7a')]){if(_0x354bcf){clearPredictiveAttributes(_0x5d3b8a);_0x2dccb8[_0x96bc('0x27')]=undefined;_0x2dccb8[_0x96bc('0x28')]=undefined;}if(_0x5d3b8a[_0x96bc('0x142')]===utils[_0x96bc('0x66')]['INACTIVE']){_0x2dccb8['available']=0x0;_0x2dccb8['paused']=0x0;_0x2dccb8[_0x96bc('0x143')]=0x0;_0x2dccb8[_0x96bc('0x144')]=0x0;_0x2dccb8[_0x96bc('0x145')]=0x0;}}else if(_0x5d3b8a[_0x96bc('0x142')]===utils[_0x96bc('0x66')][_0x96bc('0x146')]&&!_0x2fc91b){return _0x5a82a6[_0x96bc('0x8e')](_0x5d3b8a,!![])[_0x96bc('0x3b')](function(){return _0x5a82a6['ifTime'](_0x5d3b8a,![]);})[_0x96bc('0x3b')](function(){return _0x5a82a6[_0x96bc('0xae')](_0x5d3b8a);})['catch'](function(_0x379c9e){loggerSyncQueueSummary['debug'](_0x96bc('0x147'),util[_0x96bc('0x43')](_0x379c9e,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x5d3b8a);});}else{clearPredictiveAttributes(_0x5d3b8a);}})[_0x96bc('0x3b')](function(){var _0x183997=_0x2dccb8[_0x96bc('0x148')](_0x5d3b8a);if(_0x183997||_0x5d3b8a[_0x96bc('0x149')]){_0x5d3b8a['queueSummaryCountersUpdated']=![];_0x2dccb8[_0x96bc('0x14a')](_0x5d3b8a);Object[_0x96bc('0x14b')](_0x5d3b8a,_0x2dccb8);emitOutboundVoiceQueueSummary(_0x2dccb8);}_0x5a82a6[_0x96bc('0x29')][_0x5d3b8a[_0x96bc('0x5f')]][_0x96bc('0x141')]=![];})[_0x96bc('0x9f')](function(_0x2bb3d9){logger[_0x96bc('0x64')](_0x96bc('0x147'),util['inspect'](_0x2bb3d9,{'showHidden':![],'depth':null}));_0x5a82a6['queuesSummary'][_0x5d3b8a[_0x96bc('0x5f')]][_0x96bc('0x141')]=![];});};Dialer[_0x96bc('0x1b')][_0x96bc('0x32')]=_[_0x96bc('0x14c')](function(){var _0x3f8add=_['filter'](this[_0x96bc('0x1f')],function(_0x4df443){return _0x4df443['dialPreviewRecallmeReminder'];});var _0x436d01=_['filter'](this[_0x96bc('0x21')],function(_0x2a877d){return _0x2a877d[_0x96bc('0x14d')]&&_0x2a877d[_0x96bc('0x87')]===_0x96bc('0x88');});if(_0x3f8add[_0x96bc('0x97')]>0x0&&_0x436d01[_0x96bc('0x97')]>0x0){return Promise['resolve']()[_0x96bc('0x3b')](cmHopper[_0x96bc('0x14e')](_[_0x96bc('0x14f')](_0x3f8add,'id'),previewRecallmeReminderInterval,_[_0x96bc('0x14f')](_0x436d01,'id')))[_0x96bc('0x3b')](function(_0x2a77fb){for(var _0xcc6511=0x0;_0xcc6511<_0x2a77fb['length'];_0xcc6511++){var _0x2f805b=_0x2a77fb[_0xcc6511]['Agent'][_0x96bc('0x5f')];if(_0x2f805b)io['to'](util[_0x96bc('0x44')](_0x96bc('0x150'),_0x2f805b))[_0x96bc('0x3e')]('user:dialPreviewRecallReminder',{'hopper':_0x2a77fb[_0xcc6511]});}})[_0x96bc('0x9f')](function(_0x4008db){logger[_0x96bc('0x64')]('checkPreviewRecallReminder',_0x4008db);});}},0x3c*0x3e8,{'leading':!![]});Dialer['prototype'][_0x96bc('0x151')]=function(){var _0x17bb6a=this;setInterval(function(){_0x17bb6a[_0x96bc('0x152')](_0x17bb6a[_0x96bc('0xbb')],_0x96bc('0x153'));_0x17bb6a[_0x96bc('0x152')](_0x17bb6a[_0x96bc('0xec')],_0x96bc('0x154'));},0x32c8);};Dialer[_0x96bc('0x1b')][_0x96bc('0x152')]=function(_0xabd083,_0x36102c){var _0x46cadf=this;for(var _0x2120ad in _0xabd083){if(typeof _0xabd083[_0x2120ad]!==_0x96bc('0xa9')){this[_0x96bc('0x1d')][_0x96bc('0x155')](function(){if(!_[_0x96bc('0xf6')](_0xabd083[_0x2120ad])){return ami[_0x96bc('0x9c')]({'action':_0x96bc('0x87'),'channel':_0xabd083[_0x2120ad][_0x96bc('0xed')]})[_0x96bc('0x9f')](function(_0x303354){if(_0x303354[_0x96bc('0x6a')]==='No\x20such\x20channel'){setTimeout(function(){if(_0xabd083[_0x2120ad]&&_0xabd083[_0x2120ad][_0x96bc('0x3f')]!==_0x96bc('0xbd')){utils[_0x96bc('0xbe')](_0x46cadf['voiceQueues'][_0xabd083[_0x2120ad][_0x96bc('0xba')]],_0x96bc('0x156'));logger['error'](_0x96bc('0x157'),_0x36102c,_0x2120ad,_0xabd083[_0x2120ad][_0x96bc('0xba')]);delete _0xabd083[_0x2120ad];}if(_0xabd083[_0x2120ad]&&_0xabd083[_0x2120ad][_0x96bc('0x3f')]===_0x96bc('0xbd')){utils[_0x96bc('0xbe')](_0x46cadf[_0x96bc('0x20')][_0xabd083[_0x2120ad][_0x96bc('0xba')]],_0x96bc('0x156'));logger['error']('[Dialer][checkChannel][ivr]',_0x36102c,_0x2120ad,_0xabd083[_0x2120ad][_0x96bc('0xba')]);delete _0xabd083[_0x2120ad];}},0x2328);}});}});}}};Dialer['prototype'][_0x96bc('0x158')]=function(_0x31df34){return Promise[_0x96bc('0xaa')]()[_0x96bc('0x3b')](voiceQueueRt[_0x96bc('0x158')](_0x31df34))['catch'](loggerCatch('[getVoiceQueueRtPauses]\x20'));};Dialer['prototype']['emptyContact']=function(_0x95b78c,_0x14ba33,_0x4954fc){var _0x3bc09f={'state':0x19,'statedesc':_0x96bc('0x159')};utils[_0x96bc('0xbe')](_0x14ba33,_0x96bc('0x15a')+_0x95b78c);this['saveInDb'](_[_0x96bc('0x5e')](_0x3bc09f,_[_0x96bc('0x74')](_0x4954fc,[_0x96bc('0xe8'),'ListId',_0x96bc('0x15b'),_0x96bc('0xea'),_0x96bc('0xdb')])),_0x96bc('0x15c'),_0x96bc('0x15a'));logger[_0x96bc('0x64')](_0x95b78c);};Dialer['prototype'][_0x96bc('0x11a')]=function(_0x44ae35,_0x17bf9a,_0x48037b){hopperUtils[_0x96bc('0xc8')](_0x44ae35)[_0x96bc('0x9f')](loggerCatch(_0x17bf9a));hopperUtils[_0x96bc('0xca')](_0x44ae35)[_0x96bc('0x9f')](loggerCatch(_0x48037b));};Dialer[_0x96bc('0x1b')][_0x96bc('0xd8')]=function(_0x58efd3,_0x149b33){hopperUtils[_0x96bc('0xc8')](_0x58efd3)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0xc9')));if(_0x149b33==0x0){hopperUtils[_0x96bc('0xca')](_0x58efd3)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x15d')));}};Dialer[_0x96bc('0x1b')]['checkPreviewRecallReminder']=function(_0x48580a){return Promise[_0x96bc('0xaa')]()[_0x96bc('0x3b')](cmHopper[_0x96bc('0x14e')](_0x48580a['id'],previewRecallmeReminderInterval))[_0x96bc('0x3b')](function(_0x1d9c39){for(var _0x4cf4f3=0x0;_0x4cf4f3<_0x1d9c39[_0x96bc('0x97')];_0x4cf4f3++){var _0x11e215=_0x1d9c39[_0x4cf4f3]['Agent'][_0x96bc('0x5f')];if(_0x11e215)io['to'](util[_0x96bc('0x44')]('user:%s',_0x11e215))[_0x96bc('0x3e')](_0x96bc('0x15e'),{'hopper':_0x1d9c39[_0x4cf4f3]});}})['catch'](function(){});};Dialer[_0x96bc('0x1b')][_0x96bc('0xad')]=function(_0x230f41){var _0x4e92c7=this;return function(){_0x4e92c7[_0x96bc('0x15f')](_0x230f41);};};Dialer[_0x96bc('0x1b')][_0x96bc('0x160')]=function(_0x3e785b,_0x5aa91b){var _0x231dcb=this;var _0x1491e4=uuid['v4']();this[_0x96bc('0xec')][_0x1491e4]=new Action(_0x3e785b,_0x5aa91b,_0x1491e4);return new Promise(function(_0x29d2bd,_0x1bc16f){if(_[_0x96bc('0x3d')](_0x3e785b)&&typeof _0x3e785b!=='object'){return _0x1bc16f(msgResponse(_0x96bc('0x161'),_0x96bc('0x8f'),_0x96bc('0x162')));}if(_[_0x96bc('0x3d')](_0x5aa91b['phone'])||_0x5aa91b[_0x96bc('0x163')]===null){return _0x1bc16f(msgResponse(_0x96bc('0x161'),'Failure','contact\x20is\x20undefine'));}var _0x139dab={'XMD-CALLERID':_0x231dcb[_0x96bc('0xec')][_0x1491e4]['getCaller'](),'XMD-AGI':_0x3e785b['dialQueueProject']?util[_0x96bc('0x44')]('\x22agi://%s/square,%s\x22',ipAgi,_0x3e785b['dialQueueProject']):_0x96bc('0x164'),'XMD-AGIAFTER':_0x3e785b[_0x96bc('0xc6')]?util[_0x96bc('0x44')](_0x96bc('0x165'),ipAgi,_0x3e785b[_0x96bc('0xc6')]):'NONE','XMD-QUEUE':utils[_0x96bc('0x166')](_0x3e785b)?util[_0x96bc('0x44')](_0x96bc('0x167'),_0x3e785b['name'],_0x3e785b['dialQueueOptions']||'',_0x3e785b['dialAgiAfterHangupAgent']?'c':'',_0x3e785b[_0x96bc('0xcd')]||0x3):_0x96bc('0x164'),'XMD-CONTACTID':_0x5aa91b[_0x96bc('0xe8')],'XMD-CDRTYPE':'dialer','CALLERID(all)':_0x231dcb[_0x96bc('0xec')][_0x1491e4][_0x96bc('0x168')](),'XMD-AMD':_0x3e785b[_0x96bc('0x11d')]?_0x96bc('0x146'):_0x96bc('0x164'),'XMD-DESTINATION':'xcally-motion-dialer'};if(_0x3e785b[_0x96bc('0x11d')]){_0x139dab[_0x96bc('0x169')]=_0x3e785b['dialAMDInitialSilence']||0x9c4;_0x139dab[_0x96bc('0x16a')]=_0x3e785b[_0x96bc('0x16b')]||0x5dc;_0x139dab[_0x96bc('0x16c')]=_0x3e785b[_0x96bc('0x16d')]||0x320;_0x139dab[_0x96bc('0x16e')]=_0x3e785b['dialAMDTotalAnalysisTime']||0x1388;_0x139dab[_0x96bc('0x16f')]=_0x3e785b[_0x96bc('0x170')]||0x64;_0x139dab[_0x96bc('0x171')]=_0x3e785b[_0x96bc('0x172')]||0x32;_0x139dab[_0x96bc('0x173')]=_0x3e785b['dialAMDMaximumNumberOfWords']||0x3;_0x139dab['XMD-AMDSILENCETHRESHOLD']=_0x3e785b['dialAMDSilenceThreshold']||0x100;_0x139dab['XMD-AMDMAXIMUMWORDLENGTH']=_0x3e785b['dialAMDMaximumWordLength']||0x1388;}if(utils[_0x96bc('0x166')](_0x3e785b)){_0x139dab['XMD-VOICEQUEUEID']=_0x5aa91b[_0x96bc('0xea')];}else{_0x139dab[_0x96bc('0x174')]=_0x5aa91b[_0x96bc('0xdb')];}var _0x55b36a=utils['setXMDContactVariables'](_0x5aa91b['Contact']);Object[_0x96bc('0x14b')](_0x139dab,_0x55b36a);var _0x45c0f2=_0x231dcb[_0x96bc('0x84')](_0x3e785b[_0x96bc('0x175')])?utils[_0x96bc('0x176')](_0x3e785b[_0x96bc('0x175')][_0x96bc('0x177')],_0x3e785b[_0x96bc('0x178')],_0x3e785b[_0x96bc('0x179')]>0x0?utils[_0x96bc('0x17a')](_0x3e785b[_0x96bc('0x17b')],_0x3e785b[_0x96bc('0x179')]):_0x3e785b[_0x96bc('0x17b')]):utils['getCallerId'](_[_0x96bc('0xf6')](_0x3e785b[_0x96bc('0x89')])?_0x3e785b[_0x96bc('0x175')][_0x96bc('0x177')]:_0x3e785b[_0x96bc('0x89')][_0x96bc('0x177')],_0x3e785b[_0x96bc('0x178')],_0x3e785b[_0x96bc('0x179')]>0x0?utils[_0x96bc('0x17a')](_0x3e785b[_0x96bc('0x17b')],_0x3e785b[_0x96bc('0x179')]):_0x3e785b[_0x96bc('0x17b')]);if(_0x45c0f2){_0x139dab[_0x96bc('0x17c')]=_0x231dcb[_0x96bc('0xec')][_0x1491e4][_0x96bc('0x17d')]=utils[_0x96bc('0x17e')](_0x45c0f2);_0x139dab[_0x96bc('0x17f')]=_0x5aa91b[_0x96bc('0x163')];}_0x3e785b['variables']=_0x139dab;return ami['Action']({'actionid':_0x1491e4,'action':_0x96bc('0x161'),'channel':_0x231dcb[_0x96bc('0x84')](_0x3e785b[_0x96bc('0x175')])?util['format'](_0x96bc('0x180'),_0x3e785b[_0x96bc('0x175')][_0x96bc('0x5f')],isNotNull(_0x3e785b['dialPrefix'])?_0x3e785b[_0x96bc('0x181')][_0x96bc('0x182')]()||'':'',_0x3e785b[_0x96bc('0x183')]>0x0?_0x5aa91b[_0x96bc('0x163')]['substring'](_0x3e785b[_0x96bc('0x183')]):_0x5aa91b[_0x96bc('0x163')]):util[_0x96bc('0x44')](_0x96bc('0x180'),_[_0x96bc('0xf6')](_0x3e785b[_0x96bc('0x89')])?_0x3e785b['Trunk'][_0x96bc('0x5f')]:_0x3e785b[_0x96bc('0x89')][_0x96bc('0x5f')],isNotNull(_0x3e785b['dialPrefix'])?_0x3e785b['dialPrefix'][_0x96bc('0x182')]()||'':'',_0x3e785b[_0x96bc('0x183')]>0x0?_0x5aa91b[_0x96bc('0x163')][_0x96bc('0x184')](_0x3e785b[_0x96bc('0x183')]):_0x5aa91b[_0x96bc('0x163')]),'callerid':_0x45c0f2,'Exten':_0x96bc('0x112'),'Context':'from-sip','Priority':'1','variable':_0x139dab,'timeout':(_0x3e785b['dialOriginateTimeout']||0x1e)*0x3e8,'async':!![],'channelid':_0x1491e4})[_0x96bc('0x3b')](function(_0x3b816d){return _0x29d2bd(_0x3b816d);})[_0x96bc('0x9f')](function(_0x22edc1){_0x3e785b['outboundOriginateFailureCallsDay']+=0x1;var _0x17afbb=new History(_0x231dcb['actions'][_0x1491e4]);logger[_0x96bc('0x64')](util['format']('[originateError]:\x20%s',JSON[_0x96bc('0x73')](_0x22edc1)));_0x17afbb[_0x96bc('0xd0')]=0xe;_0x17afbb[_0x96bc('0x6d')]='OriginateError';_0x17afbb[_0x96bc('0x6f')]=moment()[_0x96bc('0x44')](_0x96bc('0xc0'));_0x17afbb[_0x96bc('0x6e')]=_0x17afbb[_0x96bc('0x6f')];hopperUtils['createHistory'](_0x17afbb)['catch'](loggerCatch(_0x96bc('0x185')));_0x231dcb[_0x96bc('0xca')](_0x17afbb)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x185')))['finally'](function(){delete _0x231dcb[_0x96bc('0xec')][_0x1491e4];return _0x1bc16f(msgResponse('originate','Error','originate\x20action\x20Error'));});});});};Dialer['prototype'][_0x96bc('0x186')]=function(_0x4fde62,_0x430d9f,_0x22befc){var _0x590cc3=new History(_0x430d9f);if(_0x590cc3[_0x96bc('0x122')]+_0x590cc3[_0x96bc('0x12f')]+_0x590cc3[_0x96bc('0x123')]+_0x590cc3['countnosuchnumberretry']+_0x590cc3['countdropretry']+_0x590cc3[_0x96bc('0xe4')]+_0x590cc3[_0x96bc('0x120')]+_0x590cc3['countagentrejectretry']>=_0x22befc[_0x96bc('0x124')]-0x1){return!![];}switch(_0x4fde62){case 0x3:if(_0x590cc3[_0x96bc('0x123')]>=_0x22befc['dialNoAnswerMaxRetry']-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countnoanswerretry':_0x590cc3['countnoanswerretry']+=0x1,'scheduledat':moment()['add'](_0x22befc[_0x96bc('0x187')],_0x96bc('0xda'))[_0x96bc('0x44')](_0x96bc('0xc0')),'ContactId':_0x590cc3[_0x96bc('0xe8')],'ListId':_0x590cc3[_0x96bc('0xe9')],'VoiceQueueId':_0x590cc3[_0x96bc('0xea')]||undefined,'CampaignId':_0x590cc3[_0x96bc('0xdb')]||undefined})[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x188')));break;case 0x5:if(_0x590cc3['countbusyretry']>=_0x22befc[_0x96bc('0x189')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countbusyretry':_0x590cc3['countbusyretry']+=0x1,'scheduledat':moment()[_0x96bc('0xd9')](_0x22befc[_0x96bc('0x18a')],_0x96bc('0xda'))[_0x96bc('0x44')](_0x96bc('0xc0')),'ContactId':_0x590cc3['ContactId'],'ListId':_0x590cc3[_0x96bc('0xe9')],'VoiceQueueId':_0x590cc3[_0x96bc('0xea')]||undefined,'CampaignId':_0x590cc3['CampaignId']||undefined})['catch'](loggerCatch(_0x96bc('0x18b')));break;case 0x8:if(_0x590cc3['countcongestionretry']>=_0x22befc['dialCongestionMaxRetry']-0x1){return!![];}hopperUtils[_0x96bc('0x106')]({'active':![],'countcongestionretry':_0x590cc3[_0x96bc('0x12f')]+=0x1,'scheduledat':moment()['add'](_0x22befc[_0x96bc('0x18c')],_0x96bc('0xda'))[_0x96bc('0x44')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x590cc3['ContactId'],'ListId':_0x590cc3[_0x96bc('0xe9')],'VoiceQueueId':_0x590cc3[_0x96bc('0xea')]||undefined,'CampaignId':_0x590cc3[_0x96bc('0xdb')]||undefined})[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x18d')));break;case 0x0:if(_0x590cc3[_0x96bc('0x18e')]>=_0x22befc[_0x96bc('0x18f')]-0x1){return!![];}else{hopperUtils[_0x96bc('0x106')]({'active':![],'countnosuchnumberretry':_0x590cc3[_0x96bc('0x18e')]+=0x1,'scheduledat':moment()[_0x96bc('0xd9')](_0x22befc[_0x96bc('0x190')],_0x96bc('0xda'))[_0x96bc('0x44')](_0x96bc('0xc0')),'ContactId':_0x590cc3[_0x96bc('0xe8')],'ListId':_0x590cc3['ListId'],'VoiceQueueId':_0x590cc3[_0x96bc('0xea')]||undefined,'CampaignId':_0x590cc3[_0x96bc('0xdb')]||undefined})[_0x96bc('0x9f')](loggerCatch('[rescheduleContact][NoSuchNumber]'));}break;case 0xa:if(_0x590cc3[_0x96bc('0xd1')]>=_0x22befc['dialDropMaxRetry']-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countdropretry':_0x590cc3[_0x96bc('0xd1')]+=0x1,'scheduledat':moment()[_0x96bc('0xd9')](_0x22befc[_0x96bc('0xd3')],_0x96bc('0xda'))[_0x96bc('0x44')](_0x96bc('0xc0')),'ContactId':_0x590cc3['ContactId'],'ListId':_0x590cc3[_0x96bc('0xe9')],'VoiceQueueId':_0x590cc3[_0x96bc('0xea')]||undefined,'CampaignId':_0x590cc3[_0x96bc('0xdb')]||undefined})[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x191')));break;case 0xb:if(_0x590cc3['countabandonedretry']>=_0x22befc['dialAbandonedMaxRetry']-0x1){return!![];}hopperUtils[_0x96bc('0x106')]({'active':![],'countabandonedretry':_0x590cc3[_0x96bc('0xe4')]+=0x1,'scheduledat':moment()[_0x96bc('0xd9')](_0x22befc[_0x96bc('0xe5')],_0x96bc('0xda'))[_0x96bc('0x44')](_0x96bc('0xc0')),'ContactId':_0x590cc3['ContactId'],'ListId':_0x590cc3[_0x96bc('0xe9')],'VoiceQueueId':_0x590cc3[_0x96bc('0xea')]||undefined,'CampaignId':_0x590cc3[_0x96bc('0xdb')]||undefined})[_0x96bc('0x9f')](loggerCatch(_0x96bc('0xeb')));break;case 0x13:if(_0x590cc3['countmachineretry']>=_0x22befc[_0x96bc('0x127')]-0x1){return!![];}hopperUtils[_0x96bc('0x106')]({'active':![],'countmachineretry':_0x590cc3[_0x96bc('0x120')]+=0x1,'scheduledat':moment()[_0x96bc('0xd9')](_0x22befc[_0x96bc('0x12a')],_0x96bc('0xda'))[_0x96bc('0x44')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x590cc3[_0x96bc('0xe8')],'ListId':_0x590cc3[_0x96bc('0xe9')],'VoiceQueueId':_0x590cc3[_0x96bc('0xea')]||undefined,'CampaignId':_0x590cc3[_0x96bc('0xdb')]||undefined})[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x12b')));break;case 0x14:if(_0x590cc3[_0x96bc('0x130')]>=_0x22befc[_0x96bc('0x192')]-0x1){return!![];}hopperUtils[_0x96bc('0x106')]({'active':![],'countagentrejectretry':_0x590cc3[_0x96bc('0x130')]+=0x1,'scheduledat':moment()[_0x96bc('0xd9')](_0x22befc['dialAgentRejectRetryFrequency'],_0x96bc('0xda'))['format'](_0x96bc('0xc0')),'ContactId':_0x590cc3[_0x96bc('0xe8')],'ListId':_0x590cc3[_0x96bc('0xe9')],'VoiceQueueId':_0x590cc3[_0x96bc('0xea')]||undefined,'CampaignId':_0x590cc3[_0x96bc('0xdb')]||undefined})['catch'](loggerCatch(_0x96bc('0x193')));break;default:return!![];}};Dialer[_0x96bc('0x1b')][_0x96bc('0x10d')]=function(_0x2cddd6,_0x42e750,_0x3b709c){var _0xced859=this;var _0xf3140d=new History(_0x2cddd6);var _0x5762d5=![];var _0x431c93;var _0x1deb48;return new Promise(function(_0x3d6f95,_0x421cae){if(_[_0x96bc('0x3d')](_0x42e750)&&typeof _0x42e750!=='object'){return _0x421cae(msgResponse(_0x96bc('0x194'),_0x96bc('0x8f'),_0x96bc('0x195')));}if(_[_0x96bc('0x3d')](_0x3b709c)&&typeof _0x3b709c!=='object'){return _0x421cae(msgResponse(_0x96bc('0x194'),_0x96bc('0x8f'),'evt\x20is\x20undefine'));}hopperUtils[_0x96bc('0xd4')](_0xf3140d,_0x3b709c['reason'],_0x42e750)[_0x96bc('0x3b')](function(_0x53d31b){if(_0x53d31b[_0x96bc('0xd6')]==0x1)_0x5762d5=!![];switch(_0x3b709c[_0x96bc('0xc3')]){case'0':_0x42e750[_0x96bc('0x196')]+=0x1;_0xf3140d[_0x96bc('0xd0')]=0x0;_0xf3140d[_0x96bc('0x6d')]=_0x96bc('0x197');_0xf3140d['countnosuchnumberretry']+=0x1;_0xf3140d[_0x96bc('0xd2')]+=0x1;ami[_0x96bc('0x3e')](_0x96bc('0x198'),ut['buildObj'](_0x2cddd6,_0x96bc('0x199')));_0x431c93=_0x42e750[_0x96bc('0x190')];_0x1deb48=_0x42e750['callAdditionalPhoneAfterMin'];hopperUtils['createHistory'](_0xf3140d)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x121')));if(_0xced859['checkRetriveMax'](0x0,_0x2cddd6,_0x42e750)&&!_0x5762d5){if(_0xf3140d['countnosuchnumberretry']>=_0x42e750[_0x96bc('0x18f')]){_0xced859[_0x96bc('0x128')](_0xf3140d,_0x3d6f95,_0x421cae,_0x96bc('0x19a'));}else{_0xced859[_0x96bc('0x125')](_0xf3140d,_0x3d6f95,_0x421cae,'reason\x200\x20no\x20such\x20number....');}}break;case'3':_0x42e750['outboundNoAnswerCallsDay']+=0x1;_0xf3140d[_0x96bc('0xd0')]=0x3;_0xf3140d[_0x96bc('0x6d')]=_0x96bc('0x19b');_0xf3140d[_0x96bc('0x123')]+=0x1;_0xf3140d[_0x96bc('0xd2')]+=0x1;var _0x5eaa00=ut[_0x96bc('0x19c')](_0x2cddd6,_0x42e750);ami[_0x96bc('0x3e')](_0x96bc('0x19d'),_0x5eaa00);_0x431c93=_0x42e750['dialNoAnswerRetryFrequency'];_0x1deb48=_0x42e750[_0x96bc('0xe6')];hopperUtils['createHistory'](_0xf3140d)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x19e')));if(_0xced859[_0x96bc('0x186')](0x3,_0x2cddd6,_0x42e750)&&!_0x5762d5){if(_0xf3140d['countnoanswerretry']>=_0x42e750[_0x96bc('0x19f')]){_0xced859['createStateFinal'](_0xf3140d,_0x3d6f95,_0x421cae,_0x96bc('0x1a0'));}else{_0xced859[_0x96bc('0x125')](_0xf3140d,_0x3d6f95,_0x421cae,_0x96bc('0x1a0'));}}break;case'5':_0x42e750[_0x96bc('0x1a1')]+=0x1;_0xf3140d['state']=0x5;_0xf3140d['statedesc']=_0x96bc('0x1a2');_0xf3140d[_0x96bc('0x122')]+=0x1;_0xf3140d[_0x96bc('0xd2')]+=0x1;ami[_0x96bc('0x3e')](_0x96bc('0x1a3'),ut[_0x96bc('0x12e')](_0x2cddd6,'busy'));_0x431c93=_0x42e750[_0x96bc('0x18a')];_0x1deb48=_0x42e750[_0x96bc('0xe6')];hopperUtils[_0x96bc('0xc8')](_0xf3140d)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x1a4')));if(_0xced859[_0x96bc('0x186')](0x5,_0x2cddd6,_0x42e750)&&!_0x5762d5){if(_0xf3140d['countbusyretry']>=_0x42e750[_0x96bc('0x189')]){_0xced859[_0x96bc('0x128')](_0xf3140d,_0x3d6f95,_0x421cae,'reason\x205\x20busy');}else{_0xced859[_0x96bc('0x125')](_0xf3140d,_0x3d6f95,_0x421cae,_0x96bc('0x1a5'));}}break;case'8':_0x42e750['outboundCongestionCallsDay']+=0x1;_0xf3140d[_0x96bc('0xd0')]=0x8;_0xf3140d[_0x96bc('0x6d')]=_0x96bc('0x1a6');_0xf3140d['countcongestionretry']+=0x1;_0xf3140d[_0x96bc('0xd2')]+=0x1;_0x431c93=_0x42e750['dialCongestionRetryFrequency'];_0x1deb48=_0x42e750[_0x96bc('0xe6')];ami[_0x96bc('0x3e')](_0x96bc('0x1a7'),ut['buildObj'](_0x2cddd6,_0x96bc('0x1a8')));hopperUtils[_0x96bc('0xc8')](_0xf3140d)[_0x96bc('0x9f')](loggerCatch('[syncAgentComplete][createHistory][8]'));if(_0xced859['checkRetriveMax'](0x8,_0x2cddd6,_0x42e750)&&!_0x5762d5){if(_0xf3140d[_0x96bc('0x12f')]>=_0x42e750[_0x96bc('0x1a9')]){_0xced859[_0x96bc('0x128')](_0xf3140d,_0x3d6f95,_0x421cae,'reason\x208\x20congestion');}else{_0xced859[_0x96bc('0x125')](_0xf3140d,_0x3d6f95,_0x421cae,_0x96bc('0x1aa'));}}break;case'11':_0x42e750[_0x96bc('0x1ab')]+=0x1;_0xf3140d['state']=0xb;_0xf3140d[_0x96bc('0x6d')]='Abandoned';_0xf3140d[_0x96bc('0xe4')]+=0x1;_0xf3140d['countglobal']+=0x1;_0x431c93=_0x42e750[_0x96bc('0xe5')];_0x1deb48=_0x42e750['callAdditionalPhoneAfterMin'];hopperUtils[_0x96bc('0xc8')](_0xf3140d)['catch'](loggerCatch(_0x96bc('0x1ac')));if(_0xced859[_0x96bc('0x186')](0xb,_0x2cddd6,_0x42e750)&&!_0x5762d5){if(_0xf3140d[_0x96bc('0xe4')]>=_0x42e750[_0x96bc('0xe7')]){_0xced859[_0x96bc('0x128')](_0xf3140d,_0x3d6f95,_0x421cae,_0x96bc('0x1ad'));}else{_0xced859[_0x96bc('0x125')](_0xf3140d,_0x3d6f95,_0x421cae,_0x96bc('0x1ad'));}}break;case'20':_0x42e750['outboundRejectCallsDay']+=0x1;_0xf3140d[_0x96bc('0xd0')]=0x14;_0xf3140d[_0x96bc('0x6d')]=_0x96bc('0x1ae');_0xf3140d[_0x96bc('0x130')]+=0x1;_0xf3140d[_0x96bc('0xd2')]+=0x1;_0x431c93=_0x42e750[_0x96bc('0x1af')];_0x1deb48=_0x42e750[_0x96bc('0xe6')];ami[_0x96bc('0x3e')](_0x96bc('0x1b0'),ut[_0x96bc('0x12e')](_0x2cddd6,'agentreject'));hopperUtils[_0x96bc('0xc8')](_0xf3140d)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x1b1')));if(_0xced859[_0x96bc('0x186')](0x14,_0x2cddd6,_0x42e750)&&!_0x5762d5){if(_0xf3140d[_0x96bc('0x130')]>=_0x42e750[_0x96bc('0x192')]){_0xced859['createStateFinal'](_0xf3140d,_0x3d6f95,_0x421cae,_0x96bc('0x1b2'));}else{_0xced859['stateGlobal'](_0xf3140d,_0x3d6f95,_0x421cae,'reason\x2020\x20agentreject');}}break;default:_0x42e750[_0x96bc('0x13e')]+=0x1;_0xf3140d[_0x96bc('0xd0')]=0xc;_0xf3140d[_0x96bc('0x6d')]=_0x3b709c[_0x96bc('0xc3')];_0x431c93=_0x42e750[_0x96bc('0x1af')];_0x1deb48=_0x42e750[_0x96bc('0xe6')];hopperUtils['createHistory'](_0xf3140d)[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x1b3')));if(_0xced859[_0x96bc('0x186')](_0x3b709c[_0x96bc('0xc3')],_0x2cddd6,_0x42e750)&&!_0x5762d5){if(_0xf3140d['countbusyretry']+_0xf3140d[_0x96bc('0x12f')]+_0xf3140d[_0x96bc('0x123')]+_0xf3140d[_0x96bc('0x18e')]+_0xf3140d[_0x96bc('0xd1')]+_0xf3140d[_0x96bc('0xe4')]+_0xf3140d[_0x96bc('0x120')]+_0xf3140d[_0x96bc('0x130')]>=_0x42e750['dialGlobalMaxRetry']){_0xced859[_0x96bc('0x125')](_0xf3140d,_0x3d6f95,_0x421cae,_0x3b709c[_0x96bc('0xc3')]);}else{_0xced859[_0x96bc('0x128')](_0xf3140d,_0x3d6f95,_0x421cae,_0x3b709c[_0x96bc('0xc3')]);}}}})['then'](function(){if(_0x5762d5){hopperUtils[_0x96bc('0xdf')](_0xf3140d,_0x431c93,_0x1deb48)['then'](function(){return _0x3d6f95(0x1);});}});});};Dialer[_0x96bc('0x1b')][_0x96bc('0x125')]=function(_0x2da9c4,_0x2b6d43,_0x64d830,_0x49e77b){var _0x3b0126=new Final(_0x2da9c4);_0x3b0126[_0x96bc('0xd0')]=0xf;_0x3b0126['statedesc']=_0x96bc('0x1b4');this[_0x96bc('0x128')](_0x3b0126,_0x2b6d43,_0x64d830,_0x49e77b);};Dialer[_0x96bc('0x1b')][_0x96bc('0x128')]=function(_0x4da542,_0xd68f72,_0x11945e,_0x476624){hopperUtils[_0x96bc('0xca')](_0x4da542)['then'](function(){return _0xd68f72(msgResponse(_0x96bc('0x194'),'Success',_0x476624));})['catch'](function(){return _0x11945e(msgResponse('[moveContactManagedDialer][0]',_0x96bc('0x8f'),'contact\x20not\x20moved'));});};Dialer[_0x96bc('0x1b')][_0x96bc('0xa')]=function(_0x39c071){var _0x4ad716=_0x39c071[_0x96bc('0x1b5')]/0x64;var _0x36b303=_0x39c071[_0x96bc('0xce')]/(_0x39c071[_0x96bc('0xce')]+_0x39c071['outboundAnswerCallsDay']);var _0x4cbb7b=Math[_0x96bc('0x1b6')](_0x39c071[_0x96bc('0x1b7')]*(_0x39c071['predictiveIntervalMaxThreshold']/0x64));var _0x6a9059=Math[_0x96bc('0x1b6')](_0x39c071[_0x96bc('0x1b7')]*(_0x39c071[_0x96bc('0x1b8')]/0x64));var _0x505311=_0x39c071[_0x96bc('0x1b9')]+_0x39c071[_0x96bc('0x144')];var _0x2f0997=Math[_0x96bc('0x1ba')](_0x39c071[_0x96bc('0x1bb')]*_0x39c071[_0x96bc('0x5d')]*_0x39c071[_0x96bc('0x1bc')]*_0x39c071['predictiveIntervalMultiplicativeFactor']);if(_['isUndefined'](_0x39c071[_0x96bc('0x28')])){if(!_[_0x96bc('0x3d')](_0x39c071[_0x96bc('0x27')])){_0x39c071[_0x96bc('0x27')]=undefined;loggerPredictive[_0x96bc('0x64')](_0x96bc('0x1bd'),_0x96bc('0x1be'));}if(!_['isUndefined'](_0x39c071[_0x96bc('0x62')])){loggerPredictive[_0x96bc('0x64')](_0x96bc('0x1bd'),_0x96bc('0x1bf'));clearInterval(_0x39c071['handlePredictive']);_0x39c071[_0x96bc('0x62')]=undefined;}_0x39c071[_0x96bc('0x28')]=moment()[_0x96bc('0x44')](_0x96bc('0xc0'));loggerPredictive['info'](_0x39c071['name'],_0x96bc('0x1c0'),_0x39c071[_0x96bc('0x28')]);this[_0x96bc('0xb1')](_0x39c071,0x1);}else if(ifInterval(_0x39c071['dialPredictiveInterval'],_0x39c071[_0x96bc('0x28')])){this[_0x96bc('0xb1')](_0x39c071,0x1);loggerPredictiveCalls['info'](_0x96bc('0x1c1'),_0x39c071['startProgressive'],_0x39c071[_0x96bc('0x5f')]);_0x39c071['erlangCalls']=0x0;_0x39c071[_0x96bc('0xcf')]=0x0;}else if(_0x4ad716<_0x36b303&&_0x39c071[_0x96bc('0x1c2')]===_0x96bc('0x1c3')){clearPredictiveAttributes(_0x39c071);loggerPredictive['info'](_0x96bc('0x1c4'),_0x96bc('0x1c5'),_0x36b303,'startProgressive',_0x39c071[_0x96bc('0x5f')]);}else if(_0x2f0997<_0x39c071[_0x96bc('0xcf')]&&_0x39c071[_0x96bc('0x1c2')]===_0x96bc('0x1c3')){clearPredictiveAttributes(_0x39c071);loggerPredictive[_0x96bc('0x48')](_0x96bc('0x1c6'),_0x96bc('0x1c7'),_0x2f0997,_0x96bc('0x1c8'),_0x39c071[_0x96bc('0xcf')],_0x96bc('0x28'),_0x39c071[_0x96bc('0x5f')]);}else if(!ifInterval(_0x39c071[_0x96bc('0x1c9')],_0x39c071['startProgressive'])&&_[_0x96bc('0x3d')](_0x39c071['startPredictive'])&&!_[_0x96bc('0x3d')](_0x39c071['startProgressive'])){_0x39c071[_0x96bc('0x27')]=moment()[_0x96bc('0x44')](_0x96bc('0xc0'));loggerPredictive[_0x96bc('0x48')](_0x39c071['name'],_0x96bc('0x1ca'),_0x39c071[_0x96bc('0x27')]);hopperUtils['avgHandleTime'](_0x39c071[_0x96bc('0x1c9')])[_0x96bc('0x3b')](this[_0x96bc('0x1cb')](_0x39c071))[_0x96bc('0x3b')](mergeDataErlangB(_0x39c071))[_0x96bc('0x3b')](this[_0x96bc('0x1cc')](_0x39c071))[_0x96bc('0x9f')](loggerCatchPredictive(_0x96bc('0x1cd'),_0x39c071));}else if(!ifInterval(_0x39c071[_0x96bc('0x1c9')],_0x39c071[_0x96bc('0x27')])){_0x39c071['predictiveIntervalErlangCallsDroppedCalls']=0x0;_0x39c071[_0x96bc('0x27')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive[_0x96bc('0x48')](_0x39c071[_0x96bc('0x5f')],_0x96bc('0x1ce'),_0x39c071['startPredictive']);clearInterval(_0x39c071['handlePredictive']);_0x39c071[_0x96bc('0x62')]=undefined;hopperUtils[_0x96bc('0x1cf')](_0x39c071[_0x96bc('0x1c9')])['then'](this[_0x96bc('0x1cb')](_0x39c071))[_0x96bc('0x3b')](mergeDataErlangB(_0x39c071))[_0x96bc('0x3b')](this[_0x96bc('0x1cc')](_0x39c071))[_0x96bc('0x9f')](loggerCatchPredictive(_0x96bc('0x1d0'),_0x39c071));}else if(_0x39c071[_0x96bc('0x1b7')]&&_0x505311<_0x39c071[_0x96bc('0x1b7')]-_0x6a9059){clearPredictiveAttributes(_0x39c071);loggerPredictive[_0x96bc('0x48')](_0x39c071[_0x96bc('0x5f')],_0x96bc('0x1d1'),_0x505311,')\x20are\x20less\x20than\x20threshold\x20(',_0x39c071[_0x96bc('0x1b7')],'-',_0x6a9059,'=',_0x39c071[_0x96bc('0x1b7')]-_0x6a9059,')');}else if(_0x39c071['predictiveIntervalAvailable']&&_0x505311>_0x39c071[_0x96bc('0x1b7')]+_0x4cbb7b){clearPredictiveAttributes(_0x39c071);loggerPredictive[_0x96bc('0x48')](_0x39c071[_0x96bc('0x5f')],_0x96bc('0x1d1'),_0x505311,_0x96bc('0x1d2'),_0x39c071[_0x96bc('0x1b7')],'+',_0x4cbb7b,'=',_0x39c071[_0x96bc('0x1b7')]+_0x4cbb7b,')');}};Dialer[_0x96bc('0x1b')][_0x96bc('0x1cb')]=function(_0x2ed98f){var _0x3ca588=this;return function(_0x49a503){return new Promise(function(_0x3cd693,_0x40e895){_[_0x96bc('0x5e')](_0x2ed98f,_0x49a503[0x0]);if(checkGetDataPredictive(_0x49a503[0x0])){var _0x5975e5=_0x2ed98f[_0x96bc('0x1b7')]=_0x2ed98f[_0x96bc('0x144')]+_0x2ed98f[_0x96bc('0x1b9')];var _0x409525=_0x2ed98f['dialPredictiveInterval']*0x3c;var _0x7895f7=_0x49a503[0x0][_0x96bc('0x53')]+_0x49a503[0x0][_0x96bc('0x51')];var _0x4e3050=(_0x49a503[0x0][_0x96bc('0x4b')]+_0x49a503[0x0][_0x96bc('0x4d')]+_0x49a503[0x0][_0x96bc('0x4f')])/_0x49a503[0x0][_0x96bc('0x4a')];_0x2ed98f[_0x96bc('0x1bc')]=_0x4e3050>0x0?_0x4e3050:0x1;switch(_0x2ed98f[_0x96bc('0x1c2')]){case'dropRate':var _0x31020e=_0x2ed98f[_0x96bc('0x1b5')]/0x64;return _0x3ca588[_0x96bc('0x1d3')](_0x5975e5,_0x409525,_0x7895f7,_0x4e3050,_0x31020e)['then'](function(_0x45dbf3){return _0x3cd693(_0x45dbf3);});case _0x96bc('0x1d4'):var _0x369864=_0x2ed98f[_0x96bc('0x1b5')]/0x64;return _0x3ca588[_0x96bc('0x1d5')](_0x5975e5,_0x409525,_0x7895f7,_0x4e3050,_0x369864)['then'](function(_0x3f2704){return _0x3cd693(_0x3f2704);});default:return _0x40e895(msgResponse('[getDataPredictive]',_0x96bc('0x8f'),_0x96bc('0x1d6')));}}else{return _0x40e895(msgResponse(_0x96bc('0x1d7'),_0x96bc('0x8f'),'check\x20failure'));}});};};Dialer[_0x96bc('0x1b')][_0x96bc('0x1d8')]=function(_0x473b69){var _0x39635f=this;return function(_0xa69318){return new Promise(function(_0x579f88,_0x121884){_['merge'](_0x473b69,_0xa69318[0x0]);if(checkGetDataPredictive(_0xa69318[0x0])){loggerPredictive[_0x96bc('0x48')](JSON[_0x96bc('0x73')](_0xa69318[0x0]));if(_0x473b69['dialPredictiveOptimization']===_0x96bc('0x1c3')){return _0x39635f[_0x96bc('0x158')](_0x473b69['id'])['then'](function(_0x297aaf){var _0x392736=_0x473b69[_0x96bc('0x1d9')]-_0x297aaf[0x0][_0x96bc('0x1da')];var _0x1daf34=_0x473b69[_0x96bc('0x1c9')]*0x3c;var _0x411a3a=_0xa69318[0x0][_0x96bc('0x53')]+_0xa69318[0x0]['predictiveIntervalAvgHoldtime'];var _0xd433e9=(_0xa69318[0x0]['predictiveIntervalAnsweredCalls']+_0xa69318[0x0][_0x96bc('0x4d')]+_0xa69318[0x0][_0x96bc('0x4f')])/_0xa69318[0x0][_0x96bc('0x4a')];var _0x35e11f=_0x473b69[_0x96bc('0x1b5')]/0x64;_0x473b69[_0x96bc('0x1db')]=_0x297aaf[0x0][_0x96bc('0x1da')]||0x0;_0x473b69[_0x96bc('0x1bc')]=_0xd433e9>0x0?_0xd433e9:0x1;return _0x39635f[_0x96bc('0x1d3')](_0x392736,_0x1daf34,_0x411a3a,_0xd433e9,_0x35e11f);})['then'](function(_0x516b45){return _0x579f88(_0x516b45);})['catch'](function(_0x463c39){return _0x121884(msgResponse(_0x96bc('0x1dc'),_0x96bc('0x8f'),JSON[_0x96bc('0x73')](_0x463c39)));});}if(_0x473b69[_0x96bc('0x1c2')]===_0x96bc('0x1d4')){return _0x39635f['getVoiceQueueRtPauses'](_0x473b69['id'])['then'](function(_0x20b522){var _0x2f4ea2=_0x473b69[_0x96bc('0x1d9')]-_0x20b522[0x0][_0x96bc('0x1da')];var _0x27b7a9=_0x473b69[_0x96bc('0x1c9')]*0x3c;var _0x4f9884=_0xa69318[0x0][_0x96bc('0x53')]+_0xa69318[0x0][_0x96bc('0x51')];var _0x5c949a=(_0xa69318[0x0][_0x96bc('0x4b')]+_0xa69318[0x0]['predictiveIntervalDroppedCallsTimeout']+_0xa69318[0x0]['predictiveIntervalDroppedCallsCallersExit'])/_0xa69318[0x0]['predictiveIntervalTotalCalls'];var _0x66924a=_0x473b69[_0x96bc('0x1b5')]/0x64;_0x473b69[_0x96bc('0x1db')]=_0x20b522[0x0]['outboundQueuePauses']||0x0;_0x473b69['predictiveIntervalHitRate']=_0x5c949a>0x0?_0x5c949a:0x1;return _0x39635f[_0x96bc('0x1d5')](_0x2f4ea2,_0x27b7a9,_0x4f9884,_0x5c949a,_0x66924a);})[_0x96bc('0x3b')](function(_0x46e75f){return _0x579f88(_0x46e75f);})[_0x96bc('0x9f')](function(_0x2b3c6e){return _0x121884(msgResponse(_0x96bc('0x1dc'),_0x96bc('0x8f'),JSON[_0x96bc('0x73')](_0x2b3c6e)));});}}else{return _0x121884(msgResponse(_0x96bc('0x1d7'),_0x96bc('0x8f'),'check\x20failure'));}});};};Dialer[_0x96bc('0x1b')][_0x96bc('0x1cc')]=function(_0x28e861){var _0x2170ff=this;return function(){var _0x46ffb1=0x0;var _0x48bfdd=Math['floor'](_0x28e861['erlangCallToSecond']*0x3e8);if(_0x48bfdd>0x0){_0x48bfdd=_0x48bfdd<0x64?0x64:_0x48bfdd;loggerPredictive[_0x96bc('0x48')](_0x28e861[_0x96bc('0x5f')],_0x96bc('0x1dd'),_0x48bfdd,_0x96bc('0x1de'));_0x28e861[_0x96bc('0x62')]=setInterval(function(){_0x2170ff[_0x96bc('0x62')](_0x28e861);loggerPredictiveCalls[_0x96bc('0x48')](_0x96bc('0x1df'),_0x46ffb1+=0x1);},_0x48bfdd);}else{loggerPredictive[_0x96bc('0x48')](_0x28e861['name'],_0x96bc('0x1e0'));}};};Dialer[_0x96bc('0x1b')][_0x96bc('0x1e1')]=function(_0xe43189,_0x1e8130){var _0x1b6429=this;return function(_0x14f360){if(_[_0x96bc('0x46')](_0x14f360)){if(_[_0x96bc('0xf6')](_0x1e8130[_0x96bc('0x15b')])||!_0x1e8130[_0x96bc('0x1e2')]){if(_0xe43189['dialMethod']==='booked'){_0xe43189['queueStatusComplete']=_['isUndefined'](_0xe43189[_0x96bc('0x70')])?!![]:_0xe43189[_0x96bc('0x70')];var _0x518ad9=uuid['v4']();_0x1b6429[_0x96bc('0xec')][_0x518ad9]=new Action(_0xe43189,_0x1e8130,_0x518ad9);loggerBooked[_0x96bc('0x48')]('[booked][checkContactBlack]',_0x518ad9,'queueStatusComplete:\x20',JSON[_0x96bc('0x73')](_0xe43189[_0x96bc('0x70')]),_0x96bc('0x1e3'),_0xe43189[_0x96bc('0x5f')]);if(_0xe43189[_0x96bc('0x70')]){_0xe43189[_0x96bc('0x70')]=![];_0x1b6429[_0x96bc('0xf7')][_0x1b6429[_0x96bc('0xec')][_0x518ad9]['queue']]=[];ami[_0x96bc('0x9c')]({'actionid':_0x518ad9,'action':_0x96bc('0x1e4'),'queue':_0xe43189['name']})['catch'](function(){utils['decrementOriginate'](_0xe43189,'[checkContactBlack]');hopperUtils[_0x96bc('0x106')]({'active':![],'ContactId':_0x1b6429[_0x96bc('0xec')][_0x518ad9][_0x96bc('0xe8')],'ListId':_0x1b6429[_0x96bc('0xec')][_0x518ad9][_0x96bc('0xe9')],'VoiceQueueId':_0x1b6429['actions'][_0x518ad9][_0x96bc('0xea')]||undefined,'CampaignId':_0x1b6429['actions'][_0x518ad9][_0x96bc('0xdb')]||undefined})[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x1e5')));delete _0x1b6429[_0x96bc('0xec')][_0x518ad9];});}else{loggerBooked['info'](_0x96bc('0x1e6'),JSON[_0x96bc('0x73')](_0xe43189[_0x96bc('0x70')]),_0x96bc('0x1e3'),_0xe43189['name']);utils[_0x96bc('0xbe')](_0xe43189,_0x96bc('0x1e7'));hopperUtils[_0x96bc('0x106')]({'active':![],'ContactId':_0x1b6429[_0x96bc('0xec')][_0x518ad9][_0x96bc('0xe8')],'ListId':_0x1b6429['actions'][_0x518ad9][_0x96bc('0xe9')],'VoiceQueueId':_0x1b6429[_0x96bc('0xec')][_0x518ad9][_0x96bc('0xea')]||undefined,'CampaignId':_0x1b6429[_0x96bc('0xec')][_0x518ad9]['CampaignId']||undefined})['catch'](loggerCatch(_0x96bc('0x1e5')));delete _0x1b6429[_0x96bc('0xec')][_0x518ad9];}}else{return _0x1b6429['actionOriginate'](_0xe43189,_0x1e8130);}}else{if(utils[_0x96bc('0x1e8')](undefined,_0x1e8130[_0x96bc('0x1e9')])<_0xe43189[_0x96bc('0x1ea')]*0x3c){if(_0x1e8130[_0x96bc('0x1eb')]&&!_0x1e8130[_0x96bc('0x1eb')][_0x96bc('0x1ec')]){_0x1b6429['preview'][_0x96bc('0xf9')](_0x1e8130['id'])['finally'](function(){utils['decrementOriginate'](_0xe43189,'[checkContactBlack]');});}else{hopperUtils['unlockContact']({'active':![]},_0x1e8130['id'],0x1)[_0x96bc('0x103')](function(){utils[_0x96bc('0xbe')](_0xe43189,'[checkContactBlack]');});}}else{_0xe43189[_0x96bc('0x1ed')]+=0x1;utils['decrementOriginate'](_0xe43189,_0x96bc('0x1e7'));if(_0xe43189[_0x96bc('0x1ee')]){hopperUtils[_0x96bc('0x106')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x1e8130['ContactId'],'ListId':_0x1e8130[_0x96bc('0xe9')],'VoiceQueueId':_0x1e8130[_0x96bc('0xea')]||undefined,'CampaignId':_0x1e8130[_0x96bc('0xdb')]||undefined})[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x1ef')));hopperUtils[_0x96bc('0xc8')](createObjHistory(_0xe43189,_0x1e8130,utils['CAMPAIGN_STATUS'][_0x96bc('0x1f0')],0x17,_0x96bc('0x1f1')))['catch'](loggerCatch(_0x96bc('0x1f2')));}else{_0x1b6429[_0x96bc('0x11a')](createObjHistory(_0xe43189,_0x1e8130,utils[_0x96bc('0x66')][_0x96bc('0x1f3')],0x16,_0x96bc('0x1f4')),_0x96bc('0x1f5'),_0x96bc('0x1f6'));}}}}else{_0xe43189['outboundBlacklistCallsDay']+=0x1;_0x1b6429[_0x96bc('0x11a')](createObjHistory(_0xe43189,_0x1e8130,utils['CAMPAIGN_STATUS'][_0x96bc('0x1f7')],0xd,'Blacklist'),_0x96bc('0x1f8'),'[Originate][MoveBlacklist]');throw _0x96bc('0x1f9');}};};Dialer[_0x96bc('0x1b')]['handleIvr']=function(_0x14db78){var _0x48a8bc=this;var _0x481f04=_0x14db78[_0x96bc('0x1fa')]-_0x14db78[_0x96bc('0x1fb')];emitCampaignSummary(_0x14db78);if(_0x481f04>0x0&&_0x14db78['temp']==0x0){if(_0x481f04>this[_0x96bc('0x23')]){_0x481f04=this[_0x96bc('0x23')];}_0x14db78[_0x96bc('0x1fc')]=0x1;hopperUtils[_0x96bc('0x1fd')](_0x14db78,_0x481f04)[_0x96bc('0x3b')](function(_0x76ba80){_0x14db78['temp']=0x0;if(_0x76ba80){if(!utils[_0x96bc('0x1fe')](_0x76ba80)){_0x14db78[_0x96bc('0x6a')]=utils[_0x96bc('0x66')][_0x96bc('0x6b')];logger[_0x96bc('0x48')](_0x96bc('0x1ff')+_0x14db78[_0x96bc('0x5f')]);}else{_0x14db78[_0x96bc('0x1fb')]+=_0x76ba80[_0x96bc('0x97')];_0x14db78[_0x96bc('0x6a')]=utils[_0x96bc('0x66')][_0x96bc('0x200')];for(var _0x9d84e0=0x0;_0x9d84e0<_0x76ba80[_0x96bc('0x97')];_0x9d84e0+=0x1){_0x14db78['ivrTotalCallsDays']+=0x1;if(_[_0x96bc('0xf6')](_0x76ba80[_0x9d84e0])||_[_0x96bc('0xf6')](_0x76ba80[_0x9d84e0][_0x96bc('0x201')])||_[_0x96bc('0xf6')](_0x76ba80[_0x9d84e0][_0x96bc('0x163')])){_0x48a8bc['emptyContact']('[actionOriginate]\x20',_0x14db78,_0x76ba80[_0x9d84e0]);}else{hopperUtils['checkIsBlackListIvr'](_[_0x96bc('0x74')](_0x76ba80[_0x9d84e0],[_0x96bc('0xdb'),_0x96bc('0x163')]))[_0x96bc('0x3b')](_0x48a8bc[_0x96bc('0x1e1')](_0x14db78,_0x76ba80[_0x9d84e0]))['catch'](function(_0x18e192){logger[_0x96bc('0x64')](_0x96bc('0x202'),_0x18e192);utils[_0x96bc('0xbe')](_0x14db78,'[handleIvr]');});}}}}})[_0x96bc('0x9f')](function(_0x45a6c2){_0x14db78[_0x96bc('0x1fc')]=0x0;logger[_0x96bc('0x64')](_0x96bc('0x203'),_0x45a6c2);});}};Dialer[_0x96bc('0x1b')][_0x96bc('0xb1')]=function(_0x31d634,_0x50c92e){var _0x61a29a=this;var _0x2726c9=[];if(_0x50c92e<0x1||_0x31d634[_0x96bc('0xaf')]==='booked'){_0x50c92e=0x1;}var _0xc773bf=Math['floor'](_0x31d634[_0x96bc('0x1b9')]*_0x50c92e)-_0x31d634[_0x96bc('0x1fb')];if(_0x31d634[_0x96bc('0x204')]>0x0){var _0x1b709d=_0x31d634[_0x96bc('0x204')]-_0x31d634[_0x96bc('0x1fb')]-_0x31d634['talking']-_0x31d634['pTalking'];if(_0xc773bf>_0x1b709d){_0xc773bf=_0x1b709d;}}if(_0xc773bf>0x0&&_0x31d634[_0x96bc('0x1fc')]==0x0){if(_0x31d634[_0x96bc('0xaf')]===_0x96bc('0x9')){_0xc773bf=0x1;}if(_0xc773bf>this[_0x96bc('0x23')]){_0xc773bf=this['maxNumberOriginate'];}for(var _0x870856 in this[_0x96bc('0x21')]){if(typeof this[_0x96bc('0x21')][_0x870856]!==_0x96bc('0xa9')){if(this[_0x96bc('0x21')][_0x870856][_0x96bc('0xd0')]===_0x96bc('0x205')&&this['agents'][_0x870856][_0x96bc('0x87')]===_0x96bc('0x88')){_0x2726c9['push'](this['agents'][_0x870856]['id']);}}}_0x31d634[_0x96bc('0x1fc')]=0x1;hopperUtils[_0x96bc('0x206')](_0x31d634,_0x2726c9,_0xc773bf)[_0x96bc('0x3b')](function(_0x2b3062){_0x31d634[_0x96bc('0x1fc')]=0x0;if(_0x2b3062){if(!utils['checkContactEmpty'](_0x2b3062)){hopperUtils['countReScheduled'](_0x31d634)[_0x96bc('0x3b')](sendMessageReschedule(_0x31d634))[_0x96bc('0x9f')](loggerCatch(_0x96bc('0x207')));}else{_0x31d634[_0x96bc('0x1fb')]+=_0x2b3062['length'];_0x31d634[_0x96bc('0x6a')]=_0x31d634[_0x96bc('0xaf')]===_0x96bc('0x9')?utils[_0x96bc('0x66')][_0x96bc('0x146')]:utils[_0x96bc('0x66')]['RUNNING'];for(var _0x49860f=0x0;_0x49860f<_0x2b3062['length'];_0x49860f+=0x1){if(_[_0x96bc('0xf6')](_0x2b3062[_0x49860f])||_[_0x96bc('0xf6')](_0x2b3062[_0x49860f][_0x96bc('0x201')])||_[_0x96bc('0xf6')](_0x2b3062[_0x49860f][_0x96bc('0x163')])){_0x61a29a[_0x96bc('0x208')](_0x96bc('0x209'),_0x31d634,_0x2b3062[_0x49860f]);}else{hopperUtils[_0x96bc('0x20a')](_['pick'](_0x2b3062[_0x49860f],[_0x96bc('0xea'),_0x96bc('0x163')]))[_0x96bc('0x3b')](_0x61a29a[_0x96bc('0x1e1')](_0x31d634,_0x2b3062[_0x49860f]))[_0x96bc('0x9f')](function(_0x3e13b6){logger[_0x96bc('0x64')]('[actionOriginate]',_0x3e13b6);utils['decrementOriginate'](_0x31d634,_0x96bc('0x20b'));});}}}}})[_0x96bc('0x9f')](function(_0x2a84ac){_0x31d634[_0x96bc('0x1fc')]=0x0;logger['error']('[getContactCampaign2]',_0x2a84ac);});}};Dialer[_0x96bc('0x1b')][_0x96bc('0x62')]=function(_0x10e22c){if(_0x10e22c[_0x96bc('0x204')]>0x0){var _0x22b697=_0x10e22c[_0x96bc('0x204')]-_0x10e22c['originated']-_0x10e22c['talking'];if(_0x22b697>0x0&&_0x10e22c[_0x96bc('0x1fc')]==0x0){this['tryOriginatePredictive'](_0x10e22c);}else{loggerPredictiveCalls[_0x96bc('0x48')]('[handlePredictive][limitChannel]');}}else{this['tryOriginatePredictive'](_0x10e22c);}};Dialer['prototype']['tryOriginatePredictive']=function(_0x36f910){var _0x54bc0f=this;var _0x1684fe=[];_0x36f910[_0x96bc('0x1fb')]+=0x1;for(var _0x13bd0c in this[_0x96bc('0x21')]){if(typeof this['agents'][_0x13bd0c]!=='undefined'){if(this[_0x96bc('0x21')][_0x13bd0c][_0x96bc('0xd0')]===_0x96bc('0x205')&&this[_0x96bc('0x21')][_0x13bd0c][_0x96bc('0x87')]===_0x96bc('0x88')){_0x1684fe[_0x96bc('0x98')](this[_0x96bc('0x21')][_0x13bd0c]['id']);}}}_0x36f910[_0x96bc('0x1fc')]=0x1;return this[_0x96bc('0x206')](_0x36f910['id'],_0x1684fe,0x1,_0x36f910[_0x96bc('0x20c')],_0x36f910)[_0x96bc('0x3b')](function(_0x32622e){_0x36f910[_0x96bc('0x1fc')]=0x1;if(_0x32622e){if(!utils[_0x96bc('0x1fe')](_0x32622e)){utils[_0x96bc('0x20d')](_0x36f910,0x1,0x0);return hopperUtils[_0x96bc('0x20e')](_0x36f910)[_0x96bc('0x3b')](sendMessageReschedule(_0x36f910))[_0x96bc('0x9f')](loggerCatch('[countReScheduled]\x20'));}else{_0x36f910['message']=utils[_0x96bc('0x66')][_0x96bc('0x200')];if(_['isNil'](_0x32622e[0x0])||_[_0x96bc('0xf6')](_0x32622e[0x0]['Contact'])||_[_0x96bc('0xf6')](_0x32622e[0x0][_0x96bc('0x163')])){_0x54bc0f[_0x96bc('0x208')](_0x96bc('0x209'),_0x36f910,_0x32622e[0x0]);}else{return hopperUtils[_0x96bc('0x20a')](_[_0x96bc('0x74')](_0x32622e[0x0],[_0x96bc('0xea'),_0x96bc('0x163')]))[_0x96bc('0x3b')](_0x54bc0f[_0x96bc('0x1e1')](_0x36f910,_0x32622e[0x0]))[_0x96bc('0x9f')](function(_0x137728){logger['error']('[actionOriginatePredictive]',_0x137728);utils[_0x96bc('0xbe')](_0x36f910,_0x96bc('0x20f'));});}}}})[_0x96bc('0x9f')](function(_0x1b3168){_0x36f910[_0x96bc('0x1fc')]=0x0;logger[_0x96bc('0x64')]('[getContactCampaign2]',_0x1b3168);});};Dialer[_0x96bc('0x1b')][_0x96bc('0x1d3')]=function(_0x1bc18d,_0xd9946d,_0xc07bdd,_0x36699c,_0x24aa92,_0x1ff4e1){loggerPredictive[_0x96bc('0x48')](_0x96bc('0x210'));loggerPredictive[_0x96bc('0x48')](_0x96bc('0x211'),_0x1bc18d);loggerPredictive['info'](_0x96bc('0x212'),_0xd9946d);loggerPredictive['info'](_0x96bc('0x213'),_0xc07bdd);loggerPredictive[_0x96bc('0x48')](_0x96bc('0x214'),_0x36699c);loggerPredictive['info']('Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x24aa92);loggerPredictive[_0x96bc('0x48')](_0x96bc('0x54'));return new Promise(function(_0x41f64d,_0x48d8a8){if(_0x1bc18d<=0x0||isNaN(_0x1bc18d)){return _0x48d8a8(msgResponse(_0x96bc('0x215'),_0x96bc('0x83'),_0x96bc('0x216')+_0x1bc18d));}if(_0xc07bdd<=0x0||isNaN(_0xc07bdd)){return _0x48d8a8(msgResponse(_0x96bc('0x215'),_0x96bc('0x83'),_0x96bc('0x217')+_0xc07bdd));}if(_0x36699c<=0x0||isNaN(_0x36699c)){return _0x48d8a8(msgResponse('[abandonmentRate]',_0x96bc('0x83'),_0x96bc('0x218')+_0x36699c));}if(_0xd9946d<=0x0||isNaN(_0xd9946d)){return _0x48d8a8(msgResponse(_0x96bc('0x215'),_0x96bc('0x83'),_0x96bc('0x219')+_0xd9946d));}if(_0x24aa92<=0x0||isNaN(_0x24aa92)){return _0x48d8a8(msgResponse('[abandonmentRate]',_0x96bc('0x83'),_0x96bc('0x21a')+_0x24aa92));}_0x1ff4e1=_0x1ff4e1||0x0;var _0x56afca=0x1/_0xc07bdd;var _0x3b9a3d=0x0;var _0x40fec9=0x0;var _0x150659=0x0;var _0x2eb51d=0x0;for(var _0x28889b=0x0;_0x150659<_0x24aa92;_0x28889b+=0x1){_0x40fec9=_0x28889b/_0xd9946d;_0x3b9a3d=(_0x36699c*_0x40fec9+_0x1ff4e1)/_0x56afca;_0x150659=utils[_0x96bc('0x21b')](_0x3b9a3d,_0x1bc18d);_0x2eb51d=_0x3b9a3d/_0x1bc18d*(0x1-utils[_0x96bc('0x21b')](_0x3b9a3d,_0x1bc18d));}return _0x41f64d({'erlangCalls':_0x28889b,'erlangCallToSecond':_0xd9946d/_0x28889b,'erlangAbandonmentRate':_0x150659,'erlangBusyFactor':_0x2eb51d});});};Dialer[_0x96bc('0x1b')][_0x96bc('0x1d5')]=function(_0x8f92d3,_0xd9d67d,_0x238eb5,_0x409004,_0x2ff7db,_0x2e07d1){loggerPredictive[_0x96bc('0x48')](_0x96bc('0x21c'));loggerPredictive['info'](_0x96bc('0x211'),_0x8f92d3);loggerPredictive[_0x96bc('0x48')](_0x96bc('0x212'),_0xd9d67d);loggerPredictive[_0x96bc('0x48')]('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',_0x238eb5);loggerPredictive[_0x96bc('0x48')](_0x96bc('0x214'),_0x409004);loggerPredictive['info']('Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x2ff7db);loggerPredictive[_0x96bc('0x48')](_0x96bc('0x54'));return new Promise(function(_0x506aa8,_0x199ece){if(_0x8f92d3<=0x0||isNaN(_0x8f92d3)){return _0x199ece(msgResponse(_0x96bc('0x21d'),_0x96bc('0x83'),_0x96bc('0x216')+_0x8f92d3));}if(_0x238eb5<=0x0||isNaN(_0x238eb5)){return _0x199ece(msgResponse(_0x96bc('0x21d'),_0x96bc('0x83'),'Ts\x20=\x20'+_0x238eb5));}if(_0x409004<=0x0||isNaN(_0x409004)){return _0x199ece(msgResponse(_0x96bc('0x21d'),'Error',_0x96bc('0x218')+_0x409004));}if(_0xd9d67d<=0x0||isNaN(_0xd9d67d)){return _0x199ece(msgResponse(_0x96bc('0x21d'),_0x96bc('0x83'),_0x96bc('0x219')+_0xd9d67d));}if(_0x2ff7db<=0x0||isNaN(_0x2ff7db)){return _0x199ece(msgResponse('[busyFactor]',_0x96bc('0x83'),_0x96bc('0x21e')+_0x2ff7db));}_0x2e07d1=_0x2e07d1||0x0;var _0xe126c2=0x1/_0x238eb5;var _0x29a376=0x0;var _0x304070=0x0;var _0x14ab1a=0x0;var _0xe482f2=0x0;for(var _0x29ff68=0x0;_0xe482f2<_0x2ff7db;_0x29ff68+=0x1){_0x304070=_0x29ff68/_0xd9d67d;_0x29a376=(_0x409004*_0x304070+_0x2e07d1)/_0xe126c2;_0x14ab1a=utils[_0x96bc('0x21b')](_0x29a376,_0x8f92d3);_0xe482f2=_0x29a376/_0x8f92d3*(0x1-utils[_0x96bc('0x21b')](_0x29a376,_0x8f92d3));}return _0x506aa8({'erlangCalls':_0x29ff68,'erlangCallToSecond':_0xd9d67d/_0x29ff68,'erlangAbandonmentRate':_0x14ab1a,'erlangBusyFactor':_0xe482f2});});};module[_0x96bc('0x21f')]=Dialer;
\ No newline at end of file