Built motion from commit 6a92c2cd.|2.6.29
[motion2.git] / server / services / ami / dialer / index.js
index 4f4395c..7319a74 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4539=['prototype','isTrunkReachable','TrunkBackup','TRUNK_NOT_REACHABLE','\x20trunk\x20is\x20not\x20reachable','ifTimeIvr','checkIfTimeIntervals','ifTime','\x20Intervals\x20is\x20null\x20','EMPTY_INTERVAL','\x20Intervals\x20is\x20empty\x20','UNKNOWN_TIMEZONE','Failure','\x20Timezone\x20unknow\x20','length','push','Action','then','content','true','command','iftime\x20%s,%s','timezones','catch','OVERTIME_GLOBAL_INTERVAL','[ifTime][promiseAll]','Global:\x20','\x20Interval\x20is\x20overtime:\x20','syncCampaigns','isIVRCampaignActive','resolve','checkIfTime','dialGlobalInterval','dialTimezone','launchHandleIvr','[syncCampaigns]','checkDialMethod','dialMethod','handlePower','power','Queue','method\x20not\x20recognized','silly','Dialer::ifTime()','Voice\x20Queue\x20%s\x20$s','intervalIftime','OVERTIME_INTERVAL','Timezone:\x20','Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:','AMI\x20IfTime','queue','uniqueid','ivr','updateOriginated','uniqueId','YYYY-MM-DD\x20HH:mm:ss','syncAgentComplete','outboundAnswerCallsDay','agent','agiafterat','dialAgiAfterHangupAgent','createHistory','[syncAgentComplete][createHistory]','moveContactManagedDialer','[syncAgentComplete]','droptime','dialQueueTimeout','predictiveIntervalDroppedCallsTimeout','outboundDropCallsDayTimeout','predictiveIntervalErlangCallsDroppedCalls','statedesc','Drop','dropreason','TIMEOUT','dialQueueProject2','countdropretry','countglobal','dialDropRetryFrequency','callAdditionalPhoneAfterMin','verifyAdditionalPhones','voiceQueue','dialDropMaxRetry','additional','rescheduleContact','add','minutes','ContactId','ListId','VoiceQueueId','CampaignId','[rescheduleContact][Drop]','calleridname','calleridnum','[syncAgentComplete][createHistory][10]','swapAdditionalPhones','outboundDropCallsDayCallersExit','Abandoned','CALLEREXIT','countabandonedretry','dialAbandonedRetryFrequency','dialAbandonedMaxRetry','queueCallerAbandonCreateState','[rescheduleContact][Abandoned]','channel','actionid','strategy','rrmemory','isNil','locked','paused','stateinterface','queueBooked','roundrobin','run','idHopper','[Catch][Preview][syncQueueStatusComplete]','finally','[unlock][syncQueueStatusComplete]','queueBookedRR','_rr','unlockRR','contactAgent-idHopper:\x20','Agent:\x20','[booked][unlock]','[booked][unlock2]','[booked][unlock3]','responsetime','getQueue','Success','callProgressDetecting','[callProgressDetecting]\x20','variable','amdstatus','exten','xcally-motion-dialer','outboundAnswerAgiCallsDay','HangupInAMD','membername','AMD','buildObj','saveInDb','[syncHangupInAMD][createHistory]','[syncHangupInAMD]','value','Machine','countmachineretry','amd','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countagentrejectretry','stateGlobal','dialMachineMaxRetry','createStateFinal','dialMachineRetryFrequency','[rescheduleContact][Machine]','dialAMDActive','HANGUP','custom:amd','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','[syncAgentComplete][createHistory][0]','dialGlobalMaxRetry','reason19\x20machine....','ivrAnswerCallsDay','[syncHangupIvr][createHistory]','[syncHangupIvr]','dialQueueProject','AGI','cause-txt','Normal\x20Clearing','outboundUnknownCallsDay','Unknow','running','isPreviewCampaign','statusMessage','getQueueCampaignStatusMessage','inUse','pTalking','[syncQueueSummary]','compareToOutboundQueue','queueSummaryCountersUpdated','updateReportFromOutboundQueue','assign','dialPreviewRecallmeReminder','filter','handlePreviewRecallNotifications','map','Agent','user:%s','user:dialPreviewRecallReminder','checkPreviewRecallReminder','clearZombieChannels','[uniqueid]','undefined','enqueue','[Dialer][checkChannel][ivr]','getVoiceQueueRtPauses','[getVoiceQueueRtPauses]\x20','originated','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','loggerHandler','emptyContact','notFound','UserId','[emptyContact][createHistory]','[emptyContact]','[syncQueueCallerAbandon]\x20[Drop]','handleIvr','actionOriginate','object','originate','voiceQueue\x20is\x20undefine','phone','contact\x20is\x20undefine','\x22agi://%s/square,%s\x22','\x22%s,%s%s,,,%s\x22','dialQueueOptions','NONE','getCaller','ACTIVE','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDGreeting','XMD-AMDAFTERGREETINGSILENCE','dialAMDTotalAnalysisTime','dialAMDMinWordLength','XMD-AMDBETWEENWORDSSILENCE','dialAMDBetweenWordsSilence','XMD-AMDMAXIMUMNUMBEROFWORDS','XMD-AMDSILENCETHRESHOLD','XMD-AMDMAXIMUMWORDLENGTH','isOutboundQueue','XMD-VOICEQUEUEID','XMD-CAMPAIGNID','setXMDContactVariables','Contact','Trunk','callerid','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','dialOriginateCallerIdNumber','getCallerId','getCallerIdRandom','extractCalleridName','XMD-ORIGINATECALLERIDNUM','variables','SIP/%s/%s%s','dialPrefix','dialCutDigit','trim','from-sip','dialOriginateTimeout','outboundOriginateFailureCallsDay','[originateError]:\x20%s','OriginateError','[originate][error]','originate\x20action\x20Error','dialNoAnswerRetryFrequency','[rescheduleContact][NoAnswer]','dialBusyMaxRetry','dialBusyRetryFrequency','dialCongestionMaxRetry','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberMaxRetry','[rescheduleContact][NoSuchNumber]','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','[callProgressDetecting]','entity\x20is\x20undefine','evt\x20is\x20undefine','outboundNoSuchCallsDay','NoSuchNumber','nosuchnumber','dialNoSuchNumberRetryFrequency','checkRetriveMax','reason\x200\x20no\x20such\x20number....','NoAnswer','custom:agentnoanswer','[syncAgentComplete][createHistory][3]','dialNoAnswerMaxRetry','reason\x203\x20ringing\x20no\x20answer','outboundBusyCallsDay','Busy','custom:agentbusy','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','outboundCongestionCallsDay','Congestion','[syncAgentComplete][createHistory][8]','reason\x208\x20congestion','outboundAbandonedCallsDay','[syncAgentComplete][createHistory][11]','reason\x2011\x20abandoned','outboundRejectCallsDay','custom:agentreject','agentreject','[syncAgentComplete][createHistory][20]','reason\x2020\x20agentreject','reason','[moveContactManagedDialer][0]','dialPredictiveOptimizationPercentage','round','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','available','talking','floor','erlangAbandonmentRate','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','[startMethodPredictive][StartProgressive]','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','dialPredictiveInterval','[startMethodPredictive][StartProgressive][Loop]','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','dialPredictiveOptimization','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','started\x20in\x20predictive\x20at','avgHandleTime','getDataPredictive','Predictive\x20after\x20first\x20interval','recalculate\x20predictive\x20at','startMethodPredictive','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20less\x20than\x20threshold\x20(','predictiveIntervalAnsweredCalls','agentBusyFactor','busyFactor','[getDataPredictive]','Unknown\x20Predictive','check\x20failure','getDataPredictiveOld','loggedIn','outboundQueuePauses','[CatchErlangB]','predictiveIntervalPauses','[handlePredictive]','checkContactBlack','recallme','[booked][checkContactBlack]','queueStatusComplete:\x20','Queue:\x20','queuestatus','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','scheduledat','dialRecallMeTimeout','voicePause','unlockContact','outboundReCallsDay','dialRecallInQueue','[rescheduleContact][dialRecallInQueue]','RecallInQueue','[Originate][HistoryDialRecallInQueue][historyCatch]','[Originate][HistoryRecallClose][historyCatch]','outboundBlacklistCallsDay','BLACKLIST','limitCalls','temp','getContactDialerIvr','checkContactEmpty','[getContactCampaign2][Empty]','RUNNING','ivrTotalCallsDays','[actionOriginate]\x20','checkIsBlackListIvr','[actionOriginateIvr]\x20','[getContactCampaign2]','dialLimitQueue','not_inuse','getContactDialer','[countReScheduled]\x20','[getContactDialer2]','tryOriginatePredictive','[handlePredictive][limitChannel]','dialOrderByScheduledAt','countReScheduled','checkIsBlackList','[getContactDialerPredictive]','abandonmentRate','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[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','exports','util','lodash','uuid','moment','ioredis','./utils','../../../config/environment/','dialer','../../../config/logger','booked','predictive','predictiveCalls','redis','defaults','localhost','socket.io-emitter','../rpc/voiceQueueRt','./models/history','./models/queueCallerAbandon','./models/hangup','env','XCALLY_IP_AGI','tail','preview','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','actions','contactsId','startProgressive','ivrOriginated','queuesSummary','agentconnect','bind','queuecallerabandon','syncQueueCallerAbandon','originateresponse','syncOriginateResponse','agentcomplete','custom:queuesummary','syncQueueSummary','custom:queuesummarycomplete','syncQueueSummaryComplete','newexten','syncNewExten','syncVarSet','queuemember','syncQueueMember','syncQueueStatusComplete','loopCampaigns','loopClearZombieChannels','getSettings','previewRecallmeReminderInterval','isUndefined','emit','type','outbound','debug','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','inspect','format','voice_queue:save','isEmpty','info','-----\x20Stats\x20Predictive\x20---','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','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','---------------------------','predictiveIntervalTotalCalls','Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','History\x20information\x20are\x20empty','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCalls','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCallToSecond','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangBusyFactor','merge','getSeconds','name','startProgressive\x20value\x20cleared','startPredictive','startPredictive\x20value\x20cleared','handlePredictive','handlePredictive\x20interval\x20cleared','error','checkContactLowerLimitOriginate','contactsRescheduled','message','CAMPAIGN_STATUS','CONTACTS_RESCHEDULED','[getContactDialer2][ReScheduled]','NO_AVAILABLE_CONTACTS','state','endtime','starttime','queueStatusComplete','[unlockQueueStatus][undefined]','[booked][unlockQueueStatus]','stringify','pick','Interval','NULL_INTERVAL','\x20INTERVAL_IS_NULL','Intervals','INACTIVE','isIVRCampaign','campaign:save','sendMessageOneNotActive','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','is\x20not\x20active','is\x20disactive','[ifTime][Action]','Error','active','SIP/%s','status','reachable','unmonitored'];(function(_0x1aefdb,_0x1c45a1){var _0x12be3c=function(_0x1ba602){while(--_0x1ba602){_0x1aefdb['push'](_0x1aefdb['shift']());}};_0x12be3c(++_0x1c45a1);}(_0x4539,0x192));var _0x9453=function(_0x525e6b,_0x51e458){_0x525e6b=_0x525e6b-0x0;var _0x3fbe1a=_0x4539[_0x525e6b];return _0x3fbe1a;};'use strict';var util=require(_0x9453('0x0'));var _=require(_0x9453('0x1'));var uuid=require(_0x9453('0x2'));var moment=require(_0x9453('0x3'));var rr=require('rr');var Redis=require(_0x9453('0x4'));var utils=require(_0x9453('0x5'));var hopperUtils=require('./utils/hopper');var ut=require('../preview/util/util');var config=require(_0x9453('0x6'));var logger=require('../../../config/logger')(_0x9453('0x7'));var loggerBooked=require(_0x9453('0x8'))(_0x9453('0x9'));var loggerPredictive=require('../../../config/logger')(_0x9453('0xa'));var loggerPredictiveCalls=require('../../../config/logger')(_0x9453('0xb'));var loggerSyncQueueSummary=require(_0x9453('0x8'))('syncQueueSummary');var ami=require('../ami');config[_0x9453('0xc')]=_[_0x9453('0xd')](config['redis'],{'host':_0x9453('0xe'),'port':0x18eb});var io=require(_0x9453('0xf'))(new Redis(config[_0x9453('0xc')]));var cmHopper=require('../rpc/cmHopper');var voiceQueueRt=require(_0x9453('0x10'));var RpcSetting=require('../rpc/setting');var Interval=require('../rpc/interval');var Action=require('./models/action');var History=require(_0x9453('0x11'));var Final=require('./models/final');var AgentComplete=require('./models/agentComplete');var QueueCallerAbandon=require(_0x9453('0x12'));var Hangup=require(_0x9453('0x13'));var ipAgi=process[_0x9453('0x14')][_0x9453('0x15')]||'127.0.0.1';var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence['prototype']['enqueue']=function(_0x15a96e){this[_0x9453('0x16')]=this[_0x9453('0x16')]?this['tail']['finally'](_0x15a96e):_0x15a96e();};function Dialer(_0x279731,_0x5b8a4b){this['sequence']=new Sequence();this[_0x9453('0x17')]=_0x5b8a4b;this['voiceQueues']=_0x279731[_0x9453('0x18')];this[_0x9453('0x19')]=_0x279731['campaigns'];this[_0x9453('0x1a')]=_0x279731['agents'];this[_0x9453('0x1b')]=_0x279731['trunks'];this[_0x9453('0x1c')]=config[_0x9453('0x1c')]||0x2;this['channels']={};this[_0x9453('0x1d')]={};this[_0x9453('0x1e')]={};this['uniqueId']={};this['optionPredictive']={};this['startPredictive']={};this[_0x9453('0x1f')]={};this[_0x9453('0x20')]={};this['queueBooked']={};this['queueBookedRR']={};this[_0x9453('0x21')]={};ami['on'](_0x9453('0x22'),this['syncAgentConnect'][_0x9453('0x23')](this));ami['on'](_0x9453('0x24'),this[_0x9453('0x25')][_0x9453('0x23')](this));ami['on'](_0x9453('0x26'),this[_0x9453('0x27')][_0x9453('0x23')](this));ami['on'](_0x9453('0x28'),this['syncAgentComplete']['bind'](this));ami['on'](_0x9453('0x29'),this[_0x9453('0x2a')][_0x9453('0x23')](this));ami['on'](_0x9453('0x2b'),this[_0x9453('0x2c')][_0x9453('0x23')](this));ami['on']('hangup',this['syncHangup'][_0x9453('0x23')](this));ami['on'](_0x9453('0x2d'),this[_0x9453('0x2e')][_0x9453('0x23')](this));ami['on']('varset',this[_0x9453('0x2f')][_0x9453('0x23')](this));ami['on'](_0x9453('0x30'),this[_0x9453('0x31')][_0x9453('0x23')](this));ami['on']('queuestatuscomplete',this[_0x9453('0x32')][_0x9453('0x23')](this));this[_0x9453('0x33')]();this[_0x9453('0x34')]();RpcSetting[_0x9453('0x35')]()['then'](function(_0xebf7c){previewRecallmeReminderInterval=_0xebf7c[_0x9453('0x36')];});}function isNotNull(_0x23afc6){return _0x23afc6!==null&&!_[_0x9453('0x37')](_0x23afc6);}function msgResponse(_0xa2b08f,_0xed0860,_0x355624){return{'action':_0xa2b08f,'response':_0xed0860,'message':_0x355624,'stack':_0x355624};}function emit(_0x1b7d96,_0x3d1c89,_0x11fe5b){io['to'](_0x1b7d96)[_0x9453('0x38')](_0x3d1c89,_0x11fe5b);}function emitOutboundVoiceQueueSummary(_0x2875ee){if(_0x2875ee[_0x9453('0x39')]===_0x9453('0x3a')){logger[_0x9453('0x3b')](_0x9453('0x3c'),util[_0x9453('0x3d')](_0x2875ee,{'showHidden':![],'depth':null}));emit(util[_0x9453('0x3e')]('voice:queue:%s',_0x2875ee['name']),_0x9453('0x3f'),_0x2875ee);}}function checkGetDataPredictive(_0x3fb949){if(isNotNull(_0x3fb949)&&!_[_0x9453('0x40')](_0x3fb949)){loggerPredictive[_0x9453('0x41')](_0x9453('0x42'));loggerPredictive[_0x9453('0x41')]('Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x3fb949['predictiveIntervalTotalCalls']);loggerPredictive[_0x9453('0x41')](_0x9453('0x43'),_0x3fb949['predictiveIntervalAnsweredCalls']);loggerPredictive['info'](_0x9453('0x44'),_0x3fb949['predictiveIntervalDroppedCallsTimeout']);loggerPredictive[_0x9453('0x41')]('Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x3fb949[_0x9453('0x45')]);loggerPredictive[_0x9453('0x41')](_0x9453('0x46'),_0x3fb949[_0x9453('0x47')]);loggerPredictive[_0x9453('0x41')](_0x9453('0x48'),_0x3fb949[_0x9453('0x49')]);loggerPredictive[_0x9453('0x41')](_0x9453('0x4a'));if(_0x3fb949[_0x9453('0x4b')]>0x0){if(!_[_0x9453('0x37')](_0x3fb949[_0x9453('0x49')])&&_0x3fb949[_0x9453('0x49')]>0x0){return!![];}loggerPredictive[_0x9453('0x41')](_0x9453('0x4c'));if(!_[_0x9453('0x37')](_0x3fb949[_0x9453('0x47')])&&_0x3fb949['predictiveIntervalAvgHoldtime']>0x0){return!![];}loggerPredictive['info'](_0x9453('0x4d'));}else{loggerPredictive[_0x9453('0x41')](_0x9453('0x4e'));}}else{loggerPredictive[_0x9453('0x41')](_0x9453('0x4f'));}return![];}function mergeDataErlangB(_0x201b84){return function(_0x125e38){loggerPredictive[_0x9453('0x41')]('---------\x20ErlangB\x20---------');loggerPredictive[_0x9453('0x41')](_0x9453('0x50'),_0x125e38[_0x9453('0x51')]);loggerPredictive[_0x9453('0x41')](_0x9453('0x52'),_0x125e38[_0x9453('0x53')]);loggerPredictive[_0x9453('0x41')](_0x9453('0x54'),_0x125e38['erlangAbandonmentRate']);loggerPredictive['info'](_0x9453('0x55'),_0x125e38[_0x9453('0x56')]);loggerPredictive[_0x9453('0x41')](_0x9453('0x54'),_0x125e38['erlangAbandonmentRate']);loggerPredictive['info'](_0x9453('0x4a'));_[_0x9453('0x57')](_0x201b84,_0x125e38);};}function ifInterval(_0x3242fa,_0x1b204d){if(_[_0x9453('0x37')](_0x1b204d)){return![];}return utils[_0x9453('0x58')](undefined,_0x1b204d)<_0x3242fa*0x3c;}function clearPredictiveAttributes(_0x49218f){if(_0x49218f[_0x9453('0x1f')]){_0x49218f[_0x9453('0x1f')]=undefined;loggerPredictive[_0x9453('0x3b')](_0x49218f[_0x9453('0x59')],_0x9453('0x5a'));}if(_0x49218f[_0x9453('0x5b')]){_0x49218f[_0x9453('0x5b')]=undefined;loggerPredictive[_0x9453('0x3b')](_0x49218f[_0x9453('0x59')],_0x9453('0x5c'));}if(_0x49218f['handlePredictive']){clearInterval(_0x49218f[_0x9453('0x5d')]);_0x49218f['handlePredictive']=undefined;loggerPredictive['debug'](_0x49218f[_0x9453('0x59')],_0x9453('0x5e'));}}function loggerCatchPredictive(_0x45516e,_0x3bedb4){return function(_0x8434de){loggerPredictive['error'](_0x3bedb4[_0x9453('0x59')],_0x45516e);loggerPredictive[_0x9453('0x5f')](_0x8434de['stack']);clearPredictiveAttributes(_0x3bedb4);};}function loggerCatch(_0x416fa2){return function(_0x40c43e){logger[_0x9453('0x5f')](_0x416fa2,util['inspect'](_0x40c43e,{'showHidden':![],'depth':null}));};}function loggerGetContactDialer(_0x4c493d,_0x1259e0,_0x315aa1){return function(_0x5732fe){utils[_0x9453('0x60')](_0x1259e0,_0x315aa1,0x0);_0x1259e0['temp']=0x0;logger[_0x9453('0x5f')](_0x4c493d,util['inspect'](_0x5732fe,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x3b7f31){return function(_0x300858){if(isNotNull(_0x300858)&&isNotNull(_0x300858[0x0])){if(_0x300858[0x0][_0x9453('0x61')]>0x0){_0x3b7f31[_0x9453('0x62')]=utils[_0x9453('0x63')][_0x9453('0x64')];logger[_0x9453('0x41')](_0x9453('0x65')+_0x3b7f31['name'],_0x300858[0x0][_0x9453('0x61')],'contacts');}else{_0x3b7f31['message']=utils[_0x9453('0x63')][_0x9453('0x66')];logger['info']('[getContactDialer2][Empty]'+_0x3b7f31[_0x9453('0x59')]);}}};}function createObjHistory(_0x4cb7d6,_0x2fff15,_0x50b1f5,_0x2252f7,_0x46d023){_0x4cb7d6[_0x9453('0x62')]=_0x50b1f5;var _0xce9d00=new Action(_0x4cb7d6,_0x2fff15);var _0xb103d7=new History(_0xce9d00);_0xb103d7[_0x9453('0x67')]=_0x2252f7;_0xb103d7['statedesc']=_0x46d023;_0xb103d7[_0x9453('0x68')]=_0xce9d00[_0x9453('0x69')];return _0xb103d7;}function unlockQueueStatus(_0x48f5ed,_0x295c5f){setTimeout(function(){if(_['isUndefined'](_0x48f5ed[_0x9453('0x6a')])){loggerBooked[_0x9453('0x5f')](_0x9453('0x6b'),_0x295c5f);}_0x48f5ed['queueStatusComplete']=!![];loggerBooked[_0x9453('0x41')](_0x9453('0x6c'),_0x295c5f,JSON[_0x9453('0x6d')](_[_0x9453('0x6e')](_0x48f5ed,[_0x9453('0x59'),_0x9453('0x6a')])));},0x1f3);}function checkInterval(_0x59b7a5){return function(){if(!isNotNull(_0x59b7a5[_0x9453('0x6f')])){_0x59b7a5['message']=utils[_0x9453('0x63')][_0x9453('0x70')];throw _0x59b7a5[_0x9453('0x59')]+_0x9453('0x71');}if(!isNotNull(_0x59b7a5['Interval'][_0x9453('0x72')])){_0x59b7a5[_0x9453('0x62')]=utils[_0x9453('0x63')][_0x9453('0x70')];throw _0x59b7a5['name']+_0x9453('0x71');}if(!isNotNull(_[_0x9453('0x40')](_0x59b7a5[_0x9453('0x6f')][_0x9453('0x72')]))){_0x59b7a5[_0x9453('0x62')]=utils[_0x9453('0x63')]['NULL_INTERVAL'];throw _0x59b7a5[_0x9453('0x59')]+_0x9453('0x71');}};}function checkIsIVRCampaignActive(_0x18beec){return function(){if(!utils['isIVRCampaignActive'](_0x18beec)){_0x18beec[_0x9453('0x62')]=utils[_0x9453('0x63')][_0x9453('0x73')];throw _0x18beec[_0x9453('0x59')]+'\x20NOT\x20Active';}};}function emitCampaignSummary(_0x5f5174){if(utils[_0x9453('0x74')](_0x5f5174)){emit(util['format']('campaign:ivr:%s',_0x5f5174[_0x9453('0x59')]),_0x9453('0x75'),_0x5f5174);}}function loggerCatchQueueSummary(_0x5a9d6a,_0x423949){return function(_0x3d6367){clearPredictiveAttributes(_0x423949);emitCampaignSummary(_0x423949);loggerSyncQueueSummary['debug'](_0x5a9d6a,util['inspect'](_0x3d6367,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x56609c){if(_0x56609c['sendMessageOneNotActive']){if(_0x56609c['originated']===0x0){_0x56609c[_0x9453('0x76')]=![];_0x56609c[_0x9453('0x62')]=utils['CAMPAIGN_STATUS'][_0x9453('0x73')];loggerSyncQueueSummary[_0x9453('0x3b')](_0x9453('0x77'),_0x56609c[_0x9453('0x59')],_0x9453('0x78'));}else{_0x56609c[_0x9453('0x62')]=utils[_0x9453('0x63')]['DISACTIVED'];loggerSyncQueueSummary[_0x9453('0x3b')](_0x9453('0x77'),_0x56609c['name'],_0x9453('0x79'));}emitCampaignSummary(_0x56609c);}}function myreject(_0xa0eafe){return function(_0x57a949){return _0xa0eafe(msgResponse(_0x9453('0x7a'),_0x9453('0x7b'),JSON[_0x9453('0x6d')](_0x57a949)));};}Dialer['prototype']['isTrunkReachable']=function(_0x2eb16b){return!_[_0x9453('0x37')](_0x2eb16b)&&_0x2eb16b&&!_[_0x9453('0x37')](_0x2eb16b[_0x9453('0x59')])&&!_[_0x9453('0x37')](_0x2eb16b[_0x9453('0x7c')])&&_0x2eb16b[_0x9453('0x7c')]&&(this[_0x9453('0x1b')][util[_0x9453('0x3e')](_0x9453('0x7d'),_0x2eb16b['name'])][_0x9453('0x7e')]===_0x9453('0x7f')||this['trunks'][util[_0x9453('0x3e')](_0x9453('0x7d'),_0x2eb16b[_0x9453('0x59')])][_0x9453('0x7e')]===_0x9453('0x80'));};Dialer[_0x9453('0x81')]['checkIsTrunkReachable']=function(_0x2bab3b){var _0x1b477=this;return function(){if(!_0x1b477[_0x9453('0x82')](_0x2bab3b['Trunk'])){if(!_0x1b477[_0x9453('0x82')](_0x2bab3b[_0x9453('0x83')])){_0x2bab3b[_0x9453('0x62')]=utils['CAMPAIGN_STATUS'][_0x9453('0x84')];throw _0x2bab3b[_0x9453('0x59')]+_0x9453('0x85');}}};};Dialer[_0x9453('0x81')]['checkIfTime']=function(_0x348048,_0x2a3d59,_0x470b32,_0x482115){var _0x4763c9=this;return function(){var _0x1ea293=!![];return _0x4763c9[_0x9453('0x86')](_0x348048,_0x2a3d59,_0x470b32,_0x482115,_0x1ea293);};};Dialer[_0x9453('0x81')][_0x9453('0x87')]=function(_0x53e929,_0x287615,_0x164edf,_0x1783b6){var _0x3f6a8b=this;return function(){var _0xd7990c=![];return _0x3f6a8b[_0x9453('0x86')](_0x53e929['Intervals'],_0x287615,_0x164edf,_0x1783b6,_0xd7990c);};};Dialer[_0x9453('0x81')][_0x9453('0x86')]=function(_0x10532e,_0x4b2197,_0xbd8d01,_0x2d9150,_0x42ad05){var _0x589c18=[];return new Promise(function(_0x5c720d,_0x18e5de){if(!isNotNull(_0x10532e)){_0x2d9150[_0x9453('0x62')]=utils[_0x9453('0x63')][_0x9453('0x70')];return _0x18e5de(msgResponse(_0x9453('0x88'),'Failure',_0xbd8d01+_0x9453('0x89')));}if(_[_0x9453('0x40')](_0x10532e)){_0x2d9150[_0x9453('0x62')]=utils[_0x9453('0x63')][_0x9453('0x8a')];return _0x18e5de(msgResponse('ifTime','Failure',_0xbd8d01+_0x9453('0x8b')));}if(_0x4b2197&&_['isUndefined'](config['timezones'][_0x4b2197])){_0x2d9150[_0x9453('0x62')]=utils[_0x9453('0x63')][_0x9453('0x8c')];return _0x18e5de(msgResponse('ifTime',_0x9453('0x8d'),_0xbd8d01+_0x9453('0x8e')+_0x4b2197));}if(_['isArray'](_0x10532e)){for(var _0x266976=0x0;_0x266976<_0x10532e[_0x9453('0x8f')];_0x266976+=0x1){_0x589c18[_0x9453('0x90')](ami[_0x9453('0x91')]({'action':'command','command':util['format']('iftime\x20%s,%s',_0x10532e[_0x266976]['interval'],!_['isUndefined'](config['timezones'][_0x4b2197])?_0x4b2197:'')})[_0x9453('0x92')](function(_0x305fea){return _0x305fea[_0x9453('0x93')]['indexOf'](_0x9453('0x94'))>=0x0;})['catch'](myreject(_0x18e5de)));}}else{_0x589c18[_0x9453('0x90')](ami[_0x9453('0x91')]({'action':_0x9453('0x95'),'command':util[_0x9453('0x3e')](_0x9453('0x96'),_0x10532e,!_['isUndefined'](config[_0x9453('0x97')][_0x4b2197])?_0x4b2197:'')})[_0x9453('0x92')](function(_0x3c7cd3){return _0x3c7cd3[_0x9453('0x93')]['indexOf'](_0x9453('0x94'))>=0x0;})[_0x9453('0x98')](myreject(_0x18e5de)));}Promise['all'](_0x589c18)[_0x9453('0x92')](function(_0x22ccc7){var _0x5a69b1=_['some'](_0x22ccc7);if(_0x5a69b1){return _0x5c720d(_0x5a69b1);}else{_0x2d9150[_0x9453('0x62')]=_0x42ad05?utils[_0x9453('0x63')][_0x9453('0x99')]:utils['CAMPAIGN_STATUS']['OVERTIME_INTERVAL'];return _0x18e5de(msgResponse(_0x9453('0x9a'),'Failure',_0x9453('0x9b')+_0x42ad05+'\x20'+_0xbd8d01+_0x9453('0x9c')+util['inspect'](_0x10532e,{'showHidden':![],'depth':null})+'Timezone:\x20'+_0x4b2197));}})[_0x9453('0x98')](function(_0x488412){return _0x18e5de(msgResponse(_0x9453('0x88'),_0x9453('0x8d'),JSON[_0x9453('0x6d')](_0x488412)));});});};Dialer[_0x9453('0x81')]['loopCampaigns']=function(){var _0x5016ee=this;return cmHopper['resetActiveCalls']({'active':![]},{'where':{'active':!![]}})[_0x9453('0x92')](function(){setInterval(function(){_0x5016ee[_0x9453('0x9d')]();},0x3e8);});};Dialer[_0x9453('0x81')][_0x9453('0x9d')]=function(){var _0x25d44f=this;var _0x2bb123;for(var _0xf1a332 in this[_0x9453('0x19')]){if(typeof this[_0x9453('0x19')][_0xf1a332]!=='undefined'){_0x2bb123=this[_0x9453('0x19')][_0xf1a332];if(utils[_0x9453('0x74')](_0x2bb123)&&utils[_0x9453('0x9e')](_0x2bb123)){_0x2bb123[_0x9453('0x76')]=!![];Promise[_0x9453('0x9f')]()[_0x9453('0x92')](checkIsIVRCampaignActive(_0x2bb123))['then'](checkInterval(_0x2bb123))['then'](_0x25d44f['checkIsTrunkReachable'](_0x2bb123))['then'](_0x25d44f[_0x9453('0xa0')](_0x2bb123[_0x9453('0xa1')],_0x2bb123['dialTimezone'],_0x2bb123['name'],_0x2bb123))['then'](_0x25d44f[_0x9453('0x87')](_0x2bb123[_0x9453('0x6f')],_0x2bb123[_0x9453('0xa2')],_0x2bb123[_0x9453('0x59')],_0x2bb123))[_0x9453('0x92')](_0x25d44f[_0x9453('0xa3')](_0x2bb123))[_0x9453('0x98')](loggerCatchQueueSummary(_0x9453('0xa4'),_0x2bb123));}else{notSendMessagesCampaign(_0x2bb123);}}}};Dialer['prototype'][_0x9453('0xa5')]=function(_0x1e17d6){if(_0x1e17d6['dialMethod']!==_0x9453('0xa')){clearPredictiveAttributes(_0x1e17d6);}switch(_0x1e17d6[_0x9453('0xa6')]){case'progressive':this[_0x9453('0xa7')](_0x1e17d6,0x1);break;case _0x9453('0xa8'):this[_0x9453('0xa7')](_0x1e17d6,_0x1e17d6['dialPowerLevel']);break;case _0x9453('0xa'):this[_0x9453('0xa')](_0x1e17d6);break;case _0x9453('0x9'):this[_0x9453('0xa7')](_0x1e17d6,0x1);break;default:logger['error'](_0x9453('0xa9'),_0x1e17d6[_0x9453('0x59')],_0x9453('0xaa'));}};Dialer[_0x9453('0x81')][_0x9453('0x88')]=function(_0x16d4cd,_0x4f09fc){var _0x277a4f=_0x16d4cd[_0x9453('0xa2')];var _0x295b7a=_0x4f09fc?_0x16d4cd[_0x9453('0xa1')]:_0x16d4cd[_0x9453('0x6f')][_0x9453('0x72')];logger[_0x9453('0xab')](_0x9453('0xac'),_0x295b7a,_0x277a4f,_0x16d4cd[_0x9453('0x59')],util['format'](_0x9453('0xad'),_0x16d4cd[_0x9453('0x59')],_0x16d4cd['id']));var _0x3fad95=null;return Interval[_0x9453('0xae')](_0x295b7a,_0x277a4f)['then'](function(_0x3eac44){if(_0x3eac44===!![]){return _0x3eac44;}else{_0x16d4cd[_0x9453('0x62')]=_0x4f09fc?utils['CAMPAIGN_STATUS'][_0x9453('0x99')]:utils[_0x9453('0x63')][_0x9453('0xaf')];_0x3fad95=msgResponse('[ifTime][promiseAll]',_0x9453('0x8d'),_0x9453('0x9b')+_0x4f09fc+'\x20'+_0x16d4cd['name']+'\x20Interval\x20is\x20overtime:\x20'+util[_0x9453('0x3d')](_0x295b7a,{'showHidden':![],'depth':null})+_0x9453('0xb0')+_0x277a4f);}if(_0x3fad95!==null){logger[_0x9453('0xab')](_0x9453('0xb1'),_0x3fad95);_0x3fad95['isGlobal']=_0x4f09fc;throw _0x3fad95;}})[_0x9453('0x98')](function(_0x37f52a){logger[_0x9453('0x5f')](_0x9453('0xb2'),_0x37f52a);throw msgResponse(_0x9453('0x7a'),'Error',util[_0x9453('0x3d')](_0x37f52a,{'showHidden':![],'depth':null}));});};Dialer[_0x9453('0x81')]['syncAgentConnect']=function(_0x339da7){if(this[_0x9453('0x18')][_0x339da7[_0x9453('0xb3')]]){if(this['uniqueId'][_0x339da7[_0x9453('0xb4')]]&&this['uniqueId'][_0x339da7[_0x9453('0xb4')]][_0x9453('0x39')]!==_0x9453('0xb5')){this[_0x9453('0xb6')](this['voiceQueues'][_0x339da7[_0x9453('0xb3')]]);this[_0x9453('0xb7')][_0x339da7['uniqueid']]['answertime']=moment()['format'](_0x9453('0xb8'));}}};Dialer[_0x9453('0x81')][_0x9453('0xb9')]=function(_0x10a0c5){var _0x1b36c0=this[_0x9453('0xb7')][_0x10a0c5[_0x9453('0xb4')]];if(this[_0x9453('0x18')][_0x10a0c5['queue']]){if(_0x1b36c0&&_0x1b36c0[_0x9453('0x39')]!=='ivr'){delete this[_0x9453('0xb7')][_0x10a0c5[_0x9453('0xb4')]];this['voiceQueues'][_0x10a0c5['queue']][_0x9453('0xba')]+=0x1;var _0x15a3a7=new AgentComplete(_0x1b36c0,_0x10a0c5);if(_0x10a0c5['reason']===_0x9453('0xbb')){_0x15a3a7[_0x9453('0xbc')]=this[_0x9453('0x18')][_0x10a0c5['queue']]['dialQueueProject2']&&this[_0x9453('0x18')][_0x10a0c5[_0x9453('0xb3')]][_0x9453('0xbd')]?moment()[_0x9453('0x3e')](_0x9453('0xb8')):undefined;}hopperUtils[_0x9453('0xbe')](_0x15a3a7)[_0x9453('0x98')](loggerCatch(_0x9453('0xbf')));hopperUtils[_0x9453('0xc0')](_0x15a3a7)[_0x9453('0x98')](loggerCatch(_0x9453('0xc1')));}}};Dialer[_0x9453('0x81')][_0x9453('0x25')]=function(_0x2dd0f8){var _0x14cc27=this[_0x9453('0xb7')][_0x2dd0f8['uniqueid']];var _0x4518c1=this;var _0x14ab98=![];var _0x1b9fcc;var _0x3c572c;if(this[_0x9453('0x18')][_0x2dd0f8[_0x9453('0xb3')]]){if(_0x14cc27&&_0x14cc27[_0x9453('0x39')]!==_0x9453('0xb5')){delete this[_0x9453('0xb7')][_0x2dd0f8[_0x9453('0xb4')]];this['updateOriginated'](this[_0x9453('0x18')][_0x2dd0f8[_0x9453('0xb3')]]);_0x14cc27[_0x9453('0xc2')]=moment()[_0x9453('0x3e')](_0x9453('0xb8'));var _0x5ed5f6=new QueueCallerAbandon(_0x14cc27,_0x2dd0f8);if(utils[_0x9453('0x58')](_0x14cc27[_0x9453('0xc2')],_0x14cc27['responsetime'])>=_0x14cc27[_0x9453('0xc3')]){this[_0x9453('0x18')][_0x2dd0f8['queue']][_0x9453('0xc4')]+=0x1;this['voiceQueues'][_0x2dd0f8[_0x9453('0xb3')]][_0x9453('0xc5')]+=0x1;this[_0x9453('0x18')][_0x2dd0f8[_0x9453('0xb3')]][_0x9453('0xc6')]+=0x1;_0x5ed5f6[_0x9453('0x67')]=0xa;_0x5ed5f6[_0x9453('0xc7')]=_0x9453('0xc8');_0x5ed5f6[_0x9453('0xc9')]=_0x9453('0xca');_0x5ed5f6['agiafterat']=this[_0x9453('0x18')][_0x2dd0f8[_0x9453('0xb3')]][_0x9453('0xcb')]?moment()['format'](_0x9453('0xb8')):undefined;_0x5ed5f6[_0x9453('0xcc')]+=0x1;_0x5ed5f6[_0x9453('0xcd')]+=0x1;_0x1b9fcc=this[_0x9453('0x18')][_0x2dd0f8['queue']][_0x9453('0xce')];_0x3c572c=this[_0x9453('0x18')][_0x2dd0f8[_0x9453('0xb3')]][_0x9453('0xcf')];hopperUtils[_0x9453('0xd0')](_0x5ed5f6,_0x5ed5f6[_0x9453('0x67')],_0x14cc27[_0x9453('0xd1')])[_0x9453('0x92')](function(_0x343943){_0x14ab98=_0x343943['additional']==0x1;if(_0x5ed5f6[_0x9453('0xcc')]>=_0x4518c1['voiceQueues'][_0x2dd0f8['queue']][_0x9453('0xd2')]){_0x4518c1['queueCallerAbandonCreateState'](_0x5ed5f6,_0x343943[_0x9453('0xd3')]);}else{hopperUtils[_0x9453('0xd4')]({'active':![],'countdropretry':_0x5ed5f6[_0x9453('0xcc')],'scheduledat':moment()[_0x9453('0xd5')](_0x4518c1[_0x9453('0x18')][_0x2dd0f8[_0x9453('0xb3')]]['dialDropRetryFrequency'],_0x9453('0xd6'))['format'](_0x9453('0xb8')),'ContactId':_0x14cc27[_0x9453('0xd7')],'ListId':_0x14cc27[_0x9453('0xd8')],'VoiceQueueId':_0x14cc27[_0x9453('0xd9')]||undefined,'CampaignId':_0x14cc27[_0x9453('0xda')]||undefined})[_0x9453('0x98')](loggerCatch(_0x9453('0xdb')));var _0x59cbd0=new History(_0x5ed5f6);_0x59cbd0[_0x9453('0x67')]=0xa;_0x59cbd0[_0x9453('0xc7')]=_0x9453('0xc8');_0x59cbd0['starttime']=moment()[_0x9453('0x3e')](_0x9453('0xb8'));_0x59cbd0['endtime']=_0x59cbd0['starttime'];_0x59cbd0['calleridname']=_0x5ed5f6[_0x9453('0xdc')];_0x59cbd0[_0x9453('0xdd')]=_0x5ed5f6[_0x9453('0xdd')];hopperUtils[_0x9453('0xbe')](_0x59cbd0)[_0x9453('0x98')](loggerCatch(_0x9453('0xde')));}})[_0x9453('0x92')](function(){if(_0x14ab98)hopperUtils[_0x9453('0xdf')](_0x5ed5f6,_0x1b9fcc,_0x3c572c)[_0x9453('0x92')](function(){return 0x1;});});}else{this['voiceQueues'][_0x2dd0f8[_0x9453('0xb3')]][_0x9453('0x45')]+=0x1;this[_0x9453('0x18')][_0x2dd0f8[_0x9453('0xb3')]][_0x9453('0xe0')]+=0x1;_0x5ed5f6[_0x9453('0x67')]=0xb;_0x5ed5f6[_0x9453('0xc7')]=_0x9453('0xe1');_0x5ed5f6['dropreason']=_0x9453('0xe2');_0x5ed5f6[_0x9453('0xe3')]+=0x1;_0x5ed5f6[_0x9453('0xcd')]+=0x1;_0x1b9fcc=this[_0x9453('0x18')][_0x2dd0f8[_0x9453('0xb3')]][_0x9453('0xe4')];_0x3c572c=this[_0x9453('0x18')][_0x2dd0f8['queue']][_0x9453('0xcf')];hopperUtils[_0x9453('0xd0')](_0x5ed5f6,_0x5ed5f6[_0x9453('0x67')],_0x14cc27[_0x9453('0xd1')])[_0x9453('0x92')](function(_0x2fe951){if(_0x5ed5f6[_0x9453('0xe3')]>=_0x4518c1[_0x9453('0x18')][_0x2dd0f8[_0x9453('0xb3')]][_0x9453('0xe5')]){_0x4518c1[_0x9453('0xe6')](_0x5ed5f6,_0x2fe951['additional']);}else{hopperUtils[_0x9453('0xd4')]({'active':![],'countabandonedretry':_0x5ed5f6[_0x9453('0xe3')],'scheduledat':moment()[_0x9453('0xd5')](_0x4518c1[_0x9453('0x18')][_0x2dd0f8[_0x9453('0xb3')]]['dialAbandonedRetryFrequency'],_0x9453('0xd6'))[_0x9453('0x3e')](_0x9453('0xb8')),'ContactId':_0x14cc27[_0x9453('0xd7')],'ListId':_0x14cc27[_0x9453('0xd8')],'VoiceQueueId':_0x14cc27[_0x9453('0xd9')]||undefined,'CampaignId':_0x14cc27['CampaignId']||undefined})[_0x9453('0x98')](loggerCatch(_0x9453('0xe7')));var _0x16c034=new History(_0x5ed5f6);_0x16c034[_0x9453('0x67')]=0xb;_0x16c034[_0x9453('0xc7')]='Abandoned';_0x16c034['starttime']=moment()[_0x9453('0x3e')](_0x9453('0xb8'));_0x16c034['endtime']=_0x16c034['starttime'];_0x16c034[_0x9453('0xdc')]=_0x5ed5f6[_0x9453('0xdc')];_0x16c034['calleridnum']=_0x5ed5f6[_0x9453('0xdd')];hopperUtils[_0x9453('0xbe')](_0x16c034)['catch'](loggerCatch('[syncAgentComplete][createHistory][11]'));}})['then'](function(){if(_0x14ab98)hopperUtils['swapAdditionalPhones'](_0x5ed5f6,_0x1b9fcc,_0x3c572c)['then'](function(){return 0x1;});});}}}};Dialer[_0x9453('0x81')][_0x9453('0x2e')]=function(_0x3eb080){if(this[_0x9453('0x1d')][_0x3eb080[_0x9453('0xb4')]]){this[_0x9453('0x1d')][_0x3eb080['uniqueid']][_0x9453('0xe8')]=_0x3eb080[_0x9453('0xe8')];}if(this[_0x9453('0xb7')][_0x3eb080[_0x9453('0xb4')]]){this[_0x9453('0xb7')][_0x3eb080['uniqueid']]['channel']=_0x3eb080[_0x9453('0xe8')];}};Dialer[_0x9453('0x81')]['syncQueueMember']=function(_0x1feb09){if(!this[_0x9453('0x1d')][_0x1feb09[_0x9453('0xe9')]]){return;}var _0x4dcfe6=this[_0x9453('0x18')][this[_0x9453('0x1d')][_0x1feb09[_0x9453('0xe9')]][_0x9453('0xb3')]][_0x9453('0xea')]||_0x9453('0xeb');if(_0x4dcfe6==='roundrobin'){if(this[_0x9453('0x1d')][_0x1feb09[_0x9453('0xe9')]]&&_[_0x9453('0xec')](this[_0x9453('0x1d')][_0x1feb09[_0x9453('0xe9')]][_0x9453('0xed')])&&_0x1feb09[_0x9453('0x7e')]==='1'&&_0x1feb09[_0x9453('0xee')]==='0'){if(this[_0x9453('0x1a')][_0x1feb09['stateinterface']]){if(!this[_0x9453('0x1a')][_0x1feb09[_0x9453('0xef')]][_0x9453('0xed')]){this[_0x9453('0x1a')][_0x1feb09[_0x9453('0xef')]][_0x9453('0xed')]=!![];this[_0x9453('0x1d')][_0x1feb09[_0x9453('0xe9')]][_0x9453('0xed')]=!![];this[_0x9453('0x1d')][_0x1feb09[_0x9453('0xe9')]][_0x9453('0xef')]=_0x1feb09[_0x9453('0xef')];}}}}else if(_0x4dcfe6===_0x9453('0xeb')){if(this[_0x9453('0x1d')][_0x1feb09[_0x9453('0xe9')]]){if(this['agents'][_0x1feb09[_0x9453('0xef')]]){this[_0x9453('0x1d')][_0x1feb09[_0x9453('0xe9')]][_0x9453('0xef')]=_0x1feb09['stateinterface'];if(_['isNil'](this[_0x9453('0xf0')][this['actions'][_0x1feb09[_0x9453('0xe9')]]['queue']])){this[_0x9453('0xf0')][this[_0x9453('0x1d')][_0x1feb09['actionid']]['queue']]=[];}this[_0x9453('0xf0')][this['actions'][_0x1feb09[_0x9453('0xe9')]][_0x9453('0xb3')]][_0x9453('0x90')](_[_0x9453('0x57')](_[_0x9453('0x6e')](this[_0x9453('0x1d')][_0x1feb09[_0x9453('0xe9')]],['idHopper',_0x9453('0xef')]),{'status':_0x1feb09[_0x9453('0x7e')],'paused':_0x1feb09['paused']}));}}}};Dialer[_0x9453('0x81')]['syncQueueStatusComplete']=function(_0x350a60){if(!this[_0x9453('0x1d')][_0x350a60['actionid']]){return;}var _0x43c2c0=this;var _0x5c491b=this['voiceQueues'][this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]]['queue']];var _0x2017c3=_0x5c491b['strategy']||_0x9453('0xeb');if(_0x2017c3===_0x9453('0xf1')){if(this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]]&&this['actions'][_0x350a60[_0x9453('0xe9')]][_0x9453('0xef')]){this[_0x9453('0x17')][_0x9453('0xf2')](this['actions'][_0x350a60[_0x9453('0xe9')]][_0x9453('0xf3')],this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]][_0x9453('0xef')])[_0x9453('0x98')](function(_0x357bdf){logger[_0x9453('0x5f')](_0x9453('0xf4'),util[_0x9453('0x3d')](_0x357bdf,{'showHidden':![],'depth':null}));})[_0x9453('0xf5')](function(){_0x43c2c0[_0x9453('0xb6')](_0x43c2c0[_0x9453('0x18')][_0x43c2c0[_0x9453('0x1d')][_0x350a60['actionid']]['queue']]);_0x43c2c0['agents'][_0x43c2c0[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]][_0x9453('0xef')]]['locked']=![];delete _0x43c2c0[_0x9453('0x1d')][_0x350a60['actionid']];unlockQueueStatus(_0x5c491b);});}else{this['updateOriginated'](this['voiceQueues'][this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]][_0x9453('0xb3')]]);hopperUtils[_0x9453('0xd4')]({'active':![],'ContactId':this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]]['ContactId'],'ListId':this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]][_0x9453('0xd8')],'VoiceQueueId':this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]][_0x9453('0xd9')]||undefined,'CampaignId':this[_0x9453('0x1d')][_0x350a60['actionid']][_0x9453('0xda')]||undefined})[_0x9453('0x98')](loggerCatch(_0x9453('0xf6')));delete this['actions'][_0x350a60[_0x9453('0xe9')]];unlockQueueStatus(_0x5c491b);}}else if(_0x2017c3===_0x9453('0xeb')){var _0x9af859;if(this[_0x9453('0x1d')][_0x350a60['actionid']]&&!_[_0x9453('0x40')](this['queueBooked'][this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]][_0x9453('0xb3')]])){if(this[_0x9453('0xf7')][_0x43c2c0['actions'][_0x350a60[_0x9453('0xe9')]][_0x9453('0xb3')]]){this['queueBookedRR'][_0x43c2c0['actions'][_0x350a60[_0x9453('0xe9')]][_0x9453('0xb3')]]=this[_0x9453('0xf7')][this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]]['queue']]?this[_0x9453('0xf7')][this['actions'][_0x350a60['actionid']][_0x9453('0xb3')]]:this[_0x9453('0xf0')][this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]][_0x9453('0xb3')]]?this[_0x9453('0xf0')][this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]][_0x9453('0xb3')]][_0x9453('0xf8')]||0x0:0x0;}this[_0x9453('0xf0')][this['actions'][_0x350a60[_0x9453('0xe9')]][_0x9453('0xb3')]][_0x9453('0xf8')]=this['queueBookedRR'][this[_0x9453('0x1d')][_0x350a60['actionid']][_0x9453('0xb3')]];for(var _0x46b7d9=0x0;_0x46b7d9<this[_0x9453('0xf0')][this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]][_0x9453('0xb3')]]['length'];_0x46b7d9+=0x1){_0x9af859=rr(this[_0x9453('0xf0')][this['actions'][_0x350a60[_0x9453('0xe9')]][_0x9453('0xb3')]]);this[_0x9453('0xf7')][_0x43c2c0[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]][_0x9453('0xb3')]]=this[_0x9453('0xf0')][this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]]['queue']][_0x9453('0xf8')];if(_0x9af859[_0x9453('0x7e')]==='1'&&_0x9af859['paused']==='0'){break;}}if(!_['isNil'](_0x9af859)){this[_0x9453('0x1a')][_0x9af859['stateinterface']]['unlockRR']=_[_0x9453('0x37')](this[_0x9453('0x1a')][_0x9af859['stateinterface']][_0x9453('0xf9')])?!![]:this[_0x9453('0x1a')][_0x9af859[_0x9453('0xef')]][_0x9453('0xf9')];}loggerBooked['info']('[booked][RR]',_0x350a60[_0x9453('0xe9')],'Agent:\x20',JSON[_0x9453('0x6d')](_[_0x9453('0x6e')](this['agents'][_0x9af859[_0x9453('0xef')]],[_0x9453('0x59'),_0x9453('0xf9')])),_0x9453('0xfa'),JSON[_0x9453('0x6d')](_0x9af859[_0x9453('0xf3')]));if(!_[_0x9453('0xec')](_0x9af859)&&_0x9af859[_0x9453('0x7e')]==='1'&&_0x9af859[_0x9453('0xee')]==='0'&&this[_0x9453('0x1a')][_0x9af859['stateinterface']][_0x9453('0xf9')]){this['agents'][_0x9af859[_0x9453('0xef')]][_0x9453('0xf9')]=![];this[_0x9453('0xf0')][_0x43c2c0['actions'][_0x350a60[_0x9453('0xe9')]][_0x9453('0xb3')]]=[];this[_0x9453('0x17')]['run'](_0x9af859[_0x9453('0xf3')],_0x9af859['stateinterface'])[_0x9453('0x98')](function(_0x2be3c9){logger[_0x9453('0x5f')](_0x9453('0xf4'),util[_0x9453('0x3d')](_0x2be3c9,{'showHidden':![],'depth':null}));})[_0x9453('0xf5')](function(){_0x43c2c0[_0x9453('0xb6')](_0x43c2c0[_0x9453('0x18')][_0x43c2c0[_0x9453('0x1d')][_0x350a60['actionid']]['queue']]);setTimeout(function(){_0x43c2c0[_0x9453('0x1a')][_0x9af859[_0x9453('0xef')]][_0x9453('0xf9')]=!![];loggerBooked[_0x9453('0x41')]('[booked][RR][finaly]',_0x350a60[_0x9453('0xe9')],_0x9453('0xfb'),JSON[_0x9453('0x6d')](_[_0x9453('0x6e')](_0x43c2c0['agents'][_0x9af859[_0x9453('0xef')]],[_0x9453('0x59'),'unlockRR'])),'contactAgent-idHopper:\x20',JSON[_0x9453('0x6d')](_0x9af859[_0x9453('0xf3')]));},0xc7);delete _0x43c2c0[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]];unlockQueueStatus(_0x5c491b,_0x350a60['actionid']);});}else{loggerBooked[_0x9453('0x41')](_0x9453('0xfc'));this[_0x9453('0xb6')](this[_0x9453('0x18')][this[_0x9453('0x1d')][_0x350a60['actionid']]['queue']]);hopperUtils[_0x9453('0xd4')]({'active':![],'ContactId':this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]][_0x9453('0xd7')],'ListId':this['actions'][_0x350a60['actionid']]['ListId'],'VoiceQueueId':this[_0x9453('0x1d')][_0x350a60['actionid']][_0x9453('0xd9')]||undefined,'CampaignId':this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]][_0x9453('0xda')]||undefined})[_0x9453('0x98')](loggerCatch(_0x9453('0xf6')));delete this['actions'][_0x350a60[_0x9453('0xe9')]];unlockQueueStatus(_0x5c491b);}}else{loggerBooked[_0x9453('0x41')](_0x9453('0xfd'));this[_0x9453('0xb6')](this[_0x9453('0x18')][this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]]['queue']]);hopperUtils['rescheduleContact']({'active':![],'ContactId':this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]][_0x9453('0xd7')],'ListId':this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]][_0x9453('0xd8')],'VoiceQueueId':this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]][_0x9453('0xd9')]||undefined,'CampaignId':this[_0x9453('0x1d')][_0x350a60['actionid']]['CampaignId']||undefined})[_0x9453('0x98')](loggerCatch('[unlock2][syncQueueStatusComplete]'));delete this['actions'][_0x350a60[_0x9453('0xe9')]];unlockQueueStatus(_0x5c491b);}}else{loggerBooked['info'](_0x9453('0xfe'));this['updateOriginated'](this[_0x9453('0x18')][this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]][_0x9453('0xb3')]]);hopperUtils[_0x9453('0xd4')]({'active':![],'ContactId':this[_0x9453('0x1d')][_0x350a60['actionid']][_0x9453('0xd7')],'ListId':this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]][_0x9453('0xd8')],'VoiceQueueId':this[_0x9453('0x1d')][_0x350a60[_0x9453('0xe9')]][_0x9453('0xd9')]||undefined,'CampaignId':this['actions'][_0x350a60[_0x9453('0xe9')]][_0x9453('0xda')]||undefined})[_0x9453('0x98')](loggerCatch('[unlock3][syncQueueStatusComplete]'));delete this['actions'][_0x350a60['actionid']];unlockQueueStatus(_0x5c491b);}};Dialer[_0x9453('0x81')][_0x9453('0x27')]=function(_0x228de8){var _0x2dde8e=this[_0x9453('0x1d')][_0x228de8[_0x9453('0xe9')]];if(_0x2dde8e){delete this[_0x9453('0x1d')][_0x228de8['actionid']];_0x2dde8e[_0x9453('0xff')]=moment()['format'](_0x9453('0xb8'));var _0x471b86=_0x2dde8e[_0x9453('0x39')]===_0x9453('0xb5')?this[_0x9453('0x19')][_0x2dde8e[_0x9453('0xb3')]]:this[_0x9453('0x18')][_0x2dde8e[_0x9453('0x100')]()];if(_0x228de8['response']!==_0x9453('0x101')){this[_0x9453('0xb6')](_0x471b86);return this[_0x9453('0x102')](_0x2dde8e,_0x471b86,_0x228de8)[_0x9453('0x98')](loggerCatch(_0x9453('0x103')));}this[_0x9453('0xb7')][_0x228de8[_0x9453('0xb4')]]=_0x2dde8e;}};Dialer['prototype'][_0x9453('0x2f')]=function(_0x457413){var _0x1d5ed2=this;var _0x3f7008=this['uniqueId'][_0x457413[_0x9453('0xb4')]];var _0x47a862;if(!_[_0x9453('0xec')](_0x457413)&&!_[_0x9453('0xec')](_0x457413[_0x9453('0x104')])&&!_[_0x9453('0xec')](_0x457413[_0x9453('0x104')][_0x9453('0x105')])&&_0x457413[_0x9453('0x106')]===_0x9453('0x107')&&_0x3f7008){if(_0x3f7008[_0x9453('0x39')]!==_0x9453('0xb5')&&this[_0x9453('0x18')][_0x3f7008[_0x9453('0xb3')]]['dialAMDActive']&&_0x457413['value']==='HANGUP'){delete this[_0x9453('0xb7')][_0x457413[_0x9453('0xb4')]];this[_0x9453('0xb6')](this[_0x9453('0x18')][_0x3f7008['queue']]);this[_0x9453('0x18')][_0x3f7008[_0x9453('0xb3')]][_0x9453('0xba')]+=0x1;this[_0x9453('0x18')][_0x3f7008['queue']][_0x9453('0x108')]+=0x1;_0x47a862=new Hangup(_0x3f7008,_0x457413);_0x47a862['state']=0x12;_0x47a862[_0x9453('0xc7')]=_0x9453('0x109');_0x47a862[_0x9453('0x10a')]=_0x9453('0x10b');ami[_0x9453('0x38')]('custom:amd',ut[_0x9453('0x10c')](_0x47a862,'amd'));this[_0x9453('0x10d')](_0x47a862,_0x9453('0x10e'),_0x9453('0x10f'));}if(_0x3f7008[_0x9453('0x39')]!==_0x9453('0xb5')&&this[_0x9453('0x18')][_0x3f7008['queue']]['dialAMDActive']&&_0x457413[_0x9453('0x110')]==='MACHINE'){return new Promise(function(_0x3e26d2,_0x5859c1){delete _0x1d5ed2[_0x9453('0xb7')][_0x457413[_0x9453('0xb4')]];_0x1d5ed2[_0x9453('0xb6')](_0x1d5ed2[_0x9453('0x18')][_0x3f7008[_0x9453('0xb3')]]);_0x1d5ed2[_0x9453('0x18')][_0x3f7008[_0x9453('0xb3')]][_0x9453('0xba')]+=0x1;_0x1d5ed2['voiceQueues'][_0x3f7008[_0x9453('0xb3')]]['outboundAnswerAgiCallsDay']+=0x1;var _0x3712fe=_0x1d5ed2['voiceQueues'][_0x3f7008[_0x9453('0xb3')]];var _0x238649=new Hangup(_0x3f7008,_0x457413);_0x238649[_0x9453('0x67')]=0x13;_0x238649[_0x9453('0xc7')]=_0x9453('0x111');_0x238649[_0x9453('0x10a')]='AMD';_0x238649[_0x9453('0x112')]+=0x1;_0x238649['countglobal']+=0x1;_0x238649[_0x9453('0x113')]=!![];ami[_0x9453('0x38')]('custom:amd',ut[_0x9453('0x10c')](_0x238649,_0x9453('0x113')));hopperUtils[_0x9453('0xbe')](_0x238649)[_0x9453('0x98')](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x238649[_0x9453('0x114')]+_0x238649[_0x9453('0x115')]+_0x238649[_0x9453('0x116')]+_0x238649[_0x9453('0x117')]+_0x238649['countdropretry']+_0x238649['countabandonedretry']+_0x238649['countmachineretry']+_0x238649[_0x9453('0x118')]>=_0x3712fe['dialGlobalMaxRetry']){_0x1d5ed2[_0x9453('0x119')](_0x238649,_0x3e26d2,_0x5859c1,'reason19\x20machine....');}else{if(_0x238649[_0x9453('0x112')]>=_0x3712fe[_0x9453('0x11a')]){_0x1d5ed2[_0x9453('0x11b')](_0x238649,_0x3e26d2,_0x5859c1,'reason\x2019\x20machine....');}else{hopperUtils['rescheduleContact']({'active':![],'countmachineretry':_0x238649['countmachineretry'],'scheduledat':moment()['add'](_0x3712fe[_0x9453('0x11c')],'minutes')[_0x9453('0x3e')](_0x9453('0xb8')),'ContactId':_0x238649[_0x9453('0xd7')],'ListId':_0x238649[_0x9453('0xd8')],'VoiceQueueId':_0x238649[_0x9453('0xd9')]||undefined,'CampaignId':_0x238649['CampaignId']||undefined})[_0x9453('0x98')](loggerCatch(_0x9453('0x11d')));_0x3e26d2({'reschedule':0x1});}}});}if(_0x3f7008['type']===_0x9453('0xb5')&&this[_0x9453('0x19')][_0x3f7008[_0x9453('0xb3')]][_0x9453('0x11e')]&&_0x457413[_0x9453('0x110')]===_0x9453('0x11f')){delete this[_0x9453('0xb7')][_0x457413['uniqueid']];this[_0x9453('0xb6')](this[_0x9453('0x19')][_0x3f7008[_0x9453('0xb3')]]);_0x47a862=new Hangup(_0x3f7008,_0x457413);_0x47a862[_0x9453('0x67')]=0x12;_0x47a862[_0x9453('0xc7')]=_0x9453('0x109');_0x47a862[_0x9453('0x10a')]=_0x9453('0x10b');ami[_0x9453('0x38')](_0x9453('0x120'),ut[_0x9453('0x10c')](_0x47a862,'amd'));this[_0x9453('0x10d')](_0x47a862,_0x9453('0x121'),_0x9453('0x122'));}if(_0x3f7008[_0x9453('0x39')]===_0x9453('0xb5')&&this['campaigns'][_0x3f7008['queue']]['dialAMDActive']&&_0x457413[_0x9453('0x110')]==='MACHINE'){return new Promise(function(_0x47babe,_0x461bca){delete _0x1d5ed2[_0x9453('0xb7')][_0x457413[_0x9453('0xb4')]];_0x1d5ed2[_0x9453('0xb6')](_0x1d5ed2[_0x9453('0x19')][_0x3f7008[_0x9453('0xb3')]]);_0x1d5ed2['campaigns'][_0x3f7008[_0x9453('0xb3')]]['outboundAnswerCallsDay']+=0x1;_0x1d5ed2[_0x9453('0x19')][_0x3f7008[_0x9453('0xb3')]][_0x9453('0x108')]+=0x1;var _0x16c72b=_0x1d5ed2[_0x9453('0x19')][_0x3f7008[_0x9453('0xb3')]];var _0x3679f6=new Hangup(_0x3f7008,_0x457413);_0x3679f6['state']=0x13;_0x3679f6[_0x9453('0xc7')]=_0x9453('0x111');_0x3679f6[_0x9453('0x10a')]=_0x9453('0x10b');_0x3679f6[_0x9453('0x112')]+=0x1;_0x3679f6[_0x9453('0xcd')]+=0x1;_0x3679f6[_0x9453('0x113')]=!![];ami[_0x9453('0x38')](_0x9453('0x120'),ut[_0x9453('0x10c')](_0x3679f6,_0x9453('0x113')));hopperUtils[_0x9453('0xbe')](_0x3679f6)['catch'](loggerCatch(_0x9453('0x123')));if(_0x3679f6[_0x9453('0x114')]+_0x3679f6[_0x9453('0x115')]+_0x3679f6[_0x9453('0x116')]+_0x3679f6[_0x9453('0x117')]+_0x3679f6[_0x9453('0xcc')]+_0x3679f6[_0x9453('0xe3')]+_0x3679f6[_0x9453('0x112')]+_0x3679f6['countagentrejectretry']>=_0x16c72b[_0x9453('0x124')]){_0x1d5ed2[_0x9453('0x119')](_0x3679f6,_0x47babe,_0x461bca,_0x9453('0x125'));}else{if(_0x3679f6[_0x9453('0x112')]>=_0x16c72b[_0x9453('0x11a')]){_0x1d5ed2['createStateFinal'](_0x3679f6,_0x47babe,_0x461bca,'reason\x2019\x20machine....');}else{hopperUtils[_0x9453('0xd4')]({'active':![],'countmachineretry':_0x3679f6[_0x9453('0x112')],'scheduledat':moment()[_0x9453('0xd5')](_0x16c72b['dialMachineRetryFrequency'],'minutes')['format'](_0x9453('0xb8')),'ContactId':_0x3679f6['ContactId'],'ListId':_0x3679f6['ListId'],'VoiceQueueId':_0x3679f6[_0x9453('0xd9')]||undefined,'CampaignId':_0x3679f6['CampaignId']||undefined})[_0x9453('0x98')](loggerCatch(_0x9453('0x11d')));_0x47babe({'reschedule':0x1});}}});}}};Dialer[_0x9453('0x81')]['syncHangup']=function(_0x5162f9){var _0x23d57c=this[_0x9453('0xb7')][_0x5162f9['uniqueid']];var _0x377b13;if(_0x23d57c&&_0x23d57c[_0x9453('0x39')]===_0x9453('0xb5')){delete this[_0x9453('0xb7')][_0x5162f9[_0x9453('0xb4')]];this[_0x9453('0xb6')](this['campaigns'][_0x23d57c[_0x9453('0xb3')]]);this['campaigns'][_0x23d57c[_0x9453('0xb3')]][_0x9453('0x126')]+=0x1;_0x377b13=new Hangup(_0x23d57c,_0x5162f9);hopperUtils['createHistory'](_0x377b13)[_0x9453('0x98')](loggerCatch(_0x9453('0x127')));hopperUtils[_0x9453('0xc0')](_0x377b13)['catch'](loggerCatch(_0x9453('0x128')));}if(_0x23d57c&&_0x23d57c[_0x9453('0x39')]!==_0x9453('0xb5')&&isNotNull(this[_0x9453('0x18')][_0x23d57c[_0x9453('0xb3')]][_0x9453('0x129')])){delete this[_0x9453('0xb7')][_0x5162f9[_0x9453('0xb4')]];this[_0x9453('0xb6')](this[_0x9453('0x18')][_0x23d57c[_0x9453('0xb3')]]);this[_0x9453('0x18')][_0x23d57c[_0x9453('0xb3')]][_0x9453('0xba')]+=0x1;this[_0x9453('0x18')][_0x23d57c['queue']][_0x9453('0x108')]+=0x1;_0x377b13=new Hangup(_0x23d57c,_0x5162f9);_0x377b13[_0x9453('0x67')]=0x10;_0x377b13[_0x9453('0xc7')]='AnswerAGI';_0x377b13[_0x9453('0x10a')]=_0x9453('0x12a');hopperUtils['createHistory'](_0x377b13)['catch'](loggerCatch(_0x9453('0x127')));hopperUtils[_0x9453('0xc0')](_0x377b13)[_0x9453('0x98')](loggerCatch('[syncHangupIvr]'));}if(_0x23d57c&&_0x23d57c[_0x9453('0x39')]!=='ivr'&&!isNotNull(this[_0x9453('0x18')][_0x23d57c[_0x9453('0xb3')]][_0x9453('0x129')])){if(_0x5162f9[_0x9453('0x12b')]===_0x9453('0x12c')){delete this[_0x9453('0xb7')][_0x5162f9[_0x9453('0xb4')]];this['voiceQueues'][_0x23d57c[_0x9453('0xb3')]][_0x9453('0xba')]+=0x1;const _0x3590cf=new AgentComplete(_0x23d57c,_0x5162f9);_0x3590cf['CampaignId']=this[_0x9453('0x18')][_0x23d57c[_0x9453('0xb3')]]['id'];hopperUtils[_0x9453('0xbe')](_0x3590cf)[_0x9453('0x98')](loggerCatch(_0x9453('0xbf')));hopperUtils['moveContactManagedDialer'](_0x3590cf)[_0x9453('0x98')](loggerCatch(_0x9453('0xc1')));}else{delete this['uniqueId'][_0x5162f9[_0x9453('0xb4')]];this['updateOriginated'](this[_0x9453('0x18')][_0x23d57c[_0x9453('0xb3')]]);this[_0x9453('0x18')][_0x23d57c['queue']][_0x9453('0x12d')]+=0x1;_0x377b13=new Hangup(_0x23d57c,_0x5162f9);_0x377b13[_0x9453('0x67')]=0xc;_0x377b13['statedesc']=_0x5162f9['cause-txt'];_0x377b13['membername']=_0x9453('0x12e');hopperUtils[_0x9453('0xbe')](_0x377b13)[_0x9453('0x98')](loggerCatch(_0x9453('0x127')));hopperUtils[_0x9453('0xc0')](_0x377b13)[_0x9453('0x98')](loggerCatch('[syncHangupIvr]'));}}};Dialer[_0x9453('0x81')][_0x9453('0x2a')]=function(_0x3fbd87){var _0x5146ca=this;if(!_0x5146ca[_0x9453('0x21')][_0x3fbd87['name']]){_0x5146ca['queuesSummary'][_0x3fbd87[_0x9453('0x59')]]={'running':![]};}else if(_0x5146ca[_0x9453('0x21')][_0x3fbd87['name']]['running']===!![]){return;}else if(_0x5146ca[_0x9453('0x21')][_0x3fbd87[_0x9453('0x59')]][_0x9453('0x12f')]===![]){_0x5146ca['queuesSummary'][_0x3fbd87[_0x9453('0x59')]]['running']=!![];}var _0x292291=_0x5146ca[_0x9453('0x18')][_0x3fbd87['name']];var _0xc7fa8=_0x292291['message']!==utils[_0x9453('0x63')][_0x9453('0x73')];var _0x140c88=utils[_0x9453('0x130')](_0x292291);_0x292291[_0x9453('0x131')]=utils[_0x9453('0x132')](_0x292291,_0x5146ca['trunks']);Promise[_0x9453('0x9f')]()[_0x9453('0x92')](function(){if(_0x292291['statusMessage']===utils['CAMPAIGN_STATUS'][_0x9453('0x73')]){if(_0xc7fa8){clearPredictiveAttributes(_0x292291);_0x3fbd87[_0x9453('0x5b')]=undefined;_0x3fbd87['startProgressive']=undefined;}if(_0x292291[_0x9453('0x131')]===utils['CAMPAIGN_STATUS'][_0x9453('0x73')]){_0x3fbd87['available']=0x0;_0x3fbd87[_0x9453('0xee')]=0x0;_0x3fbd87[_0x9453('0x133')]=0x0;_0x3fbd87['talking']=0x0;_0x3fbd87[_0x9453('0x134')]=0x0;}}else if(_0x292291['statusMessage']===utils[_0x9453('0x63')]['ACTIVE']&&!_0x140c88){return _0x5146ca[_0x9453('0x88')](_0x292291,!![])[_0x9453('0x92')](function(){return _0x5146ca[_0x9453('0x88')](_0x292291,![]);})[_0x9453('0x92')](function(){return _0x5146ca['checkDialMethod'](_0x292291);})[_0x9453('0x98')](function(_0x18a4f7){loggerSyncQueueSummary['debug'](_0x9453('0x135'),util[_0x9453('0x3d')](_0x18a4f7,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x292291);});}else{clearPredictiveAttributes(_0x292291);}})[_0x9453('0x92')](function(){var _0x5c7d91=_0x3fbd87[_0x9453('0x136')](_0x292291);if(_0x5c7d91||_0x292291[_0x9453('0x137')]){_0x292291[_0x9453('0x137')]=![];_0x3fbd87[_0x9453('0x138')](_0x292291);Object[_0x9453('0x139')](_0x292291,_0x3fbd87);emitOutboundVoiceQueueSummary(_0x3fbd87);}_0x5146ca[_0x9453('0x21')][_0x292291['name']][_0x9453('0x12f')]=![];})[_0x9453('0x98')](function(_0x3990ad){logger[_0x9453('0x5f')](_0x9453('0x135'),util[_0x9453('0x3d')](_0x3990ad,{'showHidden':![],'depth':null}));_0x5146ca[_0x9453('0x21')][_0x292291['name']][_0x9453('0x12f')]=![];});};Dialer[_0x9453('0x81')]['syncQueueSummaryComplete']=_['throttle'](function(){var _0x3eecff=_['filter'](this[_0x9453('0x18')],function(_0x48d489){return _0x48d489[_0x9453('0x13a')];});var _0x11826c=_[_0x9453('0x13b')](this[_0x9453('0x1a')],function(_0x2f8d95){return _0x2f8d95['online']&&_0x2f8d95[_0x9453('0x7e')]==='reachable';});if(_0x3eecff[_0x9453('0x8f')]>0x0&&_0x11826c['length']>0x0){return Promise['resolve']()['then'](cmHopper[_0x9453('0x13c')](_[_0x9453('0x13d')](_0x3eecff,'id'),previewRecallmeReminderInterval,_['map'](_0x11826c,'id')))[_0x9453('0x92')](function(_0xb9225e){for(var _0x6941a9=0x0;_0x6941a9<_0xb9225e[_0x9453('0x8f')];_0x6941a9++){var _0x598205=_0xb9225e[_0x6941a9][_0x9453('0x13e')][_0x9453('0x59')];if(_0x598205)io['to'](util[_0x9453('0x3e')](_0x9453('0x13f'),_0x598205))['emit'](_0x9453('0x140'),{'hopper':_0xb9225e[_0x6941a9]});}})[_0x9453('0x98')](function(_0x5f1940){logger['error'](_0x9453('0x141'),_0x5f1940);});}},0x3c*0x3e8,{'leading':!![]});Dialer[_0x9453('0x81')][_0x9453('0x34')]=function(){var _0x1fe63c=this;setInterval(function(){_0x1fe63c[_0x9453('0x142')](_0x1fe63c[_0x9453('0xb7')],_0x9453('0x143'));_0x1fe63c[_0x9453('0x142')](_0x1fe63c[_0x9453('0x1d')],'[actions]');},0x32c8);};Dialer[_0x9453('0x81')][_0x9453('0x142')]=function(_0x36fe71,_0x37cdbf){var _0xe45d66=this;for(var _0x3a1a1c in _0x36fe71){if(typeof _0x36fe71[_0x3a1a1c]!==_0x9453('0x144')){this['sequence'][_0x9453('0x145')](function(){if(!_[_0x9453('0xec')](_0x36fe71[_0x3a1a1c])){return ami['Action']({'action':_0x9453('0x7e'),'channel':_0x36fe71[_0x3a1a1c]['channel']})[_0x9453('0x98')](function(_0x86fce4){if(_0x86fce4[_0x9453('0x62')]==='No\x20such\x20channel'){setTimeout(function(){if(_0x36fe71[_0x3a1a1c]&&_0x36fe71[_0x3a1a1c][_0x9453('0x39')]!==_0x9453('0xb5')){_0xe45d66[_0x9453('0xb6')](_0xe45d66[_0x9453('0x18')][_0x36fe71[_0x3a1a1c][_0x9453('0xb3')]]);logger[_0x9453('0x5f')]('[Dialer][checkChannel]',_0x37cdbf,_0x3a1a1c,_0x36fe71[_0x3a1a1c][_0x9453('0xb3')]);delete _0x36fe71[_0x3a1a1c];}if(_0x36fe71[_0x3a1a1c]&&_0x36fe71[_0x3a1a1c][_0x9453('0x39')]===_0x9453('0xb5')){_0xe45d66[_0x9453('0xb6')](_0xe45d66['campaigns'][_0x36fe71[_0x3a1a1c][_0x9453('0xb3')]]);logger['error'](_0x9453('0x146'),_0x37cdbf,_0x3a1a1c,_0x36fe71[_0x3a1a1c][_0x9453('0xb3')]);delete _0x36fe71[_0x3a1a1c];}},0x2328);}});}});}}};Dialer[_0x9453('0x81')][_0x9453('0x147')]=function(_0x26b290){return Promise['resolve']()['then'](voiceQueueRt[_0x9453('0x147')](_0x26b290))[_0x9453('0x98')](loggerCatch(_0x9453('0x148')));};Dialer[_0x9453('0x81')]['updateOriginated']=function(_0x3e4202){if(!_[_0x9453('0x37')](_0x3e4202)&&_0x3e4202!==null){if(typeof _0x3e4202[_0x9453('0x149')]!==_0x9453('0x144')){if(_0x3e4202[_0x9453('0x149')]>0x0){_0x3e4202[_0x9453('0x149')]-=0x1;}else{logger[_0x9453('0x5f')](_0x9453('0x14a'));}}}else{logger[_0x9453('0x5f')](_0x9453('0x14b'));}};Dialer[_0x9453('0x81')][_0x9453('0x14c')]=function(_0x5940da,_0x123b2d){var _0x41ef54=this;return function(_0x78882){_0x41ef54['updateOriginated'](_0x123b2d);logger['error'](_0x5940da,util[_0x9453('0x3d')](_0x78882,{'showHidden':![],'depth':null}));};};Dialer[_0x9453('0x81')][_0x9453('0x14d')]=function(_0x3abc41,_0x20cff,_0x4358b5){var _0x59f32d={'state':0x19,'statedesc':_0x9453('0x14e')};this[_0x9453('0xb6')](_0x20cff);this[_0x9453('0x10d')](_[_0x9453('0x57')](_0x59f32d,_['pick'](_0x4358b5,[_0x9453('0xd7'),_0x9453('0xd8'),_0x9453('0x14f'),_0x9453('0xd9'),_0x9453('0xda')])),_0x9453('0x150'),_0x9453('0x151'));logger[_0x9453('0x5f')](_0x3abc41);};Dialer['prototype']['saveInDb']=function(_0x24661d,_0x2b3116,_0x56d28f){hopperUtils[_0x9453('0xbe')](_0x24661d)[_0x9453('0x98')](loggerCatch(_0x2b3116));hopperUtils['moveContactManagedDialer'](_0x24661d)[_0x9453('0x98')](loggerCatch(_0x56d28f));};Dialer['prototype']['queueCallerAbandonCreateState']=function(_0x2594cf,_0x10b5db){hopperUtils[_0x9453('0xbe')](_0x2594cf)[_0x9453('0x98')](loggerCatch(_0x9453('0xbf')));if(_0x10b5db==0x0){hopperUtils[_0x9453('0xc0')](_0x2594cf)[_0x9453('0x98')](loggerCatch(_0x9453('0x152')));}};Dialer[_0x9453('0x81')][_0x9453('0x141')]=function(_0x4b4250){return Promise[_0x9453('0x9f')]()[_0x9453('0x92')](cmHopper[_0x9453('0x13c')](_0x4b4250['id'],previewRecallmeReminderInterval))[_0x9453('0x92')](function(_0x277d92){for(var _0x2afea6=0x0;_0x2afea6<_0x277d92['length'];_0x2afea6++){var _0x238087=_0x277d92[_0x2afea6][_0x9453('0x13e')][_0x9453('0x59')];if(_0x238087)io['to'](util[_0x9453('0x3e')]('user:%s',_0x238087))[_0x9453('0x38')]('user:dialPreviewRecallReminder',{'hopper':_0x277d92[_0x2afea6]});}})[_0x9453('0x98')](function(){});};Dialer[_0x9453('0x81')][_0x9453('0xa3')]=function(_0x126b35){var _0xa457c7=this;return function(){_0xa457c7[_0x9453('0x153')](_0x126b35);};};Dialer['prototype'][_0x9453('0x154')]=function(_0x1ea7d2,_0x31e523){var _0x541e9a=this;var _0x3134d1=uuid['v4']();this[_0x9453('0x1d')][_0x3134d1]=new Action(_0x1ea7d2,_0x31e523,_0x3134d1);return new Promise(function(_0x472350,_0x559c33){if(_[_0x9453('0x37')](_0x1ea7d2)&&typeof _0x1ea7d2!==_0x9453('0x155')){return _0x559c33(msgResponse(_0x9453('0x156'),_0x9453('0x8d'),_0x9453('0x157')));}if(_[_0x9453('0x37')](_0x31e523['phone'])||_0x31e523[_0x9453('0x158')]===null){return _0x559c33(msgResponse(_0x9453('0x156'),_0x9453('0x8d'),_0x9453('0x159')));}var _0x51e1d4={'XMD-CALLERID':_0x541e9a[_0x9453('0x1d')][_0x3134d1]['getCaller'](),'XMD-AGI':_0x1ea7d2[_0x9453('0x129')]?util[_0x9453('0x3e')]('\x22agi://%s/square,%s\x22',ipAgi,_0x1ea7d2[_0x9453('0x129')]):'NONE','XMD-AGIAFTER':_0x1ea7d2[_0x9453('0xcb')]?util[_0x9453('0x3e')](_0x9453('0x15a'),ipAgi,_0x1ea7d2[_0x9453('0xcb')]):'NONE','XMD-QUEUE':utils['isOutboundQueue'](_0x1ea7d2)?util[_0x9453('0x3e')](_0x9453('0x15b'),_0x1ea7d2[_0x9453('0x59')],_0x1ea7d2[_0x9453('0x15c')]||'',_0x1ea7d2[_0x9453('0xbd')]?'c':'',_0x1ea7d2[_0x9453('0xc3')]||0x3):_0x9453('0x15d'),'XMD-CONTACTID':_0x31e523[_0x9453('0xd7')],'XMD-CDRTYPE':'dialer','CALLERID(all)':_0x541e9a[_0x9453('0x1d')][_0x3134d1][_0x9453('0x15e')](),'XMD-AMD':_0x1ea7d2['dialAMDActive']?_0x9453('0x15f'):_0x9453('0x15d'),'XMD-DESTINATION':_0x9453('0x107')};if(_0x1ea7d2['dialAMDActive']){_0x51e1d4['XMD-AMDINITIALSILENCE']=_0x1ea7d2[_0x9453('0x160')]||0x9c4;_0x51e1d4[_0x9453('0x161')]=_0x1ea7d2[_0x9453('0x162')]||0x5dc;_0x51e1d4[_0x9453('0x163')]=_0x1ea7d2['dialAMDAfterGreetingSilence']||0x320;_0x51e1d4['XMD-AMDTOTALANALYSISTIME']=_0x1ea7d2[_0x9453('0x164')]||0x1388;_0x51e1d4['XMD-AMDMINWORDLENGTH']=_0x1ea7d2[_0x9453('0x165')]||0x64;_0x51e1d4[_0x9453('0x166')]=_0x1ea7d2[_0x9453('0x167')]||0x32;_0x51e1d4[_0x9453('0x168')]=_0x1ea7d2['dialAMDMaximumNumberOfWords']||0x3;_0x51e1d4[_0x9453('0x169')]=_0x1ea7d2['dialAMDSilenceThreshold']||0x100;_0x51e1d4[_0x9453('0x16a')]=_0x1ea7d2['dialAMDMaximumWordLength']||0x1388;}if(utils[_0x9453('0x16b')](_0x1ea7d2)){_0x51e1d4[_0x9453('0x16c')]=_0x31e523[_0x9453('0xd9')];}else{_0x51e1d4[_0x9453('0x16d')]=_0x31e523[_0x9453('0xda')];}var _0x1ed5b9=utils[_0x9453('0x16e')](_0x31e523[_0x9453('0x16f')]);Object['assign'](_0x51e1d4,_0x1ed5b9);var _0x20b18a=_0x541e9a['isTrunkReachable'](_0x1ea7d2['Trunk'])?utils['getCallerId'](_0x1ea7d2[_0x9453('0x170')][_0x9453('0x171')],_0x1ea7d2[_0x9453('0x172')],_0x1ea7d2[_0x9453('0x173')]>0x0?utils['getCallerIdRandom'](_0x1ea7d2[_0x9453('0x174')],_0x1ea7d2[_0x9453('0x173')]):_0x1ea7d2[_0x9453('0x174')]):utils[_0x9453('0x175')](_['isNil'](_0x1ea7d2[_0x9453('0x83')])?_0x1ea7d2[_0x9453('0x170')]['callerid']:_0x1ea7d2['TrunkBackup'][_0x9453('0x171')],_0x1ea7d2[_0x9453('0x172')],_0x1ea7d2[_0x9453('0x173')]>0x0?utils[_0x9453('0x176')](_0x1ea7d2['dialOriginateCallerIdNumber'],_0x1ea7d2[_0x9453('0x173')]):_0x1ea7d2['dialOriginateCallerIdNumber']);if(_0x20b18a){_0x51e1d4['XMD-ORIGINATECALLERIDNAME']=_0x541e9a['actions'][_0x3134d1]['originatecalleridname']=utils[_0x9453('0x177')](_0x20b18a);_0x51e1d4[_0x9453('0x178')]=_0x31e523['phone'];}_0x1ea7d2[_0x9453('0x179')]=_0x51e1d4;return ami['Action']({'actionid':_0x3134d1,'action':'originate','channel':_0x541e9a[_0x9453('0x82')](_0x1ea7d2[_0x9453('0x170')])?util['format'](_0x9453('0x17a'),_0x1ea7d2[_0x9453('0x170')][_0x9453('0x59')],isNotNull(_0x1ea7d2[_0x9453('0x17b')])?_0x1ea7d2[_0x9453('0x17b')]['trim']()||'':'',_0x1ea7d2[_0x9453('0x17c')]>0x0?_0x31e523['phone']['substring'](_0x1ea7d2[_0x9453('0x17c')]):_0x31e523[_0x9453('0x158')]):util[_0x9453('0x3e')](_0x9453('0x17a'),_[_0x9453('0xec')](_0x1ea7d2[_0x9453('0x83')])?_0x1ea7d2[_0x9453('0x170')]['name']:_0x1ea7d2[_0x9453('0x83')][_0x9453('0x59')],isNotNull(_0x1ea7d2[_0x9453('0x17b')])?_0x1ea7d2[_0x9453('0x17b')][_0x9453('0x17d')]()||'':'',_0x1ea7d2[_0x9453('0x17c')]>0x0?_0x31e523[_0x9453('0x158')]['substring'](_0x1ea7d2['dialCutDigit']):_0x31e523[_0x9453('0x158')]),'callerid':_0x20b18a,'Exten':_0x9453('0x107'),'Context':_0x9453('0x17e'),'Priority':'1','variable':_0x51e1d4,'timeout':(_0x1ea7d2[_0x9453('0x17f')]||0x1e)*0x3e8,'async':!![],'channelid':_0x3134d1})[_0x9453('0x92')](function(_0x204b54){return _0x472350(_0x204b54);})[_0x9453('0x98')](function(_0x16e0d5){_0x1ea7d2[_0x9453('0x180')]+=0x1;var _0x3fa3c5=new History(_0x541e9a[_0x9453('0x1d')][_0x3134d1]);logger[_0x9453('0x5f')](util[_0x9453('0x3e')](_0x9453('0x181'),JSON[_0x9453('0x6d')](_0x16e0d5)));_0x3fa3c5[_0x9453('0x67')]=0xe;_0x3fa3c5[_0x9453('0xc7')]=_0x9453('0x182');_0x3fa3c5['starttime']=moment()[_0x9453('0x3e')]('YYYY-MM-DD\x20HH:mm:ss');_0x3fa3c5[_0x9453('0x68')]=_0x3fa3c5[_0x9453('0x69')];hopperUtils[_0x9453('0xbe')](_0x3fa3c5)[_0x9453('0x98')](loggerCatch(_0x9453('0x183')));_0x541e9a['moveContactManagedDialer'](_0x3fa3c5)[_0x9453('0x98')](loggerCatch(_0x9453('0x183')))[_0x9453('0xf5')](function(){delete _0x541e9a[_0x9453('0x1d')][_0x3134d1];return _0x559c33(msgResponse(_0x9453('0x156'),_0x9453('0x7b'),_0x9453('0x184')));});});});};Dialer[_0x9453('0x81')]['checkRetriveMax']=function(_0x5c3c1d,_0x4baf02,_0x3b87d4){var _0x59ff75=new History(_0x4baf02);if(_0x59ff75[_0x9453('0x114')]+_0x59ff75['countcongestionretry']+_0x59ff75[_0x9453('0x116')]+_0x59ff75[_0x9453('0x117')]+_0x59ff75[_0x9453('0xcc')]+_0x59ff75[_0x9453('0xe3')]+_0x59ff75[_0x9453('0x112')]+_0x59ff75['countagentrejectretry']>=_0x3b87d4[_0x9453('0x124')]-0x1){return!![];}switch(_0x5c3c1d){case 0x3:if(_0x59ff75[_0x9453('0x116')]>=_0x3b87d4['dialNoAnswerMaxRetry']-0x1){return!![];}hopperUtils[_0x9453('0xd4')]({'active':![],'countnoanswerretry':_0x59ff75['countnoanswerretry']+=0x1,'scheduledat':moment()['add'](_0x3b87d4[_0x9453('0x185')],'minutes')[_0x9453('0x3e')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x59ff75['ContactId'],'ListId':_0x59ff75[_0x9453('0xd8')],'VoiceQueueId':_0x59ff75[_0x9453('0xd9')]||undefined,'CampaignId':_0x59ff75[_0x9453('0xda')]||undefined})[_0x9453('0x98')](loggerCatch(_0x9453('0x186')));break;case 0x5:if(_0x59ff75[_0x9453('0x114')]>=_0x3b87d4[_0x9453('0x187')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countbusyretry':_0x59ff75[_0x9453('0x114')]+=0x1,'scheduledat':moment()[_0x9453('0xd5')](_0x3b87d4[_0x9453('0x188')],_0x9453('0xd6'))[_0x9453('0x3e')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x59ff75['ContactId'],'ListId':_0x59ff75['ListId'],'VoiceQueueId':_0x59ff75[_0x9453('0xd9')]||undefined,'CampaignId':_0x59ff75['CampaignId']||undefined})[_0x9453('0x98')](loggerCatch('[rescheduleContact]\x20[Busy]'));break;case 0x8:if(_0x59ff75['countcongestionretry']>=_0x3b87d4[_0x9453('0x189')]-0x1){return!![];}hopperUtils[_0x9453('0xd4')]({'active':![],'countcongestionretry':_0x59ff75['countcongestionretry']+=0x1,'scheduledat':moment()[_0x9453('0xd5')](_0x3b87d4[_0x9453('0x18a')],_0x9453('0xd6'))['format'](_0x9453('0xb8')),'ContactId':_0x59ff75[_0x9453('0xd7')],'ListId':_0x59ff75[_0x9453('0xd8')],'VoiceQueueId':_0x59ff75['VoiceQueueId']||undefined,'CampaignId':_0x59ff75[_0x9453('0xda')]||undefined})[_0x9453('0x98')](loggerCatch(_0x9453('0x18b')));break;case 0x0:if(_0x59ff75['countnosuchnumberretry']>=_0x3b87d4[_0x9453('0x18c')]-0x1){return!![];}else{hopperUtils[_0x9453('0xd4')]({'active':![],'countnosuchnumberretry':_0x59ff75['countnosuchnumberretry']+=0x1,'scheduledat':moment()[_0x9453('0xd5')](_0x3b87d4['dialNoSuchNumberRetryFrequency'],_0x9453('0xd6'))[_0x9453('0x3e')](_0x9453('0xb8')),'ContactId':_0x59ff75[_0x9453('0xd7')],'ListId':_0x59ff75[_0x9453('0xd8')],'VoiceQueueId':_0x59ff75[_0x9453('0xd9')]||undefined,'CampaignId':_0x59ff75[_0x9453('0xda')]||undefined})[_0x9453('0x98')](loggerCatch(_0x9453('0x18d')));}break;case 0xa:if(_0x59ff75[_0x9453('0xcc')]>=_0x3b87d4[_0x9453('0xd2')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countdropretry':_0x59ff75[_0x9453('0xcc')]+=0x1,'scheduledat':moment()[_0x9453('0xd5')](_0x3b87d4[_0x9453('0xce')],_0x9453('0xd6'))[_0x9453('0x3e')](_0x9453('0xb8')),'ContactId':_0x59ff75[_0x9453('0xd7')],'ListId':_0x59ff75[_0x9453('0xd8')],'VoiceQueueId':_0x59ff75[_0x9453('0xd9')]||undefined,'CampaignId':_0x59ff75['CampaignId']||undefined})[_0x9453('0x98')](loggerCatch(_0x9453('0xdb')));break;case 0xb:if(_0x59ff75[_0x9453('0xe3')]>=_0x3b87d4[_0x9453('0xe5')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countabandonedretry':_0x59ff75['countabandonedretry']+=0x1,'scheduledat':moment()[_0x9453('0xd5')](_0x3b87d4['dialAbandonedRetryFrequency'],_0x9453('0xd6'))['format'](_0x9453('0xb8')),'ContactId':_0x59ff75['ContactId'],'ListId':_0x59ff75['ListId'],'VoiceQueueId':_0x59ff75[_0x9453('0xd9')]||undefined,'CampaignId':_0x59ff75[_0x9453('0xda')]||undefined})[_0x9453('0x98')](loggerCatch(_0x9453('0xe7')));break;case 0x13:if(_0x59ff75[_0x9453('0x112')]>=_0x3b87d4['dialMachineMaxRetry']-0x1){return!![];}hopperUtils[_0x9453('0xd4')]({'active':![],'countmachineretry':_0x59ff75[_0x9453('0x112')]+=0x1,'scheduledat':moment()[_0x9453('0xd5')](_0x3b87d4['dialMachineRetryFrequency'],_0x9453('0xd6'))[_0x9453('0x3e')](_0x9453('0xb8')),'ContactId':_0x59ff75[_0x9453('0xd7')],'ListId':_0x59ff75[_0x9453('0xd8')],'VoiceQueueId':_0x59ff75['VoiceQueueId']||undefined,'CampaignId':_0x59ff75[_0x9453('0xda')]||undefined})[_0x9453('0x98')](loggerCatch('[rescheduleContact][Machine]'));break;case 0x14:if(_0x59ff75[_0x9453('0x118')]>=_0x3b87d4[_0x9453('0x18e')]-0x1){return!![];}hopperUtils[_0x9453('0xd4')]({'active':![],'countagentrejectretry':_0x59ff75['countagentrejectretry']+=0x1,'scheduledat':moment()['add'](_0x3b87d4[_0x9453('0x18f')],_0x9453('0xd6'))['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x59ff75[_0x9453('0xd7')],'ListId':_0x59ff75['ListId'],'VoiceQueueId':_0x59ff75[_0x9453('0xd9')]||undefined,'CampaignId':_0x59ff75['CampaignId']||undefined})['catch'](loggerCatch('[rescheduleContact][AgentReject]'));break;default:return!![];}};Dialer[_0x9453('0x81')][_0x9453('0x102')]=function(_0x310355,_0x2ceab4,_0x3b7a72){var _0x233a53=this;var _0x1ff425=new History(_0x310355);var _0x15ac60=![];var _0x4bfc39;var _0x224630;return new Promise(function(_0x4ebcc7,_0x39e403){if(_[_0x9453('0x37')](_0x2ceab4)&&typeof _0x2ceab4!=='object'){return _0x39e403(msgResponse(_0x9453('0x190'),_0x9453('0x8d'),_0x9453('0x191')));}if(_['isUndefined'](_0x3b7a72)&&typeof _0x3b7a72!=='object'){return _0x39e403(msgResponse(_0x9453('0x190'),_0x9453('0x8d'),_0x9453('0x192')));}hopperUtils[_0x9453('0xd0')](_0x1ff425,_0x3b7a72['reason'],_0x2ceab4)[_0x9453('0x92')](function(_0x55dd24){if(_0x55dd24[_0x9453('0xd3')]==0x1)_0x15ac60=!![];switch(_0x3b7a72['reason']){case'0':_0x2ceab4[_0x9453('0x193')]+=0x1;_0x1ff425['state']=0x0;_0x1ff425[_0x9453('0xc7')]=_0x9453('0x194');_0x1ff425[_0x9453('0x117')]+=0x1;_0x1ff425[_0x9453('0xcd')]+=0x1;ami[_0x9453('0x38')]('custom:agentnosuchnumber',ut[_0x9453('0x10c')](_0x310355,_0x9453('0x195')));_0x4bfc39=_0x2ceab4[_0x9453('0x196')];_0x224630=_0x2ceab4[_0x9453('0xcf')];hopperUtils['createHistory'](_0x1ff425)[_0x9453('0x98')](loggerCatch(_0x9453('0x123')));if(_0x233a53[_0x9453('0x197')](0x0,_0x310355,_0x2ceab4)&&!_0x15ac60){if(_0x1ff425['countnosuchnumberretry']>=_0x2ceab4['dialNoSuchNumberMaxRetry']){_0x233a53[_0x9453('0x11b')](_0x1ff425,_0x4ebcc7,_0x39e403,_0x9453('0x198'));}else{_0x233a53[_0x9453('0x119')](_0x1ff425,_0x4ebcc7,_0x39e403,_0x9453('0x198'));}}break;case'3':_0x2ceab4['outboundNoAnswerCallsDay']+=0x1;_0x1ff425['state']=0x3;_0x1ff425[_0x9453('0xc7')]=_0x9453('0x199');_0x1ff425[_0x9453('0x116')]+=0x1;_0x1ff425[_0x9453('0xcd')]+=0x1;var _0x333c1c=ut['buildNoAnswerEventPayload'](_0x310355,_0x2ceab4);ami[_0x9453('0x38')](_0x9453('0x19a'),_0x333c1c);_0x4bfc39=_0x2ceab4[_0x9453('0x185')];_0x224630=_0x2ceab4[_0x9453('0xcf')];hopperUtils[_0x9453('0xbe')](_0x1ff425)['catch'](loggerCatch(_0x9453('0x19b')));if(_0x233a53['checkRetriveMax'](0x3,_0x310355,_0x2ceab4)&&!_0x15ac60){if(_0x1ff425[_0x9453('0x116')]>=_0x2ceab4[_0x9453('0x19c')]){_0x233a53[_0x9453('0x11b')](_0x1ff425,_0x4ebcc7,_0x39e403,_0x9453('0x19d'));}else{_0x233a53['stateGlobal'](_0x1ff425,_0x4ebcc7,_0x39e403,_0x9453('0x19d'));}}break;case'5':_0x2ceab4[_0x9453('0x19e')]+=0x1;_0x1ff425[_0x9453('0x67')]=0x5;_0x1ff425['statedesc']=_0x9453('0x19f');_0x1ff425[_0x9453('0x114')]+=0x1;_0x1ff425[_0x9453('0xcd')]+=0x1;ami[_0x9453('0x38')](_0x9453('0x1a0'),ut['buildObj'](_0x310355,'busy'));_0x4bfc39=_0x2ceab4['dialBusyRetryFrequency'];_0x224630=_0x2ceab4[_0x9453('0xcf')];hopperUtils['createHistory'](_0x1ff425)[_0x9453('0x98')](loggerCatch(_0x9453('0x1a1')));if(_0x233a53[_0x9453('0x197')](0x5,_0x310355,_0x2ceab4)&&!_0x15ac60){if(_0x1ff425[_0x9453('0x114')]>=_0x2ceab4[_0x9453('0x187')]){_0x233a53[_0x9453('0x11b')](_0x1ff425,_0x4ebcc7,_0x39e403,'reason\x205\x20busy');}else{_0x233a53[_0x9453('0x119')](_0x1ff425,_0x4ebcc7,_0x39e403,_0x9453('0x1a2'));}}break;case'8':_0x2ceab4[_0x9453('0x1a3')]+=0x1;_0x1ff425[_0x9453('0x67')]=0x8;_0x1ff425[_0x9453('0xc7')]=_0x9453('0x1a4');_0x1ff425['countcongestionretry']+=0x1;_0x1ff425[_0x9453('0xcd')]+=0x1;_0x4bfc39=_0x2ceab4[_0x9453('0x18a')];_0x224630=_0x2ceab4[_0x9453('0xcf')];ami['emit']('custom:agentcongestion',ut['buildObj'](_0x310355,'congestion'));hopperUtils[_0x9453('0xbe')](_0x1ff425)[_0x9453('0x98')](loggerCatch(_0x9453('0x1a5')));if(_0x233a53[_0x9453('0x197')](0x8,_0x310355,_0x2ceab4)&&!_0x15ac60){if(_0x1ff425['countcongestionretry']>=_0x2ceab4[_0x9453('0x189')]){_0x233a53[_0x9453('0x11b')](_0x1ff425,_0x4ebcc7,_0x39e403,_0x9453('0x1a6'));}else{_0x233a53[_0x9453('0x119')](_0x1ff425,_0x4ebcc7,_0x39e403,_0x9453('0x1a6'));}}break;case'11':_0x2ceab4[_0x9453('0x1a7')]+=0x1;_0x1ff425[_0x9453('0x67')]=0xb;_0x1ff425[_0x9453('0xc7')]=_0x9453('0xe1');_0x1ff425[_0x9453('0xe3')]+=0x1;_0x1ff425['countglobal']+=0x1;_0x4bfc39=_0x2ceab4['dialAbandonedRetryFrequency'];_0x224630=_0x2ceab4[_0x9453('0xcf')];hopperUtils[_0x9453('0xbe')](_0x1ff425)[_0x9453('0x98')](loggerCatch(_0x9453('0x1a8')));if(_0x233a53[_0x9453('0x197')](0xb,_0x310355,_0x2ceab4)&&!_0x15ac60){if(_0x1ff425[_0x9453('0xe3')]>=_0x2ceab4[_0x9453('0xe5')]){_0x233a53[_0x9453('0x11b')](_0x1ff425,_0x4ebcc7,_0x39e403,_0x9453('0x1a9'));}else{_0x233a53[_0x9453('0x119')](_0x1ff425,_0x4ebcc7,_0x39e403,'reason\x2011\x20abandoned');}}break;case'20':_0x2ceab4[_0x9453('0x1aa')]+=0x1;_0x1ff425[_0x9453('0x67')]=0x14;_0x1ff425[_0x9453('0xc7')]='AgentReject';_0x1ff425[_0x9453('0x118')]+=0x1;_0x1ff425[_0x9453('0xcd')]+=0x1;_0x4bfc39=_0x2ceab4[_0x9453('0x18f')];_0x224630=_0x2ceab4[_0x9453('0xcf')];ami[_0x9453('0x38')](_0x9453('0x1ab'),ut['buildObj'](_0x310355,_0x9453('0x1ac')));hopperUtils['createHistory'](_0x1ff425)[_0x9453('0x98')](loggerCatch(_0x9453('0x1ad')));if(_0x233a53[_0x9453('0x197')](0x14,_0x310355,_0x2ceab4)&&!_0x15ac60){if(_0x1ff425[_0x9453('0x118')]>=_0x2ceab4['dialAgentRejectMaxRetry']){_0x233a53[_0x9453('0x11b')](_0x1ff425,_0x4ebcc7,_0x39e403,_0x9453('0x1ae'));}else{_0x233a53['stateGlobal'](_0x1ff425,_0x4ebcc7,_0x39e403,'reason\x2020\x20agentreject');}}break;default:_0x2ceab4[_0x9453('0x12d')]+=0x1;_0x1ff425[_0x9453('0x67')]=0xc;_0x1ff425['statedesc']=_0x3b7a72['reason'];_0x4bfc39=_0x2ceab4[_0x9453('0x18f')];_0x224630=_0x2ceab4[_0x9453('0xcf')];hopperUtils['createHistory'](_0x1ff425)[_0x9453('0x98')](loggerCatch('[syncAgentComplete][createHistory][?]'));if(_0x233a53[_0x9453('0x197')](_0x3b7a72['reason'],_0x310355,_0x2ceab4)&&!_0x15ac60){if(_0x1ff425['countbusyretry']+_0x1ff425[_0x9453('0x115')]+_0x1ff425['countnoanswerretry']+_0x1ff425[_0x9453('0x117')]+_0x1ff425[_0x9453('0xcc')]+_0x1ff425[_0x9453('0xe3')]+_0x1ff425[_0x9453('0x112')]+_0x1ff425[_0x9453('0x118')]>=_0x2ceab4[_0x9453('0x124')]){_0x233a53[_0x9453('0x119')](_0x1ff425,_0x4ebcc7,_0x39e403,_0x3b7a72[_0x9453('0x1af')]);}else{_0x233a53[_0x9453('0x11b')](_0x1ff425,_0x4ebcc7,_0x39e403,_0x3b7a72[_0x9453('0x1af')]);}}}})['then'](function(){if(_0x15ac60){hopperUtils['swapAdditionalPhones'](_0x1ff425,_0x4bfc39,_0x224630)[_0x9453('0x92')](function(){return _0x4ebcc7(0x1);});}});});};Dialer[_0x9453('0x81')][_0x9453('0x119')]=function(_0x530257,_0x109624,_0x4ff186,_0xd57d0b){var _0x4bccee=new Final(_0x530257);_0x4bccee['state']=0xf;_0x4bccee['statedesc']='Global';this[_0x9453('0x11b')](_0x4bccee,_0x109624,_0x4ff186,_0xd57d0b);};Dialer['prototype']['createStateFinal']=function(_0x352958,_0x197b31,_0x87bd43,_0x3b2430){hopperUtils['moveContactManagedDialer'](_0x352958)['then'](function(){return _0x197b31(msgResponse(_0x9453('0x190'),_0x9453('0x101'),_0x3b2430));})[_0x9453('0x98')](function(){return _0x87bd43(msgResponse(_0x9453('0x1b0'),_0x9453('0x8d'),'contact\x20not\x20moved'));});};Dialer[_0x9453('0x81')][_0x9453('0xa')]=function(_0x5058b7){var _0x4ab353=_0x5058b7[_0x9453('0x1b1')]/0x64;var _0x10d01a=_0x5058b7['outboundDropCallsDayTimeout']/(_0x5058b7['outboundDropCallsDayTimeout']+_0x5058b7['outboundAnswerCallsDay']);var _0x315e5f=Math[_0x9453('0x1b2')](_0x5058b7[_0x9453('0x1b3')]*(_0x5058b7[_0x9453('0x1b4')]/0x64));var _0x4d2f8d=Math['round'](_0x5058b7[_0x9453('0x1b3')]*(_0x5058b7[_0x9453('0x1b5')]/0x64));var _0x286297=_0x5058b7[_0x9453('0x1b6')]+_0x5058b7[_0x9453('0x1b7')];var _0x131a38=Math[_0x9453('0x1b8')](_0x5058b7['erlangCalls']*_0x5058b7[_0x9453('0x1b9')]*_0x5058b7[_0x9453('0x1ba')]*_0x5058b7[_0x9453('0x1bb')]);if(_[_0x9453('0x37')](_0x5058b7[_0x9453('0x1f')])){if(!_[_0x9453('0x37')](_0x5058b7[_0x9453('0x5b')])){_0x5058b7[_0x9453('0x5b')]=undefined;loggerPredictive['error'](_0x9453('0x1bc'),'check\x20predictive\x20is\x20not\x20undefine');}if(!_[_0x9453('0x37')](_0x5058b7[_0x9453('0x5d')])){loggerPredictive[_0x9453('0x5f')](_0x9453('0x1bc'),_0x9453('0x1bd'));clearInterval(_0x5058b7[_0x9453('0x5d')]);_0x5058b7[_0x9453('0x5d')]=undefined;}_0x5058b7[_0x9453('0x1f')]=moment()[_0x9453('0x3e')](_0x9453('0xb8'));loggerPredictive[_0x9453('0x41')](_0x5058b7[_0x9453('0x59')],_0x9453('0x1be'),_0x5058b7[_0x9453('0x1f')]);this['handlePower'](_0x5058b7,0x1);}else if(ifInterval(_0x5058b7[_0x9453('0x1bf')],_0x5058b7['startProgressive'])){this[_0x9453('0xa7')](_0x5058b7,0x1);loggerPredictiveCalls[_0x9453('0x41')](_0x9453('0x1c0'),_0x5058b7[_0x9453('0x1f')],_0x5058b7[_0x9453('0x59')]);_0x5058b7[_0x9453('0x51')]=0x0;_0x5058b7[_0x9453('0xc6')]=0x0;}else if(_0x4ab353<_0x10d01a&&_0x5058b7['dialPredictiveOptimization']===_0x9453('0x1c1')){clearPredictiveAttributes(_0x5058b7);loggerPredictive[_0x9453('0x41')](_0x9453('0x1c2'),'Dropped\x20calls\x20day',_0x10d01a,_0x9453('0x1f'),_0x5058b7['name']);}else if(_0x131a38<_0x5058b7[_0x9453('0xc6')]&&_0x5058b7[_0x9453('0x1c3')]===_0x9453('0x1c1')){clearPredictiveAttributes(_0x5058b7);loggerPredictive['info'](_0x9453('0x1c4'),_0x9453('0x1c5'),_0x131a38,'Drop\x20in\x20this\x20interval',_0x5058b7[_0x9453('0xc6')],_0x9453('0x1f'),_0x5058b7[_0x9453('0x59')]);}else if(!ifInterval(_0x5058b7[_0x9453('0x1bf')],_0x5058b7['startProgressive'])&&_[_0x9453('0x37')](_0x5058b7[_0x9453('0x5b')])&&!_[_0x9453('0x37')](_0x5058b7[_0x9453('0x1f')])){_0x5058b7['startPredictive']=moment()[_0x9453('0x3e')](_0x9453('0xb8'));loggerPredictive['info'](_0x5058b7[_0x9453('0x59')],_0x9453('0x1c6'),_0x5058b7['startPredictive']);hopperUtils[_0x9453('0x1c7')](_0x5058b7[_0x9453('0x1bf')])[_0x9453('0x92')](this[_0x9453('0x1c8')](_0x5058b7))[_0x9453('0x92')](mergeDataErlangB(_0x5058b7))[_0x9453('0x92')](this['startMethodPredictive'](_0x5058b7))['catch'](loggerCatchPredictive(_0x9453('0x1c9'),_0x5058b7));}else if(!ifInterval(_0x5058b7[_0x9453('0x1bf')],_0x5058b7['startPredictive'])){_0x5058b7[_0x9453('0xc6')]=0x0;_0x5058b7['startPredictive']=moment()[_0x9453('0x3e')](_0x9453('0xb8'));loggerPredictive[_0x9453('0x41')](_0x5058b7[_0x9453('0x59')],_0x9453('0x1ca'),_0x5058b7['startPredictive']);clearInterval(_0x5058b7['handlePredictive']);_0x5058b7['handlePredictive']=undefined;hopperUtils[_0x9453('0x1c7')](_0x5058b7[_0x9453('0x1bf')])[_0x9453('0x92')](this[_0x9453('0x1c8')](_0x5058b7))[_0x9453('0x92')](mergeDataErlangB(_0x5058b7))['then'](this[_0x9453('0x1cb')](_0x5058b7))['catch'](loggerCatchPredictive('Predictive\x20for\x20every\x20interval',_0x5058b7));}else if(_0x5058b7[_0x9453('0x1b3')]&&_0x286297<_0x5058b7[_0x9453('0x1b3')]-_0x4d2f8d){clearPredictiveAttributes(_0x5058b7);loggerPredictive[_0x9453('0x41')](_0x5058b7[_0x9453('0x59')],_0x9453('0x1cc'),_0x286297,_0x9453('0x1cd'),_0x5058b7[_0x9453('0x1b3')],'-',_0x4d2f8d,'=',_0x5058b7[_0x9453('0x1b3')]-_0x4d2f8d,')');}else if(_0x5058b7[_0x9453('0x1b3')]&&_0x286297>_0x5058b7[_0x9453('0x1b3')]+_0x315e5f){clearPredictiveAttributes(_0x5058b7);loggerPredictive[_0x9453('0x41')](_0x5058b7['name'],_0x9453('0x1cc'),_0x286297,')\x20are\x20more\x20than\x20threshold\x20(',_0x5058b7[_0x9453('0x1b3')],'+',_0x315e5f,'=',_0x5058b7[_0x9453('0x1b3')]+_0x315e5f,')');}};Dialer[_0x9453('0x81')][_0x9453('0x1c8')]=function(_0x11d52d){var _0x30055e=this;return function(_0x3d05fa){return new Promise(function(_0x24fcfb,_0xa0976c){_[_0x9453('0x57')](_0x11d52d,_0x3d05fa[0x0]);if(checkGetDataPredictive(_0x3d05fa[0x0])){var _0x4c01a4=_0x11d52d['predictiveIntervalAvailable']=_0x11d52d['talking']+_0x11d52d[_0x9453('0x1b6')];var _0x9d47c1=_0x11d52d[_0x9453('0x1bf')]*0x3c;var _0x3d658b=_0x3d05fa[0x0]['predictiveIntervalAvgTalktime']+_0x3d05fa[0x0][_0x9453('0x47')];var _0x3484d1=(_0x3d05fa[0x0][_0x9453('0x1ce')]+_0x3d05fa[0x0][_0x9453('0xc4')]+_0x3d05fa[0x0][_0x9453('0x45')])/_0x3d05fa[0x0][_0x9453('0x4b')];_0x11d52d['predictiveIntervalHitRate']=_0x3484d1>0x0?_0x3484d1:0x1;switch(_0x11d52d[_0x9453('0x1c3')]){case _0x9453('0x1c1'):var _0x5aac1f=_0x11d52d[_0x9453('0x1b1')]/0x64;return _0x30055e['abandonmentRate'](_0x4c01a4,_0x9d47c1,_0x3d658b,_0x3484d1,_0x5aac1f)[_0x9453('0x92')](function(_0xe02665){return _0x24fcfb(_0xe02665);});case _0x9453('0x1cf'):var _0x4e092d=_0x11d52d[_0x9453('0x1b1')]/0x64;return _0x30055e[_0x9453('0x1d0')](_0x4c01a4,_0x9d47c1,_0x3d658b,_0x3484d1,_0x4e092d)[_0x9453('0x92')](function(_0x4f076b){return _0x24fcfb(_0x4f076b);});default:return _0xa0976c(msgResponse(_0x9453('0x1d1'),_0x9453('0x8d'),_0x9453('0x1d2')));}}else{return _0xa0976c(msgResponse(_0x9453('0x1d1'),_0x9453('0x8d'),_0x9453('0x1d3')));}});};};Dialer[_0x9453('0x81')][_0x9453('0x1d4')]=function(_0x26fac3){var _0x4eb710=this;return function(_0x2f6c5b){return new Promise(function(_0x43a896,_0x4baae3){_[_0x9453('0x57')](_0x26fac3,_0x2f6c5b[0x0]);if(checkGetDataPredictive(_0x2f6c5b[0x0])){loggerPredictive[_0x9453('0x41')](JSON[_0x9453('0x6d')](_0x2f6c5b[0x0]));if(_0x26fac3[_0x9453('0x1c3')]===_0x9453('0x1c1')){return _0x4eb710[_0x9453('0x147')](_0x26fac3['id'])[_0x9453('0x92')](function(_0x4068f5){var _0x16a001=_0x26fac3[_0x9453('0x1d5')]-_0x4068f5[0x0][_0x9453('0x1d6')];var _0x14e090=_0x26fac3[_0x9453('0x1bf')]*0x3c;var _0x169e8d=_0x2f6c5b[0x0][_0x9453('0x49')]+_0x2f6c5b[0x0]['predictiveIntervalAvgHoldtime'];var _0x598d07=(_0x2f6c5b[0x0][_0x9453('0x1ce')]+_0x2f6c5b[0x0][_0x9453('0xc4')]+_0x2f6c5b[0x0][_0x9453('0x45')])/_0x2f6c5b[0x0][_0x9453('0x4b')];var _0x270cde=_0x26fac3['dialPredictiveOptimizationPercentage']/0x64;_0x26fac3['predictiveIntervalPauses']=_0x4068f5[0x0][_0x9453('0x1d6')]||0x0;_0x26fac3[_0x9453('0x1ba')]=_0x598d07>0x0?_0x598d07:0x1;return _0x4eb710['abandonmentRate'](_0x16a001,_0x14e090,_0x169e8d,_0x598d07,_0x270cde);})[_0x9453('0x92')](function(_0x2990f4){return _0x43a896(_0x2990f4);})[_0x9453('0x98')](function(_0xfce640){return _0x4baae3(msgResponse(_0x9453('0x1d7'),_0x9453('0x8d'),JSON[_0x9453('0x6d')](_0xfce640)));});}if(_0x26fac3['dialPredictiveOptimization']===_0x9453('0x1cf')){return _0x4eb710[_0x9453('0x147')](_0x26fac3['id'])['then'](function(_0x23e52e){var _0x5d8b84=_0x26fac3[_0x9453('0x1d5')]-_0x23e52e[0x0][_0x9453('0x1d6')];var _0x51c1ff=_0x26fac3['dialPredictiveInterval']*0x3c;var _0x1fd22a=_0x2f6c5b[0x0][_0x9453('0x49')]+_0x2f6c5b[0x0][_0x9453('0x47')];var _0x24cc71=(_0x2f6c5b[0x0][_0x9453('0x1ce')]+_0x2f6c5b[0x0][_0x9453('0xc4')]+_0x2f6c5b[0x0]['predictiveIntervalDroppedCallsCallersExit'])/_0x2f6c5b[0x0][_0x9453('0x4b')];var _0x23c3ce=_0x26fac3[_0x9453('0x1b1')]/0x64;_0x26fac3[_0x9453('0x1d8')]=_0x23e52e[0x0]['outboundQueuePauses']||0x0;_0x26fac3['predictiveIntervalHitRate']=_0x24cc71>0x0?_0x24cc71:0x1;return _0x4eb710['busyFactor'](_0x5d8b84,_0x51c1ff,_0x1fd22a,_0x24cc71,_0x23c3ce);})[_0x9453('0x92')](function(_0xddbf37){return _0x43a896(_0xddbf37);})[_0x9453('0x98')](function(_0x39ebc4){return _0x4baae3(msgResponse('[CatchErlangB]','Failure',JSON['stringify'](_0x39ebc4)));});}}else{return _0x4baae3(msgResponse('[getDataPredictive]',_0x9453('0x8d'),_0x9453('0x1d3')));}});};};Dialer[_0x9453('0x81')]['startMethodPredictive']=function(_0x53cf69){var _0x712861=this;return function(){var _0x40a4af=0x0;var _0x46840c=Math[_0x9453('0x1b8')](_0x53cf69[_0x9453('0x53')]*0x3e8);if(_0x46840c>0x0){_0x46840c=_0x46840c<0x64?0x64:_0x46840c;loggerPredictive[_0x9453('0x41')](_0x53cf69[_0x9453('0x59')],'one\x20call\x20every:',_0x46840c,'milliseconds');_0x53cf69['handlePredictive']=setInterval(function(){_0x712861[_0x9453('0x5d')](_0x53cf69);loggerPredictiveCalls['info'](_0x9453('0x1d9'),_0x40a4af+=0x1);},_0x46840c);}else{loggerPredictive[_0x9453('0x41')](_0x53cf69[_0x9453('0x59')],'fail\x20to\x20scheduled\x20calls');}};};Dialer[_0x9453('0x81')][_0x9453('0x1da')]=function(_0x50e112,_0x2bd775){var _0x474026=this;return function(_0x10d61c){if(_[_0x9453('0x40')](_0x10d61c)){if(_[_0x9453('0xec')](_0x2bd775[_0x9453('0x14f')])||!_0x2bd775[_0x9453('0x1db')]){if(_0x50e112['dialMethod']==='booked'){_0x50e112[_0x9453('0x6a')]=_[_0x9453('0x37')](_0x50e112[_0x9453('0x6a')])?!![]:_0x50e112['queueStatusComplete'];var _0x43c0fd=uuid['v4']();_0x474026[_0x9453('0x1d')][_0x43c0fd]=new Action(_0x50e112,_0x2bd775,_0x43c0fd);loggerBooked['info'](_0x9453('0x1dc'),_0x43c0fd,_0x9453('0x1dd'),JSON[_0x9453('0x6d')](_0x50e112[_0x9453('0x6a')]),_0x9453('0x1de'),_0x50e112[_0x9453('0x59')]);if(_0x50e112[_0x9453('0x6a')]){_0x50e112[_0x9453('0x6a')]=![];_0x474026[_0x9453('0xf0')][_0x474026[_0x9453('0x1d')][_0x43c0fd][_0x9453('0xb3')]]=[];ami[_0x9453('0x91')]({'actionid':_0x43c0fd,'action':_0x9453('0x1df'),'queue':_0x50e112[_0x9453('0x59')]})[_0x9453('0x98')](function(){_0x474026[_0x9453('0xb6')](_0x50e112);hopperUtils['rescheduleContact']({'active':![],'ContactId':_0x474026[_0x9453('0x1d')][_0x43c0fd]['ContactId'],'ListId':_0x474026[_0x9453('0x1d')][_0x43c0fd][_0x9453('0xd8')],'VoiceQueueId':_0x474026['actions'][_0x43c0fd][_0x9453('0xd9')]||undefined,'CampaignId':_0x474026[_0x9453('0x1d')][_0x43c0fd][_0x9453('0xda')]||undefined})[_0x9453('0x98')](loggerCatch(_0x9453('0x1e0')));delete _0x474026['actions'][_0x43c0fd];});}else{loggerBooked[_0x9453('0x41')](_0x9453('0x1e1'),JSON[_0x9453('0x6d')](_0x50e112[_0x9453('0x6a')]),_0x9453('0x1de'),_0x50e112['name']);_0x474026[_0x9453('0xb6')](_0x50e112);hopperUtils[_0x9453('0xd4')]({'active':![],'ContactId':_0x474026[_0x9453('0x1d')][_0x43c0fd]['ContactId'],'ListId':_0x474026['actions'][_0x43c0fd][_0x9453('0xd8')],'VoiceQueueId':_0x474026[_0x9453('0x1d')][_0x43c0fd][_0x9453('0xd9')]||undefined,'CampaignId':_0x474026['actions'][_0x43c0fd][_0x9453('0xda')]||undefined})[_0x9453('0x98')](loggerCatch(_0x9453('0x1e0')));delete _0x474026[_0x9453('0x1d')][_0x43c0fd];}}else{return _0x474026[_0x9453('0x154')](_0x50e112,_0x2bd775);}}else{if(utils[_0x9453('0x58')](undefined,_0x2bd775[_0x9453('0x1e2')])<_0x50e112[_0x9453('0x1e3')]*0x3c){if(_0x2bd775['Agent']&&!_0x2bd775[_0x9453('0x13e')][_0x9453('0x1e4')]){_0x474026[_0x9453('0x17')][_0x9453('0xf2')](_0x2bd775['id'])['finally'](function(){_0x474026[_0x9453('0xb6')](_0x50e112);});}else{hopperUtils[_0x9453('0x1e5')]({'active':![]},_0x2bd775['id'],0x1)[_0x9453('0xf5')](function(){_0x474026['updateOriginated'](_0x50e112);});}}else{_0x50e112[_0x9453('0x1e6')]+=0x1;_0x474026[_0x9453('0xb6')](_0x50e112);if(_0x50e112[_0x9453('0x1e7')]){hopperUtils[_0x9453('0xd4')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x2bd775[_0x9453('0xd7')],'ListId':_0x2bd775['ListId'],'VoiceQueueId':_0x2bd775[_0x9453('0xd9')]||undefined,'CampaignId':_0x2bd775[_0x9453('0xda')]||undefined})['catch'](loggerCatch(_0x9453('0x1e8')));hopperUtils[_0x9453('0xbe')](createObjHistory(_0x50e112,_0x2bd775,utils[_0x9453('0x63')]['QUEUE_RECALL'],0x17,_0x9453('0x1e9')))['catch'](loggerCatch(_0x9453('0x1ea')));}else{_0x474026[_0x9453('0x10d')](createObjHistory(_0x50e112,_0x2bd775,utils['CAMPAIGN_STATUS']['RECALL_TIMEOUT'],0x16,'RecallFailedTimeout'),_0x9453('0x1eb'),'[Originate][HistoryRecallClose]');}}}}else{_0x50e112[_0x9453('0x1ec')]+=0x1;_0x474026[_0x9453('0x10d')](createObjHistory(_0x50e112,_0x2bd775,utils[_0x9453('0x63')][_0x9453('0x1ed')],0xd,'Blacklist'),'[Originate][historyBlacklist]','[Originate][MoveBlacklist]');throw'inBlackList';}};};Dialer[_0x9453('0x81')][_0x9453('0x153')]=function(_0xf5f707){var _0x2ce185=this;var _0x125927=_0xf5f707[_0x9453('0x1ee')]-_0xf5f707[_0x9453('0x149')];emitCampaignSummary(_0xf5f707);if(_0x125927>0x0&&_0xf5f707[_0x9453('0x1ef')]==0x0){if(_0x125927>this[_0x9453('0x1c')]){_0x125927=this[_0x9453('0x1c')];}_0xf5f707[_0x9453('0x1ef')]=0x1;hopperUtils[_0x9453('0x1f0')](_0xf5f707,_0x125927)[_0x9453('0x92')](function(_0x25ca12){_0xf5f707['temp']=0x0;if(_0x25ca12){if(!utils[_0x9453('0x1f1')](_0x25ca12)){_0xf5f707[_0x9453('0x62')]=utils['CAMPAIGN_STATUS'][_0x9453('0x66')];logger[_0x9453('0x41')](_0x9453('0x1f2')+_0xf5f707[_0x9453('0x59')]);}else{_0xf5f707[_0x9453('0x149')]+=_0x25ca12[_0x9453('0x8f')];_0xf5f707[_0x9453('0x62')]=utils[_0x9453('0x63')][_0x9453('0x1f3')];for(var _0x1a6fcd=0x0;_0x1a6fcd<_0x25ca12[_0x9453('0x8f')];_0x1a6fcd+=0x1){_0xf5f707[_0x9453('0x1f4')]+=0x1;if(_[_0x9453('0xec')](_0x25ca12[_0x1a6fcd])||_['isNil'](_0x25ca12[_0x1a6fcd][_0x9453('0x16f')])||_[_0x9453('0xec')](_0x25ca12[_0x1a6fcd]['phone'])){_0x2ce185['emptyContact'](_0x9453('0x1f5'),_0xf5f707,_0x25ca12[_0x1a6fcd]);}else{hopperUtils[_0x9453('0x1f6')](_[_0x9453('0x6e')](_0x25ca12[_0x1a6fcd],[_0x9453('0xda'),_0x9453('0x158')]))[_0x9453('0x92')](_0x2ce185[_0x9453('0x1da')](_0xf5f707,_0x25ca12[_0x1a6fcd]))[_0x9453('0x98')](_0x2ce185[_0x9453('0x14c')](_0x9453('0x1f7'),_0xf5f707));}}}}})[_0x9453('0x98')](loggerGetContactDialer(_0x9453('0x1f8'),_0xf5f707,_0x125927));}};Dialer[_0x9453('0x81')]['handlePower']=function(_0x393c75,_0x1b1a47){var _0x22c72b=this;var _0x1c955a=[];if(_0x1b1a47<0x1||_0x393c75['dialMethod']===_0x9453('0x9')){_0x1b1a47=0x1;}var _0x28a400=Math[_0x9453('0x1b8')](_0x393c75[_0x9453('0x1b6')]*_0x1b1a47)-_0x393c75['originated'];if(_0x393c75[_0x9453('0x1f9')]>0x0){var _0xbd161e=_0x393c75['dialLimitQueue']-_0x393c75['originated']-_0x393c75[_0x9453('0x1b7')]-_0x393c75[_0x9453('0x134')];if(_0x28a400>_0xbd161e){_0x28a400=_0xbd161e;}}if(_0x28a400>0x0&&_0x393c75[_0x9453('0x1ef')]==0x0){if(_0x393c75[_0x9453('0xa6')]===_0x9453('0x9')){_0x28a400=0x1;}if(_0x28a400>this['maxNumberOriginate']){_0x28a400=this[_0x9453('0x1c')];}for(var _0x1de7a6 in this['agents']){if(typeof this[_0x9453('0x1a')][_0x1de7a6]!==_0x9453('0x144')){if(this[_0x9453('0x1a')][_0x1de7a6][_0x9453('0x67')]===_0x9453('0x1fa')&&this[_0x9453('0x1a')][_0x1de7a6][_0x9453('0x7e')]===_0x9453('0x7f')){_0x1c955a[_0x9453('0x90')](this['agents'][_0x1de7a6]['id']);}}}_0x393c75['temp']=0x1;hopperUtils[_0x9453('0x1fb')](_0x393c75,_0x1c955a,_0x28a400)['then'](function(_0x2fbf36){_0x393c75[_0x9453('0x1ef')]=0x0;if(_0x2fbf36){if(!utils[_0x9453('0x1f1')](_0x2fbf36)){hopperUtils['countReScheduled'](_0x393c75)[_0x9453('0x92')](sendMessageReschedule(_0x393c75))[_0x9453('0x98')](loggerCatch(_0x9453('0x1fc')));}else{_0x393c75[_0x9453('0x149')]+=_0x2fbf36[_0x9453('0x8f')];_0x393c75[_0x9453('0x62')]=_0x393c75[_0x9453('0xa6')]===_0x9453('0x9')?utils['CAMPAIGN_STATUS'][_0x9453('0x15f')]:utils[_0x9453('0x63')][_0x9453('0x1f3')];for(var _0x5b0b7f=0x0;_0x5b0b7f<_0x2fbf36[_0x9453('0x8f')];_0x5b0b7f+=0x1){if(_[_0x9453('0xec')](_0x2fbf36[_0x5b0b7f])||_[_0x9453('0xec')](_0x2fbf36[_0x5b0b7f][_0x9453('0x16f')])||_['isNil'](_0x2fbf36[_0x5b0b7f][_0x9453('0x158')])){_0x22c72b['emptyContact']('[actionOriginate]\x20',_0x393c75,_0x2fbf36[_0x5b0b7f]);}else{hopperUtils['checkIsBlackList'](_[_0x9453('0x6e')](_0x2fbf36[_0x5b0b7f],['VoiceQueueId',_0x9453('0x158')]))[_0x9453('0x92')](_0x22c72b[_0x9453('0x1da')](_0x393c75,_0x2fbf36[_0x5b0b7f]))[_0x9453('0x98')](_0x22c72b['loggerHandler'](_0x9453('0x1f5'),_0x393c75));}}}}})[_0x9453('0x98')](loggerGetContactDialer(_0x9453('0x1fd'),_0x393c75,_0x28a400));}};Dialer[_0x9453('0x81')][_0x9453('0x5d')]=function(_0x31669c){if(_0x31669c[_0x9453('0x1f9')]>0x0){var _0x2995cc=_0x31669c['dialLimitQueue']-_0x31669c['originated']-_0x31669c['talking'];if(_0x2995cc>0x0&&_0x31669c[_0x9453('0x1ef')]==0x0){this[_0x9453('0x1fe')](_0x31669c);}else{loggerPredictiveCalls[_0x9453('0x41')](_0x9453('0x1ff'));}}else{this[_0x9453('0x1fe')](_0x31669c);}};Dialer[_0x9453('0x81')][_0x9453('0x1fe')]=function(_0x4149cb){var _0x52f5a4=this;var _0x367ea1=[];_0x4149cb['originated']+=0x1;for(var _0x5cb116 in this[_0x9453('0x1a')]){if(typeof this[_0x9453('0x1a')][_0x5cb116]!=='undefined'){if(this[_0x9453('0x1a')][_0x5cb116][_0x9453('0x67')]===_0x9453('0x1fa')&&this['agents'][_0x5cb116]['status']===_0x9453('0x7f')){_0x367ea1[_0x9453('0x90')](this['agents'][_0x5cb116]['id']);}}}_0x4149cb['temp']=0x1;return this[_0x9453('0x1fb')](_0x4149cb['id'],_0x367ea1,0x1,_0x4149cb[_0x9453('0x200')],_0x4149cb)[_0x9453('0x92')](function(_0x2b5cb5){_0x4149cb[_0x9453('0x1ef')]=0x1;if(_0x2b5cb5){if(!utils['checkContactEmpty'](_0x2b5cb5)){utils[_0x9453('0x60')](_0x4149cb,0x1,0x0);return hopperUtils[_0x9453('0x201')](_0x4149cb)[_0x9453('0x92')](sendMessageReschedule(_0x4149cb))[_0x9453('0x98')](loggerCatch(_0x9453('0x1fc')));}else{_0x4149cb['message']=utils[_0x9453('0x63')]['RUNNING'];if(_['isNil'](_0x2b5cb5[0x0])||_[_0x9453('0xec')](_0x2b5cb5[0x0][_0x9453('0x16f')])||_[_0x9453('0xec')](_0x2b5cb5[0x0]['phone'])){_0x52f5a4[_0x9453('0x14d')](_0x9453('0x1f5'),_0x4149cb,_0x2b5cb5[0x0]);}else{return hopperUtils[_0x9453('0x202')](_['pick'](_0x2b5cb5[0x0],[_0x9453('0xd9'),_0x9453('0x158')]))['then'](_0x52f5a4[_0x9453('0x1da')](_0x4149cb,_0x2b5cb5[0x0]))['catch'](_0x52f5a4[_0x9453('0x14c')]('[actionOriginatePredictive]\x20',_0x4149cb));}}}})[_0x9453('0x98')](loggerGetContactDialer(_0x9453('0x203'),_0x4149cb,0x1));};Dialer[_0x9453('0x81')][_0x9453('0x204')]=function(_0x4a1e88,_0xa8a4c6,_0x7e313e,_0x21be5a,_0x2f9907,_0x475f8c){loggerPredictive[_0x9453('0x41')]('--------\x20Drop\x20Rate\x20--------');loggerPredictive[_0x9453('0x41')]('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',_0x4a1e88);loggerPredictive[_0x9453('0x41')]('Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0xa8a4c6);loggerPredictive['info'](_0x9453('0x205'),_0x7e313e);loggerPredictive[_0x9453('0x41')](_0x9453('0x206'),_0x21be5a);loggerPredictive[_0x9453('0x41')](_0x9453('0x207'),_0x2f9907);loggerPredictive[_0x9453('0x41')](_0x9453('0x4a'));return new Promise(function(_0x422dd9,_0x6dcf03){if(_0x4a1e88<=0x0||isNaN(_0x4a1e88)){return _0x6dcf03(msgResponse(_0x9453('0x208'),'Error',_0x9453('0x209')+_0x4a1e88));}if(_0x7e313e<=0x0||isNaN(_0x7e313e)){return _0x6dcf03(msgResponse('[abandonmentRate]','Error','Ts\x20=\x20'+_0x7e313e));}if(_0x21be5a<=0x0||isNaN(_0x21be5a)){return _0x6dcf03(msgResponse(_0x9453('0x208'),_0x9453('0x7b'),_0x9453('0x20a')+_0x21be5a));}if(_0xa8a4c6<=0x0||isNaN(_0xa8a4c6)){return _0x6dcf03(msgResponse(_0x9453('0x208'),_0x9453('0x7b'),_0x9453('0x20b')+_0xa8a4c6));}if(_0x2f9907<=0x0||isNaN(_0x2f9907)){return _0x6dcf03(msgResponse('[abandonmentRate]',_0x9453('0x7b'),_0x9453('0x20c')+_0x2f9907));}_0x475f8c=_0x475f8c||0x0;var _0x41a642=0x1/_0x7e313e;var _0x1ff6e9=0x0;var _0x406e45=0x0;var _0x3c8ac3=0x0;var _0x211262=0x0;for(var _0x1fb1e3=0x0;_0x3c8ac3<_0x2f9907;_0x1fb1e3+=0x1){_0x406e45=_0x1fb1e3/_0xa8a4c6;_0x1ff6e9=(_0x21be5a*_0x406e45+_0x475f8c)/_0x41a642;_0x3c8ac3=utils[_0x9453('0x20d')](_0x1ff6e9,_0x4a1e88);_0x211262=_0x1ff6e9/_0x4a1e88*(0x1-utils[_0x9453('0x20d')](_0x1ff6e9,_0x4a1e88));}return _0x422dd9({'erlangCalls':_0x1fb1e3,'erlangCallToSecond':_0xa8a4c6/_0x1fb1e3,'erlangAbandonmentRate':_0x3c8ac3,'erlangBusyFactor':_0x211262});});};Dialer[_0x9453('0x81')]['busyFactor']=function(_0x297e7d,_0x2fc8d1,_0x66b1a8,_0x430081,_0x5c198f,_0xdf062f){loggerPredictive[_0x9453('0x41')]('----\x20Agent\x20Busy\x20Factor\x20----');loggerPredictive[_0x9453('0x41')]('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',_0x297e7d);loggerPredictive[_0x9453('0x41')]('Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x2fc8d1);loggerPredictive[_0x9453('0x41')](_0x9453('0x205'),_0x66b1a8);loggerPredictive['info']('P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x430081);loggerPredictive[_0x9453('0x41')](_0x9453('0x20e'),_0x5c198f);loggerPredictive[_0x9453('0x41')](_0x9453('0x4a'));return new Promise(function(_0x42fd22,_0x120872){if(_0x297e7d<=0x0||isNaN(_0x297e7d)){return _0x120872(msgResponse(_0x9453('0x20f'),'Error',_0x9453('0x209')+_0x297e7d));}if(_0x66b1a8<=0x0||isNaN(_0x66b1a8)){return _0x120872(msgResponse(_0x9453('0x20f'),'Error',_0x9453('0x210')+_0x66b1a8));}if(_0x430081<=0x0||isNaN(_0x430081)){return _0x120872(msgResponse(_0x9453('0x20f'),_0x9453('0x7b'),_0x9453('0x20a')+_0x430081));}if(_0x2fc8d1<=0x0||isNaN(_0x2fc8d1)){return _0x120872(msgResponse(_0x9453('0x20f'),_0x9453('0x7b'),_0x9453('0x20b')+_0x2fc8d1));}if(_0x5c198f<=0x0||isNaN(_0x5c198f)){return _0x120872(msgResponse(_0x9453('0x20f'),_0x9453('0x7b'),_0x9453('0x211')+_0x5c198f));}_0xdf062f=_0xdf062f||0x0;var _0x50e2f0=0x1/_0x66b1a8;var _0xc090dc=0x0;var _0x337e17=0x0;var _0x48e410=0x0;var _0x2a0a2d=0x0;for(var _0x347dad=0x0;_0x2a0a2d<_0x5c198f;_0x347dad+=0x1){_0x337e17=_0x347dad/_0x2fc8d1;_0xc090dc=(_0x430081*_0x337e17+_0xdf062f)/_0x50e2f0;_0x48e410=utils[_0x9453('0x20d')](_0xc090dc,_0x297e7d);_0x2a0a2d=_0xc090dc/_0x297e7d*(0x1-utils[_0x9453('0x20d')](_0xc090dc,_0x297e7d));}return _0x42fd22({'erlangCalls':_0x347dad,'erlangCallToSecond':_0x2fc8d1/_0x347dad,'erlangAbandonmentRate':_0x48e410,'erlangBusyFactor':_0x2a0a2d});});};module[_0x9453('0x212')]=Dialer;
\ No newline at end of file
+var _0xff43=['countdropretry','countglobal','dialDropRetryFrequency','verifyAdditionalPhones','additional','dialDropMaxRetry','queueCallerAbandonCreateState','add','minutes','ListId','VoiceQueueId','CampaignId','[rescheduleContact][Drop]','calleridname','calleridnum','swapAdditionalPhones','outboundDropCallsDayCallersExit','Abandoned','CALLEREXIT','countabandonedretry','dialAbandonedRetryFrequency','dialAbandonedMaxRetry','ContactId','[rescheduleContact][Abandoned]','[syncAgentComplete][createHistory][11]','actions','channel','actionid','strategy','rrmemory','roundrobin','paused','stateinterface','locked','queueBooked','pick','idHopper','syncQueueStatusComplete','run','[Catch][Preview][syncQueueStatusComplete]','rescheduleContact','[unlock][syncQueueStatusComplete]','_rr','unlockRR','[booked][RR]','Agent:\x20','contactAgent-idHopper:\x20','isNil','[booked][RR][finaly]','[booked][unlock]','[booked][unlock2]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','syncOriginateResponse','getQueue','Success','callProgressDetecting','[callProgressDetecting]\x20','variable','amdstatus','exten','xcally-motion-dialer','dialAMDActive','HANGUP','HangupInAMD','membername','custom:amd','buildObj','amd','saveInDb','[syncHangupInAMD][createHistory]','[syncHangupInAMD]','value','MACHINE','outboundAnswerAgiCallsDay','Machine','AMD','countmachineretry','[syncAgentComplete][createHistory][0]','countbusyretry','countcongestionretry','countnoanswerretry','countagentrejectretry','dialGlobalMaxRetry','stateGlobal','reason19\x20machine....','dialMachineMaxRetry','createStateFinal','reason\x2019\x20machine....','dialMachineRetryFrequency','[rescheduleContact][Machine]','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','countnosuchnumberretry','ivrAnswerCallsDay','[syncHangupIvr][createHistory]','[syncHangupIvr]','dialQueueProject','AGI','Normal\x20Clearing','[syncAgentComplete][createHistory]','[syncAgentComplete]','outboundUnknownCallsDay','cause-txt','running','isPreviewCampaign','statusMessage','getQueueCampaignStatusMessage','inUse','talking','pTalking','[syncQueueSummary]','queueSummaryCountersUpdated','assign','throttle','filter','dialPreviewRecallmeReminder','online','handlePreviewRecallNotifications','map','Agent','user:dialPreviewRecallReminder','loopClearZombieChannels','clearZombieChannels','[uniqueid]','[actions]','sequence','No\x20such\x20channel','[Dialer][checkChannel]','[Dialer][checkChannel][ivr]','getVoiceQueueRtPauses','[getVoiceQueueRtPauses]\x20','originated','[updateOriginated]\x20object\x20originated\x20is\x20negative','loggerHandler','emptyContact','notFound','[emptyContact][createHistory]','[emptyContact]','checkPreviewRecallReminder','handleIvr','phone','originate','contact\x20is\x20undefine','\x22agi://%s/square,%s\x22','NONE','dialQueueOptions','getCaller','ACTIVE','XMD-AMDINITIALSILENCE','dialAMDInitialSilence','XMD-AMDGREETING','XMD-AMDAFTERGREETINGSILENCE','dialAMDAfterGreetingSilence','XMD-AMDTOTALANALYSISTIME','dialAMDTotalAnalysisTime','XMD-AMDMINWORDLENGTH','XMD-AMDBETWEENWORDSSILENCE','dialAMDBetweenWordsSilence','XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','isOutboundQueue','XMD-VOICEQUEUEID','XMD-CAMPAIGNID','Contact','Trunk','getCallerId','callerid','dialOriginateCallerIdNumber','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','XMD-ORIGINATECALLERIDNAME','originatecalleridname','XMD-ORIGINATECALLERIDNUM','variables','SIP/%s/%s%s','dialPrefix','dialCutDigit','substring','trim','from-sip','dialOriginateTimeout','outboundOriginateFailureCallsDay','[originateError]:\x20%s','OriginateError','[originate][error]','originate\x20action\x20Error','checkRetriveMax','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','[rescheduleContact]\x20[Busy]','dialCongestionMaxRetry','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','[rescheduleContact][NoSuchNumber]','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','object','[callProgressDetecting]','entity\x20is\x20undefine','evt\x20is\x20undefine','outboundNoSuchCallsDay','NoSuchNumber','nosuchnumber','dialNoSuchNumberRetryFrequency','dialNoSuchNumberMaxRetry','reason\x200\x20no\x20such\x20number....','NoAnswer','buildNoAnswerEventPayload','custom:agentnoanswer','callAdditionalPhoneAfterMin','[syncAgentComplete][createHistory][3]','reason\x203\x20ringing\x20no\x20answer','outboundBusyCallsDay','Busy','busy','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','outboundCongestionCallsDay','Congestion','custom:agentcongestion','congestion','reason\x208\x20congestion','outboundAbandonedCallsDay','reason\x2011\x20abandoned','outboundRejectCallsDay','AgentReject','custom:agentreject','agentreject','[syncAgentComplete][createHistory][20]','[syncAgentComplete][createHistory][?]','Global','[moveContactManagedDialer][0]','dialPredictiveOptimizationPercentage','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','round','predictiveIntervalMinThreshold','floor','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','check\x20handlePredictive\x20is\x20not\x20undefine','dialPredictiveInterval','[startMethodPredictive][StartProgressive][Loop]','dialPredictiveOptimization','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Drop\x20in\x20this\x20interval','started\x20in\x20predictive\x20at','avgHandleTime','getDataPredictive','startMethodPredictive','Predictive\x20after\x20first\x20interval','Predictive\x20for\x20every\x20interval','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20less\x20than\x20threshold\x20(',')\x20are\x20more\x20than\x20threshold\x20(','available','abandonmentRate','[getDataPredictive]','check\x20failure','getDataPredictiveOld','outboundQueuePauses','predictiveIntervalPauses','[CatchErlangB]','agentBusyFactor','loggedIn','busyFactor','erlangCallToSecond','one\x20call\x20every:','fail\x20to\x20scheduled\x20calls','checkContactBlack','recallme','dialMethod','[booked][checkContactBlack]','queueStatusComplete:\x20','queuestatus','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','Queue:\x20','actionOriginate','scheduledat','dialRecallMeTimeout','voicePause','outboundReCallsDay','dialRecallInQueue','[rescheduleContact][dialRecallInQueue]','QUEUE_RECALL','[Originate][HistoryDialRecallInQueue][historyCatch]','RECALL_TIMEOUT','RecallFailedTimeout','[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]','outboundBlacklistCallsDay','BLACKLIST','Blacklist','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','limitCalls','getContactDialerIvr','[getContactCampaign2][Empty]','RUNNING','[actionOriginate]\x20','checkIsBlackListIvr','[actionOriginateIvr]\x20','dialLimitQueue','not_inuse','checkContactEmpty','countReScheduled','[getContactDialer2]','tryOriginatePredictive','[handlePredictive][limitChannel]','getContactDialer','dialOrderByScheduledAt','[countReScheduled]\x20','checkIsBlackList','[actionOriginatePredictive]\x20','[getContactDialerPredictive]','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[abandonmentRate]','m\x20=\x20','Ts\x20=\x20','p\x20=\x20','interval\x20=\x20','Amax\x20=\x20','erlangb','[busyFactor]','Umin\x20=\x20','exports','util','lodash','uuid','moment','ioredis','./utils/hopper','../../../config/environment/','../../../config/logger','dialer','booked','predictive','predictiveCalls','syncQueueSummary','../ami','redis','socket.io-emitter','../rpc/cmHopper','../rpc/setting','../rpc/interval','./models/action','./models/history','./models/final','./models/agentComplete','./models/queueCallerAbandon','./models/hangup','env','XCALLY_IP_AGI','127.0.0.1','enqueue','tail','finally','preview','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','channels','uniqueId','optionPredictive','startPredictive','startProgressive','ivrOriginated','queueBookedRR','queuesSummary','syncAgentConnect','bind','queuecallerabandon','syncQueueCallerAbandon','originateresponse','agentcomplete','syncAgentComplete','custom:queuesummary','custom:queuesummarycomplete','hangup','syncHangup','syncNewExten','varset','syncVarSet','syncQueueMember','queuestatuscomplete','loopCampaigns','getSettings','then','previewRecallmeReminderInterval','emit','type','debug','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','inspect','voice:queue:%s','name','voice_queue:save','isEmpty','info','-----\x20Stats\x20Predictive\x20---','Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalTotalCalls','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAnsweredCalls','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','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','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','isUndefined','predictiveIntervalAvgHoldtime','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','---------\x20ErlangB\x20---------','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCalls','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangAbandonmentRate','erlangBusyFactor','merge','getSeconds','startProgressive\x20value\x20cleared','startPredictive\x20value\x20cleared','handlePredictive','error','stack','checkContactLowerLimitOriginate','temp','contactsRescheduled','message','CAMPAIGN_STATUS','CONTACTS_RESCHEDULED','[getContactDialer2][ReScheduled]','contacts','NO_AVAILABLE_CONTACTS','[getContactDialer2][Empty]','state','endtime','starttime','queueStatusComplete','[booked][unlockQueueStatus]','stringify','NULL_INTERVAL','\x20INTERVAL_IS_NULL','Interval','INACTIVE','\x20NOT\x20Active','isIVRCampaign','format','campaign:ivr:%s','campaign:save','sendMessageOneNotActive','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','is\x20not\x20active','DISACTIVED','is\x20disactive','[ifTime][Action]','prototype','active','SIP/%s','reachable','status','checkIsTrunkReachable','isTrunkReachable','TrunkBackup','\x20trunk\x20is\x20not\x20reachable','checkIfTime','ifTimeIvr','checkIfTimeIntervals','Intervals','ifTime','Failure','\x20Intervals\x20is\x20empty\x20','timezones','\x20Timezone\x20unknow\x20','isArray','length','Action','iftime\x20%s,%s','content','catch','push','indexOf','true','some','OVERTIME_INTERVAL','Global:\x20','\x20Interval\x20is\x20overtime:\x20','Timezone:\x20','resetActiveCalls','syncCampaigns','undefined','isIVRCampaignActive','resolve','dialGlobalInterval','dialTimezone','launchHandleIvr','[syncCampaigns]','checkDialMethod','progressive','handlePower','dialPowerLevel','Queue','method\x20not\x20recognized','silly','Dialer::ifTime()','Voice\x20Queue\x20%s\x20$s','intervalIftime','[ifTime][promiseAll]','Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:','isGlobal','AMI\x20IfTime','Error','uniqueid','ivr','queue','answertime','outboundAnswerCallsDay','reason','agent','agiafterat','dialQueueProject2','dialAgiAfterHangupAgent','YYYY-MM-DD\x20HH:mm:ss','createHistory','moveContactManagedDialer','updateOriginated','droptime','responsetime','dialQueueTimeout','predictiveIntervalDroppedCallsTimeout','outboundDropCallsDayTimeout','predictiveIntervalErlangCallsDroppedCalls','statedesc','Drop'];(function(_0x35839c,_0x28526b){var _0x52d65d=function(_0xc0966e){while(--_0xc0966e){_0x35839c['push'](_0x35839c['shift']());}};_0x52d65d(++_0x28526b);}(_0xff43,0x154));var _0x3ff4=function(_0xec299e,_0x2c9744){_0xec299e=_0xec299e-0x0;var _0x2e4be6=_0xff43[_0xec299e];return _0x2e4be6;};'use strict';var util=require(_0x3ff4('0x0'));var _=require(_0x3ff4('0x1'));var uuid=require(_0x3ff4('0x2'));var moment=require(_0x3ff4('0x3'));var rr=require('rr');var Redis=require(_0x3ff4('0x4'));var utils=require('./utils');var hopperUtils=require(_0x3ff4('0x5'));var ut=require('../preview/util/util');var config=require(_0x3ff4('0x6'));var logger=require(_0x3ff4('0x7'))(_0x3ff4('0x8'));var loggerBooked=require(_0x3ff4('0x7'))(_0x3ff4('0x9'));var loggerPredictive=require('../../../config/logger')(_0x3ff4('0xa'));var loggerPredictiveCalls=require('../../../config/logger')(_0x3ff4('0xb'));var loggerSyncQueueSummary=require(_0x3ff4('0x7'))(_0x3ff4('0xc'));var ami=require(_0x3ff4('0xd'));config[_0x3ff4('0xe')]=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var io=require(_0x3ff4('0xf'))(new Redis(config['redis']));var cmHopper=require(_0x3ff4('0x10'));var voiceQueueRt=require('../rpc/voiceQueueRt');var RpcSetting=require(_0x3ff4('0x11'));var Interval=require(_0x3ff4('0x12'));var Action=require(_0x3ff4('0x13'));var History=require(_0x3ff4('0x14'));var Final=require(_0x3ff4('0x15'));var AgentComplete=require(_0x3ff4('0x16'));var QueueCallerAbandon=require(_0x3ff4('0x17'));var Hangup=require(_0x3ff4('0x18'));var ipAgi=process[_0x3ff4('0x19')][_0x3ff4('0x1a')]||_0x3ff4('0x1b');var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence['prototype'][_0x3ff4('0x1c')]=function(_0x1c65ab){this[_0x3ff4('0x1d')]=this[_0x3ff4('0x1d')]?this['tail'][_0x3ff4('0x1e')](_0x1c65ab):_0x1c65ab();};function Dialer(_0x3d46dd,_0x2798e0){this['sequence']=new Sequence();this[_0x3ff4('0x1f')]=_0x2798e0;this['voiceQueues']=_0x3d46dd[_0x3ff4('0x20')];this[_0x3ff4('0x21')]=_0x3d46dd[_0x3ff4('0x21')];this[_0x3ff4('0x22')]=_0x3d46dd[_0x3ff4('0x22')];this[_0x3ff4('0x23')]=_0x3d46dd[_0x3ff4('0x23')];this['maxNumberOriginate']=config[_0x3ff4('0x24')]||0x2;this[_0x3ff4('0x25')]={};this['actions']={};this['contactsId']={};this[_0x3ff4('0x26')]={};this[_0x3ff4('0x27')]={};this[_0x3ff4('0x28')]={};this[_0x3ff4('0x29')]={};this[_0x3ff4('0x2a')]={};this['queueBooked']={};this[_0x3ff4('0x2b')]={};this[_0x3ff4('0x2c')]={};ami['on']('agentconnect',this[_0x3ff4('0x2d')][_0x3ff4('0x2e')](this));ami['on'](_0x3ff4('0x2f'),this[_0x3ff4('0x30')][_0x3ff4('0x2e')](this));ami['on'](_0x3ff4('0x31'),this['syncOriginateResponse'][_0x3ff4('0x2e')](this));ami['on'](_0x3ff4('0x32'),this[_0x3ff4('0x33')][_0x3ff4('0x2e')](this));ami['on'](_0x3ff4('0x34'),this[_0x3ff4('0xc')][_0x3ff4('0x2e')](this));ami['on'](_0x3ff4('0x35'),this['syncQueueSummaryComplete'][_0x3ff4('0x2e')](this));ami['on'](_0x3ff4('0x36'),this[_0x3ff4('0x37')][_0x3ff4('0x2e')](this));ami['on']('newexten',this[_0x3ff4('0x38')]['bind'](this));ami['on'](_0x3ff4('0x39'),this[_0x3ff4('0x3a')][_0x3ff4('0x2e')](this));ami['on']('queuemember',this[_0x3ff4('0x3b')][_0x3ff4('0x2e')](this));ami['on'](_0x3ff4('0x3c'),this['syncQueueStatusComplete'][_0x3ff4('0x2e')](this));this[_0x3ff4('0x3d')]();this['loopClearZombieChannels']();RpcSetting[_0x3ff4('0x3e')]()[_0x3ff4('0x3f')](function(_0x5bc09c){previewRecallmeReminderInterval=_0x5bc09c[_0x3ff4('0x40')];});}function isNotNull(_0x5882c0){return _0x5882c0!==null&&!_['isUndefined'](_0x5882c0);}function msgResponse(_0x32d67a,_0x465745,_0x1d3778){return{'action':_0x32d67a,'response':_0x465745,'message':_0x1d3778,'stack':_0x1d3778};}function emit(_0x18077a,_0x23ae10,_0x1c83cc){io['to'](_0x18077a)[_0x3ff4('0x41')](_0x23ae10,_0x1c83cc);}function emitOutboundVoiceQueueSummary(_0x294ab8){if(_0x294ab8[_0x3ff4('0x42')]==='outbound'){logger[_0x3ff4('0x43')](_0x3ff4('0x44'),util[_0x3ff4('0x45')](_0x294ab8,{'showHidden':![],'depth':null}));emit(util['format'](_0x3ff4('0x46'),_0x294ab8[_0x3ff4('0x47')]),_0x3ff4('0x48'),_0x294ab8);}}function checkGetDataPredictive(_0x316bb1){if(isNotNull(_0x316bb1)&&!_[_0x3ff4('0x49')](_0x316bb1)){loggerPredictive[_0x3ff4('0x4a')](_0x3ff4('0x4b'));loggerPredictive[_0x3ff4('0x4a')](_0x3ff4('0x4c'),_0x316bb1[_0x3ff4('0x4d')]);loggerPredictive[_0x3ff4('0x4a')](_0x3ff4('0x4e'),_0x316bb1[_0x3ff4('0x4f')]);loggerPredictive[_0x3ff4('0x4a')](_0x3ff4('0x50'),_0x316bb1['predictiveIntervalDroppedCallsTimeout']);loggerPredictive[_0x3ff4('0x4a')](_0x3ff4('0x51'),_0x316bb1[_0x3ff4('0x52')]);loggerPredictive[_0x3ff4('0x4a')](_0x3ff4('0x53'),_0x316bb1['predictiveIntervalAvgHoldtime']);loggerPredictive[_0x3ff4('0x4a')](_0x3ff4('0x54'),_0x316bb1[_0x3ff4('0x55')]);loggerPredictive['info'](_0x3ff4('0x56'));if(_0x316bb1['predictiveIntervalTotalCalls']>0x0){if(!_['isUndefined'](_0x316bb1[_0x3ff4('0x55')])&&_0x316bb1[_0x3ff4('0x55')]>0x0){return!![];}loggerPredictive['info'](_0x3ff4('0x57'));if(!_[_0x3ff4('0x58')](_0x316bb1[_0x3ff4('0x59')])&&_0x316bb1[_0x3ff4('0x59')]>0x0){return!![];}loggerPredictive['info'](_0x3ff4('0x5a'));}else{loggerPredictive[_0x3ff4('0x4a')](_0x3ff4('0x5b'));}}else{loggerPredictive[_0x3ff4('0x4a')]('History\x20information\x20are\x20empty');}return![];}function mergeDataErlangB(_0x52ef43){return function(_0xe6d606){loggerPredictive[_0x3ff4('0x4a')](_0x3ff4('0x5c'));loggerPredictive[_0x3ff4('0x4a')](_0x3ff4('0x5d'),_0xe6d606[_0x3ff4('0x5e')]);loggerPredictive['info'](_0x3ff4('0x5f'),_0xe6d606['erlangCallToSecond']);loggerPredictive[_0x3ff4('0x4a')](_0x3ff4('0x60'),_0xe6d606[_0x3ff4('0x61')]);loggerPredictive['info']('Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0xe6d606[_0x3ff4('0x62')]);loggerPredictive[_0x3ff4('0x4a')](_0x3ff4('0x60'),_0xe6d606[_0x3ff4('0x61')]);loggerPredictive[_0x3ff4('0x4a')]('---------------------------');_[_0x3ff4('0x63')](_0x52ef43,_0xe6d606);};}function ifInterval(_0x366aab,_0x1819da){if(_[_0x3ff4('0x58')](_0x1819da)){return![];}return utils[_0x3ff4('0x64')](undefined,_0x1819da)<_0x366aab*0x3c;}function clearPredictiveAttributes(_0x287634){if(_0x287634['startProgressive']){_0x287634[_0x3ff4('0x29')]=undefined;loggerPredictive[_0x3ff4('0x43')](_0x287634[_0x3ff4('0x47')],_0x3ff4('0x65'));}if(_0x287634[_0x3ff4('0x28')]){_0x287634[_0x3ff4('0x28')]=undefined;loggerPredictive['debug'](_0x287634[_0x3ff4('0x47')],_0x3ff4('0x66'));}if(_0x287634[_0x3ff4('0x67')]){clearInterval(_0x287634[_0x3ff4('0x67')]);_0x287634[_0x3ff4('0x67')]=undefined;loggerPredictive[_0x3ff4('0x43')](_0x287634[_0x3ff4('0x47')],'handlePredictive\x20interval\x20cleared');}}function loggerCatchPredictive(_0x2315b0,_0x8eedfe){return function(_0x2228df){loggerPredictive[_0x3ff4('0x68')](_0x8eedfe[_0x3ff4('0x47')],_0x2315b0);loggerPredictive[_0x3ff4('0x68')](_0x2228df[_0x3ff4('0x69')]);clearPredictiveAttributes(_0x8eedfe);};}function loggerCatch(_0x89440b){return function(_0x3bb766){logger['error'](_0x89440b,util[_0x3ff4('0x45')](_0x3bb766,{'showHidden':![],'depth':null}));};}function loggerGetContactDialer(_0x25a6af,_0x488c87,_0xe3b106){return function(_0x4d1830){utils[_0x3ff4('0x6a')](_0x488c87,_0xe3b106,0x0);_0x488c87[_0x3ff4('0x6b')]=0x0;logger['error'](_0x25a6af,util[_0x3ff4('0x45')](_0x4d1830,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x1f7362){return function(_0x4f0eb9){if(isNotNull(_0x4f0eb9)&&isNotNull(_0x4f0eb9[0x0])){if(_0x4f0eb9[0x0][_0x3ff4('0x6c')]>0x0){_0x1f7362[_0x3ff4('0x6d')]=utils[_0x3ff4('0x6e')][_0x3ff4('0x6f')];logger['info'](_0x3ff4('0x70')+_0x1f7362['name'],_0x4f0eb9[0x0][_0x3ff4('0x6c')],_0x3ff4('0x71'));}else{_0x1f7362[_0x3ff4('0x6d')]=utils[_0x3ff4('0x6e')][_0x3ff4('0x72')];logger[_0x3ff4('0x4a')](_0x3ff4('0x73')+_0x1f7362['name']);}}};}function createObjHistory(_0x4390e0,_0x2c48ce,_0x407d7e,_0x2672b3,_0x53b8e9){_0x4390e0[_0x3ff4('0x6d')]=_0x407d7e;var _0x1a629e=new Action(_0x4390e0,_0x2c48ce);var _0x58019a=new History(_0x1a629e);_0x58019a[_0x3ff4('0x74')]=_0x2672b3;_0x58019a['statedesc']=_0x53b8e9;_0x58019a[_0x3ff4('0x75')]=_0x1a629e[_0x3ff4('0x76')];return _0x58019a;}function unlockQueueStatus(_0x33b8b6,_0x47bcfa){setTimeout(function(){if(_['isUndefined'](_0x33b8b6['queueStatusComplete'])){loggerBooked[_0x3ff4('0x68')]('[unlockQueueStatus][undefined]',_0x47bcfa);}_0x33b8b6[_0x3ff4('0x77')]=!![];loggerBooked[_0x3ff4('0x4a')](_0x3ff4('0x78'),_0x47bcfa,JSON[_0x3ff4('0x79')](_['pick'](_0x33b8b6,['name',_0x3ff4('0x77')])));},0x1f3);}function checkInterval(_0x2d3c30){return function(){if(!isNotNull(_0x2d3c30['Interval'])){_0x2d3c30[_0x3ff4('0x6d')]=utils['CAMPAIGN_STATUS'][_0x3ff4('0x7a')];throw _0x2d3c30['name']+'\x20INTERVAL_IS_NULL';}if(!isNotNull(_0x2d3c30['Interval']['Intervals'])){_0x2d3c30[_0x3ff4('0x6d')]=utils[_0x3ff4('0x6e')]['NULL_INTERVAL'];throw _0x2d3c30[_0x3ff4('0x47')]+_0x3ff4('0x7b');}if(!isNotNull(_[_0x3ff4('0x49')](_0x2d3c30[_0x3ff4('0x7c')]['Intervals']))){_0x2d3c30[_0x3ff4('0x6d')]=utils[_0x3ff4('0x6e')]['NULL_INTERVAL'];throw _0x2d3c30[_0x3ff4('0x47')]+_0x3ff4('0x7b');}};}function checkIsIVRCampaignActive(_0x328782){return function(){if(!utils['isIVRCampaignActive'](_0x328782)){_0x328782[_0x3ff4('0x6d')]=utils[_0x3ff4('0x6e')][_0x3ff4('0x7d')];throw _0x328782['name']+_0x3ff4('0x7e');}};}function emitCampaignSummary(_0x2b7919){if(utils[_0x3ff4('0x7f')](_0x2b7919)){emit(util[_0x3ff4('0x80')](_0x3ff4('0x81'),_0x2b7919[_0x3ff4('0x47')]),_0x3ff4('0x82'),_0x2b7919);}}function loggerCatchQueueSummary(_0x633855,_0x417f2c){return function(_0x5d07cd){clearPredictiveAttributes(_0x417f2c);emitCampaignSummary(_0x417f2c);loggerSyncQueueSummary[_0x3ff4('0x43')](_0x633855,util[_0x3ff4('0x45')](_0x5d07cd,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x4d23a3){if(_0x4d23a3[_0x3ff4('0x83')]){if(_0x4d23a3['originated']===0x0){_0x4d23a3['sendMessageOneNotActive']=![];_0x4d23a3[_0x3ff4('0x6d')]=utils['CAMPAIGN_STATUS'][_0x3ff4('0x7d')];loggerSyncQueueSummary[_0x3ff4('0x43')](_0x3ff4('0x84'),_0x4d23a3[_0x3ff4('0x47')],_0x3ff4('0x85'));}else{_0x4d23a3[_0x3ff4('0x6d')]=utils['CAMPAIGN_STATUS'][_0x3ff4('0x86')];loggerSyncQueueSummary['debug']('[syncQueueSummary]\x20Campaign\x20Ivr:\x20',_0x4d23a3[_0x3ff4('0x47')],_0x3ff4('0x87'));}emitCampaignSummary(_0x4d23a3);}}function myreject(_0x55db95){return function(_0x5e5c04){return _0x55db95(msgResponse(_0x3ff4('0x88'),'Error',JSON[_0x3ff4('0x79')](_0x5e5c04)));};}Dialer[_0x3ff4('0x89')]['isTrunkReachable']=function(_0x199dbd){return!_[_0x3ff4('0x58')](_0x199dbd)&&_0x199dbd&&!_[_0x3ff4('0x58')](_0x199dbd['name'])&&!_['isUndefined'](_0x199dbd[_0x3ff4('0x8a')])&&_0x199dbd[_0x3ff4('0x8a')]&&(this[_0x3ff4('0x23')][util[_0x3ff4('0x80')](_0x3ff4('0x8b'),_0x199dbd[_0x3ff4('0x47')])]['status']===_0x3ff4('0x8c')||this[_0x3ff4('0x23')][util[_0x3ff4('0x80')](_0x3ff4('0x8b'),_0x199dbd[_0x3ff4('0x47')])][_0x3ff4('0x8d')]==='unmonitored');};Dialer['prototype'][_0x3ff4('0x8e')]=function(_0xfe693f){var _0x2e6d02=this;return function(){if(!_0x2e6d02[_0x3ff4('0x8f')](_0xfe693f['Trunk'])){if(!_0x2e6d02[_0x3ff4('0x8f')](_0xfe693f[_0x3ff4('0x90')])){_0xfe693f[_0x3ff4('0x6d')]=utils[_0x3ff4('0x6e')]['TRUNK_NOT_REACHABLE'];throw _0xfe693f['name']+_0x3ff4('0x91');}}};};Dialer['prototype'][_0x3ff4('0x92')]=function(_0x103520,_0x4845ce,_0x3ddef9,_0x2d8a16){var _0x23fe94=this;return function(){var _0x1eed29=!![];return _0x23fe94[_0x3ff4('0x93')](_0x103520,_0x4845ce,_0x3ddef9,_0x2d8a16,_0x1eed29);};};Dialer[_0x3ff4('0x89')][_0x3ff4('0x94')]=function(_0x4e2e5b,_0x2c4c6d,_0x1d0aad,_0x9da7a0){var _0x295138=this;return function(){var _0xe9ec20=![];return _0x295138['ifTimeIvr'](_0x4e2e5b[_0x3ff4('0x95')],_0x2c4c6d,_0x1d0aad,_0x9da7a0,_0xe9ec20);};};Dialer[_0x3ff4('0x89')][_0x3ff4('0x93')]=function(_0x281e09,_0x30e1b7,_0x1a39b6,_0x32b006,_0x48b77a){var _0x58595f=[];return new Promise(function(_0x3ef813,_0x108727){if(!isNotNull(_0x281e09)){_0x32b006[_0x3ff4('0x6d')]=utils[_0x3ff4('0x6e')][_0x3ff4('0x7a')];return _0x108727(msgResponse(_0x3ff4('0x96'),_0x3ff4('0x97'),_0x1a39b6+'\x20Intervals\x20is\x20null\x20'));}if(_[_0x3ff4('0x49')](_0x281e09)){_0x32b006[_0x3ff4('0x6d')]=utils[_0x3ff4('0x6e')]['EMPTY_INTERVAL'];return _0x108727(msgResponse(_0x3ff4('0x96'),_0x3ff4('0x97'),_0x1a39b6+_0x3ff4('0x98')));}if(_0x30e1b7&&_[_0x3ff4('0x58')](config[_0x3ff4('0x99')][_0x30e1b7])){_0x32b006[_0x3ff4('0x6d')]=utils['CAMPAIGN_STATUS']['UNKNOWN_TIMEZONE'];return _0x108727(msgResponse(_0x3ff4('0x96'),'Failure',_0x1a39b6+_0x3ff4('0x9a')+_0x30e1b7));}if(_[_0x3ff4('0x9b')](_0x281e09)){for(var _0x53fdfe=0x0;_0x53fdfe<_0x281e09[_0x3ff4('0x9c')];_0x53fdfe+=0x1){_0x58595f['push'](ami[_0x3ff4('0x9d')]({'action':'command','command':util[_0x3ff4('0x80')](_0x3ff4('0x9e'),_0x281e09[_0x53fdfe]['interval'],!_[_0x3ff4('0x58')](config[_0x3ff4('0x99')][_0x30e1b7])?_0x30e1b7:'')})[_0x3ff4('0x3f')](function(_0x405b8d){return _0x405b8d[_0x3ff4('0x9f')]['indexOf']('true')>=0x0;})[_0x3ff4('0xa0')](myreject(_0x108727)));}}else{_0x58595f[_0x3ff4('0xa1')](ami['Action']({'action':'command','command':util['format'](_0x3ff4('0x9e'),_0x281e09,!_['isUndefined'](config['timezones'][_0x30e1b7])?_0x30e1b7:'')})[_0x3ff4('0x3f')](function(_0x1d91bf){return _0x1d91bf[_0x3ff4('0x9f')][_0x3ff4('0xa2')](_0x3ff4('0xa3'))>=0x0;})[_0x3ff4('0xa0')](myreject(_0x108727)));}Promise['all'](_0x58595f)[_0x3ff4('0x3f')](function(_0x4bae20){var _0x3ae4d1=_[_0x3ff4('0xa4')](_0x4bae20);if(_0x3ae4d1){return _0x3ef813(_0x3ae4d1);}else{_0x32b006[_0x3ff4('0x6d')]=_0x48b77a?utils[_0x3ff4('0x6e')]['OVERTIME_GLOBAL_INTERVAL']:utils[_0x3ff4('0x6e')][_0x3ff4('0xa5')];return _0x108727(msgResponse('[ifTime][promiseAll]',_0x3ff4('0x97'),_0x3ff4('0xa6')+_0x48b77a+'\x20'+_0x1a39b6+_0x3ff4('0xa7')+util[_0x3ff4('0x45')](_0x281e09,{'showHidden':![],'depth':null})+_0x3ff4('0xa8')+_0x30e1b7));}})['catch'](function(_0x15010f){return _0x108727(msgResponse(_0x3ff4('0x96'),_0x3ff4('0x97'),JSON['stringify'](_0x15010f)));});});};Dialer[_0x3ff4('0x89')]['loopCampaigns']=function(){var _0x423662=this;return cmHopper[_0x3ff4('0xa9')]({'active':![]},{'where':{'active':!![]}})[_0x3ff4('0x3f')](function(){setInterval(function(){_0x423662['syncCampaigns']();},0x3e8);});};Dialer[_0x3ff4('0x89')][_0x3ff4('0xaa')]=function(){var _0x37f4d9=this;var _0x5c17ce;for(var _0x1a8bcc in this[_0x3ff4('0x21')]){if(typeof this['campaigns'][_0x1a8bcc]!==_0x3ff4('0xab')){_0x5c17ce=this['campaigns'][_0x1a8bcc];if(utils[_0x3ff4('0x7f')](_0x5c17ce)&&utils[_0x3ff4('0xac')](_0x5c17ce)){_0x5c17ce['sendMessageOneNotActive']=!![];Promise[_0x3ff4('0xad')]()['then'](checkIsIVRCampaignActive(_0x5c17ce))['then'](checkInterval(_0x5c17ce))[_0x3ff4('0x3f')](_0x37f4d9['checkIsTrunkReachable'](_0x5c17ce))[_0x3ff4('0x3f')](_0x37f4d9[_0x3ff4('0x92')](_0x5c17ce[_0x3ff4('0xae')],_0x5c17ce[_0x3ff4('0xaf')],_0x5c17ce[_0x3ff4('0x47')],_0x5c17ce))[_0x3ff4('0x3f')](_0x37f4d9['checkIfTimeIntervals'](_0x5c17ce[_0x3ff4('0x7c')],_0x5c17ce[_0x3ff4('0xaf')],_0x5c17ce[_0x3ff4('0x47')],_0x5c17ce))[_0x3ff4('0x3f')](_0x37f4d9[_0x3ff4('0xb0')](_0x5c17ce))[_0x3ff4('0xa0')](loggerCatchQueueSummary(_0x3ff4('0xb1'),_0x5c17ce));}else{notSendMessagesCampaign(_0x5c17ce);}}}};Dialer[_0x3ff4('0x89')][_0x3ff4('0xb2')]=function(_0x31bf08){if(_0x31bf08['dialMethod']!==_0x3ff4('0xa')){clearPredictiveAttributes(_0x31bf08);}switch(_0x31bf08['dialMethod']){case _0x3ff4('0xb3'):this['handlePower'](_0x31bf08,0x1);break;case'power':this[_0x3ff4('0xb4')](_0x31bf08,_0x31bf08[_0x3ff4('0xb5')]);break;case _0x3ff4('0xa'):this[_0x3ff4('0xa')](_0x31bf08);break;case _0x3ff4('0x9'):this[_0x3ff4('0xb4')](_0x31bf08,0x1);break;default:logger[_0x3ff4('0x68')](_0x3ff4('0xb6'),_0x31bf08['name'],_0x3ff4('0xb7'));}};Dialer['prototype']['ifTime']=function(_0x307430,_0x21a894){var _0x540a85=_0x307430['dialTimezone'];var _0x3914ce=_0x21a894?_0x307430['dialGlobalInterval']:_0x307430[_0x3ff4('0x7c')]['Intervals'];logger[_0x3ff4('0xb8')](_0x3ff4('0xb9'),_0x3914ce,_0x540a85,_0x307430[_0x3ff4('0x47')],util[_0x3ff4('0x80')](_0x3ff4('0xba'),_0x307430[_0x3ff4('0x47')],_0x307430['id']));var _0x28efdd=null;return Interval[_0x3ff4('0xbb')](_0x3914ce,_0x540a85)[_0x3ff4('0x3f')](function(_0x2f4200){if(_0x2f4200===!![]){return _0x2f4200;}else{_0x307430[_0x3ff4('0x6d')]=_0x21a894?utils[_0x3ff4('0x6e')]['OVERTIME_GLOBAL_INTERVAL']:utils[_0x3ff4('0x6e')][_0x3ff4('0xa5')];_0x28efdd=msgResponse(_0x3ff4('0xbc'),'Failure',_0x3ff4('0xa6')+_0x21a894+'\x20'+_0x307430[_0x3ff4('0x47')]+'\x20Interval\x20is\x20overtime:\x20'+util[_0x3ff4('0x45')](_0x3914ce,{'showHidden':![],'depth':null})+'Timezone:\x20'+_0x540a85);}if(_0x28efdd!==null){logger[_0x3ff4('0xb8')](_0x3ff4('0xbd'),_0x28efdd);_0x28efdd[_0x3ff4('0xbe')]=_0x21a894;throw _0x28efdd;}})[_0x3ff4('0xa0')](function(_0x2f2688){logger[_0x3ff4('0x68')](_0x3ff4('0xbf'),_0x2f2688);throw msgResponse(_0x3ff4('0x88'),_0x3ff4('0xc0'),util[_0x3ff4('0x45')](_0x2f2688,{'showHidden':![],'depth':null}));});};Dialer[_0x3ff4('0x89')][_0x3ff4('0x2d')]=function(_0x25addb){if(this['voiceQueues'][_0x25addb['queue']]){if(this[_0x3ff4('0x26')][_0x25addb[_0x3ff4('0xc1')]]&&this[_0x3ff4('0x26')][_0x25addb['uniqueid']][_0x3ff4('0x42')]!==_0x3ff4('0xc2')){this['updateOriginated'](this['voiceQueues'][_0x25addb[_0x3ff4('0xc3')]]);this[_0x3ff4('0x26')][_0x25addb[_0x3ff4('0xc1')]][_0x3ff4('0xc4')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}}};Dialer['prototype']['syncAgentComplete']=function(_0x2b92e3){var _0x379985=this['uniqueId'][_0x2b92e3[_0x3ff4('0xc1')]];if(this[_0x3ff4('0x20')][_0x2b92e3[_0x3ff4('0xc3')]]){if(_0x379985&&_0x379985[_0x3ff4('0x42')]!==_0x3ff4('0xc2')){delete this['uniqueId'][_0x2b92e3['uniqueid']];this[_0x3ff4('0x20')][_0x2b92e3[_0x3ff4('0xc3')]][_0x3ff4('0xc5')]+=0x1;var _0x42589b=new AgentComplete(_0x379985,_0x2b92e3);if(_0x2b92e3[_0x3ff4('0xc6')]===_0x3ff4('0xc7')){_0x42589b[_0x3ff4('0xc8')]=this[_0x3ff4('0x20')][_0x2b92e3[_0x3ff4('0xc3')]][_0x3ff4('0xc9')]&&this[_0x3ff4('0x20')][_0x2b92e3[_0x3ff4('0xc3')]][_0x3ff4('0xca')]?moment()['format'](_0x3ff4('0xcb')):undefined;}hopperUtils[_0x3ff4('0xcc')](_0x42589b)['catch'](loggerCatch('[syncAgentComplete][createHistory]'));hopperUtils[_0x3ff4('0xcd')](_0x42589b)[_0x3ff4('0xa0')](loggerCatch('[syncAgentComplete]'));}}};Dialer['prototype'][_0x3ff4('0x30')]=function(_0x2b8129){var _0x1baf25=this['uniqueId'][_0x2b8129['uniqueid']];var _0x24461e=this;var _0x33c0c5=![];var _0x39f8df;var _0x11f16f;if(this['voiceQueues'][_0x2b8129[_0x3ff4('0xc3')]]){if(_0x1baf25&&_0x1baf25[_0x3ff4('0x42')]!==_0x3ff4('0xc2')){delete this[_0x3ff4('0x26')][_0x2b8129[_0x3ff4('0xc1')]];this[_0x3ff4('0xce')](this[_0x3ff4('0x20')][_0x2b8129[_0x3ff4('0xc3')]]);_0x1baf25[_0x3ff4('0xcf')]=moment()['format'](_0x3ff4('0xcb'));var _0x2834d1=new QueueCallerAbandon(_0x1baf25,_0x2b8129);if(utils[_0x3ff4('0x64')](_0x1baf25[_0x3ff4('0xcf')],_0x1baf25[_0x3ff4('0xd0')])>=_0x1baf25[_0x3ff4('0xd1')]){this[_0x3ff4('0x20')][_0x2b8129[_0x3ff4('0xc3')]][_0x3ff4('0xd2')]+=0x1;this['voiceQueues'][_0x2b8129[_0x3ff4('0xc3')]][_0x3ff4('0xd3')]+=0x1;this[_0x3ff4('0x20')][_0x2b8129[_0x3ff4('0xc3')]][_0x3ff4('0xd4')]+=0x1;_0x2834d1[_0x3ff4('0x74')]=0xa;_0x2834d1[_0x3ff4('0xd5')]=_0x3ff4('0xd6');_0x2834d1['dropreason']='TIMEOUT';_0x2834d1[_0x3ff4('0xc8')]=this['voiceQueues'][_0x2b8129[_0x3ff4('0xc3')]][_0x3ff4('0xc9')]?moment()['format']('YYYY-MM-DD\x20HH:mm:ss'):undefined;_0x2834d1[_0x3ff4('0xd7')]+=0x1;_0x2834d1[_0x3ff4('0xd8')]+=0x1;_0x39f8df=this['voiceQueues'][_0x2b8129['queue']][_0x3ff4('0xd9')];_0x11f16f=this['voiceQueues'][_0x2b8129['queue']]['callAdditionalPhoneAfterMin'];hopperUtils[_0x3ff4('0xda')](_0x2834d1,_0x2834d1['state'],_0x1baf25['voiceQueue'])['then'](function(_0x1a1f36){_0x33c0c5=_0x1a1f36[_0x3ff4('0xdb')]==0x1;if(_0x2834d1[_0x3ff4('0xd7')]>=_0x24461e[_0x3ff4('0x20')][_0x2b8129[_0x3ff4('0xc3')]][_0x3ff4('0xdc')]){_0x24461e[_0x3ff4('0xdd')](_0x2834d1,_0x1a1f36['additional']);}else{hopperUtils['rescheduleContact']({'active':![],'countdropretry':_0x2834d1['countdropretry'],'scheduledat':moment()[_0x3ff4('0xde')](_0x24461e['voiceQueues'][_0x2b8129[_0x3ff4('0xc3')]][_0x3ff4('0xd9')],_0x3ff4('0xdf'))[_0x3ff4('0x80')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x1baf25['ContactId'],'ListId':_0x1baf25[_0x3ff4('0xe0')],'VoiceQueueId':_0x1baf25[_0x3ff4('0xe1')]||undefined,'CampaignId':_0x1baf25[_0x3ff4('0xe2')]||undefined})[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0xe3')));var _0x595115=new History(_0x2834d1);_0x595115[_0x3ff4('0x74')]=0xa;_0x595115[_0x3ff4('0xd5')]=_0x3ff4('0xd6');_0x595115['starttime']=moment()[_0x3ff4('0x80')](_0x3ff4('0xcb'));_0x595115[_0x3ff4('0x75')]=_0x595115['starttime'];_0x595115[_0x3ff4('0xe4')]=_0x2834d1[_0x3ff4('0xe4')];_0x595115[_0x3ff4('0xe5')]=_0x2834d1[_0x3ff4('0xe5')];hopperUtils['createHistory'](_0x595115)['catch'](loggerCatch('[syncAgentComplete][createHistory][10]'));}})[_0x3ff4('0x3f')](function(){if(_0x33c0c5)hopperUtils[_0x3ff4('0xe6')](_0x2834d1,_0x39f8df,_0x11f16f)[_0x3ff4('0x3f')](function(){return 0x1;});});}else{this[_0x3ff4('0x20')][_0x2b8129[_0x3ff4('0xc3')]][_0x3ff4('0x52')]+=0x1;this['voiceQueues'][_0x2b8129[_0x3ff4('0xc3')]][_0x3ff4('0xe7')]+=0x1;_0x2834d1[_0x3ff4('0x74')]=0xb;_0x2834d1['statedesc']=_0x3ff4('0xe8');_0x2834d1['dropreason']=_0x3ff4('0xe9');_0x2834d1[_0x3ff4('0xea')]+=0x1;_0x2834d1[_0x3ff4('0xd8')]+=0x1;_0x39f8df=this[_0x3ff4('0x20')][_0x2b8129[_0x3ff4('0xc3')]][_0x3ff4('0xeb')];_0x11f16f=this[_0x3ff4('0x20')][_0x2b8129[_0x3ff4('0xc3')]]['callAdditionalPhoneAfterMin'];hopperUtils[_0x3ff4('0xda')](_0x2834d1,_0x2834d1[_0x3ff4('0x74')],_0x1baf25['voiceQueue'])[_0x3ff4('0x3f')](function(_0x516fa6){if(_0x2834d1[_0x3ff4('0xea')]>=_0x24461e[_0x3ff4('0x20')][_0x2b8129['queue']][_0x3ff4('0xec')]){_0x24461e[_0x3ff4('0xdd')](_0x2834d1,_0x516fa6[_0x3ff4('0xdb')]);}else{hopperUtils['rescheduleContact']({'active':![],'countabandonedretry':_0x2834d1[_0x3ff4('0xea')],'scheduledat':moment()[_0x3ff4('0xde')](_0x24461e[_0x3ff4('0x20')][_0x2b8129[_0x3ff4('0xc3')]]['dialAbandonedRetryFrequency'],_0x3ff4('0xdf'))[_0x3ff4('0x80')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x1baf25[_0x3ff4('0xed')],'ListId':_0x1baf25[_0x3ff4('0xe0')],'VoiceQueueId':_0x1baf25['VoiceQueueId']||undefined,'CampaignId':_0x1baf25[_0x3ff4('0xe2')]||undefined})['catch'](loggerCatch(_0x3ff4('0xee')));var _0x1526da=new History(_0x2834d1);_0x1526da[_0x3ff4('0x74')]=0xb;_0x1526da[_0x3ff4('0xd5')]=_0x3ff4('0xe8');_0x1526da[_0x3ff4('0x76')]=moment()[_0x3ff4('0x80')](_0x3ff4('0xcb'));_0x1526da[_0x3ff4('0x75')]=_0x1526da['starttime'];_0x1526da['calleridname']=_0x2834d1[_0x3ff4('0xe4')];_0x1526da[_0x3ff4('0xe5')]=_0x2834d1[_0x3ff4('0xe5')];hopperUtils[_0x3ff4('0xcc')](_0x1526da)[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0xef')));}})[_0x3ff4('0x3f')](function(){if(_0x33c0c5)hopperUtils[_0x3ff4('0xe6')](_0x2834d1,_0x39f8df,_0x11f16f)[_0x3ff4('0x3f')](function(){return 0x1;});});}}}};Dialer[_0x3ff4('0x89')][_0x3ff4('0x38')]=function(_0x196272){if(this[_0x3ff4('0xf0')][_0x196272[_0x3ff4('0xc1')]]){this[_0x3ff4('0xf0')][_0x196272[_0x3ff4('0xc1')]][_0x3ff4('0xf1')]=_0x196272[_0x3ff4('0xf1')];}if(this[_0x3ff4('0x26')][_0x196272['uniqueid']]){this['uniqueId'][_0x196272[_0x3ff4('0xc1')]]['channel']=_0x196272[_0x3ff4('0xf1')];}};Dialer[_0x3ff4('0x89')][_0x3ff4('0x3b')]=function(_0x452e7b){if(!this[_0x3ff4('0xf0')][_0x452e7b[_0x3ff4('0xf2')]]){return;}var _0x1cf652=this['voiceQueues'][this[_0x3ff4('0xf0')][_0x452e7b[_0x3ff4('0xf2')]][_0x3ff4('0xc3')]][_0x3ff4('0xf3')]||_0x3ff4('0xf4');if(_0x1cf652===_0x3ff4('0xf5')){if(this[_0x3ff4('0xf0')][_0x452e7b[_0x3ff4('0xf2')]]&&_['isNil'](this[_0x3ff4('0xf0')][_0x452e7b[_0x3ff4('0xf2')]]['locked'])&&_0x452e7b[_0x3ff4('0x8d')]==='1'&&_0x452e7b[_0x3ff4('0xf6')]==='0'){if(this[_0x3ff4('0x22')][_0x452e7b[_0x3ff4('0xf7')]]){if(!this[_0x3ff4('0x22')][_0x452e7b[_0x3ff4('0xf7')]][_0x3ff4('0xf8')]){this[_0x3ff4('0x22')][_0x452e7b[_0x3ff4('0xf7')]]['locked']=!![];this[_0x3ff4('0xf0')][_0x452e7b[_0x3ff4('0xf2')]][_0x3ff4('0xf8')]=!![];this[_0x3ff4('0xf0')][_0x452e7b['actionid']][_0x3ff4('0xf7')]=_0x452e7b['stateinterface'];}}}}else if(_0x1cf652===_0x3ff4('0xf4')){if(this['actions'][_0x452e7b[_0x3ff4('0xf2')]]){if(this[_0x3ff4('0x22')][_0x452e7b[_0x3ff4('0xf7')]]){this[_0x3ff4('0xf0')][_0x452e7b[_0x3ff4('0xf2')]][_0x3ff4('0xf7')]=_0x452e7b['stateinterface'];if(_['isNil'](this[_0x3ff4('0xf9')][this[_0x3ff4('0xf0')][_0x452e7b['actionid']]['queue']])){this['queueBooked'][this['actions'][_0x452e7b[_0x3ff4('0xf2')]][_0x3ff4('0xc3')]]=[];}this[_0x3ff4('0xf9')][this[_0x3ff4('0xf0')][_0x452e7b[_0x3ff4('0xf2')]][_0x3ff4('0xc3')]]['push'](_[_0x3ff4('0x63')](_[_0x3ff4('0xfa')](this[_0x3ff4('0xf0')][_0x452e7b[_0x3ff4('0xf2')]],[_0x3ff4('0xfb'),_0x3ff4('0xf7')]),{'status':_0x452e7b[_0x3ff4('0x8d')],'paused':_0x452e7b[_0x3ff4('0xf6')]}));}}}};Dialer['prototype'][_0x3ff4('0xfc')]=function(_0x31ef5e){if(!this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]]){return;}var _0x106a52=this;var _0x5ebbe1=this['voiceQueues'][this[_0x3ff4('0xf0')][_0x31ef5e['actionid']][_0x3ff4('0xc3')]];var _0x1d6a62=_0x5ebbe1[_0x3ff4('0xf3')]||_0x3ff4('0xf4');if(_0x1d6a62===_0x3ff4('0xf5')){if(this[_0x3ff4('0xf0')][_0x31ef5e['actionid']]&&this[_0x3ff4('0xf0')][_0x31ef5e['actionid']]['stateinterface']){this[_0x3ff4('0x1f')][_0x3ff4('0xfd')](this['actions'][_0x31ef5e['actionid']]['idHopper'],this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xf7')])[_0x3ff4('0xa0')](function(_0x5db389){logger[_0x3ff4('0x68')](_0x3ff4('0xfe'),util[_0x3ff4('0x45')](_0x5db389,{'showHidden':![],'depth':null}));})[_0x3ff4('0x1e')](function(){_0x106a52[_0x3ff4('0xce')](_0x106a52['voiceQueues'][_0x106a52[_0x3ff4('0xf0')][_0x31ef5e['actionid']][_0x3ff4('0xc3')]]);_0x106a52[_0x3ff4('0x22')][_0x106a52['actions'][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xf7')]][_0x3ff4('0xf8')]=![];delete _0x106a52[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]];unlockQueueStatus(_0x5ebbe1);});}else{this['updateOriginated'](this[_0x3ff4('0x20')][this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]]['queue']]);hopperUtils[_0x3ff4('0xff')]({'active':![],'ContactId':this['actions'][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xed')],'ListId':this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xe0')],'VoiceQueueId':this['actions'][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xe1')]||undefined,'CampaignId':this['actions'][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xe2')]||undefined})[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x100')));delete this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]];unlockQueueStatus(_0x5ebbe1);}}else if(_0x1d6a62===_0x3ff4('0xf4')){var _0x2d7257;if(this['actions'][_0x31ef5e[_0x3ff4('0xf2')]]&&!_['isEmpty'](this['queueBooked'][this['actions'][_0x31ef5e[_0x3ff4('0xf2')]]['queue']])){if(this['queueBookedRR'][_0x106a52[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xc3')]]){this[_0x3ff4('0x2b')][_0x106a52[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xc3')]]=this[_0x3ff4('0x2b')][this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xc3')]]?this['queueBookedRR'][this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xc3')]]:this['queueBooked'][this[_0x3ff4('0xf0')][_0x31ef5e['actionid']][_0x3ff4('0xc3')]]?this[_0x3ff4('0xf9')][this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]]['queue']][_0x3ff4('0x101')]||0x0:0x0;}this[_0x3ff4('0xf9')][this['actions'][_0x31ef5e['actionid']]['queue']][_0x3ff4('0x101')]=this[_0x3ff4('0x2b')][this['actions'][_0x31ef5e['actionid']][_0x3ff4('0xc3')]];for(var _0x17007b=0x0;_0x17007b<this[_0x3ff4('0xf9')][this['actions'][_0x31ef5e[_0x3ff4('0xf2')]]['queue']][_0x3ff4('0x9c')];_0x17007b+=0x1){_0x2d7257=rr(this[_0x3ff4('0xf9')][this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]]['queue']]);this[_0x3ff4('0x2b')][_0x106a52[_0x3ff4('0xf0')][_0x31ef5e['actionid']]['queue']]=this[_0x3ff4('0xf9')][this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xc3')]]['_rr'];if(_0x2d7257[_0x3ff4('0x8d')]==='1'&&_0x2d7257[_0x3ff4('0xf6')]==='0'){break;}}if(!_['isNil'](_0x2d7257)){this[_0x3ff4('0x22')][_0x2d7257['stateinterface']][_0x3ff4('0x102')]=_[_0x3ff4('0x58')](this['agents'][_0x2d7257[_0x3ff4('0xf7')]][_0x3ff4('0x102')])?!![]:this[_0x3ff4('0x22')][_0x2d7257[_0x3ff4('0xf7')]][_0x3ff4('0x102')];}loggerBooked[_0x3ff4('0x4a')](_0x3ff4('0x103'),_0x31ef5e[_0x3ff4('0xf2')],_0x3ff4('0x104'),JSON[_0x3ff4('0x79')](_[_0x3ff4('0xfa')](this['agents'][_0x2d7257['stateinterface']],[_0x3ff4('0x47'),_0x3ff4('0x102')])),_0x3ff4('0x105'),JSON[_0x3ff4('0x79')](_0x2d7257[_0x3ff4('0xfb')]));if(!_[_0x3ff4('0x106')](_0x2d7257)&&_0x2d7257[_0x3ff4('0x8d')]==='1'&&_0x2d7257[_0x3ff4('0xf6')]==='0'&&this[_0x3ff4('0x22')][_0x2d7257[_0x3ff4('0xf7')]]['unlockRR']){this['agents'][_0x2d7257[_0x3ff4('0xf7')]][_0x3ff4('0x102')]=![];this[_0x3ff4('0xf9')][_0x106a52[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xc3')]]=[];this[_0x3ff4('0x1f')][_0x3ff4('0xfd')](_0x2d7257[_0x3ff4('0xfb')],_0x2d7257[_0x3ff4('0xf7')])[_0x3ff4('0xa0')](function(_0x53d442){logger[_0x3ff4('0x68')](_0x3ff4('0xfe'),util[_0x3ff4('0x45')](_0x53d442,{'showHidden':![],'depth':null}));})['finally'](function(){_0x106a52[_0x3ff4('0xce')](_0x106a52['voiceQueues'][_0x106a52[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]]['queue']]);setTimeout(function(){_0x106a52[_0x3ff4('0x22')][_0x2d7257[_0x3ff4('0xf7')]][_0x3ff4('0x102')]=!![];loggerBooked[_0x3ff4('0x4a')](_0x3ff4('0x107'),_0x31ef5e[_0x3ff4('0xf2')],_0x3ff4('0x104'),JSON['stringify'](_[_0x3ff4('0xfa')](_0x106a52[_0x3ff4('0x22')][_0x2d7257[_0x3ff4('0xf7')]],[_0x3ff4('0x47'),_0x3ff4('0x102')])),'contactAgent-idHopper:\x20',JSON['stringify'](_0x2d7257[_0x3ff4('0xfb')]));},0xc7);delete _0x106a52[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]];unlockQueueStatus(_0x5ebbe1,_0x31ef5e['actionid']);});}else{loggerBooked[_0x3ff4('0x4a')](_0x3ff4('0x108'));this[_0x3ff4('0xce')](this[_0x3ff4('0x20')][this['actions'][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xc3')]]);hopperUtils[_0x3ff4('0xff')]({'active':![],'ContactId':this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xed')],'ListId':this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xe0')],'VoiceQueueId':this['actions'][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xe1')]||undefined,'CampaignId':this['actions'][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xe2')]||undefined})['catch'](loggerCatch(_0x3ff4('0x100')));delete this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]];unlockQueueStatus(_0x5ebbe1);}}else{loggerBooked['info'](_0x3ff4('0x109'));this[_0x3ff4('0xce')](this[_0x3ff4('0x20')][this['actions'][_0x31ef5e[_0x3ff4('0xf2')]]['queue']]);hopperUtils[_0x3ff4('0xff')]({'active':![],'ContactId':this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xed')],'ListId':this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xe0')],'VoiceQueueId':this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xe1')]||undefined,'CampaignId':this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xe2')]||undefined})['catch'](loggerCatch('[unlock2][syncQueueStatusComplete]'));delete this[_0x3ff4('0xf0')][_0x31ef5e['actionid']];unlockQueueStatus(_0x5ebbe1);}}else{loggerBooked['info'](_0x3ff4('0x10a'));this[_0x3ff4('0xce')](this['voiceQueues'][this[_0x3ff4('0xf0')][_0x31ef5e['actionid']][_0x3ff4('0xc3')]]);hopperUtils['rescheduleContact']({'active':![],'ContactId':this['actions'][_0x31ef5e[_0x3ff4('0xf2')]]['ContactId'],'ListId':this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xe0')],'VoiceQueueId':this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]]['VoiceQueueId']||undefined,'CampaignId':this[_0x3ff4('0xf0')][_0x31ef5e[_0x3ff4('0xf2')]][_0x3ff4('0xe2')]||undefined})[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x10b')));delete this[_0x3ff4('0xf0')][_0x31ef5e['actionid']];unlockQueueStatus(_0x5ebbe1);}};Dialer['prototype'][_0x3ff4('0x10c')]=function(_0x1dbfba){var _0x39e8fe=this[_0x3ff4('0xf0')][_0x1dbfba['actionid']];if(_0x39e8fe){delete this[_0x3ff4('0xf0')][_0x1dbfba[_0x3ff4('0xf2')]];_0x39e8fe['responsetime']=moment()['format'](_0x3ff4('0xcb'));var _0x1d22d5=_0x39e8fe[_0x3ff4('0x42')]==='ivr'?this[_0x3ff4('0x21')][_0x39e8fe[_0x3ff4('0xc3')]]:this[_0x3ff4('0x20')][_0x39e8fe[_0x3ff4('0x10d')]()];if(_0x1dbfba['response']!==_0x3ff4('0x10e')){this[_0x3ff4('0xce')](_0x1d22d5);return this[_0x3ff4('0x10f')](_0x39e8fe,_0x1d22d5,_0x1dbfba)[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x110')));}this[_0x3ff4('0x26')][_0x1dbfba[_0x3ff4('0xc1')]]=_0x39e8fe;}};Dialer[_0x3ff4('0x89')]['syncVarSet']=function(_0x506c97){var _0x555e62=this;var _0xdaad8a=this['uniqueId'][_0x506c97[_0x3ff4('0xc1')]];var _0x18ffaa;if(!_['isNil'](_0x506c97)&&!_[_0x3ff4('0x106')](_0x506c97[_0x3ff4('0x111')])&&!_[_0x3ff4('0x106')](_0x506c97[_0x3ff4('0x111')][_0x3ff4('0x112')])&&_0x506c97[_0x3ff4('0x113')]===_0x3ff4('0x114')&&_0xdaad8a){if(_0xdaad8a[_0x3ff4('0x42')]!=='ivr'&&this[_0x3ff4('0x20')][_0xdaad8a[_0x3ff4('0xc3')]][_0x3ff4('0x115')]&&_0x506c97['value']===_0x3ff4('0x116')){delete this[_0x3ff4('0x26')][_0x506c97['uniqueid']];this[_0x3ff4('0xce')](this[_0x3ff4('0x20')][_0xdaad8a['queue']]);this[_0x3ff4('0x20')][_0xdaad8a[_0x3ff4('0xc3')]]['outboundAnswerCallsDay']+=0x1;this[_0x3ff4('0x20')][_0xdaad8a[_0x3ff4('0xc3')]]['outboundAnswerAgiCallsDay']+=0x1;_0x18ffaa=new Hangup(_0xdaad8a,_0x506c97);_0x18ffaa[_0x3ff4('0x74')]=0x12;_0x18ffaa[_0x3ff4('0xd5')]=_0x3ff4('0x117');_0x18ffaa[_0x3ff4('0x118')]='AMD';ami[_0x3ff4('0x41')](_0x3ff4('0x119'),ut[_0x3ff4('0x11a')](_0x18ffaa,_0x3ff4('0x11b')));this[_0x3ff4('0x11c')](_0x18ffaa,_0x3ff4('0x11d'),_0x3ff4('0x11e'));}if(_0xdaad8a[_0x3ff4('0x42')]!==_0x3ff4('0xc2')&&this[_0x3ff4('0x20')][_0xdaad8a['queue']][_0x3ff4('0x115')]&&_0x506c97[_0x3ff4('0x11f')]===_0x3ff4('0x120')){return new Promise(function(_0xf2afd9,_0x3622d0){delete _0x555e62[_0x3ff4('0x26')][_0x506c97['uniqueid']];_0x555e62['updateOriginated'](_0x555e62[_0x3ff4('0x20')][_0xdaad8a[_0x3ff4('0xc3')]]);_0x555e62[_0x3ff4('0x20')][_0xdaad8a[_0x3ff4('0xc3')]]['outboundAnswerCallsDay']+=0x1;_0x555e62[_0x3ff4('0x20')][_0xdaad8a['queue']][_0x3ff4('0x121')]+=0x1;var _0x16a144=_0x555e62['voiceQueues'][_0xdaad8a[_0x3ff4('0xc3')]];var _0x1690a6=new Hangup(_0xdaad8a,_0x506c97);_0x1690a6[_0x3ff4('0x74')]=0x13;_0x1690a6[_0x3ff4('0xd5')]=_0x3ff4('0x122');_0x1690a6[_0x3ff4('0x118')]=_0x3ff4('0x123');_0x1690a6[_0x3ff4('0x124')]+=0x1;_0x1690a6[_0x3ff4('0xd8')]+=0x1;_0x1690a6[_0x3ff4('0x11b')]=!![];ami[_0x3ff4('0x41')](_0x3ff4('0x119'),ut[_0x3ff4('0x11a')](_0x1690a6,'amd'));hopperUtils['createHistory'](_0x1690a6)[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x125')));if(_0x1690a6[_0x3ff4('0x126')]+_0x1690a6[_0x3ff4('0x127')]+_0x1690a6[_0x3ff4('0x128')]+_0x1690a6['countnosuchnumberretry']+_0x1690a6[_0x3ff4('0xd7')]+_0x1690a6[_0x3ff4('0xea')]+_0x1690a6[_0x3ff4('0x124')]+_0x1690a6[_0x3ff4('0x129')]>=_0x16a144[_0x3ff4('0x12a')]){_0x555e62[_0x3ff4('0x12b')](_0x1690a6,_0xf2afd9,_0x3622d0,_0x3ff4('0x12c'));}else{if(_0x1690a6[_0x3ff4('0x124')]>=_0x16a144[_0x3ff4('0x12d')]){_0x555e62[_0x3ff4('0x12e')](_0x1690a6,_0xf2afd9,_0x3622d0,_0x3ff4('0x12f'));}else{hopperUtils[_0x3ff4('0xff')]({'active':![],'countmachineretry':_0x1690a6[_0x3ff4('0x124')],'scheduledat':moment()[_0x3ff4('0xde')](_0x16a144[_0x3ff4('0x130')],_0x3ff4('0xdf'))[_0x3ff4('0x80')](_0x3ff4('0xcb')),'ContactId':_0x1690a6[_0x3ff4('0xed')],'ListId':_0x1690a6[_0x3ff4('0xe0')],'VoiceQueueId':_0x1690a6[_0x3ff4('0xe1')]||undefined,'CampaignId':_0x1690a6[_0x3ff4('0xe2')]||undefined})[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x131')));_0xf2afd9({'reschedule':0x1});}}});}if(_0xdaad8a[_0x3ff4('0x42')]==='ivr'&&this['campaigns'][_0xdaad8a[_0x3ff4('0xc3')]]['dialAMDActive']&&_0x506c97[_0x3ff4('0x11f')]==='HANGUP'){delete this['uniqueId'][_0x506c97[_0x3ff4('0xc1')]];this['updateOriginated'](this[_0x3ff4('0x21')][_0xdaad8a['queue']]);_0x18ffaa=new Hangup(_0xdaad8a,_0x506c97);_0x18ffaa['state']=0x12;_0x18ffaa[_0x3ff4('0xd5')]=_0x3ff4('0x117');_0x18ffaa[_0x3ff4('0x118')]=_0x3ff4('0x123');ami['emit']('custom:amd',ut[_0x3ff4('0x11a')](_0x18ffaa,_0x3ff4('0x11b')));this[_0x3ff4('0x11c')](_0x18ffaa,_0x3ff4('0x132'),_0x3ff4('0x133'));}if(_0xdaad8a[_0x3ff4('0x42')]===_0x3ff4('0xc2')&&this[_0x3ff4('0x21')][_0xdaad8a[_0x3ff4('0xc3')]][_0x3ff4('0x115')]&&_0x506c97[_0x3ff4('0x11f')]===_0x3ff4('0x120')){return new Promise(function(_0x3437aa,_0x205c9b){delete _0x555e62['uniqueId'][_0x506c97[_0x3ff4('0xc1')]];_0x555e62['updateOriginated'](_0x555e62[_0x3ff4('0x21')][_0xdaad8a[_0x3ff4('0xc3')]]);_0x555e62[_0x3ff4('0x21')][_0xdaad8a[_0x3ff4('0xc3')]][_0x3ff4('0xc5')]+=0x1;_0x555e62[_0x3ff4('0x21')][_0xdaad8a['queue']]['outboundAnswerAgiCallsDay']+=0x1;var _0x6a31df=_0x555e62[_0x3ff4('0x21')][_0xdaad8a['queue']];var _0x55e812=new Hangup(_0xdaad8a,_0x506c97);_0x55e812['state']=0x13;_0x55e812['statedesc']=_0x3ff4('0x122');_0x55e812[_0x3ff4('0x118')]='AMD';_0x55e812[_0x3ff4('0x124')]+=0x1;_0x55e812[_0x3ff4('0xd8')]+=0x1;_0x55e812[_0x3ff4('0x11b')]=!![];ami[_0x3ff4('0x41')]('custom:amd',ut[_0x3ff4('0x11a')](_0x55e812,_0x3ff4('0x11b')));hopperUtils[_0x3ff4('0xcc')](_0x55e812)[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x125')));if(_0x55e812[_0x3ff4('0x126')]+_0x55e812[_0x3ff4('0x127')]+_0x55e812[_0x3ff4('0x128')]+_0x55e812[_0x3ff4('0x134')]+_0x55e812['countdropretry']+_0x55e812['countabandonedretry']+_0x55e812[_0x3ff4('0x124')]+_0x55e812[_0x3ff4('0x129')]>=_0x6a31df[_0x3ff4('0x12a')]){_0x555e62[_0x3ff4('0x12b')](_0x55e812,_0x3437aa,_0x205c9b,_0x3ff4('0x12c'));}else{if(_0x55e812[_0x3ff4('0x124')]>=_0x6a31df['dialMachineMaxRetry']){_0x555e62[_0x3ff4('0x12e')](_0x55e812,_0x3437aa,_0x205c9b,'reason\x2019\x20machine....');}else{hopperUtils[_0x3ff4('0xff')]({'active':![],'countmachineretry':_0x55e812['countmachineretry'],'scheduledat':moment()[_0x3ff4('0xde')](_0x6a31df[_0x3ff4('0x130')],_0x3ff4('0xdf'))[_0x3ff4('0x80')](_0x3ff4('0xcb')),'ContactId':_0x55e812[_0x3ff4('0xed')],'ListId':_0x55e812['ListId'],'VoiceQueueId':_0x55e812['VoiceQueueId']||undefined,'CampaignId':_0x55e812[_0x3ff4('0xe2')]||undefined})[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x131')));_0x3437aa({'reschedule':0x1});}}});}}};Dialer['prototype']['syncHangup']=function(_0x3e8c33){var _0x4893f4=this[_0x3ff4('0x26')][_0x3e8c33[_0x3ff4('0xc1')]];var _0x1b8ecb;if(_0x4893f4&&_0x4893f4[_0x3ff4('0x42')]===_0x3ff4('0xc2')){delete this[_0x3ff4('0x26')][_0x3e8c33[_0x3ff4('0xc1')]];this['updateOriginated'](this[_0x3ff4('0x21')][_0x4893f4[_0x3ff4('0xc3')]]);this[_0x3ff4('0x21')][_0x4893f4[_0x3ff4('0xc3')]][_0x3ff4('0x135')]+=0x1;_0x1b8ecb=new Hangup(_0x4893f4,_0x3e8c33);hopperUtils['createHistory'](_0x1b8ecb)[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x136')));hopperUtils[_0x3ff4('0xcd')](_0x1b8ecb)[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x137')));}if(_0x4893f4&&_0x4893f4[_0x3ff4('0x42')]!=='ivr'&&isNotNull(this[_0x3ff4('0x20')][_0x4893f4[_0x3ff4('0xc3')]][_0x3ff4('0x138')])){delete this['uniqueId'][_0x3e8c33[_0x3ff4('0xc1')]];this[_0x3ff4('0xce')](this[_0x3ff4('0x20')][_0x4893f4['queue']]);this[_0x3ff4('0x20')][_0x4893f4[_0x3ff4('0xc3')]]['outboundAnswerCallsDay']+=0x1;this[_0x3ff4('0x20')][_0x4893f4['queue']]['outboundAnswerAgiCallsDay']+=0x1;_0x1b8ecb=new Hangup(_0x4893f4,_0x3e8c33);_0x1b8ecb[_0x3ff4('0x74')]=0x10;_0x1b8ecb['statedesc']='AnswerAGI';_0x1b8ecb[_0x3ff4('0x118')]=_0x3ff4('0x139');hopperUtils['createHistory'](_0x1b8ecb)[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x136')));hopperUtils[_0x3ff4('0xcd')](_0x1b8ecb)[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x137')));}if(_0x4893f4&&_0x4893f4[_0x3ff4('0x42')]!==_0x3ff4('0xc2')&&!isNotNull(this[_0x3ff4('0x20')][_0x4893f4['queue']]['dialQueueProject'])){if(_0x3e8c33['cause-txt']===_0x3ff4('0x13a')){delete this[_0x3ff4('0x26')][_0x3e8c33[_0x3ff4('0xc1')]];this[_0x3ff4('0x20')][_0x4893f4['queue']][_0x3ff4('0xc5')]+=0x1;const _0x9bbcbc=new AgentComplete(_0x4893f4,_0x3e8c33);_0x9bbcbc['CampaignId']=this[_0x3ff4('0x20')][_0x4893f4['queue']]['id'];hopperUtils[_0x3ff4('0xcc')](_0x9bbcbc)[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x13b')));hopperUtils['moveContactManagedDialer'](_0x9bbcbc)[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x13c')));}else{delete this[_0x3ff4('0x26')][_0x3e8c33['uniqueid']];this[_0x3ff4('0xce')](this['voiceQueues'][_0x4893f4[_0x3ff4('0xc3')]]);this[_0x3ff4('0x20')][_0x4893f4[_0x3ff4('0xc3')]][_0x3ff4('0x13d')]+=0x1;_0x1b8ecb=new Hangup(_0x4893f4,_0x3e8c33);_0x1b8ecb[_0x3ff4('0x74')]=0xc;_0x1b8ecb['statedesc']=_0x3e8c33[_0x3ff4('0x13e')];_0x1b8ecb[_0x3ff4('0x118')]='Unknow';hopperUtils[_0x3ff4('0xcc')](_0x1b8ecb)[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x136')));hopperUtils[_0x3ff4('0xcd')](_0x1b8ecb)[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x137')));}}};Dialer['prototype'][_0x3ff4('0xc')]=function(_0x1b339c){var _0x4cb5cb=this;if(!_0x4cb5cb[_0x3ff4('0x2c')][_0x1b339c[_0x3ff4('0x47')]]){_0x4cb5cb[_0x3ff4('0x2c')][_0x1b339c[_0x3ff4('0x47')]]={'running':![]};}else if(_0x4cb5cb['queuesSummary'][_0x1b339c[_0x3ff4('0x47')]][_0x3ff4('0x13f')]===!![]){return;}else if(_0x4cb5cb[_0x3ff4('0x2c')][_0x1b339c['name']][_0x3ff4('0x13f')]===![]){_0x4cb5cb['queuesSummary'][_0x1b339c[_0x3ff4('0x47')]]['running']=!![];}var _0x3e32f4=_0x4cb5cb[_0x3ff4('0x20')][_0x1b339c[_0x3ff4('0x47')]];var _0x12d9cc=_0x3e32f4[_0x3ff4('0x6d')]!==utils[_0x3ff4('0x6e')][_0x3ff4('0x7d')];var _0x3728eb=utils[_0x3ff4('0x140')](_0x3e32f4);_0x3e32f4[_0x3ff4('0x141')]=utils[_0x3ff4('0x142')](_0x3e32f4,_0x4cb5cb[_0x3ff4('0x23')]);Promise['resolve']()[_0x3ff4('0x3f')](function(){if(_0x3e32f4[_0x3ff4('0x141')]===utils['CAMPAIGN_STATUS'][_0x3ff4('0x7d')]){if(_0x12d9cc){clearPredictiveAttributes(_0x3e32f4);_0x1b339c['startPredictive']=undefined;_0x1b339c[_0x3ff4('0x29')]=undefined;}if(_0x3e32f4[_0x3ff4('0x141')]===utils[_0x3ff4('0x6e')]['INACTIVE']){_0x1b339c['available']=0x0;_0x1b339c['paused']=0x0;_0x1b339c[_0x3ff4('0x143')]=0x0;_0x1b339c[_0x3ff4('0x144')]=0x0;_0x1b339c[_0x3ff4('0x145')]=0x0;}}else if(_0x3e32f4[_0x3ff4('0x141')]===utils[_0x3ff4('0x6e')]['ACTIVE']&&!_0x3728eb){return _0x4cb5cb[_0x3ff4('0x96')](_0x3e32f4,!![])['then'](function(){return _0x4cb5cb[_0x3ff4('0x96')](_0x3e32f4,![]);})['then'](function(){return _0x4cb5cb['checkDialMethod'](_0x3e32f4);})[_0x3ff4('0xa0')](function(_0x120953){loggerSyncQueueSummary[_0x3ff4('0x43')](_0x3ff4('0x146'),util[_0x3ff4('0x45')](_0x120953,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x3e32f4);});}else{clearPredictiveAttributes(_0x3e32f4);}})[_0x3ff4('0x3f')](function(){var _0x1dc4d8=_0x1b339c['compareToOutboundQueue'](_0x3e32f4);if(_0x1dc4d8||_0x3e32f4['queueSummaryCountersUpdated']){_0x3e32f4[_0x3ff4('0x147')]=![];_0x1b339c['updateReportFromOutboundQueue'](_0x3e32f4);Object[_0x3ff4('0x148')](_0x3e32f4,_0x1b339c);emitOutboundVoiceQueueSummary(_0x1b339c);}_0x4cb5cb[_0x3ff4('0x2c')][_0x3e32f4[_0x3ff4('0x47')]]['running']=![];})[_0x3ff4('0xa0')](function(_0x171c98){logger[_0x3ff4('0x68')](_0x3ff4('0x146'),util['inspect'](_0x171c98,{'showHidden':![],'depth':null}));_0x4cb5cb[_0x3ff4('0x2c')][_0x3e32f4[_0x3ff4('0x47')]][_0x3ff4('0x13f')]=![];});};Dialer[_0x3ff4('0x89')]['syncQueueSummaryComplete']=_[_0x3ff4('0x149')](function(){var _0x512405=_[_0x3ff4('0x14a')](this['voiceQueues'],function(_0x3be8da){return _0x3be8da[_0x3ff4('0x14b')];});var _0x33c400=_[_0x3ff4('0x14a')](this[_0x3ff4('0x22')],function(_0xf4226d){return _0xf4226d[_0x3ff4('0x14c')]&&_0xf4226d[_0x3ff4('0x8d')]==='reachable';});if(_0x512405[_0x3ff4('0x9c')]>0x0&&_0x33c400[_0x3ff4('0x9c')]>0x0){return Promise[_0x3ff4('0xad')]()[_0x3ff4('0x3f')](cmHopper[_0x3ff4('0x14d')](_[_0x3ff4('0x14e')](_0x512405,'id'),previewRecallmeReminderInterval,_[_0x3ff4('0x14e')](_0x33c400,'id')))['then'](function(_0x36b772){for(var _0x11689a=0x0;_0x11689a<_0x36b772[_0x3ff4('0x9c')];_0x11689a++){var _0x3ca831=_0x36b772[_0x11689a][_0x3ff4('0x14f')][_0x3ff4('0x47')];if(_0x3ca831)io['to'](util['format']('user:%s',_0x3ca831))['emit'](_0x3ff4('0x150'),{'hopper':_0x36b772[_0x11689a]});}})['catch'](function(_0x5cd5ee){logger[_0x3ff4('0x68')]('checkPreviewRecallReminder',_0x5cd5ee);});}},0x3c*0x3e8,{'leading':!![]});Dialer[_0x3ff4('0x89')][_0x3ff4('0x151')]=function(){var _0x22c1b6=this;setInterval(function(){_0x22c1b6[_0x3ff4('0x152')](_0x22c1b6[_0x3ff4('0x26')],_0x3ff4('0x153'));_0x22c1b6[_0x3ff4('0x152')](_0x22c1b6['actions'],_0x3ff4('0x154'));},0x32c8);};Dialer[_0x3ff4('0x89')][_0x3ff4('0x152')]=function(_0xecd0d0,_0x499b47){var _0x1f5ce6=this;for(var _0x3da5ce in _0xecd0d0){if(typeof _0xecd0d0[_0x3da5ce]!==_0x3ff4('0xab')){this[_0x3ff4('0x155')][_0x3ff4('0x1c')](function(){if(!_[_0x3ff4('0x106')](_0xecd0d0[_0x3da5ce])){return ami['Action']({'action':_0x3ff4('0x8d'),'channel':_0xecd0d0[_0x3da5ce][_0x3ff4('0xf1')]})['catch'](function(_0xff9515){if(_0xff9515[_0x3ff4('0x6d')]===_0x3ff4('0x156')){setTimeout(function(){if(_0xecd0d0[_0x3da5ce]&&_0xecd0d0[_0x3da5ce][_0x3ff4('0x42')]!==_0x3ff4('0xc2')){_0x1f5ce6[_0x3ff4('0xce')](_0x1f5ce6[_0x3ff4('0x20')][_0xecd0d0[_0x3da5ce][_0x3ff4('0xc3')]]);logger[_0x3ff4('0x68')](_0x3ff4('0x157'),_0x499b47,_0x3da5ce,_0xecd0d0[_0x3da5ce][_0x3ff4('0xc3')]);delete _0xecd0d0[_0x3da5ce];}if(_0xecd0d0[_0x3da5ce]&&_0xecd0d0[_0x3da5ce]['type']===_0x3ff4('0xc2')){_0x1f5ce6[_0x3ff4('0xce')](_0x1f5ce6[_0x3ff4('0x21')][_0xecd0d0[_0x3da5ce]['queue']]);logger[_0x3ff4('0x68')](_0x3ff4('0x158'),_0x499b47,_0x3da5ce,_0xecd0d0[_0x3da5ce][_0x3ff4('0xc3')]);delete _0xecd0d0[_0x3da5ce];}},0x2328);}});}});}}};Dialer[_0x3ff4('0x89')][_0x3ff4('0x159')]=function(_0x51e3b9){return Promise[_0x3ff4('0xad')]()['then'](voiceQueueRt[_0x3ff4('0x159')](_0x51e3b9))[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x15a')));};Dialer['prototype'][_0x3ff4('0xce')]=function(_0x19bc8a){if(!_[_0x3ff4('0x58')](_0x19bc8a)&&_0x19bc8a!==null){if(typeof _0x19bc8a[_0x3ff4('0x15b')]!=='undefined'){if(_0x19bc8a[_0x3ff4('0x15b')]>0x0){_0x19bc8a['originated']-=0x1;}else{logger[_0x3ff4('0x68')](_0x3ff4('0x15c'));}}}else{logger['error']('[updateOriginated]\x20is\x20null\x20or\x20undefined');}};Dialer[_0x3ff4('0x89')][_0x3ff4('0x15d')]=function(_0x59580d,_0x457899){var _0x50ddba=this;return function(_0x46e7e3){_0x50ddba['updateOriginated'](_0x457899);logger[_0x3ff4('0x68')](_0x59580d,util['inspect'](_0x46e7e3,{'showHidden':![],'depth':null}));};};Dialer[_0x3ff4('0x89')][_0x3ff4('0x15e')]=function(_0x472ee0,_0x3ac453,_0x56faf0){var _0x8cba45={'state':0x19,'statedesc':_0x3ff4('0x15f')};this[_0x3ff4('0xce')](_0x3ac453);this['saveInDb'](_[_0x3ff4('0x63')](_0x8cba45,_[_0x3ff4('0xfa')](_0x56faf0,['ContactId',_0x3ff4('0xe0'),'UserId',_0x3ff4('0xe1'),_0x3ff4('0xe2')])),_0x3ff4('0x160'),_0x3ff4('0x161'));logger[_0x3ff4('0x68')](_0x472ee0);};Dialer[_0x3ff4('0x89')][_0x3ff4('0x11c')]=function(_0x161bc9,_0x395e36,_0x15d5c1){hopperUtils[_0x3ff4('0xcc')](_0x161bc9)[_0x3ff4('0xa0')](loggerCatch(_0x395e36));hopperUtils[_0x3ff4('0xcd')](_0x161bc9)[_0x3ff4('0xa0')](loggerCatch(_0x15d5c1));};Dialer[_0x3ff4('0x89')][_0x3ff4('0xdd')]=function(_0x196ea9,_0xda50a2){hopperUtils[_0x3ff4('0xcc')](_0x196ea9)[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x13b')));if(_0xda50a2==0x0){hopperUtils[_0x3ff4('0xcd')](_0x196ea9)[_0x3ff4('0xa0')](loggerCatch('[syncQueueCallerAbandon]\x20[Drop]'));}};Dialer[_0x3ff4('0x89')][_0x3ff4('0x162')]=function(_0x1cd2a6){return Promise[_0x3ff4('0xad')]()[_0x3ff4('0x3f')](cmHopper['handlePreviewRecallNotifications'](_0x1cd2a6['id'],previewRecallmeReminderInterval))[_0x3ff4('0x3f')](function(_0x3b617c){for(var _0x46a4d9=0x0;_0x46a4d9<_0x3b617c[_0x3ff4('0x9c')];_0x46a4d9++){var _0x4ed9a9=_0x3b617c[_0x46a4d9]['Agent'][_0x3ff4('0x47')];if(_0x4ed9a9)io['to'](util[_0x3ff4('0x80')]('user:%s',_0x4ed9a9))[_0x3ff4('0x41')](_0x3ff4('0x150'),{'hopper':_0x3b617c[_0x46a4d9]});}})['catch'](function(){});};Dialer['prototype'][_0x3ff4('0xb0')]=function(_0xdde77b){var _0x2fffa9=this;return function(){_0x2fffa9[_0x3ff4('0x163')](_0xdde77b);};};Dialer['prototype']['actionOriginate']=function(_0x56fd82,_0x255526){var _0x1731b5=this;var _0x52fb8f=uuid['v4']();this[_0x3ff4('0xf0')][_0x52fb8f]=new Action(_0x56fd82,_0x255526,_0x52fb8f);return new Promise(function(_0x50fe61,_0x1e3f52){if(_[_0x3ff4('0x58')](_0x56fd82)&&typeof _0x56fd82!=='object'){return _0x1e3f52(msgResponse('originate',_0x3ff4('0x97'),'voiceQueue\x20is\x20undefine'));}if(_[_0x3ff4('0x58')](_0x255526[_0x3ff4('0x164')])||_0x255526[_0x3ff4('0x164')]===null){return _0x1e3f52(msgResponse(_0x3ff4('0x165'),_0x3ff4('0x97'),_0x3ff4('0x166')));}var _0x3e49aa={'XMD-CALLERID':_0x1731b5[_0x3ff4('0xf0')][_0x52fb8f]['getCaller'](),'XMD-AGI':_0x56fd82[_0x3ff4('0x138')]?util['format'](_0x3ff4('0x167'),ipAgi,_0x56fd82['dialQueueProject']):_0x3ff4('0x168'),'XMD-AGIAFTER':_0x56fd82[_0x3ff4('0xc9')]?util[_0x3ff4('0x80')](_0x3ff4('0x167'),ipAgi,_0x56fd82[_0x3ff4('0xc9')]):_0x3ff4('0x168'),'XMD-QUEUE':utils['isOutboundQueue'](_0x56fd82)?util['format']('\x22%s,%s%s,,,%s\x22',_0x56fd82[_0x3ff4('0x47')],_0x56fd82[_0x3ff4('0x169')]||'',_0x56fd82[_0x3ff4('0xca')]?'c':'',_0x56fd82[_0x3ff4('0xd1')]||0x3):'NONE','XMD-CONTACTID':_0x255526[_0x3ff4('0xed')],'XMD-CDRTYPE':_0x3ff4('0x8'),'CALLERID(all)':_0x1731b5['actions'][_0x52fb8f][_0x3ff4('0x16a')](),'XMD-AMD':_0x56fd82[_0x3ff4('0x115')]?_0x3ff4('0x16b'):'NONE','XMD-DESTINATION':_0x3ff4('0x114')};if(_0x56fd82[_0x3ff4('0x115')]){_0x3e49aa[_0x3ff4('0x16c')]=_0x56fd82[_0x3ff4('0x16d')]||0x9c4;_0x3e49aa[_0x3ff4('0x16e')]=_0x56fd82['dialAMDGreeting']||0x5dc;_0x3e49aa[_0x3ff4('0x16f')]=_0x56fd82[_0x3ff4('0x170')]||0x320;_0x3e49aa[_0x3ff4('0x171')]=_0x56fd82[_0x3ff4('0x172')]||0x1388;_0x3e49aa[_0x3ff4('0x173')]=_0x56fd82['dialAMDMinWordLength']||0x64;_0x3e49aa[_0x3ff4('0x174')]=_0x56fd82[_0x3ff4('0x175')]||0x32;_0x3e49aa[_0x3ff4('0x176')]=_0x56fd82[_0x3ff4('0x177')]||0x3;_0x3e49aa['XMD-AMDSILENCETHRESHOLD']=_0x56fd82[_0x3ff4('0x178')]||0x100;_0x3e49aa['XMD-AMDMAXIMUMWORDLENGTH']=_0x56fd82[_0x3ff4('0x179')]||0x1388;}if(utils[_0x3ff4('0x17a')](_0x56fd82)){_0x3e49aa[_0x3ff4('0x17b')]=_0x255526['VoiceQueueId'];}else{_0x3e49aa[_0x3ff4('0x17c')]=_0x255526['CampaignId'];}var _0x1520e0=utils['setXMDContactVariables'](_0x255526[_0x3ff4('0x17d')]);Object[_0x3ff4('0x148')](_0x3e49aa,_0x1520e0);var _0x15f561=_0x1731b5['isTrunkReachable'](_0x56fd82[_0x3ff4('0x17e')])?utils[_0x3ff4('0x17f')](_0x56fd82['Trunk'][_0x3ff4('0x180')],_0x56fd82['dialOriginateCallerIdName'],_0x56fd82['dialRandomLastDigitCallerIdNumber']>0x0?utils['getCallerIdRandom'](_0x56fd82[_0x3ff4('0x181')],_0x56fd82['dialRandomLastDigitCallerIdNumber']):_0x56fd82['dialOriginateCallerIdNumber']):utils[_0x3ff4('0x17f')](_[_0x3ff4('0x106')](_0x56fd82['TrunkBackup'])?_0x56fd82[_0x3ff4('0x17e')][_0x3ff4('0x180')]:_0x56fd82[_0x3ff4('0x90')][_0x3ff4('0x180')],_0x56fd82[_0x3ff4('0x182')],_0x56fd82[_0x3ff4('0x183')]>0x0?utils['getCallerIdRandom'](_0x56fd82[_0x3ff4('0x181')],_0x56fd82['dialRandomLastDigitCallerIdNumber']):_0x56fd82[_0x3ff4('0x181')]);if(_0x15f561){_0x3e49aa[_0x3ff4('0x184')]=_0x1731b5['actions'][_0x52fb8f][_0x3ff4('0x185')]=utils['extractCalleridName'](_0x15f561);_0x3e49aa[_0x3ff4('0x186')]=_0x255526[_0x3ff4('0x164')];}_0x56fd82[_0x3ff4('0x187')]=_0x3e49aa;return ami[_0x3ff4('0x9d')]({'actionid':_0x52fb8f,'action':_0x3ff4('0x165'),'channel':_0x1731b5[_0x3ff4('0x8f')](_0x56fd82['Trunk'])?util['format'](_0x3ff4('0x188'),_0x56fd82[_0x3ff4('0x17e')][_0x3ff4('0x47')],isNotNull(_0x56fd82['dialPrefix'])?_0x56fd82[_0x3ff4('0x189')]['trim']()||'':'',_0x56fd82[_0x3ff4('0x18a')]>0x0?_0x255526[_0x3ff4('0x164')][_0x3ff4('0x18b')](_0x56fd82['dialCutDigit']):_0x255526[_0x3ff4('0x164')]):util[_0x3ff4('0x80')]('SIP/%s/%s%s',_[_0x3ff4('0x106')](_0x56fd82[_0x3ff4('0x90')])?_0x56fd82[_0x3ff4('0x17e')]['name']:_0x56fd82['TrunkBackup'][_0x3ff4('0x47')],isNotNull(_0x56fd82[_0x3ff4('0x189')])?_0x56fd82[_0x3ff4('0x189')][_0x3ff4('0x18c')]()||'':'',_0x56fd82[_0x3ff4('0x18a')]>0x0?_0x255526[_0x3ff4('0x164')][_0x3ff4('0x18b')](_0x56fd82[_0x3ff4('0x18a')]):_0x255526['phone']),'callerid':_0x15f561,'Exten':_0x3ff4('0x114'),'Context':_0x3ff4('0x18d'),'Priority':'1','variable':_0x3e49aa,'timeout':(_0x56fd82[_0x3ff4('0x18e')]||0x1e)*0x3e8,'async':!![],'channelid':_0x52fb8f})['then'](function(_0x298285){return _0x50fe61(_0x298285);})[_0x3ff4('0xa0')](function(_0x9719f){_0x56fd82[_0x3ff4('0x18f')]+=0x1;var _0x1c41d8=new History(_0x1731b5[_0x3ff4('0xf0')][_0x52fb8f]);logger[_0x3ff4('0x68')](util[_0x3ff4('0x80')](_0x3ff4('0x190'),JSON[_0x3ff4('0x79')](_0x9719f)));_0x1c41d8[_0x3ff4('0x74')]=0xe;_0x1c41d8[_0x3ff4('0xd5')]=_0x3ff4('0x191');_0x1c41d8['starttime']=moment()['format'](_0x3ff4('0xcb'));_0x1c41d8[_0x3ff4('0x75')]=_0x1c41d8[_0x3ff4('0x76')];hopperUtils[_0x3ff4('0xcc')](_0x1c41d8)[_0x3ff4('0xa0')](loggerCatch('[originate][error]'));_0x1731b5[_0x3ff4('0xcd')](_0x1c41d8)[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x192')))[_0x3ff4('0x1e')](function(){delete _0x1731b5[_0x3ff4('0xf0')][_0x52fb8f];return _0x1e3f52(msgResponse(_0x3ff4('0x165'),'Error',_0x3ff4('0x193')));});});});};Dialer['prototype'][_0x3ff4('0x194')]=function(_0x2f5667,_0x1c61b9,_0x33ab7d){var _0x12be34=new History(_0x1c61b9);if(_0x12be34[_0x3ff4('0x126')]+_0x12be34[_0x3ff4('0x127')]+_0x12be34['countnoanswerretry']+_0x12be34[_0x3ff4('0x134')]+_0x12be34[_0x3ff4('0xd7')]+_0x12be34[_0x3ff4('0xea')]+_0x12be34['countmachineretry']+_0x12be34[_0x3ff4('0x129')]>=_0x33ab7d[_0x3ff4('0x12a')]-0x1){return!![];}switch(_0x2f5667){case 0x3:if(_0x12be34[_0x3ff4('0x128')]>=_0x33ab7d[_0x3ff4('0x195')]-0x1){return!![];}hopperUtils[_0x3ff4('0xff')]({'active':![],'countnoanswerretry':_0x12be34[_0x3ff4('0x128')]+=0x1,'scheduledat':moment()[_0x3ff4('0xde')](_0x33ab7d[_0x3ff4('0x196')],_0x3ff4('0xdf'))['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x12be34[_0x3ff4('0xed')],'ListId':_0x12be34[_0x3ff4('0xe0')],'VoiceQueueId':_0x12be34[_0x3ff4('0xe1')]||undefined,'CampaignId':_0x12be34[_0x3ff4('0xe2')]||undefined})[_0x3ff4('0xa0')](loggerCatch('[rescheduleContact][NoAnswer]'));break;case 0x5:if(_0x12be34['countbusyretry']>=_0x33ab7d[_0x3ff4('0x197')]-0x1){return!![];}hopperUtils[_0x3ff4('0xff')]({'active':![],'countbusyretry':_0x12be34['countbusyretry']+=0x1,'scheduledat':moment()[_0x3ff4('0xde')](_0x33ab7d[_0x3ff4('0x198')],_0x3ff4('0xdf'))[_0x3ff4('0x80')](_0x3ff4('0xcb')),'ContactId':_0x12be34[_0x3ff4('0xed')],'ListId':_0x12be34['ListId'],'VoiceQueueId':_0x12be34[_0x3ff4('0xe1')]||undefined,'CampaignId':_0x12be34[_0x3ff4('0xe2')]||undefined})[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x199')));break;case 0x8:if(_0x12be34['countcongestionretry']>=_0x33ab7d[_0x3ff4('0x19a')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countcongestionretry':_0x12be34[_0x3ff4('0x127')]+=0x1,'scheduledat':moment()[_0x3ff4('0xde')](_0x33ab7d[_0x3ff4('0x19b')],'minutes')[_0x3ff4('0x80')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x12be34[_0x3ff4('0xed')],'ListId':_0x12be34[_0x3ff4('0xe0')],'VoiceQueueId':_0x12be34[_0x3ff4('0xe1')]||undefined,'CampaignId':_0x12be34[_0x3ff4('0xe2')]||undefined})[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x19c')));break;case 0x0:if(_0x12be34['countnosuchnumberretry']>=_0x33ab7d['dialNoSuchNumberMaxRetry']-0x1){return!![];}else{hopperUtils[_0x3ff4('0xff')]({'active':![],'countnosuchnumberretry':_0x12be34[_0x3ff4('0x134')]+=0x1,'scheduledat':moment()[_0x3ff4('0xde')](_0x33ab7d['dialNoSuchNumberRetryFrequency'],_0x3ff4('0xdf'))[_0x3ff4('0x80')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x12be34[_0x3ff4('0xed')],'ListId':_0x12be34[_0x3ff4('0xe0')],'VoiceQueueId':_0x12be34[_0x3ff4('0xe1')]||undefined,'CampaignId':_0x12be34[_0x3ff4('0xe2')]||undefined})[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x19d')));}break;case 0xa:if(_0x12be34['countdropretry']>=_0x33ab7d[_0x3ff4('0xdc')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countdropretry':_0x12be34['countdropretry']+=0x1,'scheduledat':moment()['add'](_0x33ab7d['dialDropRetryFrequency'],_0x3ff4('0xdf'))[_0x3ff4('0x80')](_0x3ff4('0xcb')),'ContactId':_0x12be34[_0x3ff4('0xed')],'ListId':_0x12be34[_0x3ff4('0xe0')],'VoiceQueueId':_0x12be34['VoiceQueueId']||undefined,'CampaignId':_0x12be34[_0x3ff4('0xe2')]||undefined})[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0xe3')));break;case 0xb:if(_0x12be34[_0x3ff4('0xea')]>=_0x33ab7d[_0x3ff4('0xec')]-0x1){return!![];}hopperUtils[_0x3ff4('0xff')]({'active':![],'countabandonedretry':_0x12be34[_0x3ff4('0xea')]+=0x1,'scheduledat':moment()[_0x3ff4('0xde')](_0x33ab7d[_0x3ff4('0xeb')],_0x3ff4('0xdf'))[_0x3ff4('0x80')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x12be34['ContactId'],'ListId':_0x12be34[_0x3ff4('0xe0')],'VoiceQueueId':_0x12be34[_0x3ff4('0xe1')]||undefined,'CampaignId':_0x12be34[_0x3ff4('0xe2')]||undefined})[_0x3ff4('0xa0')](loggerCatch('[rescheduleContact][Abandoned]'));break;case 0x13:if(_0x12be34[_0x3ff4('0x124')]>=_0x33ab7d['dialMachineMaxRetry']-0x1){return!![];}hopperUtils[_0x3ff4('0xff')]({'active':![],'countmachineretry':_0x12be34['countmachineretry']+=0x1,'scheduledat':moment()[_0x3ff4('0xde')](_0x33ab7d[_0x3ff4('0x130')],_0x3ff4('0xdf'))['format'](_0x3ff4('0xcb')),'ContactId':_0x12be34[_0x3ff4('0xed')],'ListId':_0x12be34[_0x3ff4('0xe0')],'VoiceQueueId':_0x12be34['VoiceQueueId']||undefined,'CampaignId':_0x12be34['CampaignId']||undefined})[_0x3ff4('0xa0')](loggerCatch('[rescheduleContact][Machine]'));break;case 0x14:if(_0x12be34[_0x3ff4('0x129')]>=_0x33ab7d[_0x3ff4('0x19e')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countagentrejectretry':_0x12be34[_0x3ff4('0x129')]+=0x1,'scheduledat':moment()[_0x3ff4('0xde')](_0x33ab7d[_0x3ff4('0x19f')],'minutes')[_0x3ff4('0x80')](_0x3ff4('0xcb')),'ContactId':_0x12be34[_0x3ff4('0xed')],'ListId':_0x12be34[_0x3ff4('0xe0')],'VoiceQueueId':_0x12be34['VoiceQueueId']||undefined,'CampaignId':_0x12be34['CampaignId']||undefined})['catch'](loggerCatch('[rescheduleContact][AgentReject]'));break;default:return!![];}};Dialer['prototype'][_0x3ff4('0x10f')]=function(_0x48b122,_0x4feb37,_0x26a4d7){var _0x3c20f5=this;var _0xf82335=new History(_0x48b122);var _0x278c8b=![];var _0x34125b;var _0x3151c5;return new Promise(function(_0x4005cc,_0x165f6a){if(_[_0x3ff4('0x58')](_0x4feb37)&&typeof _0x4feb37!==_0x3ff4('0x1a0')){return _0x165f6a(msgResponse(_0x3ff4('0x1a1'),'Failure',_0x3ff4('0x1a2')));}if(_[_0x3ff4('0x58')](_0x26a4d7)&&typeof _0x26a4d7!==_0x3ff4('0x1a0')){return _0x165f6a(msgResponse('[callProgressDetecting]',_0x3ff4('0x97'),_0x3ff4('0x1a3')));}hopperUtils[_0x3ff4('0xda')](_0xf82335,_0x26a4d7['reason'],_0x4feb37)[_0x3ff4('0x3f')](function(_0x450bd4){if(_0x450bd4[_0x3ff4('0xdb')]==0x1)_0x278c8b=!![];switch(_0x26a4d7[_0x3ff4('0xc6')]){case'0':_0x4feb37[_0x3ff4('0x1a4')]+=0x1;_0xf82335[_0x3ff4('0x74')]=0x0;_0xf82335[_0x3ff4('0xd5')]=_0x3ff4('0x1a5');_0xf82335[_0x3ff4('0x134')]+=0x1;_0xf82335[_0x3ff4('0xd8')]+=0x1;ami['emit']('custom:agentnosuchnumber',ut['buildObj'](_0x48b122,_0x3ff4('0x1a6')));_0x34125b=_0x4feb37[_0x3ff4('0x1a7')];_0x3151c5=_0x4feb37['callAdditionalPhoneAfterMin'];hopperUtils['createHistory'](_0xf82335)[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x125')));if(_0x3c20f5[_0x3ff4('0x194')](0x0,_0x48b122,_0x4feb37)&&!_0x278c8b){if(_0xf82335['countnosuchnumberretry']>=_0x4feb37[_0x3ff4('0x1a8')]){_0x3c20f5[_0x3ff4('0x12e')](_0xf82335,_0x4005cc,_0x165f6a,_0x3ff4('0x1a9'));}else{_0x3c20f5['stateGlobal'](_0xf82335,_0x4005cc,_0x165f6a,_0x3ff4('0x1a9'));}}break;case'3':_0x4feb37['outboundNoAnswerCallsDay']+=0x1;_0xf82335[_0x3ff4('0x74')]=0x3;_0xf82335[_0x3ff4('0xd5')]=_0x3ff4('0x1aa');_0xf82335['countnoanswerretry']+=0x1;_0xf82335['countglobal']+=0x1;var _0x29aa30=ut[_0x3ff4('0x1ab')](_0x48b122,_0x4feb37);ami[_0x3ff4('0x41')](_0x3ff4('0x1ac'),_0x29aa30);_0x34125b=_0x4feb37['dialNoAnswerRetryFrequency'];_0x3151c5=_0x4feb37[_0x3ff4('0x1ad')];hopperUtils[_0x3ff4('0xcc')](_0xf82335)[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x1ae')));if(_0x3c20f5[_0x3ff4('0x194')](0x3,_0x48b122,_0x4feb37)&&!_0x278c8b){if(_0xf82335['countnoanswerretry']>=_0x4feb37[_0x3ff4('0x195')]){_0x3c20f5['createStateFinal'](_0xf82335,_0x4005cc,_0x165f6a,_0x3ff4('0x1af'));}else{_0x3c20f5[_0x3ff4('0x12b')](_0xf82335,_0x4005cc,_0x165f6a,_0x3ff4('0x1af'));}}break;case'5':_0x4feb37[_0x3ff4('0x1b0')]+=0x1;_0xf82335[_0x3ff4('0x74')]=0x5;_0xf82335[_0x3ff4('0xd5')]=_0x3ff4('0x1b1');_0xf82335[_0x3ff4('0x126')]+=0x1;_0xf82335[_0x3ff4('0xd8')]+=0x1;ami[_0x3ff4('0x41')]('custom:agentbusy',ut[_0x3ff4('0x11a')](_0x48b122,_0x3ff4('0x1b2')));_0x34125b=_0x4feb37[_0x3ff4('0x198')];_0x3151c5=_0x4feb37[_0x3ff4('0x1ad')];hopperUtils['createHistory'](_0xf82335)[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x1b3')));if(_0x3c20f5[_0x3ff4('0x194')](0x5,_0x48b122,_0x4feb37)&&!_0x278c8b){if(_0xf82335[_0x3ff4('0x126')]>=_0x4feb37['dialBusyMaxRetry']){_0x3c20f5[_0x3ff4('0x12e')](_0xf82335,_0x4005cc,_0x165f6a,'reason\x205\x20busy');}else{_0x3c20f5[_0x3ff4('0x12b')](_0xf82335,_0x4005cc,_0x165f6a,_0x3ff4('0x1b4'));}}break;case'8':_0x4feb37[_0x3ff4('0x1b5')]+=0x1;_0xf82335[_0x3ff4('0x74')]=0x8;_0xf82335[_0x3ff4('0xd5')]=_0x3ff4('0x1b6');_0xf82335[_0x3ff4('0x127')]+=0x1;_0xf82335['countglobal']+=0x1;_0x34125b=_0x4feb37[_0x3ff4('0x19b')];_0x3151c5=_0x4feb37[_0x3ff4('0x1ad')];ami['emit'](_0x3ff4('0x1b7'),ut[_0x3ff4('0x11a')](_0x48b122,_0x3ff4('0x1b8')));hopperUtils['createHistory'](_0xf82335)[_0x3ff4('0xa0')](loggerCatch('[syncAgentComplete][createHistory][8]'));if(_0x3c20f5['checkRetriveMax'](0x8,_0x48b122,_0x4feb37)&&!_0x278c8b){if(_0xf82335[_0x3ff4('0x127')]>=_0x4feb37[_0x3ff4('0x19a')]){_0x3c20f5[_0x3ff4('0x12e')](_0xf82335,_0x4005cc,_0x165f6a,_0x3ff4('0x1b9'));}else{_0x3c20f5['stateGlobal'](_0xf82335,_0x4005cc,_0x165f6a,_0x3ff4('0x1b9'));}}break;case'11':_0x4feb37[_0x3ff4('0x1ba')]+=0x1;_0xf82335['state']=0xb;_0xf82335[_0x3ff4('0xd5')]='Abandoned';_0xf82335[_0x3ff4('0xea')]+=0x1;_0xf82335['countglobal']+=0x1;_0x34125b=_0x4feb37[_0x3ff4('0xeb')];_0x3151c5=_0x4feb37['callAdditionalPhoneAfterMin'];hopperUtils[_0x3ff4('0xcc')](_0xf82335)[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0xef')));if(_0x3c20f5[_0x3ff4('0x194')](0xb,_0x48b122,_0x4feb37)&&!_0x278c8b){if(_0xf82335['countabandonedretry']>=_0x4feb37[_0x3ff4('0xec')]){_0x3c20f5[_0x3ff4('0x12e')](_0xf82335,_0x4005cc,_0x165f6a,_0x3ff4('0x1bb'));}else{_0x3c20f5[_0x3ff4('0x12b')](_0xf82335,_0x4005cc,_0x165f6a,'reason\x2011\x20abandoned');}}break;case'20':_0x4feb37[_0x3ff4('0x1bc')]+=0x1;_0xf82335[_0x3ff4('0x74')]=0x14;_0xf82335[_0x3ff4('0xd5')]=_0x3ff4('0x1bd');_0xf82335[_0x3ff4('0x129')]+=0x1;_0xf82335[_0x3ff4('0xd8')]+=0x1;_0x34125b=_0x4feb37[_0x3ff4('0x19f')];_0x3151c5=_0x4feb37[_0x3ff4('0x1ad')];ami['emit'](_0x3ff4('0x1be'),ut[_0x3ff4('0x11a')](_0x48b122,_0x3ff4('0x1bf')));hopperUtils[_0x3ff4('0xcc')](_0xf82335)['catch'](loggerCatch(_0x3ff4('0x1c0')));if(_0x3c20f5[_0x3ff4('0x194')](0x14,_0x48b122,_0x4feb37)&&!_0x278c8b){if(_0xf82335[_0x3ff4('0x129')]>=_0x4feb37[_0x3ff4('0x19e')]){_0x3c20f5[_0x3ff4('0x12e')](_0xf82335,_0x4005cc,_0x165f6a,'reason\x2020\x20agentreject');}else{_0x3c20f5[_0x3ff4('0x12b')](_0xf82335,_0x4005cc,_0x165f6a,'reason\x2020\x20agentreject');}}break;default:_0x4feb37[_0x3ff4('0x13d')]+=0x1;_0xf82335[_0x3ff4('0x74')]=0xc;_0xf82335[_0x3ff4('0xd5')]=_0x26a4d7[_0x3ff4('0xc6')];_0x34125b=_0x4feb37[_0x3ff4('0x19f')];_0x3151c5=_0x4feb37['callAdditionalPhoneAfterMin'];hopperUtils['createHistory'](_0xf82335)['catch'](loggerCatch(_0x3ff4('0x1c1')));if(_0x3c20f5['checkRetriveMax'](_0x26a4d7[_0x3ff4('0xc6')],_0x48b122,_0x4feb37)&&!_0x278c8b){if(_0xf82335['countbusyretry']+_0xf82335[_0x3ff4('0x127')]+_0xf82335[_0x3ff4('0x128')]+_0xf82335[_0x3ff4('0x134')]+_0xf82335[_0x3ff4('0xd7')]+_0xf82335['countabandonedretry']+_0xf82335[_0x3ff4('0x124')]+_0xf82335[_0x3ff4('0x129')]>=_0x4feb37[_0x3ff4('0x12a')]){_0x3c20f5[_0x3ff4('0x12b')](_0xf82335,_0x4005cc,_0x165f6a,_0x26a4d7[_0x3ff4('0xc6')]);}else{_0x3c20f5[_0x3ff4('0x12e')](_0xf82335,_0x4005cc,_0x165f6a,_0x26a4d7['reason']);}}}})[_0x3ff4('0x3f')](function(){if(_0x278c8b){hopperUtils[_0x3ff4('0xe6')](_0xf82335,_0x34125b,_0x3151c5)[_0x3ff4('0x3f')](function(){return _0x4005cc(0x1);});}});});};Dialer['prototype'][_0x3ff4('0x12b')]=function(_0x46ddb4,_0x5d1145,_0x94ce4b,_0x4e7464){var _0x48cd98=new Final(_0x46ddb4);_0x48cd98[_0x3ff4('0x74')]=0xf;_0x48cd98[_0x3ff4('0xd5')]=_0x3ff4('0x1c2');this['createStateFinal'](_0x48cd98,_0x5d1145,_0x94ce4b,_0x4e7464);};Dialer[_0x3ff4('0x89')]['createStateFinal']=function(_0x2d48bb,_0xcfb1a9,_0x113616,_0x33a6d2){hopperUtils[_0x3ff4('0xcd')](_0x2d48bb)[_0x3ff4('0x3f')](function(){return _0xcfb1a9(msgResponse('[callProgressDetecting]',_0x3ff4('0x10e'),_0x33a6d2));})[_0x3ff4('0xa0')](function(){return _0x113616(msgResponse(_0x3ff4('0x1c3'),_0x3ff4('0x97'),'contact\x20not\x20moved'));});};Dialer['prototype'][_0x3ff4('0xa')]=function(_0x28d269){var _0x3823d8=_0x28d269[_0x3ff4('0x1c4')]/0x64;var _0x3c0ba6=_0x28d269['outboundDropCallsDayTimeout']/(_0x28d269[_0x3ff4('0xd3')]+_0x28d269[_0x3ff4('0xc5')]);var _0x40e40d=Math['round'](_0x28d269[_0x3ff4('0x1c5')]*(_0x28d269[_0x3ff4('0x1c6')]/0x64));var _0x2a159f=Math[_0x3ff4('0x1c7')](_0x28d269[_0x3ff4('0x1c5')]*(_0x28d269[_0x3ff4('0x1c8')]/0x64));var _0xb45130=_0x28d269['available']+_0x28d269[_0x3ff4('0x144')];var _0x23a4d1=Math[_0x3ff4('0x1c9')](_0x28d269[_0x3ff4('0x5e')]*_0x28d269['erlangAbandonmentRate']*_0x28d269[_0x3ff4('0x1ca')]*_0x28d269[_0x3ff4('0x1cb')]);if(_['isUndefined'](_0x28d269['startProgressive'])){if(!_[_0x3ff4('0x58')](_0x28d269['startPredictive'])){_0x28d269[_0x3ff4('0x28')]=undefined;loggerPredictive[_0x3ff4('0x68')](_0x3ff4('0x1cc'),_0x3ff4('0x1cd'));}if(!_[_0x3ff4('0x58')](_0x28d269[_0x3ff4('0x67')])){loggerPredictive[_0x3ff4('0x68')](_0x3ff4('0x1cc'),_0x3ff4('0x1ce'));clearInterval(_0x28d269[_0x3ff4('0x67')]);_0x28d269[_0x3ff4('0x67')]=undefined;}_0x28d269['startProgressive']=moment()[_0x3ff4('0x80')](_0x3ff4('0xcb'));loggerPredictive[_0x3ff4('0x4a')](_0x28d269[_0x3ff4('0x47')],'collection\x20data\x20in\x20progressive\x20at',_0x28d269[_0x3ff4('0x29')]);this[_0x3ff4('0xb4')](_0x28d269,0x1);}else if(ifInterval(_0x28d269[_0x3ff4('0x1cf')],_0x28d269[_0x3ff4('0x29')])){this[_0x3ff4('0xb4')](_0x28d269,0x1);loggerPredictiveCalls[_0x3ff4('0x4a')](_0x3ff4('0x1d0'),_0x28d269[_0x3ff4('0x29')],_0x28d269[_0x3ff4('0x47')]);_0x28d269['erlangCalls']=0x0;_0x28d269[_0x3ff4('0xd4')]=0x0;}else if(_0x3823d8<_0x3c0ba6&&_0x28d269[_0x3ff4('0x1d1')]===_0x3ff4('0x1d2')){clearPredictiveAttributes(_0x28d269);loggerPredictive['info'](_0x3ff4('0x1d3'),_0x3ff4('0x1d4'),_0x3c0ba6,_0x3ff4('0x29'),_0x28d269[_0x3ff4('0x47')]);}else if(_0x23a4d1<_0x28d269[_0x3ff4('0xd4')]&&_0x28d269[_0x3ff4('0x1d1')]===_0x3ff4('0x1d2')){clearPredictiveAttributes(_0x28d269);loggerPredictive[_0x3ff4('0x4a')](_0x3ff4('0x1d5'),'Max\x20Drop\x20',_0x23a4d1,_0x3ff4('0x1d6'),_0x28d269[_0x3ff4('0xd4')],_0x3ff4('0x29'),_0x28d269[_0x3ff4('0x47')]);}else if(!ifInterval(_0x28d269[_0x3ff4('0x1cf')],_0x28d269[_0x3ff4('0x29')])&&_['isUndefined'](_0x28d269[_0x3ff4('0x28')])&&!_[_0x3ff4('0x58')](_0x28d269['startProgressive'])){_0x28d269[_0x3ff4('0x28')]=moment()[_0x3ff4('0x80')](_0x3ff4('0xcb'));loggerPredictive[_0x3ff4('0x4a')](_0x28d269[_0x3ff4('0x47')],_0x3ff4('0x1d7'),_0x28d269['startPredictive']);hopperUtils[_0x3ff4('0x1d8')](_0x28d269[_0x3ff4('0x1cf')])[_0x3ff4('0x3f')](this[_0x3ff4('0x1d9')](_0x28d269))['then'](mergeDataErlangB(_0x28d269))[_0x3ff4('0x3f')](this[_0x3ff4('0x1da')](_0x28d269))[_0x3ff4('0xa0')](loggerCatchPredictive(_0x3ff4('0x1db'),_0x28d269));}else if(!ifInterval(_0x28d269[_0x3ff4('0x1cf')],_0x28d269['startPredictive'])){_0x28d269[_0x3ff4('0xd4')]=0x0;_0x28d269[_0x3ff4('0x28')]=moment()[_0x3ff4('0x80')](_0x3ff4('0xcb'));loggerPredictive['info'](_0x28d269['name'],'recalculate\x20predictive\x20at',_0x28d269['startPredictive']);clearInterval(_0x28d269[_0x3ff4('0x67')]);_0x28d269[_0x3ff4('0x67')]=undefined;hopperUtils[_0x3ff4('0x1d8')](_0x28d269[_0x3ff4('0x1cf')])[_0x3ff4('0x3f')](this[_0x3ff4('0x1d9')](_0x28d269))[_0x3ff4('0x3f')](mergeDataErlangB(_0x28d269))[_0x3ff4('0x3f')](this[_0x3ff4('0x1da')](_0x28d269))['catch'](loggerCatchPredictive(_0x3ff4('0x1dc'),_0x28d269));}else if(_0x28d269[_0x3ff4('0x1c5')]&&_0xb45130<_0x28d269[_0x3ff4('0x1c5')]-_0x2a159f){clearPredictiveAttributes(_0x28d269);loggerPredictive[_0x3ff4('0x4a')](_0x28d269[_0x3ff4('0x47')],_0x3ff4('0x1dd'),_0xb45130,_0x3ff4('0x1de'),_0x28d269[_0x3ff4('0x1c5')],'-',_0x2a159f,'=',_0x28d269[_0x3ff4('0x1c5')]-_0x2a159f,')');}else if(_0x28d269[_0x3ff4('0x1c5')]&&_0xb45130>_0x28d269['predictiveIntervalAvailable']+_0x40e40d){clearPredictiveAttributes(_0x28d269);loggerPredictive['info'](_0x28d269[_0x3ff4('0x47')],_0x3ff4('0x1dd'),_0xb45130,_0x3ff4('0x1df'),_0x28d269[_0x3ff4('0x1c5')],'+',_0x40e40d,'=',_0x28d269['predictiveIntervalAvailable']+_0x40e40d,')');}};Dialer[_0x3ff4('0x89')][_0x3ff4('0x1d9')]=function(_0x18a69c){var _0x3c2856=this;return function(_0x250b8b){return new Promise(function(_0x504d5b,_0x289006){_[_0x3ff4('0x63')](_0x18a69c,_0x250b8b[0x0]);if(checkGetDataPredictive(_0x250b8b[0x0])){var _0x1d1b6d=_0x18a69c[_0x3ff4('0x1c5')]=_0x18a69c['talking']+_0x18a69c[_0x3ff4('0x1e0')];var _0x1b4cda=_0x18a69c[_0x3ff4('0x1cf')]*0x3c;var _0x132dd2=_0x250b8b[0x0][_0x3ff4('0x55')]+_0x250b8b[0x0][_0x3ff4('0x59')];var _0xdb5722=(_0x250b8b[0x0][_0x3ff4('0x4f')]+_0x250b8b[0x0][_0x3ff4('0xd2')]+_0x250b8b[0x0][_0x3ff4('0x52')])/_0x250b8b[0x0]['predictiveIntervalTotalCalls'];_0x18a69c[_0x3ff4('0x1ca')]=_0xdb5722>0x0?_0xdb5722:0x1;switch(_0x18a69c[_0x3ff4('0x1d1')]){case _0x3ff4('0x1d2'):var _0x57399c=_0x18a69c[_0x3ff4('0x1c4')]/0x64;return _0x3c2856[_0x3ff4('0x1e1')](_0x1d1b6d,_0x1b4cda,_0x132dd2,_0xdb5722,_0x57399c)[_0x3ff4('0x3f')](function(_0x2a93f3){return _0x504d5b(_0x2a93f3);});case'agentBusyFactor':var _0x4f9774=_0x18a69c[_0x3ff4('0x1c4')]/0x64;return _0x3c2856['busyFactor'](_0x1d1b6d,_0x1b4cda,_0x132dd2,_0xdb5722,_0x4f9774)['then'](function(_0x482973){return _0x504d5b(_0x482973);});default:return _0x289006(msgResponse('[getDataPredictive]',_0x3ff4('0x97'),'Unknown\x20Predictive'));}}else{return _0x289006(msgResponse(_0x3ff4('0x1e2'),_0x3ff4('0x97'),_0x3ff4('0x1e3')));}});};};Dialer['prototype'][_0x3ff4('0x1e4')]=function(_0x2cb47f){var _0x2b2d2e=this;return function(_0x2066ff){return new Promise(function(_0x8a14d4,_0x4eac48){_[_0x3ff4('0x63')](_0x2cb47f,_0x2066ff[0x0]);if(checkGetDataPredictive(_0x2066ff[0x0])){loggerPredictive['info'](JSON[_0x3ff4('0x79')](_0x2066ff[0x0]));if(_0x2cb47f[_0x3ff4('0x1d1')]===_0x3ff4('0x1d2')){return _0x2b2d2e[_0x3ff4('0x159')](_0x2cb47f['id'])[_0x3ff4('0x3f')](function(_0x51d4dc){var _0x48230c=_0x2cb47f['loggedIn']-_0x51d4dc[0x0][_0x3ff4('0x1e5')];var _0x4b21c6=_0x2cb47f[_0x3ff4('0x1cf')]*0x3c;var _0xe794a5=_0x2066ff[0x0][_0x3ff4('0x55')]+_0x2066ff[0x0][_0x3ff4('0x59')];var _0x2f5a63=(_0x2066ff[0x0][_0x3ff4('0x4f')]+_0x2066ff[0x0][_0x3ff4('0xd2')]+_0x2066ff[0x0][_0x3ff4('0x52')])/_0x2066ff[0x0][_0x3ff4('0x4d')];var _0x13addd=_0x2cb47f[_0x3ff4('0x1c4')]/0x64;_0x2cb47f[_0x3ff4('0x1e6')]=_0x51d4dc[0x0][_0x3ff4('0x1e5')]||0x0;_0x2cb47f[_0x3ff4('0x1ca')]=_0x2f5a63>0x0?_0x2f5a63:0x1;return _0x2b2d2e[_0x3ff4('0x1e1')](_0x48230c,_0x4b21c6,_0xe794a5,_0x2f5a63,_0x13addd);})[_0x3ff4('0x3f')](function(_0x241751){return _0x8a14d4(_0x241751);})['catch'](function(_0x16219a){return _0x4eac48(msgResponse(_0x3ff4('0x1e7'),_0x3ff4('0x97'),JSON[_0x3ff4('0x79')](_0x16219a)));});}if(_0x2cb47f[_0x3ff4('0x1d1')]===_0x3ff4('0x1e8')){return _0x2b2d2e[_0x3ff4('0x159')](_0x2cb47f['id'])[_0x3ff4('0x3f')](function(_0x38bbb4){var _0x3cbf71=_0x2cb47f[_0x3ff4('0x1e9')]-_0x38bbb4[0x0][_0x3ff4('0x1e5')];var _0x4b68eb=_0x2cb47f[_0x3ff4('0x1cf')]*0x3c;var _0x39b07b=_0x2066ff[0x0][_0x3ff4('0x55')]+_0x2066ff[0x0][_0x3ff4('0x59')];var _0x4d4284=(_0x2066ff[0x0]['predictiveIntervalAnsweredCalls']+_0x2066ff[0x0]['predictiveIntervalDroppedCallsTimeout']+_0x2066ff[0x0][_0x3ff4('0x52')])/_0x2066ff[0x0][_0x3ff4('0x4d')];var _0x2552f5=_0x2cb47f[_0x3ff4('0x1c4')]/0x64;_0x2cb47f[_0x3ff4('0x1e6')]=_0x38bbb4[0x0][_0x3ff4('0x1e5')]||0x0;_0x2cb47f[_0x3ff4('0x1ca')]=_0x4d4284>0x0?_0x4d4284:0x1;return _0x2b2d2e[_0x3ff4('0x1ea')](_0x3cbf71,_0x4b68eb,_0x39b07b,_0x4d4284,_0x2552f5);})[_0x3ff4('0x3f')](function(_0x4de59b){return _0x8a14d4(_0x4de59b);})[_0x3ff4('0xa0')](function(_0x51cf69){return _0x4eac48(msgResponse('[CatchErlangB]','Failure',JSON[_0x3ff4('0x79')](_0x51cf69)));});}}else{return _0x4eac48(msgResponse('[getDataPredictive]',_0x3ff4('0x97'),_0x3ff4('0x1e3')));}});};};Dialer[_0x3ff4('0x89')][_0x3ff4('0x1da')]=function(_0x573751){var _0x4b013e=this;return function(){var _0x214360=0x0;var _0x83e0b8=Math[_0x3ff4('0x1c9')](_0x573751[_0x3ff4('0x1eb')]*0x3e8);if(_0x83e0b8>0x0){_0x83e0b8=_0x83e0b8<0x64?0x64:_0x83e0b8;loggerPredictive[_0x3ff4('0x4a')](_0x573751[_0x3ff4('0x47')],_0x3ff4('0x1ec'),_0x83e0b8,'milliseconds');_0x573751[_0x3ff4('0x67')]=setInterval(function(){_0x4b013e[_0x3ff4('0x67')](_0x573751);loggerPredictiveCalls['info']('[handlePredictive]',_0x214360+=0x1);},_0x83e0b8);}else{loggerPredictive[_0x3ff4('0x4a')](_0x573751[_0x3ff4('0x47')],_0x3ff4('0x1ed'));}};};Dialer[_0x3ff4('0x89')][_0x3ff4('0x1ee')]=function(_0x1f40f1,_0x5e3de9){var _0x222096=this;return function(_0x447ea6){if(_[_0x3ff4('0x49')](_0x447ea6)){if(_['isNil'](_0x5e3de9['UserId'])||!_0x5e3de9[_0x3ff4('0x1ef')]){if(_0x1f40f1[_0x3ff4('0x1f0')]==='booked'){_0x1f40f1[_0x3ff4('0x77')]=_[_0x3ff4('0x58')](_0x1f40f1['queueStatusComplete'])?!![]:_0x1f40f1[_0x3ff4('0x77')];var _0x5323eb=uuid['v4']();_0x222096[_0x3ff4('0xf0')][_0x5323eb]=new Action(_0x1f40f1,_0x5e3de9,_0x5323eb);loggerBooked[_0x3ff4('0x4a')](_0x3ff4('0x1f1'),_0x5323eb,_0x3ff4('0x1f2'),JSON[_0x3ff4('0x79')](_0x1f40f1[_0x3ff4('0x77')]),'Queue:\x20',_0x1f40f1[_0x3ff4('0x47')]);if(_0x1f40f1[_0x3ff4('0x77')]){_0x1f40f1[_0x3ff4('0x77')]=![];_0x222096[_0x3ff4('0xf9')][_0x222096[_0x3ff4('0xf0')][_0x5323eb][_0x3ff4('0xc3')]]=[];ami['Action']({'actionid':_0x5323eb,'action':_0x3ff4('0x1f3'),'queue':_0x1f40f1['name']})[_0x3ff4('0xa0')](function(){_0x222096[_0x3ff4('0xce')](_0x1f40f1);hopperUtils['rescheduleContact']({'active':![],'ContactId':_0x222096['actions'][_0x5323eb][_0x3ff4('0xed')],'ListId':_0x222096[_0x3ff4('0xf0')][_0x5323eb][_0x3ff4('0xe0')],'VoiceQueueId':_0x222096[_0x3ff4('0xf0')][_0x5323eb][_0x3ff4('0xe1')]||undefined,'CampaignId':_0x222096[_0x3ff4('0xf0')][_0x5323eb][_0x3ff4('0xe2')]||undefined})[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x1f4')));delete _0x222096[_0x3ff4('0xf0')][_0x5323eb];});}else{loggerBooked[_0x3ff4('0x4a')](_0x3ff4('0x1f5'),JSON['stringify'](_0x1f40f1[_0x3ff4('0x77')]),_0x3ff4('0x1f6'),_0x1f40f1[_0x3ff4('0x47')]);_0x222096[_0x3ff4('0xce')](_0x1f40f1);hopperUtils['rescheduleContact']({'active':![],'ContactId':_0x222096[_0x3ff4('0xf0')][_0x5323eb][_0x3ff4('0xed')],'ListId':_0x222096[_0x3ff4('0xf0')][_0x5323eb][_0x3ff4('0xe0')],'VoiceQueueId':_0x222096[_0x3ff4('0xf0')][_0x5323eb][_0x3ff4('0xe1')]||undefined,'CampaignId':_0x222096[_0x3ff4('0xf0')][_0x5323eb][_0x3ff4('0xe2')]||undefined})[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x1f4')));delete _0x222096[_0x3ff4('0xf0')][_0x5323eb];}}else{return _0x222096[_0x3ff4('0x1f7')](_0x1f40f1,_0x5e3de9);}}else{if(utils[_0x3ff4('0x64')](undefined,_0x5e3de9[_0x3ff4('0x1f8')])<_0x1f40f1[_0x3ff4('0x1f9')]*0x3c){if(_0x5e3de9['Agent']&&!_0x5e3de9['Agent'][_0x3ff4('0x1fa')]){_0x222096[_0x3ff4('0x1f')][_0x3ff4('0xfd')](_0x5e3de9['id'])[_0x3ff4('0x1e')](function(){_0x222096[_0x3ff4('0xce')](_0x1f40f1);});}else{hopperUtils['unlockContact']({'active':![]},_0x5e3de9['id'],0x1)[_0x3ff4('0x1e')](function(){_0x222096[_0x3ff4('0xce')](_0x1f40f1);});}}else{_0x1f40f1[_0x3ff4('0x1fb')]+=0x1;_0x222096[_0x3ff4('0xce')](_0x1f40f1);if(_0x1f40f1[_0x3ff4('0x1fc')]){hopperUtils[_0x3ff4('0xff')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x5e3de9[_0x3ff4('0xed')],'ListId':_0x5e3de9[_0x3ff4('0xe0')],'VoiceQueueId':_0x5e3de9[_0x3ff4('0xe1')]||undefined,'CampaignId':_0x5e3de9[_0x3ff4('0xe2')]||undefined})['catch'](loggerCatch(_0x3ff4('0x1fd')));hopperUtils[_0x3ff4('0xcc')](createObjHistory(_0x1f40f1,_0x5e3de9,utils[_0x3ff4('0x6e')][_0x3ff4('0x1fe')],0x17,'RecallInQueue'))[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x1ff')));}else{_0x222096[_0x3ff4('0x11c')](createObjHistory(_0x1f40f1,_0x5e3de9,utils[_0x3ff4('0x6e')][_0x3ff4('0x200')],0x16,_0x3ff4('0x201')),_0x3ff4('0x202'),_0x3ff4('0x203'));}}}}else{_0x1f40f1[_0x3ff4('0x204')]+=0x1;_0x222096[_0x3ff4('0x11c')](createObjHistory(_0x1f40f1,_0x5e3de9,utils[_0x3ff4('0x6e')][_0x3ff4('0x205')],0xd,_0x3ff4('0x206')),_0x3ff4('0x207'),_0x3ff4('0x208'));throw'inBlackList';}};};Dialer[_0x3ff4('0x89')]['handleIvr']=function(_0x3c1ac3){var _0x2c14ae=this;var _0x1f166a=_0x3c1ac3[_0x3ff4('0x209')]-_0x3c1ac3[_0x3ff4('0x15b')];emitCampaignSummary(_0x3c1ac3);if(_0x1f166a>0x0&&_0x3c1ac3[_0x3ff4('0x6b')]==0x0){if(_0x1f166a>this[_0x3ff4('0x24')]){_0x1f166a=this[_0x3ff4('0x24')];}_0x3c1ac3[_0x3ff4('0x6b')]=0x1;hopperUtils[_0x3ff4('0x20a')](_0x3c1ac3,_0x1f166a)[_0x3ff4('0x3f')](function(_0x4fc1f0){_0x3c1ac3[_0x3ff4('0x6b')]=0x0;if(_0x4fc1f0){if(!utils['checkContactEmpty'](_0x4fc1f0)){_0x3c1ac3[_0x3ff4('0x6d')]=utils['CAMPAIGN_STATUS'][_0x3ff4('0x72')];logger['info'](_0x3ff4('0x20b')+_0x3c1ac3[_0x3ff4('0x47')]);}else{_0x3c1ac3[_0x3ff4('0x15b')]+=_0x4fc1f0[_0x3ff4('0x9c')];_0x3c1ac3[_0x3ff4('0x6d')]=utils[_0x3ff4('0x6e')][_0x3ff4('0x20c')];for(var _0x375c02=0x0;_0x375c02<_0x4fc1f0[_0x3ff4('0x9c')];_0x375c02+=0x1){_0x3c1ac3['ivrTotalCallsDays']+=0x1;if(_['isNil'](_0x4fc1f0[_0x375c02])||_[_0x3ff4('0x106')](_0x4fc1f0[_0x375c02]['Contact'])||_[_0x3ff4('0x106')](_0x4fc1f0[_0x375c02][_0x3ff4('0x164')])){_0x2c14ae[_0x3ff4('0x15e')](_0x3ff4('0x20d'),_0x3c1ac3,_0x4fc1f0[_0x375c02]);}else{hopperUtils[_0x3ff4('0x20e')](_[_0x3ff4('0xfa')](_0x4fc1f0[_0x375c02],[_0x3ff4('0xe2'),_0x3ff4('0x164')]))['then'](_0x2c14ae[_0x3ff4('0x1ee')](_0x3c1ac3,_0x4fc1f0[_0x375c02]))[_0x3ff4('0xa0')](_0x2c14ae[_0x3ff4('0x15d')](_0x3ff4('0x20f'),_0x3c1ac3));}}}}})[_0x3ff4('0xa0')](loggerGetContactDialer('[getContactCampaign2]',_0x3c1ac3,_0x1f166a));}};Dialer[_0x3ff4('0x89')][_0x3ff4('0xb4')]=function(_0x18306c,_0x506c85){var _0x31d7a4=this;var _0x396944=[];if(_0x506c85<0x1||_0x18306c[_0x3ff4('0x1f0')]===_0x3ff4('0x9')){_0x506c85=0x1;}var _0x1de21f=Math['floor'](_0x18306c['available']*_0x506c85)-_0x18306c[_0x3ff4('0x15b')];if(_0x18306c[_0x3ff4('0x210')]>0x0){var _0x3e0c37=_0x18306c[_0x3ff4('0x210')]-_0x18306c[_0x3ff4('0x15b')]-_0x18306c[_0x3ff4('0x144')]-_0x18306c[_0x3ff4('0x145')];if(_0x1de21f>_0x3e0c37){_0x1de21f=_0x3e0c37;}}if(_0x1de21f>0x0&&_0x18306c['temp']==0x0){if(_0x18306c[_0x3ff4('0x1f0')]==='booked'){_0x1de21f=0x1;}if(_0x1de21f>this[_0x3ff4('0x24')]){_0x1de21f=this[_0x3ff4('0x24')];}for(var _0x1893de in this[_0x3ff4('0x22')]){if(typeof this['agents'][_0x1893de]!=='undefined'){if(this[_0x3ff4('0x22')][_0x1893de][_0x3ff4('0x74')]===_0x3ff4('0x211')&&this['agents'][_0x1893de][_0x3ff4('0x8d')]===_0x3ff4('0x8c')){_0x396944['push'](this[_0x3ff4('0x22')][_0x1893de]['id']);}}}_0x18306c[_0x3ff4('0x6b')]=0x1;hopperUtils['getContactDialer'](_0x18306c,_0x396944,_0x1de21f)[_0x3ff4('0x3f')](function(_0x3ddb32){_0x18306c[_0x3ff4('0x6b')]=0x0;if(_0x3ddb32){if(!utils[_0x3ff4('0x212')](_0x3ddb32)){hopperUtils[_0x3ff4('0x213')](_0x18306c)[_0x3ff4('0x3f')](sendMessageReschedule(_0x18306c))[_0x3ff4('0xa0')](loggerCatch('[countReScheduled]\x20'));}else{_0x18306c[_0x3ff4('0x15b')]+=_0x3ddb32['length'];_0x18306c[_0x3ff4('0x6d')]=_0x18306c[_0x3ff4('0x1f0')]===_0x3ff4('0x9')?utils[_0x3ff4('0x6e')][_0x3ff4('0x16b')]:utils['CAMPAIGN_STATUS']['RUNNING'];for(var _0x5a69ac=0x0;_0x5a69ac<_0x3ddb32[_0x3ff4('0x9c')];_0x5a69ac+=0x1){if(_[_0x3ff4('0x106')](_0x3ddb32[_0x5a69ac])||_[_0x3ff4('0x106')](_0x3ddb32[_0x5a69ac]['Contact'])||_[_0x3ff4('0x106')](_0x3ddb32[_0x5a69ac][_0x3ff4('0x164')])){_0x31d7a4['emptyContact'](_0x3ff4('0x20d'),_0x18306c,_0x3ddb32[_0x5a69ac]);}else{hopperUtils['checkIsBlackList'](_[_0x3ff4('0xfa')](_0x3ddb32[_0x5a69ac],[_0x3ff4('0xe1'),_0x3ff4('0x164')]))['then'](_0x31d7a4[_0x3ff4('0x1ee')](_0x18306c,_0x3ddb32[_0x5a69ac]))[_0x3ff4('0xa0')](_0x31d7a4[_0x3ff4('0x15d')]('[actionOriginate]\x20',_0x18306c));}}}}})[_0x3ff4('0xa0')](loggerGetContactDialer(_0x3ff4('0x214'),_0x18306c,_0x1de21f));}};Dialer[_0x3ff4('0x89')][_0x3ff4('0x67')]=function(_0x5fe55){if(_0x5fe55[_0x3ff4('0x210')]>0x0){var _0x18e04e=_0x5fe55[_0x3ff4('0x210')]-_0x5fe55[_0x3ff4('0x15b')]-_0x5fe55[_0x3ff4('0x144')];if(_0x18e04e>0x0&&_0x5fe55[_0x3ff4('0x6b')]==0x0){this[_0x3ff4('0x215')](_0x5fe55);}else{loggerPredictiveCalls[_0x3ff4('0x4a')](_0x3ff4('0x216'));}}else{this[_0x3ff4('0x215')](_0x5fe55);}};Dialer['prototype'][_0x3ff4('0x215')]=function(_0x3ca437){var _0x1bb032=this;var _0x59d445=[];_0x3ca437[_0x3ff4('0x15b')]+=0x1;for(var _0x4c2305 in this[_0x3ff4('0x22')]){if(typeof this['agents'][_0x4c2305]!==_0x3ff4('0xab')){if(this['agents'][_0x4c2305][_0x3ff4('0x74')]===_0x3ff4('0x211')&&this['agents'][_0x4c2305][_0x3ff4('0x8d')]==='reachable'){_0x59d445['push'](this[_0x3ff4('0x22')][_0x4c2305]['id']);}}}_0x3ca437[_0x3ff4('0x6b')]=0x1;return this[_0x3ff4('0x217')](_0x3ca437['id'],_0x59d445,0x1,_0x3ca437[_0x3ff4('0x218')],_0x3ca437)[_0x3ff4('0x3f')](function(_0x49881d){_0x3ca437['temp']=0x1;if(_0x49881d){if(!utils[_0x3ff4('0x212')](_0x49881d)){utils[_0x3ff4('0x6a')](_0x3ca437,0x1,0x0);return hopperUtils[_0x3ff4('0x213')](_0x3ca437)[_0x3ff4('0x3f')](sendMessageReschedule(_0x3ca437))[_0x3ff4('0xa0')](loggerCatch(_0x3ff4('0x219')));}else{_0x3ca437[_0x3ff4('0x6d')]=utils[_0x3ff4('0x6e')][_0x3ff4('0x20c')];if(_[_0x3ff4('0x106')](_0x49881d[0x0])||_[_0x3ff4('0x106')](_0x49881d[0x0][_0x3ff4('0x17d')])||_['isNil'](_0x49881d[0x0][_0x3ff4('0x164')])){_0x1bb032['emptyContact']('[actionOriginate]\x20',_0x3ca437,_0x49881d[0x0]);}else{return hopperUtils[_0x3ff4('0x21a')](_['pick'](_0x49881d[0x0],[_0x3ff4('0xe1'),_0x3ff4('0x164')]))[_0x3ff4('0x3f')](_0x1bb032[_0x3ff4('0x1ee')](_0x3ca437,_0x49881d[0x0]))[_0x3ff4('0xa0')](_0x1bb032[_0x3ff4('0x15d')](_0x3ff4('0x21b'),_0x3ca437));}}}})[_0x3ff4('0xa0')](loggerGetContactDialer(_0x3ff4('0x21c'),_0x3ca437,0x1));};Dialer[_0x3ff4('0x89')]['abandonmentRate']=function(_0x5818ce,_0x3b568f,_0x250ff4,_0x4f1bdf,_0x173602,_0x4b05c3){loggerPredictive[_0x3ff4('0x4a')]('--------\x20Drop\x20Rate\x20--------');loggerPredictive[_0x3ff4('0x4a')](_0x3ff4('0x21d'),_0x5818ce);loggerPredictive[_0x3ff4('0x4a')](_0x3ff4('0x21e'),_0x3b568f);loggerPredictive[_0x3ff4('0x4a')]('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',_0x250ff4);loggerPredictive['info'](_0x3ff4('0x21f'),_0x4f1bdf);loggerPredictive['info'](_0x3ff4('0x220'),_0x173602);loggerPredictive[_0x3ff4('0x4a')](_0x3ff4('0x56'));return new Promise(function(_0x31c3f8,_0x5d41e5){if(_0x5818ce<=0x0||isNaN(_0x5818ce)){return _0x5d41e5(msgResponse(_0x3ff4('0x221'),'Error',_0x3ff4('0x222')+_0x5818ce));}if(_0x250ff4<=0x0||isNaN(_0x250ff4)){return _0x5d41e5(msgResponse(_0x3ff4('0x221'),_0x3ff4('0xc0'),_0x3ff4('0x223')+_0x250ff4));}if(_0x4f1bdf<=0x0||isNaN(_0x4f1bdf)){return _0x5d41e5(msgResponse(_0x3ff4('0x221'),'Error',_0x3ff4('0x224')+_0x4f1bdf));}if(_0x3b568f<=0x0||isNaN(_0x3b568f)){return _0x5d41e5(msgResponse('[abandonmentRate]','Error',_0x3ff4('0x225')+_0x3b568f));}if(_0x173602<=0x0||isNaN(_0x173602)){return _0x5d41e5(msgResponse(_0x3ff4('0x221'),_0x3ff4('0xc0'),_0x3ff4('0x226')+_0x173602));}_0x4b05c3=_0x4b05c3||0x0;var _0x5e3e77=0x1/_0x250ff4;var _0x192735=0x0;var _0x368f7b=0x0;var _0x2fa447=0x0;var _0x18b9c4=0x0;for(var _0x38a92f=0x0;_0x2fa447<_0x173602;_0x38a92f+=0x1){_0x368f7b=_0x38a92f/_0x3b568f;_0x192735=(_0x4f1bdf*_0x368f7b+_0x4b05c3)/_0x5e3e77;_0x2fa447=utils[_0x3ff4('0x227')](_0x192735,_0x5818ce);_0x18b9c4=_0x192735/_0x5818ce*(0x1-utils[_0x3ff4('0x227')](_0x192735,_0x5818ce));}return _0x31c3f8({'erlangCalls':_0x38a92f,'erlangCallToSecond':_0x3b568f/_0x38a92f,'erlangAbandonmentRate':_0x2fa447,'erlangBusyFactor':_0x18b9c4});});};Dialer[_0x3ff4('0x89')][_0x3ff4('0x1ea')]=function(_0x5c12a0,_0x35c72d,_0x49a568,_0x147ad5,_0x4b81bf,_0x1219dd){loggerPredictive[_0x3ff4('0x4a')]('----\x20Agent\x20Busy\x20Factor\x20----');loggerPredictive[_0x3ff4('0x4a')](_0x3ff4('0x21d'),_0x5c12a0);loggerPredictive[_0x3ff4('0x4a')]('Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x35c72d);loggerPredictive[_0x3ff4('0x4a')]('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',_0x49a568);loggerPredictive[_0x3ff4('0x4a')](_0x3ff4('0x21f'),_0x147ad5);loggerPredictive['info']('Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x4b81bf);loggerPredictive[_0x3ff4('0x4a')](_0x3ff4('0x56'));return new Promise(function(_0x58b4e0,_0x2bee29){if(_0x5c12a0<=0x0||isNaN(_0x5c12a0)){return _0x2bee29(msgResponse(_0x3ff4('0x228'),_0x3ff4('0xc0'),_0x3ff4('0x222')+_0x5c12a0));}if(_0x49a568<=0x0||isNaN(_0x49a568)){return _0x2bee29(msgResponse(_0x3ff4('0x228'),_0x3ff4('0xc0'),_0x3ff4('0x223')+_0x49a568));}if(_0x147ad5<=0x0||isNaN(_0x147ad5)){return _0x2bee29(msgResponse(_0x3ff4('0x228'),'Error',_0x3ff4('0x224')+_0x147ad5));}if(_0x35c72d<=0x0||isNaN(_0x35c72d)){return _0x2bee29(msgResponse(_0x3ff4('0x228'),_0x3ff4('0xc0'),_0x3ff4('0x225')+_0x35c72d));}if(_0x4b81bf<=0x0||isNaN(_0x4b81bf)){return _0x2bee29(msgResponse(_0x3ff4('0x228'),'Error',_0x3ff4('0x229')+_0x4b81bf));}_0x1219dd=_0x1219dd||0x0;var _0x4b2a9d=0x1/_0x49a568;var _0x213f0f=0x0;var _0x396440=0x0;var _0x1c6958=0x0;var _0x5ba26f=0x0;for(var _0x1e8733=0x0;_0x5ba26f<_0x4b81bf;_0x1e8733+=0x1){_0x396440=_0x1e8733/_0x35c72d;_0x213f0f=(_0x147ad5*_0x396440+_0x1219dd)/_0x4b2a9d;_0x1c6958=utils['erlangb'](_0x213f0f,_0x5c12a0);_0x5ba26f=_0x213f0f/_0x5c12a0*(0x1-utils[_0x3ff4('0x227')](_0x213f0f,_0x5c12a0));}return _0x58b4e0({'erlangCalls':_0x1e8733,'erlangCallToSecond':_0x35c72d/_0x1e8733,'erlangAbandonmentRate':_0x1c6958,'erlangBusyFactor':_0x5ba26f});});};module[_0x3ff4('0x22a')]=Dialer;
\ No newline at end of file