Built motion from commit 863c3375.|2.6.28
[motion2.git] / server / services / ami / dialer / index.js
index 4f63251..376c102 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xead0=['stateinterface','merge','pick','strategy','run','idHopper','[Catch][Preview][syncQueueStatusComplete]','VoiceQueueId','[unlock][syncQueueStatusComplete]','queueBookedRR','_rr','unlockRR','[booked][RR]','contactAgent-idHopper:\x20','preview','[booked][RR][finaly]','Agent:\x20','[booked][unlock]','[booked][unlock2]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','syncOriginateResponse','getQueue','Success','callProgressDetecting','[callProgressDetecting]\x20','variable','amdstatus','xcally-motion-dialer','HANGUP','outboundAnswerAgiCallsDay','HangupInAMD','membername','AMD','custom:amd','buildObj','amd','saveInDb','[syncHangupInAMD][createHistory]','[syncHangupInAMD]','dialAMDActive','value','MACHINE','outboundAnswerCallsDay','Machine','countmachineretry','[syncAgentComplete][createHistory][0]','countbusyretry','countnosuchnumberretry','countagentrejectretry','reason19\x20machine....','dialMachineMaxRetry','createStateFinal','dialMachineRetryFrequency','[rescheduleContact][Machine]','[syncHangupInAMDIvr]','countnoanswerretry','dialGlobalMaxRetry','stateGlobal','ivrAnswerCallsDay','[syncHangupIvr]','dialQueueProject','AnswerAGI','[syncHangupIvr][createHistory]','cause-txt','Normal\x20Clearing','[syncAgentComplete]','outboundUnknownCallsDay','running','statusMessage','getQueueCampaignStatusMessage','available','inUse','talking','pTalking','ACTIVE','[syncQueueSummary]','compareToOutboundQueue','queueSummaryCountersUpdated','updateReportFromOutboundQueue','assign','throttle','filter','dialPreviewRecallmeReminder','online','handlePreviewRecallNotifications','map','Agent','user:dialPreviewRecallReminder','checkPreviewRecallReminder','clearZombieChannels','[uniqueid]','[actions]','enqueue','No\x20such\x20channel','[Dialer][checkChannel]','getVoiceQueueRtPauses','[getVoiceQueueRtPauses]\x20','originated','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','loggerHandler','notFound','UserId','[emptyContact][createHistory]','[emptyContact]','[syncQueueCallerAbandon]\x20[Drop]','user:%s','actionOriginate','object','originate','voiceQueue\x20is\x20undefine','phone','contact\x20is\x20undefine','getCaller','\x22agi://%s/square,%s\x22','isOutboundQueue','\x22%s,%s%s,,,%s\x22','dialQueueOptions','NONE','XMD-AMDINITIALSILENCE','dialAMDInitialSilence','dialAMDGreeting','XMD-AMDTOTALANALYSISTIME','dialAMDTotalAnalysisTime','XMD-AMDMINWORDLENGTH','dialAMDMinWordLength','XMD-AMDMAXIMUMNUMBEROFWORDS','XMD-AMDSILENCETHRESHOLD','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','dialAMDMaximumWordLength','setXMDContactVariables','getCallerId','Trunk','callerid','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','dialOriginateCallerIdNumber','XMD-ORIGINATECALLERIDNAME','originatecalleridname','extractCalleridName','SIP/%s/%s%s','dialPrefix','trim','dialCutDigit','substring','from-sip','dialOriginateTimeout','outboundOriginateFailureCallsDay','OriginateError','[originate][error]','originate\x20action\x20Error','checkRetriveMax','countcongestionretry','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','[rescheduleContact][NoAnswer]','dialBusyMaxRetry','[rescheduleContact]\x20[Busy]','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberMaxRetry','[rescheduleContact][NoSuchNumber]','dialAgentRejectRetryFrequency','[rescheduleContact][AgentReject]','[callProgressDetecting]','entity\x20is\x20undefine','evt\x20is\x20undefine','NoSuchNumber','custom:agentnosuchnumber','nosuchnumber','dialNoSuchNumberRetryFrequency','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','buildNoAnswerEventPayload','custom:agentnoanswer','[syncAgentComplete][createHistory][3]','reason\x203\x20ringing\x20no\x20answer','outboundBusyCallsDay','busy','dialBusyRetryFrequency','reason\x205\x20busy','outboundCongestionCallsDay','Congestion','custom:agentcongestion','[syncAgentComplete][createHistory][8]','dialCongestionMaxRetry','reason\x208\x20congestion','outboundAbandonedCallsDay','reason\x2011\x20abandoned','outboundRejectCallsDay','AgentReject','custom:agentreject','[syncAgentComplete][createHistory][20]','dialAgentRejectMaxRetry','reason\x2020\x20agentreject','Global','[moveContactManagedDialer][0]','contact\x20not\x20moved','dialPredictiveOptimizationPercentage','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','round','predictiveIntervalMinThreshold','predictiveIntervalHitRate','[startMethodPredictive][StartProgressive]','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','predictiveIntervalErlangCallsDroppedCalls','Max\x20Drop\x20','Drop\x20in\x20this\x20interval','dialPredictiveInterval','avgHandleTime','getDataPredictive','startMethodPredictive','recalculate\x20predictive\x20at',')\x20are\x20less\x20than\x20threshold\x20(','dropRate','agentBusyFactor','busyFactor','Unknown\x20Predictive','[getDataPredictive]','predictiveIntervalPauses','outboundQueuePauses','[CatchErlangB]','check\x20failure','one\x20call\x20every:','milliseconds','[handlePredictive]','fail\x20to\x20scheduled\x20calls','recallme','Queue:\x20','queuestatus','[unlockOriginate][syncQueueStatusComplete]','dialRecallMeTimeout','voicePause','unlockContact','[rescheduleContact][dialRecallInQueue]','QUEUE_RECALL','RecallFailedTimeout','outboundBlacklistCallsDay','BLACKLIST','Blacklist','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','inBlackList','handleIvr','limitCalls','checkContactEmpty','RUNNING','ivrTotalCallsDays','Contact','emptyContact','[actionOriginate]\x20','checkIsBlackListIvr','checkContactBlack','[actionOriginateIvr]\x20','[getContactCampaign2]','floor','dialLimitQueue','not_inuse','getContactDialer','countReScheduled','booked','checkIsBlackList','tryOriginatePredictive','[handlePredictive][limitChannel]','dialOrderByScheduledAt','[countReScheduled]\x20','[actionOriginatePredictive]\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','interval\x20=\x20','Amax\x20=\x20','erlangb','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','util','lodash','moment','./utils','./utils/hopper','../../../config/environment/','../../../config/logger','dialer','predictive','predictiveCalls','syncQueueSummary','../ami','redis','localhost','socket.io-emitter','../rpc/cmHopper','../rpc/voiceQueueRt','../rpc/setting','../rpc/interval','./models/action','./models/history','./models/final','./models/agentComplete','./models/hangup','XCALLY_IP_AGI','127.0.0.1','prototype','tail','finally','sequence','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','channels','actions','uniqueId','optionPredictive','startPredictive','startProgressive','ivrOriginated','queueBooked','queuesSummary','agentconnect','queuecallerabandon','bind','originateresponse','agentcomplete','syncAgentComplete','custom:queuesummary','custom:queuesummarycomplete','syncQueueSummaryComplete','hangup','syncHangup','newexten','syncNewExten','varset','syncVarSet','queuestatuscomplete','syncQueueStatusComplete','loopCampaigns','loopClearZombieChannels','getSettings','previewRecallmeReminderInterval','emit','type','debug','format','name','info','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','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','---------------------------','isUndefined','Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','---------\x20ErlangB\x20---------','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangBusyFactor','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','getSeconds','startProgressive\x20value\x20cleared','startPredictive\x20value\x20cleared','handlePredictive','handlePredictive\x20interval\x20cleared','error','inspect','checkContactLowerLimitOriginate','temp','CAMPAIGN_STATUS','CONTACTS_RESCHEDULED','[getContactDialer2][ReScheduled]','contactsRescheduled','contacts','NO_AVAILABLE_CONTACTS','[getContactDialer2][Empty]','message','state','statedesc','endtime','queueStatusComplete','[unlockQueueStatus][undefined]','stringify','NULL_INTERVAL','\x20INTERVAL_IS_NULL','Interval','Intervals','isEmpty','\x20NOT\x20Active','isIVRCampaign','campaign:ivr:%s','campaign:save','sendMessageOneNotActive','INACTIVE','is\x20not\x20active','DISACTIVED','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','is\x20disactive','Error','isTrunkReachable','active','SIP/%s','status','reachable','checkIsTrunkReachable','TrunkBackup','\x20trunk\x20is\x20not\x20reachable','ifTimeIvr','checkIfTimeIntervals','ifTime','Failure','\x20Intervals\x20is\x20null\x20','EMPTY_INTERVAL','\x20Intervals\x20is\x20empty\x20','\x20Timezone\x20unknow\x20','isArray','length','push','command','iftime\x20%s,%s','interval','timezones','then','content','catch','Action','indexOf','all','OVERTIME_GLOBAL_INTERVAL','OVERTIME_INTERVAL','[ifTime][promiseAll]','Global:\x20','\x20Interval\x20is\x20overtime:\x20','Timezone:\x20','resetActiveCalls','syncCampaigns','undefined','isIVRCampaignActive','resolve','checkIfTime','dialGlobalInterval','dialTimezone','launchHandleIvr','[syncCampaigns]','checkDialMethod','dialMethod','handlePower','power','dialPowerLevel','method\x20not\x20recognized','silly','Dialer::ifTime()','Voice\x20Queue\x20%s\x20$s','Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:','isGlobal','AMI\x20IfTime','syncAgentConnect','uniqueid','ivr','updateOriginated','queue','answertime','YYYY-MM-DD\x20HH:mm:ss','reason','agent','agiafterat','dialQueueProject2','dialAgiAfterHangupAgent','createHistory','moveContactManagedDialer','droptime','responsetime','dialQueueTimeout','outboundDropCallsDayTimeout','Drop','dropreason','TIMEOUT','countdropretry','dialDropRetryFrequency','callAdditionalPhoneAfterMin','verifyAdditionalPhones','voiceQueue','additional','dialDropMaxRetry','rescheduleContact','add','minutes','ContactId','ListId','CampaignId','[rescheduleContact][Drop]','starttime','calleridname','calleridnum','[syncAgentComplete][createHistory][10]','swapAdditionalPhones','outboundDropCallsDayCallersExit','Abandoned','countabandonedretry','countglobal','dialAbandonedRetryFrequency','dialAbandonedMaxRetry','queueCallerAbandonCreateState','[rescheduleContact][Abandoned]','[syncAgentComplete][createHistory][11]','channel','actionid','rrmemory','roundrobin','isNil','locked','paused'];(function(_0x59348a,_0x5d7e16){var _0x5dc4c8=function(_0x54a67c){while(--_0x54a67c){_0x59348a['push'](_0x59348a['shift']());}};_0x5dc4c8(++_0x5d7e16);}(_0xead0,0x123));var _0x0ead=function(_0x548627,_0x4ec392){_0x548627=_0x548627-0x0;var _0x844a84=_0xead0[_0x548627];return _0x844a84;};'use strict';var util=require(_0x0ead('0x0'));var _=require(_0x0ead('0x1'));var uuid=require('uuid');var moment=require(_0x0ead('0x2'));var rr=require('rr');var Redis=require('ioredis');var utils=require(_0x0ead('0x3'));var hopperUtils=require(_0x0ead('0x4'));var ut=require('../preview/util/util');var config=require(_0x0ead('0x5'));var logger=require(_0x0ead('0x6'))(_0x0ead('0x7'));var loggerBooked=require(_0x0ead('0x6'))('booked');var loggerPredictive=require(_0x0ead('0x6'))(_0x0ead('0x8'));var loggerPredictiveCalls=require('../../../config/logger')(_0x0ead('0x9'));var loggerSyncQueueSummary=require('../../../config/logger')(_0x0ead('0xa'));var ami=require(_0x0ead('0xb'));config[_0x0ead('0xc')]=_['defaults'](config['redis'],{'host':_0x0ead('0xd'),'port':0x18eb});var io=require(_0x0ead('0xe'))(new Redis(config[_0x0ead('0xc')]));var cmHopper=require(_0x0ead('0xf'));var voiceQueueRt=require(_0x0ead('0x10'));var RpcSetting=require(_0x0ead('0x11'));var Interval=require(_0x0ead('0x12'));var Action=require(_0x0ead('0x13'));var History=require(_0x0ead('0x14'));var Final=require(_0x0ead('0x15'));var AgentComplete=require(_0x0ead('0x16'));var QueueCallerAbandon=require('./models/queueCallerAbandon');var Hangup=require(_0x0ead('0x17'));var ipAgi=process['env'][_0x0ead('0x18')]||_0x0ead('0x19');var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence[_0x0ead('0x1a')]['enqueue']=function(_0x215e28){this['tail']=this[_0x0ead('0x1b')]?this['tail'][_0x0ead('0x1c')](_0x215e28):_0x215e28();};function Dialer(_0x30dd83,_0x1a65a6){this[_0x0ead('0x1d')]=new Sequence();this['preview']=_0x1a65a6;this[_0x0ead('0x1e')]=_0x30dd83['voiceQueues'];this[_0x0ead('0x1f')]=_0x30dd83[_0x0ead('0x1f')];this[_0x0ead('0x20')]=_0x30dd83[_0x0ead('0x20')];this['trunks']=_0x30dd83[_0x0ead('0x21')];this[_0x0ead('0x22')]=config[_0x0ead('0x22')]||0x2;this[_0x0ead('0x23')]={};this[_0x0ead('0x24')]={};this['contactsId']={};this[_0x0ead('0x25')]={};this[_0x0ead('0x26')]={};this[_0x0ead('0x27')]={};this[_0x0ead('0x28')]={};this[_0x0ead('0x29')]={};this[_0x0ead('0x2a')]={};this['queueBookedRR']={};this[_0x0ead('0x2b')]={};ami['on'](_0x0ead('0x2c'),this['syncAgentConnect']['bind'](this));ami['on'](_0x0ead('0x2d'),this['syncQueueCallerAbandon'][_0x0ead('0x2e')](this));ami['on'](_0x0ead('0x2f'),this['syncOriginateResponse'][_0x0ead('0x2e')](this));ami['on'](_0x0ead('0x30'),this[_0x0ead('0x31')]['bind'](this));ami['on'](_0x0ead('0x32'),this[_0x0ead('0xa')]['bind'](this));ami['on'](_0x0ead('0x33'),this[_0x0ead('0x34')][_0x0ead('0x2e')](this));ami['on'](_0x0ead('0x35'),this[_0x0ead('0x36')][_0x0ead('0x2e')](this));ami['on'](_0x0ead('0x37'),this[_0x0ead('0x38')]['bind'](this));ami['on'](_0x0ead('0x39'),this[_0x0ead('0x3a')][_0x0ead('0x2e')](this));ami['on']('queuemember',this['syncQueueMember']['bind'](this));ami['on'](_0x0ead('0x3b'),this[_0x0ead('0x3c')][_0x0ead('0x2e')](this));this[_0x0ead('0x3d')]();this[_0x0ead('0x3e')]();RpcSetting[_0x0ead('0x3f')]()['then'](function(_0x3a383d){previewRecallmeReminderInterval=_0x3a383d[_0x0ead('0x40')];});}function isNotNull(_0x2867ff){return _0x2867ff!==null&&!_['isUndefined'](_0x2867ff);}function msgResponse(_0x34bc11,_0x1a3277,_0x470fe9){return{'action':_0x34bc11,'response':_0x1a3277,'message':_0x470fe9,'stack':_0x470fe9};}function emit(_0x49916f,_0x1686a3,_0x507ea2){io['to'](_0x49916f)[_0x0ead('0x41')](_0x1686a3,_0x507ea2);}function emitOutboundVoiceQueueSummary(_0x41bdf6){if(_0x41bdf6[_0x0ead('0x42')]==='outbound'){logger[_0x0ead('0x43')]('[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:',util['inspect'](_0x41bdf6,{'showHidden':![],'depth':null}));emit(util[_0x0ead('0x44')]('voice:queue:%s',_0x41bdf6[_0x0ead('0x45')]),'voice_queue:save',_0x41bdf6);}}function checkGetDataPredictive(_0x372b40){if(isNotNull(_0x372b40)&&!_['isEmpty'](_0x372b40)){loggerPredictive['info']('-----\x20Stats\x20Predictive\x20---');loggerPredictive[_0x0ead('0x46')]('Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x372b40[_0x0ead('0x47')]);loggerPredictive[_0x0ead('0x46')]('Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x372b40[_0x0ead('0x48')]);loggerPredictive[_0x0ead('0x46')]('Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x372b40[_0x0ead('0x49')]);loggerPredictive[_0x0ead('0x46')](_0x0ead('0x4a'),_0x372b40[_0x0ead('0x4b')]);loggerPredictive[_0x0ead('0x46')](_0x0ead('0x4c'),_0x372b40[_0x0ead('0x4d')]);loggerPredictive[_0x0ead('0x46')](_0x0ead('0x4e'),_0x372b40[_0x0ead('0x4f')]);loggerPredictive[_0x0ead('0x46')](_0x0ead('0x50'));if(_0x372b40['predictiveIntervalTotalCalls']>0x0){if(!_[_0x0ead('0x51')](_0x372b40['predictiveIntervalAvgTalktime'])&&_0x372b40[_0x0ead('0x4f')]>0x0){return!![];}loggerPredictive[_0x0ead('0x46')](_0x0ead('0x52'));if(!_[_0x0ead('0x51')](_0x372b40[_0x0ead('0x4d')])&&_0x372b40['predictiveIntervalAvgHoldtime']>0x0){return!![];}loggerPredictive[_0x0ead('0x46')](_0x0ead('0x53'));}else{loggerPredictive[_0x0ead('0x46')](_0x0ead('0x54'));}}else{loggerPredictive[_0x0ead('0x46')]('History\x20information\x20are\x20empty');}return![];}function mergeDataErlangB(_0x2d5d8d){return function(_0x14aa97){loggerPredictive[_0x0ead('0x46')](_0x0ead('0x55'));loggerPredictive['info']('Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x14aa97[_0x0ead('0x56')]);loggerPredictive[_0x0ead('0x46')]('One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x14aa97[_0x0ead('0x57')]);loggerPredictive[_0x0ead('0x46')]('Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x14aa97[_0x0ead('0x58')]);loggerPredictive[_0x0ead('0x46')](_0x0ead('0x59'),_0x14aa97[_0x0ead('0x5a')]);loggerPredictive[_0x0ead('0x46')](_0x0ead('0x5b'),_0x14aa97['erlangAbandonmentRate']);loggerPredictive[_0x0ead('0x46')](_0x0ead('0x50'));_['merge'](_0x2d5d8d,_0x14aa97);};}function ifInterval(_0x2174e4,_0x2cbd17){if(_['isUndefined'](_0x2cbd17)){return![];}return utils[_0x0ead('0x5c')](undefined,_0x2cbd17)<_0x2174e4*0x3c;}function clearPredictiveAttributes(_0x3626c5){if(_0x3626c5[_0x0ead('0x28')]){_0x3626c5['startProgressive']=undefined;loggerPredictive[_0x0ead('0x43')](_0x3626c5['name'],_0x0ead('0x5d'));}if(_0x3626c5[_0x0ead('0x27')]){_0x3626c5[_0x0ead('0x27')]=undefined;loggerPredictive['debug'](_0x3626c5[_0x0ead('0x45')],_0x0ead('0x5e'));}if(_0x3626c5['handlePredictive']){clearInterval(_0x3626c5[_0x0ead('0x5f')]);_0x3626c5[_0x0ead('0x5f')]=undefined;loggerPredictive[_0x0ead('0x43')](_0x3626c5[_0x0ead('0x45')],_0x0ead('0x60'));}}function loggerCatchPredictive(_0x4ce4f2,_0x4a8975){return function(_0x172d55){loggerPredictive[_0x0ead('0x61')](_0x4a8975['name'],_0x4ce4f2);loggerPredictive[_0x0ead('0x61')](_0x172d55['stack']);clearPredictiveAttributes(_0x4a8975);};}function loggerCatch(_0x5062ef){return function(_0x46c9a9){logger['error'](_0x5062ef,util[_0x0ead('0x62')](_0x46c9a9,{'showHidden':![],'depth':null}));};}function loggerGetContactDialer(_0x1e985d,_0x2ce692,_0x58477b){return function(_0x2a5bff){utils[_0x0ead('0x63')](_0x2ce692,_0x58477b,0x0);_0x2ce692[_0x0ead('0x64')]=0x0;logger[_0x0ead('0x61')](_0x1e985d,util['inspect'](_0x2a5bff,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0xcc039){return function(_0x2d09eb){if(isNotNull(_0x2d09eb)&&isNotNull(_0x2d09eb[0x0])){if(_0x2d09eb[0x0]['contactsRescheduled']>0x0){_0xcc039['message']=utils[_0x0ead('0x65')][_0x0ead('0x66')];logger[_0x0ead('0x46')](_0x0ead('0x67')+_0xcc039['name'],_0x2d09eb[0x0][_0x0ead('0x68')],_0x0ead('0x69'));}else{_0xcc039['message']=utils[_0x0ead('0x65')][_0x0ead('0x6a')];logger[_0x0ead('0x46')](_0x0ead('0x6b')+_0xcc039[_0x0ead('0x45')]);}}};}function createObjHistory(_0x583936,_0x31df8a,_0x48c060,_0x256859,_0xe68558){_0x583936[_0x0ead('0x6c')]=_0x48c060;var _0x56f024=new Action(_0x583936,_0x31df8a);var _0x1d157e=new History(_0x56f024);_0x1d157e[_0x0ead('0x6d')]=_0x256859;_0x1d157e[_0x0ead('0x6e')]=_0xe68558;_0x1d157e[_0x0ead('0x6f')]=_0x56f024['starttime'];return _0x1d157e;}function unlockQueueStatus(_0x161466,_0x231a9e){setTimeout(function(){if(_[_0x0ead('0x51')](_0x161466[_0x0ead('0x70')])){loggerBooked[_0x0ead('0x61')](_0x0ead('0x71'),_0x231a9e);}_0x161466[_0x0ead('0x70')]=!![];loggerBooked[_0x0ead('0x46')]('[booked][unlockQueueStatus]',_0x231a9e,JSON[_0x0ead('0x72')](_['pick'](_0x161466,['name',_0x0ead('0x70')])));},0x1f3);}function checkInterval(_0x112679){return function(){if(!isNotNull(_0x112679['Interval'])){_0x112679['message']=utils[_0x0ead('0x65')][_0x0ead('0x73')];throw _0x112679['name']+_0x0ead('0x74');}if(!isNotNull(_0x112679[_0x0ead('0x75')][_0x0ead('0x76')])){_0x112679['message']=utils[_0x0ead('0x65')][_0x0ead('0x73')];throw _0x112679[_0x0ead('0x45')]+_0x0ead('0x74');}if(!isNotNull(_[_0x0ead('0x77')](_0x112679[_0x0ead('0x75')][_0x0ead('0x76')]))){_0x112679[_0x0ead('0x6c')]=utils[_0x0ead('0x65')][_0x0ead('0x73')];throw _0x112679['name']+_0x0ead('0x74');}};}function checkIsIVRCampaignActive(_0x1958bf){return function(){if(!utils['isIVRCampaignActive'](_0x1958bf)){_0x1958bf[_0x0ead('0x6c')]=utils[_0x0ead('0x65')]['INACTIVE'];throw _0x1958bf[_0x0ead('0x45')]+_0x0ead('0x78');}};}function emitCampaignSummary(_0x543e93){if(utils[_0x0ead('0x79')](_0x543e93)){emit(util[_0x0ead('0x44')](_0x0ead('0x7a'),_0x543e93['name']),_0x0ead('0x7b'),_0x543e93);}}function loggerCatchQueueSummary(_0x4a9354,_0x58f519){return function(_0x975a52){clearPredictiveAttributes(_0x58f519);emitCampaignSummary(_0x58f519);loggerSyncQueueSummary[_0x0ead('0x43')](_0x4a9354,util[_0x0ead('0x62')](_0x975a52,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x456fc8){if(_0x456fc8[_0x0ead('0x7c')]){if(_0x456fc8['originated']===0x0){_0x456fc8[_0x0ead('0x7c')]=![];_0x456fc8[_0x0ead('0x6c')]=utils[_0x0ead('0x65')][_0x0ead('0x7d')];loggerSyncQueueSummary[_0x0ead('0x43')]('[syncQueueSummary]\x20Campaign\x20Ivr:\x20',_0x456fc8[_0x0ead('0x45')],_0x0ead('0x7e'));}else{_0x456fc8[_0x0ead('0x6c')]=utils[_0x0ead('0x65')][_0x0ead('0x7f')];loggerSyncQueueSummary[_0x0ead('0x43')](_0x0ead('0x80'),_0x456fc8[_0x0ead('0x45')],_0x0ead('0x81'));}emitCampaignSummary(_0x456fc8);}}function myreject(_0x242950){return function(_0x4cc3da){return _0x242950(msgResponse('[ifTime][Action]',_0x0ead('0x82'),JSON[_0x0ead('0x72')](_0x4cc3da)));};}Dialer[_0x0ead('0x1a')][_0x0ead('0x83')]=function(_0x1b9d53){return!_['isUndefined'](_0x1b9d53)&&_0x1b9d53&&!_[_0x0ead('0x51')](_0x1b9d53[_0x0ead('0x45')])&&!_[_0x0ead('0x51')](_0x1b9d53[_0x0ead('0x84')])&&_0x1b9d53[_0x0ead('0x84')]&&(this[_0x0ead('0x21')][util[_0x0ead('0x44')](_0x0ead('0x85'),_0x1b9d53[_0x0ead('0x45')])][_0x0ead('0x86')]===_0x0ead('0x87')||this[_0x0ead('0x21')][util[_0x0ead('0x44')]('SIP/%s',_0x1b9d53[_0x0ead('0x45')])]['status']==='unmonitored');};Dialer[_0x0ead('0x1a')][_0x0ead('0x88')]=function(_0x1a9c57){var _0x10795f=this;return function(){if(!_0x10795f[_0x0ead('0x83')](_0x1a9c57['Trunk'])){if(!_0x10795f['isTrunkReachable'](_0x1a9c57[_0x0ead('0x89')])){_0x1a9c57[_0x0ead('0x6c')]=utils[_0x0ead('0x65')]['TRUNK_NOT_REACHABLE'];throw _0x1a9c57[_0x0ead('0x45')]+_0x0ead('0x8a');}}};};Dialer[_0x0ead('0x1a')]['checkIfTime']=function(_0x2640fa,_0x135887,_0x57b08d,_0x51148f){var _0x576d05=this;return function(){var _0xcf7607=!![];return _0x576d05[_0x0ead('0x8b')](_0x2640fa,_0x135887,_0x57b08d,_0x51148f,_0xcf7607);};};Dialer[_0x0ead('0x1a')][_0x0ead('0x8c')]=function(_0x9f9c01,_0x4fb0da,_0x18c539,_0x5a4396){var _0x2c73a3=this;return function(){var _0x4abb90=![];return _0x2c73a3[_0x0ead('0x8b')](_0x9f9c01[_0x0ead('0x76')],_0x4fb0da,_0x18c539,_0x5a4396,_0x4abb90);};};Dialer[_0x0ead('0x1a')][_0x0ead('0x8b')]=function(_0x17cb5e,_0x437314,_0x5e8fa7,_0x2d8de5,_0x17e8a4){var _0x27f1c9=[];return new Promise(function(_0x58925b,_0x522b1d){if(!isNotNull(_0x17cb5e)){_0x2d8de5[_0x0ead('0x6c')]=utils[_0x0ead('0x65')]['NULL_INTERVAL'];return _0x522b1d(msgResponse(_0x0ead('0x8d'),_0x0ead('0x8e'),_0x5e8fa7+_0x0ead('0x8f')));}if(_[_0x0ead('0x77')](_0x17cb5e)){_0x2d8de5[_0x0ead('0x6c')]=utils[_0x0ead('0x65')][_0x0ead('0x90')];return _0x522b1d(msgResponse('ifTime',_0x0ead('0x8e'),_0x5e8fa7+_0x0ead('0x91')));}if(_0x437314&&_[_0x0ead('0x51')](config['timezones'][_0x437314])){_0x2d8de5[_0x0ead('0x6c')]=utils['CAMPAIGN_STATUS']['UNKNOWN_TIMEZONE'];return _0x522b1d(msgResponse(_0x0ead('0x8d'),_0x0ead('0x8e'),_0x5e8fa7+_0x0ead('0x92')+_0x437314));}if(_[_0x0ead('0x93')](_0x17cb5e)){for(var _0x3a41ec=0x0;_0x3a41ec<_0x17cb5e[_0x0ead('0x94')];_0x3a41ec+=0x1){_0x27f1c9[_0x0ead('0x95')](ami['Action']({'action':_0x0ead('0x96'),'command':util[_0x0ead('0x44')](_0x0ead('0x97'),_0x17cb5e[_0x3a41ec][_0x0ead('0x98')],!_[_0x0ead('0x51')](config[_0x0ead('0x99')][_0x437314])?_0x437314:'')})[_0x0ead('0x9a')](function(_0x192511){return _0x192511[_0x0ead('0x9b')]['indexOf']('true')>=0x0;})[_0x0ead('0x9c')](myreject(_0x522b1d)));}}else{_0x27f1c9[_0x0ead('0x95')](ami[_0x0ead('0x9d')]({'action':'command','command':util['format']('iftime\x20%s,%s',_0x17cb5e,!_[_0x0ead('0x51')](config['timezones'][_0x437314])?_0x437314:'')})[_0x0ead('0x9a')](function(_0x2807e6){return _0x2807e6[_0x0ead('0x9b')][_0x0ead('0x9e')]('true')>=0x0;})[_0x0ead('0x9c')](myreject(_0x522b1d)));}Promise[_0x0ead('0x9f')](_0x27f1c9)[_0x0ead('0x9a')](function(_0x5cdb90){var _0x52a96f=_['some'](_0x5cdb90);if(_0x52a96f){return _0x58925b(_0x52a96f);}else{_0x2d8de5[_0x0ead('0x6c')]=_0x17e8a4?utils[_0x0ead('0x65')][_0x0ead('0xa0')]:utils[_0x0ead('0x65')][_0x0ead('0xa1')];return _0x522b1d(msgResponse(_0x0ead('0xa2'),_0x0ead('0x8e'),_0x0ead('0xa3')+_0x17e8a4+'\x20'+_0x5e8fa7+_0x0ead('0xa4')+util[_0x0ead('0x62')](_0x17cb5e,{'showHidden':![],'depth':null})+_0x0ead('0xa5')+_0x437314));}})[_0x0ead('0x9c')](function(_0x8f2b4b){return _0x522b1d(msgResponse(_0x0ead('0x8d'),_0x0ead('0x8e'),JSON['stringify'](_0x8f2b4b)));});});};Dialer[_0x0ead('0x1a')][_0x0ead('0x3d')]=function(){var _0x4bc5e3=this;return cmHopper[_0x0ead('0xa6')]({'active':![]},{'where':{'active':!![]}})[_0x0ead('0x9a')](function(){setInterval(function(){_0x4bc5e3['syncCampaigns']();},0x3e8);});};Dialer[_0x0ead('0x1a')][_0x0ead('0xa7')]=function(){var _0x20420c=this;var _0x4807a1;for(var _0x49a897 in this['campaigns']){if(typeof this[_0x0ead('0x1f')][_0x49a897]!==_0x0ead('0xa8')){_0x4807a1=this['campaigns'][_0x49a897];if(utils[_0x0ead('0x79')](_0x4807a1)&&utils[_0x0ead('0xa9')](_0x4807a1)){_0x4807a1[_0x0ead('0x7c')]=!![];Promise[_0x0ead('0xaa')]()[_0x0ead('0x9a')](checkIsIVRCampaignActive(_0x4807a1))['then'](checkInterval(_0x4807a1))[_0x0ead('0x9a')](_0x20420c[_0x0ead('0x88')](_0x4807a1))['then'](_0x20420c[_0x0ead('0xab')](_0x4807a1[_0x0ead('0xac')],_0x4807a1[_0x0ead('0xad')],_0x4807a1[_0x0ead('0x45')],_0x4807a1))[_0x0ead('0x9a')](_0x20420c[_0x0ead('0x8c')](_0x4807a1[_0x0ead('0x75')],_0x4807a1['dialTimezone'],_0x4807a1[_0x0ead('0x45')],_0x4807a1))[_0x0ead('0x9a')](_0x20420c[_0x0ead('0xae')](_0x4807a1))[_0x0ead('0x9c')](loggerCatchQueueSummary(_0x0ead('0xaf'),_0x4807a1));}else{notSendMessagesCampaign(_0x4807a1);}}}};Dialer['prototype'][_0x0ead('0xb0')]=function(_0x132642){if(_0x132642['dialMethod']!=='predictive'){clearPredictiveAttributes(_0x132642);}switch(_0x132642[_0x0ead('0xb1')]){case'progressive':this[_0x0ead('0xb2')](_0x132642,0x1);break;case _0x0ead('0xb3'):this[_0x0ead('0xb2')](_0x132642,_0x132642[_0x0ead('0xb4')]);break;case _0x0ead('0x8'):this[_0x0ead('0x8')](_0x132642);break;case'booked':this[_0x0ead('0xb2')](_0x132642,0x1);break;default:logger[_0x0ead('0x61')]('Queue',_0x132642[_0x0ead('0x45')],_0x0ead('0xb5'));}};Dialer[_0x0ead('0x1a')][_0x0ead('0x8d')]=function(_0x457620,_0x17acd1){var _0x21ec4d=_0x457620[_0x0ead('0xad')];var _0x26a9da=_0x17acd1?_0x457620[_0x0ead('0xac')]:_0x457620[_0x0ead('0x75')][_0x0ead('0x76')];logger[_0x0ead('0xb6')](_0x0ead('0xb7'),_0x26a9da,_0x21ec4d,_0x457620[_0x0ead('0x45')],util[_0x0ead('0x44')](_0x0ead('0xb8'),_0x457620[_0x0ead('0x45')],_0x457620['id']));var _0x24a00a=null;return Interval['intervalIftime'](_0x26a9da,_0x21ec4d)[_0x0ead('0x9a')](function(_0xdcbb45){if(_0xdcbb45===!![]){return _0xdcbb45;}else{_0x457620[_0x0ead('0x6c')]=_0x17acd1?utils[_0x0ead('0x65')][_0x0ead('0xa0')]:utils[_0x0ead('0x65')][_0x0ead('0xa1')];_0x24a00a=msgResponse(_0x0ead('0xa2'),_0x0ead('0x8e'),_0x0ead('0xa3')+_0x17acd1+'\x20'+_0x457620[_0x0ead('0x45')]+_0x0ead('0xa4')+util[_0x0ead('0x62')](_0x26a9da,{'showHidden':![],'depth':null})+_0x0ead('0xa5')+_0x21ec4d);}if(_0x24a00a!==null){logger[_0x0ead('0xb6')](_0x0ead('0xb9'),_0x24a00a);_0x24a00a[_0x0ead('0xba')]=_0x17acd1;throw _0x24a00a;}})[_0x0ead('0x9c')](function(_0x5bd03e){logger[_0x0ead('0x61')](_0x0ead('0xbb'),_0x5bd03e);throw msgResponse('[ifTime][Action]',_0x0ead('0x82'),util[_0x0ead('0x62')](_0x5bd03e,{'showHidden':![],'depth':null}));});};Dialer[_0x0ead('0x1a')][_0x0ead('0xbc')]=function(_0x291621){if(this[_0x0ead('0x1e')][_0x291621['queue']]){if(this[_0x0ead('0x25')][_0x291621[_0x0ead('0xbd')]]&&this['uniqueId'][_0x291621[_0x0ead('0xbd')]]['type']!==_0x0ead('0xbe')){this[_0x0ead('0xbf')](this[_0x0ead('0x1e')][_0x291621[_0x0ead('0xc0')]]);this[_0x0ead('0x25')][_0x291621[_0x0ead('0xbd')]][_0x0ead('0xc1')]=moment()['format'](_0x0ead('0xc2'));}}};Dialer[_0x0ead('0x1a')][_0x0ead('0x31')]=function(_0x44b12c){var _0xeef778=this['uniqueId'][_0x44b12c['uniqueid']];if(this[_0x0ead('0x1e')][_0x44b12c[_0x0ead('0xc0')]]){if(_0xeef778&&_0xeef778[_0x0ead('0x42')]!==_0x0ead('0xbe')){delete this[_0x0ead('0x25')][_0x44b12c['uniqueid']];this[_0x0ead('0x1e')][_0x44b12c[_0x0ead('0xc0')]]['outboundAnswerCallsDay']+=0x1;var _0x3d4204=new AgentComplete(_0xeef778,_0x44b12c);if(_0x44b12c[_0x0ead('0xc3')]===_0x0ead('0xc4')){_0x3d4204[_0x0ead('0xc5')]=this[_0x0ead('0x1e')][_0x44b12c[_0x0ead('0xc0')]][_0x0ead('0xc6')]&&this[_0x0ead('0x1e')][_0x44b12c[_0x0ead('0xc0')]][_0x0ead('0xc7')]?moment()[_0x0ead('0x44')](_0x0ead('0xc2')):undefined;}hopperUtils[_0x0ead('0xc8')](_0x3d4204)['catch'](loggerCatch('[syncAgentComplete][createHistory]'));hopperUtils[_0x0ead('0xc9')](_0x3d4204)[_0x0ead('0x9c')](loggerCatch('[syncAgentComplete]'));}}};Dialer[_0x0ead('0x1a')]['syncQueueCallerAbandon']=function(_0x1b7c05){var _0x9a41b7=this['uniqueId'][_0x1b7c05[_0x0ead('0xbd')]];var _0x512ae9=this;var _0x45a12c=![];var _0x1c48e2;var _0x58d42b;if(this['voiceQueues'][_0x1b7c05[_0x0ead('0xc0')]]){if(_0x9a41b7&&_0x9a41b7['type']!==_0x0ead('0xbe')){delete this[_0x0ead('0x25')][_0x1b7c05[_0x0ead('0xbd')]];this[_0x0ead('0xbf')](this[_0x0ead('0x1e')][_0x1b7c05[_0x0ead('0xc0')]]);_0x9a41b7['droptime']=moment()[_0x0ead('0x44')](_0x0ead('0xc2'));var _0x4ab85d=new QueueCallerAbandon(_0x9a41b7,_0x1b7c05);if(utils['getSeconds'](_0x9a41b7[_0x0ead('0xca')],_0x9a41b7[_0x0ead('0xcb')])>=_0x9a41b7[_0x0ead('0xcc')]){this[_0x0ead('0x1e')][_0x1b7c05[_0x0ead('0xc0')]][_0x0ead('0x49')]+=0x1;this[_0x0ead('0x1e')][_0x1b7c05[_0x0ead('0xc0')]][_0x0ead('0xcd')]+=0x1;this[_0x0ead('0x1e')][_0x1b7c05[_0x0ead('0xc0')]]['predictiveIntervalErlangCallsDroppedCalls']+=0x1;_0x4ab85d['state']=0xa;_0x4ab85d[_0x0ead('0x6e')]=_0x0ead('0xce');_0x4ab85d[_0x0ead('0xcf')]=_0x0ead('0xd0');_0x4ab85d[_0x0ead('0xc5')]=this['voiceQueues'][_0x1b7c05[_0x0ead('0xc0')]][_0x0ead('0xc6')]?moment()[_0x0ead('0x44')](_0x0ead('0xc2')):undefined;_0x4ab85d[_0x0ead('0xd1')]+=0x1;_0x4ab85d['countglobal']+=0x1;_0x1c48e2=this[_0x0ead('0x1e')][_0x1b7c05['queue']][_0x0ead('0xd2')];_0x58d42b=this[_0x0ead('0x1e')][_0x1b7c05[_0x0ead('0xc0')]][_0x0ead('0xd3')];hopperUtils[_0x0ead('0xd4')](_0x4ab85d,_0x4ab85d[_0x0ead('0x6d')],_0x9a41b7[_0x0ead('0xd5')])[_0x0ead('0x9a')](function(_0x4a0b6b){_0x45a12c=_0x4a0b6b[_0x0ead('0xd6')]==0x1;if(_0x4ab85d['countdropretry']>=_0x512ae9[_0x0ead('0x1e')][_0x1b7c05[_0x0ead('0xc0')]][_0x0ead('0xd7')]){_0x512ae9['queueCallerAbandonCreateState'](_0x4ab85d,_0x4a0b6b[_0x0ead('0xd6')]);}else{hopperUtils[_0x0ead('0xd8')]({'active':![],'countdropretry':_0x4ab85d[_0x0ead('0xd1')],'scheduledat':moment()[_0x0ead('0xd9')](_0x512ae9[_0x0ead('0x1e')][_0x1b7c05['queue']][_0x0ead('0xd2')],_0x0ead('0xda'))['format'](_0x0ead('0xc2')),'ContactId':_0x9a41b7[_0x0ead('0xdb')],'ListId':_0x9a41b7[_0x0ead('0xdc')],'VoiceQueueId':_0x9a41b7['VoiceQueueId']||undefined,'CampaignId':_0x9a41b7[_0x0ead('0xdd')]||undefined})[_0x0ead('0x9c')](loggerCatch(_0x0ead('0xde')));var _0x541059=new History(_0x4ab85d);_0x541059[_0x0ead('0x6d')]=0xa;_0x541059['statedesc']='Drop';_0x541059[_0x0ead('0xdf')]=moment()[_0x0ead('0x44')]('YYYY-MM-DD\x20HH:mm:ss');_0x541059['endtime']=_0x541059[_0x0ead('0xdf')];_0x541059[_0x0ead('0xe0')]=_0x4ab85d[_0x0ead('0xe0')];_0x541059[_0x0ead('0xe1')]=_0x4ab85d[_0x0ead('0xe1')];hopperUtils['createHistory'](_0x541059)[_0x0ead('0x9c')](loggerCatch(_0x0ead('0xe2')));}})[_0x0ead('0x9a')](function(){if(_0x45a12c)hopperUtils[_0x0ead('0xe3')](_0x4ab85d,_0x1c48e2,_0x58d42b)[_0x0ead('0x9a')](function(){return 0x1;});});}else{this['voiceQueues'][_0x1b7c05[_0x0ead('0xc0')]][_0x0ead('0x4b')]+=0x1;this['voiceQueues'][_0x1b7c05[_0x0ead('0xc0')]][_0x0ead('0xe4')]+=0x1;_0x4ab85d[_0x0ead('0x6d')]=0xb;_0x4ab85d[_0x0ead('0x6e')]=_0x0ead('0xe5');_0x4ab85d[_0x0ead('0xcf')]='CALLEREXIT';_0x4ab85d[_0x0ead('0xe6')]+=0x1;_0x4ab85d[_0x0ead('0xe7')]+=0x1;_0x1c48e2=this['voiceQueues'][_0x1b7c05[_0x0ead('0xc0')]][_0x0ead('0xe8')];_0x58d42b=this['voiceQueues'][_0x1b7c05[_0x0ead('0xc0')]][_0x0ead('0xd3')];hopperUtils[_0x0ead('0xd4')](_0x4ab85d,_0x4ab85d['state'],_0x9a41b7[_0x0ead('0xd5')])[_0x0ead('0x9a')](function(_0x429421){if(_0x4ab85d[_0x0ead('0xe6')]>=_0x512ae9[_0x0ead('0x1e')][_0x1b7c05['queue']][_0x0ead('0xe9')]){_0x512ae9[_0x0ead('0xea')](_0x4ab85d,_0x429421[_0x0ead('0xd6')]);}else{hopperUtils[_0x0ead('0xd8')]({'active':![],'countabandonedretry':_0x4ab85d[_0x0ead('0xe6')],'scheduledat':moment()[_0x0ead('0xd9')](_0x512ae9[_0x0ead('0x1e')][_0x1b7c05[_0x0ead('0xc0')]][_0x0ead('0xe8')],_0x0ead('0xda'))[_0x0ead('0x44')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x9a41b7[_0x0ead('0xdb')],'ListId':_0x9a41b7[_0x0ead('0xdc')],'VoiceQueueId':_0x9a41b7['VoiceQueueId']||undefined,'CampaignId':_0x9a41b7['CampaignId']||undefined})[_0x0ead('0x9c')](loggerCatch(_0x0ead('0xeb')));var _0x126844=new History(_0x4ab85d);_0x126844[_0x0ead('0x6d')]=0xb;_0x126844[_0x0ead('0x6e')]=_0x0ead('0xe5');_0x126844[_0x0ead('0xdf')]=moment()[_0x0ead('0x44')]('YYYY-MM-DD\x20HH:mm:ss');_0x126844['endtime']=_0x126844['starttime'];_0x126844['calleridname']=_0x4ab85d[_0x0ead('0xe0')];_0x126844[_0x0ead('0xe1')]=_0x4ab85d[_0x0ead('0xe1')];hopperUtils['createHistory'](_0x126844)['catch'](loggerCatch(_0x0ead('0xec')));}})['then'](function(){if(_0x45a12c)hopperUtils[_0x0ead('0xe3')](_0x4ab85d,_0x1c48e2,_0x58d42b)[_0x0ead('0x9a')](function(){return 0x1;});});}}}};Dialer[_0x0ead('0x1a')][_0x0ead('0x38')]=function(_0x568617){if(this[_0x0ead('0x24')][_0x568617[_0x0ead('0xbd')]]){this[_0x0ead('0x24')][_0x568617[_0x0ead('0xbd')]][_0x0ead('0xed')]=_0x568617[_0x0ead('0xed')];}if(this[_0x0ead('0x25')][_0x568617[_0x0ead('0xbd')]]){this['uniqueId'][_0x568617[_0x0ead('0xbd')]][_0x0ead('0xed')]=_0x568617[_0x0ead('0xed')];}};Dialer['prototype']['syncQueueMember']=function(_0x5bee06){if(!this['actions'][_0x5bee06['actionid']]){return;}var _0x42876c=this['voiceQueues'][this[_0x0ead('0x24')][_0x5bee06[_0x0ead('0xee')]][_0x0ead('0xc0')]]['strategy']||_0x0ead('0xef');if(_0x42876c===_0x0ead('0xf0')){if(this[_0x0ead('0x24')][_0x5bee06['actionid']]&&_[_0x0ead('0xf1')](this['actions'][_0x5bee06[_0x0ead('0xee')]][_0x0ead('0xf2')])&&_0x5bee06[_0x0ead('0x86')]==='1'&&_0x5bee06[_0x0ead('0xf3')]==='0'){if(this[_0x0ead('0x20')][_0x5bee06[_0x0ead('0xf4')]]){if(!this[_0x0ead('0x20')][_0x5bee06[_0x0ead('0xf4')]]['locked']){this[_0x0ead('0x20')][_0x5bee06['stateinterface']][_0x0ead('0xf2')]=!![];this['actions'][_0x5bee06[_0x0ead('0xee')]][_0x0ead('0xf2')]=!![];this['actions'][_0x5bee06['actionid']][_0x0ead('0xf4')]=_0x5bee06[_0x0ead('0xf4')];}}}}else if(_0x42876c===_0x0ead('0xef')){if(this[_0x0ead('0x24')][_0x5bee06[_0x0ead('0xee')]]){if(this[_0x0ead('0x20')][_0x5bee06['stateinterface']]){this[_0x0ead('0x24')][_0x5bee06['actionid']]['stateinterface']=_0x5bee06[_0x0ead('0xf4')];if(_['isNil'](this[_0x0ead('0x2a')][this['actions'][_0x5bee06[_0x0ead('0xee')]][_0x0ead('0xc0')]])){this[_0x0ead('0x2a')][this[_0x0ead('0x24')][_0x5bee06[_0x0ead('0xee')]]['queue']]=[];}this[_0x0ead('0x2a')][this[_0x0ead('0x24')][_0x5bee06[_0x0ead('0xee')]][_0x0ead('0xc0')]][_0x0ead('0x95')](_[_0x0ead('0xf5')](_[_0x0ead('0xf6')](this[_0x0ead('0x24')][_0x5bee06[_0x0ead('0xee')]],['idHopper',_0x0ead('0xf4')]),{'status':_0x5bee06['status'],'paused':_0x5bee06[_0x0ead('0xf3')]}));}}}};Dialer[_0x0ead('0x1a')][_0x0ead('0x3c')]=function(_0x2aa8e1){if(!this['actions'][_0x2aa8e1[_0x0ead('0xee')]]){return;}var _0x2ea5a1=this;var _0x145695=this[_0x0ead('0x1e')][this['actions'][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xc0')]];var _0x109781=_0x145695[_0x0ead('0xf7')]||_0x0ead('0xef');if(_0x109781===_0x0ead('0xf0')){if(this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]]&&this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xf4')]){this['preview'][_0x0ead('0xf8')](this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xf9')],this[_0x0ead('0x24')][_0x2aa8e1['actionid']][_0x0ead('0xf4')])['catch'](function(_0x21d40c){logger[_0x0ead('0x61')](_0x0ead('0xfa'),util[_0x0ead('0x62')](_0x21d40c,{'showHidden':![],'depth':null}));})[_0x0ead('0x1c')](function(){_0x2ea5a1[_0x0ead('0xbf')](_0x2ea5a1['voiceQueues'][_0x2ea5a1[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xc0')]]);_0x2ea5a1[_0x0ead('0x20')][_0x2ea5a1[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xf4')]][_0x0ead('0xf2')]=![];delete _0x2ea5a1['actions'][_0x2aa8e1[_0x0ead('0xee')]];unlockQueueStatus(_0x145695);});}else{this[_0x0ead('0xbf')](this['voiceQueues'][this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]]['queue']]);hopperUtils[_0x0ead('0xd8')]({'active':![],'ContactId':this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xdb')],'ListId':this['actions'][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xdc')],'VoiceQueueId':this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xfb')]||undefined,'CampaignId':this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xdd')]||undefined})['catch'](loggerCatch(_0x0ead('0xfc')));delete this['actions'][_0x2aa8e1[_0x0ead('0xee')]];unlockQueueStatus(_0x145695);}}else if(_0x109781===_0x0ead('0xef')){var _0x4d051c;if(this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]]&&!_['isEmpty'](this[_0x0ead('0x2a')][this[_0x0ead('0x24')][_0x2aa8e1['actionid']][_0x0ead('0xc0')]])){if(this['queueBookedRR'][_0x2ea5a1[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xc0')]]){this[_0x0ead('0xfd')][_0x2ea5a1['actions'][_0x2aa8e1['actionid']][_0x0ead('0xc0')]]=this[_0x0ead('0xfd')][this['actions'][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xc0')]]?this[_0x0ead('0xfd')][this[_0x0ead('0x24')][_0x2aa8e1['actionid']][_0x0ead('0xc0')]]:this[_0x0ead('0x2a')][this['actions'][_0x2aa8e1['actionid']][_0x0ead('0xc0')]]?this[_0x0ead('0x2a')][this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xc0')]][_0x0ead('0xfe')]||0x0:0x0;}this[_0x0ead('0x2a')][this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]]['queue']]['_rr']=this['queueBookedRR'][this['actions'][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xc0')]];for(var _0xbb0447=0x0;_0xbb0447<this[_0x0ead('0x2a')][this['actions'][_0x2aa8e1['actionid']]['queue']][_0x0ead('0x94')];_0xbb0447+=0x1){_0x4d051c=rr(this[_0x0ead('0x2a')][this['actions'][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xc0')]]);this['queueBookedRR'][_0x2ea5a1[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xc0')]]=this['queueBooked'][this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xc0')]][_0x0ead('0xfe')];if(_0x4d051c[_0x0ead('0x86')]==='1'&&_0x4d051c['paused']==='0'){break;}}if(!_['isNil'](_0x4d051c)){this[_0x0ead('0x20')][_0x4d051c[_0x0ead('0xf4')]][_0x0ead('0xff')]=_[_0x0ead('0x51')](this[_0x0ead('0x20')][_0x4d051c[_0x0ead('0xf4')]][_0x0ead('0xff')])?!![]:this[_0x0ead('0x20')][_0x4d051c[_0x0ead('0xf4')]]['unlockRR'];}loggerBooked[_0x0ead('0x46')](_0x0ead('0x100'),_0x2aa8e1[_0x0ead('0xee')],'Agent:\x20',JSON[_0x0ead('0x72')](_[_0x0ead('0xf6')](this[_0x0ead('0x20')][_0x4d051c[_0x0ead('0xf4')]],[_0x0ead('0x45'),_0x0ead('0xff')])),_0x0ead('0x101'),JSON[_0x0ead('0x72')](_0x4d051c[_0x0ead('0xf9')]));if(!_[_0x0ead('0xf1')](_0x4d051c)&&_0x4d051c[_0x0ead('0x86')]==='1'&&_0x4d051c[_0x0ead('0xf3')]==='0'&&this[_0x0ead('0x20')][_0x4d051c[_0x0ead('0xf4')]][_0x0ead('0xff')]){this['agents'][_0x4d051c[_0x0ead('0xf4')]]['unlockRR']=![];this[_0x0ead('0x2a')][_0x2ea5a1['actions'][_0x2aa8e1['actionid']]['queue']]=[];this[_0x0ead('0x102')][_0x0ead('0xf8')](_0x4d051c['idHopper'],_0x4d051c['stateinterface'])[_0x0ead('0x9c')](function(_0x2081e0){logger['error'](_0x0ead('0xfa'),util[_0x0ead('0x62')](_0x2081e0,{'showHidden':![],'depth':null}));})['finally'](function(){_0x2ea5a1[_0x0ead('0xbf')](_0x2ea5a1[_0x0ead('0x1e')][_0x2ea5a1['actions'][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xc0')]]);setTimeout(function(){_0x2ea5a1[_0x0ead('0x20')][_0x4d051c['stateinterface']]['unlockRR']=!![];loggerBooked[_0x0ead('0x46')](_0x0ead('0x103'),_0x2aa8e1[_0x0ead('0xee')],_0x0ead('0x104'),JSON['stringify'](_[_0x0ead('0xf6')](_0x2ea5a1[_0x0ead('0x20')][_0x4d051c['stateinterface']],['name',_0x0ead('0xff')])),'contactAgent-idHopper:\x20',JSON['stringify'](_0x4d051c[_0x0ead('0xf9')]));},0xc7);delete _0x2ea5a1['actions'][_0x2aa8e1[_0x0ead('0xee')]];unlockQueueStatus(_0x145695,_0x2aa8e1[_0x0ead('0xee')]);});}else{loggerBooked[_0x0ead('0x46')](_0x0ead('0x105'));this[_0x0ead('0xbf')](this[_0x0ead('0x1e')][this[_0x0ead('0x24')][_0x2aa8e1['actionid']][_0x0ead('0xc0')]]);hopperUtils[_0x0ead('0xd8')]({'active':![],'ContactId':this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xdb')],'ListId':this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xdc')],'VoiceQueueId':this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xfb')]||undefined,'CampaignId':this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xdd')]||undefined})['catch'](loggerCatch(_0x0ead('0xfc')));delete this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]];unlockQueueStatus(_0x145695);}}else{loggerBooked[_0x0ead('0x46')](_0x0ead('0x106'));this[_0x0ead('0xbf')](this[_0x0ead('0x1e')][this[_0x0ead('0x24')][_0x2aa8e1['actionid']][_0x0ead('0xc0')]]);hopperUtils[_0x0ead('0xd8')]({'active':![],'ContactId':this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]]['ContactId'],'ListId':this[_0x0ead('0x24')][_0x2aa8e1['actionid']][_0x0ead('0xdc')],'VoiceQueueId':this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xfb')]||undefined,'CampaignId':this['actions'][_0x2aa8e1[_0x0ead('0xee')]]['CampaignId']||undefined})[_0x0ead('0x9c')](loggerCatch('[unlock2][syncQueueStatusComplete]'));delete this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]];unlockQueueStatus(_0x145695);}}else{loggerBooked[_0x0ead('0x46')](_0x0ead('0x107'));this[_0x0ead('0xbf')](this[_0x0ead('0x1e')][this['actions'][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xc0')]]);hopperUtils[_0x0ead('0xd8')]({'active':![],'ContactId':this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xdb')],'ListId':this[_0x0ead('0x24')][_0x2aa8e1['actionid']]['ListId'],'VoiceQueueId':this['actions'][_0x2aa8e1[_0x0ead('0xee')]]['VoiceQueueId']||undefined,'CampaignId':this['actions'][_0x2aa8e1[_0x0ead('0xee')]][_0x0ead('0xdd')]||undefined})[_0x0ead('0x9c')](loggerCatch(_0x0ead('0x108')));delete this[_0x0ead('0x24')][_0x2aa8e1[_0x0ead('0xee')]];unlockQueueStatus(_0x145695);}};Dialer[_0x0ead('0x1a')][_0x0ead('0x109')]=function(_0x83ecbb){var _0x1bef3a=this[_0x0ead('0x24')][_0x83ecbb[_0x0ead('0xee')]];if(_0x1bef3a){delete this['actions'][_0x83ecbb[_0x0ead('0xee')]];_0x1bef3a[_0x0ead('0xcb')]=moment()['format'](_0x0ead('0xc2'));var _0x54d609=_0x1bef3a[_0x0ead('0x42')]==='ivr'?this[_0x0ead('0x1f')][_0x1bef3a[_0x0ead('0xc0')]]:this[_0x0ead('0x1e')][_0x1bef3a[_0x0ead('0x10a')]()];if(_0x83ecbb['response']!==_0x0ead('0x10b')){this['updateOriginated'](_0x54d609);return this[_0x0ead('0x10c')](_0x1bef3a,_0x54d609,_0x83ecbb)['catch'](loggerCatch(_0x0ead('0x10d')));}this['uniqueId'][_0x83ecbb[_0x0ead('0xbd')]]=_0x1bef3a;}};Dialer['prototype'][_0x0ead('0x3a')]=function(_0x26aac7){var _0x2e1530=this;var _0x5be77=this[_0x0ead('0x25')][_0x26aac7[_0x0ead('0xbd')]];var _0x4be900;if(!_[_0x0ead('0xf1')](_0x26aac7)&&!_[_0x0ead('0xf1')](_0x26aac7[_0x0ead('0x10e')])&&!_['isNil'](_0x26aac7[_0x0ead('0x10e')][_0x0ead('0x10f')])&&_0x26aac7['exten']===_0x0ead('0x110')&&_0x5be77){if(_0x5be77[_0x0ead('0x42')]!==_0x0ead('0xbe')&&this[_0x0ead('0x1e')][_0x5be77[_0x0ead('0xc0')]]['dialAMDActive']&&_0x26aac7['value']===_0x0ead('0x111')){delete this[_0x0ead('0x25')][_0x26aac7[_0x0ead('0xbd')]];this[_0x0ead('0xbf')](this[_0x0ead('0x1e')][_0x5be77[_0x0ead('0xc0')]]);this[_0x0ead('0x1e')][_0x5be77['queue']]['outboundAnswerCallsDay']+=0x1;this[_0x0ead('0x1e')][_0x5be77[_0x0ead('0xc0')]][_0x0ead('0x112')]+=0x1;_0x4be900=new Hangup(_0x5be77,_0x26aac7);_0x4be900[_0x0ead('0x6d')]=0x12;_0x4be900['statedesc']=_0x0ead('0x113');_0x4be900[_0x0ead('0x114')]=_0x0ead('0x115');ami[_0x0ead('0x41')](_0x0ead('0x116'),ut[_0x0ead('0x117')](_0x4be900,_0x0ead('0x118')));this[_0x0ead('0x119')](_0x4be900,_0x0ead('0x11a'),_0x0ead('0x11b'));}if(_0x5be77['type']!=='ivr'&&this['voiceQueues'][_0x5be77[_0x0ead('0xc0')]][_0x0ead('0x11c')]&&_0x26aac7[_0x0ead('0x11d')]===_0x0ead('0x11e')){return new Promise(function(_0x48478f,_0x4b7b2f){delete _0x2e1530[_0x0ead('0x25')][_0x26aac7[_0x0ead('0xbd')]];_0x2e1530[_0x0ead('0xbf')](_0x2e1530[_0x0ead('0x1e')][_0x5be77[_0x0ead('0xc0')]]);_0x2e1530[_0x0ead('0x1e')][_0x5be77[_0x0ead('0xc0')]][_0x0ead('0x11f')]+=0x1;_0x2e1530['voiceQueues'][_0x5be77['queue']][_0x0ead('0x112')]+=0x1;var _0x160252=_0x2e1530[_0x0ead('0x1e')][_0x5be77[_0x0ead('0xc0')]];var _0x54f7ad=new Hangup(_0x5be77,_0x26aac7);_0x54f7ad[_0x0ead('0x6d')]=0x13;_0x54f7ad[_0x0ead('0x6e')]=_0x0ead('0x120');_0x54f7ad['membername']=_0x0ead('0x115');_0x54f7ad[_0x0ead('0x121')]+=0x1;_0x54f7ad['countglobal']+=0x1;_0x54f7ad[_0x0ead('0x118')]=!![];ami['emit']('custom:amd',ut[_0x0ead('0x117')](_0x54f7ad,'amd'));hopperUtils[_0x0ead('0xc8')](_0x54f7ad)[_0x0ead('0x9c')](loggerCatch(_0x0ead('0x122')));if(_0x54f7ad[_0x0ead('0x123')]+_0x54f7ad['countcongestionretry']+_0x54f7ad['countnoanswerretry']+_0x54f7ad[_0x0ead('0x124')]+_0x54f7ad['countdropretry']+_0x54f7ad['countabandonedretry']+_0x54f7ad['countmachineretry']+_0x54f7ad[_0x0ead('0x125')]>=_0x160252['dialGlobalMaxRetry']){_0x2e1530['stateGlobal'](_0x54f7ad,_0x48478f,_0x4b7b2f,_0x0ead('0x126'));}else{if(_0x54f7ad[_0x0ead('0x121')]>=_0x160252[_0x0ead('0x127')]){_0x2e1530[_0x0ead('0x128')](_0x54f7ad,_0x48478f,_0x4b7b2f,'reason\x2019\x20machine....');}else{hopperUtils[_0x0ead('0xd8')]({'active':![],'countmachineretry':_0x54f7ad['countmachineretry'],'scheduledat':moment()[_0x0ead('0xd9')](_0x160252[_0x0ead('0x129')],_0x0ead('0xda'))['format'](_0x0ead('0xc2')),'ContactId':_0x54f7ad[_0x0ead('0xdb')],'ListId':_0x54f7ad['ListId'],'VoiceQueueId':_0x54f7ad[_0x0ead('0xfb')]||undefined,'CampaignId':_0x54f7ad[_0x0ead('0xdd')]||undefined})[_0x0ead('0x9c')](loggerCatch(_0x0ead('0x12a')));_0x48478f({'reschedule':0x1});}}});}if(_0x5be77[_0x0ead('0x42')]===_0x0ead('0xbe')&&this[_0x0ead('0x1f')][_0x5be77[_0x0ead('0xc0')]][_0x0ead('0x11c')]&&_0x26aac7[_0x0ead('0x11d')]==='HANGUP'){delete this[_0x0ead('0x25')][_0x26aac7[_0x0ead('0xbd')]];this['updateOriginated'](this[_0x0ead('0x1f')][_0x5be77[_0x0ead('0xc0')]]);_0x4be900=new Hangup(_0x5be77,_0x26aac7);_0x4be900['state']=0x12;_0x4be900[_0x0ead('0x6e')]=_0x0ead('0x113');_0x4be900[_0x0ead('0x114')]=_0x0ead('0x115');ami['emit']('custom:amd',ut[_0x0ead('0x117')](_0x4be900,_0x0ead('0x118')));this[_0x0ead('0x119')](_0x4be900,'[syncHangupInAMDIvr][createHistory]',_0x0ead('0x12b'));}if(_0x5be77[_0x0ead('0x42')]===_0x0ead('0xbe')&&this['campaigns'][_0x5be77[_0x0ead('0xc0')]][_0x0ead('0x11c')]&&_0x26aac7[_0x0ead('0x11d')]==='MACHINE'){return new Promise(function(_0x221fea,_0x51a8bc){delete _0x2e1530[_0x0ead('0x25')][_0x26aac7[_0x0ead('0xbd')]];_0x2e1530['updateOriginated'](_0x2e1530[_0x0ead('0x1f')][_0x5be77['queue']]);_0x2e1530[_0x0ead('0x1f')][_0x5be77[_0x0ead('0xc0')]][_0x0ead('0x11f')]+=0x1;_0x2e1530['campaigns'][_0x5be77[_0x0ead('0xc0')]][_0x0ead('0x112')]+=0x1;var _0x547c56=_0x2e1530[_0x0ead('0x1f')][_0x5be77[_0x0ead('0xc0')]];var _0x541eb5=new Hangup(_0x5be77,_0x26aac7);_0x541eb5[_0x0ead('0x6d')]=0x13;_0x541eb5['statedesc']=_0x0ead('0x120');_0x541eb5[_0x0ead('0x114')]='AMD';_0x541eb5['countmachineretry']+=0x1;_0x541eb5[_0x0ead('0xe7')]+=0x1;_0x541eb5[_0x0ead('0x118')]=!![];ami[_0x0ead('0x41')](_0x0ead('0x116'),ut['buildObj'](_0x541eb5,'amd'));hopperUtils[_0x0ead('0xc8')](_0x541eb5)['catch'](loggerCatch(_0x0ead('0x122')));if(_0x541eb5['countbusyretry']+_0x541eb5['countcongestionretry']+_0x541eb5[_0x0ead('0x12c')]+_0x541eb5[_0x0ead('0x124')]+_0x541eb5[_0x0ead('0xd1')]+_0x541eb5['countabandonedretry']+_0x541eb5[_0x0ead('0x121')]+_0x541eb5[_0x0ead('0x125')]>=_0x547c56[_0x0ead('0x12d')]){_0x2e1530[_0x0ead('0x12e')](_0x541eb5,_0x221fea,_0x51a8bc,_0x0ead('0x126'));}else{if(_0x541eb5['countmachineretry']>=_0x547c56['dialMachineMaxRetry']){_0x2e1530[_0x0ead('0x128')](_0x541eb5,_0x221fea,_0x51a8bc,'reason\x2019\x20machine....');}else{hopperUtils[_0x0ead('0xd8')]({'active':![],'countmachineretry':_0x541eb5[_0x0ead('0x121')],'scheduledat':moment()[_0x0ead('0xd9')](_0x547c56['dialMachineRetryFrequency'],'minutes')['format'](_0x0ead('0xc2')),'ContactId':_0x541eb5['ContactId'],'ListId':_0x541eb5[_0x0ead('0xdc')],'VoiceQueueId':_0x541eb5[_0x0ead('0xfb')]||undefined,'CampaignId':_0x541eb5[_0x0ead('0xdd')]||undefined})[_0x0ead('0x9c')](loggerCatch('[rescheduleContact][Machine]'));_0x221fea({'reschedule':0x1});}}});}}};Dialer['prototype'][_0x0ead('0x36')]=function(_0x418d68){var _0x59b4e1=this[_0x0ead('0x25')][_0x418d68[_0x0ead('0xbd')]];var _0x5a7904;if(_0x59b4e1&&_0x59b4e1[_0x0ead('0x42')]===_0x0ead('0xbe')){delete this[_0x0ead('0x25')][_0x418d68[_0x0ead('0xbd')]];this[_0x0ead('0xbf')](this[_0x0ead('0x1f')][_0x59b4e1[_0x0ead('0xc0')]]);this[_0x0ead('0x1f')][_0x59b4e1[_0x0ead('0xc0')]][_0x0ead('0x12f')]+=0x1;_0x5a7904=new Hangup(_0x59b4e1,_0x418d68);hopperUtils['createHistory'](_0x5a7904)[_0x0ead('0x9c')](loggerCatch('[syncHangupIvr][createHistory]'));hopperUtils[_0x0ead('0xc9')](_0x5a7904)[_0x0ead('0x9c')](loggerCatch(_0x0ead('0x130')));}if(_0x59b4e1&&_0x59b4e1[_0x0ead('0x42')]!==_0x0ead('0xbe')&&isNotNull(this[_0x0ead('0x1e')][_0x59b4e1[_0x0ead('0xc0')]][_0x0ead('0x131')])){delete this[_0x0ead('0x25')][_0x418d68[_0x0ead('0xbd')]];this[_0x0ead('0xbf')](this[_0x0ead('0x1e')][_0x59b4e1['queue']]);this[_0x0ead('0x1e')][_0x59b4e1['queue']][_0x0ead('0x11f')]+=0x1;this[_0x0ead('0x1e')][_0x59b4e1['queue']][_0x0ead('0x112')]+=0x1;_0x5a7904=new Hangup(_0x59b4e1,_0x418d68);_0x5a7904['state']=0x10;_0x5a7904['statedesc']=_0x0ead('0x132');_0x5a7904[_0x0ead('0x114')]='AGI';hopperUtils[_0x0ead('0xc8')](_0x5a7904)[_0x0ead('0x9c')](loggerCatch(_0x0ead('0x133')));hopperUtils[_0x0ead('0xc9')](_0x5a7904)[_0x0ead('0x9c')](loggerCatch('[syncHangupIvr]'));}if(_0x59b4e1&&_0x59b4e1['type']!==_0x0ead('0xbe')&&!isNotNull(this[_0x0ead('0x1e')][_0x59b4e1['queue']][_0x0ead('0x131')])){if(_0x418d68[_0x0ead('0x134')]===_0x0ead('0x135')){delete this[_0x0ead('0x25')][_0x418d68[_0x0ead('0xbd')]];this[_0x0ead('0x1e')][_0x59b4e1[_0x0ead('0xc0')]][_0x0ead('0x11f')]+=0x1;const _0x2bbf1d=new AgentComplete(_0x59b4e1,_0x418d68);_0x2bbf1d[_0x0ead('0xdd')]=this['voiceQueues'][_0x59b4e1[_0x0ead('0xc0')]]['id'];hopperUtils[_0x0ead('0xc8')](_0x2bbf1d)[_0x0ead('0x9c')](loggerCatch('[syncAgentComplete][createHistory]'));hopperUtils[_0x0ead('0xc9')](_0x2bbf1d)[_0x0ead('0x9c')](loggerCatch(_0x0ead('0x136')));}else{delete this[_0x0ead('0x25')][_0x418d68[_0x0ead('0xbd')]];this[_0x0ead('0xbf')](this[_0x0ead('0x1e')][_0x59b4e1[_0x0ead('0xc0')]]);this[_0x0ead('0x1e')][_0x59b4e1[_0x0ead('0xc0')]][_0x0ead('0x137')]+=0x1;_0x5a7904=new Hangup(_0x59b4e1,_0x418d68);_0x5a7904[_0x0ead('0x6d')]=0xc;_0x5a7904[_0x0ead('0x6e')]=_0x418d68['cause-txt'];_0x5a7904[_0x0ead('0x114')]='Unknow';hopperUtils[_0x0ead('0xc8')](_0x5a7904)[_0x0ead('0x9c')](loggerCatch('[syncHangupIvr][createHistory]'));hopperUtils['moveContactManagedDialer'](_0x5a7904)['catch'](loggerCatch(_0x0ead('0x130')));}}};Dialer[_0x0ead('0x1a')][_0x0ead('0xa')]=function(_0x34fef3){var _0x460f62=this;if(!_0x460f62[_0x0ead('0x2b')][_0x34fef3[_0x0ead('0x45')]]){_0x460f62[_0x0ead('0x2b')][_0x34fef3['name']]={'running':![]};}else if(_0x460f62[_0x0ead('0x2b')][_0x34fef3[_0x0ead('0x45')]][_0x0ead('0x138')]===!![]){return;}else if(_0x460f62[_0x0ead('0x2b')][_0x34fef3[_0x0ead('0x45')]][_0x0ead('0x138')]===![]){_0x460f62['queuesSummary'][_0x34fef3[_0x0ead('0x45')]][_0x0ead('0x138')]=!![];}var _0x13ddf3=_0x460f62[_0x0ead('0x1e')][_0x34fef3[_0x0ead('0x45')]];var _0x4a4863=_0x13ddf3[_0x0ead('0x6c')]!==utils[_0x0ead('0x65')][_0x0ead('0x7d')];var _0x1d676a=utils['isPreviewCampaign'](_0x13ddf3);_0x13ddf3[_0x0ead('0x139')]=utils[_0x0ead('0x13a')](_0x13ddf3,_0x460f62[_0x0ead('0x21')]);Promise['resolve']()[_0x0ead('0x9a')](function(){if(_0x13ddf3[_0x0ead('0x139')]===utils[_0x0ead('0x65')][_0x0ead('0x7d')]){if(_0x4a4863){clearPredictiveAttributes(_0x13ddf3);_0x34fef3['startPredictive']=undefined;_0x34fef3['startProgressive']=undefined;}if(_0x13ddf3[_0x0ead('0x139')]===utils[_0x0ead('0x65')][_0x0ead('0x7d')]){_0x34fef3[_0x0ead('0x13b')]=0x0;_0x34fef3[_0x0ead('0xf3')]=0x0;_0x34fef3[_0x0ead('0x13c')]=0x0;_0x34fef3[_0x0ead('0x13d')]=0x0;_0x34fef3[_0x0ead('0x13e')]=0x0;}}else if(_0x13ddf3['statusMessage']===utils[_0x0ead('0x65')][_0x0ead('0x13f')]&&!_0x1d676a){return _0x460f62['ifTime'](_0x13ddf3,!![])[_0x0ead('0x9a')](function(){return _0x460f62[_0x0ead('0x8d')](_0x13ddf3,![]);})[_0x0ead('0x9a')](function(){return _0x460f62[_0x0ead('0xb0')](_0x13ddf3);})['catch'](function(_0x45e549){loggerSyncQueueSummary[_0x0ead('0x43')](_0x0ead('0x140'),util[_0x0ead('0x62')](_0x45e549,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x13ddf3);});}else{clearPredictiveAttributes(_0x13ddf3);}})[_0x0ead('0x9a')](function(){var _0x3d5804=_0x34fef3[_0x0ead('0x141')](_0x13ddf3);if(_0x3d5804||_0x13ddf3[_0x0ead('0x142')]){_0x13ddf3['queueSummaryCountersUpdated']=![];_0x34fef3[_0x0ead('0x143')](_0x13ddf3);Object[_0x0ead('0x144')](_0x13ddf3,_0x34fef3);emitOutboundVoiceQueueSummary(_0x34fef3);}_0x460f62[_0x0ead('0x2b')][_0x13ddf3[_0x0ead('0x45')]][_0x0ead('0x138')]=![];})['catch'](function(_0x1795ab){logger[_0x0ead('0x61')](_0x0ead('0x140'),util[_0x0ead('0x62')](_0x1795ab,{'showHidden':![],'depth':null}));_0x460f62[_0x0ead('0x2b')][_0x13ddf3[_0x0ead('0x45')]][_0x0ead('0x138')]=![];});};Dialer[_0x0ead('0x1a')][_0x0ead('0x34')]=_[_0x0ead('0x145')](function(){var _0x5ab81e=_[_0x0ead('0x146')](this[_0x0ead('0x1e')],function(_0x397d22){return _0x397d22[_0x0ead('0x147')];});var _0x323653=_[_0x0ead('0x146')](this[_0x0ead('0x20')],function(_0x38ff81){return _0x38ff81[_0x0ead('0x148')]&&_0x38ff81[_0x0ead('0x86')]===_0x0ead('0x87');});if(_0x5ab81e[_0x0ead('0x94')]>0x0&&_0x323653['length']>0x0){return Promise['resolve']()[_0x0ead('0x9a')](cmHopper[_0x0ead('0x149')](_[_0x0ead('0x14a')](_0x5ab81e,'id'),previewRecallmeReminderInterval,_[_0x0ead('0x14a')](_0x323653,'id')))[_0x0ead('0x9a')](function(_0x571e8e){for(var _0x279073=0x0;_0x279073<_0x571e8e[_0x0ead('0x94')];_0x279073++){var _0x503102=_0x571e8e[_0x279073][_0x0ead('0x14b')][_0x0ead('0x45')];if(_0x503102)io['to'](util[_0x0ead('0x44')]('user:%s',_0x503102))['emit'](_0x0ead('0x14c'),{'hopper':_0x571e8e[_0x279073]});}})[_0x0ead('0x9c')](function(_0x503912){logger[_0x0ead('0x61')](_0x0ead('0x14d'),_0x503912);});}},0x3c*0x3e8,{'leading':!![]});Dialer['prototype'][_0x0ead('0x3e')]=function(){var _0x5e7a90=this;setInterval(function(){_0x5e7a90[_0x0ead('0x14e')](_0x5e7a90[_0x0ead('0x25')],_0x0ead('0x14f'));_0x5e7a90['clearZombieChannels'](_0x5e7a90[_0x0ead('0x24')],_0x0ead('0x150'));},0x32c8);};Dialer[_0x0ead('0x1a')]['clearZombieChannels']=function(_0x46fd5c,_0x5548ca){var _0x44e4c8=this;for(var _0x22fd78 in _0x46fd5c){if(typeof _0x46fd5c[_0x22fd78]!=='undefined'){this[_0x0ead('0x1d')][_0x0ead('0x151')](function(){if(!_['isNil'](_0x46fd5c[_0x22fd78])){return ami[_0x0ead('0x9d')]({'action':_0x0ead('0x86'),'channel':_0x46fd5c[_0x22fd78][_0x0ead('0xed')]})[_0x0ead('0x9c')](function(_0x3c450b){if(_0x3c450b['message']===_0x0ead('0x152')){setTimeout(function(){if(_0x46fd5c[_0x22fd78]&&_0x46fd5c[_0x22fd78]['type']!==_0x0ead('0xbe')){_0x44e4c8[_0x0ead('0xbf')](_0x44e4c8[_0x0ead('0x1e')][_0x46fd5c[_0x22fd78][_0x0ead('0xc0')]]);logger[_0x0ead('0x61')](_0x0ead('0x153'),_0x5548ca,_0x22fd78,_0x46fd5c[_0x22fd78][_0x0ead('0xc0')]);delete _0x46fd5c[_0x22fd78];}if(_0x46fd5c[_0x22fd78]&&_0x46fd5c[_0x22fd78]['type']===_0x0ead('0xbe')){_0x44e4c8[_0x0ead('0xbf')](_0x44e4c8[_0x0ead('0x1f')][_0x46fd5c[_0x22fd78][_0x0ead('0xc0')]]);logger[_0x0ead('0x61')]('[Dialer][checkChannel][ivr]',_0x5548ca,_0x22fd78,_0x46fd5c[_0x22fd78][_0x0ead('0xc0')]);delete _0x46fd5c[_0x22fd78];}},0x2328);}});}});}}};Dialer[_0x0ead('0x1a')][_0x0ead('0x154')]=function(_0x4ea75a){return Promise[_0x0ead('0xaa')]()['then'](voiceQueueRt['getVoiceQueueRtPauses'](_0x4ea75a))[_0x0ead('0x9c')](loggerCatch(_0x0ead('0x155')));};Dialer[_0x0ead('0x1a')][_0x0ead('0xbf')]=function(_0x4209b6){if(!_['isUndefined'](_0x4209b6)&&_0x4209b6!==null){if(typeof _0x4209b6[_0x0ead('0x156')]!==_0x0ead('0xa8')){if(_0x4209b6[_0x0ead('0x156')]>0x0){_0x4209b6[_0x0ead('0x156')]-=0x1;}else{logger[_0x0ead('0x61')](_0x0ead('0x157'));}}}else{logger['error'](_0x0ead('0x158'));}};Dialer[_0x0ead('0x1a')][_0x0ead('0x159')]=function(_0x1b52ca,_0x191742){var _0x5d0158=this;return function(_0x30a5df){_0x5d0158[_0x0ead('0xbf')](_0x191742);logger['error'](_0x1b52ca,util[_0x0ead('0x62')](_0x30a5df,{'showHidden':![],'depth':null}));};};Dialer[_0x0ead('0x1a')]['emptyContact']=function(_0x243b1c,_0x174d6f,_0x4836b1){var _0x38153e={'state':0x19,'statedesc':_0x0ead('0x15a')};this[_0x0ead('0xbf')](_0x174d6f);this[_0x0ead('0x119')](_[_0x0ead('0xf5')](_0x38153e,_['pick'](_0x4836b1,[_0x0ead('0xdb'),_0x0ead('0xdc'),_0x0ead('0x15b'),_0x0ead('0xfb'),'CampaignId'])),_0x0ead('0x15c'),_0x0ead('0x15d'));logger[_0x0ead('0x61')](_0x243b1c);};Dialer[_0x0ead('0x1a')][_0x0ead('0x119')]=function(_0x108331,_0xbe6d77,_0x38f111){hopperUtils[_0x0ead('0xc8')](_0x108331)['catch'](loggerCatch(_0xbe6d77));hopperUtils['moveContactManagedDialer'](_0x108331)['catch'](loggerCatch(_0x38f111));};Dialer['prototype']['queueCallerAbandonCreateState']=function(_0x1c67b9,_0x2932e8){hopperUtils[_0x0ead('0xc8')](_0x1c67b9)[_0x0ead('0x9c')](loggerCatch('[syncAgentComplete][createHistory]'));if(_0x2932e8==0x0){hopperUtils[_0x0ead('0xc9')](_0x1c67b9)['catch'](loggerCatch(_0x0ead('0x15e')));}};Dialer[_0x0ead('0x1a')][_0x0ead('0x14d')]=function(_0xc5c186){return Promise['resolve']()['then'](cmHopper['handlePreviewRecallNotifications'](_0xc5c186['id'],previewRecallmeReminderInterval))['then'](function(_0x22cb27){for(var _0x20b231=0x0;_0x20b231<_0x22cb27[_0x0ead('0x94')];_0x20b231++){var _0x177797=_0x22cb27[_0x20b231][_0x0ead('0x14b')][_0x0ead('0x45')];if(_0x177797)io['to'](util[_0x0ead('0x44')](_0x0ead('0x15f'),_0x177797))[_0x0ead('0x41')]('user:dialPreviewRecallReminder',{'hopper':_0x22cb27[_0x20b231]});}})['catch'](function(){});};Dialer[_0x0ead('0x1a')]['launchHandleIvr']=function(_0x1039c4){var _0x4e3799=this;return function(){_0x4e3799['handleIvr'](_0x1039c4);};};Dialer[_0x0ead('0x1a')][_0x0ead('0x160')]=function(_0x45b55b,_0x443e50){var _0x31ede6=this;var _0x1b6ac4=uuid['v4']();this[_0x0ead('0x24')][_0x1b6ac4]=new Action(_0x45b55b,_0x443e50,_0x1b6ac4);return new Promise(function(_0x5bbf31,_0x23b412){if(_[_0x0ead('0x51')](_0x45b55b)&&typeof _0x45b55b!==_0x0ead('0x161')){return _0x23b412(msgResponse(_0x0ead('0x162'),_0x0ead('0x8e'),_0x0ead('0x163')));}if(_['isUndefined'](_0x443e50['phone'])||_0x443e50[_0x0ead('0x164')]===null){return _0x23b412(msgResponse(_0x0ead('0x162'),_0x0ead('0x8e'),_0x0ead('0x165')));}var _0x26baca={'XMD-CALLERID':_0x31ede6['actions'][_0x1b6ac4][_0x0ead('0x166')](),'XMD-AGI':_0x45b55b[_0x0ead('0x131')]?util[_0x0ead('0x44')]('\x22agi://%s/square,%s\x22',ipAgi,_0x45b55b[_0x0ead('0x131')]):'NONE','XMD-AGIAFTER':_0x45b55b[_0x0ead('0xc6')]?util[_0x0ead('0x44')](_0x0ead('0x167'),ipAgi,_0x45b55b[_0x0ead('0xc6')]):'NONE','XMD-QUEUE':utils[_0x0ead('0x168')](_0x45b55b)?util['format'](_0x0ead('0x169'),_0x45b55b[_0x0ead('0x45')],_0x45b55b[_0x0ead('0x16a')]||'',_0x45b55b['dialAgiAfterHangupAgent']?'c':'',_0x45b55b['dialQueueTimeout']||0x3):_0x0ead('0x16b'),'XMD-CONTACTID':_0x443e50[_0x0ead('0xdb')],'XMD-CDRTYPE':_0x0ead('0x7'),'CALLERID(all)':_0x31ede6[_0x0ead('0x24')][_0x1b6ac4]['getCaller'](),'XMD-AMD':_0x45b55b[_0x0ead('0x11c')]?_0x0ead('0x13f'):'NONE','XMD-DESTINATION':_0x0ead('0x110')};if(_0x45b55b[_0x0ead('0x11c')]){_0x26baca[_0x0ead('0x16c')]=_0x45b55b[_0x0ead('0x16d')]||0x9c4;_0x26baca['XMD-AMDGREETING']=_0x45b55b[_0x0ead('0x16e')]||0x5dc;_0x26baca['XMD-AMDAFTERGREETINGSILENCE']=_0x45b55b['dialAMDAfterGreetingSilence']||0x320;_0x26baca[_0x0ead('0x16f')]=_0x45b55b[_0x0ead('0x170')]||0x1388;_0x26baca[_0x0ead('0x171')]=_0x45b55b[_0x0ead('0x172')]||0x64;_0x26baca['XMD-AMDBETWEENWORDSSILENCE']=_0x45b55b['dialAMDBetweenWordsSilence']||0x32;_0x26baca[_0x0ead('0x173')]=_0x45b55b['dialAMDMaximumNumberOfWords']||0x3;_0x26baca[_0x0ead('0x174')]=_0x45b55b[_0x0ead('0x175')]||0x100;_0x26baca[_0x0ead('0x176')]=_0x45b55b[_0x0ead('0x177')]||0x1388;}if(utils[_0x0ead('0x168')](_0x45b55b)){_0x26baca['XMD-VOICEQUEUEID']=_0x443e50[_0x0ead('0xfb')];}else{_0x26baca['XMD-CAMPAIGNID']=_0x443e50[_0x0ead('0xdd')];}var _0x34de02=utils[_0x0ead('0x178')](_0x443e50['Contact']);Object['assign'](_0x26baca,_0x34de02);var _0x186837=_0x31ede6[_0x0ead('0x83')](_0x45b55b['Trunk'])?utils[_0x0ead('0x179')](_0x45b55b[_0x0ead('0x17a')][_0x0ead('0x17b')],_0x45b55b[_0x0ead('0x17c')],_0x45b55b[_0x0ead('0x17d')]>0x0?utils[_0x0ead('0x17e')](_0x45b55b[_0x0ead('0x17f')],_0x45b55b[_0x0ead('0x17d')]):_0x45b55b[_0x0ead('0x17f')]):utils[_0x0ead('0x179')](_[_0x0ead('0xf1')](_0x45b55b[_0x0ead('0x89')])?_0x45b55b[_0x0ead('0x17a')][_0x0ead('0x17b')]:_0x45b55b[_0x0ead('0x89')][_0x0ead('0x17b')],_0x45b55b[_0x0ead('0x17c')],_0x45b55b[_0x0ead('0x17d')]>0x0?utils[_0x0ead('0x17e')](_0x45b55b[_0x0ead('0x17f')],_0x45b55b['dialRandomLastDigitCallerIdNumber']):_0x45b55b['dialOriginateCallerIdNumber']);if(_0x186837){_0x26baca[_0x0ead('0x180')]=_0x31ede6['actions'][_0x1b6ac4][_0x0ead('0x181')]=utils[_0x0ead('0x182')](_0x186837);_0x26baca['XMD-ORIGINATECALLERIDNUM']=_0x443e50[_0x0ead('0x164')];}_0x45b55b['variables']=_0x26baca;return ami[_0x0ead('0x9d')]({'actionid':_0x1b6ac4,'action':_0x0ead('0x162'),'channel':_0x31ede6[_0x0ead('0x83')](_0x45b55b[_0x0ead('0x17a')])?util[_0x0ead('0x44')](_0x0ead('0x183'),_0x45b55b[_0x0ead('0x17a')][_0x0ead('0x45')],isNotNull(_0x45b55b['dialPrefix'])?_0x45b55b[_0x0ead('0x184')][_0x0ead('0x185')]()||'':'',_0x45b55b[_0x0ead('0x186')]>0x0?_0x443e50[_0x0ead('0x164')][_0x0ead('0x187')](_0x45b55b[_0x0ead('0x186')]):_0x443e50[_0x0ead('0x164')]):util[_0x0ead('0x44')](_0x0ead('0x183'),_[_0x0ead('0xf1')](_0x45b55b['TrunkBackup'])?_0x45b55b[_0x0ead('0x17a')][_0x0ead('0x45')]:_0x45b55b[_0x0ead('0x89')][_0x0ead('0x45')],isNotNull(_0x45b55b[_0x0ead('0x184')])?_0x45b55b[_0x0ead('0x184')][_0x0ead('0x185')]()||'':'',_0x45b55b[_0x0ead('0x186')]>0x0?_0x443e50[_0x0ead('0x164')][_0x0ead('0x187')](_0x45b55b[_0x0ead('0x186')]):_0x443e50[_0x0ead('0x164')]),'callerid':_0x186837,'Exten':_0x0ead('0x110'),'Context':_0x0ead('0x188'),'Priority':'1','variable':_0x26baca,'timeout':(_0x45b55b[_0x0ead('0x189')]||0x1e)*0x3e8,'async':!![],'channelid':_0x1b6ac4})[_0x0ead('0x9a')](function(_0x375fbc){return _0x5bbf31(_0x375fbc);})[_0x0ead('0x9c')](function(_0x5647eb){_0x45b55b[_0x0ead('0x18a')]+=0x1;var _0xa3bba3=new History(_0x31ede6[_0x0ead('0x24')][_0x1b6ac4]);logger[_0x0ead('0x61')](util[_0x0ead('0x44')]('[originateError]:\x20%s',JSON[_0x0ead('0x72')](_0x5647eb)));_0xa3bba3[_0x0ead('0x6d')]=0xe;_0xa3bba3['statedesc']=_0x0ead('0x18b');_0xa3bba3['starttime']=moment()['format'](_0x0ead('0xc2'));_0xa3bba3[_0x0ead('0x6f')]=_0xa3bba3[_0x0ead('0xdf')];hopperUtils[_0x0ead('0xc8')](_0xa3bba3)[_0x0ead('0x9c')](loggerCatch(_0x0ead('0x18c')));_0x31ede6[_0x0ead('0xc9')](_0xa3bba3)[_0x0ead('0x9c')](loggerCatch('[originate][error]'))[_0x0ead('0x1c')](function(){delete _0x31ede6['actions'][_0x1b6ac4];return _0x23b412(msgResponse(_0x0ead('0x162'),_0x0ead('0x82'),_0x0ead('0x18d')));});});});};Dialer[_0x0ead('0x1a')][_0x0ead('0x18e')]=function(_0x1a1b6f,_0x520cc4,_0x312d10){var _0x545724=new History(_0x520cc4);if(_0x545724['countbusyretry']+_0x545724[_0x0ead('0x18f')]+_0x545724[_0x0ead('0x12c')]+_0x545724[_0x0ead('0x124')]+_0x545724[_0x0ead('0xd1')]+_0x545724[_0x0ead('0xe6')]+_0x545724['countmachineretry']+_0x545724[_0x0ead('0x125')]>=_0x312d10[_0x0ead('0x12d')]-0x1){return!![];}switch(_0x1a1b6f){case 0x3:if(_0x545724['countnoanswerretry']>=_0x312d10[_0x0ead('0x190')]-0x1){return!![];}hopperUtils[_0x0ead('0xd8')]({'active':![],'countnoanswerretry':_0x545724[_0x0ead('0x12c')]+=0x1,'scheduledat':moment()[_0x0ead('0xd9')](_0x312d10[_0x0ead('0x191')],'minutes')[_0x0ead('0x44')](_0x0ead('0xc2')),'ContactId':_0x545724['ContactId'],'ListId':_0x545724['ListId'],'VoiceQueueId':_0x545724[_0x0ead('0xfb')]||undefined,'CampaignId':_0x545724[_0x0ead('0xdd')]||undefined})[_0x0ead('0x9c')](loggerCatch(_0x0ead('0x192')));break;case 0x5:if(_0x545724[_0x0ead('0x123')]>=_0x312d10[_0x0ead('0x193')]-0x1){return!![];}hopperUtils[_0x0ead('0xd8')]({'active':![],'countbusyretry':_0x545724[_0x0ead('0x123')]+=0x1,'scheduledat':moment()[_0x0ead('0xd9')](_0x312d10['dialBusyRetryFrequency'],_0x0ead('0xda'))[_0x0ead('0x44')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x545724[_0x0ead('0xdb')],'ListId':_0x545724[_0x0ead('0xdc')],'VoiceQueueId':_0x545724['VoiceQueueId']||undefined,'CampaignId':_0x545724[_0x0ead('0xdd')]||undefined})[_0x0ead('0x9c')](loggerCatch(_0x0ead('0x194')));break;case 0x8:if(_0x545724[_0x0ead('0x18f')]>=_0x312d10['dialCongestionMaxRetry']-0x1){return!![];}hopperUtils[_0x0ead('0xd8')]({'active':![],'countcongestionretry':_0x545724[_0x0ead('0x18f')]+=0x1,'scheduledat':moment()[_0x0ead('0xd9')](_0x312d10[_0x0ead('0x195')],'minutes')[_0x0ead('0x44')](_0x0ead('0xc2')),'ContactId':_0x545724[_0x0ead('0xdb')],'ListId':_0x545724[_0x0ead('0xdc')],'VoiceQueueId':_0x545724[_0x0ead('0xfb')]||undefined,'CampaignId':_0x545724[_0x0ead('0xdd')]||undefined})['catch'](loggerCatch(_0x0ead('0x196')));break;case 0x0:if(_0x545724['countnosuchnumberretry']>=_0x312d10[_0x0ead('0x197')]-0x1){return!![];}else{hopperUtils[_0x0ead('0xd8')]({'active':![],'countnosuchnumberretry':_0x545724[_0x0ead('0x124')]+=0x1,'scheduledat':moment()[_0x0ead('0xd9')](_0x312d10['dialNoSuchNumberRetryFrequency'],_0x0ead('0xda'))['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x545724[_0x0ead('0xdb')],'ListId':_0x545724['ListId'],'VoiceQueueId':_0x545724['VoiceQueueId']||undefined,'CampaignId':_0x545724[_0x0ead('0xdd')]||undefined})['catch'](loggerCatch(_0x0ead('0x198')));}break;case 0xa:if(_0x545724[_0x0ead('0xd1')]>=_0x312d10[_0x0ead('0xd7')]-0x1){return!![];}hopperUtils[_0x0ead('0xd8')]({'active':![],'countdropretry':_0x545724[_0x0ead('0xd1')]+=0x1,'scheduledat':moment()[_0x0ead('0xd9')](_0x312d10[_0x0ead('0xd2')],_0x0ead('0xda'))['format'](_0x0ead('0xc2')),'ContactId':_0x545724['ContactId'],'ListId':_0x545724[_0x0ead('0xdc')],'VoiceQueueId':_0x545724[_0x0ead('0xfb')]||undefined,'CampaignId':_0x545724[_0x0ead('0xdd')]||undefined})['catch'](loggerCatch('[rescheduleContact][Drop]'));break;case 0xb:if(_0x545724['countabandonedretry']>=_0x312d10[_0x0ead('0xe9')]-0x1){return!![];}hopperUtils[_0x0ead('0xd8')]({'active':![],'countabandonedretry':_0x545724[_0x0ead('0xe6')]+=0x1,'scheduledat':moment()[_0x0ead('0xd9')](_0x312d10[_0x0ead('0xe8')],_0x0ead('0xda'))['format'](_0x0ead('0xc2')),'ContactId':_0x545724[_0x0ead('0xdb')],'ListId':_0x545724[_0x0ead('0xdc')],'VoiceQueueId':_0x545724[_0x0ead('0xfb')]||undefined,'CampaignId':_0x545724[_0x0ead('0xdd')]||undefined})[_0x0ead('0x9c')](loggerCatch('[rescheduleContact][Abandoned]'));break;case 0x13:if(_0x545724[_0x0ead('0x121')]>=_0x312d10['dialMachineMaxRetry']-0x1){return!![];}hopperUtils[_0x0ead('0xd8')]({'active':![],'countmachineretry':_0x545724[_0x0ead('0x121')]+=0x1,'scheduledat':moment()['add'](_0x312d10[_0x0ead('0x129')],_0x0ead('0xda'))[_0x0ead('0x44')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x545724[_0x0ead('0xdb')],'ListId':_0x545724[_0x0ead('0xdc')],'VoiceQueueId':_0x545724[_0x0ead('0xfb')]||undefined,'CampaignId':_0x545724['CampaignId']||undefined})['catch'](loggerCatch('[rescheduleContact][Machine]'));break;case 0x14:if(_0x545724[_0x0ead('0x125')]>=_0x312d10['dialAgentRejectMaxRetry']-0x1){return!![];}hopperUtils[_0x0ead('0xd8')]({'active':![],'countagentrejectretry':_0x545724[_0x0ead('0x125')]+=0x1,'scheduledat':moment()[_0x0ead('0xd9')](_0x312d10[_0x0ead('0x199')],'minutes')[_0x0ead('0x44')](_0x0ead('0xc2')),'ContactId':_0x545724[_0x0ead('0xdb')],'ListId':_0x545724[_0x0ead('0xdc')],'VoiceQueueId':_0x545724[_0x0ead('0xfb')]||undefined,'CampaignId':_0x545724[_0x0ead('0xdd')]||undefined})[_0x0ead('0x9c')](loggerCatch(_0x0ead('0x19a')));break;default:return!![];}};Dialer[_0x0ead('0x1a')][_0x0ead('0x10c')]=function(_0x393b32,_0xa4f2f2,_0x4f4858){var _0x21781e=this;var _0x2e38cf=new History(_0x393b32);var _0x12f81f=![];var _0x5dc904;var _0x12cf78;return new Promise(function(_0x623b46,_0x1c5702){if(_['isUndefined'](_0xa4f2f2)&&typeof _0xa4f2f2!==_0x0ead('0x161')){return _0x1c5702(msgResponse(_0x0ead('0x19b'),'Failure',_0x0ead('0x19c')));}if(_[_0x0ead('0x51')](_0x4f4858)&&typeof _0x4f4858!==_0x0ead('0x161')){return _0x1c5702(msgResponse(_0x0ead('0x19b'),_0x0ead('0x8e'),_0x0ead('0x19d')));}hopperUtils['verifyAdditionalPhones'](_0x2e38cf,_0x4f4858[_0x0ead('0xc3')],_0xa4f2f2)[_0x0ead('0x9a')](function(_0x555ffd){if(_0x555ffd[_0x0ead('0xd6')]==0x1)_0x12f81f=!![];switch(_0x4f4858[_0x0ead('0xc3')]){case'0':_0xa4f2f2['outboundNoSuchCallsDay']+=0x1;_0x2e38cf['state']=0x0;_0x2e38cf[_0x0ead('0x6e')]=_0x0ead('0x19e');_0x2e38cf[_0x0ead('0x124')]+=0x1;_0x2e38cf[_0x0ead('0xe7')]+=0x1;ami['emit'](_0x0ead('0x19f'),ut[_0x0ead('0x117')](_0x393b32,_0x0ead('0x1a0')));_0x5dc904=_0xa4f2f2[_0x0ead('0x1a1')];_0x12cf78=_0xa4f2f2[_0x0ead('0xd3')];hopperUtils[_0x0ead('0xc8')](_0x2e38cf)[_0x0ead('0x9c')](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x21781e[_0x0ead('0x18e')](0x0,_0x393b32,_0xa4f2f2)&&!_0x12f81f){if(_0x2e38cf['countnosuchnumberretry']>=_0xa4f2f2[_0x0ead('0x197')]){_0x21781e[_0x0ead('0x128')](_0x2e38cf,_0x623b46,_0x1c5702,_0x0ead('0x1a2'));}else{_0x21781e[_0x0ead('0x12e')](_0x2e38cf,_0x623b46,_0x1c5702,_0x0ead('0x1a2'));}}break;case'3':_0xa4f2f2[_0x0ead('0x1a3')]+=0x1;_0x2e38cf[_0x0ead('0x6d')]=0x3;_0x2e38cf['statedesc']='NoAnswer';_0x2e38cf[_0x0ead('0x12c')]+=0x1;_0x2e38cf[_0x0ead('0xe7')]+=0x1;var _0x3a7d43=ut[_0x0ead('0x1a4')](_0x393b32,_0xa4f2f2);ami[_0x0ead('0x41')](_0x0ead('0x1a5'),_0x3a7d43);_0x5dc904=_0xa4f2f2[_0x0ead('0x191')];_0x12cf78=_0xa4f2f2[_0x0ead('0xd3')];hopperUtils['createHistory'](_0x2e38cf)[_0x0ead('0x9c')](loggerCatch(_0x0ead('0x1a6')));if(_0x21781e[_0x0ead('0x18e')](0x3,_0x393b32,_0xa4f2f2)&&!_0x12f81f){if(_0x2e38cf[_0x0ead('0x12c')]>=_0xa4f2f2[_0x0ead('0x190')]){_0x21781e['createStateFinal'](_0x2e38cf,_0x623b46,_0x1c5702,_0x0ead('0x1a7'));}else{_0x21781e['stateGlobal'](_0x2e38cf,_0x623b46,_0x1c5702,'reason\x203\x20ringing\x20no\x20answer');}}break;case'5':_0xa4f2f2[_0x0ead('0x1a8')]+=0x1;_0x2e38cf['state']=0x5;_0x2e38cf[_0x0ead('0x6e')]='Busy';_0x2e38cf[_0x0ead('0x123')]+=0x1;_0x2e38cf[_0x0ead('0xe7')]+=0x1;ami[_0x0ead('0x41')]('custom:agentbusy',ut[_0x0ead('0x117')](_0x393b32,_0x0ead('0x1a9')));_0x5dc904=_0xa4f2f2[_0x0ead('0x1aa')];_0x12cf78=_0xa4f2f2['callAdditionalPhoneAfterMin'];hopperUtils[_0x0ead('0xc8')](_0x2e38cf)[_0x0ead('0x9c')](loggerCatch('[syncAgentComplete][createHistory][5]'));if(_0x21781e['checkRetriveMax'](0x5,_0x393b32,_0xa4f2f2)&&!_0x12f81f){if(_0x2e38cf[_0x0ead('0x123')]>=_0xa4f2f2[_0x0ead('0x193')]){_0x21781e['createStateFinal'](_0x2e38cf,_0x623b46,_0x1c5702,_0x0ead('0x1ab'));}else{_0x21781e[_0x0ead('0x12e')](_0x2e38cf,_0x623b46,_0x1c5702,_0x0ead('0x1ab'));}}break;case'8':_0xa4f2f2[_0x0ead('0x1ac')]+=0x1;_0x2e38cf[_0x0ead('0x6d')]=0x8;_0x2e38cf['statedesc']=_0x0ead('0x1ad');_0x2e38cf[_0x0ead('0x18f')]+=0x1;_0x2e38cf[_0x0ead('0xe7')]+=0x1;_0x5dc904=_0xa4f2f2[_0x0ead('0x195')];_0x12cf78=_0xa4f2f2[_0x0ead('0xd3')];ami[_0x0ead('0x41')](_0x0ead('0x1ae'),ut[_0x0ead('0x117')](_0x393b32,'congestion'));hopperUtils[_0x0ead('0xc8')](_0x2e38cf)[_0x0ead('0x9c')](loggerCatch(_0x0ead('0x1af')));if(_0x21781e['checkRetriveMax'](0x8,_0x393b32,_0xa4f2f2)&&!_0x12f81f){if(_0x2e38cf[_0x0ead('0x18f')]>=_0xa4f2f2[_0x0ead('0x1b0')]){_0x21781e[_0x0ead('0x128')](_0x2e38cf,_0x623b46,_0x1c5702,_0x0ead('0x1b1'));}else{_0x21781e[_0x0ead('0x12e')](_0x2e38cf,_0x623b46,_0x1c5702,_0x0ead('0x1b1'));}}break;case'11':_0xa4f2f2[_0x0ead('0x1b2')]+=0x1;_0x2e38cf[_0x0ead('0x6d')]=0xb;_0x2e38cf[_0x0ead('0x6e')]=_0x0ead('0xe5');_0x2e38cf[_0x0ead('0xe6')]+=0x1;_0x2e38cf[_0x0ead('0xe7')]+=0x1;_0x5dc904=_0xa4f2f2[_0x0ead('0xe8')];_0x12cf78=_0xa4f2f2[_0x0ead('0xd3')];hopperUtils[_0x0ead('0xc8')](_0x2e38cf)[_0x0ead('0x9c')](loggerCatch('[syncAgentComplete][createHistory][11]'));if(_0x21781e['checkRetriveMax'](0xb,_0x393b32,_0xa4f2f2)&&!_0x12f81f){if(_0x2e38cf[_0x0ead('0xe6')]>=_0xa4f2f2[_0x0ead('0xe9')]){_0x21781e[_0x0ead('0x128')](_0x2e38cf,_0x623b46,_0x1c5702,'reason\x2011\x20abandoned');}else{_0x21781e['stateGlobal'](_0x2e38cf,_0x623b46,_0x1c5702,_0x0ead('0x1b3'));}}break;case'20':_0xa4f2f2[_0x0ead('0x1b4')]+=0x1;_0x2e38cf[_0x0ead('0x6d')]=0x14;_0x2e38cf['statedesc']=_0x0ead('0x1b5');_0x2e38cf[_0x0ead('0x125')]+=0x1;_0x2e38cf[_0x0ead('0xe7')]+=0x1;_0x5dc904=_0xa4f2f2['dialAgentRejectRetryFrequency'];_0x12cf78=_0xa4f2f2[_0x0ead('0xd3')];ami[_0x0ead('0x41')](_0x0ead('0x1b6'),ut['buildObj'](_0x393b32,'agentreject'));hopperUtils['createHistory'](_0x2e38cf)[_0x0ead('0x9c')](loggerCatch(_0x0ead('0x1b7')));if(_0x21781e[_0x0ead('0x18e')](0x14,_0x393b32,_0xa4f2f2)&&!_0x12f81f){if(_0x2e38cf[_0x0ead('0x125')]>=_0xa4f2f2[_0x0ead('0x1b8')]){_0x21781e[_0x0ead('0x128')](_0x2e38cf,_0x623b46,_0x1c5702,_0x0ead('0x1b9'));}else{_0x21781e['stateGlobal'](_0x2e38cf,_0x623b46,_0x1c5702,_0x0ead('0x1b9'));}}break;default:_0xa4f2f2[_0x0ead('0x137')]+=0x1;_0x2e38cf[_0x0ead('0x6d')]=0xc;_0x2e38cf[_0x0ead('0x6e')]=_0x4f4858['reason'];_0x5dc904=_0xa4f2f2[_0x0ead('0x199')];_0x12cf78=_0xa4f2f2[_0x0ead('0xd3')];hopperUtils[_0x0ead('0xc8')](_0x2e38cf)[_0x0ead('0x9c')](loggerCatch('[syncAgentComplete][createHistory][?]'));if(_0x21781e[_0x0ead('0x18e')](_0x4f4858[_0x0ead('0xc3')],_0x393b32,_0xa4f2f2)&&!_0x12f81f){if(_0x2e38cf[_0x0ead('0x123')]+_0x2e38cf[_0x0ead('0x18f')]+_0x2e38cf[_0x0ead('0x12c')]+_0x2e38cf['countnosuchnumberretry']+_0x2e38cf[_0x0ead('0xd1')]+_0x2e38cf['countabandonedretry']+_0x2e38cf[_0x0ead('0x121')]+_0x2e38cf[_0x0ead('0x125')]>=_0xa4f2f2['dialGlobalMaxRetry']){_0x21781e[_0x0ead('0x12e')](_0x2e38cf,_0x623b46,_0x1c5702,_0x4f4858[_0x0ead('0xc3')]);}else{_0x21781e['createStateFinal'](_0x2e38cf,_0x623b46,_0x1c5702,_0x4f4858[_0x0ead('0xc3')]);}}}})[_0x0ead('0x9a')](function(){if(_0x12f81f){hopperUtils[_0x0ead('0xe3')](_0x2e38cf,_0x5dc904,_0x12cf78)[_0x0ead('0x9a')](function(){return _0x623b46(0x1);});}});});};Dialer[_0x0ead('0x1a')][_0x0ead('0x12e')]=function(_0x5cc804,_0x9b3584,_0x34a3bb,_0x4f227d){var _0x557a33=new Final(_0x5cc804);_0x557a33[_0x0ead('0x6d')]=0xf;_0x557a33[_0x0ead('0x6e')]=_0x0ead('0x1ba');this[_0x0ead('0x128')](_0x557a33,_0x9b3584,_0x34a3bb,_0x4f227d);};Dialer[_0x0ead('0x1a')][_0x0ead('0x128')]=function(_0x901e00,_0x41d384,_0xc2dd59,_0x2a2e49){hopperUtils[_0x0ead('0xc9')](_0x901e00)[_0x0ead('0x9a')](function(){return _0x41d384(msgResponse(_0x0ead('0x19b'),_0x0ead('0x10b'),_0x2a2e49));})['catch'](function(){return _0xc2dd59(msgResponse(_0x0ead('0x1bb'),_0x0ead('0x8e'),_0x0ead('0x1bc')));});};Dialer[_0x0ead('0x1a')][_0x0ead('0x8')]=function(_0x7415d2){var _0x4d31b4=_0x7415d2[_0x0ead('0x1bd')]/0x64;var _0x31c87e=_0x7415d2[_0x0ead('0xcd')]/(_0x7415d2[_0x0ead('0xcd')]+_0x7415d2[_0x0ead('0x11f')]);var _0x17f6d7=Math['round'](_0x7415d2[_0x0ead('0x1be')]*(_0x7415d2[_0x0ead('0x1bf')]/0x64));var _0x1b66f8=Math[_0x0ead('0x1c0')](_0x7415d2[_0x0ead('0x1be')]*(_0x7415d2[_0x0ead('0x1c1')]/0x64));var _0x18d138=_0x7415d2['available']+_0x7415d2[_0x0ead('0x13d')];var _0x13416a=Math['floor'](_0x7415d2[_0x0ead('0x56')]*_0x7415d2[_0x0ead('0x58')]*_0x7415d2[_0x0ead('0x1c2')]*_0x7415d2['predictiveIntervalMultiplicativeFactor']);if(_['isUndefined'](_0x7415d2[_0x0ead('0x28')])){if(!_[_0x0ead('0x51')](_0x7415d2['startPredictive'])){_0x7415d2[_0x0ead('0x27')]=undefined;loggerPredictive[_0x0ead('0x61')](_0x0ead('0x1c3'),_0x0ead('0x1c4'));}if(!_[_0x0ead('0x51')](_0x7415d2[_0x0ead('0x5f')])){loggerPredictive[_0x0ead('0x61')](_0x0ead('0x1c3'),_0x0ead('0x1c5'));clearInterval(_0x7415d2['handlePredictive']);_0x7415d2[_0x0ead('0x5f')]=undefined;}_0x7415d2[_0x0ead('0x28')]=moment()['format'](_0x0ead('0xc2'));loggerPredictive['info'](_0x7415d2[_0x0ead('0x45')],_0x0ead('0x1c6'),_0x7415d2[_0x0ead('0x28')]);this[_0x0ead('0xb2')](_0x7415d2,0x1);}else if(ifInterval(_0x7415d2['dialPredictiveInterval'],_0x7415d2[_0x0ead('0x28')])){this[_0x0ead('0xb2')](_0x7415d2,0x1);loggerPredictiveCalls['info'](_0x0ead('0x1c7'),_0x7415d2['startProgressive'],_0x7415d2[_0x0ead('0x45')]);_0x7415d2['erlangCalls']=0x0;_0x7415d2['predictiveIntervalErlangCallsDroppedCalls']=0x0;}else if(_0x4d31b4<_0x31c87e&&_0x7415d2[_0x0ead('0x1c8')]==='dropRate'){clearPredictiveAttributes(_0x7415d2);loggerPredictive[_0x0ead('0x46')](_0x0ead('0x1c9'),_0x0ead('0x1ca'),_0x31c87e,_0x0ead('0x28'),_0x7415d2[_0x0ead('0x45')]);}else if(_0x13416a<_0x7415d2[_0x0ead('0x1cb')]&&_0x7415d2[_0x0ead('0x1c8')]==='dropRate'){clearPredictiveAttributes(_0x7415d2);loggerPredictive[_0x0ead('0x46')]('[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]',_0x0ead('0x1cc'),_0x13416a,_0x0ead('0x1cd'),_0x7415d2[_0x0ead('0x1cb')],'startProgressive',_0x7415d2[_0x0ead('0x45')]);}else if(!ifInterval(_0x7415d2[_0x0ead('0x1ce')],_0x7415d2['startProgressive'])&&_[_0x0ead('0x51')](_0x7415d2[_0x0ead('0x27')])&&!_['isUndefined'](_0x7415d2[_0x0ead('0x28')])){_0x7415d2[_0x0ead('0x27')]=moment()[_0x0ead('0x44')](_0x0ead('0xc2'));loggerPredictive['info'](_0x7415d2['name'],'started\x20in\x20predictive\x20at',_0x7415d2[_0x0ead('0x27')]);hopperUtils[_0x0ead('0x1cf')](_0x7415d2[_0x0ead('0x1ce')])[_0x0ead('0x9a')](this[_0x0ead('0x1d0')](_0x7415d2))[_0x0ead('0x9a')](mergeDataErlangB(_0x7415d2))[_0x0ead('0x9a')](this[_0x0ead('0x1d1')](_0x7415d2))[_0x0ead('0x9c')](loggerCatchPredictive('Predictive\x20after\x20first\x20interval',_0x7415d2));}else if(!ifInterval(_0x7415d2[_0x0ead('0x1ce')],_0x7415d2[_0x0ead('0x27')])){_0x7415d2[_0x0ead('0x1cb')]=0x0;_0x7415d2[_0x0ead('0x27')]=moment()[_0x0ead('0x44')]('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive['info'](_0x7415d2[_0x0ead('0x45')],_0x0ead('0x1d2'),_0x7415d2[_0x0ead('0x27')]);clearInterval(_0x7415d2[_0x0ead('0x5f')]);_0x7415d2[_0x0ead('0x5f')]=undefined;hopperUtils[_0x0ead('0x1cf')](_0x7415d2[_0x0ead('0x1ce')])[_0x0ead('0x9a')](this['getDataPredictive'](_0x7415d2))['then'](mergeDataErlangB(_0x7415d2))[_0x0ead('0x9a')](this[_0x0ead('0x1d1')](_0x7415d2))[_0x0ead('0x9c')](loggerCatchPredictive('Predictive\x20for\x20every\x20interval',_0x7415d2));}else if(_0x7415d2[_0x0ead('0x1be')]&&_0x18d138<_0x7415d2[_0x0ead('0x1be')]-_0x1b66f8){clearPredictiveAttributes(_0x7415d2);loggerPredictive['info'](_0x7415d2[_0x0ead('0x45')],'switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',_0x18d138,_0x0ead('0x1d3'),_0x7415d2[_0x0ead('0x1be')],'-',_0x1b66f8,'=',_0x7415d2[_0x0ead('0x1be')]-_0x1b66f8,')');}else if(_0x7415d2['predictiveIntervalAvailable']&&_0x18d138>_0x7415d2[_0x0ead('0x1be')]+_0x17f6d7){clearPredictiveAttributes(_0x7415d2);loggerPredictive[_0x0ead('0x46')](_0x7415d2[_0x0ead('0x45')],'switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',_0x18d138,')\x20are\x20more\x20than\x20threshold\x20(',_0x7415d2['predictiveIntervalAvailable'],'+',_0x17f6d7,'=',_0x7415d2['predictiveIntervalAvailable']+_0x17f6d7,')');}};Dialer['prototype']['getDataPredictive']=function(_0x2a9df2){var _0x107f9a=this;return function(_0xbe2cb8){return new Promise(function(_0x2a0fbc,_0x48c6cf){_['merge'](_0x2a9df2,_0xbe2cb8[0x0]);if(checkGetDataPredictive(_0xbe2cb8[0x0])){var _0x55dbe2=_0x2a9df2[_0x0ead('0x1be')]=_0x2a9df2['talking']+_0x2a9df2[_0x0ead('0x13b')];var _0xb226d2=_0x2a9df2[_0x0ead('0x1ce')]*0x3c;var _0x5876b1=_0xbe2cb8[0x0][_0x0ead('0x4f')]+_0xbe2cb8[0x0][_0x0ead('0x4d')];var _0x22869c=(_0xbe2cb8[0x0]['predictiveIntervalAnsweredCalls']+_0xbe2cb8[0x0][_0x0ead('0x49')]+_0xbe2cb8[0x0][_0x0ead('0x4b')])/_0xbe2cb8[0x0]['predictiveIntervalTotalCalls'];_0x2a9df2[_0x0ead('0x1c2')]=_0x22869c>0x0?_0x22869c:0x1;switch(_0x2a9df2[_0x0ead('0x1c8')]){case _0x0ead('0x1d4'):var _0x23122c=_0x2a9df2['dialPredictiveOptimizationPercentage']/0x64;return _0x107f9a['abandonmentRate'](_0x55dbe2,_0xb226d2,_0x5876b1,_0x22869c,_0x23122c)[_0x0ead('0x9a')](function(_0x3d978d){return _0x2a0fbc(_0x3d978d);});case _0x0ead('0x1d5'):var _0x554cb7=_0x2a9df2[_0x0ead('0x1bd')]/0x64;return _0x107f9a[_0x0ead('0x1d6')](_0x55dbe2,_0xb226d2,_0x5876b1,_0x22869c,_0x554cb7)[_0x0ead('0x9a')](function(_0x364f66){return _0x2a0fbc(_0x364f66);});default:return _0x48c6cf(msgResponse('[getDataPredictive]',_0x0ead('0x8e'),_0x0ead('0x1d7')));}}else{return _0x48c6cf(msgResponse(_0x0ead('0x1d8'),_0x0ead('0x8e'),'check\x20failure'));}});};};Dialer[_0x0ead('0x1a')]['getDataPredictiveOld']=function(_0x43401b){var _0x335aeb=this;return function(_0x335267){return new Promise(function(_0x47b224,_0x4ccbfe){_[_0x0ead('0xf5')](_0x43401b,_0x335267[0x0]);if(checkGetDataPredictive(_0x335267[0x0])){loggerPredictive[_0x0ead('0x46')](JSON[_0x0ead('0x72')](_0x335267[0x0]));if(_0x43401b[_0x0ead('0x1c8')]===_0x0ead('0x1d4')){return _0x335aeb['getVoiceQueueRtPauses'](_0x43401b['id'])[_0x0ead('0x9a')](function(_0x59753d){var _0xbf0c9d=_0x43401b['loggedIn']-_0x59753d[0x0]['outboundQueuePauses'];var _0x1a868f=_0x43401b[_0x0ead('0x1ce')]*0x3c;var _0x3382da=_0x335267[0x0][_0x0ead('0x4f')]+_0x335267[0x0][_0x0ead('0x4d')];var _0x1e9719=(_0x335267[0x0][_0x0ead('0x48')]+_0x335267[0x0][_0x0ead('0x49')]+_0x335267[0x0][_0x0ead('0x4b')])/_0x335267[0x0][_0x0ead('0x47')];var _0x29e990=_0x43401b[_0x0ead('0x1bd')]/0x64;_0x43401b[_0x0ead('0x1d9')]=_0x59753d[0x0][_0x0ead('0x1da')]||0x0;_0x43401b[_0x0ead('0x1c2')]=_0x1e9719>0x0?_0x1e9719:0x1;return _0x335aeb['abandonmentRate'](_0xbf0c9d,_0x1a868f,_0x3382da,_0x1e9719,_0x29e990);})['then'](function(_0x4465c6){return _0x47b224(_0x4465c6);})[_0x0ead('0x9c')](function(_0x53c9b5){return _0x4ccbfe(msgResponse(_0x0ead('0x1db'),_0x0ead('0x8e'),JSON['stringify'](_0x53c9b5)));});}if(_0x43401b[_0x0ead('0x1c8')]===_0x0ead('0x1d5')){return _0x335aeb[_0x0ead('0x154')](_0x43401b['id'])[_0x0ead('0x9a')](function(_0x4ad7e2){var _0x2e61f6=_0x43401b['loggedIn']-_0x4ad7e2[0x0][_0x0ead('0x1da')];var _0x4cc2f2=_0x43401b[_0x0ead('0x1ce')]*0x3c;var _0x2baca8=_0x335267[0x0][_0x0ead('0x4f')]+_0x335267[0x0][_0x0ead('0x4d')];var _0x4ba40d=(_0x335267[0x0][_0x0ead('0x48')]+_0x335267[0x0][_0x0ead('0x49')]+_0x335267[0x0][_0x0ead('0x4b')])/_0x335267[0x0][_0x0ead('0x47')];var _0x3d792a=_0x43401b[_0x0ead('0x1bd')]/0x64;_0x43401b['predictiveIntervalPauses']=_0x4ad7e2[0x0][_0x0ead('0x1da')]||0x0;_0x43401b[_0x0ead('0x1c2')]=_0x4ba40d>0x0?_0x4ba40d:0x1;return _0x335aeb['busyFactor'](_0x2e61f6,_0x4cc2f2,_0x2baca8,_0x4ba40d,_0x3d792a);})[_0x0ead('0x9a')](function(_0x45d670){return _0x47b224(_0x45d670);})[_0x0ead('0x9c')](function(_0x299832){return _0x4ccbfe(msgResponse('[CatchErlangB]',_0x0ead('0x8e'),JSON['stringify'](_0x299832)));});}}else{return _0x4ccbfe(msgResponse(_0x0ead('0x1d8'),_0x0ead('0x8e'),_0x0ead('0x1dc')));}});};};Dialer[_0x0ead('0x1a')][_0x0ead('0x1d1')]=function(_0x38203a){var _0x27ae00=this;return function(){var _0xe3583f=0x0;var _0x1b6081=Math['floor'](_0x38203a[_0x0ead('0x57')]*0x3e8);if(_0x1b6081>0x0){_0x1b6081=_0x1b6081<0x64?0x64:_0x1b6081;loggerPredictive[_0x0ead('0x46')](_0x38203a[_0x0ead('0x45')],_0x0ead('0x1dd'),_0x1b6081,_0x0ead('0x1de'));_0x38203a[_0x0ead('0x5f')]=setInterval(function(){_0x27ae00['handlePredictive'](_0x38203a);loggerPredictiveCalls[_0x0ead('0x46')](_0x0ead('0x1df'),_0xe3583f+=0x1);},_0x1b6081);}else{loggerPredictive[_0x0ead('0x46')](_0x38203a[_0x0ead('0x45')],_0x0ead('0x1e0'));}};};Dialer[_0x0ead('0x1a')]['checkContactBlack']=function(_0x2860ad,_0xb1f38f){var _0x3b51a7=this;return function(_0x193232){if(_[_0x0ead('0x77')](_0x193232)){if(_[_0x0ead('0xf1')](_0xb1f38f[_0x0ead('0x15b')])||!_0xb1f38f[_0x0ead('0x1e1')]){if(_0x2860ad[_0x0ead('0xb1')]==='booked'){_0x2860ad['queueStatusComplete']=_[_0x0ead('0x51')](_0x2860ad[_0x0ead('0x70')])?!![]:_0x2860ad[_0x0ead('0x70')];var _0x35bd84=uuid['v4']();_0x3b51a7['actions'][_0x35bd84]=new Action(_0x2860ad,_0xb1f38f,_0x35bd84);loggerBooked[_0x0ead('0x46')]('[booked][checkContactBlack]',_0x35bd84,'queueStatusComplete:\x20',JSON['stringify'](_0x2860ad[_0x0ead('0x70')]),_0x0ead('0x1e2'),_0x2860ad[_0x0ead('0x45')]);if(_0x2860ad['queueStatusComplete']){_0x2860ad['queueStatusComplete']=![];_0x3b51a7[_0x0ead('0x2a')][_0x3b51a7[_0x0ead('0x24')][_0x35bd84]['queue']]=[];ami[_0x0ead('0x9d')]({'actionid':_0x35bd84,'action':_0x0ead('0x1e3'),'queue':_0x2860ad[_0x0ead('0x45')]})[_0x0ead('0x9c')](function(){_0x3b51a7[_0x0ead('0xbf')](_0x2860ad);hopperUtils['rescheduleContact']({'active':![],'ContactId':_0x3b51a7[_0x0ead('0x24')][_0x35bd84]['ContactId'],'ListId':_0x3b51a7[_0x0ead('0x24')][_0x35bd84][_0x0ead('0xdc')],'VoiceQueueId':_0x3b51a7['actions'][_0x35bd84][_0x0ead('0xfb')]||undefined,'CampaignId':_0x3b51a7['actions'][_0x35bd84][_0x0ead('0xdd')]||undefined})[_0x0ead('0x9c')](loggerCatch(_0x0ead('0x1e4')));delete _0x3b51a7[_0x0ead('0x24')][_0x35bd84];});}else{loggerBooked[_0x0ead('0x46')]('[booked][checkContactBlack][else]',JSON[_0x0ead('0x72')](_0x2860ad[_0x0ead('0x70')]),_0x0ead('0x1e2'),_0x2860ad[_0x0ead('0x45')]);_0x3b51a7['updateOriginated'](_0x2860ad);hopperUtils[_0x0ead('0xd8')]({'active':![],'ContactId':_0x3b51a7[_0x0ead('0x24')][_0x35bd84]['ContactId'],'ListId':_0x3b51a7[_0x0ead('0x24')][_0x35bd84]['ListId'],'VoiceQueueId':_0x3b51a7[_0x0ead('0x24')][_0x35bd84][_0x0ead('0xfb')]||undefined,'CampaignId':_0x3b51a7['actions'][_0x35bd84][_0x0ead('0xdd')]||undefined})[_0x0ead('0x9c')](loggerCatch(_0x0ead('0x1e4')));delete _0x3b51a7[_0x0ead('0x24')][_0x35bd84];}}else{return _0x3b51a7[_0x0ead('0x160')](_0x2860ad,_0xb1f38f);}}else{if(utils['getSeconds'](undefined,_0xb1f38f['scheduledat'])<_0x2860ad[_0x0ead('0x1e5')]*0x3c){if(_0xb1f38f['Agent']&&!_0xb1f38f[_0x0ead('0x14b')][_0x0ead('0x1e6')]){_0x3b51a7[_0x0ead('0x102')][_0x0ead('0xf8')](_0xb1f38f['id'])[_0x0ead('0x1c')](function(){_0x3b51a7[_0x0ead('0xbf')](_0x2860ad);});}else{hopperUtils[_0x0ead('0x1e7')]({'active':![]},_0xb1f38f['id'],0x1)[_0x0ead('0x1c')](function(){_0x3b51a7[_0x0ead('0xbf')](_0x2860ad);});}}else{_0x2860ad['outboundReCallsDay']+=0x1;_0x3b51a7[_0x0ead('0xbf')](_0x2860ad);if(_0x2860ad['dialRecallInQueue']){hopperUtils['rescheduleContact']({'active':![],'recallme':![],'UserId':null,'ContactId':_0xb1f38f['ContactId'],'ListId':_0xb1f38f[_0x0ead('0xdc')],'VoiceQueueId':_0xb1f38f[_0x0ead('0xfb')]||undefined,'CampaignId':_0xb1f38f[_0x0ead('0xdd')]||undefined})[_0x0ead('0x9c')](loggerCatch(_0x0ead('0x1e8')));hopperUtils[_0x0ead('0xc8')](createObjHistory(_0x2860ad,_0xb1f38f,utils['CAMPAIGN_STATUS'][_0x0ead('0x1e9')],0x17,'RecallInQueue'))[_0x0ead('0x9c')](loggerCatch('[Originate][HistoryDialRecallInQueue][historyCatch]'));}else{_0x3b51a7[_0x0ead('0x119')](createObjHistory(_0x2860ad,_0xb1f38f,utils[_0x0ead('0x65')]['RECALL_TIMEOUT'],0x16,_0x0ead('0x1ea')),'[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]');}}}}else{_0x2860ad[_0x0ead('0x1eb')]+=0x1;_0x3b51a7[_0x0ead('0x119')](createObjHistory(_0x2860ad,_0xb1f38f,utils[_0x0ead('0x65')][_0x0ead('0x1ec')],0xd,_0x0ead('0x1ed')),_0x0ead('0x1ee'),_0x0ead('0x1ef'));throw _0x0ead('0x1f0');}};};Dialer[_0x0ead('0x1a')][_0x0ead('0x1f1')]=function(_0x47f46e){var _0x1f496a=this;var _0x133bd2=_0x47f46e[_0x0ead('0x1f2')]-_0x47f46e['originated'];emitCampaignSummary(_0x47f46e);if(_0x133bd2>0x0&&_0x47f46e['temp']==0x0){if(_0x133bd2>this['maxNumberOriginate']){_0x133bd2=this[_0x0ead('0x22')];}_0x47f46e[_0x0ead('0x64')]=0x1;hopperUtils['getContactDialerIvr'](_0x47f46e,_0x133bd2)[_0x0ead('0x9a')](function(_0x246c79){_0x47f46e['temp']=0x0;if(_0x246c79){if(!utils[_0x0ead('0x1f3')](_0x246c79)){_0x47f46e[_0x0ead('0x6c')]=utils['CAMPAIGN_STATUS'][_0x0ead('0x6a')];logger[_0x0ead('0x46')]('[getContactCampaign2][Empty]'+_0x47f46e[_0x0ead('0x45')]);}else{_0x47f46e[_0x0ead('0x156')]+=_0x246c79[_0x0ead('0x94')];_0x47f46e['message']=utils['CAMPAIGN_STATUS'][_0x0ead('0x1f4')];for(var _0x12b9ac=0x0;_0x12b9ac<_0x246c79[_0x0ead('0x94')];_0x12b9ac+=0x1){_0x47f46e[_0x0ead('0x1f5')]+=0x1;if(_[_0x0ead('0xf1')](_0x246c79[_0x12b9ac])||_[_0x0ead('0xf1')](_0x246c79[_0x12b9ac][_0x0ead('0x1f6')])||_[_0x0ead('0xf1')](_0x246c79[_0x12b9ac][_0x0ead('0x164')])){_0x1f496a[_0x0ead('0x1f7')](_0x0ead('0x1f8'),_0x47f46e,_0x246c79[_0x12b9ac]);}else{hopperUtils[_0x0ead('0x1f9')](_[_0x0ead('0xf6')](_0x246c79[_0x12b9ac],[_0x0ead('0xdd'),_0x0ead('0x164')]))[_0x0ead('0x9a')](_0x1f496a[_0x0ead('0x1fa')](_0x47f46e,_0x246c79[_0x12b9ac]))[_0x0ead('0x9c')](_0x1f496a[_0x0ead('0x159')](_0x0ead('0x1fb'),_0x47f46e));}}}}})[_0x0ead('0x9c')](loggerGetContactDialer(_0x0ead('0x1fc'),_0x47f46e,_0x133bd2));}};Dialer[_0x0ead('0x1a')][_0x0ead('0xb2')]=function(_0x1f3e57,_0x42ebc1){var _0x9f1a4=this;var _0x175be6=[];if(_0x42ebc1<0x1||_0x1f3e57[_0x0ead('0xb1')]==='booked'){_0x42ebc1=0x1;}var _0x40166a=Math[_0x0ead('0x1fd')](_0x1f3e57[_0x0ead('0x13b')]*_0x42ebc1)-_0x1f3e57['originated'];if(_0x1f3e57[_0x0ead('0x1fe')]>0x0){var _0x328e96=_0x1f3e57['dialLimitQueue']-_0x1f3e57[_0x0ead('0x156')]-_0x1f3e57[_0x0ead('0x13d')]-_0x1f3e57[_0x0ead('0x13e')];if(_0x40166a>_0x328e96){_0x40166a=_0x328e96;}}if(_0x40166a>0x0&&_0x1f3e57[_0x0ead('0x64')]==0x0){if(_0x1f3e57[_0x0ead('0xb1')]==='booked'){_0x40166a=0x1;}if(_0x40166a>this[_0x0ead('0x22')]){_0x40166a=this[_0x0ead('0x22')];}for(var _0x4a18c0 in this[_0x0ead('0x20')]){if(typeof this[_0x0ead('0x20')][_0x4a18c0]!==_0x0ead('0xa8')){if(this['agents'][_0x4a18c0][_0x0ead('0x6d')]===_0x0ead('0x1ff')&&this[_0x0ead('0x20')][_0x4a18c0][_0x0ead('0x86')]==='reachable'){_0x175be6[_0x0ead('0x95')](this[_0x0ead('0x20')][_0x4a18c0]['id']);}}}_0x1f3e57[_0x0ead('0x64')]=0x1;hopperUtils[_0x0ead('0x200')](_0x1f3e57,_0x175be6,_0x40166a)[_0x0ead('0x9a')](function(_0xe4902f){_0x1f3e57[_0x0ead('0x64')]=0x0;if(_0xe4902f){if(!utils[_0x0ead('0x1f3')](_0xe4902f)){hopperUtils[_0x0ead('0x201')](_0x1f3e57)['then'](sendMessageReschedule(_0x1f3e57))[_0x0ead('0x9c')](loggerCatch('[countReScheduled]\x20'));}else{_0x1f3e57[_0x0ead('0x156')]+=_0xe4902f[_0x0ead('0x94')];_0x1f3e57['message']=_0x1f3e57[_0x0ead('0xb1')]===_0x0ead('0x202')?utils[_0x0ead('0x65')][_0x0ead('0x13f')]:utils[_0x0ead('0x65')][_0x0ead('0x1f4')];for(var _0x3d3ad9=0x0;_0x3d3ad9<_0xe4902f[_0x0ead('0x94')];_0x3d3ad9+=0x1){if(_['isNil'](_0xe4902f[_0x3d3ad9])||_['isNil'](_0xe4902f[_0x3d3ad9]['Contact'])||_[_0x0ead('0xf1')](_0xe4902f[_0x3d3ad9]['phone'])){_0x9f1a4[_0x0ead('0x1f7')](_0x0ead('0x1f8'),_0x1f3e57,_0xe4902f[_0x3d3ad9]);}else{hopperUtils[_0x0ead('0x203')](_[_0x0ead('0xf6')](_0xe4902f[_0x3d3ad9],[_0x0ead('0xfb'),_0x0ead('0x164')]))['then'](_0x9f1a4[_0x0ead('0x1fa')](_0x1f3e57,_0xe4902f[_0x3d3ad9]))[_0x0ead('0x9c')](_0x9f1a4[_0x0ead('0x159')](_0x0ead('0x1f8'),_0x1f3e57));}}}}})['catch'](loggerGetContactDialer('[getContactDialer2]',_0x1f3e57,_0x40166a));}};Dialer['prototype']['handlePredictive']=function(_0x6d6e8b){if(_0x6d6e8b[_0x0ead('0x1fe')]>0x0){var _0x5ba1ab=_0x6d6e8b[_0x0ead('0x1fe')]-_0x6d6e8b[_0x0ead('0x156')]-_0x6d6e8b[_0x0ead('0x13d')];if(_0x5ba1ab>0x0&&_0x6d6e8b['temp']==0x0){this[_0x0ead('0x204')](_0x6d6e8b);}else{loggerPredictiveCalls['info'](_0x0ead('0x205'));}}else{this[_0x0ead('0x204')](_0x6d6e8b);}};Dialer[_0x0ead('0x1a')][_0x0ead('0x204')]=function(_0x586ef5){var _0x42b906=this;var _0x18bc4=[];_0x586ef5[_0x0ead('0x156')]+=0x1;for(var _0x18c740 in this[_0x0ead('0x20')]){if(typeof this[_0x0ead('0x20')][_0x18c740]!==_0x0ead('0xa8')){if(this[_0x0ead('0x20')][_0x18c740][_0x0ead('0x6d')]===_0x0ead('0x1ff')&&this['agents'][_0x18c740][_0x0ead('0x86')]==='reachable'){_0x18bc4[_0x0ead('0x95')](this[_0x0ead('0x20')][_0x18c740]['id']);}}}_0x586ef5[_0x0ead('0x64')]=0x1;return this[_0x0ead('0x200')](_0x586ef5['id'],_0x18bc4,0x1,_0x586ef5[_0x0ead('0x206')],_0x586ef5)[_0x0ead('0x9a')](function(_0x4f2d9d){_0x586ef5['temp']=0x1;if(_0x4f2d9d){if(!utils[_0x0ead('0x1f3')](_0x4f2d9d)){utils['checkContactLowerLimitOriginate'](_0x586ef5,0x1,0x0);return hopperUtils[_0x0ead('0x201')](_0x586ef5)[_0x0ead('0x9a')](sendMessageReschedule(_0x586ef5))[_0x0ead('0x9c')](loggerCatch(_0x0ead('0x207')));}else{_0x586ef5['message']=utils['CAMPAIGN_STATUS'][_0x0ead('0x1f4')];if(_['isNil'](_0x4f2d9d[0x0])||_[_0x0ead('0xf1')](_0x4f2d9d[0x0][_0x0ead('0x1f6')])||_['isNil'](_0x4f2d9d[0x0][_0x0ead('0x164')])){_0x42b906[_0x0ead('0x1f7')]('[actionOriginate]\x20',_0x586ef5,_0x4f2d9d[0x0]);}else{return hopperUtils[_0x0ead('0x203')](_[_0x0ead('0xf6')](_0x4f2d9d[0x0],[_0x0ead('0xfb'),_0x0ead('0x164')]))[_0x0ead('0x9a')](_0x42b906[_0x0ead('0x1fa')](_0x586ef5,_0x4f2d9d[0x0]))[_0x0ead('0x9c')](_0x42b906[_0x0ead('0x159')](_0x0ead('0x208'),_0x586ef5));}}}})['catch'](loggerGetContactDialer('[getContactDialerPredictive]',_0x586ef5,0x1));};Dialer['prototype']['abandonmentRate']=function(_0x4d9745,_0x540de5,_0x29ae8d,_0x3dc003,_0x3c0355,_0x49d476){loggerPredictive[_0x0ead('0x46')]('--------\x20Drop\x20Rate\x20--------');loggerPredictive[_0x0ead('0x46')](_0x0ead('0x209'),_0x4d9745);loggerPredictive[_0x0ead('0x46')](_0x0ead('0x20a'),_0x540de5);loggerPredictive[_0x0ead('0x46')](_0x0ead('0x20b'),_0x29ae8d);loggerPredictive[_0x0ead('0x46')](_0x0ead('0x20c'),_0x3dc003);loggerPredictive[_0x0ead('0x46')]('Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x3c0355);loggerPredictive['info'](_0x0ead('0x50'));return new Promise(function(_0x31eb8a,_0x2c2b3a){if(_0x4d9745<=0x0||isNaN(_0x4d9745)){return _0x2c2b3a(msgResponse(_0x0ead('0x20d'),_0x0ead('0x82'),_0x0ead('0x20e')+_0x4d9745));}if(_0x29ae8d<=0x0||isNaN(_0x29ae8d)){return _0x2c2b3a(msgResponse(_0x0ead('0x20d'),'Error','Ts\x20=\x20'+_0x29ae8d));}if(_0x3dc003<=0x0||isNaN(_0x3dc003)){return _0x2c2b3a(msgResponse(_0x0ead('0x20d'),'Error',_0x0ead('0x20f')+_0x3dc003));}if(_0x540de5<=0x0||isNaN(_0x540de5)){return _0x2c2b3a(msgResponse(_0x0ead('0x20d'),_0x0ead('0x82'),_0x0ead('0x210')+_0x540de5));}if(_0x3c0355<=0x0||isNaN(_0x3c0355)){return _0x2c2b3a(msgResponse(_0x0ead('0x20d'),_0x0ead('0x82'),_0x0ead('0x211')+_0x3c0355));}_0x49d476=_0x49d476||0x0;var _0x3a29dd=0x1/_0x29ae8d;var _0xc6a6f9=0x0;var _0x1df1fd=0x0;var _0x3dbf34=0x0;var _0x5b364e=0x0;for(var _0x223f4e=0x0;_0x3dbf34<_0x3c0355;_0x223f4e+=0x1){_0x1df1fd=_0x223f4e/_0x540de5;_0xc6a6f9=(_0x3dc003*_0x1df1fd+_0x49d476)/_0x3a29dd;_0x3dbf34=utils[_0x0ead('0x212')](_0xc6a6f9,_0x4d9745);_0x5b364e=_0xc6a6f9/_0x4d9745*(0x1-utils[_0x0ead('0x212')](_0xc6a6f9,_0x4d9745));}return _0x31eb8a({'erlangCalls':_0x223f4e,'erlangCallToSecond':_0x540de5/_0x223f4e,'erlangAbandonmentRate':_0x3dbf34,'erlangBusyFactor':_0x5b364e});});};Dialer['prototype'][_0x0ead('0x1d6')]=function(_0x5a5310,_0x55e78b,_0xe0bf2c,_0x5b35a0,_0x190cad,_0x133fed){loggerPredictive[_0x0ead('0x46')]('----\x20Agent\x20Busy\x20Factor\x20----');loggerPredictive['info']('M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x5a5310);loggerPredictive[_0x0ead('0x46')](_0x0ead('0x20a'),_0x55e78b);loggerPredictive[_0x0ead('0x46')](_0x0ead('0x20b'),_0xe0bf2c);loggerPredictive[_0x0ead('0x46')](_0x0ead('0x20c'),_0x5b35a0);loggerPredictive['info'](_0x0ead('0x213'),_0x190cad);loggerPredictive['info'](_0x0ead('0x50'));return new Promise(function(_0x249157,_0x133bce){if(_0x5a5310<=0x0||isNaN(_0x5a5310)){return _0x133bce(msgResponse('[busyFactor]',_0x0ead('0x82'),_0x0ead('0x20e')+_0x5a5310));}if(_0xe0bf2c<=0x0||isNaN(_0xe0bf2c)){return _0x133bce(msgResponse(_0x0ead('0x214'),_0x0ead('0x82'),_0x0ead('0x215')+_0xe0bf2c));}if(_0x5b35a0<=0x0||isNaN(_0x5b35a0)){return _0x133bce(msgResponse('[busyFactor]',_0x0ead('0x82'),'p\x20=\x20'+_0x5b35a0));}if(_0x55e78b<=0x0||isNaN(_0x55e78b)){return _0x133bce(msgResponse('[busyFactor]',_0x0ead('0x82'),_0x0ead('0x210')+_0x55e78b));}if(_0x190cad<=0x0||isNaN(_0x190cad)){return _0x133bce(msgResponse(_0x0ead('0x214'),_0x0ead('0x82'),_0x0ead('0x216')+_0x190cad));}_0x133fed=_0x133fed||0x0;var _0x3c4ec6=0x1/_0xe0bf2c;var _0x2b0559=0x0;var _0x3b160b=0x0;var _0x1ed753=0x0;var _0xdc23f5=0x0;for(var _0x511847=0x0;_0xdc23f5<_0x190cad;_0x511847+=0x1){_0x3b160b=_0x511847/_0x55e78b;_0x2b0559=(_0x5b35a0*_0x3b160b+_0x133fed)/_0x3c4ec6;_0x1ed753=utils[_0x0ead('0x212')](_0x2b0559,_0x5a5310);_0xdc23f5=_0x2b0559/_0x5a5310*(0x1-utils['erlangb'](_0x2b0559,_0x5a5310));}return _0x249157({'erlangCalls':_0x511847,'erlangCallToSecond':_0x55e78b/_0x511847,'erlangAbandonmentRate':_0x1ed753,'erlangBusyFactor':_0xdc23f5});});};module['exports']=Dialer;
\ No newline at end of file
+var _0x776e=['XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','dialAMDMaximumWordLength','XMD-CAMPAIGNID','setXMDContactVariables','Contact','assign','callerid','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','getCallerId','dialOriginateCallerIdNumber','XMD-ORIGINATECALLERIDNAME','XMD-ORIGINATECALLERIDNUM','SIP/%s/%s%s','dialPrefix','phone','substring','dialCutDigit','from-sip','dialOriginateTimeout','OriginateError','originate\x20action\x20Error','checkRetriveMax','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','[rescheduleContact][NoAnswer]','dialBusyMaxRetry','dialBusyRetryFrequency','[rescheduleContact]\x20[Busy]','dialCongestionRetryFrequency','dialNoSuchNumberMaxRetry','[rescheduleContact][NoSuchNumber]','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','[rescheduleContact][AgentReject]','callProgressDetecting','[callProgressDetecting]','evt\x20is\x20undefine','outboundNoSuchCallsDay','NoSuchNumber','custom:agentnosuchnumber','dialNoSuchNumberRetryFrequency','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','NoAnswer','[syncAgentComplete][createHistory][3]','outboundBusyCallsDay','Busy','custom:agentbusy','busy','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','outboundCongestionCallsDay','Congestion','custom:agentcongestion','congestion','dialCongestionMaxRetry','reason\x208\x20congestion','outboundAbandonedCallsDay','reason\x2011\x20abandoned','outboundRejectCallsDay','AgentReject','custom:agentreject','agentreject','reason\x2020\x20agentreject','[syncAgentComplete][createHistory][?]','Global','[moveContactManagedDialer][0]','contact\x20not\x20moved','dialPredictiveOptimizationPercentage','round','predictiveIntervalAvailable','predictiveIntervalMinThreshold','floor','predictiveIntervalMultiplicativeFactor','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','[startMethodPredictive][StartProgressive][Loop]','dialPredictiveOptimization','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','Drop\x20in\x20this\x20interval','avgHandleTime','dialPredictiveInterval','getDataPredictive','Predictive\x20after\x20first\x20interval','recalculate\x20predictive\x20at',')\x20are\x20less\x20than\x20threshold\x20(','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20more\x20than\x20threshold\x20(','predictiveIntervalHitRate','abandonmentRate','agentBusyFactor','busyFactor','[getDataPredictive]','check\x20failure','getDataPredictiveOld','getVoiceQueueRtPauses','loggedIn','outboundQueuePauses','predictiveIntervalPauses','[CatchErlangB]','startMethodPredictive','one\x20call\x20every:','[handlePredictive]','fail\x20to\x20scheduled\x20calls','checkContactBlack','recallme','[booked][checkContactBlack]','queueStatusComplete:\x20','Queue:\x20','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','scheduledat','dialRecallMeTimeout','unlockContact','outboundReCallsDay','dialRecallInQueue','QUEUE_RECALL','RecallInQueue','RECALL_TIMEOUT','RecallFailedTimeout','[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]','outboundBlacklistCallsDay','BLACKLIST','[Originate][historyBlacklist]','inBlackList','limitCalls','getContactDialerIvr','checkContactEmpty','[getContactCampaign2][Empty]','RUNNING','ivrTotalCallsDays','[getContactCampaign2]','dialLimitQueue','not_inuse','countReScheduled','[countReScheduled]\x20','[actionOriginate]\x20','checkIsBlackList','[getContactDialer2]','tryOriginatePredictive','getContactDialer','[actionOriginatePredictive]\x20','[getContactDialerPredictive]','--------\x20Drop\x20Rate\x20--------','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[abandonmentRate]','Ts\x20=\x20','p\x20=\x20','Amax\x20=\x20','erlangb','----\x20Agent\x20Busy\x20Factor\x20----','Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','m\x20=\x20','[busyFactor]','Umin\x20=\x20','exports','util','uuid','moment','ioredis','./utils','./utils/hopper','../preview/util/util','../../../config/logger','dialer','predictive','predictiveCalls','../ami','redis','localhost','socket.io-emitter','../rpc/interval','./models/action','./models/final','./models/agentComplete','./models/hangup','env','127.0.0.1','prototype','tail','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','channels','contactsId','optionPredictive','startPredictive','ivrOriginated','queueBooked','queuesSummary','agentconnect','syncAgentConnect','bind','queuecallerabandon','originateresponse','syncOriginateResponse','agentcomplete','syncAgentComplete','syncQueueSummary','custom:queuesummarycomplete','syncNewExten','varset','syncVarSet','queuemember','syncQueueMember','loopClearZombieChannels','getSettings','then','previewRecallmeReminderInterval','isUndefined','emit','type','debug','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','inspect','format','voice:queue:%s','name','voice_queue:save','isEmpty','info','-----\x20Stats\x20Predictive\x20---','predictiveIntervalTotalCalls','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAnsweredCalls','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','---------------------------','predictiveIntervalAvgTalktime','Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','---------\x20ErlangB\x20---------','erlangCalls','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCallToSecond','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangAbandonmentRate','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','merge','getSeconds','startProgressive','startProgressive\x20value\x20cleared','startPredictive\x20value\x20cleared','handlePredictive','handlePredictive\x20interval\x20cleared','error','checkContactLowerLimitOriginate','temp','contactsRescheduled','CONTACTS_RESCHEDULED','[getContactDialer2][ReScheduled]','message','CAMPAIGN_STATUS','statedesc','endtime','starttime','queueStatusComplete','[unlockQueueStatus][undefined]','stringify','pick','Interval','NULL_INTERVAL','Intervals','\x20INTERVAL_IS_NULL','isIVRCampaignActive','INACTIVE','\x20NOT\x20Active','isIVRCampaign','campaign:save','sendMessageOneNotActive','originated','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','is\x20not\x20active','DISACTIVED','is\x20disactive','[ifTime][Action]','Error','isTrunkReachable','active','status','reachable','SIP/%s','Trunk','TrunkBackup','TRUNK_NOT_REACHABLE','\x20trunk\x20is\x20not\x20reachable','checkIfTime','ifTimeIvr','Failure','EMPTY_INTERVAL','ifTime','\x20Intervals\x20is\x20empty\x20','timezones','UNKNOWN_TIMEZONE','\x20Timezone\x20unknow\x20','isArray','length','push','Action','iftime\x20%s,%s','interval','content','indexOf','true','catch','command','all','some','OVERTIME_GLOBAL_INTERVAL','\x20Interval\x20is\x20overtime:\x20','Timezone:\x20','loopCampaigns','resetActiveCalls','syncCampaigns','undefined','resolve','checkIsTrunkReachable','dialGlobalInterval','dialTimezone','checkIfTimeIntervals','launchHandleIvr','[syncCampaigns]','dialMethod','progressive','handlePower','power','dialPowerLevel','booked','Queue','method\x20not\x20recognized','silly','Dialer::ifTime()','Voice\x20Queue\x20%s\x20$s','intervalIftime','OVERTIME_INTERVAL','Global:\x20','Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:','isGlobal','queue','uniqueId','uniqueid','ivr','updateOriginated','answertime','YYYY-MM-DD\x20HH:mm:ss','outboundAnswerCallsDay','reason','agent','agiafterat','createHistory','[syncAgentComplete][createHistory]','moveContactManagedDialer','[syncAgentComplete]','syncQueueCallerAbandon','droptime','responsetime','dialQueueTimeout','outboundDropCallsDayTimeout','predictiveIntervalErlangCallsDroppedCalls','Drop','dropreason','TIMEOUT','dialQueueProject2','dialDropRetryFrequency','verifyAdditionalPhones','state','voiceQueue','additional','countdropretry','dialDropMaxRetry','queueCallerAbandonCreateState','rescheduleContact','add','ContactId','VoiceQueueId','[rescheduleContact][Drop]','calleridname','calleridnum','swapAdditionalPhones','outboundDropCallsDayCallersExit','Abandoned','CALLEREXIT','countabandonedretry','countglobal','dialAbandonedRetryFrequency','callAdditionalPhoneAfterMin','dialAbandonedMaxRetry','minutes','ListId','CampaignId','[rescheduleContact][Abandoned]','[syncAgentComplete][createHistory][11]','actions','channel','actionid','roundrobin','stateinterface','locked','rrmemory','isNil','idHopper','paused','syncQueueStatusComplete','strategy','preview','run','[Catch][Preview][syncQueueStatusComplete]','finally','queueBookedRR','_rr','unlockRR','Agent:\x20','contactAgent-idHopper:\x20','[booked][RR][finaly]','[unlock][syncQueueStatusComplete]','[booked][unlock2]','[unlock2][syncQueueStatusComplete]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','getQueue','Success','[callProgressDetecting]\x20','variable','amdstatus','exten','dialAMDActive','value','outboundAnswerAgiCallsDay','HangupInAMD','membername','AMD','saveInDb','[syncHangupInAMD][createHistory]','[syncHangupInAMD]','MACHINE','Machine','countmachineretry','buildObj','amd','[syncAgentComplete][createHistory][0]','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countagentrejectretry','stateGlobal','reason19\x20machine....','createStateFinal','reason\x2019\x20machine....','[rescheduleContact][Machine]','custom:amd','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','dialGlobalMaxRetry','dialMachineMaxRetry','syncHangup','[syncHangupIvr][createHistory]','[syncHangupIvr]','dialQueueProject','AGI','cause-txt','Normal\x20Clearing','outboundUnknownCallsDay','Unknow','running','isPreviewCampaign','getQueueCampaignStatusMessage','statusMessage','available','inUse','talking','pTalking','ACTIVE','[syncQueueSummary]','compareToOutboundQueue','queueSummaryCountersUpdated','updateReportFromOutboundQueue','syncQueueSummaryComplete','filter','online','handlePreviewRecallNotifications','Agent','user:%s','user:dialPreviewRecallReminder','checkPreviewRecallReminder','clearZombieChannels','[actions]','sequence','enqueue','No\x20such\x20channel','[Dialer][checkChannel]','[getVoiceQueueRtPauses]\x20','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','loggerHandler','emptyContact','notFound','UserId','[emptyContact]','[syncQueueCallerAbandon]\x20[Drop]','handleIvr','actionOriginate','object','originate','voiceQueue\x20is\x20undefine','contact\x20is\x20undefine','getCaller','\x22agi://%s/square,%s\x22','NONE','isOutboundQueue','\x22%s,%s%s,,,%s\x22','dialQueueOptions','xcally-motion-dialer','XMD-AMDINITIALSILENCE','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDGreeting','XMD-AMDAFTERGREETINGSILENCE','dialAMDAfterGreetingSilence','XMD-AMDTOTALANALYSISTIME','XMD-AMDMINWORDLENGTH','dialAMDBetweenWordsSilence'];(function(_0x3ae9e5,_0x2464b9){var _0x5204d0=function(_0x256a32){while(--_0x256a32){_0x3ae9e5['push'](_0x3ae9e5['shift']());}};_0x5204d0(++_0x2464b9);}(_0x776e,0xaa));var _0xe776=function(_0x5991ab,_0x238ed5){_0x5991ab=_0x5991ab-0x0;var _0x587674=_0x776e[_0x5991ab];return _0x587674;};'use strict';var util=require(_0xe776('0x0'));var _=require('lodash');var uuid=require(_0xe776('0x1'));var moment=require(_0xe776('0x2'));var rr=require('rr');var Redis=require(_0xe776('0x3'));var utils=require(_0xe776('0x4'));var hopperUtils=require(_0xe776('0x5'));var ut=require(_0xe776('0x6'));var config=require('../../../config/environment/');var logger=require(_0xe776('0x7'))(_0xe776('0x8'));var loggerBooked=require(_0xe776('0x7'))('booked');var loggerPredictive=require(_0xe776('0x7'))(_0xe776('0x9'));var loggerPredictiveCalls=require('../../../config/logger')(_0xe776('0xa'));var loggerSyncQueueSummary=require(_0xe776('0x7'))('syncQueueSummary');var ami=require(_0xe776('0xb'));config[_0xe776('0xc')]=_['defaults'](config[_0xe776('0xc')],{'host':_0xe776('0xd'),'port':0x18eb});var io=require(_0xe776('0xe'))(new Redis(config[_0xe776('0xc')]));var cmHopper=require('../rpc/cmHopper');var voiceQueueRt=require('../rpc/voiceQueueRt');var RpcSetting=require('../rpc/setting');var Interval=require(_0xe776('0xf'));var Action=require(_0xe776('0x10'));var History=require('./models/history');var Final=require(_0xe776('0x11'));var AgentComplete=require(_0xe776('0x12'));var QueueCallerAbandon=require('./models/queueCallerAbandon');var Hangup=require(_0xe776('0x13'));var ipAgi=process[_0xe776('0x14')]['XCALLY_IP_AGI']||_0xe776('0x15');var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence[_0xe776('0x16')]['enqueue']=function(_0x45312f){this['tail']=this['tail']?this[_0xe776('0x17')]['finally'](_0x45312f):_0x45312f();};function Dialer(_0x1f564d,_0x280344){this['sequence']=new Sequence();this['preview']=_0x280344;this[_0xe776('0x18')]=_0x1f564d[_0xe776('0x18')];this[_0xe776('0x19')]=_0x1f564d[_0xe776('0x19')];this[_0xe776('0x1a')]=_0x1f564d[_0xe776('0x1a')];this['trunks']=_0x1f564d[_0xe776('0x1b')];this[_0xe776('0x1c')]=config[_0xe776('0x1c')]||0x2;this[_0xe776('0x1d')]={};this['actions']={};this[_0xe776('0x1e')]={};this['uniqueId']={};this[_0xe776('0x1f')]={};this[_0xe776('0x20')]={};this['startProgressive']={};this[_0xe776('0x21')]={};this[_0xe776('0x22')]={};this['queueBookedRR']={};this[_0xe776('0x23')]={};ami['on'](_0xe776('0x24'),this[_0xe776('0x25')][_0xe776('0x26')](this));ami['on'](_0xe776('0x27'),this['syncQueueCallerAbandon']['bind'](this));ami['on'](_0xe776('0x28'),this[_0xe776('0x29')]['bind'](this));ami['on'](_0xe776('0x2a'),this[_0xe776('0x2b')]['bind'](this));ami['on']('custom:queuesummary',this[_0xe776('0x2c')][_0xe776('0x26')](this));ami['on'](_0xe776('0x2d'),this['syncQueueSummaryComplete'][_0xe776('0x26')](this));ami['on']('hangup',this['syncHangup'][_0xe776('0x26')](this));ami['on']('newexten',this[_0xe776('0x2e')][_0xe776('0x26')](this));ami['on'](_0xe776('0x2f'),this[_0xe776('0x30')][_0xe776('0x26')](this));ami['on'](_0xe776('0x31'),this[_0xe776('0x32')]['bind'](this));ami['on']('queuestatuscomplete',this['syncQueueStatusComplete']['bind'](this));this['loopCampaigns']();this[_0xe776('0x33')]();RpcSetting[_0xe776('0x34')]()[_0xe776('0x35')](function(_0x3c7eba){previewRecallmeReminderInterval=_0x3c7eba[_0xe776('0x36')];});}function isNotNull(_0xf682a8){return _0xf682a8!==null&&!_[_0xe776('0x37')](_0xf682a8);}function msgResponse(_0x158d07,_0x3443f7,_0x3c3af8){return{'action':_0x158d07,'response':_0x3443f7,'message':_0x3c3af8,'stack':_0x3c3af8};}function emit(_0x4d1844,_0x2646f3,_0x2d9311){io['to'](_0x4d1844)[_0xe776('0x38')](_0x2646f3,_0x2d9311);}function emitOutboundVoiceQueueSummary(_0x20f637){if(_0x20f637[_0xe776('0x39')]==='outbound'){logger[_0xe776('0x3a')](_0xe776('0x3b'),util[_0xe776('0x3c')](_0x20f637,{'showHidden':![],'depth':null}));emit(util[_0xe776('0x3d')](_0xe776('0x3e'),_0x20f637[_0xe776('0x3f')]),_0xe776('0x40'),_0x20f637);}}function checkGetDataPredictive(_0x222124){if(isNotNull(_0x222124)&&!_[_0xe776('0x41')](_0x222124)){loggerPredictive[_0xe776('0x42')](_0xe776('0x43'));loggerPredictive[_0xe776('0x42')]('Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x222124[_0xe776('0x44')]);loggerPredictive[_0xe776('0x42')](_0xe776('0x45'),_0x222124[_0xe776('0x46')]);loggerPredictive[_0xe776('0x42')](_0xe776('0x47'),_0x222124[_0xe776('0x48')]);loggerPredictive[_0xe776('0x42')]('Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x222124[_0xe776('0x49')]);loggerPredictive[_0xe776('0x42')]('AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x222124[_0xe776('0x4a')]);loggerPredictive[_0xe776('0x42')](_0xe776('0x4b'),_0x222124['predictiveIntervalAvgTalktime']);loggerPredictive[_0xe776('0x42')](_0xe776('0x4c'));if(_0x222124[_0xe776('0x44')]>0x0){if(!_['isUndefined'](_0x222124['predictiveIntervalAvgTalktime'])&&_0x222124[_0xe776('0x4d')]>0x0){return!![];}loggerPredictive[_0xe776('0x42')](_0xe776('0x4e'));if(!_[_0xe776('0x37')](_0x222124[_0xe776('0x4a')])&&_0x222124['predictiveIntervalAvgHoldtime']>0x0){return!![];}loggerPredictive[_0xe776('0x42')](_0xe776('0x4f'));}else{loggerPredictive['info'](_0xe776('0x50'));}}else{loggerPredictive[_0xe776('0x42')]('History\x20information\x20are\x20empty');}return![];}function mergeDataErlangB(_0x6f8c04){return function(_0x56a04a){loggerPredictive[_0xe776('0x42')](_0xe776('0x51'));loggerPredictive[_0xe776('0x42')]('Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x56a04a[_0xe776('0x52')]);loggerPredictive[_0xe776('0x42')](_0xe776('0x53'),_0x56a04a[_0xe776('0x54')]);loggerPredictive['info'](_0xe776('0x55'),_0x56a04a[_0xe776('0x56')]);loggerPredictive[_0xe776('0x42')](_0xe776('0x57'),_0x56a04a['erlangBusyFactor']);loggerPredictive[_0xe776('0x42')]('Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x56a04a[_0xe776('0x56')]);loggerPredictive[_0xe776('0x42')](_0xe776('0x4c'));_[_0xe776('0x58')](_0x6f8c04,_0x56a04a);};}function ifInterval(_0x49bb9b,_0x6a6d0b){if(_[_0xe776('0x37')](_0x6a6d0b)){return![];}return utils[_0xe776('0x59')](undefined,_0x6a6d0b)<_0x49bb9b*0x3c;}function clearPredictiveAttributes(_0xf27bc5){if(_0xf27bc5[_0xe776('0x5a')]){_0xf27bc5[_0xe776('0x5a')]=undefined;loggerPredictive['debug'](_0xf27bc5[_0xe776('0x3f')],_0xe776('0x5b'));}if(_0xf27bc5[_0xe776('0x20')]){_0xf27bc5[_0xe776('0x20')]=undefined;loggerPredictive[_0xe776('0x3a')](_0xf27bc5[_0xe776('0x3f')],_0xe776('0x5c'));}if(_0xf27bc5['handlePredictive']){clearInterval(_0xf27bc5[_0xe776('0x5d')]);_0xf27bc5[_0xe776('0x5d')]=undefined;loggerPredictive[_0xe776('0x3a')](_0xf27bc5[_0xe776('0x3f')],_0xe776('0x5e'));}}function loggerCatchPredictive(_0x129eac,_0x268ae4){return function(_0x9360cf){loggerPredictive[_0xe776('0x5f')](_0x268ae4['name'],_0x129eac);loggerPredictive[_0xe776('0x5f')](_0x9360cf['stack']);clearPredictiveAttributes(_0x268ae4);};}function loggerCatch(_0x353374){return function(_0x3fa6c5){logger[_0xe776('0x5f')](_0x353374,util[_0xe776('0x3c')](_0x3fa6c5,{'showHidden':![],'depth':null}));};}function loggerGetContactDialer(_0x321442,_0x2039f6,_0x15a8c5){return function(_0x26e117){utils[_0xe776('0x60')](_0x2039f6,_0x15a8c5,0x0);_0x2039f6[_0xe776('0x61')]=0x0;logger['error'](_0x321442,util['inspect'](_0x26e117,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x2e8364){return function(_0x61f30){if(isNotNull(_0x61f30)&&isNotNull(_0x61f30[0x0])){if(_0x61f30[0x0][_0xe776('0x62')]>0x0){_0x2e8364['message']=utils['CAMPAIGN_STATUS'][_0xe776('0x63')];logger[_0xe776('0x42')](_0xe776('0x64')+_0x2e8364[_0xe776('0x3f')],_0x61f30[0x0][_0xe776('0x62')],'contacts');}else{_0x2e8364[_0xe776('0x65')]=utils[_0xe776('0x66')]['NO_AVAILABLE_CONTACTS'];logger['info']('[getContactDialer2][Empty]'+_0x2e8364[_0xe776('0x3f')]);}}};}function createObjHistory(_0x59c593,_0x18c965,_0x46e9ae,_0x5ec405,_0x5f5cbe){_0x59c593['message']=_0x46e9ae;var _0x5b1a82=new Action(_0x59c593,_0x18c965);var _0x2df9f1=new History(_0x5b1a82);_0x2df9f1['state']=_0x5ec405;_0x2df9f1[_0xe776('0x67')]=_0x5f5cbe;_0x2df9f1[_0xe776('0x68')]=_0x5b1a82[_0xe776('0x69')];return _0x2df9f1;}function unlockQueueStatus(_0x1e0679,_0x1b91f7){setTimeout(function(){if(_['isUndefined'](_0x1e0679[_0xe776('0x6a')])){loggerBooked['error'](_0xe776('0x6b'),_0x1b91f7);}_0x1e0679[_0xe776('0x6a')]=!![];loggerBooked[_0xe776('0x42')]('[booked][unlockQueueStatus]',_0x1b91f7,JSON[_0xe776('0x6c')](_[_0xe776('0x6d')](_0x1e0679,[_0xe776('0x3f'),_0xe776('0x6a')])));},0x1f3);}function checkInterval(_0x22a13d){return function(){if(!isNotNull(_0x22a13d[_0xe776('0x6e')])){_0x22a13d[_0xe776('0x65')]=utils['CAMPAIGN_STATUS'][_0xe776('0x6f')];throw _0x22a13d['name']+'\x20INTERVAL_IS_NULL';}if(!isNotNull(_0x22a13d[_0xe776('0x6e')][_0xe776('0x70')])){_0x22a13d[_0xe776('0x65')]=utils['CAMPAIGN_STATUS'][_0xe776('0x6f')];throw _0x22a13d[_0xe776('0x3f')]+_0xe776('0x71');}if(!isNotNull(_[_0xe776('0x41')](_0x22a13d['Interval'][_0xe776('0x70')]))){_0x22a13d[_0xe776('0x65')]=utils[_0xe776('0x66')][_0xe776('0x6f')];throw _0x22a13d[_0xe776('0x3f')]+_0xe776('0x71');}};}function checkIsIVRCampaignActive(_0x2df654){return function(){if(!utils[_0xe776('0x72')](_0x2df654)){_0x2df654[_0xe776('0x65')]=utils[_0xe776('0x66')][_0xe776('0x73')];throw _0x2df654[_0xe776('0x3f')]+_0xe776('0x74');}};}function emitCampaignSummary(_0xbf3803){if(utils[_0xe776('0x75')](_0xbf3803)){emit(util[_0xe776('0x3d')]('campaign:ivr:%s',_0xbf3803[_0xe776('0x3f')]),_0xe776('0x76'),_0xbf3803);}}function loggerCatchQueueSummary(_0x208a33,_0x4136b9){return function(_0x2ed847){clearPredictiveAttributes(_0x4136b9);emitCampaignSummary(_0x4136b9);loggerSyncQueueSummary['debug'](_0x208a33,util[_0xe776('0x3c')](_0x2ed847,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x154011){if(_0x154011[_0xe776('0x77')]){if(_0x154011[_0xe776('0x78')]===0x0){_0x154011['sendMessageOneNotActive']=![];_0x154011['message']=utils['CAMPAIGN_STATUS']['INACTIVE'];loggerSyncQueueSummary[_0xe776('0x3a')](_0xe776('0x79'),_0x154011[_0xe776('0x3f')],_0xe776('0x7a'));}else{_0x154011['message']=utils['CAMPAIGN_STATUS'][_0xe776('0x7b')];loggerSyncQueueSummary[_0xe776('0x3a')](_0xe776('0x79'),_0x154011['name'],_0xe776('0x7c'));}emitCampaignSummary(_0x154011);}}function myreject(_0x103ac8){return function(_0x580082){return _0x103ac8(msgResponse(_0xe776('0x7d'),_0xe776('0x7e'),JSON['stringify'](_0x580082)));};}Dialer[_0xe776('0x16')][_0xe776('0x7f')]=function(_0x43864d){return!_[_0xe776('0x37')](_0x43864d)&&_0x43864d&&!_[_0xe776('0x37')](_0x43864d[_0xe776('0x3f')])&&!_[_0xe776('0x37')](_0x43864d[_0xe776('0x80')])&&_0x43864d['active']&&(this[_0xe776('0x1b')][util['format']('SIP/%s',_0x43864d['name'])][_0xe776('0x81')]===_0xe776('0x82')||this[_0xe776('0x1b')][util[_0xe776('0x3d')](_0xe776('0x83'),_0x43864d[_0xe776('0x3f')])][_0xe776('0x81')]==='unmonitored');};Dialer[_0xe776('0x16')]['checkIsTrunkReachable']=function(_0x44d016){var _0x1a5b2f=this;return function(){if(!_0x1a5b2f[_0xe776('0x7f')](_0x44d016[_0xe776('0x84')])){if(!_0x1a5b2f['isTrunkReachable'](_0x44d016[_0xe776('0x85')])){_0x44d016[_0xe776('0x65')]=utils['CAMPAIGN_STATUS'][_0xe776('0x86')];throw _0x44d016['name']+_0xe776('0x87');}}};};Dialer[_0xe776('0x16')][_0xe776('0x88')]=function(_0x480f5a,_0x16a684,_0x525b93,_0x5463b4){var _0x7d125d=this;return function(){var _0x54f0b2=!![];return _0x7d125d[_0xe776('0x89')](_0x480f5a,_0x16a684,_0x525b93,_0x5463b4,_0x54f0b2);};};Dialer[_0xe776('0x16')]['checkIfTimeIntervals']=function(_0x394307,_0x23c8a5,_0x31977c,_0x503dbb){var _0x10f5b0=this;return function(){var _0x3da6fa=![];return _0x10f5b0['ifTimeIvr'](_0x394307['Intervals'],_0x23c8a5,_0x31977c,_0x503dbb,_0x3da6fa);};};Dialer[_0xe776('0x16')][_0xe776('0x89')]=function(_0x40c3e5,_0x3f528f,_0xc91451,_0x572154,_0x3067bf){var _0x1843de=[];return new Promise(function(_0x3f6823,_0x6756e7){if(!isNotNull(_0x40c3e5)){_0x572154[_0xe776('0x65')]=utils[_0xe776('0x66')][_0xe776('0x6f')];return _0x6756e7(msgResponse('ifTime',_0xe776('0x8a'),_0xc91451+'\x20Intervals\x20is\x20null\x20'));}if(_[_0xe776('0x41')](_0x40c3e5)){_0x572154[_0xe776('0x65')]=utils[_0xe776('0x66')][_0xe776('0x8b')];return _0x6756e7(msgResponse(_0xe776('0x8c'),_0xe776('0x8a'),_0xc91451+_0xe776('0x8d')));}if(_0x3f528f&&_['isUndefined'](config[_0xe776('0x8e')][_0x3f528f])){_0x572154[_0xe776('0x65')]=utils[_0xe776('0x66')][_0xe776('0x8f')];return _0x6756e7(msgResponse(_0xe776('0x8c'),_0xe776('0x8a'),_0xc91451+_0xe776('0x90')+_0x3f528f));}if(_[_0xe776('0x91')](_0x40c3e5)){for(var _0x4ad277=0x0;_0x4ad277<_0x40c3e5[_0xe776('0x92')];_0x4ad277+=0x1){_0x1843de[_0xe776('0x93')](ami[_0xe776('0x94')]({'action':'command','command':util[_0xe776('0x3d')](_0xe776('0x95'),_0x40c3e5[_0x4ad277][_0xe776('0x96')],!_[_0xe776('0x37')](config[_0xe776('0x8e')][_0x3f528f])?_0x3f528f:'')})['then'](function(_0x321aa2){return _0x321aa2[_0xe776('0x97')][_0xe776('0x98')](_0xe776('0x99'))>=0x0;})[_0xe776('0x9a')](myreject(_0x6756e7)));}}else{_0x1843de[_0xe776('0x93')](ami['Action']({'action':_0xe776('0x9b'),'command':util[_0xe776('0x3d')]('iftime\x20%s,%s',_0x40c3e5,!_[_0xe776('0x37')](config[_0xe776('0x8e')][_0x3f528f])?_0x3f528f:'')})[_0xe776('0x35')](function(_0x5396a3){return _0x5396a3[_0xe776('0x97')][_0xe776('0x98')]('true')>=0x0;})[_0xe776('0x9a')](myreject(_0x6756e7)));}Promise[_0xe776('0x9c')](_0x1843de)['then'](function(_0x232845){var _0x39db4c=_[_0xe776('0x9d')](_0x232845);if(_0x39db4c){return _0x3f6823(_0x39db4c);}else{_0x572154[_0xe776('0x65')]=_0x3067bf?utils['CAMPAIGN_STATUS'][_0xe776('0x9e')]:utils[_0xe776('0x66')]['OVERTIME_INTERVAL'];return _0x6756e7(msgResponse('[ifTime][promiseAll]',_0xe776('0x8a'),'Global:\x20'+_0x3067bf+'\x20'+_0xc91451+_0xe776('0x9f')+util[_0xe776('0x3c')](_0x40c3e5,{'showHidden':![],'depth':null})+_0xe776('0xa0')+_0x3f528f));}})[_0xe776('0x9a')](function(_0x25a8d4){return _0x6756e7(msgResponse(_0xe776('0x8c'),_0xe776('0x8a'),JSON[_0xe776('0x6c')](_0x25a8d4)));});});};Dialer[_0xe776('0x16')][_0xe776('0xa1')]=function(){var _0x1a9844=this;return cmHopper[_0xe776('0xa2')]({'active':![]},{'where':{'active':!![]}})[_0xe776('0x35')](function(){setInterval(function(){_0x1a9844[_0xe776('0xa3')]();},0x3e8);});};Dialer[_0xe776('0x16')][_0xe776('0xa3')]=function(){var _0x17187b=this;var _0x4c87e8;for(var _0x285c74 in this[_0xe776('0x19')]){if(typeof this['campaigns'][_0x285c74]!==_0xe776('0xa4')){_0x4c87e8=this[_0xe776('0x19')][_0x285c74];if(utils['isIVRCampaign'](_0x4c87e8)&&utils[_0xe776('0x72')](_0x4c87e8)){_0x4c87e8[_0xe776('0x77')]=!![];Promise[_0xe776('0xa5')]()[_0xe776('0x35')](checkIsIVRCampaignActive(_0x4c87e8))['then'](checkInterval(_0x4c87e8))[_0xe776('0x35')](_0x17187b[_0xe776('0xa6')](_0x4c87e8))[_0xe776('0x35')](_0x17187b['checkIfTime'](_0x4c87e8[_0xe776('0xa7')],_0x4c87e8[_0xe776('0xa8')],_0x4c87e8['name'],_0x4c87e8))[_0xe776('0x35')](_0x17187b[_0xe776('0xa9')](_0x4c87e8[_0xe776('0x6e')],_0x4c87e8[_0xe776('0xa8')],_0x4c87e8[_0xe776('0x3f')],_0x4c87e8))[_0xe776('0x35')](_0x17187b[_0xe776('0xaa')](_0x4c87e8))[_0xe776('0x9a')](loggerCatchQueueSummary(_0xe776('0xab'),_0x4c87e8));}else{notSendMessagesCampaign(_0x4c87e8);}}}};Dialer[_0xe776('0x16')]['checkDialMethod']=function(_0x3bc24a){if(_0x3bc24a[_0xe776('0xac')]!==_0xe776('0x9')){clearPredictiveAttributes(_0x3bc24a);}switch(_0x3bc24a['dialMethod']){case _0xe776('0xad'):this[_0xe776('0xae')](_0x3bc24a,0x1);break;case _0xe776('0xaf'):this[_0xe776('0xae')](_0x3bc24a,_0x3bc24a[_0xe776('0xb0')]);break;case _0xe776('0x9'):this[_0xe776('0x9')](_0x3bc24a);break;case _0xe776('0xb1'):this[_0xe776('0xae')](_0x3bc24a,0x1);break;default:logger['error'](_0xe776('0xb2'),_0x3bc24a[_0xe776('0x3f')],_0xe776('0xb3'));}};Dialer[_0xe776('0x16')]['ifTime']=function(_0x2cad17,_0x266efe){var _0xaf7fca=_0x2cad17['dialTimezone'];var _0x49c181=_0x266efe?_0x2cad17[_0xe776('0xa7')]:_0x2cad17[_0xe776('0x6e')]['Intervals'];logger[_0xe776('0xb4')](_0xe776('0xb5'),_0x49c181,_0xaf7fca,_0x2cad17[_0xe776('0x3f')],util[_0xe776('0x3d')](_0xe776('0xb6'),_0x2cad17[_0xe776('0x3f')],_0x2cad17['id']));var _0x5331d3=null;return Interval[_0xe776('0xb7')](_0x49c181,_0xaf7fca)[_0xe776('0x35')](function(_0x21f40f){if(_0x21f40f===!![]){return _0x21f40f;}else{_0x2cad17[_0xe776('0x65')]=_0x266efe?utils[_0xe776('0x66')][_0xe776('0x9e')]:utils[_0xe776('0x66')][_0xe776('0xb8')];_0x5331d3=msgResponse('[ifTime][promiseAll]',_0xe776('0x8a'),_0xe776('0xb9')+_0x266efe+'\x20'+_0x2cad17[_0xe776('0x3f')]+_0xe776('0x9f')+util[_0xe776('0x3c')](_0x49c181,{'showHidden':![],'depth':null})+_0xe776('0xa0')+_0xaf7fca);}if(_0x5331d3!==null){logger[_0xe776('0xb4')](_0xe776('0xba'),_0x5331d3);_0x5331d3[_0xe776('0xbb')]=_0x266efe;throw _0x5331d3;}})[_0xe776('0x9a')](function(_0x4df2cf){logger['error']('AMI\x20IfTime',_0x4df2cf);throw msgResponse(_0xe776('0x7d'),'Error',util['inspect'](_0x4df2cf,{'showHidden':![],'depth':null}));});};Dialer[_0xe776('0x16')]['syncAgentConnect']=function(_0x31c405){if(this[_0xe776('0x18')][_0x31c405[_0xe776('0xbc')]]){if(this[_0xe776('0xbd')][_0x31c405[_0xe776('0xbe')]]&&this[_0xe776('0xbd')][_0x31c405[_0xe776('0xbe')]][_0xe776('0x39')]!==_0xe776('0xbf')){this[_0xe776('0xc0')](this[_0xe776('0x18')][_0x31c405[_0xe776('0xbc')]]);this[_0xe776('0xbd')][_0x31c405[_0xe776('0xbe')]][_0xe776('0xc1')]=moment()[_0xe776('0x3d')](_0xe776('0xc2'));}}};Dialer[_0xe776('0x16')][_0xe776('0x2b')]=function(_0x3b5217){var _0x3b8277=this[_0xe776('0xbd')][_0x3b5217['uniqueid']];if(this[_0xe776('0x18')][_0x3b5217['queue']]){if(_0x3b8277&&_0x3b8277[_0xe776('0x39')]!==_0xe776('0xbf')){delete this['uniqueId'][_0x3b5217[_0xe776('0xbe')]];this[_0xe776('0x18')][_0x3b5217[_0xe776('0xbc')]][_0xe776('0xc3')]+=0x1;var _0x5c283e=new AgentComplete(_0x3b8277,_0x3b5217);if(_0x3b5217[_0xe776('0xc4')]===_0xe776('0xc5')){_0x5c283e[_0xe776('0xc6')]=this[_0xe776('0x18')][_0x3b5217[_0xe776('0xbc')]]['dialQueueProject2']&&this[_0xe776('0x18')][_0x3b5217[_0xe776('0xbc')]]['dialAgiAfterHangupAgent']?moment()['format']('YYYY-MM-DD\x20HH:mm:ss'):undefined;}hopperUtils[_0xe776('0xc7')](_0x5c283e)[_0xe776('0x9a')](loggerCatch(_0xe776('0xc8')));hopperUtils[_0xe776('0xc9')](_0x5c283e)['catch'](loggerCatch(_0xe776('0xca')));}}};Dialer[_0xe776('0x16')][_0xe776('0xcb')]=function(_0x5160cf){var _0x551c08=this['uniqueId'][_0x5160cf[_0xe776('0xbe')]];var _0x3a76d3=this;var _0xb08c2f=![];var _0x2b6ea6;var _0x13f570;if(this[_0xe776('0x18')][_0x5160cf[_0xe776('0xbc')]]){if(_0x551c08&&_0x551c08[_0xe776('0x39')]!=='ivr'){delete this[_0xe776('0xbd')][_0x5160cf[_0xe776('0xbe')]];this[_0xe776('0xc0')](this[_0xe776('0x18')][_0x5160cf[_0xe776('0xbc')]]);_0x551c08[_0xe776('0xcc')]=moment()[_0xe776('0x3d')](_0xe776('0xc2'));var _0x5844ad=new QueueCallerAbandon(_0x551c08,_0x5160cf);if(utils[_0xe776('0x59')](_0x551c08['droptime'],_0x551c08[_0xe776('0xcd')])>=_0x551c08[_0xe776('0xce')]){this[_0xe776('0x18')][_0x5160cf['queue']][_0xe776('0x48')]+=0x1;this[_0xe776('0x18')][_0x5160cf[_0xe776('0xbc')]][_0xe776('0xcf')]+=0x1;this[_0xe776('0x18')][_0x5160cf['queue']][_0xe776('0xd0')]+=0x1;_0x5844ad['state']=0xa;_0x5844ad[_0xe776('0x67')]=_0xe776('0xd1');_0x5844ad[_0xe776('0xd2')]=_0xe776('0xd3');_0x5844ad[_0xe776('0xc6')]=this[_0xe776('0x18')][_0x5160cf[_0xe776('0xbc')]][_0xe776('0xd4')]?moment()[_0xe776('0x3d')]('YYYY-MM-DD\x20HH:mm:ss'):undefined;_0x5844ad['countdropretry']+=0x1;_0x5844ad['countglobal']+=0x1;_0x2b6ea6=this['voiceQueues'][_0x5160cf[_0xe776('0xbc')]][_0xe776('0xd5')];_0x13f570=this['voiceQueues'][_0x5160cf[_0xe776('0xbc')]]['callAdditionalPhoneAfterMin'];hopperUtils[_0xe776('0xd6')](_0x5844ad,_0x5844ad[_0xe776('0xd7')],_0x551c08[_0xe776('0xd8')])[_0xe776('0x35')](function(_0x3aaed5){_0xb08c2f=_0x3aaed5[_0xe776('0xd9')]==0x1;if(_0x5844ad[_0xe776('0xda')]>=_0x3a76d3['voiceQueues'][_0x5160cf[_0xe776('0xbc')]][_0xe776('0xdb')]){_0x3a76d3[_0xe776('0xdc')](_0x5844ad,_0x3aaed5[_0xe776('0xd9')]);}else{hopperUtils[_0xe776('0xdd')]({'active':![],'countdropretry':_0x5844ad[_0xe776('0xda')],'scheduledat':moment()[_0xe776('0xde')](_0x3a76d3[_0xe776('0x18')][_0x5160cf[_0xe776('0xbc')]][_0xe776('0xd5')],'minutes')[_0xe776('0x3d')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x551c08[_0xe776('0xdf')],'ListId':_0x551c08['ListId'],'VoiceQueueId':_0x551c08[_0xe776('0xe0')]||undefined,'CampaignId':_0x551c08['CampaignId']||undefined})[_0xe776('0x9a')](loggerCatch(_0xe776('0xe1')));var _0x1f5814=new History(_0x5844ad);_0x1f5814['state']=0xa;_0x1f5814[_0xe776('0x67')]=_0xe776('0xd1');_0x1f5814[_0xe776('0x69')]=moment()[_0xe776('0x3d')]('YYYY-MM-DD\x20HH:mm:ss');_0x1f5814[_0xe776('0x68')]=_0x1f5814['starttime'];_0x1f5814['calleridname']=_0x5844ad[_0xe776('0xe2')];_0x1f5814['calleridnum']=_0x5844ad[_0xe776('0xe3')];hopperUtils['createHistory'](_0x1f5814)[_0xe776('0x9a')](loggerCatch('[syncAgentComplete][createHistory][10]'));}})['then'](function(){if(_0xb08c2f)hopperUtils[_0xe776('0xe4')](_0x5844ad,_0x2b6ea6,_0x13f570)[_0xe776('0x35')](function(){return 0x1;});});}else{this[_0xe776('0x18')][_0x5160cf[_0xe776('0xbc')]][_0xe776('0x49')]+=0x1;this[_0xe776('0x18')][_0x5160cf[_0xe776('0xbc')]][_0xe776('0xe5')]+=0x1;_0x5844ad['state']=0xb;_0x5844ad[_0xe776('0x67')]=_0xe776('0xe6');_0x5844ad['dropreason']=_0xe776('0xe7');_0x5844ad[_0xe776('0xe8')]+=0x1;_0x5844ad[_0xe776('0xe9')]+=0x1;_0x2b6ea6=this[_0xe776('0x18')][_0x5160cf['queue']][_0xe776('0xea')];_0x13f570=this[_0xe776('0x18')][_0x5160cf[_0xe776('0xbc')]][_0xe776('0xeb')];hopperUtils[_0xe776('0xd6')](_0x5844ad,_0x5844ad['state'],_0x551c08[_0xe776('0xd8')])['then'](function(_0x1ecc0f){if(_0x5844ad[_0xe776('0xe8')]>=_0x3a76d3[_0xe776('0x18')][_0x5160cf[_0xe776('0xbc')]][_0xe776('0xec')]){_0x3a76d3['queueCallerAbandonCreateState'](_0x5844ad,_0x1ecc0f['additional']);}else{hopperUtils[_0xe776('0xdd')]({'active':![],'countabandonedretry':_0x5844ad[_0xe776('0xe8')],'scheduledat':moment()[_0xe776('0xde')](_0x3a76d3[_0xe776('0x18')][_0x5160cf[_0xe776('0xbc')]][_0xe776('0xea')],_0xe776('0xed'))[_0xe776('0x3d')](_0xe776('0xc2')),'ContactId':_0x551c08[_0xe776('0xdf')],'ListId':_0x551c08[_0xe776('0xee')],'VoiceQueueId':_0x551c08['VoiceQueueId']||undefined,'CampaignId':_0x551c08[_0xe776('0xef')]||undefined})[_0xe776('0x9a')](loggerCatch(_0xe776('0xf0')));var _0x55198c=new History(_0x5844ad);_0x55198c['state']=0xb;_0x55198c[_0xe776('0x67')]='Abandoned';_0x55198c['starttime']=moment()[_0xe776('0x3d')](_0xe776('0xc2'));_0x55198c[_0xe776('0x68')]=_0x55198c['starttime'];_0x55198c[_0xe776('0xe2')]=_0x5844ad[_0xe776('0xe2')];_0x55198c[_0xe776('0xe3')]=_0x5844ad[_0xe776('0xe3')];hopperUtils['createHistory'](_0x55198c)[_0xe776('0x9a')](loggerCatch(_0xe776('0xf1')));}})[_0xe776('0x35')](function(){if(_0xb08c2f)hopperUtils[_0xe776('0xe4')](_0x5844ad,_0x2b6ea6,_0x13f570)['then'](function(){return 0x1;});});}}}};Dialer[_0xe776('0x16')][_0xe776('0x2e')]=function(_0x59c4e0){if(this[_0xe776('0xf2')][_0x59c4e0[_0xe776('0xbe')]]){this[_0xe776('0xf2')][_0x59c4e0[_0xe776('0xbe')]]['channel']=_0x59c4e0[_0xe776('0xf3')];}if(this[_0xe776('0xbd')][_0x59c4e0[_0xe776('0xbe')]]){this[_0xe776('0xbd')][_0x59c4e0[_0xe776('0xbe')]][_0xe776('0xf3')]=_0x59c4e0['channel'];}};Dialer['prototype']['syncQueueMember']=function(_0x459ef0){if(!this['actions'][_0x459ef0[_0xe776('0xf4')]]){return;}var _0x30e5d9=this[_0xe776('0x18')][this[_0xe776('0xf2')][_0x459ef0[_0xe776('0xf4')]][_0xe776('0xbc')]]['strategy']||'rrmemory';if(_0x30e5d9===_0xe776('0xf5')){if(this[_0xe776('0xf2')][_0x459ef0[_0xe776('0xf4')]]&&_['isNil'](this[_0xe776('0xf2')][_0x459ef0['actionid']]['locked'])&&_0x459ef0[_0xe776('0x81')]==='1'&&_0x459ef0['paused']==='0'){if(this[_0xe776('0x1a')][_0x459ef0[_0xe776('0xf6')]]){if(!this[_0xe776('0x1a')][_0x459ef0[_0xe776('0xf6')]]['locked']){this['agents'][_0x459ef0[_0xe776('0xf6')]][_0xe776('0xf7')]=!![];this[_0xe776('0xf2')][_0x459ef0[_0xe776('0xf4')]][_0xe776('0xf7')]=!![];this[_0xe776('0xf2')][_0x459ef0[_0xe776('0xf4')]][_0xe776('0xf6')]=_0x459ef0[_0xe776('0xf6')];}}}}else if(_0x30e5d9===_0xe776('0xf8')){if(this[_0xe776('0xf2')][_0x459ef0['actionid']]){if(this['agents'][_0x459ef0['stateinterface']]){this[_0xe776('0xf2')][_0x459ef0[_0xe776('0xf4')]][_0xe776('0xf6')]=_0x459ef0[_0xe776('0xf6')];if(_[_0xe776('0xf9')](this['queueBooked'][this[_0xe776('0xf2')][_0x459ef0[_0xe776('0xf4')]][_0xe776('0xbc')]])){this[_0xe776('0x22')][this['actions'][_0x459ef0['actionid']][_0xe776('0xbc')]]=[];}this[_0xe776('0x22')][this[_0xe776('0xf2')][_0x459ef0['actionid']][_0xe776('0xbc')]][_0xe776('0x93')](_[_0xe776('0x58')](_['pick'](this[_0xe776('0xf2')][_0x459ef0['actionid']],[_0xe776('0xfa'),_0xe776('0xf6')]),{'status':_0x459ef0['status'],'paused':_0x459ef0[_0xe776('0xfb')]}));}}}};Dialer['prototype'][_0xe776('0xfc')]=function(_0x2b4978){if(!this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]]){return;}var _0x32908d=this;var _0x4712fa=this[_0xe776('0x18')][this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xbc')]];var _0xbd0baa=_0x4712fa[_0xe776('0xfd')]||_0xe776('0xf8');if(_0xbd0baa==='roundrobin'){if(this['actions'][_0x2b4978[_0xe776('0xf4')]]&&this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xf6')]){this[_0xe776('0xfe')][_0xe776('0xff')](this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]]['idHopper'],this[_0xe776('0xf2')][_0x2b4978['actionid']][_0xe776('0xf6')])[_0xe776('0x9a')](function(_0x38cd17){logger[_0xe776('0x5f')](_0xe776('0x100'),util[_0xe776('0x3c')](_0x38cd17,{'showHidden':![],'depth':null}));})[_0xe776('0x101')](function(){_0x32908d['updateOriginated'](_0x32908d[_0xe776('0x18')][_0x32908d[_0xe776('0xf2')][_0x2b4978['actionid']][_0xe776('0xbc')]]);_0x32908d[_0xe776('0x1a')][_0x32908d[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xf6')]][_0xe776('0xf7')]=![];delete _0x32908d['actions'][_0x2b4978[_0xe776('0xf4')]];unlockQueueStatus(_0x4712fa);});}else{this['updateOriginated'](this[_0xe776('0x18')][this[_0xe776('0xf2')][_0x2b4978['actionid']][_0xe776('0xbc')]]);hopperUtils['rescheduleContact']({'active':![],'ContactId':this['actions'][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xdf')],'ListId':this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xee')],'VoiceQueueId':this[_0xe776('0xf2')][_0x2b4978['actionid']][_0xe776('0xe0')]||undefined,'CampaignId':this['actions'][_0x2b4978[_0xe776('0xf4')]]['CampaignId']||undefined})[_0xe776('0x9a')](loggerCatch('[unlock][syncQueueStatusComplete]'));delete this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]];unlockQueueStatus(_0x4712fa);}}else if(_0xbd0baa==='rrmemory'){var _0x30560f;if(this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]]&&!_['isEmpty'](this[_0xe776('0x22')][this['actions'][_0x2b4978['actionid']][_0xe776('0xbc')]])){if(this[_0xe776('0x102')][_0x32908d[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xbc')]]){this[_0xe776('0x102')][_0x32908d['actions'][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xbc')]]=this[_0xe776('0x102')][this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xbc')]]?this['queueBookedRR'][this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]]['queue']]:this['queueBooked'][this[_0xe776('0xf2')][_0x2b4978['actionid']][_0xe776('0xbc')]]?this[_0xe776('0x22')][this['actions'][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xbc')]][_0xe776('0x103')]||0x0:0x0;}this[_0xe776('0x22')][this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xbc')]][_0xe776('0x103')]=this[_0xe776('0x102')][this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]]['queue']];for(var _0x5c25c0=0x0;_0x5c25c0<this[_0xe776('0x22')][this[_0xe776('0xf2')][_0x2b4978['actionid']][_0xe776('0xbc')]][_0xe776('0x92')];_0x5c25c0+=0x1){_0x30560f=rr(this[_0xe776('0x22')][this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xbc')]]);this['queueBookedRR'][_0x32908d[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xbc')]]=this[_0xe776('0x22')][this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]]['queue']]['_rr'];if(_0x30560f[_0xe776('0x81')]==='1'&&_0x30560f['paused']==='0'){break;}}if(!_[_0xe776('0xf9')](_0x30560f)){this[_0xe776('0x1a')][_0x30560f[_0xe776('0xf6')]][_0xe776('0x104')]=_['isUndefined'](this['agents'][_0x30560f[_0xe776('0xf6')]]['unlockRR'])?!![]:this['agents'][_0x30560f[_0xe776('0xf6')]][_0xe776('0x104')];}loggerBooked['info']('[booked][RR]',_0x2b4978[_0xe776('0xf4')],_0xe776('0x105'),JSON[_0xe776('0x6c')](_[_0xe776('0x6d')](this['agents'][_0x30560f['stateinterface']],[_0xe776('0x3f'),'unlockRR'])),_0xe776('0x106'),JSON[_0xe776('0x6c')](_0x30560f[_0xe776('0xfa')]));if(!_[_0xe776('0xf9')](_0x30560f)&&_0x30560f['status']==='1'&&_0x30560f[_0xe776('0xfb')]==='0'&&this[_0xe776('0x1a')][_0x30560f['stateinterface']][_0xe776('0x104')]){this[_0xe776('0x1a')][_0x30560f[_0xe776('0xf6')]][_0xe776('0x104')]=![];this[_0xe776('0x22')][_0x32908d[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]]['queue']]=[];this[_0xe776('0xfe')][_0xe776('0xff')](_0x30560f[_0xe776('0xfa')],_0x30560f[_0xe776('0xf6')])[_0xe776('0x9a')](function(_0x4baa16){logger[_0xe776('0x5f')](_0xe776('0x100'),util[_0xe776('0x3c')](_0x4baa16,{'showHidden':![],'depth':null}));})[_0xe776('0x101')](function(){_0x32908d[_0xe776('0xc0')](_0x32908d[_0xe776('0x18')][_0x32908d['actions'][_0x2b4978[_0xe776('0xf4')]]['queue']]);setTimeout(function(){_0x32908d[_0xe776('0x1a')][_0x30560f[_0xe776('0xf6')]][_0xe776('0x104')]=!![];loggerBooked[_0xe776('0x42')](_0xe776('0x107'),_0x2b4978[_0xe776('0xf4')],_0xe776('0x105'),JSON['stringify'](_['pick'](_0x32908d[_0xe776('0x1a')][_0x30560f['stateinterface']],['name',_0xe776('0x104')])),_0xe776('0x106'),JSON['stringify'](_0x30560f[_0xe776('0xfa')]));},0xc7);delete _0x32908d[_0xe776('0xf2')][_0x2b4978['actionid']];unlockQueueStatus(_0x4712fa,_0x2b4978[_0xe776('0xf4')]);});}else{loggerBooked['info']('[booked][unlock]');this[_0xe776('0xc0')](this[_0xe776('0x18')][this['actions'][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xbc')]]);hopperUtils[_0xe776('0xdd')]({'active':![],'ContactId':this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]]['ContactId'],'ListId':this[_0xe776('0xf2')][_0x2b4978['actionid']][_0xe776('0xee')],'VoiceQueueId':this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xe0')]||undefined,'CampaignId':this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xef')]||undefined})['catch'](loggerCatch(_0xe776('0x108')));delete this[_0xe776('0xf2')][_0x2b4978['actionid']];unlockQueueStatus(_0x4712fa);}}else{loggerBooked[_0xe776('0x42')](_0xe776('0x109'));this[_0xe776('0xc0')](this[_0xe776('0x18')][this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xbc')]]);hopperUtils[_0xe776('0xdd')]({'active':![],'ContactId':this['actions'][_0x2b4978['actionid']][_0xe776('0xdf')],'ListId':this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xee')],'VoiceQueueId':this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xe0')]||undefined,'CampaignId':this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xef')]||undefined})[_0xe776('0x9a')](loggerCatch(_0xe776('0x10a')));delete this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]];unlockQueueStatus(_0x4712fa);}}else{loggerBooked[_0xe776('0x42')](_0xe776('0x10b'));this['updateOriginated'](this[_0xe776('0x18')][this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]]['queue']]);hopperUtils[_0xe776('0xdd')]({'active':![],'ContactId':this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xdf')],'ListId':this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]][_0xe776('0xee')],'VoiceQueueId':this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]]['VoiceQueueId']||undefined,'CampaignId':this[_0xe776('0xf2')][_0x2b4978['actionid']]['CampaignId']||undefined})[_0xe776('0x9a')](loggerCatch(_0xe776('0x10c')));delete this[_0xe776('0xf2')][_0x2b4978[_0xe776('0xf4')]];unlockQueueStatus(_0x4712fa);}};Dialer['prototype'][_0xe776('0x29')]=function(_0xab4be0){var _0x1a87d0=this['actions'][_0xab4be0[_0xe776('0xf4')]];if(_0x1a87d0){delete this[_0xe776('0xf2')][_0xab4be0['actionid']];_0x1a87d0[_0xe776('0xcd')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');var _0x4fb88c=_0x1a87d0[_0xe776('0x39')]==='ivr'?this[_0xe776('0x19')][_0x1a87d0['queue']]:this[_0xe776('0x18')][_0x1a87d0[_0xe776('0x10d')]()];if(_0xab4be0['response']!==_0xe776('0x10e')){this[_0xe776('0xc0')](_0x4fb88c);return this['callProgressDetecting'](_0x1a87d0,_0x4fb88c,_0xab4be0)['catch'](loggerCatch(_0xe776('0x10f')));}this[_0xe776('0xbd')][_0xab4be0[_0xe776('0xbe')]]=_0x1a87d0;}};Dialer['prototype'][_0xe776('0x30')]=function(_0x1cc13b){var _0x3f4b79=this;var _0x20b112=this['uniqueId'][_0x1cc13b[_0xe776('0xbe')]];var _0x42ed7a;if(!_[_0xe776('0xf9')](_0x1cc13b)&&!_[_0xe776('0xf9')](_0x1cc13b['variable'])&&!_[_0xe776('0xf9')](_0x1cc13b[_0xe776('0x110')][_0xe776('0x111')])&&_0x1cc13b[_0xe776('0x112')]==='xcally-motion-dialer'&&_0x20b112){if(_0x20b112[_0xe776('0x39')]!=='ivr'&&this[_0xe776('0x18')][_0x20b112[_0xe776('0xbc')]][_0xe776('0x113')]&&_0x1cc13b[_0xe776('0x114')]==='HANGUP'){delete this[_0xe776('0xbd')][_0x1cc13b[_0xe776('0xbe')]];this[_0xe776('0xc0')](this[_0xe776('0x18')][_0x20b112[_0xe776('0xbc')]]);this[_0xe776('0x18')][_0x20b112[_0xe776('0xbc')]]['outboundAnswerCallsDay']+=0x1;this[_0xe776('0x18')][_0x20b112[_0xe776('0xbc')]][_0xe776('0x115')]+=0x1;_0x42ed7a=new Hangup(_0x20b112,_0x1cc13b);_0x42ed7a['state']=0x12;_0x42ed7a[_0xe776('0x67')]=_0xe776('0x116');_0x42ed7a[_0xe776('0x117')]=_0xe776('0x118');ami['emit']('custom:amd',ut['buildObj'](_0x42ed7a,'amd'));this[_0xe776('0x119')](_0x42ed7a,_0xe776('0x11a'),_0xe776('0x11b'));}if(_0x20b112[_0xe776('0x39')]!==_0xe776('0xbf')&&this[_0xe776('0x18')][_0x20b112[_0xe776('0xbc')]][_0xe776('0x113')]&&_0x1cc13b[_0xe776('0x114')]===_0xe776('0x11c')){return new Promise(function(_0x395dbc,_0x30b87d){delete _0x3f4b79[_0xe776('0xbd')][_0x1cc13b[_0xe776('0xbe')]];_0x3f4b79[_0xe776('0xc0')](_0x3f4b79[_0xe776('0x18')][_0x20b112[_0xe776('0xbc')]]);_0x3f4b79[_0xe776('0x18')][_0x20b112['queue']][_0xe776('0xc3')]+=0x1;_0x3f4b79[_0xe776('0x18')][_0x20b112[_0xe776('0xbc')]][_0xe776('0x115')]+=0x1;var _0x33acbd=_0x3f4b79[_0xe776('0x18')][_0x20b112[_0xe776('0xbc')]];var _0x2f0b46=new Hangup(_0x20b112,_0x1cc13b);_0x2f0b46[_0xe776('0xd7')]=0x13;_0x2f0b46[_0xe776('0x67')]=_0xe776('0x11d');_0x2f0b46[_0xe776('0x117')]=_0xe776('0x118');_0x2f0b46[_0xe776('0x11e')]+=0x1;_0x2f0b46['countglobal']+=0x1;_0x2f0b46['amd']=!![];ami[_0xe776('0x38')]('custom:amd',ut[_0xe776('0x11f')](_0x2f0b46,_0xe776('0x120')));hopperUtils[_0xe776('0xc7')](_0x2f0b46)[_0xe776('0x9a')](loggerCatch(_0xe776('0x121')));if(_0x2f0b46[_0xe776('0x122')]+_0x2f0b46[_0xe776('0x123')]+_0x2f0b46[_0xe776('0x124')]+_0x2f0b46[_0xe776('0x125')]+_0x2f0b46['countdropretry']+_0x2f0b46[_0xe776('0xe8')]+_0x2f0b46[_0xe776('0x11e')]+_0x2f0b46[_0xe776('0x126')]>=_0x33acbd['dialGlobalMaxRetry']){_0x3f4b79[_0xe776('0x127')](_0x2f0b46,_0x395dbc,_0x30b87d,_0xe776('0x128'));}else{if(_0x2f0b46[_0xe776('0x11e')]>=_0x33acbd['dialMachineMaxRetry']){_0x3f4b79[_0xe776('0x129')](_0x2f0b46,_0x395dbc,_0x30b87d,_0xe776('0x12a'));}else{hopperUtils['rescheduleContact']({'active':![],'countmachineretry':_0x2f0b46['countmachineretry'],'scheduledat':moment()[_0xe776('0xde')](_0x33acbd['dialMachineRetryFrequency'],_0xe776('0xed'))[_0xe776('0x3d')](_0xe776('0xc2')),'ContactId':_0x2f0b46[_0xe776('0xdf')],'ListId':_0x2f0b46[_0xe776('0xee')],'VoiceQueueId':_0x2f0b46[_0xe776('0xe0')]||undefined,'CampaignId':_0x2f0b46[_0xe776('0xef')]||undefined})[_0xe776('0x9a')](loggerCatch(_0xe776('0x12b')));_0x395dbc({'reschedule':0x1});}}});}if(_0x20b112['type']===_0xe776('0xbf')&&this[_0xe776('0x19')][_0x20b112[_0xe776('0xbc')]][_0xe776('0x113')]&&_0x1cc13b['value']==='HANGUP'){delete this[_0xe776('0xbd')][_0x1cc13b[_0xe776('0xbe')]];this[_0xe776('0xc0')](this['campaigns'][_0x20b112[_0xe776('0xbc')]]);_0x42ed7a=new Hangup(_0x20b112,_0x1cc13b);_0x42ed7a[_0xe776('0xd7')]=0x12;_0x42ed7a[_0xe776('0x67')]=_0xe776('0x116');_0x42ed7a['membername']='AMD';ami[_0xe776('0x38')](_0xe776('0x12c'),ut[_0xe776('0x11f')](_0x42ed7a,_0xe776('0x120')));this['saveInDb'](_0x42ed7a,_0xe776('0x12d'),_0xe776('0x12e'));}if(_0x20b112[_0xe776('0x39')]==='ivr'&&this[_0xe776('0x19')][_0x20b112['queue']][_0xe776('0x113')]&&_0x1cc13b['value']===_0xe776('0x11c')){return new Promise(function(_0x186394,_0x2a4f55){delete _0x3f4b79[_0xe776('0xbd')][_0x1cc13b[_0xe776('0xbe')]];_0x3f4b79['updateOriginated'](_0x3f4b79[_0xe776('0x19')][_0x20b112[_0xe776('0xbc')]]);_0x3f4b79['campaigns'][_0x20b112[_0xe776('0xbc')]]['outboundAnswerCallsDay']+=0x1;_0x3f4b79[_0xe776('0x19')][_0x20b112[_0xe776('0xbc')]]['outboundAnswerAgiCallsDay']+=0x1;var _0x4e6dbf=_0x3f4b79[_0xe776('0x19')][_0x20b112[_0xe776('0xbc')]];var _0x1bbfea=new Hangup(_0x20b112,_0x1cc13b);_0x1bbfea[_0xe776('0xd7')]=0x13;_0x1bbfea['statedesc']=_0xe776('0x11d');_0x1bbfea[_0xe776('0x117')]='AMD';_0x1bbfea[_0xe776('0x11e')]+=0x1;_0x1bbfea[_0xe776('0xe9')]+=0x1;_0x1bbfea[_0xe776('0x120')]=!![];ami[_0xe776('0x38')]('custom:amd',ut[_0xe776('0x11f')](_0x1bbfea,_0xe776('0x120')));hopperUtils[_0xe776('0xc7')](_0x1bbfea)[_0xe776('0x9a')](loggerCatch(_0xe776('0x121')));if(_0x1bbfea[_0xe776('0x122')]+_0x1bbfea[_0xe776('0x123')]+_0x1bbfea[_0xe776('0x124')]+_0x1bbfea[_0xe776('0x125')]+_0x1bbfea[_0xe776('0xda')]+_0x1bbfea['countabandonedretry']+_0x1bbfea[_0xe776('0x11e')]+_0x1bbfea[_0xe776('0x126')]>=_0x4e6dbf[_0xe776('0x12f')]){_0x3f4b79[_0xe776('0x127')](_0x1bbfea,_0x186394,_0x2a4f55,_0xe776('0x128'));}else{if(_0x1bbfea['countmachineretry']>=_0x4e6dbf[_0xe776('0x130')]){_0x3f4b79[_0xe776('0x129')](_0x1bbfea,_0x186394,_0x2a4f55,'reason\x2019\x20machine....');}else{hopperUtils[_0xe776('0xdd')]({'active':![],'countmachineretry':_0x1bbfea['countmachineretry'],'scheduledat':moment()[_0xe776('0xde')](_0x4e6dbf['dialMachineRetryFrequency'],'minutes')[_0xe776('0x3d')](_0xe776('0xc2')),'ContactId':_0x1bbfea[_0xe776('0xdf')],'ListId':_0x1bbfea[_0xe776('0xee')],'VoiceQueueId':_0x1bbfea[_0xe776('0xe0')]||undefined,'CampaignId':_0x1bbfea[_0xe776('0xef')]||undefined})[_0xe776('0x9a')](loggerCatch(_0xe776('0x12b')));_0x186394({'reschedule':0x1});}}});}}};Dialer[_0xe776('0x16')][_0xe776('0x131')]=function(_0x3780eb){var _0x4da264=this[_0xe776('0xbd')][_0x3780eb[_0xe776('0xbe')]];var _0x34ea17;if(_0x4da264&&_0x4da264['type']===_0xe776('0xbf')){delete this[_0xe776('0xbd')][_0x3780eb[_0xe776('0xbe')]];this[_0xe776('0xc0')](this[_0xe776('0x19')][_0x4da264[_0xe776('0xbc')]]);this['campaigns'][_0x4da264[_0xe776('0xbc')]]['ivrAnswerCallsDay']+=0x1;_0x34ea17=new Hangup(_0x4da264,_0x3780eb);hopperUtils[_0xe776('0xc7')](_0x34ea17)[_0xe776('0x9a')](loggerCatch(_0xe776('0x132')));hopperUtils[_0xe776('0xc9')](_0x34ea17)[_0xe776('0x9a')](loggerCatch(_0xe776('0x133')));}if(_0x4da264&&_0x4da264['type']!==_0xe776('0xbf')&&isNotNull(this[_0xe776('0x18')][_0x4da264[_0xe776('0xbc')]][_0xe776('0x134')])){delete this[_0xe776('0xbd')][_0x3780eb[_0xe776('0xbe')]];this[_0xe776('0xc0')](this['voiceQueues'][_0x4da264['queue']]);this[_0xe776('0x18')][_0x4da264[_0xe776('0xbc')]]['outboundAnswerCallsDay']+=0x1;this['voiceQueues'][_0x4da264[_0xe776('0xbc')]]['outboundAnswerAgiCallsDay']+=0x1;_0x34ea17=new Hangup(_0x4da264,_0x3780eb);_0x34ea17[_0xe776('0xd7')]=0x10;_0x34ea17['statedesc']='AnswerAGI';_0x34ea17[_0xe776('0x117')]=_0xe776('0x135');hopperUtils['createHistory'](_0x34ea17)['catch'](loggerCatch(_0xe776('0x132')));hopperUtils[_0xe776('0xc9')](_0x34ea17)[_0xe776('0x9a')](loggerCatch(_0xe776('0x133')));}if(_0x4da264&&_0x4da264[_0xe776('0x39')]!==_0xe776('0xbf')&&!isNotNull(this[_0xe776('0x18')][_0x4da264['queue']]['dialQueueProject'])){if(_0x3780eb[_0xe776('0x136')]===_0xe776('0x137')){delete this['uniqueId'][_0x3780eb[_0xe776('0xbe')]];this[_0xe776('0x18')][_0x4da264['queue']][_0xe776('0xc3')]+=0x1;const _0x33bc78=new AgentComplete(_0x4da264,_0x3780eb);_0x33bc78['CampaignId']=this[_0xe776('0x18')][_0x4da264[_0xe776('0xbc')]]['id'];hopperUtils[_0xe776('0xc7')](_0x33bc78)[_0xe776('0x9a')](loggerCatch(_0xe776('0xc8')));hopperUtils[_0xe776('0xc9')](_0x33bc78)[_0xe776('0x9a')](loggerCatch(_0xe776('0xca')));}else{delete this[_0xe776('0xbd')][_0x3780eb['uniqueid']];this['updateOriginated'](this[_0xe776('0x18')][_0x4da264[_0xe776('0xbc')]]);this['voiceQueues'][_0x4da264[_0xe776('0xbc')]][_0xe776('0x138')]+=0x1;_0x34ea17=new Hangup(_0x4da264,_0x3780eb);_0x34ea17[_0xe776('0xd7')]=0xc;_0x34ea17[_0xe776('0x67')]=_0x3780eb[_0xe776('0x136')];_0x34ea17[_0xe776('0x117')]=_0xe776('0x139');hopperUtils[_0xe776('0xc7')](_0x34ea17)[_0xe776('0x9a')](loggerCatch(_0xe776('0x132')));hopperUtils[_0xe776('0xc9')](_0x34ea17)[_0xe776('0x9a')](loggerCatch('[syncHangupIvr]'));}}};Dialer[_0xe776('0x16')][_0xe776('0x2c')]=function(_0xb70fed){var _0x2c509d=this;if(!_0x2c509d[_0xe776('0x23')][_0xb70fed[_0xe776('0x3f')]]){_0x2c509d['queuesSummary'][_0xb70fed[_0xe776('0x3f')]]={'running':![]};}else if(_0x2c509d[_0xe776('0x23')][_0xb70fed[_0xe776('0x3f')]]['running']===!![]){return;}else if(_0x2c509d[_0xe776('0x23')][_0xb70fed[_0xe776('0x3f')]][_0xe776('0x13a')]===![]){_0x2c509d[_0xe776('0x23')][_0xb70fed[_0xe776('0x3f')]][_0xe776('0x13a')]=!![];}var _0x2b796e=_0x2c509d[_0xe776('0x18')][_0xb70fed[_0xe776('0x3f')]];var _0x466342=_0x2b796e['message']!==utils[_0xe776('0x66')][_0xe776('0x73')];var _0x36d40c=utils[_0xe776('0x13b')](_0x2b796e);_0x2b796e['statusMessage']=utils[_0xe776('0x13c')](_0x2b796e,_0x2c509d['trunks']);Promise[_0xe776('0xa5')]()[_0xe776('0x35')](function(){if(_0x2b796e[_0xe776('0x13d')]===utils['CAMPAIGN_STATUS'][_0xe776('0x73')]){if(_0x466342){clearPredictiveAttributes(_0x2b796e);_0xb70fed['startPredictive']=undefined;_0xb70fed[_0xe776('0x5a')]=undefined;}if(_0x2b796e[_0xe776('0x13d')]===utils[_0xe776('0x66')][_0xe776('0x73')]){_0xb70fed[_0xe776('0x13e')]=0x0;_0xb70fed['paused']=0x0;_0xb70fed[_0xe776('0x13f')]=0x0;_0xb70fed[_0xe776('0x140')]=0x0;_0xb70fed[_0xe776('0x141')]=0x0;}}else if(_0x2b796e['statusMessage']===utils[_0xe776('0x66')][_0xe776('0x142')]&&!_0x36d40c){return _0x2c509d[_0xe776('0x8c')](_0x2b796e,!![])['then'](function(){return _0x2c509d[_0xe776('0x8c')](_0x2b796e,![]);})[_0xe776('0x35')](function(){return _0x2c509d['checkDialMethod'](_0x2b796e);})['catch'](function(_0x433cbf){loggerSyncQueueSummary[_0xe776('0x3a')](_0xe776('0x143'),util[_0xe776('0x3c')](_0x433cbf,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x2b796e);});}else{clearPredictiveAttributes(_0x2b796e);}})[_0xe776('0x35')](function(){var _0x1157c2=_0xb70fed[_0xe776('0x144')](_0x2b796e);if(_0x1157c2||_0x2b796e[_0xe776('0x145')]){_0x2b796e[_0xe776('0x145')]=![];_0xb70fed[_0xe776('0x146')](_0x2b796e);Object['assign'](_0x2b796e,_0xb70fed);emitOutboundVoiceQueueSummary(_0xb70fed);}_0x2c509d['queuesSummary'][_0x2b796e[_0xe776('0x3f')]][_0xe776('0x13a')]=![];})['catch'](function(_0x45aed7){logger['error'](_0xe776('0x143'),util['inspect'](_0x45aed7,{'showHidden':![],'depth':null}));_0x2c509d[_0xe776('0x23')][_0x2b796e[_0xe776('0x3f')]][_0xe776('0x13a')]=![];});};Dialer[_0xe776('0x16')][_0xe776('0x147')]=_['throttle'](function(){var _0x4a6b82=_[_0xe776('0x148')](this[_0xe776('0x18')],function(_0x3481f6){return _0x3481f6['dialPreviewRecallmeReminder'];});var _0x5016a0=_[_0xe776('0x148')](this['agents'],function(_0xdf84b4){return _0xdf84b4[_0xe776('0x149')]&&_0xdf84b4['status']===_0xe776('0x82');});if(_0x4a6b82[_0xe776('0x92')]>0x0&&_0x5016a0[_0xe776('0x92')]>0x0){return Promise[_0xe776('0xa5')]()[_0xe776('0x35')](cmHopper[_0xe776('0x14a')](_['map'](_0x4a6b82,'id'),previewRecallmeReminderInterval,_['map'](_0x5016a0,'id')))[_0xe776('0x35')](function(_0x7aab66){for(var _0x15ce4c=0x0;_0x15ce4c<_0x7aab66[_0xe776('0x92')];_0x15ce4c++){var _0x4afb99=_0x7aab66[_0x15ce4c][_0xe776('0x14b')][_0xe776('0x3f')];if(_0x4afb99)io['to'](util[_0xe776('0x3d')](_0xe776('0x14c'),_0x4afb99))[_0xe776('0x38')](_0xe776('0x14d'),{'hopper':_0x7aab66[_0x15ce4c]});}})[_0xe776('0x9a')](function(_0x807f77){logger[_0xe776('0x5f')](_0xe776('0x14e'),_0x807f77);});}},0x3c*0x3e8,{'leading':!![]});Dialer[_0xe776('0x16')][_0xe776('0x33')]=function(){var _0x436930=this;setInterval(function(){_0x436930[_0xe776('0x14f')](_0x436930[_0xe776('0xbd')],'[uniqueid]');_0x436930['clearZombieChannels'](_0x436930[_0xe776('0xf2')],_0xe776('0x150'));},0x32c8);};Dialer[_0xe776('0x16')][_0xe776('0x14f')]=function(_0x3fe36d,_0x267579){var _0x3b2c8b=this;for(var _0x4191c7 in _0x3fe36d){if(typeof _0x3fe36d[_0x4191c7]!==_0xe776('0xa4')){this[_0xe776('0x151')][_0xe776('0x152')](function(){if(!_['isNil'](_0x3fe36d[_0x4191c7])){return ami[_0xe776('0x94')]({'action':'status','channel':_0x3fe36d[_0x4191c7][_0xe776('0xf3')]})[_0xe776('0x9a')](function(_0x3d9b4f){if(_0x3d9b4f[_0xe776('0x65')]===_0xe776('0x153')){setTimeout(function(){if(_0x3fe36d[_0x4191c7]&&_0x3fe36d[_0x4191c7][_0xe776('0x39')]!==_0xe776('0xbf')){_0x3b2c8b[_0xe776('0xc0')](_0x3b2c8b[_0xe776('0x18')][_0x3fe36d[_0x4191c7][_0xe776('0xbc')]]);logger[_0xe776('0x5f')](_0xe776('0x154'),_0x267579,_0x4191c7,_0x3fe36d[_0x4191c7][_0xe776('0xbc')]);delete _0x3fe36d[_0x4191c7];}if(_0x3fe36d[_0x4191c7]&&_0x3fe36d[_0x4191c7][_0xe776('0x39')]===_0xe776('0xbf')){_0x3b2c8b['updateOriginated'](_0x3b2c8b[_0xe776('0x19')][_0x3fe36d[_0x4191c7][_0xe776('0xbc')]]);logger[_0xe776('0x5f')]('[Dialer][checkChannel][ivr]',_0x267579,_0x4191c7,_0x3fe36d[_0x4191c7][_0xe776('0xbc')]);delete _0x3fe36d[_0x4191c7];}},0x2328);}});}});}}};Dialer[_0xe776('0x16')]['getVoiceQueueRtPauses']=function(_0x3f018b){return Promise[_0xe776('0xa5')]()[_0xe776('0x35')](voiceQueueRt['getVoiceQueueRtPauses'](_0x3f018b))[_0xe776('0x9a')](loggerCatch(_0xe776('0x155')));};Dialer[_0xe776('0x16')][_0xe776('0xc0')]=function(_0x1ce3ad){if(!_[_0xe776('0x37')](_0x1ce3ad)&&_0x1ce3ad!==null){if(typeof _0x1ce3ad[_0xe776('0x78')]!==_0xe776('0xa4')){if(_0x1ce3ad['originated']>0x0){_0x1ce3ad['originated']-=0x1;}else{logger[_0xe776('0x5f')](_0xe776('0x156'));}}}else{logger[_0xe776('0x5f')](_0xe776('0x157'));}};Dialer[_0xe776('0x16')][_0xe776('0x158')]=function(_0x46eeac,_0x3feac6){var _0x4fdfb2=this;return function(_0x12c869){_0x4fdfb2[_0xe776('0xc0')](_0x3feac6);logger[_0xe776('0x5f')](_0x46eeac,util['inspect'](_0x12c869,{'showHidden':![],'depth':null}));};};Dialer[_0xe776('0x16')][_0xe776('0x159')]=function(_0x43a9f9,_0x284a07,_0x33c972){var _0x23940c={'state':0x19,'statedesc':_0xe776('0x15a')};this[_0xe776('0xc0')](_0x284a07);this[_0xe776('0x119')](_[_0xe776('0x58')](_0x23940c,_[_0xe776('0x6d')](_0x33c972,[_0xe776('0xdf'),_0xe776('0xee'),_0xe776('0x15b'),_0xe776('0xe0'),_0xe776('0xef')])),'[emptyContact][createHistory]',_0xe776('0x15c'));logger['error'](_0x43a9f9);};Dialer[_0xe776('0x16')][_0xe776('0x119')]=function(_0x373718,_0x3708f2,_0x34ea2c){hopperUtils[_0xe776('0xc7')](_0x373718)['catch'](loggerCatch(_0x3708f2));hopperUtils[_0xe776('0xc9')](_0x373718)[_0xe776('0x9a')](loggerCatch(_0x34ea2c));};Dialer['prototype'][_0xe776('0xdc')]=function(_0x14732f,_0x2ceba4){hopperUtils[_0xe776('0xc7')](_0x14732f)[_0xe776('0x9a')](loggerCatch(_0xe776('0xc8')));if(_0x2ceba4==0x0){hopperUtils[_0xe776('0xc9')](_0x14732f)['catch'](loggerCatch(_0xe776('0x15d')));}};Dialer[_0xe776('0x16')][_0xe776('0x14e')]=function(_0x4afcea){return Promise[_0xe776('0xa5')]()[_0xe776('0x35')](cmHopper[_0xe776('0x14a')](_0x4afcea['id'],previewRecallmeReminderInterval))['then'](function(_0x5427fb){for(var _0x33d076=0x0;_0x33d076<_0x5427fb['length'];_0x33d076++){var _0x120d10=_0x5427fb[_0x33d076][_0xe776('0x14b')]['name'];if(_0x120d10)io['to'](util[_0xe776('0x3d')](_0xe776('0x14c'),_0x120d10))[_0xe776('0x38')](_0xe776('0x14d'),{'hopper':_0x5427fb[_0x33d076]});}})[_0xe776('0x9a')](function(){});};Dialer[_0xe776('0x16')][_0xe776('0xaa')]=function(_0x49a9ff){var _0x1c5f5d=this;return function(){_0x1c5f5d[_0xe776('0x15e')](_0x49a9ff);};};Dialer[_0xe776('0x16')][_0xe776('0x15f')]=function(_0x4b8ca3,_0x422895){var _0x1973ae=this;var _0x2da7f2=uuid['v4']();this[_0xe776('0xf2')][_0x2da7f2]=new Action(_0x4b8ca3,_0x422895,_0x2da7f2);return new Promise(function(_0xd38a6d,_0x2d51e7){if(_[_0xe776('0x37')](_0x4b8ca3)&&typeof _0x4b8ca3!==_0xe776('0x160')){return _0x2d51e7(msgResponse(_0xe776('0x161'),_0xe776('0x8a'),_0xe776('0x162')));}if(_[_0xe776('0x37')](_0x422895['phone'])||_0x422895['phone']===null){return _0x2d51e7(msgResponse(_0xe776('0x161'),_0xe776('0x8a'),_0xe776('0x163')));}var _0x3d69b3={'XMD-CALLERID':_0x1973ae['actions'][_0x2da7f2][_0xe776('0x164')](),'XMD-AGI':_0x4b8ca3[_0xe776('0x134')]?util[_0xe776('0x3d')](_0xe776('0x165'),ipAgi,_0x4b8ca3[_0xe776('0x134')]):'NONE','XMD-AGIAFTER':_0x4b8ca3[_0xe776('0xd4')]?util['format'](_0xe776('0x165'),ipAgi,_0x4b8ca3[_0xe776('0xd4')]):_0xe776('0x166'),'XMD-QUEUE':utils[_0xe776('0x167')](_0x4b8ca3)?util[_0xe776('0x3d')](_0xe776('0x168'),_0x4b8ca3[_0xe776('0x3f')],_0x4b8ca3[_0xe776('0x169')]||'',_0x4b8ca3['dialAgiAfterHangupAgent']?'c':'',_0x4b8ca3[_0xe776('0xce')]||0x3):_0xe776('0x166'),'XMD-CONTACTID':_0x422895['ContactId'],'XMD-CDRTYPE':'dialer','CALLERID(all)':_0x1973ae[_0xe776('0xf2')][_0x2da7f2][_0xe776('0x164')](),'XMD-AMD':_0x4b8ca3[_0xe776('0x113')]?_0xe776('0x142'):_0xe776('0x166'),'XMD-DESTINATION':_0xe776('0x16a')};if(_0x4b8ca3[_0xe776('0x113')]){_0x3d69b3[_0xe776('0x16b')]=_0x4b8ca3[_0xe776('0x16c')]||0x9c4;_0x3d69b3[_0xe776('0x16d')]=_0x4b8ca3[_0xe776('0x16e')]||0x5dc;_0x3d69b3[_0xe776('0x16f')]=_0x4b8ca3[_0xe776('0x170')]||0x320;_0x3d69b3[_0xe776('0x171')]=_0x4b8ca3['dialAMDTotalAnalysisTime']||0x1388;_0x3d69b3[_0xe776('0x172')]=_0x4b8ca3['dialAMDMinWordLength']||0x64;_0x3d69b3['XMD-AMDBETWEENWORDSSILENCE']=_0x4b8ca3[_0xe776('0x173')]||0x32;_0x3d69b3[_0xe776('0x174')]=_0x4b8ca3[_0xe776('0x175')]||0x3;_0x3d69b3['XMD-AMDSILENCETHRESHOLD']=_0x4b8ca3[_0xe776('0x176')]||0x100;_0x3d69b3[_0xe776('0x177')]=_0x4b8ca3[_0xe776('0x178')]||0x1388;}if(utils['isOutboundQueue'](_0x4b8ca3)){_0x3d69b3['XMD-VOICEQUEUEID']=_0x422895['VoiceQueueId'];}else{_0x3d69b3[_0xe776('0x179')]=_0x422895[_0xe776('0xef')];}var _0x142281=utils[_0xe776('0x17a')](_0x422895[_0xe776('0x17b')]);Object[_0xe776('0x17c')](_0x3d69b3,_0x142281);var _0x5bf4d4=_0x1973ae[_0xe776('0x7f')](_0x4b8ca3[_0xe776('0x84')])?utils['getCallerId'](_0x4b8ca3[_0xe776('0x84')][_0xe776('0x17d')],_0x4b8ca3[_0xe776('0x17e')],_0x4b8ca3[_0xe776('0x17f')]>0x0?utils[_0xe776('0x180')](_0x4b8ca3['dialOriginateCallerIdNumber'],_0x4b8ca3[_0xe776('0x17f')]):_0x4b8ca3['dialOriginateCallerIdNumber']):utils[_0xe776('0x181')](_['isNil'](_0x4b8ca3['TrunkBackup'])?_0x4b8ca3[_0xe776('0x84')][_0xe776('0x17d')]:_0x4b8ca3[_0xe776('0x85')][_0xe776('0x17d')],_0x4b8ca3[_0xe776('0x17e')],_0x4b8ca3[_0xe776('0x17f')]>0x0?utils[_0xe776('0x180')](_0x4b8ca3[_0xe776('0x182')],_0x4b8ca3[_0xe776('0x17f')]):_0x4b8ca3[_0xe776('0x182')]);if(_0x5bf4d4){_0x3d69b3[_0xe776('0x183')]=_0x1973ae[_0xe776('0xf2')][_0x2da7f2]['originatecalleridname']=utils['extractCalleridName'](_0x5bf4d4);_0x3d69b3[_0xe776('0x184')]=_0x422895['phone'];}_0x4b8ca3['variables']=_0x3d69b3;return ami[_0xe776('0x94')]({'actionid':_0x2da7f2,'action':_0xe776('0x161'),'channel':_0x1973ae[_0xe776('0x7f')](_0x4b8ca3[_0xe776('0x84')])?util[_0xe776('0x3d')](_0xe776('0x185'),_0x4b8ca3[_0xe776('0x84')]['name'],isNotNull(_0x4b8ca3[_0xe776('0x186')])?_0x4b8ca3[_0xe776('0x186')]['trim']()||'':'',_0x4b8ca3['dialCutDigit']>0x0?_0x422895[_0xe776('0x187')][_0xe776('0x188')](_0x4b8ca3[_0xe776('0x189')]):_0x422895[_0xe776('0x187')]):util[_0xe776('0x3d')]('SIP/%s/%s%s',_[_0xe776('0xf9')](_0x4b8ca3[_0xe776('0x85')])?_0x4b8ca3[_0xe776('0x84')][_0xe776('0x3f')]:_0x4b8ca3[_0xe776('0x85')]['name'],isNotNull(_0x4b8ca3[_0xe776('0x186')])?_0x4b8ca3[_0xe776('0x186')]['trim']()||'':'',_0x4b8ca3[_0xe776('0x189')]>0x0?_0x422895[_0xe776('0x187')][_0xe776('0x188')](_0x4b8ca3[_0xe776('0x189')]):_0x422895[_0xe776('0x187')]),'callerid':_0x5bf4d4,'Exten':'xcally-motion-dialer','Context':_0xe776('0x18a'),'Priority':'1','variable':_0x3d69b3,'timeout':(_0x4b8ca3[_0xe776('0x18b')]||0x1e)*0x3e8,'async':!![],'channelid':_0x2da7f2})[_0xe776('0x35')](function(_0x3e19fe){return _0xd38a6d(_0x3e19fe);})['catch'](function(_0x286863){_0x4b8ca3['outboundOriginateFailureCallsDay']+=0x1;var _0x547ccc=new History(_0x1973ae['actions'][_0x2da7f2]);logger[_0xe776('0x5f')](util[_0xe776('0x3d')]('[originateError]:\x20%s',JSON[_0xe776('0x6c')](_0x286863)));_0x547ccc[_0xe776('0xd7')]=0xe;_0x547ccc[_0xe776('0x67')]=_0xe776('0x18c');_0x547ccc[_0xe776('0x69')]=moment()[_0xe776('0x3d')](_0xe776('0xc2'));_0x547ccc[_0xe776('0x68')]=_0x547ccc[_0xe776('0x69')];hopperUtils['createHistory'](_0x547ccc)[_0xe776('0x9a')](loggerCatch('[originate][error]'));_0x1973ae['moveContactManagedDialer'](_0x547ccc)['catch'](loggerCatch('[originate][error]'))[_0xe776('0x101')](function(){delete _0x1973ae[_0xe776('0xf2')][_0x2da7f2];return _0x2d51e7(msgResponse(_0xe776('0x161'),_0xe776('0x7e'),_0xe776('0x18d')));});});});};Dialer[_0xe776('0x16')][_0xe776('0x18e')]=function(_0x5f46d1,_0x2bb000,_0x1d08df){var _0x1bdff1=new History(_0x2bb000);if(_0x1bdff1[_0xe776('0x122')]+_0x1bdff1[_0xe776('0x123')]+_0x1bdff1['countnoanswerretry']+_0x1bdff1[_0xe776('0x125')]+_0x1bdff1[_0xe776('0xda')]+_0x1bdff1[_0xe776('0xe8')]+_0x1bdff1[_0xe776('0x11e')]+_0x1bdff1[_0xe776('0x126')]>=_0x1d08df['dialGlobalMaxRetry']-0x1){return!![];}switch(_0x5f46d1){case 0x3:if(_0x1bdff1[_0xe776('0x124')]>=_0x1d08df[_0xe776('0x18f')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countnoanswerretry':_0x1bdff1[_0xe776('0x124')]+=0x1,'scheduledat':moment()[_0xe776('0xde')](_0x1d08df[_0xe776('0x190')],_0xe776('0xed'))[_0xe776('0x3d')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x1bdff1[_0xe776('0xdf')],'ListId':_0x1bdff1[_0xe776('0xee')],'VoiceQueueId':_0x1bdff1[_0xe776('0xe0')]||undefined,'CampaignId':_0x1bdff1[_0xe776('0xef')]||undefined})[_0xe776('0x9a')](loggerCatch(_0xe776('0x191')));break;case 0x5:if(_0x1bdff1[_0xe776('0x122')]>=_0x1d08df[_0xe776('0x192')]-0x1){return!![];}hopperUtils[_0xe776('0xdd')]({'active':![],'countbusyretry':_0x1bdff1['countbusyretry']+=0x1,'scheduledat':moment()[_0xe776('0xde')](_0x1d08df[_0xe776('0x193')],_0xe776('0xed'))['format'](_0xe776('0xc2')),'ContactId':_0x1bdff1['ContactId'],'ListId':_0x1bdff1[_0xe776('0xee')],'VoiceQueueId':_0x1bdff1['VoiceQueueId']||undefined,'CampaignId':_0x1bdff1['CampaignId']||undefined})[_0xe776('0x9a')](loggerCatch(_0xe776('0x194')));break;case 0x8:if(_0x1bdff1[_0xe776('0x123')]>=_0x1d08df['dialCongestionMaxRetry']-0x1){return!![];}hopperUtils[_0xe776('0xdd')]({'active':![],'countcongestionretry':_0x1bdff1['countcongestionretry']+=0x1,'scheduledat':moment()[_0xe776('0xde')](_0x1d08df[_0xe776('0x195')],'minutes')[_0xe776('0x3d')](_0xe776('0xc2')),'ContactId':_0x1bdff1[_0xe776('0xdf')],'ListId':_0x1bdff1['ListId'],'VoiceQueueId':_0x1bdff1[_0xe776('0xe0')]||undefined,'CampaignId':_0x1bdff1['CampaignId']||undefined})['catch'](loggerCatch('[rescheduleContact]\x20[Congestion]'));break;case 0x0:if(_0x1bdff1[_0xe776('0x125')]>=_0x1d08df[_0xe776('0x196')]-0x1){return!![];}else{hopperUtils[_0xe776('0xdd')]({'active':![],'countnosuchnumberretry':_0x1bdff1[_0xe776('0x125')]+=0x1,'scheduledat':moment()['add'](_0x1d08df['dialNoSuchNumberRetryFrequency'],_0xe776('0xed'))[_0xe776('0x3d')](_0xe776('0xc2')),'ContactId':_0x1bdff1[_0xe776('0xdf')],'ListId':_0x1bdff1['ListId'],'VoiceQueueId':_0x1bdff1[_0xe776('0xe0')]||undefined,'CampaignId':_0x1bdff1[_0xe776('0xef')]||undefined})[_0xe776('0x9a')](loggerCatch(_0xe776('0x197')));}break;case 0xa:if(_0x1bdff1[_0xe776('0xda')]>=_0x1d08df[_0xe776('0xdb')]-0x1){return!![];}hopperUtils[_0xe776('0xdd')]({'active':![],'countdropretry':_0x1bdff1[_0xe776('0xda')]+=0x1,'scheduledat':moment()[_0xe776('0xde')](_0x1d08df[_0xe776('0xd5')],_0xe776('0xed'))[_0xe776('0x3d')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x1bdff1[_0xe776('0xdf')],'ListId':_0x1bdff1[_0xe776('0xee')],'VoiceQueueId':_0x1bdff1[_0xe776('0xe0')]||undefined,'CampaignId':_0x1bdff1['CampaignId']||undefined})[_0xe776('0x9a')](loggerCatch(_0xe776('0xe1')));break;case 0xb:if(_0x1bdff1['countabandonedretry']>=_0x1d08df['dialAbandonedMaxRetry']-0x1){return!![];}hopperUtils[_0xe776('0xdd')]({'active':![],'countabandonedretry':_0x1bdff1[_0xe776('0xe8')]+=0x1,'scheduledat':moment()['add'](_0x1d08df[_0xe776('0xea')],'minutes')['format'](_0xe776('0xc2')),'ContactId':_0x1bdff1['ContactId'],'ListId':_0x1bdff1[_0xe776('0xee')],'VoiceQueueId':_0x1bdff1[_0xe776('0xe0')]||undefined,'CampaignId':_0x1bdff1[_0xe776('0xef')]||undefined})[_0xe776('0x9a')](loggerCatch(_0xe776('0xf0')));break;case 0x13:if(_0x1bdff1[_0xe776('0x11e')]>=_0x1d08df[_0xe776('0x130')]-0x1){return!![];}hopperUtils[_0xe776('0xdd')]({'active':![],'countmachineretry':_0x1bdff1[_0xe776('0x11e')]+=0x1,'scheduledat':moment()['add'](_0x1d08df[_0xe776('0x198')],_0xe776('0xed'))['format'](_0xe776('0xc2')),'ContactId':_0x1bdff1[_0xe776('0xdf')],'ListId':_0x1bdff1[_0xe776('0xee')],'VoiceQueueId':_0x1bdff1[_0xe776('0xe0')]||undefined,'CampaignId':_0x1bdff1['CampaignId']||undefined})['catch'](loggerCatch(_0xe776('0x12b')));break;case 0x14:if(_0x1bdff1[_0xe776('0x126')]>=_0x1d08df[_0xe776('0x199')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countagentrejectretry':_0x1bdff1[_0xe776('0x126')]+=0x1,'scheduledat':moment()['add'](_0x1d08df[_0xe776('0x19a')],_0xe776('0xed'))['format'](_0xe776('0xc2')),'ContactId':_0x1bdff1[_0xe776('0xdf')],'ListId':_0x1bdff1['ListId'],'VoiceQueueId':_0x1bdff1[_0xe776('0xe0')]||undefined,'CampaignId':_0x1bdff1[_0xe776('0xef')]||undefined})['catch'](loggerCatch(_0xe776('0x19b')));break;default:return!![];}};Dialer[_0xe776('0x16')][_0xe776('0x19c')]=function(_0x51ccf1,_0x2dac69,_0x488288){var _0x27e9df=this;var _0x5bcfab=new History(_0x51ccf1);var _0x30bb53=![];var _0x466f3f;var _0x16b25b;return new Promise(function(_0x2387fe,_0x1e8039){if(_['isUndefined'](_0x2dac69)&&typeof _0x2dac69!=='object'){return _0x1e8039(msgResponse('[callProgressDetecting]',_0xe776('0x8a'),'entity\x20is\x20undefine'));}if(_['isUndefined'](_0x488288)&&typeof _0x488288!==_0xe776('0x160')){return _0x1e8039(msgResponse(_0xe776('0x19d'),_0xe776('0x8a'),_0xe776('0x19e')));}hopperUtils['verifyAdditionalPhones'](_0x5bcfab,_0x488288[_0xe776('0xc4')],_0x2dac69)[_0xe776('0x35')](function(_0x3f0b5b){if(_0x3f0b5b['additional']==0x1)_0x30bb53=!![];switch(_0x488288['reason']){case'0':_0x2dac69[_0xe776('0x19f')]+=0x1;_0x5bcfab[_0xe776('0xd7')]=0x0;_0x5bcfab[_0xe776('0x67')]=_0xe776('0x1a0');_0x5bcfab[_0xe776('0x125')]+=0x1;_0x5bcfab[_0xe776('0xe9')]+=0x1;ami['emit'](_0xe776('0x1a1'),ut[_0xe776('0x11f')](_0x51ccf1,'nosuchnumber'));_0x466f3f=_0x2dac69[_0xe776('0x1a2')];_0x16b25b=_0x2dac69['callAdditionalPhoneAfterMin'];hopperUtils[_0xe776('0xc7')](_0x5bcfab)[_0xe776('0x9a')](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x27e9df[_0xe776('0x18e')](0x0,_0x51ccf1,_0x2dac69)&&!_0x30bb53){if(_0x5bcfab['countnosuchnumberretry']>=_0x2dac69[_0xe776('0x196')]){_0x27e9df['createStateFinal'](_0x5bcfab,_0x2387fe,_0x1e8039,_0xe776('0x1a3'));}else{_0x27e9df[_0xe776('0x127')](_0x5bcfab,_0x2387fe,_0x1e8039,_0xe776('0x1a3'));}}break;case'3':_0x2dac69[_0xe776('0x1a4')]+=0x1;_0x5bcfab[_0xe776('0xd7')]=0x3;_0x5bcfab[_0xe776('0x67')]=_0xe776('0x1a5');_0x5bcfab['countnoanswerretry']+=0x1;_0x5bcfab['countglobal']+=0x1;var _0x1095ed=ut['buildNoAnswerEventPayload'](_0x51ccf1,_0x2dac69);ami[_0xe776('0x38')]('custom:agentnoanswer',_0x1095ed);_0x466f3f=_0x2dac69[_0xe776('0x190')];_0x16b25b=_0x2dac69['callAdditionalPhoneAfterMin'];hopperUtils[_0xe776('0xc7')](_0x5bcfab)[_0xe776('0x9a')](loggerCatch(_0xe776('0x1a6')));if(_0x27e9df[_0xe776('0x18e')](0x3,_0x51ccf1,_0x2dac69)&&!_0x30bb53){if(_0x5bcfab[_0xe776('0x124')]>=_0x2dac69[_0xe776('0x18f')]){_0x27e9df[_0xe776('0x129')](_0x5bcfab,_0x2387fe,_0x1e8039,'reason\x203\x20ringing\x20no\x20answer');}else{_0x27e9df['stateGlobal'](_0x5bcfab,_0x2387fe,_0x1e8039,'reason\x203\x20ringing\x20no\x20answer');}}break;case'5':_0x2dac69[_0xe776('0x1a7')]+=0x1;_0x5bcfab['state']=0x5;_0x5bcfab[_0xe776('0x67')]=_0xe776('0x1a8');_0x5bcfab[_0xe776('0x122')]+=0x1;_0x5bcfab[_0xe776('0xe9')]+=0x1;ami[_0xe776('0x38')](_0xe776('0x1a9'),ut['buildObj'](_0x51ccf1,_0xe776('0x1aa')));_0x466f3f=_0x2dac69['dialBusyRetryFrequency'];_0x16b25b=_0x2dac69[_0xe776('0xeb')];hopperUtils[_0xe776('0xc7')](_0x5bcfab)['catch'](loggerCatch(_0xe776('0x1ab')));if(_0x27e9df[_0xe776('0x18e')](0x5,_0x51ccf1,_0x2dac69)&&!_0x30bb53){if(_0x5bcfab[_0xe776('0x122')]>=_0x2dac69[_0xe776('0x192')]){_0x27e9df[_0xe776('0x129')](_0x5bcfab,_0x2387fe,_0x1e8039,_0xe776('0x1ac'));}else{_0x27e9df[_0xe776('0x127')](_0x5bcfab,_0x2387fe,_0x1e8039,'reason\x205\x20busy');}}break;case'8':_0x2dac69[_0xe776('0x1ad')]+=0x1;_0x5bcfab[_0xe776('0xd7')]=0x8;_0x5bcfab[_0xe776('0x67')]=_0xe776('0x1ae');_0x5bcfab[_0xe776('0x123')]+=0x1;_0x5bcfab[_0xe776('0xe9')]+=0x1;_0x466f3f=_0x2dac69[_0xe776('0x195')];_0x16b25b=_0x2dac69[_0xe776('0xeb')];ami[_0xe776('0x38')](_0xe776('0x1af'),ut['buildObj'](_0x51ccf1,_0xe776('0x1b0')));hopperUtils['createHistory'](_0x5bcfab)[_0xe776('0x9a')](loggerCatch('[syncAgentComplete][createHistory][8]'));if(_0x27e9df[_0xe776('0x18e')](0x8,_0x51ccf1,_0x2dac69)&&!_0x30bb53){if(_0x5bcfab['countcongestionretry']>=_0x2dac69[_0xe776('0x1b1')]){_0x27e9df['createStateFinal'](_0x5bcfab,_0x2387fe,_0x1e8039,_0xe776('0x1b2'));}else{_0x27e9df[_0xe776('0x127')](_0x5bcfab,_0x2387fe,_0x1e8039,'reason\x208\x20congestion');}}break;case'11':_0x2dac69[_0xe776('0x1b3')]+=0x1;_0x5bcfab[_0xe776('0xd7')]=0xb;_0x5bcfab['statedesc']=_0xe776('0xe6');_0x5bcfab[_0xe776('0xe8')]+=0x1;_0x5bcfab[_0xe776('0xe9')]+=0x1;_0x466f3f=_0x2dac69[_0xe776('0xea')];_0x16b25b=_0x2dac69[_0xe776('0xeb')];hopperUtils[_0xe776('0xc7')](_0x5bcfab)['catch'](loggerCatch(_0xe776('0xf1')));if(_0x27e9df[_0xe776('0x18e')](0xb,_0x51ccf1,_0x2dac69)&&!_0x30bb53){if(_0x5bcfab[_0xe776('0xe8')]>=_0x2dac69['dialAbandonedMaxRetry']){_0x27e9df[_0xe776('0x129')](_0x5bcfab,_0x2387fe,_0x1e8039,_0xe776('0x1b4'));}else{_0x27e9df[_0xe776('0x127')](_0x5bcfab,_0x2387fe,_0x1e8039,_0xe776('0x1b4'));}}break;case'20':_0x2dac69[_0xe776('0x1b5')]+=0x1;_0x5bcfab[_0xe776('0xd7')]=0x14;_0x5bcfab[_0xe776('0x67')]=_0xe776('0x1b6');_0x5bcfab['countagentrejectretry']+=0x1;_0x5bcfab[_0xe776('0xe9')]+=0x1;_0x466f3f=_0x2dac69['dialAgentRejectRetryFrequency'];_0x16b25b=_0x2dac69['callAdditionalPhoneAfterMin'];ami[_0xe776('0x38')](_0xe776('0x1b7'),ut[_0xe776('0x11f')](_0x51ccf1,_0xe776('0x1b8')));hopperUtils['createHistory'](_0x5bcfab)[_0xe776('0x9a')](loggerCatch('[syncAgentComplete][createHistory][20]'));if(_0x27e9df[_0xe776('0x18e')](0x14,_0x51ccf1,_0x2dac69)&&!_0x30bb53){if(_0x5bcfab['countagentrejectretry']>=_0x2dac69[_0xe776('0x199')]){_0x27e9df[_0xe776('0x129')](_0x5bcfab,_0x2387fe,_0x1e8039,_0xe776('0x1b9'));}else{_0x27e9df['stateGlobal'](_0x5bcfab,_0x2387fe,_0x1e8039,_0xe776('0x1b9'));}}break;default:_0x2dac69['outboundUnknownCallsDay']+=0x1;_0x5bcfab[_0xe776('0xd7')]=0xc;_0x5bcfab['statedesc']=_0x488288[_0xe776('0xc4')];_0x466f3f=_0x2dac69[_0xe776('0x19a')];_0x16b25b=_0x2dac69[_0xe776('0xeb')];hopperUtils['createHistory'](_0x5bcfab)[_0xe776('0x9a')](loggerCatch(_0xe776('0x1ba')));if(_0x27e9df[_0xe776('0x18e')](_0x488288[_0xe776('0xc4')],_0x51ccf1,_0x2dac69)&&!_0x30bb53){if(_0x5bcfab[_0xe776('0x122')]+_0x5bcfab[_0xe776('0x123')]+_0x5bcfab[_0xe776('0x124')]+_0x5bcfab[_0xe776('0x125')]+_0x5bcfab['countdropretry']+_0x5bcfab[_0xe776('0xe8')]+_0x5bcfab[_0xe776('0x11e')]+_0x5bcfab[_0xe776('0x126')]>=_0x2dac69['dialGlobalMaxRetry']){_0x27e9df[_0xe776('0x127')](_0x5bcfab,_0x2387fe,_0x1e8039,_0x488288[_0xe776('0xc4')]);}else{_0x27e9df[_0xe776('0x129')](_0x5bcfab,_0x2387fe,_0x1e8039,_0x488288[_0xe776('0xc4')]);}}}})['then'](function(){if(_0x30bb53){hopperUtils['swapAdditionalPhones'](_0x5bcfab,_0x466f3f,_0x16b25b)[_0xe776('0x35')](function(){return _0x2387fe(0x1);});}});});};Dialer['prototype']['stateGlobal']=function(_0x15a8b3,_0x2f7085,_0x3477c6,_0x32cf59){var _0x25800f=new Final(_0x15a8b3);_0x25800f[_0xe776('0xd7')]=0xf;_0x25800f[_0xe776('0x67')]=_0xe776('0x1bb');this[_0xe776('0x129')](_0x25800f,_0x2f7085,_0x3477c6,_0x32cf59);};Dialer['prototype']['createStateFinal']=function(_0x5076f0,_0x1c7427,_0x277607,_0x1378dc){hopperUtils[_0xe776('0xc9')](_0x5076f0)[_0xe776('0x35')](function(){return _0x1c7427(msgResponse(_0xe776('0x19d'),'Success',_0x1378dc));})[_0xe776('0x9a')](function(){return _0x277607(msgResponse(_0xe776('0x1bc'),'Failure',_0xe776('0x1bd')));});};Dialer[_0xe776('0x16')][_0xe776('0x9')]=function(_0x433a66){var _0x1873c8=_0x433a66[_0xe776('0x1be')]/0x64;var _0x34025b=_0x433a66['outboundDropCallsDayTimeout']/(_0x433a66[_0xe776('0xcf')]+_0x433a66['outboundAnswerCallsDay']);var _0x2960fa=Math[_0xe776('0x1bf')](_0x433a66[_0xe776('0x1c0')]*(_0x433a66['predictiveIntervalMaxThreshold']/0x64));var _0x3723ed=Math[_0xe776('0x1bf')](_0x433a66[_0xe776('0x1c0')]*(_0x433a66[_0xe776('0x1c1')]/0x64));var _0x514eda=_0x433a66['available']+_0x433a66[_0xe776('0x140')];var _0x595d14=Math[_0xe776('0x1c2')](_0x433a66['erlangCalls']*_0x433a66[_0xe776('0x56')]*_0x433a66['predictiveIntervalHitRate']*_0x433a66[_0xe776('0x1c3')]);if(_[_0xe776('0x37')](_0x433a66[_0xe776('0x5a')])){if(!_['isUndefined'](_0x433a66[_0xe776('0x20')])){_0x433a66[_0xe776('0x20')]=undefined;loggerPredictive['error'](_0xe776('0x1c4'),_0xe776('0x1c5'));}if(!_['isUndefined'](_0x433a66['handlePredictive'])){loggerPredictive[_0xe776('0x5f')](_0xe776('0x1c4'),_0xe776('0x1c6'));clearInterval(_0x433a66[_0xe776('0x5d')]);_0x433a66[_0xe776('0x5d')]=undefined;}_0x433a66['startProgressive']=moment()[_0xe776('0x3d')](_0xe776('0xc2'));loggerPredictive[_0xe776('0x42')](_0x433a66['name'],_0xe776('0x1c7'),_0x433a66[_0xe776('0x5a')]);this[_0xe776('0xae')](_0x433a66,0x1);}else if(ifInterval(_0x433a66['dialPredictiveInterval'],_0x433a66[_0xe776('0x5a')])){this[_0xe776('0xae')](_0x433a66,0x1);loggerPredictiveCalls[_0xe776('0x42')](_0xe776('0x1c8'),_0x433a66[_0xe776('0x5a')],_0x433a66['name']);_0x433a66[_0xe776('0x52')]=0x0;_0x433a66[_0xe776('0xd0')]=0x0;}else if(_0x1873c8<_0x34025b&&_0x433a66[_0xe776('0x1c9')]===_0xe776('0x1ca')){clearPredictiveAttributes(_0x433a66);loggerPredictive[_0xe776('0x42')]('[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day',_0x34025b,_0xe776('0x5a'),_0x433a66[_0xe776('0x3f')]);}else if(_0x595d14<_0x433a66[_0xe776('0xd0')]&&_0x433a66[_0xe776('0x1c9')]===_0xe776('0x1ca')){clearPredictiveAttributes(_0x433a66);loggerPredictive[_0xe776('0x42')](_0xe776('0x1cb'),_0xe776('0x1cc'),_0x595d14,_0xe776('0x1cd'),_0x433a66['predictiveIntervalErlangCallsDroppedCalls'],_0xe776('0x5a'),_0x433a66['name']);}else if(!ifInterval(_0x433a66['dialPredictiveInterval'],_0x433a66['startProgressive'])&&_[_0xe776('0x37')](_0x433a66['startPredictive'])&&!_['isUndefined'](_0x433a66['startProgressive'])){_0x433a66[_0xe776('0x20')]=moment()[_0xe776('0x3d')]('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive[_0xe776('0x42')](_0x433a66[_0xe776('0x3f')],'started\x20in\x20predictive\x20at',_0x433a66[_0xe776('0x20')]);hopperUtils[_0xe776('0x1ce')](_0x433a66[_0xe776('0x1cf')])['then'](this[_0xe776('0x1d0')](_0x433a66))[_0xe776('0x35')](mergeDataErlangB(_0x433a66))[_0xe776('0x35')](this['startMethodPredictive'](_0x433a66))[_0xe776('0x9a')](loggerCatchPredictive(_0xe776('0x1d1'),_0x433a66));}else if(!ifInterval(_0x433a66['dialPredictiveInterval'],_0x433a66['startPredictive'])){_0x433a66[_0xe776('0xd0')]=0x0;_0x433a66[_0xe776('0x20')]=moment()[_0xe776('0x3d')](_0xe776('0xc2'));loggerPredictive[_0xe776('0x42')](_0x433a66[_0xe776('0x3f')],_0xe776('0x1d2'),_0x433a66[_0xe776('0x20')]);clearInterval(_0x433a66[_0xe776('0x5d')]);_0x433a66[_0xe776('0x5d')]=undefined;hopperUtils[_0xe776('0x1ce')](_0x433a66[_0xe776('0x1cf')])[_0xe776('0x35')](this['getDataPredictive'](_0x433a66))[_0xe776('0x35')](mergeDataErlangB(_0x433a66))[_0xe776('0x35')](this['startMethodPredictive'](_0x433a66))['catch'](loggerCatchPredictive('Predictive\x20for\x20every\x20interval',_0x433a66));}else if(_0x433a66[_0xe776('0x1c0')]&&_0x514eda<_0x433a66[_0xe776('0x1c0')]-_0x3723ed){clearPredictiveAttributes(_0x433a66);loggerPredictive['info'](_0x433a66[_0xe776('0x3f')],'switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',_0x514eda,_0xe776('0x1d3'),_0x433a66[_0xe776('0x1c0')],'-',_0x3723ed,'=',_0x433a66[_0xe776('0x1c0')]-_0x3723ed,')');}else if(_0x433a66['predictiveIntervalAvailable']&&_0x514eda>_0x433a66[_0xe776('0x1c0')]+_0x2960fa){clearPredictiveAttributes(_0x433a66);loggerPredictive['info'](_0x433a66[_0xe776('0x3f')],_0xe776('0x1d4'),_0x514eda,_0xe776('0x1d5'),_0x433a66[_0xe776('0x1c0')],'+',_0x2960fa,'=',_0x433a66['predictiveIntervalAvailable']+_0x2960fa,')');}};Dialer[_0xe776('0x16')][_0xe776('0x1d0')]=function(_0x516281){var _0x30d487=this;return function(_0x43f443){return new Promise(function(_0x4390a3,_0x3ca0cb){_[_0xe776('0x58')](_0x516281,_0x43f443[0x0]);if(checkGetDataPredictive(_0x43f443[0x0])){var _0x3599d4=_0x516281[_0xe776('0x1c0')]=_0x516281[_0xe776('0x140')]+_0x516281[_0xe776('0x13e')];var _0x1b4c84=_0x516281[_0xe776('0x1cf')]*0x3c;var _0x3c0078=_0x43f443[0x0]['predictiveIntervalAvgTalktime']+_0x43f443[0x0][_0xe776('0x4a')];var _0x47798a=(_0x43f443[0x0][_0xe776('0x46')]+_0x43f443[0x0][_0xe776('0x48')]+_0x43f443[0x0][_0xe776('0x49')])/_0x43f443[0x0]['predictiveIntervalTotalCalls'];_0x516281[_0xe776('0x1d6')]=_0x47798a>0x0?_0x47798a:0x1;switch(_0x516281[_0xe776('0x1c9')]){case _0xe776('0x1ca'):var _0x3bfb5b=_0x516281[_0xe776('0x1be')]/0x64;return _0x30d487[_0xe776('0x1d7')](_0x3599d4,_0x1b4c84,_0x3c0078,_0x47798a,_0x3bfb5b)[_0xe776('0x35')](function(_0x645524){return _0x4390a3(_0x645524);});case _0xe776('0x1d8'):var _0x50b5df=_0x516281[_0xe776('0x1be')]/0x64;return _0x30d487[_0xe776('0x1d9')](_0x3599d4,_0x1b4c84,_0x3c0078,_0x47798a,_0x50b5df)[_0xe776('0x35')](function(_0x426471){return _0x4390a3(_0x426471);});default:return _0x3ca0cb(msgResponse(_0xe776('0x1da'),'Failure','Unknown\x20Predictive'));}}else{return _0x3ca0cb(msgResponse('[getDataPredictive]','Failure',_0xe776('0x1db')));}});};};Dialer[_0xe776('0x16')][_0xe776('0x1dc')]=function(_0xcd9db6){var _0x41bfd0=this;return function(_0x260499){return new Promise(function(_0x578f7f,_0x2989bb){_[_0xe776('0x58')](_0xcd9db6,_0x260499[0x0]);if(checkGetDataPredictive(_0x260499[0x0])){loggerPredictive[_0xe776('0x42')](JSON[_0xe776('0x6c')](_0x260499[0x0]));if(_0xcd9db6[_0xe776('0x1c9')]===_0xe776('0x1ca')){return _0x41bfd0[_0xe776('0x1dd')](_0xcd9db6['id'])[_0xe776('0x35')](function(_0x31b8d1){var _0x405f06=_0xcd9db6[_0xe776('0x1de')]-_0x31b8d1[0x0][_0xe776('0x1df')];var _0x4a08e8=_0xcd9db6['dialPredictiveInterval']*0x3c;var _0xd48bda=_0x260499[0x0][_0xe776('0x4d')]+_0x260499[0x0]['predictiveIntervalAvgHoldtime'];var _0xed1e69=(_0x260499[0x0]['predictiveIntervalAnsweredCalls']+_0x260499[0x0][_0xe776('0x48')]+_0x260499[0x0][_0xe776('0x49')])/_0x260499[0x0][_0xe776('0x44')];var _0xf6d7c2=_0xcd9db6['dialPredictiveOptimizationPercentage']/0x64;_0xcd9db6[_0xe776('0x1e0')]=_0x31b8d1[0x0][_0xe776('0x1df')]||0x0;_0xcd9db6['predictiveIntervalHitRate']=_0xed1e69>0x0?_0xed1e69:0x1;return _0x41bfd0['abandonmentRate'](_0x405f06,_0x4a08e8,_0xd48bda,_0xed1e69,_0xf6d7c2);})['then'](function(_0x413119){return _0x578f7f(_0x413119);})['catch'](function(_0x588d78){return _0x2989bb(msgResponse(_0xe776('0x1e1'),_0xe776('0x8a'),JSON[_0xe776('0x6c')](_0x588d78)));});}if(_0xcd9db6[_0xe776('0x1c9')]===_0xe776('0x1d8')){return _0x41bfd0[_0xe776('0x1dd')](_0xcd9db6['id'])['then'](function(_0x44fe68){var _0x3b3c76=_0xcd9db6[_0xe776('0x1de')]-_0x44fe68[0x0][_0xe776('0x1df')];var _0x168bc8=_0xcd9db6[_0xe776('0x1cf')]*0x3c;var _0x3c5253=_0x260499[0x0][_0xe776('0x4d')]+_0x260499[0x0]['predictiveIntervalAvgHoldtime'];var _0x26cc98=(_0x260499[0x0][_0xe776('0x46')]+_0x260499[0x0][_0xe776('0x48')]+_0x260499[0x0][_0xe776('0x49')])/_0x260499[0x0][_0xe776('0x44')];var _0x594a15=_0xcd9db6['dialPredictiveOptimizationPercentage']/0x64;_0xcd9db6['predictiveIntervalPauses']=_0x44fe68[0x0][_0xe776('0x1df')]||0x0;_0xcd9db6[_0xe776('0x1d6')]=_0x26cc98>0x0?_0x26cc98:0x1;return _0x41bfd0[_0xe776('0x1d9')](_0x3b3c76,_0x168bc8,_0x3c5253,_0x26cc98,_0x594a15);})['then'](function(_0x17c064){return _0x578f7f(_0x17c064);})['catch'](function(_0x11d539){return _0x2989bb(msgResponse(_0xe776('0x1e1'),_0xe776('0x8a'),JSON['stringify'](_0x11d539)));});}}else{return _0x2989bb(msgResponse(_0xe776('0x1da'),_0xe776('0x8a'),_0xe776('0x1db')));}});};};Dialer[_0xe776('0x16')][_0xe776('0x1e2')]=function(_0x20f8b6){var _0x57c1b7=this;return function(){var _0x1240b7=0x0;var _0xb813e2=Math[_0xe776('0x1c2')](_0x20f8b6['erlangCallToSecond']*0x3e8);if(_0xb813e2>0x0){_0xb813e2=_0xb813e2<0x64?0x64:_0xb813e2;loggerPredictive['info'](_0x20f8b6[_0xe776('0x3f')],_0xe776('0x1e3'),_0xb813e2,'milliseconds');_0x20f8b6[_0xe776('0x5d')]=setInterval(function(){_0x57c1b7[_0xe776('0x5d')](_0x20f8b6);loggerPredictiveCalls[_0xe776('0x42')](_0xe776('0x1e4'),_0x1240b7+=0x1);},_0xb813e2);}else{loggerPredictive[_0xe776('0x42')](_0x20f8b6['name'],_0xe776('0x1e5'));}};};Dialer[_0xe776('0x16')][_0xe776('0x1e6')]=function(_0x1e3aa3,_0x5e4d14){var _0x2fd816=this;return function(_0x3f221b){if(_[_0xe776('0x41')](_0x3f221b)){if(_[_0xe776('0xf9')](_0x5e4d14[_0xe776('0x15b')])||!_0x5e4d14[_0xe776('0x1e7')]){if(_0x1e3aa3[_0xe776('0xac')]==='booked'){_0x1e3aa3[_0xe776('0x6a')]=_[_0xe776('0x37')](_0x1e3aa3[_0xe776('0x6a')])?!![]:_0x1e3aa3['queueStatusComplete'];var _0x1d5d8e=uuid['v4']();_0x2fd816['actions'][_0x1d5d8e]=new Action(_0x1e3aa3,_0x5e4d14,_0x1d5d8e);loggerBooked[_0xe776('0x42')](_0xe776('0x1e8'),_0x1d5d8e,_0xe776('0x1e9'),JSON[_0xe776('0x6c')](_0x1e3aa3['queueStatusComplete']),_0xe776('0x1ea'),_0x1e3aa3[_0xe776('0x3f')]);if(_0x1e3aa3['queueStatusComplete']){_0x1e3aa3[_0xe776('0x6a')]=![];_0x2fd816['queueBooked'][_0x2fd816[_0xe776('0xf2')][_0x1d5d8e]['queue']]=[];ami[_0xe776('0x94')]({'actionid':_0x1d5d8e,'action':'queuestatus','queue':_0x1e3aa3[_0xe776('0x3f')]})['catch'](function(){_0x2fd816[_0xe776('0xc0')](_0x1e3aa3);hopperUtils[_0xe776('0xdd')]({'active':![],'ContactId':_0x2fd816[_0xe776('0xf2')][_0x1d5d8e]['ContactId'],'ListId':_0x2fd816[_0xe776('0xf2')][_0x1d5d8e][_0xe776('0xee')],'VoiceQueueId':_0x2fd816[_0xe776('0xf2')][_0x1d5d8e]['VoiceQueueId']||undefined,'CampaignId':_0x2fd816[_0xe776('0xf2')][_0x1d5d8e][_0xe776('0xef')]||undefined})[_0xe776('0x9a')](loggerCatch(_0xe776('0x1eb')));delete _0x2fd816[_0xe776('0xf2')][_0x1d5d8e];});}else{loggerBooked['info'](_0xe776('0x1ec'),JSON[_0xe776('0x6c')](_0x1e3aa3[_0xe776('0x6a')]),_0xe776('0x1ea'),_0x1e3aa3[_0xe776('0x3f')]);_0x2fd816[_0xe776('0xc0')](_0x1e3aa3);hopperUtils[_0xe776('0xdd')]({'active':![],'ContactId':_0x2fd816[_0xe776('0xf2')][_0x1d5d8e][_0xe776('0xdf')],'ListId':_0x2fd816[_0xe776('0xf2')][_0x1d5d8e]['ListId'],'VoiceQueueId':_0x2fd816[_0xe776('0xf2')][_0x1d5d8e][_0xe776('0xe0')]||undefined,'CampaignId':_0x2fd816['actions'][_0x1d5d8e][_0xe776('0xef')]||undefined})[_0xe776('0x9a')](loggerCatch(_0xe776('0x1eb')));delete _0x2fd816[_0xe776('0xf2')][_0x1d5d8e];}}else{return _0x2fd816[_0xe776('0x15f')](_0x1e3aa3,_0x5e4d14);}}else{if(utils[_0xe776('0x59')](undefined,_0x5e4d14[_0xe776('0x1ed')])<_0x1e3aa3[_0xe776('0x1ee')]*0x3c){if(_0x5e4d14['Agent']&&!_0x5e4d14[_0xe776('0x14b')]['voicePause']){_0x2fd816[_0xe776('0xfe')][_0xe776('0xff')](_0x5e4d14['id'])[_0xe776('0x101')](function(){_0x2fd816[_0xe776('0xc0')](_0x1e3aa3);});}else{hopperUtils[_0xe776('0x1ef')]({'active':![]},_0x5e4d14['id'],0x1)[_0xe776('0x101')](function(){_0x2fd816[_0xe776('0xc0')](_0x1e3aa3);});}}else{_0x1e3aa3[_0xe776('0x1f0')]+=0x1;_0x2fd816[_0xe776('0xc0')](_0x1e3aa3);if(_0x1e3aa3[_0xe776('0x1f1')]){hopperUtils['rescheduleContact']({'active':![],'recallme':![],'UserId':null,'ContactId':_0x5e4d14[_0xe776('0xdf')],'ListId':_0x5e4d14[_0xe776('0xee')],'VoiceQueueId':_0x5e4d14['VoiceQueueId']||undefined,'CampaignId':_0x5e4d14[_0xe776('0xef')]||undefined})[_0xe776('0x9a')](loggerCatch('[rescheduleContact][dialRecallInQueue]'));hopperUtils[_0xe776('0xc7')](createObjHistory(_0x1e3aa3,_0x5e4d14,utils[_0xe776('0x66')][_0xe776('0x1f2')],0x17,_0xe776('0x1f3')))['catch'](loggerCatch('[Originate][HistoryDialRecallInQueue][historyCatch]'));}else{_0x2fd816['saveInDb'](createObjHistory(_0x1e3aa3,_0x5e4d14,utils[_0xe776('0x66')][_0xe776('0x1f4')],0x16,_0xe776('0x1f5')),_0xe776('0x1f6'),_0xe776('0x1f7'));}}}}else{_0x1e3aa3[_0xe776('0x1f8')]+=0x1;_0x2fd816[_0xe776('0x119')](createObjHistory(_0x1e3aa3,_0x5e4d14,utils[_0xe776('0x66')][_0xe776('0x1f9')],0xd,'Blacklist'),_0xe776('0x1fa'),'[Originate][MoveBlacklist]');throw _0xe776('0x1fb');}};};Dialer[_0xe776('0x16')]['handleIvr']=function(_0x5a4d8d){var _0x3b224a=this;var _0x2098f5=_0x5a4d8d[_0xe776('0x1fc')]-_0x5a4d8d[_0xe776('0x78')];emitCampaignSummary(_0x5a4d8d);if(_0x2098f5>0x0&&_0x5a4d8d[_0xe776('0x61')]==0x0){if(_0x2098f5>this[_0xe776('0x1c')]){_0x2098f5=this[_0xe776('0x1c')];}_0x5a4d8d['temp']=0x1;hopperUtils[_0xe776('0x1fd')](_0x5a4d8d,_0x2098f5)[_0xe776('0x35')](function(_0x5daf08){_0x5a4d8d[_0xe776('0x61')]=0x0;if(_0x5daf08){if(!utils[_0xe776('0x1fe')](_0x5daf08)){_0x5a4d8d[_0xe776('0x65')]=utils[_0xe776('0x66')]['NO_AVAILABLE_CONTACTS'];logger[_0xe776('0x42')](_0xe776('0x1ff')+_0x5a4d8d[_0xe776('0x3f')]);}else{_0x5a4d8d['originated']+=_0x5daf08[_0xe776('0x92')];_0x5a4d8d[_0xe776('0x65')]=utils['CAMPAIGN_STATUS'][_0xe776('0x200')];for(var _0x42be79=0x0;_0x42be79<_0x5daf08[_0xe776('0x92')];_0x42be79+=0x1){_0x5a4d8d[_0xe776('0x201')]+=0x1;if(_[_0xe776('0xf9')](_0x5daf08[_0x42be79])||_[_0xe776('0xf9')](_0x5daf08[_0x42be79]['Contact'])||_[_0xe776('0xf9')](_0x5daf08[_0x42be79][_0xe776('0x187')])){_0x3b224a[_0xe776('0x159')]('[actionOriginate]\x20',_0x5a4d8d,_0x5daf08[_0x42be79]);}else{hopperUtils['checkIsBlackListIvr'](_[_0xe776('0x6d')](_0x5daf08[_0x42be79],[_0xe776('0xef'),_0xe776('0x187')]))[_0xe776('0x35')](_0x3b224a['checkContactBlack'](_0x5a4d8d,_0x5daf08[_0x42be79]))[_0xe776('0x9a')](_0x3b224a[_0xe776('0x158')]('[actionOriginateIvr]\x20',_0x5a4d8d));}}}}})[_0xe776('0x9a')](loggerGetContactDialer(_0xe776('0x202'),_0x5a4d8d,_0x2098f5));}};Dialer[_0xe776('0x16')][_0xe776('0xae')]=function(_0x5e3fed,_0x50c7b0){var _0x34d89a=this;var _0x22385b=[];if(_0x50c7b0<0x1||_0x5e3fed[_0xe776('0xac')]===_0xe776('0xb1')){_0x50c7b0=0x1;}var _0x5534bd=Math[_0xe776('0x1c2')](_0x5e3fed[_0xe776('0x13e')]*_0x50c7b0)-_0x5e3fed[_0xe776('0x78')];if(_0x5e3fed[_0xe776('0x203')]>0x0){var _0x130b0a=_0x5e3fed[_0xe776('0x203')]-_0x5e3fed[_0xe776('0x78')]-_0x5e3fed['talking']-_0x5e3fed[_0xe776('0x141')];if(_0x5534bd>_0x130b0a){_0x5534bd=_0x130b0a;}}if(_0x5534bd>0x0&&_0x5e3fed['temp']==0x0){if(_0x5e3fed[_0xe776('0xac')]===_0xe776('0xb1')){_0x5534bd=0x1;}if(_0x5534bd>this[_0xe776('0x1c')]){_0x5534bd=this[_0xe776('0x1c')];}for(var _0x34157c in this[_0xe776('0x1a')]){if(typeof this[_0xe776('0x1a')][_0x34157c]!==_0xe776('0xa4')){if(this[_0xe776('0x1a')][_0x34157c][_0xe776('0xd7')]===_0xe776('0x204')&&this[_0xe776('0x1a')][_0x34157c][_0xe776('0x81')]==='reachable'){_0x22385b[_0xe776('0x93')](this[_0xe776('0x1a')][_0x34157c]['id']);}}}_0x5e3fed['temp']=0x1;hopperUtils['getContactDialer'](_0x5e3fed,_0x22385b,_0x5534bd)[_0xe776('0x35')](function(_0x38e2ca){_0x5e3fed[_0xe776('0x61')]=0x0;if(_0x38e2ca){if(!utils[_0xe776('0x1fe')](_0x38e2ca)){hopperUtils[_0xe776('0x205')](_0x5e3fed)[_0xe776('0x35')](sendMessageReschedule(_0x5e3fed))[_0xe776('0x9a')](loggerCatch(_0xe776('0x206')));}else{_0x5e3fed[_0xe776('0x78')]+=_0x38e2ca[_0xe776('0x92')];_0x5e3fed['message']=_0x5e3fed[_0xe776('0xac')]==='booked'?utils['CAMPAIGN_STATUS'][_0xe776('0x142')]:utils[_0xe776('0x66')][_0xe776('0x200')];for(var _0x4c63cc=0x0;_0x4c63cc<_0x38e2ca[_0xe776('0x92')];_0x4c63cc+=0x1){if(_[_0xe776('0xf9')](_0x38e2ca[_0x4c63cc])||_[_0xe776('0xf9')](_0x38e2ca[_0x4c63cc]['Contact'])||_[_0xe776('0xf9')](_0x38e2ca[_0x4c63cc][_0xe776('0x187')])){_0x34d89a[_0xe776('0x159')](_0xe776('0x207'),_0x5e3fed,_0x38e2ca[_0x4c63cc]);}else{hopperUtils[_0xe776('0x208')](_[_0xe776('0x6d')](_0x38e2ca[_0x4c63cc],[_0xe776('0xe0'),_0xe776('0x187')]))[_0xe776('0x35')](_0x34d89a[_0xe776('0x1e6')](_0x5e3fed,_0x38e2ca[_0x4c63cc]))['catch'](_0x34d89a[_0xe776('0x158')](_0xe776('0x207'),_0x5e3fed));}}}}})[_0xe776('0x9a')](loggerGetContactDialer(_0xe776('0x209'),_0x5e3fed,_0x5534bd));}};Dialer[_0xe776('0x16')]['handlePredictive']=function(_0x2d0250){if(_0x2d0250['dialLimitQueue']>0x0){var _0x4e8cd2=_0x2d0250['dialLimitQueue']-_0x2d0250[_0xe776('0x78')]-_0x2d0250[_0xe776('0x140')];if(_0x4e8cd2>0x0&&_0x2d0250[_0xe776('0x61')]==0x0){this['tryOriginatePredictive'](_0x2d0250);}else{loggerPredictiveCalls[_0xe776('0x42')]('[handlePredictive][limitChannel]');}}else{this[_0xe776('0x20a')](_0x2d0250);}};Dialer[_0xe776('0x16')]['tryOriginatePredictive']=function(_0x1c8da2){var _0x1567c8=this;var _0x20a0e5=[];_0x1c8da2[_0xe776('0x78')]+=0x1;for(var _0x605439 in this[_0xe776('0x1a')]){if(typeof this[_0xe776('0x1a')][_0x605439]!==_0xe776('0xa4')){if(this[_0xe776('0x1a')][_0x605439][_0xe776('0xd7')]===_0xe776('0x204')&&this[_0xe776('0x1a')][_0x605439]['status']===_0xe776('0x82')){_0x20a0e5['push'](this[_0xe776('0x1a')][_0x605439]['id']);}}}_0x1c8da2['temp']=0x1;return this[_0xe776('0x20b')](_0x1c8da2['id'],_0x20a0e5,0x1,_0x1c8da2['dialOrderByScheduledAt'],_0x1c8da2)[_0xe776('0x35')](function(_0x3ea580){_0x1c8da2[_0xe776('0x61')]=0x1;if(_0x3ea580){if(!utils[_0xe776('0x1fe')](_0x3ea580)){utils[_0xe776('0x60')](_0x1c8da2,0x1,0x0);return hopperUtils[_0xe776('0x205')](_0x1c8da2)[_0xe776('0x35')](sendMessageReschedule(_0x1c8da2))[_0xe776('0x9a')](loggerCatch(_0xe776('0x206')));}else{_0x1c8da2[_0xe776('0x65')]=utils[_0xe776('0x66')][_0xe776('0x200')];if(_['isNil'](_0x3ea580[0x0])||_[_0xe776('0xf9')](_0x3ea580[0x0][_0xe776('0x17b')])||_['isNil'](_0x3ea580[0x0][_0xe776('0x187')])){_0x1567c8['emptyContact'](_0xe776('0x207'),_0x1c8da2,_0x3ea580[0x0]);}else{return hopperUtils[_0xe776('0x208')](_['pick'](_0x3ea580[0x0],[_0xe776('0xe0'),'phone']))[_0xe776('0x35')](_0x1567c8[_0xe776('0x1e6')](_0x1c8da2,_0x3ea580[0x0]))[_0xe776('0x9a')](_0x1567c8[_0xe776('0x158')](_0xe776('0x20c'),_0x1c8da2));}}}})[_0xe776('0x9a')](loggerGetContactDialer(_0xe776('0x20d'),_0x1c8da2,0x1));};Dialer[_0xe776('0x16')][_0xe776('0x1d7')]=function(_0x1df1de,_0x520378,_0xa11291,_0x58a294,_0x12eda6,_0x55042e){loggerPredictive[_0xe776('0x42')](_0xe776('0x20e'));loggerPredictive['info'](_0xe776('0x20f'),_0x1df1de);loggerPredictive['info'](_0xe776('0x210'),_0x520378);loggerPredictive[_0xe776('0x42')](_0xe776('0x211'),_0xa11291);loggerPredictive[_0xe776('0x42')]('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',_0x58a294);loggerPredictive['info'](_0xe776('0x212'),_0x12eda6);loggerPredictive['info'](_0xe776('0x4c'));return new Promise(function(_0x2de1d9,_0x2b4444){if(_0x1df1de<=0x0||isNaN(_0x1df1de)){return _0x2b4444(msgResponse(_0xe776('0x213'),_0xe776('0x7e'),'m\x20=\x20'+_0x1df1de));}if(_0xa11291<=0x0||isNaN(_0xa11291)){return _0x2b4444(msgResponse('[abandonmentRate]','Error',_0xe776('0x214')+_0xa11291));}if(_0x58a294<=0x0||isNaN(_0x58a294)){return _0x2b4444(msgResponse('[abandonmentRate]','Error',_0xe776('0x215')+_0x58a294));}if(_0x520378<=0x0||isNaN(_0x520378)){return _0x2b4444(msgResponse(_0xe776('0x213'),_0xe776('0x7e'),'interval\x20=\x20'+_0x520378));}if(_0x12eda6<=0x0||isNaN(_0x12eda6)){return _0x2b4444(msgResponse(_0xe776('0x213'),'Error',_0xe776('0x216')+_0x12eda6));}_0x55042e=_0x55042e||0x0;var _0x336aa6=0x1/_0xa11291;var _0x4a1fd2=0x0;var _0x14b495=0x0;var _0x5cd99c=0x0;var _0x14e930=0x0;for(var _0x4a1338=0x0;_0x5cd99c<_0x12eda6;_0x4a1338+=0x1){_0x14b495=_0x4a1338/_0x520378;_0x4a1fd2=(_0x58a294*_0x14b495+_0x55042e)/_0x336aa6;_0x5cd99c=utils[_0xe776('0x217')](_0x4a1fd2,_0x1df1de);_0x14e930=_0x4a1fd2/_0x1df1de*(0x1-utils[_0xe776('0x217')](_0x4a1fd2,_0x1df1de));}return _0x2de1d9({'erlangCalls':_0x4a1338,'erlangCallToSecond':_0x520378/_0x4a1338,'erlangAbandonmentRate':_0x5cd99c,'erlangBusyFactor':_0x14e930});});};Dialer[_0xe776('0x16')][_0xe776('0x1d9')]=function(_0x54e483,_0x34f8e4,_0x2b1112,_0x17710d,_0xf5b300,_0xdff60c){loggerPredictive[_0xe776('0x42')](_0xe776('0x218'));loggerPredictive[_0xe776('0x42')]('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',_0x54e483);loggerPredictive['info'](_0xe776('0x210'),_0x34f8e4);loggerPredictive[_0xe776('0x42')](_0xe776('0x211'),_0x2b1112);loggerPredictive[_0xe776('0x42')]('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',_0x17710d);loggerPredictive[_0xe776('0x42')](_0xe776('0x219'),_0xf5b300);loggerPredictive[_0xe776('0x42')](_0xe776('0x4c'));return new Promise(function(_0x1ba984,_0x118057){if(_0x54e483<=0x0||isNaN(_0x54e483)){return _0x118057(msgResponse('[busyFactor]',_0xe776('0x7e'),_0xe776('0x21a')+_0x54e483));}if(_0x2b1112<=0x0||isNaN(_0x2b1112)){return _0x118057(msgResponse(_0xe776('0x21b'),_0xe776('0x7e'),'Ts\x20=\x20'+_0x2b1112));}if(_0x17710d<=0x0||isNaN(_0x17710d)){return _0x118057(msgResponse('[busyFactor]',_0xe776('0x7e'),_0xe776('0x215')+_0x17710d));}if(_0x34f8e4<=0x0||isNaN(_0x34f8e4)){return _0x118057(msgResponse(_0xe776('0x21b'),'Error','interval\x20=\x20'+_0x34f8e4));}if(_0xf5b300<=0x0||isNaN(_0xf5b300)){return _0x118057(msgResponse(_0xe776('0x21b'),'Error',_0xe776('0x21c')+_0xf5b300));}_0xdff60c=_0xdff60c||0x0;var _0x149608=0x1/_0x2b1112;var _0x3ad638=0x0;var _0x597a03=0x0;var _0x3be4ee=0x0;var _0x175885=0x0;for(var _0x4bf099=0x0;_0x175885<_0xf5b300;_0x4bf099+=0x1){_0x597a03=_0x4bf099/_0x34f8e4;_0x3ad638=(_0x17710d*_0x597a03+_0xdff60c)/_0x149608;_0x3be4ee=utils[_0xe776('0x217')](_0x3ad638,_0x54e483);_0x175885=_0x3ad638/_0x54e483*(0x1-utils[_0xe776('0x217')](_0x3ad638,_0x54e483));}return _0x1ba984({'erlangCalls':_0x4bf099,'erlangCallToSecond':_0x34f8e4/_0x4bf099,'erlangAbandonmentRate':_0x3be4ee,'erlangBusyFactor':_0x175885});});};module[_0xe776('0x21d')]=Dialer;
\ No newline at end of file