14f56e40382b12b99a6a450a53b0759c9d677d95
[motion2.git] / server / services / ami / dialer / index.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x9a61=['object','originate','voiceQueue\x20is\x20undefine','phone','\x22agi://%s/square,%s\x22','NONE','dialQueueProject2','\x22%s,%s%s,,,%s\x22','dialQueueOptions','dialQueueTimeout','XMD-AMDGREETING','XMD-AMDAFTERGREETINGSILENCE','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','XMD-AMDMINWORDLENGTH','dialAMDMinWordLength','XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','dialAMDMaximumWordLength','isOutboundQueue','XMD-VOICEQUEUEID','XMD-CAMPAIGNID','Contact','tags','createdAt','updatedAt','%s%s','XMD-','toUpper','callerid','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','dialOriginateCallerIdNumber','getCallerId','XMD-ORIGINATECALLERIDNAME','originatecalleridname','extractCalleridName','XMD-ORIGINATECALLERIDNUM','SIP/%s/%s%s','dialPrefix','trim','dialCutDigit','from-sip','dialOriginateTimeout','outboundOriginateFailureCallsDay','[originateError]:\x20%s','OriginateError','[originate][error]','originate\x20action\x20Error','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','[rescheduleContact][NoAnswer]','dialBusyMaxRetry','dialBusyRetryFrequency','dialCongestionMaxRetry','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberRetryFrequency','[rescheduleContact][NoSuchNumber]','dialDropMaxRetry','[rescheduleContact][Abandoned]','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','[rescheduleContact][AgentReject]','[callProgressDetecting]','evt\x20is\x20undefine','outboundNoSuchCallsDay','NoSuchNumber','custom:agentnosuchnumber','nosuchnumber','checkRetriveMax','dialNoSuchNumberMaxRetry','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','buildNoAnswerEventPayload','[syncAgentComplete][createHistory][3]','reason\x203\x20ringing\x20no\x20answer','outboundBusyCallsDay','custom:agentbusy','busy','reason\x205\x20busy','Congestion','custom:agentcongestion','congestion','[syncAgentComplete][createHistory][8]','reason\x208\x20congestion','outboundAbandonedCallsDay','[syncAgentComplete][createHistory][11]','reason\x2011\x20abandoned','outboundRejectCallsDay','AgentReject','agentreject','[syncAgentComplete][createHistory][20]','reason\x2020\x20agentreject','[syncAgentComplete][createHistory][?]','Global','Success','[moveContactManagedDialer][0]','dialPredictiveOptimizationPercentage','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','floor','predictiveIntervalHitRate','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','dialPredictiveInterval','dialPredictiveOptimization','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day','Max\x20Drop\x20','Drop\x20in\x20this\x20interval','started\x20in\x20predictive\x20at','getDataPredictive','startMethodPredictive','recalculate\x20predictive\x20at','avgHandleTime','Predictive\x20for\x20every\x20interval','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20more\x20than\x20threshold\x20(','predictiveIntervalAnsweredCalls','predictiveIntervalTotalCalls','abandonmentRate','agentBusyFactor','busyFactor','Unknown\x20Predictive','[getDataPredictive]','check\x20failure','loggedIn','outboundQueuePauses','predictiveIntervalPauses','[CatchErlangB]','one\x20call\x20every:','milliseconds','[handlePredictive]','fail\x20to\x20scheduled\x20calls','checkContactBlack','recallme','[booked][checkContactBlack]','Queue:\x20','queuestatus','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','scheduledat','dialRecallMeTimeout','voicePause','unlockContact','outboundReCallsDay','[Originate][HistoryDialRecallInQueue][historyCatch]','RECALL_TIMEOUT','[Originate][HistoryRecallClose]','outboundBlacklistCallsDay','Blacklist','limitCalls','temp','getContactDialerIvr','dialOrderByScheduledAt','checkContactEmpty','[getContactCampaign2][Empty]','RUNNING','ivrTotalCallsDays','emptyContact','[actionOriginate]\x20','checkIsBlackListIvr','loggerHandler','[actionOriginateIvr]\x20','dialLimitQueue','not_inuse','[countReScheduled]\x20','checkIsBlackList','[getContactDialer2]','[handlePredictive][limitChannel]','tryOriginatePredictive','countReScheduled','[getContactDialerPredictive]','--------\x20Drop\x20Rate\x20--------','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','m\x20=\x20','[abandonmentRate]','Ts\x20=\x20','p\x20=\x20','interval\x20=\x20','Amax\x20=\x20','erlangb','----\x20Agent\x20Busy\x20Factor\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','Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[busyFactor]','exports','util','lodash','uuid','moment','ioredis','./utils/hopper','../preview/util/util','../../../config/environment/','../../../config/logger','dialer','predictive','syncQueueSummary','redis','defaults','localhost','socket.io-emitter','../rpc/voiceQueueRt','../rpc/setting','../rpc/interval','./models/action','./models/final','./models/agentComplete','./models/hangup','enqueue','tail','finally','sequence','preview','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','channels','actions','contactsId','uniqueId','optionPredictive','startPredictive','ivrOriginated','queueBookedRR','queuesSummary','bind','queuecallerabandon','agentcomplete','syncAgentComplete','custom:queuesummary','custom:queuesummarycomplete','syncQueueSummaryComplete','syncHangup','syncNewExten','varset','syncQueueMember','queuestatuscomplete','loopCampaigns','loopClearZombieChannels','getSettings','then','previewRecallmeReminderInterval','emit','type','outbound','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','inspect','format','voice:queue:%s','-----\x20Stats\x20Predictive\x20---','info','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsTimeout','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsCallersExit','AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgHoldtime','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','---------------------------','isUndefined','predictiveIntervalAvgTalktime','Avg\x20Talk\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','erlangCallToSecond','erlangAbandonmentRate','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangBusyFactor','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','merge','getSeconds','startProgressive','debug','name','startProgressive\x20value\x20cleared','handlePredictive','handlePredictive\x20interval\x20cleared','error','stack','checkContactLowerLimitOriginate','contactsRescheduled','message','CAMPAIGN_STATUS','CONTACTS_RESCHEDULED','[getContactDialer2][ReScheduled]','NO_AVAILABLE_CONTACTS','[getContactDialer2][Empty]','state','queueStatusComplete','[unlockQueueStatus][undefined]','[booked][unlockQueueStatus]','stringify','Interval','NULL_INTERVAL','\x20INTERVAL_IS_NULL','isEmpty','isIVRCampaignActive','INACTIVE','campaign:ivr:%s','sendMessageOneNotActive','originated','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','DISACTIVED','is\x20disactive','[ifTime][Action]','prototype','isTrunkReachable','active','SIP/%s','status','reachable','unmonitored','checkIsTrunkReachable','Trunk','TrunkBackup','TRUNK_NOT_REACHABLE','\x20trunk\x20is\x20not\x20reachable','ifTimeIvr','checkIfTimeIntervals','Intervals','ifTime','Failure','\x20Intervals\x20is\x20empty\x20','timezones','UNKNOWN_TIMEZONE','\x20Timezone\x20unknow\x20','isArray','length','push','Action','command','interval','content','indexOf','true','catch','iftime\x20%s,%s','all','some','OVERTIME_GLOBAL_INTERVAL','\x20Interval\x20is\x20overtime:\x20','Timezone:\x20','resetActiveCalls','syncCampaigns','undefined','isIVRCampaign','dialGlobalInterval','dialTimezone','launchHandleIvr','[syncCampaigns]','checkDialMethod','dialMethod','progressive','handlePower','dialPowerLevel','booked','method\x20not\x20recognized','silly','Dialer::ifTime()','Voice\x20Queue\x20%s\x20$s','intervalIftime','Global:\x20','Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:','isGlobal','AMI\x20IfTime','Error','syncAgentConnect','queue','uniqueid','ivr','updateOriginated','YYYY-MM-DD\x20HH:mm:ss','reason','agent','agiafterat','dialAgiAfterHangupAgent','createHistory','[syncAgentComplete][createHistory]','moveContactManagedDialer','[syncAgentComplete]','droptime','outboundDropCallsDayTimeout','predictiveIntervalErlangCallsDroppedCalls','statedesc','Drop','dropreason','TIMEOUT','callAdditionalPhoneAfterMin','voiceQueue','additional','queueCallerAbandonCreateState','rescheduleContact','countdropretry','dialDropRetryFrequency','minutes','ContactId','ListId','VoiceQueueId','CampaignId','[rescheduleContact][Drop]','starttime','endtime','calleridname','calleridnum','[syncAgentComplete][createHistory][10]','swapAdditionalPhones','outboundDropCallsDayCallersExit','Abandoned','CALLEREXIT','countabandonedretry','dialAbandonedRetryFrequency','verifyAdditionalPhones','dialAbandonedMaxRetry','add','channel','actionid','strategy','rrmemory','roundrobin','isNil','stateinterface','locked','queueBooked','pick','paused','syncQueueStatusComplete','run','idHopper','[Catch][Preview][syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','_rr','unlockRR','contactAgent-idHopper:\x20','[booked][RR][finaly]','Agent:\x20','[booked][unlock]','[unlock2][syncQueueStatusComplete]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','responsetime','getQueue','response','callProgressDetecting','[callProgressDetecting]\x20','variable','amdstatus','exten','xcally-motion-dialer','dialAMDActive','value','outboundAnswerCallsDay','outboundAnswerAgiCallsDay','AMD','custom:amd','buildObj','saveInDb','[syncHangupInAMD][createHistory]','Machine','countmachineretry','countglobal','amd','[syncAgentComplete][createHistory][0]','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','dialGlobalMaxRetry','stateGlobal','dialMachineMaxRetry','dialMachineRetryFrequency','[rescheduleContact][Machine]','HangupInAMD','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','MACHINE','membername','countagentrejectretry','reason19\x20machine....','createStateFinal','reason\x2019\x20machine....','ivrAnswerCallsDay','[syncHangupIvr][createHistory]','dialQueueProject','AnswerAGI','[syncHangupIvr]','outboundUnknownCallsDay','Unknow','running','isPreviewCampaign','statusMessage','getQueueCampaignStatusMessage','resolve','available','inUse','talking','pTalking','ACTIVE','[syncQueueSummary]','compareToOutboundQueue','queueSummaryCountersUpdated','updateReportFromOutboundQueue','assign','throttle','dialPreviewRecallmeReminder','filter','online','handlePreviewRecallNotifications','map','Agent','user:dialPreviewRecallReminder','checkPreviewRecallReminder','clearZombieChannels','[uniqueid]','No\x20such\x20channel','[Dialer][checkChannel]','[Dialer][checkChannel][ivr]','getVoiceQueueRtPauses','[updateOriginated]\x20is\x20null\x20or\x20undefined','notFound','UserId','[emptyContact][createHistory]','[emptyContact]','[syncQueueCallerAbandon]\x20[Drop]','user:%s','handleIvr','actionOriginate'];(function(_0x137eef,_0x83dd71){var _0x454be4=function(_0xd2e319){while(--_0xd2e319){_0x137eef['push'](_0x137eef['shift']());}};_0x454be4(++_0x83dd71);}(_0x9a61,0xc5));var _0x19a6=function(_0x390f16,_0x58ca29){_0x390f16=_0x390f16-0x0;var _0x212532=_0x9a61[_0x390f16];return _0x212532;};'use strict';var util=require(_0x19a6('0x0'));var _=require(_0x19a6('0x1'));var uuid=require(_0x19a6('0x2'));var moment=require(_0x19a6('0x3'));var rr=require('rr');var Redis=require(_0x19a6('0x4'));var utils=require('./utils');var hopperUtils=require(_0x19a6('0x5'));var ut=require(_0x19a6('0x6'));var config=require(_0x19a6('0x7'));var logger=require(_0x19a6('0x8'))(_0x19a6('0x9'));var loggerBooked=require(_0x19a6('0x8'))('booked');var loggerPredictive=require(_0x19a6('0x8'))(_0x19a6('0xa'));var loggerPredictiveCalls=require('../../../config/logger')('predictiveCalls');var loggerSyncQueueSummary=require(_0x19a6('0x8'))(_0x19a6('0xb'));var ami=require('../ami');config[_0x19a6('0xc')]=_[_0x19a6('0xd')](config['redis'],{'host':_0x19a6('0xe'),'port':0x18eb});var io=require(_0x19a6('0xf'))(new Redis(config[_0x19a6('0xc')]));var cmHopper=require('../rpc/cmHopper');var voiceQueueRt=require(_0x19a6('0x10'));var RpcSetting=require(_0x19a6('0x11'));var Interval=require(_0x19a6('0x12'));var Action=require(_0x19a6('0x13'));var History=require('./models/history');var Final=require(_0x19a6('0x14'));var AgentComplete=require(_0x19a6('0x15'));var QueueCallerAbandon=require('./models/queueCallerAbandon');var Hangup=require(_0x19a6('0x16'));var ipAgi=process['env']['XCALLY_IP_AGI']||'127.0.0.1';var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence['prototype'][_0x19a6('0x17')]=function(_0x3ab990){this[_0x19a6('0x18')]=this['tail']?this[_0x19a6('0x18')][_0x19a6('0x19')](_0x3ab990):_0x3ab990();};function Dialer(_0x1023a1,_0x38ca5c){this[_0x19a6('0x1a')]=new Sequence();this[_0x19a6('0x1b')]=_0x38ca5c;this[_0x19a6('0x1c')]=_0x1023a1[_0x19a6('0x1c')];this['campaigns']=_0x1023a1[_0x19a6('0x1d')];this[_0x19a6('0x1e')]=_0x1023a1['agents'];this[_0x19a6('0x1f')]=_0x1023a1[_0x19a6('0x1f')];this[_0x19a6('0x20')]=config[_0x19a6('0x20')]||0x2;this[_0x19a6('0x21')]={};this[_0x19a6('0x22')]={};this[_0x19a6('0x23')]={};this[_0x19a6('0x24')]={};this[_0x19a6('0x25')]={};this[_0x19a6('0x26')]={};this['startProgressive']={};this[_0x19a6('0x27')]={};this['queueBooked']={};this[_0x19a6('0x28')]={};this[_0x19a6('0x29')]={};ami['on']('agentconnect',this['syncAgentConnect'][_0x19a6('0x2a')](this));ami['on'](_0x19a6('0x2b'),this['syncQueueCallerAbandon'][_0x19a6('0x2a')](this));ami['on']('originateresponse',this['syncOriginateResponse'][_0x19a6('0x2a')](this));ami['on'](_0x19a6('0x2c'),this[_0x19a6('0x2d')]['bind'](this));ami['on'](_0x19a6('0x2e'),this[_0x19a6('0xb')][_0x19a6('0x2a')](this));ami['on'](_0x19a6('0x2f'),this[_0x19a6('0x30')][_0x19a6('0x2a')](this));ami['on']('hangup',this[_0x19a6('0x31')][_0x19a6('0x2a')](this));ami['on']('newexten',this[_0x19a6('0x32')][_0x19a6('0x2a')](this));ami['on'](_0x19a6('0x33'),this['syncVarSet']['bind'](this));ami['on']('queuemember',this[_0x19a6('0x34')][_0x19a6('0x2a')](this));ami['on'](_0x19a6('0x35'),this['syncQueueStatusComplete']['bind'](this));this[_0x19a6('0x36')]();this[_0x19a6('0x37')]();RpcSetting[_0x19a6('0x38')]()[_0x19a6('0x39')](function(_0x48887b){previewRecallmeReminderInterval=_0x48887b[_0x19a6('0x3a')];});}function isNotNull(_0x2a141d){return _0x2a141d!==null&&!_['isUndefined'](_0x2a141d);}function msgResponse(_0x404ebf,_0x46f54c,_0x2f04bb){return{'action':_0x404ebf,'response':_0x46f54c,'message':_0x2f04bb,'stack':_0x2f04bb};}function emit(_0x5a4a0a,_0x468caa,_0x213b45){io['to'](_0x5a4a0a)[_0x19a6('0x3b')](_0x468caa,_0x213b45);}function emitOutboundVoiceQueueSummary(_0x4e5ec6){if(_0x4e5ec6[_0x19a6('0x3c')]===_0x19a6('0x3d')){logger['debug'](_0x19a6('0x3e'),util[_0x19a6('0x3f')](_0x4e5ec6,{'showHidden':![],'depth':null}));emit(util[_0x19a6('0x40')](_0x19a6('0x41'),_0x4e5ec6['name']),'voice_queue:save',_0x4e5ec6);}}function checkGetDataPredictive(_0x14e83a){if(isNotNull(_0x14e83a)&&!_['isEmpty'](_0x14e83a)){loggerPredictive['info'](_0x19a6('0x42'));loggerPredictive[_0x19a6('0x43')]('Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x14e83a['predictiveIntervalTotalCalls']);loggerPredictive[_0x19a6('0x43')]('Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x14e83a['predictiveIntervalAnsweredCalls']);loggerPredictive['info'](_0x19a6('0x44'),_0x14e83a[_0x19a6('0x45')]);loggerPredictive[_0x19a6('0x43')](_0x19a6('0x46'),_0x14e83a[_0x19a6('0x47')]);loggerPredictive[_0x19a6('0x43')](_0x19a6('0x48'),_0x14e83a[_0x19a6('0x49')]);loggerPredictive[_0x19a6('0x43')](_0x19a6('0x4a'),_0x14e83a['predictiveIntervalAvgTalktime']);loggerPredictive[_0x19a6('0x43')](_0x19a6('0x4b'));if(_0x14e83a['predictiveIntervalTotalCalls']>0x0){if(!_[_0x19a6('0x4c')](_0x14e83a[_0x19a6('0x4d')])&&_0x14e83a[_0x19a6('0x4d')]>0x0){return!![];}loggerPredictive['info'](_0x19a6('0x4e'));if(!_[_0x19a6('0x4c')](_0x14e83a[_0x19a6('0x49')])&&_0x14e83a[_0x19a6('0x49')]>0x0){return!![];}loggerPredictive[_0x19a6('0x43')]('Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive');}else{loggerPredictive[_0x19a6('0x43')](_0x19a6('0x4f'));}}else{loggerPredictive[_0x19a6('0x43')]('History\x20information\x20are\x20empty');}return![];}function mergeDataErlangB(_0x444d06){return function(_0x7218d){loggerPredictive[_0x19a6('0x43')](_0x19a6('0x50'));loggerPredictive[_0x19a6('0x43')](_0x19a6('0x51'),_0x7218d[_0x19a6('0x52')]);loggerPredictive[_0x19a6('0x43')]('One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x7218d[_0x19a6('0x53')]);loggerPredictive[_0x19a6('0x43')]('Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x7218d[_0x19a6('0x54')]);loggerPredictive['info'](_0x19a6('0x55'),_0x7218d[_0x19a6('0x56')]);loggerPredictive[_0x19a6('0x43')](_0x19a6('0x57'),_0x7218d['erlangAbandonmentRate']);loggerPredictive[_0x19a6('0x43')](_0x19a6('0x4b'));_[_0x19a6('0x58')](_0x444d06,_0x7218d);};}function ifInterval(_0x4137b4,_0x3afe43){if(_[_0x19a6('0x4c')](_0x3afe43)){return![];}return utils[_0x19a6('0x59')](undefined,_0x3afe43)<_0x4137b4*0x3c;}function clearPredictiveAttributes(_0xc1fda){if(_0xc1fda[_0x19a6('0x5a')]){_0xc1fda[_0x19a6('0x5a')]=undefined;loggerPredictive[_0x19a6('0x5b')](_0xc1fda[_0x19a6('0x5c')],_0x19a6('0x5d'));}if(_0xc1fda[_0x19a6('0x26')]){_0xc1fda['startPredictive']=undefined;loggerPredictive['debug'](_0xc1fda[_0x19a6('0x5c')],'startPredictive\x20value\x20cleared');}if(_0xc1fda[_0x19a6('0x5e')]){clearInterval(_0xc1fda['handlePredictive']);_0xc1fda[_0x19a6('0x5e')]=undefined;loggerPredictive[_0x19a6('0x5b')](_0xc1fda[_0x19a6('0x5c')],_0x19a6('0x5f'));}}function loggerCatchPredictive(_0x4ca2a9,_0x1f40e7){return function(_0x4ad996){loggerPredictive['error'](_0x1f40e7['name'],_0x4ca2a9);loggerPredictive[_0x19a6('0x60')](_0x4ad996[_0x19a6('0x61')]);clearPredictiveAttributes(_0x1f40e7);};}function loggerCatch(_0x2c6636){return function(_0x1d8427){logger['error'](_0x2c6636,util[_0x19a6('0x3f')](_0x1d8427,{'showHidden':![],'depth':null}));};}function loggerGetContactDialer(_0x35a50b,_0x2f03ff,_0x134125){return function(_0x37b7e5){utils[_0x19a6('0x62')](_0x2f03ff,_0x134125,0x0);logger[_0x19a6('0x60')](_0x35a50b,util[_0x19a6('0x3f')](_0x37b7e5,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0xcc8352){return function(_0x298be4){if(isNotNull(_0x298be4)&&isNotNull(_0x298be4[0x0])){if(_0x298be4[0x0][_0x19a6('0x63')]>0x0){_0xcc8352[_0x19a6('0x64')]=utils[_0x19a6('0x65')][_0x19a6('0x66')];logger[_0x19a6('0x43')](_0x19a6('0x67')+_0xcc8352['name'],_0x298be4[0x0]['contactsRescheduled'],'contacts');}else{_0xcc8352[_0x19a6('0x64')]=utils[_0x19a6('0x65')][_0x19a6('0x68')];logger[_0x19a6('0x43')](_0x19a6('0x69')+_0xcc8352[_0x19a6('0x5c')]);}}};}function createObjHistory(_0x53e97e,_0x151377,_0x240dd1,_0x2c92f0,_0x10fd01){_0x53e97e[_0x19a6('0x64')]=_0x240dd1;var _0x322bb5=new Action(_0x53e97e,_0x151377);var _0x2f2602=new History(_0x322bb5);_0x2f2602[_0x19a6('0x6a')]=_0x2c92f0;_0x2f2602['statedesc']=_0x10fd01;_0x2f2602['endtime']=_0x322bb5['starttime'];return _0x2f2602;}function unlockQueueStatus(_0x124138,_0xb55294){setTimeout(function(){if(_['isUndefined'](_0x124138[_0x19a6('0x6b')])){loggerBooked[_0x19a6('0x60')](_0x19a6('0x6c'),_0xb55294);}_0x124138[_0x19a6('0x6b')]=!![];loggerBooked[_0x19a6('0x43')](_0x19a6('0x6d'),_0xb55294,JSON[_0x19a6('0x6e')](_['pick'](_0x124138,[_0x19a6('0x5c'),_0x19a6('0x6b')])));},0x1f3);}function checkInterval(_0xa9336a){return function(){if(!isNotNull(_0xa9336a[_0x19a6('0x6f')])){_0xa9336a[_0x19a6('0x64')]=utils[_0x19a6('0x65')][_0x19a6('0x70')];throw _0xa9336a['name']+_0x19a6('0x71');}if(!isNotNull(_0xa9336a['Interval']['Intervals'])){_0xa9336a[_0x19a6('0x64')]=utils[_0x19a6('0x65')][_0x19a6('0x70')];throw _0xa9336a[_0x19a6('0x5c')]+'\x20INTERVAL_IS_NULL';}if(!isNotNull(_[_0x19a6('0x72')](_0xa9336a['Interval']['Intervals']))){_0xa9336a['message']=utils[_0x19a6('0x65')][_0x19a6('0x70')];throw _0xa9336a[_0x19a6('0x5c')]+_0x19a6('0x71');}};}function checkIsIVRCampaignActive(_0x1bc8ce){return function(){if(!utils[_0x19a6('0x73')](_0x1bc8ce)){_0x1bc8ce['message']=utils[_0x19a6('0x65')][_0x19a6('0x74')];throw _0x1bc8ce['name']+'\x20NOT\x20Active';}};}function emitCampaignSummary(_0x307983){if(utils['isIVRCampaign'](_0x307983)){emit(util[_0x19a6('0x40')](_0x19a6('0x75'),_0x307983['name']),'campaign:save',_0x307983);}}function loggerCatchQueueSummary(_0x34e59c,_0x158f5a){return function(_0x16cefe){clearPredictiveAttributes(_0x158f5a);emitCampaignSummary(_0x158f5a);loggerSyncQueueSummary['debug'](_0x34e59c,util[_0x19a6('0x3f')](_0x16cefe,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x45480a){if(_0x45480a[_0x19a6('0x76')]){if(_0x45480a[_0x19a6('0x77')]===0x0){_0x45480a[_0x19a6('0x76')]=![];_0x45480a[_0x19a6('0x64')]=utils[_0x19a6('0x65')]['INACTIVE'];loggerSyncQueueSummary[_0x19a6('0x5b')](_0x19a6('0x78'),_0x45480a[_0x19a6('0x5c')],'is\x20not\x20active');}else{_0x45480a[_0x19a6('0x64')]=utils[_0x19a6('0x65')][_0x19a6('0x79')];loggerSyncQueueSummary[_0x19a6('0x5b')](_0x19a6('0x78'),_0x45480a['name'],_0x19a6('0x7a'));}emitCampaignSummary(_0x45480a);}}function myreject(_0x27152d){return function(_0x2b3d1e){return _0x27152d(msgResponse(_0x19a6('0x7b'),'Error',JSON['stringify'](_0x2b3d1e)));};}Dialer[_0x19a6('0x7c')][_0x19a6('0x7d')]=function(_0x36d958){return!_[_0x19a6('0x4c')](_0x36d958)&&_0x36d958&&!_['isUndefined'](_0x36d958[_0x19a6('0x5c')])&&!_[_0x19a6('0x4c')](_0x36d958[_0x19a6('0x7e')])&&_0x36d958[_0x19a6('0x7e')]&&(this[_0x19a6('0x1f')][util['format'](_0x19a6('0x7f'),_0x36d958[_0x19a6('0x5c')])][_0x19a6('0x80')]===_0x19a6('0x81')||this[_0x19a6('0x1f')][util['format']('SIP/%s',_0x36d958[_0x19a6('0x5c')])][_0x19a6('0x80')]===_0x19a6('0x82'));};Dialer['prototype'][_0x19a6('0x83')]=function(_0x5c26c4){var _0xdf59f1=this;return function(){if(!_0xdf59f1[_0x19a6('0x7d')](_0x5c26c4[_0x19a6('0x84')])){if(!_0xdf59f1[_0x19a6('0x7d')](_0x5c26c4[_0x19a6('0x85')])){_0x5c26c4['message']=utils[_0x19a6('0x65')][_0x19a6('0x86')];throw _0x5c26c4[_0x19a6('0x5c')]+_0x19a6('0x87');}}};};Dialer['prototype']['checkIfTime']=function(_0x133593,_0xd2fdf5,_0x18f1bc,_0x14e574){var _0x1f55e4=this;return function(){var _0x5d8993=!![];return _0x1f55e4[_0x19a6('0x88')](_0x133593,_0xd2fdf5,_0x18f1bc,_0x14e574,_0x5d8993);};};Dialer[_0x19a6('0x7c')][_0x19a6('0x89')]=function(_0x44b86f,_0x21bb3b,_0x2d8ccb,_0x2e6f95){var _0x4f0319=this;return function(){var _0x47ecde=![];return _0x4f0319[_0x19a6('0x88')](_0x44b86f[_0x19a6('0x8a')],_0x21bb3b,_0x2d8ccb,_0x2e6f95,_0x47ecde);};};Dialer['prototype'][_0x19a6('0x88')]=function(_0x3e8706,_0x340dc1,_0x43326d,_0x26a802,_0x1ef95b){var _0x3ac2ea=[];return new Promise(function(_0x4ee307,_0x33586c){if(!isNotNull(_0x3e8706)){_0x26a802[_0x19a6('0x64')]=utils['CAMPAIGN_STATUS']['NULL_INTERVAL'];return _0x33586c(msgResponse(_0x19a6('0x8b'),_0x19a6('0x8c'),_0x43326d+'\x20Intervals\x20is\x20null\x20'));}if(_[_0x19a6('0x72')](_0x3e8706)){_0x26a802[_0x19a6('0x64')]=utils[_0x19a6('0x65')]['EMPTY_INTERVAL'];return _0x33586c(msgResponse('ifTime',_0x19a6('0x8c'),_0x43326d+_0x19a6('0x8d')));}if(_0x340dc1&&_['isUndefined'](config[_0x19a6('0x8e')][_0x340dc1])){_0x26a802['message']=utils[_0x19a6('0x65')][_0x19a6('0x8f')];return _0x33586c(msgResponse(_0x19a6('0x8b'),_0x19a6('0x8c'),_0x43326d+_0x19a6('0x90')+_0x340dc1));}if(_[_0x19a6('0x91')](_0x3e8706)){for(var _0x5b3bac=0x0;_0x5b3bac<_0x3e8706[_0x19a6('0x92')];_0x5b3bac+=0x1){_0x3ac2ea[_0x19a6('0x93')](ami[_0x19a6('0x94')]({'action':_0x19a6('0x95'),'command':util['format']('iftime\x20%s,%s',_0x3e8706[_0x5b3bac][_0x19a6('0x96')],!_[_0x19a6('0x4c')](config[_0x19a6('0x8e')][_0x340dc1])?_0x340dc1:'')})[_0x19a6('0x39')](function(_0x9286dd){return _0x9286dd[_0x19a6('0x97')][_0x19a6('0x98')](_0x19a6('0x99'))>=0x0;})[_0x19a6('0x9a')](myreject(_0x33586c)));}}else{_0x3ac2ea[_0x19a6('0x93')](ami[_0x19a6('0x94')]({'action':_0x19a6('0x95'),'command':util[_0x19a6('0x40')](_0x19a6('0x9b'),_0x3e8706,!_[_0x19a6('0x4c')](config[_0x19a6('0x8e')][_0x340dc1])?_0x340dc1:'')})['then'](function(_0x50f232){return _0x50f232[_0x19a6('0x97')][_0x19a6('0x98')]('true')>=0x0;})['catch'](myreject(_0x33586c)));}Promise[_0x19a6('0x9c')](_0x3ac2ea)[_0x19a6('0x39')](function(_0x430a5b){var _0xe1d8d5=_[_0x19a6('0x9d')](_0x430a5b);if(_0xe1d8d5){return _0x4ee307(_0xe1d8d5);}else{_0x26a802[_0x19a6('0x64')]=_0x1ef95b?utils[_0x19a6('0x65')][_0x19a6('0x9e')]:utils[_0x19a6('0x65')]['OVERTIME_INTERVAL'];return _0x33586c(msgResponse('[ifTime][promiseAll]',_0x19a6('0x8c'),'Global:\x20'+_0x1ef95b+'\x20'+_0x43326d+_0x19a6('0x9f')+util[_0x19a6('0x3f')](_0x3e8706,{'showHidden':![],'depth':null})+_0x19a6('0xa0')+_0x340dc1));}})[_0x19a6('0x9a')](function(_0x347e64){return _0x33586c(msgResponse(_0x19a6('0x8b'),_0x19a6('0x8c'),JSON[_0x19a6('0x6e')](_0x347e64)));});});};Dialer[_0x19a6('0x7c')][_0x19a6('0x36')]=function(){var _0xe15d7=this;return cmHopper[_0x19a6('0xa1')]({'active':![]},{'where':{'active':!![]}})[_0x19a6('0x39')](function(){setInterval(function(){_0xe15d7[_0x19a6('0xa2')]();},0x3e8);});};Dialer[_0x19a6('0x7c')][_0x19a6('0xa2')]=function(){var _0x395777=this;var _0x3eb55b;for(var _0x4fc16d in this['campaigns']){if(typeof this[_0x19a6('0x1d')][_0x4fc16d]!==_0x19a6('0xa3')){_0x3eb55b=this['campaigns'][_0x4fc16d];if(utils[_0x19a6('0xa4')](_0x3eb55b)&&utils['isIVRCampaignActive'](_0x3eb55b)){_0x3eb55b[_0x19a6('0x76')]=!![];Promise['resolve']()[_0x19a6('0x39')](checkIsIVRCampaignActive(_0x3eb55b))['then'](checkInterval(_0x3eb55b))['then'](_0x395777[_0x19a6('0x83')](_0x3eb55b))[_0x19a6('0x39')](_0x395777['checkIfTime'](_0x3eb55b[_0x19a6('0xa5')],_0x3eb55b['dialTimezone'],_0x3eb55b[_0x19a6('0x5c')],_0x3eb55b))[_0x19a6('0x39')](_0x395777['checkIfTimeIntervals'](_0x3eb55b[_0x19a6('0x6f')],_0x3eb55b[_0x19a6('0xa6')],_0x3eb55b[_0x19a6('0x5c')],_0x3eb55b))[_0x19a6('0x39')](_0x395777[_0x19a6('0xa7')](_0x3eb55b))['catch'](loggerCatchQueueSummary(_0x19a6('0xa8'),_0x3eb55b));}else{notSendMessagesCampaign(_0x3eb55b);}}}};Dialer[_0x19a6('0x7c')][_0x19a6('0xa9')]=function(_0x2adba4){if(_0x2adba4[_0x19a6('0xaa')]!==_0x19a6('0xa')){clearPredictiveAttributes(_0x2adba4);}switch(_0x2adba4[_0x19a6('0xaa')]){case _0x19a6('0xab'):this[_0x19a6('0xac')](_0x2adba4,0x1);break;case'power':this[_0x19a6('0xac')](_0x2adba4,_0x2adba4[_0x19a6('0xad')]);break;case'predictive':this[_0x19a6('0xa')](_0x2adba4);break;case _0x19a6('0xae'):this[_0x19a6('0xac')](_0x2adba4,0x1);break;default:logger['error']('Queue',_0x2adba4[_0x19a6('0x5c')],_0x19a6('0xaf'));}};Dialer[_0x19a6('0x7c')][_0x19a6('0x8b')]=function(_0x1282f1,_0x36bb47){var _0x1ccaf8=_0x1282f1[_0x19a6('0xa6')];var _0x4b00c1=_0x36bb47?_0x1282f1['dialGlobalInterval']:_0x1282f1[_0x19a6('0x6f')]['Intervals'];logger[_0x19a6('0xb0')](_0x19a6('0xb1'),_0x4b00c1,_0x1ccaf8,_0x1282f1['name'],util[_0x19a6('0x40')](_0x19a6('0xb2'),_0x1282f1[_0x19a6('0x5c')],_0x1282f1['id']));var _0x2ce3fa=null;return Interval[_0x19a6('0xb3')](_0x4b00c1,_0x1ccaf8)[_0x19a6('0x39')](function(_0x454a88){if(_0x454a88===!![]){return _0x454a88;}else{_0x1282f1[_0x19a6('0x64')]=_0x36bb47?utils[_0x19a6('0x65')][_0x19a6('0x9e')]:utils[_0x19a6('0x65')]['OVERTIME_INTERVAL'];_0x2ce3fa=msgResponse('[ifTime][promiseAll]',_0x19a6('0x8c'),_0x19a6('0xb4')+_0x36bb47+'\x20'+_0x1282f1[_0x19a6('0x5c')]+_0x19a6('0x9f')+util['inspect'](_0x4b00c1,{'showHidden':![],'depth':null})+_0x19a6('0xa0')+_0x1ccaf8);}if(_0x2ce3fa!==null){logger[_0x19a6('0xb0')](_0x19a6('0xb5'),_0x2ce3fa);_0x2ce3fa[_0x19a6('0xb6')]=_0x36bb47;throw _0x2ce3fa;}})[_0x19a6('0x9a')](function(_0x31d376){logger[_0x19a6('0x60')](_0x19a6('0xb7'),_0x31d376);throw msgResponse(_0x19a6('0x7b'),_0x19a6('0xb8'),util[_0x19a6('0x3f')](_0x31d376,{'showHidden':![],'depth':null}));});};Dialer['prototype'][_0x19a6('0xb9')]=function(_0x36c6db){if(this['voiceQueues'][_0x36c6db[_0x19a6('0xba')]]){if(this[_0x19a6('0x24')][_0x36c6db[_0x19a6('0xbb')]]&&this[_0x19a6('0x24')][_0x36c6db['uniqueid']][_0x19a6('0x3c')]!==_0x19a6('0xbc')){this[_0x19a6('0xbd')](this[_0x19a6('0x1c')][_0x36c6db[_0x19a6('0xba')]]);this[_0x19a6('0x24')][_0x36c6db[_0x19a6('0xbb')]]['answertime']=moment()[_0x19a6('0x40')](_0x19a6('0xbe'));}}};Dialer['prototype'][_0x19a6('0x2d')]=function(_0x242bad){var _0x52a687=this[_0x19a6('0x24')][_0x242bad[_0x19a6('0xbb')]];if(this[_0x19a6('0x1c')][_0x242bad['queue']]){if(_0x52a687&&_0x52a687[_0x19a6('0x3c')]!==_0x19a6('0xbc')){delete this[_0x19a6('0x24')][_0x242bad[_0x19a6('0xbb')]];this['voiceQueues'][_0x242bad[_0x19a6('0xba')]]['outboundAnswerCallsDay']+=0x1;var _0x4082a5=new AgentComplete(_0x52a687,_0x242bad);if(_0x242bad[_0x19a6('0xbf')]===_0x19a6('0xc0')){_0x4082a5[_0x19a6('0xc1')]=this['voiceQueues'][_0x242bad[_0x19a6('0xba')]]['dialQueueProject2']&&this[_0x19a6('0x1c')][_0x242bad[_0x19a6('0xba')]][_0x19a6('0xc2')]?moment()[_0x19a6('0x40')](_0x19a6('0xbe')):undefined;}hopperUtils[_0x19a6('0xc3')](_0x4082a5)[_0x19a6('0x9a')](loggerCatch(_0x19a6('0xc4')));hopperUtils[_0x19a6('0xc5')](_0x4082a5)[_0x19a6('0x9a')](loggerCatch(_0x19a6('0xc6')));}}};Dialer[_0x19a6('0x7c')]['syncQueueCallerAbandon']=function(_0x2e6638){var _0x277c97=this[_0x19a6('0x24')][_0x2e6638[_0x19a6('0xbb')]];var _0x3e5b3a=this;var _0x8e4b20=![];var _0x543eda;var _0x285919;if(this[_0x19a6('0x1c')][_0x2e6638[_0x19a6('0xba')]]){if(_0x277c97&&_0x277c97[_0x19a6('0x3c')]!=='ivr'){delete this[_0x19a6('0x24')][_0x2e6638[_0x19a6('0xbb')]];this[_0x19a6('0xbd')](this[_0x19a6('0x1c')][_0x2e6638['queue']]);_0x277c97[_0x19a6('0xc7')]=moment()[_0x19a6('0x40')](_0x19a6('0xbe'));var _0x4864b4=new QueueCallerAbandon(_0x277c97,_0x2e6638);if(utils[_0x19a6('0x59')](_0x277c97['droptime'],_0x277c97['responsetime'])>=_0x277c97['dialQueueTimeout']){this[_0x19a6('0x1c')][_0x2e6638['queue']][_0x19a6('0x45')]+=0x1;this['voiceQueues'][_0x2e6638[_0x19a6('0xba')]][_0x19a6('0xc8')]+=0x1;this[_0x19a6('0x1c')][_0x2e6638[_0x19a6('0xba')]][_0x19a6('0xc9')]+=0x1;_0x4864b4[_0x19a6('0x6a')]=0xa;_0x4864b4[_0x19a6('0xca')]=_0x19a6('0xcb');_0x4864b4[_0x19a6('0xcc')]=_0x19a6('0xcd');_0x4864b4['agiafterat']=this['voiceQueues'][_0x2e6638['queue']]['dialQueueProject2']?moment()['format'](_0x19a6('0xbe')):undefined;_0x4864b4['countdropretry']+=0x1;_0x4864b4['countglobal']+=0x1;_0x543eda=this[_0x19a6('0x1c')][_0x2e6638[_0x19a6('0xba')]]['dialDropRetryFrequency'];_0x285919=this['voiceQueues'][_0x2e6638[_0x19a6('0xba')]][_0x19a6('0xce')];hopperUtils['verifyAdditionalPhones'](_0x4864b4,_0x4864b4['state'],_0x277c97[_0x19a6('0xcf')])[_0x19a6('0x39')](function(_0x1f9ca1){_0x8e4b20=_0x1f9ca1[_0x19a6('0xd0')]==0x1;if(_0x4864b4['countdropretry']>=_0x3e5b3a[_0x19a6('0x1c')][_0x2e6638[_0x19a6('0xba')]]['dialDropMaxRetry']){_0x3e5b3a[_0x19a6('0xd1')](_0x4864b4,_0x1f9ca1['additional']);}else{hopperUtils[_0x19a6('0xd2')]({'active':![],'countdropretry':_0x4864b4[_0x19a6('0xd3')],'scheduledat':moment()['add'](_0x3e5b3a[_0x19a6('0x1c')][_0x2e6638[_0x19a6('0xba')]][_0x19a6('0xd4')],_0x19a6('0xd5'))['format'](_0x19a6('0xbe')),'ContactId':_0x277c97[_0x19a6('0xd6')],'ListId':_0x277c97[_0x19a6('0xd7')],'VoiceQueueId':_0x277c97[_0x19a6('0xd8')]||undefined,'CampaignId':_0x277c97[_0x19a6('0xd9')]||undefined})['catch'](loggerCatch(_0x19a6('0xda')));var _0x1298fc=new History(_0x4864b4);_0x1298fc[_0x19a6('0x6a')]=0xa;_0x1298fc[_0x19a6('0xca')]=_0x19a6('0xcb');_0x1298fc[_0x19a6('0xdb')]=moment()[_0x19a6('0x40')](_0x19a6('0xbe'));_0x1298fc[_0x19a6('0xdc')]=_0x1298fc[_0x19a6('0xdb')];_0x1298fc[_0x19a6('0xdd')]=_0x4864b4[_0x19a6('0xdd')];_0x1298fc[_0x19a6('0xde')]=_0x4864b4[_0x19a6('0xde')];hopperUtils[_0x19a6('0xc3')](_0x1298fc)['catch'](loggerCatch(_0x19a6('0xdf')));}})['then'](function(){if(_0x8e4b20)hopperUtils[_0x19a6('0xe0')](_0x4864b4,_0x543eda,_0x285919)[_0x19a6('0x39')](function(){return 0x1;});});}else{this[_0x19a6('0x1c')][_0x2e6638['queue']][_0x19a6('0x47')]+=0x1;this['voiceQueues'][_0x2e6638[_0x19a6('0xba')]][_0x19a6('0xe1')]+=0x1;_0x4864b4[_0x19a6('0x6a')]=0xb;_0x4864b4[_0x19a6('0xca')]=_0x19a6('0xe2');_0x4864b4[_0x19a6('0xcc')]=_0x19a6('0xe3');_0x4864b4[_0x19a6('0xe4')]+=0x1;_0x4864b4['countglobal']+=0x1;_0x543eda=this[_0x19a6('0x1c')][_0x2e6638[_0x19a6('0xba')]][_0x19a6('0xe5')];_0x285919=this[_0x19a6('0x1c')][_0x2e6638[_0x19a6('0xba')]][_0x19a6('0xce')];hopperUtils[_0x19a6('0xe6')](_0x4864b4,_0x4864b4[_0x19a6('0x6a')],_0x277c97['voiceQueue'])[_0x19a6('0x39')](function(_0xf2acbf){if(_0x4864b4[_0x19a6('0xe4')]>=_0x3e5b3a[_0x19a6('0x1c')][_0x2e6638[_0x19a6('0xba')]][_0x19a6('0xe7')]){_0x3e5b3a[_0x19a6('0xd1')](_0x4864b4,_0xf2acbf[_0x19a6('0xd0')]);}else{hopperUtils['rescheduleContact']({'active':![],'countabandonedretry':_0x4864b4[_0x19a6('0xe4')],'scheduledat':moment()[_0x19a6('0xe8')](_0x3e5b3a[_0x19a6('0x1c')][_0x2e6638['queue']]['dialAbandonedRetryFrequency'],_0x19a6('0xd5'))[_0x19a6('0x40')](_0x19a6('0xbe')),'ContactId':_0x277c97[_0x19a6('0xd6')],'ListId':_0x277c97[_0x19a6('0xd7')],'VoiceQueueId':_0x277c97['VoiceQueueId']||undefined,'CampaignId':_0x277c97[_0x19a6('0xd9')]||undefined})[_0x19a6('0x9a')](loggerCatch('[rescheduleContact][Abandoned]'));var _0x2f0e9e=new History(_0x4864b4);_0x2f0e9e[_0x19a6('0x6a')]=0xb;_0x2f0e9e[_0x19a6('0xca')]=_0x19a6('0xe2');_0x2f0e9e[_0x19a6('0xdb')]=moment()['format'](_0x19a6('0xbe'));_0x2f0e9e['endtime']=_0x2f0e9e[_0x19a6('0xdb')];_0x2f0e9e[_0x19a6('0xdd')]=_0x4864b4[_0x19a6('0xdd')];_0x2f0e9e['calleridnum']=_0x4864b4[_0x19a6('0xde')];hopperUtils[_0x19a6('0xc3')](_0x2f0e9e)['catch'](loggerCatch('[syncAgentComplete][createHistory][11]'));}})[_0x19a6('0x39')](function(){if(_0x8e4b20)hopperUtils['swapAdditionalPhones'](_0x4864b4,_0x543eda,_0x285919)[_0x19a6('0x39')](function(){return 0x1;});});}}}};Dialer[_0x19a6('0x7c')][_0x19a6('0x32')]=function(_0x350f7e){if(this[_0x19a6('0x22')][_0x350f7e['uniqueid']]){this[_0x19a6('0x22')][_0x350f7e[_0x19a6('0xbb')]][_0x19a6('0xe9')]=_0x350f7e['channel'];}if(this[_0x19a6('0x24')][_0x350f7e['uniqueid']]){this[_0x19a6('0x24')][_0x350f7e[_0x19a6('0xbb')]][_0x19a6('0xe9')]=_0x350f7e['channel'];}};Dialer['prototype'][_0x19a6('0x34')]=function(_0x583353){if(!this[_0x19a6('0x22')][_0x583353[_0x19a6('0xea')]]){return;}var _0xdca4d9=this[_0x19a6('0x1c')][this['actions'][_0x583353['actionid']]['queue']][_0x19a6('0xeb')]||_0x19a6('0xec');if(_0xdca4d9===_0x19a6('0xed')){if(this[_0x19a6('0x22')][_0x583353[_0x19a6('0xea')]]&&_[_0x19a6('0xee')](this[_0x19a6('0x22')][_0x583353[_0x19a6('0xea')]]['locked'])&&_0x583353[_0x19a6('0x80')]==='1'&&_0x583353['paused']==='0'){if(this[_0x19a6('0x1e')][_0x583353[_0x19a6('0xef')]]){if(!this[_0x19a6('0x1e')][_0x583353[_0x19a6('0xef')]]['locked']){this[_0x19a6('0x1e')][_0x583353[_0x19a6('0xef')]][_0x19a6('0xf0')]=!![];this['actions'][_0x583353[_0x19a6('0xea')]][_0x19a6('0xf0')]=!![];this[_0x19a6('0x22')][_0x583353[_0x19a6('0xea')]][_0x19a6('0xef')]=_0x583353[_0x19a6('0xef')];}}}}else if(_0xdca4d9==='rrmemory'){if(this[_0x19a6('0x22')][_0x583353['actionid']]){if(this['agents'][_0x583353[_0x19a6('0xef')]]){this[_0x19a6('0x22')][_0x583353[_0x19a6('0xea')]][_0x19a6('0xef')]=_0x583353[_0x19a6('0xef')];if(_[_0x19a6('0xee')](this[_0x19a6('0xf1')][this[_0x19a6('0x22')][_0x583353['actionid']][_0x19a6('0xba')]])){this['queueBooked'][this[_0x19a6('0x22')][_0x583353[_0x19a6('0xea')]][_0x19a6('0xba')]]=[];}this[_0x19a6('0xf1')][this[_0x19a6('0x22')][_0x583353[_0x19a6('0xea')]][_0x19a6('0xba')]]['push'](_[_0x19a6('0x58')](_[_0x19a6('0xf2')](this['actions'][_0x583353[_0x19a6('0xea')]],['idHopper',_0x19a6('0xef')]),{'status':_0x583353[_0x19a6('0x80')],'paused':_0x583353[_0x19a6('0xf3')]}));}}}};Dialer[_0x19a6('0x7c')][_0x19a6('0xf4')]=function(_0x14228a){if(!this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]]){return;}var _0x52fa81=this;var _0x881141=this[_0x19a6('0x1c')][this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xba')]];var _0x440596=_0x881141[_0x19a6('0xeb')]||_0x19a6('0xec');if(_0x440596==='roundrobin'){if(this['actions'][_0x14228a[_0x19a6('0xea')]]&&this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]]['stateinterface']){this[_0x19a6('0x1b')][_0x19a6('0xf5')](this[_0x19a6('0x22')][_0x14228a['actionid']][_0x19a6('0xf6')],this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]]['stateinterface'])[_0x19a6('0x9a')](function(_0x131671){logger['error'](_0x19a6('0xf7'),util[_0x19a6('0x3f')](_0x131671,{'showHidden':![],'depth':null}));})[_0x19a6('0x19')](function(){_0x52fa81[_0x19a6('0xbd')](_0x52fa81[_0x19a6('0x1c')][_0x52fa81[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]]['queue']]);_0x52fa81[_0x19a6('0x1e')][_0x52fa81[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xef')]][_0x19a6('0xf0')]=![];delete _0x52fa81['actions'][_0x14228a[_0x19a6('0xea')]];unlockQueueStatus(_0x881141);});}else{this[_0x19a6('0xbd')](this['voiceQueues'][this[_0x19a6('0x22')][_0x14228a['actionid']][_0x19a6('0xba')]]);hopperUtils[_0x19a6('0xd2')]({'active':![],'ContactId':this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xd6')],'ListId':this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]]['ListId'],'VoiceQueueId':this[_0x19a6('0x22')][_0x14228a['actionid']][_0x19a6('0xd8')]||undefined,'CampaignId':this['actions'][_0x14228a[_0x19a6('0xea')]]['CampaignId']||undefined})[_0x19a6('0x9a')](loggerCatch(_0x19a6('0xf8')));delete this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]];unlockQueueStatus(_0x881141);}}else if(_0x440596===_0x19a6('0xec')){var _0x2f6431;if(this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]]&&!_[_0x19a6('0x72')](this[_0x19a6('0xf1')][this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xba')]])){if(this[_0x19a6('0x28')][_0x52fa81[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xba')]]){this[_0x19a6('0x28')][_0x52fa81[_0x19a6('0x22')][_0x14228a['actionid']][_0x19a6('0xba')]]=this[_0x19a6('0x28')][this['actions'][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xba')]]?this[_0x19a6('0x28')][this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xba')]]:this['queueBooked'][this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xba')]]?this[_0x19a6('0xf1')][this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xba')]][_0x19a6('0xf9')]||0x0:0x0;}this['queueBooked'][this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xba')]]['_rr']=this[_0x19a6('0x28')][this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]]['queue']];for(var _0x9c6c9b=0x0;_0x9c6c9b<this[_0x19a6('0xf1')][this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]]['queue']][_0x19a6('0x92')];_0x9c6c9b+=0x1){_0x2f6431=rr(this[_0x19a6('0xf1')][this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xba')]]);this['queueBookedRR'][_0x52fa81[_0x19a6('0x22')][_0x14228a['actionid']][_0x19a6('0xba')]]=this[_0x19a6('0xf1')][this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]]['queue']]['_rr'];if(_0x2f6431[_0x19a6('0x80')]==='1'&&_0x2f6431[_0x19a6('0xf3')]==='0'){break;}}if(!_[_0x19a6('0xee')](_0x2f6431)){this[_0x19a6('0x1e')][_0x2f6431[_0x19a6('0xef')]][_0x19a6('0xfa')]=_[_0x19a6('0x4c')](this[_0x19a6('0x1e')][_0x2f6431[_0x19a6('0xef')]][_0x19a6('0xfa')])?!![]:this[_0x19a6('0x1e')][_0x2f6431['stateinterface']][_0x19a6('0xfa')];}loggerBooked[_0x19a6('0x43')]('[booked][RR]',_0x14228a['actionid'],'Agent:\x20',JSON['stringify'](_['pick'](this[_0x19a6('0x1e')][_0x2f6431['stateinterface']],[_0x19a6('0x5c'),_0x19a6('0xfa')])),_0x19a6('0xfb'),JSON['stringify'](_0x2f6431[_0x19a6('0xf6')]));if(!_[_0x19a6('0xee')](_0x2f6431)&&_0x2f6431['status']==='1'&&_0x2f6431[_0x19a6('0xf3')]==='0'&&this[_0x19a6('0x1e')][_0x2f6431[_0x19a6('0xef')]][_0x19a6('0xfa')]){this[_0x19a6('0x1e')][_0x2f6431['stateinterface']][_0x19a6('0xfa')]=![];this[_0x19a6('0xf1')][_0x52fa81[_0x19a6('0x22')][_0x14228a['actionid']][_0x19a6('0xba')]]=[];this[_0x19a6('0x1b')][_0x19a6('0xf5')](_0x2f6431[_0x19a6('0xf6')],_0x2f6431['stateinterface'])[_0x19a6('0x9a')](function(_0x4c1989){logger[_0x19a6('0x60')](_0x19a6('0xf7'),util[_0x19a6('0x3f')](_0x4c1989,{'showHidden':![],'depth':null}));})['finally'](function(){_0x52fa81[_0x19a6('0xbd')](_0x52fa81[_0x19a6('0x1c')][_0x52fa81[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]]['queue']]);setTimeout(function(){_0x52fa81[_0x19a6('0x1e')][_0x2f6431[_0x19a6('0xef')]][_0x19a6('0xfa')]=!![];loggerBooked['info'](_0x19a6('0xfc'),_0x14228a[_0x19a6('0xea')],_0x19a6('0xfd'),JSON['stringify'](_['pick'](_0x52fa81[_0x19a6('0x1e')][_0x2f6431[_0x19a6('0xef')]],[_0x19a6('0x5c'),_0x19a6('0xfa')])),_0x19a6('0xfb'),JSON[_0x19a6('0x6e')](_0x2f6431[_0x19a6('0xf6')]));},0xc7);delete _0x52fa81[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]];unlockQueueStatus(_0x881141,_0x14228a['actionid']);});}else{loggerBooked[_0x19a6('0x43')](_0x19a6('0xfe'));this['updateOriginated'](this[_0x19a6('0x1c')][this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xba')]]);hopperUtils[_0x19a6('0xd2')]({'active':![],'ContactId':this['actions'][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xd6')],'ListId':this['actions'][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xd7')],'VoiceQueueId':this['actions'][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xd8')]||undefined,'CampaignId':this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]]['CampaignId']||undefined})['catch'](loggerCatch(_0x19a6('0xf8')));delete this['actions'][_0x14228a[_0x19a6('0xea')]];unlockQueueStatus(_0x881141);}}else{loggerBooked[_0x19a6('0x43')]('[booked][unlock2]');this[_0x19a6('0xbd')](this[_0x19a6('0x1c')][this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xba')]]);hopperUtils[_0x19a6('0xd2')]({'active':![],'ContactId':this['actions'][_0x14228a['actionid']][_0x19a6('0xd6')],'ListId':this[_0x19a6('0x22')][_0x14228a['actionid']][_0x19a6('0xd7')],'VoiceQueueId':this['actions'][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xd8')]||undefined,'CampaignId':this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xd9')]||undefined})[_0x19a6('0x9a')](loggerCatch(_0x19a6('0xff')));delete this[_0x19a6('0x22')][_0x14228a['actionid']];unlockQueueStatus(_0x881141);}}else{loggerBooked[_0x19a6('0x43')](_0x19a6('0x100'));this[_0x19a6('0xbd')](this[_0x19a6('0x1c')][this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xba')]]);hopperUtils[_0x19a6('0xd2')]({'active':![],'ContactId':this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]]['ContactId'],'ListId':this[_0x19a6('0x22')][_0x14228a['actionid']][_0x19a6('0xd7')],'VoiceQueueId':this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xd8')]||undefined,'CampaignId':this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]][_0x19a6('0xd9')]||undefined})[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x101')));delete this[_0x19a6('0x22')][_0x14228a[_0x19a6('0xea')]];unlockQueueStatus(_0x881141);}};Dialer[_0x19a6('0x7c')]['syncOriginateResponse']=function(_0x12c2a8){var _0x3b01d9=this['actions'][_0x12c2a8[_0x19a6('0xea')]];if(_0x3b01d9){delete this[_0x19a6('0x22')][_0x12c2a8[_0x19a6('0xea')]];_0x3b01d9[_0x19a6('0x102')]=moment()[_0x19a6('0x40')](_0x19a6('0xbe'));var _0x371102=_0x3b01d9[_0x19a6('0x3c')]===_0x19a6('0xbc')?this['campaigns'][_0x3b01d9[_0x19a6('0xba')]]:this[_0x19a6('0x1c')][_0x3b01d9[_0x19a6('0x103')]()];if(_0x12c2a8[_0x19a6('0x104')]!=='Success'){this[_0x19a6('0xbd')](_0x371102);return this[_0x19a6('0x105')](_0x3b01d9,_0x371102,_0x12c2a8)[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x106')));}this[_0x19a6('0x24')][_0x12c2a8[_0x19a6('0xbb')]]=_0x3b01d9;}};Dialer['prototype']['syncVarSet']=function(_0x3289bc){var _0x3bfd2b=this;var _0x46def0=this[_0x19a6('0x24')][_0x3289bc[_0x19a6('0xbb')]];var _0x23bcee;if(!_['isNil'](_0x3289bc)&&!_[_0x19a6('0xee')](_0x3289bc[_0x19a6('0x107')])&&!_[_0x19a6('0xee')](_0x3289bc[_0x19a6('0x107')][_0x19a6('0x108')])&&_0x3289bc[_0x19a6('0x109')]===_0x19a6('0x10a')&&_0x46def0){if(_0x46def0[_0x19a6('0x3c')]!=='ivr'&&this['voiceQueues'][_0x46def0[_0x19a6('0xba')]][_0x19a6('0x10b')]&&_0x3289bc[_0x19a6('0x10c')]==='HANGUP'){delete this['uniqueId'][_0x3289bc[_0x19a6('0xbb')]];this['updateOriginated'](this[_0x19a6('0x1c')][_0x46def0[_0x19a6('0xba')]]);this[_0x19a6('0x1c')][_0x46def0[_0x19a6('0xba')]][_0x19a6('0x10d')]+=0x1;this['voiceQueues'][_0x46def0['queue']][_0x19a6('0x10e')]+=0x1;_0x23bcee=new Hangup(_0x46def0,_0x3289bc);_0x23bcee[_0x19a6('0x6a')]=0x12;_0x23bcee['statedesc']='HangupInAMD';_0x23bcee['membername']=_0x19a6('0x10f');ami[_0x19a6('0x3b')](_0x19a6('0x110'),ut[_0x19a6('0x111')](_0x23bcee,'amd'));this[_0x19a6('0x112')](_0x23bcee,_0x19a6('0x113'),'[syncHangupInAMD]');}if(_0x46def0['type']!==_0x19a6('0xbc')&&this[_0x19a6('0x1c')][_0x46def0[_0x19a6('0xba')]][_0x19a6('0x10b')]&&_0x3289bc[_0x19a6('0x10c')]==='MACHINE'){return new Promise(function(_0x42a18b,_0x464488){delete _0x3bfd2b[_0x19a6('0x24')][_0x3289bc['uniqueid']];_0x3bfd2b[_0x19a6('0xbd')](_0x3bfd2b['voiceQueues'][_0x46def0['queue']]);_0x3bfd2b[_0x19a6('0x1c')][_0x46def0[_0x19a6('0xba')]][_0x19a6('0x10d')]+=0x1;_0x3bfd2b[_0x19a6('0x1c')][_0x46def0[_0x19a6('0xba')]][_0x19a6('0x10e')]+=0x1;var _0x140fcb=_0x3bfd2b[_0x19a6('0x1c')][_0x46def0[_0x19a6('0xba')]];var _0x19d3b2=new Hangup(_0x46def0,_0x3289bc);_0x19d3b2[_0x19a6('0x6a')]=0x13;_0x19d3b2[_0x19a6('0xca')]=_0x19a6('0x114');_0x19d3b2['membername']=_0x19a6('0x10f');_0x19d3b2[_0x19a6('0x115')]+=0x1;_0x19d3b2[_0x19a6('0x116')]+=0x1;_0x19d3b2[_0x19a6('0x117')]=!![];ami[_0x19a6('0x3b')]('custom:amd',ut[_0x19a6('0x111')](_0x19d3b2,'amd'));hopperUtils[_0x19a6('0xc3')](_0x19d3b2)['catch'](loggerCatch(_0x19a6('0x118')));if(_0x19d3b2[_0x19a6('0x119')]+_0x19d3b2[_0x19a6('0x11a')]+_0x19d3b2[_0x19a6('0x11b')]+_0x19d3b2[_0x19a6('0x11c')]+_0x19d3b2[_0x19a6('0xd3')]+_0x19d3b2[_0x19a6('0xe4')]+_0x19d3b2['countmachineretry']+_0x19d3b2['countagentrejectretry']>=_0x140fcb[_0x19a6('0x11d')]){_0x3bfd2b[_0x19a6('0x11e')](_0x19d3b2,_0x42a18b,_0x464488,'reason19\x20machine....');}else{if(_0x19d3b2[_0x19a6('0x115')]>=_0x140fcb[_0x19a6('0x11f')]){_0x3bfd2b['createStateFinal'](_0x19d3b2,_0x42a18b,_0x464488,'reason\x2019\x20machine....');}else{hopperUtils[_0x19a6('0xd2')]({'active':![],'countmachineretry':_0x19d3b2[_0x19a6('0x115')],'scheduledat':moment()[_0x19a6('0xe8')](_0x140fcb[_0x19a6('0x120')],'minutes')[_0x19a6('0x40')](_0x19a6('0xbe')),'ContactId':_0x19d3b2['ContactId'],'ListId':_0x19d3b2[_0x19a6('0xd7')],'VoiceQueueId':_0x19d3b2[_0x19a6('0xd8')]||undefined,'CampaignId':_0x19d3b2[_0x19a6('0xd9')]||undefined})[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x121')));_0x42a18b({'reschedule':0x1});}}});}if(_0x46def0[_0x19a6('0x3c')]===_0x19a6('0xbc')&&this[_0x19a6('0x1d')][_0x46def0[_0x19a6('0xba')]][_0x19a6('0x10b')]&&_0x3289bc[_0x19a6('0x10c')]==='HANGUP'){delete this[_0x19a6('0x24')][_0x3289bc['uniqueid']];this['updateOriginated'](this[_0x19a6('0x1d')][_0x46def0['queue']]);_0x23bcee=new Hangup(_0x46def0,_0x3289bc);_0x23bcee['state']=0x12;_0x23bcee[_0x19a6('0xca')]=_0x19a6('0x122');_0x23bcee['membername']='AMD';ami[_0x19a6('0x3b')]('custom:amd',ut['buildObj'](_0x23bcee,_0x19a6('0x117')));this[_0x19a6('0x112')](_0x23bcee,_0x19a6('0x123'),_0x19a6('0x124'));}if(_0x46def0['type']===_0x19a6('0xbc')&&this[_0x19a6('0x1d')][_0x46def0[_0x19a6('0xba')]][_0x19a6('0x10b')]&&_0x3289bc[_0x19a6('0x10c')]===_0x19a6('0x125')){return new Promise(function(_0x3a4fdc,_0x249187){delete _0x3bfd2b[_0x19a6('0x24')][_0x3289bc[_0x19a6('0xbb')]];_0x3bfd2b['updateOriginated'](_0x3bfd2b['campaigns'][_0x46def0['queue']]);_0x3bfd2b[_0x19a6('0x1d')][_0x46def0[_0x19a6('0xba')]][_0x19a6('0x10d')]+=0x1;_0x3bfd2b[_0x19a6('0x1d')][_0x46def0[_0x19a6('0xba')]][_0x19a6('0x10e')]+=0x1;var _0x2c299b=_0x3bfd2b[_0x19a6('0x1d')][_0x46def0[_0x19a6('0xba')]];var _0x44c3e7=new Hangup(_0x46def0,_0x3289bc);_0x44c3e7[_0x19a6('0x6a')]=0x13;_0x44c3e7['statedesc']=_0x19a6('0x114');_0x44c3e7[_0x19a6('0x126')]=_0x19a6('0x10f');_0x44c3e7[_0x19a6('0x115')]+=0x1;_0x44c3e7['countglobal']+=0x1;_0x44c3e7[_0x19a6('0x117')]=!![];ami[_0x19a6('0x3b')](_0x19a6('0x110'),ut[_0x19a6('0x111')](_0x44c3e7,_0x19a6('0x117')));hopperUtils['createHistory'](_0x44c3e7)[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x118')));if(_0x44c3e7[_0x19a6('0x119')]+_0x44c3e7[_0x19a6('0x11a')]+_0x44c3e7['countnoanswerretry']+_0x44c3e7[_0x19a6('0x11c')]+_0x44c3e7[_0x19a6('0xd3')]+_0x44c3e7[_0x19a6('0xe4')]+_0x44c3e7['countmachineretry']+_0x44c3e7[_0x19a6('0x127')]>=_0x2c299b['dialGlobalMaxRetry']){_0x3bfd2b[_0x19a6('0x11e')](_0x44c3e7,_0x3a4fdc,_0x249187,_0x19a6('0x128'));}else{if(_0x44c3e7[_0x19a6('0x115')]>=_0x2c299b[_0x19a6('0x11f')]){_0x3bfd2b[_0x19a6('0x129')](_0x44c3e7,_0x3a4fdc,_0x249187,_0x19a6('0x12a'));}else{hopperUtils[_0x19a6('0xd2')]({'active':![],'countmachineretry':_0x44c3e7[_0x19a6('0x115')],'scheduledat':moment()[_0x19a6('0xe8')](_0x2c299b[_0x19a6('0x120')],_0x19a6('0xd5'))['format'](_0x19a6('0xbe')),'ContactId':_0x44c3e7['ContactId'],'ListId':_0x44c3e7['ListId'],'VoiceQueueId':_0x44c3e7['VoiceQueueId']||undefined,'CampaignId':_0x44c3e7['CampaignId']||undefined})[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x121')));_0x3a4fdc({'reschedule':0x1});}}});}}};Dialer[_0x19a6('0x7c')][_0x19a6('0x31')]=function(_0x45255f){var _0x24d895=this['uniqueId'][_0x45255f['uniqueid']];var _0x5af359;if(_0x24d895&&_0x24d895['type']===_0x19a6('0xbc')){delete this[_0x19a6('0x24')][_0x45255f['uniqueid']];this['updateOriginated'](this[_0x19a6('0x1d')][_0x24d895[_0x19a6('0xba')]]);this['campaigns'][_0x24d895[_0x19a6('0xba')]][_0x19a6('0x12b')]+=0x1;_0x5af359=new Hangup(_0x24d895,_0x45255f);hopperUtils[_0x19a6('0xc3')](_0x5af359)[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x12c')));hopperUtils[_0x19a6('0xc5')](_0x5af359)['catch'](loggerCatch('[syncHangupIvr]'));}if(_0x24d895&&_0x24d895[_0x19a6('0x3c')]!=='ivr'&&isNotNull(this[_0x19a6('0x1c')][_0x24d895[_0x19a6('0xba')]][_0x19a6('0x12d')])){delete this['uniqueId'][_0x45255f['uniqueid']];this[_0x19a6('0xbd')](this[_0x19a6('0x1c')][_0x24d895['queue']]);this[_0x19a6('0x1c')][_0x24d895[_0x19a6('0xba')]][_0x19a6('0x10d')]+=0x1;this[_0x19a6('0x1c')][_0x24d895[_0x19a6('0xba')]][_0x19a6('0x10e')]+=0x1;_0x5af359=new Hangup(_0x24d895,_0x45255f);_0x5af359[_0x19a6('0x6a')]=0x10;_0x5af359[_0x19a6('0xca')]=_0x19a6('0x12e');_0x5af359[_0x19a6('0x126')]='AGI';hopperUtils['createHistory'](_0x5af359)[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x12c')));hopperUtils[_0x19a6('0xc5')](_0x5af359)['catch'](loggerCatch(_0x19a6('0x12f')));}if(_0x24d895&&_0x24d895[_0x19a6('0x3c')]!==_0x19a6('0xbc')&&!isNotNull(this['voiceQueues'][_0x24d895[_0x19a6('0xba')]][_0x19a6('0x12d')])){delete this[_0x19a6('0x24')][_0x45255f['uniqueid']];this['updateOriginated'](this[_0x19a6('0x1c')][_0x24d895[_0x19a6('0xba')]]);this[_0x19a6('0x1c')][_0x24d895[_0x19a6('0xba')]][_0x19a6('0x130')]+=0x1;_0x5af359=new Hangup(_0x24d895,_0x45255f);_0x5af359['state']=0xc;_0x5af359[_0x19a6('0xca')]=_0x45255f['cause-txt'];_0x5af359['membername']=_0x19a6('0x131');hopperUtils[_0x19a6('0xc3')](_0x5af359)[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x12c')));hopperUtils['moveContactManagedDialer'](_0x5af359)[_0x19a6('0x9a')](loggerCatch('[syncHangupIvr]'));}};Dialer[_0x19a6('0x7c')][_0x19a6('0xb')]=function(_0xd754b5){var _0x842384=this;if(!_0x842384[_0x19a6('0x29')][_0xd754b5[_0x19a6('0x5c')]]){_0x842384[_0x19a6('0x29')][_0xd754b5[_0x19a6('0x5c')]]={'running':![]};}else if(_0x842384[_0x19a6('0x29')][_0xd754b5['name']]['running']===!![]){return;}else if(_0x842384['queuesSummary'][_0xd754b5[_0x19a6('0x5c')]][_0x19a6('0x132')]===![]){_0x842384[_0x19a6('0x29')][_0xd754b5['name']][_0x19a6('0x132')]=!![];}var _0x3e31d5=_0x842384[_0x19a6('0x1c')][_0xd754b5[_0x19a6('0x5c')]];var _0x2848a4=_0x3e31d5[_0x19a6('0x64')]!==utils[_0x19a6('0x65')]['INACTIVE'];var _0x120e5a=utils[_0x19a6('0x133')](_0x3e31d5);_0x3e31d5[_0x19a6('0x134')]=utils[_0x19a6('0x135')](_0x3e31d5,_0x842384[_0x19a6('0x1f')]);Promise[_0x19a6('0x136')]()[_0x19a6('0x39')](function(){if(_0x3e31d5['statusMessage']===utils['CAMPAIGN_STATUS'][_0x19a6('0x74')]){if(_0x2848a4){clearPredictiveAttributes(_0x3e31d5);_0xd754b5['startPredictive']=undefined;_0xd754b5[_0x19a6('0x5a')]=undefined;}if(_0x3e31d5[_0x19a6('0x134')]===utils[_0x19a6('0x65')][_0x19a6('0x74')]){_0xd754b5[_0x19a6('0x137')]=0x0;_0xd754b5[_0x19a6('0xf3')]=0x0;_0xd754b5[_0x19a6('0x138')]=0x0;_0xd754b5[_0x19a6('0x139')]=0x0;_0xd754b5[_0x19a6('0x13a')]=0x0;}}else if(_0x3e31d5[_0x19a6('0x134')]===utils[_0x19a6('0x65')][_0x19a6('0x13b')]&&!_0x120e5a){return _0x842384[_0x19a6('0x8b')](_0x3e31d5,!![])[_0x19a6('0x39')](function(){return _0x842384[_0x19a6('0x8b')](_0x3e31d5,![]);})['then'](function(){return _0x842384[_0x19a6('0xa9')](_0x3e31d5);})[_0x19a6('0x9a')](function(_0x4f5db0){loggerSyncQueueSummary['debug'](_0x19a6('0x13c'),util[_0x19a6('0x3f')](_0x4f5db0,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x3e31d5);});}else{clearPredictiveAttributes(_0x3e31d5);}})[_0x19a6('0x39')](function(){var _0x79b124=_0xd754b5[_0x19a6('0x13d')](_0x3e31d5);if(_0x79b124||_0x3e31d5[_0x19a6('0x13e')]){_0x3e31d5[_0x19a6('0x13e')]=![];_0xd754b5[_0x19a6('0x13f')](_0x3e31d5);Object[_0x19a6('0x140')](_0x3e31d5,_0xd754b5);emitOutboundVoiceQueueSummary(_0xd754b5);}_0x842384[_0x19a6('0x29')][_0x3e31d5[_0x19a6('0x5c')]][_0x19a6('0x132')]=![];})[_0x19a6('0x9a')](function(_0x20f7ad){logger[_0x19a6('0x60')]('[syncQueueSummary]',util[_0x19a6('0x3f')](_0x20f7ad,{'showHidden':![],'depth':null}));_0x842384['queuesSummary'][_0x3e31d5['name']][_0x19a6('0x132')]=![];});};Dialer[_0x19a6('0x7c')][_0x19a6('0x30')]=_[_0x19a6('0x141')](function(){var _0x562a29=_['filter'](this[_0x19a6('0x1c')],function(_0x34b3dc){return _0x34b3dc[_0x19a6('0x142')];});var _0x419fa0=_[_0x19a6('0x143')](this['agents'],function(_0x2f05f9){return _0x2f05f9[_0x19a6('0x144')]&&_0x2f05f9['status']===_0x19a6('0x81');});if(_0x562a29[_0x19a6('0x92')]>0x0&&_0x419fa0[_0x19a6('0x92')]>0x0){return Promise[_0x19a6('0x136')]()[_0x19a6('0x39')](cmHopper[_0x19a6('0x145')](_[_0x19a6('0x146')](_0x562a29,'id'),previewRecallmeReminderInterval,_[_0x19a6('0x146')](_0x419fa0,'id')))[_0x19a6('0x39')](function(_0x40eae9){for(var _0x3eb013=0x0;_0x3eb013<_0x40eae9['length'];_0x3eb013++){var _0xd61502=_0x40eae9[_0x3eb013][_0x19a6('0x147')]['name'];if(_0xd61502)io['to'](util[_0x19a6('0x40')]('user:%s',_0xd61502))[_0x19a6('0x3b')](_0x19a6('0x148'),{'hopper':_0x40eae9[_0x3eb013]});}})[_0x19a6('0x9a')](function(_0x23a90e){logger[_0x19a6('0x60')](_0x19a6('0x149'),_0x23a90e);});}},0x3c*0x3e8,{'leading':!![]});Dialer['prototype'][_0x19a6('0x37')]=function(){var _0x3d79c2=this;setInterval(function(){_0x3d79c2[_0x19a6('0x14a')](_0x3d79c2['uniqueId'],_0x19a6('0x14b'));_0x3d79c2[_0x19a6('0x14a')](_0x3d79c2[_0x19a6('0x22')],'[actions]');},0x32c8);};Dialer[_0x19a6('0x7c')]['clearZombieChannels']=function(_0x1c9f3d,_0xb52245){var _0x3e86a5=this;for(var _0x8742a1 in _0x1c9f3d){if(typeof _0x1c9f3d[_0x8742a1]!==_0x19a6('0xa3')){this[_0x19a6('0x1a')][_0x19a6('0x17')](function(){if(!_[_0x19a6('0xee')](_0x1c9f3d[_0x8742a1])){return ami[_0x19a6('0x94')]({'action':_0x19a6('0x80'),'channel':_0x1c9f3d[_0x8742a1]['channel']})['catch'](function(_0x23f3b7){if(_0x23f3b7['message']===_0x19a6('0x14c')){setTimeout(function(){if(_0x1c9f3d[_0x8742a1]&&_0x1c9f3d[_0x8742a1][_0x19a6('0x3c')]!==_0x19a6('0xbc')){_0x3e86a5['updateOriginated'](_0x3e86a5[_0x19a6('0x1c')][_0x1c9f3d[_0x8742a1]['queue']]);logger[_0x19a6('0x60')](_0x19a6('0x14d'),_0xb52245,_0x8742a1,_0x1c9f3d[_0x8742a1][_0x19a6('0xba')]);delete _0x1c9f3d[_0x8742a1];}if(_0x1c9f3d[_0x8742a1]&&_0x1c9f3d[_0x8742a1]['type']===_0x19a6('0xbc')){_0x3e86a5[_0x19a6('0xbd')](_0x3e86a5[_0x19a6('0x1d')][_0x1c9f3d[_0x8742a1][_0x19a6('0xba')]]);logger[_0x19a6('0x60')](_0x19a6('0x14e'),_0xb52245,_0x8742a1,_0x1c9f3d[_0x8742a1]['queue']);delete _0x1c9f3d[_0x8742a1];}},0x2328);}});}});}}};Dialer[_0x19a6('0x7c')][_0x19a6('0x14f')]=function(_0x410e1d){return Promise[_0x19a6('0x136')]()[_0x19a6('0x39')](voiceQueueRt[_0x19a6('0x14f')](_0x410e1d))[_0x19a6('0x9a')](loggerCatch('[getVoiceQueueRtPauses]\x20'));};Dialer[_0x19a6('0x7c')][_0x19a6('0xbd')]=function(_0x59bebd){if(!_[_0x19a6('0x4c')](_0x59bebd)&&_0x59bebd!==null){if(typeof _0x59bebd[_0x19a6('0x77')]!=='undefined'){if(_0x59bebd[_0x19a6('0x77')]>0x0){_0x59bebd[_0x19a6('0x77')]-=0x1;}else{logger['error']('[updateOriginated]\x20object\x20originated\x20is\x20negative');}}}else{logger[_0x19a6('0x60')](_0x19a6('0x150'));}};Dialer[_0x19a6('0x7c')]['loggerHandler']=function(_0x4eb40d,_0x3ffd25){var _0x1fe722=this;return function(_0x30ec3b){_0x1fe722[_0x19a6('0xbd')](_0x3ffd25);logger[_0x19a6('0x60')](_0x4eb40d,util[_0x19a6('0x3f')](_0x30ec3b,{'showHidden':![],'depth':null}));};};Dialer['prototype']['emptyContact']=function(_0xa548e4,_0x1af51d,_0x3feca0){var _0xd2022e={'state':0x19,'statedesc':_0x19a6('0x151')};this[_0x19a6('0xbd')](_0x1af51d);this[_0x19a6('0x112')](_[_0x19a6('0x58')](_0xd2022e,_[_0x19a6('0xf2')](_0x3feca0,[_0x19a6('0xd6'),'ListId',_0x19a6('0x152'),'VoiceQueueId','CampaignId'])),_0x19a6('0x153'),_0x19a6('0x154'));logger[_0x19a6('0x60')](_0xa548e4);};Dialer[_0x19a6('0x7c')]['saveInDb']=function(_0x11ee90,_0x3f60fc,_0x575249){hopperUtils['createHistory'](_0x11ee90)[_0x19a6('0x9a')](loggerCatch(_0x3f60fc));hopperUtils[_0x19a6('0xc5')](_0x11ee90)[_0x19a6('0x9a')](loggerCatch(_0x575249));};Dialer[_0x19a6('0x7c')]['queueCallerAbandonCreateState']=function(_0x3aff2a,_0x3813f7){hopperUtils[_0x19a6('0xc3')](_0x3aff2a)['catch'](loggerCatch(_0x19a6('0xc4')));if(_0x3813f7==0x0){hopperUtils[_0x19a6('0xc5')](_0x3aff2a)[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x155')));}};Dialer[_0x19a6('0x7c')]['checkPreviewRecallReminder']=function(_0x229fac){return Promise[_0x19a6('0x136')]()[_0x19a6('0x39')](cmHopper[_0x19a6('0x145')](_0x229fac['id'],previewRecallmeReminderInterval))[_0x19a6('0x39')](function(_0x2424fb){for(var _0x56ecd2=0x0;_0x56ecd2<_0x2424fb['length'];_0x56ecd2++){var _0x416d30=_0x2424fb[_0x56ecd2][_0x19a6('0x147')][_0x19a6('0x5c')];if(_0x416d30)io['to'](util[_0x19a6('0x40')](_0x19a6('0x156'),_0x416d30))[_0x19a6('0x3b')](_0x19a6('0x148'),{'hopper':_0x2424fb[_0x56ecd2]});}})['catch'](function(){});};Dialer[_0x19a6('0x7c')][_0x19a6('0xa7')]=function(_0x4fb553){var _0x273ac4=this;return function(){_0x273ac4[_0x19a6('0x157')](_0x4fb553);};};Dialer[_0x19a6('0x7c')][_0x19a6('0x158')]=function(_0x5be7a6,_0x2bcca1){var _0x570643=this;var _0xcb5b3f=uuid['v4']();this[_0x19a6('0x22')][_0xcb5b3f]=new Action(_0x5be7a6,_0x2bcca1,_0xcb5b3f);return new Promise(function(_0x2db49d,_0x415649){if(_[_0x19a6('0x4c')](_0x5be7a6)&&typeof _0x5be7a6!==_0x19a6('0x159')){return _0x415649(msgResponse(_0x19a6('0x15a'),_0x19a6('0x8c'),_0x19a6('0x15b')));}if(_[_0x19a6('0x4c')](_0x2bcca1[_0x19a6('0x15c')])||_0x2bcca1['phone']===null){return _0x415649(msgResponse(_0x19a6('0x15a'),'Failure','contact\x20is\x20undefine'));}var _0x8f9e98={'XMD-CALLERID':_0x570643[_0x19a6('0x22')][_0xcb5b3f]['getCaller'](),'XMD-AGI':_0x5be7a6['dialQueueProject']?util[_0x19a6('0x40')](_0x19a6('0x15d'),ipAgi,_0x5be7a6[_0x19a6('0x12d')]):_0x19a6('0x15e'),'XMD-AGIAFTER':_0x5be7a6[_0x19a6('0x15f')]?util[_0x19a6('0x40')](_0x19a6('0x15d'),ipAgi,_0x5be7a6[_0x19a6('0x15f')]):_0x19a6('0x15e'),'XMD-QUEUE':utils['isOutboundQueue'](_0x5be7a6)?util[_0x19a6('0x40')](_0x19a6('0x160'),_0x5be7a6[_0x19a6('0x5c')],_0x5be7a6[_0x19a6('0x161')]||'',_0x5be7a6['dialAgiAfterHangupAgent']?'c':'',_0x5be7a6[_0x19a6('0x162')]||0x3):_0x19a6('0x15e'),'XMD-CONTACTID':_0x2bcca1[_0x19a6('0xd6')],'XMD-CDRTYPE':'dialer','CALLERID(all)':_0x570643[_0x19a6('0x22')][_0xcb5b3f]['getCaller'](),'XMD-AMD':_0x5be7a6[_0x19a6('0x10b')]?_0x19a6('0x13b'):'NONE','XMD-DESTINATION':_0x19a6('0x10a')};if(_0x5be7a6[_0x19a6('0x10b')]){_0x8f9e98['XMD-AMDINITIALSILENCE']=_0x5be7a6['dialAMDInitialSilence']||0x9c4;_0x8f9e98[_0x19a6('0x163')]=_0x5be7a6['dialAMDGreeting']||0x5dc;_0x8f9e98[_0x19a6('0x164')]=_0x5be7a6[_0x19a6('0x165')]||0x320;_0x8f9e98['XMD-AMDTOTALANALYSISTIME']=_0x5be7a6[_0x19a6('0x166')]||0x1388;_0x8f9e98[_0x19a6('0x167')]=_0x5be7a6[_0x19a6('0x168')]||0x64;_0x8f9e98['XMD-AMDBETWEENWORDSSILENCE']=_0x5be7a6['dialAMDBetweenWordsSilence']||0x32;_0x8f9e98[_0x19a6('0x169')]=_0x5be7a6[_0x19a6('0x16a')]||0x3;_0x8f9e98['XMD-AMDSILENCETHRESHOLD']=_0x5be7a6[_0x19a6('0x16b')]||0x100;_0x8f9e98[_0x19a6('0x16c')]=_0x5be7a6[_0x19a6('0x16d')]||0x1388;}if(utils[_0x19a6('0x16e')](_0x5be7a6)){_0x8f9e98[_0x19a6('0x16f')]=_0x2bcca1[_0x19a6('0xd8')];}else{_0x8f9e98[_0x19a6('0x170')]=_0x2bcca1[_0x19a6('0xd9')];}for(var _0x115ee9 in _0x2bcca1[_0x19a6('0x171')]){if(typeof _0x2bcca1['Contact'][_0x115ee9]!==_0x19a6('0xa3')){if(isNotNull(_0x2bcca1[_0x19a6('0x171')][_0x115ee9])&&_0x115ee9!=='id'&&_0x115ee9!==_0x19a6('0x172')&&_0x115ee9!==_0x19a6('0x173')&&_0x115ee9!==_0x19a6('0x174')){_0x8f9e98[util[_0x19a6('0x40')](_0x19a6('0x175'),_0x19a6('0x176'),_[_0x19a6('0x177')](_0x115ee9))]=_0x2bcca1['Contact'][_0x115ee9];}}}var _0x6306ba=_0x570643[_0x19a6('0x7d')](_0x5be7a6[_0x19a6('0x84')])?utils['getCallerId'](_0x5be7a6['Trunk'][_0x19a6('0x178')],_0x5be7a6[_0x19a6('0x179')],_0x5be7a6[_0x19a6('0x17a')]>0x0?utils[_0x19a6('0x17b')](_0x5be7a6[_0x19a6('0x17c')],_0x5be7a6[_0x19a6('0x17a')]):_0x5be7a6[_0x19a6('0x17c')]):utils[_0x19a6('0x17d')](_[_0x19a6('0xee')](_0x5be7a6[_0x19a6('0x85')])?_0x5be7a6[_0x19a6('0x84')][_0x19a6('0x178')]:_0x5be7a6[_0x19a6('0x85')][_0x19a6('0x178')],_0x5be7a6[_0x19a6('0x179')],_0x5be7a6[_0x19a6('0x17a')]>0x0?utils['getCallerIdRandom'](_0x5be7a6['dialOriginateCallerIdNumber'],_0x5be7a6[_0x19a6('0x17a')]):_0x5be7a6[_0x19a6('0x17c')]);if(_0x6306ba){_0x8f9e98[_0x19a6('0x17e')]=_0x570643[_0x19a6('0x22')][_0xcb5b3f][_0x19a6('0x17f')]=utils[_0x19a6('0x180')](_0x6306ba);_0x8f9e98[_0x19a6('0x181')]=_0x2bcca1[_0x19a6('0x15c')];}_0x5be7a6['variables']=_0x8f9e98;return ami['Action']({'actionid':_0xcb5b3f,'action':_0x19a6('0x15a'),'channel':_0x570643['isTrunkReachable'](_0x5be7a6[_0x19a6('0x84')])?util[_0x19a6('0x40')](_0x19a6('0x182'),_0x5be7a6[_0x19a6('0x84')][_0x19a6('0x5c')],isNotNull(_0x5be7a6[_0x19a6('0x183')])?_0x5be7a6['dialPrefix'][_0x19a6('0x184')]()||'':'',_0x5be7a6[_0x19a6('0x185')]>0x0?_0x2bcca1[_0x19a6('0x15c')]['substring'](_0x5be7a6['dialCutDigit']):_0x2bcca1[_0x19a6('0x15c')]):util[_0x19a6('0x40')](_0x19a6('0x182'),_[_0x19a6('0xee')](_0x5be7a6[_0x19a6('0x85')])?_0x5be7a6[_0x19a6('0x84')][_0x19a6('0x5c')]:_0x5be7a6[_0x19a6('0x85')][_0x19a6('0x5c')],isNotNull(_0x5be7a6['dialPrefix'])?_0x5be7a6[_0x19a6('0x183')]['trim']()||'':'',_0x5be7a6['dialCutDigit']>0x0?_0x2bcca1[_0x19a6('0x15c')]['substring'](_0x5be7a6[_0x19a6('0x185')]):_0x2bcca1['phone']),'callerid':_0x6306ba,'Exten':_0x19a6('0x10a'),'Context':_0x19a6('0x186'),'Priority':'1','variable':_0x8f9e98,'timeout':(_0x5be7a6[_0x19a6('0x187')]||0x1e)*0x3e8,'async':!![],'channelid':_0xcb5b3f})[_0x19a6('0x39')](function(_0x11fb4f){return _0x2db49d(_0x11fb4f);})[_0x19a6('0x9a')](function(_0x233e16){_0x5be7a6[_0x19a6('0x188')]+=0x1;var _0xa33748=new History(_0x570643['actions'][_0xcb5b3f]);logger['error'](util['format'](_0x19a6('0x189'),JSON[_0x19a6('0x6e')](_0x233e16)));_0xa33748[_0x19a6('0x6a')]=0xe;_0xa33748['statedesc']=_0x19a6('0x18a');_0xa33748[_0x19a6('0xdb')]=moment()[_0x19a6('0x40')]('YYYY-MM-DD\x20HH:mm:ss');_0xa33748[_0x19a6('0xdc')]=_0xa33748[_0x19a6('0xdb')];hopperUtils[_0x19a6('0xc3')](_0xa33748)[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x18b')));_0x570643[_0x19a6('0xc5')](_0xa33748)['catch'](loggerCatch(_0x19a6('0x18b')))['finally'](function(){delete _0x570643[_0x19a6('0x22')][_0xcb5b3f];return _0x415649(msgResponse(_0x19a6('0x15a'),'Error',_0x19a6('0x18c')));});});});};Dialer['prototype']['checkRetriveMax']=function(_0x5675d6,_0x7f9d52,_0x10da11){var _0x4e6d68=new History(_0x7f9d52);if(_0x4e6d68[_0x19a6('0x119')]+_0x4e6d68[_0x19a6('0x11a')]+_0x4e6d68['countnoanswerretry']+_0x4e6d68[_0x19a6('0x11c')]+_0x4e6d68[_0x19a6('0xd3')]+_0x4e6d68['countabandonedretry']+_0x4e6d68[_0x19a6('0x115')]+_0x4e6d68[_0x19a6('0x127')]>=_0x10da11[_0x19a6('0x11d')]-0x1){return!![];}switch(_0x5675d6){case 0x3:if(_0x4e6d68[_0x19a6('0x11b')]>=_0x10da11[_0x19a6('0x18d')]-0x1){return!![];}hopperUtils[_0x19a6('0xd2')]({'active':![],'countnoanswerretry':_0x4e6d68[_0x19a6('0x11b')]+=0x1,'scheduledat':moment()['add'](_0x10da11[_0x19a6('0x18e')],_0x19a6('0xd5'))[_0x19a6('0x40')](_0x19a6('0xbe')),'ContactId':_0x4e6d68['ContactId'],'ListId':_0x4e6d68[_0x19a6('0xd7')],'VoiceQueueId':_0x4e6d68[_0x19a6('0xd8')]||undefined,'CampaignId':_0x4e6d68[_0x19a6('0xd9')]||undefined})[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x18f')));break;case 0x5:if(_0x4e6d68['countbusyretry']>=_0x10da11[_0x19a6('0x190')]-0x1){return!![];}hopperUtils[_0x19a6('0xd2')]({'active':![],'countbusyretry':_0x4e6d68[_0x19a6('0x119')]+=0x1,'scheduledat':moment()[_0x19a6('0xe8')](_0x10da11[_0x19a6('0x191')],_0x19a6('0xd5'))['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x4e6d68[_0x19a6('0xd6')],'ListId':_0x4e6d68['ListId'],'VoiceQueueId':_0x4e6d68[_0x19a6('0xd8')]||undefined,'CampaignId':_0x4e6d68[_0x19a6('0xd9')]||undefined})[_0x19a6('0x9a')](loggerCatch('[rescheduleContact]\x20[Busy]'));break;case 0x8:if(_0x4e6d68[_0x19a6('0x11a')]>=_0x10da11[_0x19a6('0x192')]-0x1){return!![];}hopperUtils[_0x19a6('0xd2')]({'active':![],'countcongestionretry':_0x4e6d68['countcongestionretry']+=0x1,'scheduledat':moment()[_0x19a6('0xe8')](_0x10da11[_0x19a6('0x193')],_0x19a6('0xd5'))['format'](_0x19a6('0xbe')),'ContactId':_0x4e6d68[_0x19a6('0xd6')],'ListId':_0x4e6d68['ListId'],'VoiceQueueId':_0x4e6d68[_0x19a6('0xd8')]||undefined,'CampaignId':_0x4e6d68['CampaignId']||undefined})[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x194')));break;case 0x0:if(_0x4e6d68[_0x19a6('0x11c')]>=_0x10da11['dialNoSuchNumberMaxRetry']-0x1){return!![];}else{hopperUtils[_0x19a6('0xd2')]({'active':![],'countnosuchnumberretry':_0x4e6d68[_0x19a6('0x11c')]+=0x1,'scheduledat':moment()[_0x19a6('0xe8')](_0x10da11[_0x19a6('0x195')],_0x19a6('0xd5'))[_0x19a6('0x40')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x4e6d68[_0x19a6('0xd6')],'ListId':_0x4e6d68['ListId'],'VoiceQueueId':_0x4e6d68[_0x19a6('0xd8')]||undefined,'CampaignId':_0x4e6d68[_0x19a6('0xd9')]||undefined})[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x196')));}break;case 0xa:if(_0x4e6d68[_0x19a6('0xd3')]>=_0x10da11[_0x19a6('0x197')]-0x1){return!![];}hopperUtils[_0x19a6('0xd2')]({'active':![],'countdropretry':_0x4e6d68['countdropretry']+=0x1,'scheduledat':moment()[_0x19a6('0xe8')](_0x10da11[_0x19a6('0xd4')],_0x19a6('0xd5'))[_0x19a6('0x40')](_0x19a6('0xbe')),'ContactId':_0x4e6d68[_0x19a6('0xd6')],'ListId':_0x4e6d68[_0x19a6('0xd7')],'VoiceQueueId':_0x4e6d68[_0x19a6('0xd8')]||undefined,'CampaignId':_0x4e6d68[_0x19a6('0xd9')]||undefined})[_0x19a6('0x9a')](loggerCatch(_0x19a6('0xda')));break;case 0xb:if(_0x4e6d68[_0x19a6('0xe4')]>=_0x10da11['dialAbandonedMaxRetry']-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countabandonedretry':_0x4e6d68[_0x19a6('0xe4')]+=0x1,'scheduledat':moment()[_0x19a6('0xe8')](_0x10da11['dialAbandonedRetryFrequency'],'minutes')[_0x19a6('0x40')](_0x19a6('0xbe')),'ContactId':_0x4e6d68[_0x19a6('0xd6')],'ListId':_0x4e6d68[_0x19a6('0xd7')],'VoiceQueueId':_0x4e6d68['VoiceQueueId']||undefined,'CampaignId':_0x4e6d68[_0x19a6('0xd9')]||undefined})['catch'](loggerCatch(_0x19a6('0x198')));break;case 0x13:if(_0x4e6d68[_0x19a6('0x115')]>=_0x10da11[_0x19a6('0x11f')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countmachineretry':_0x4e6d68[_0x19a6('0x115')]+=0x1,'scheduledat':moment()[_0x19a6('0xe8')](_0x10da11[_0x19a6('0x120')],_0x19a6('0xd5'))['format'](_0x19a6('0xbe')),'ContactId':_0x4e6d68[_0x19a6('0xd6')],'ListId':_0x4e6d68['ListId'],'VoiceQueueId':_0x4e6d68[_0x19a6('0xd8')]||undefined,'CampaignId':_0x4e6d68[_0x19a6('0xd9')]||undefined})[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x121')));break;case 0x14:if(_0x4e6d68[_0x19a6('0x127')]>=_0x10da11[_0x19a6('0x199')]-0x1){return!![];}hopperUtils[_0x19a6('0xd2')]({'active':![],'countagentrejectretry':_0x4e6d68[_0x19a6('0x127')]+=0x1,'scheduledat':moment()[_0x19a6('0xe8')](_0x10da11[_0x19a6('0x19a')],_0x19a6('0xd5'))[_0x19a6('0x40')](_0x19a6('0xbe')),'ContactId':_0x4e6d68['ContactId'],'ListId':_0x4e6d68[_0x19a6('0xd7')],'VoiceQueueId':_0x4e6d68[_0x19a6('0xd8')]||undefined,'CampaignId':_0x4e6d68[_0x19a6('0xd9')]||undefined})[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x19b')));break;default:return!![];}};Dialer['prototype'][_0x19a6('0x105')]=function(_0x5c948f,_0x2c004d,_0xdac8f8){var _0x3057a0=this;var _0x32d236=new History(_0x5c948f);var _0x15a625=![];var _0x31b25e;var _0x51b8e1;return new Promise(function(_0x5f0b68,_0x20e296){if(_[_0x19a6('0x4c')](_0x2c004d)&&typeof _0x2c004d!==_0x19a6('0x159')){return _0x20e296(msgResponse(_0x19a6('0x19c'),_0x19a6('0x8c'),'entity\x20is\x20undefine'));}if(_[_0x19a6('0x4c')](_0xdac8f8)&&typeof _0xdac8f8!=='object'){return _0x20e296(msgResponse('[callProgressDetecting]',_0x19a6('0x8c'),_0x19a6('0x19d')));}hopperUtils['verifyAdditionalPhones'](_0x32d236,_0xdac8f8[_0x19a6('0xbf')],_0x2c004d)[_0x19a6('0x39')](function(_0x2b8aef){if(_0x2b8aef[_0x19a6('0xd0')]==0x1)_0x15a625=!![];switch(_0xdac8f8[_0x19a6('0xbf')]){case'0':_0x2c004d[_0x19a6('0x19e')]+=0x1;_0x32d236[_0x19a6('0x6a')]=0x0;_0x32d236[_0x19a6('0xca')]=_0x19a6('0x19f');_0x32d236[_0x19a6('0x11c')]+=0x1;_0x32d236[_0x19a6('0x116')]+=0x1;ami[_0x19a6('0x3b')](_0x19a6('0x1a0'),ut[_0x19a6('0x111')](_0x5c948f,_0x19a6('0x1a1')));_0x31b25e=_0x2c004d[_0x19a6('0x195')];_0x51b8e1=_0x2c004d[_0x19a6('0xce')];hopperUtils[_0x19a6('0xc3')](_0x32d236)['catch'](loggerCatch(_0x19a6('0x118')));if(_0x3057a0[_0x19a6('0x1a2')](0x0,_0x5c948f,_0x2c004d)&&!_0x15a625){if(_0x32d236[_0x19a6('0x11c')]>=_0x2c004d[_0x19a6('0x1a3')]){_0x3057a0[_0x19a6('0x129')](_0x32d236,_0x5f0b68,_0x20e296,_0x19a6('0x1a4'));}else{_0x3057a0[_0x19a6('0x11e')](_0x32d236,_0x5f0b68,_0x20e296,_0x19a6('0x1a4'));}}break;case'3':_0x2c004d[_0x19a6('0x1a5')]+=0x1;_0x32d236['state']=0x3;_0x32d236[_0x19a6('0xca')]='NoAnswer';_0x32d236[_0x19a6('0x11b')]+=0x1;_0x32d236[_0x19a6('0x116')]+=0x1;var _0x169570=ut[_0x19a6('0x1a6')](_0x5c948f,_0x2c004d);ami['emit']('custom:agentnoanswer',_0x169570);_0x31b25e=_0x2c004d[_0x19a6('0x18e')];_0x51b8e1=_0x2c004d['callAdditionalPhoneAfterMin'];hopperUtils['createHistory'](_0x32d236)['catch'](loggerCatch(_0x19a6('0x1a7')));if(_0x3057a0[_0x19a6('0x1a2')](0x3,_0x5c948f,_0x2c004d)&&!_0x15a625){if(_0x32d236[_0x19a6('0x11b')]>=_0x2c004d[_0x19a6('0x18d')]){_0x3057a0['createStateFinal'](_0x32d236,_0x5f0b68,_0x20e296,_0x19a6('0x1a8'));}else{_0x3057a0['stateGlobal'](_0x32d236,_0x5f0b68,_0x20e296,_0x19a6('0x1a8'));}}break;case'5':_0x2c004d[_0x19a6('0x1a9')]+=0x1;_0x32d236[_0x19a6('0x6a')]=0x5;_0x32d236['statedesc']='Busy';_0x32d236[_0x19a6('0x119')]+=0x1;_0x32d236['countglobal']+=0x1;ami[_0x19a6('0x3b')](_0x19a6('0x1aa'),ut['buildObj'](_0x5c948f,_0x19a6('0x1ab')));_0x31b25e=_0x2c004d['dialBusyRetryFrequency'];_0x51b8e1=_0x2c004d['callAdditionalPhoneAfterMin'];hopperUtils[_0x19a6('0xc3')](_0x32d236)[_0x19a6('0x9a')](loggerCatch('[syncAgentComplete][createHistory][5]'));if(_0x3057a0[_0x19a6('0x1a2')](0x5,_0x5c948f,_0x2c004d)&&!_0x15a625){if(_0x32d236[_0x19a6('0x119')]>=_0x2c004d['dialBusyMaxRetry']){_0x3057a0['createStateFinal'](_0x32d236,_0x5f0b68,_0x20e296,_0x19a6('0x1ac'));}else{_0x3057a0['stateGlobal'](_0x32d236,_0x5f0b68,_0x20e296,_0x19a6('0x1ac'));}}break;case'8':_0x2c004d['outboundCongestionCallsDay']+=0x1;_0x32d236[_0x19a6('0x6a')]=0x8;_0x32d236[_0x19a6('0xca')]=_0x19a6('0x1ad');_0x32d236[_0x19a6('0x11a')]+=0x1;_0x32d236[_0x19a6('0x116')]+=0x1;_0x31b25e=_0x2c004d['dialCongestionRetryFrequency'];_0x51b8e1=_0x2c004d[_0x19a6('0xce')];ami[_0x19a6('0x3b')](_0x19a6('0x1ae'),ut['buildObj'](_0x5c948f,_0x19a6('0x1af')));hopperUtils[_0x19a6('0xc3')](_0x32d236)[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x1b0')));if(_0x3057a0[_0x19a6('0x1a2')](0x8,_0x5c948f,_0x2c004d)&&!_0x15a625){if(_0x32d236[_0x19a6('0x11a')]>=_0x2c004d[_0x19a6('0x192')]){_0x3057a0[_0x19a6('0x129')](_0x32d236,_0x5f0b68,_0x20e296,'reason\x208\x20congestion');}else{_0x3057a0['stateGlobal'](_0x32d236,_0x5f0b68,_0x20e296,_0x19a6('0x1b1'));}}break;case'11':_0x2c004d[_0x19a6('0x1b2')]+=0x1;_0x32d236[_0x19a6('0x6a')]=0xb;_0x32d236['statedesc']=_0x19a6('0xe2');_0x32d236[_0x19a6('0xe4')]+=0x1;_0x32d236[_0x19a6('0x116')]+=0x1;_0x31b25e=_0x2c004d[_0x19a6('0xe5')];_0x51b8e1=_0x2c004d[_0x19a6('0xce')];hopperUtils[_0x19a6('0xc3')](_0x32d236)[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x1b3')));if(_0x3057a0[_0x19a6('0x1a2')](0xb,_0x5c948f,_0x2c004d)&&!_0x15a625){if(_0x32d236['countabandonedretry']>=_0x2c004d[_0x19a6('0xe7')]){_0x3057a0[_0x19a6('0x129')](_0x32d236,_0x5f0b68,_0x20e296,_0x19a6('0x1b4'));}else{_0x3057a0[_0x19a6('0x11e')](_0x32d236,_0x5f0b68,_0x20e296,_0x19a6('0x1b4'));}}break;case'20':_0x2c004d[_0x19a6('0x1b5')]+=0x1;_0x32d236[_0x19a6('0x6a')]=0x14;_0x32d236[_0x19a6('0xca')]=_0x19a6('0x1b6');_0x32d236[_0x19a6('0x127')]+=0x1;_0x32d236[_0x19a6('0x116')]+=0x1;_0x31b25e=_0x2c004d[_0x19a6('0x19a')];_0x51b8e1=_0x2c004d['callAdditionalPhoneAfterMin'];ami[_0x19a6('0x3b')]('custom:agentreject',ut[_0x19a6('0x111')](_0x5c948f,_0x19a6('0x1b7')));hopperUtils[_0x19a6('0xc3')](_0x32d236)[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x1b8')));if(_0x3057a0[_0x19a6('0x1a2')](0x14,_0x5c948f,_0x2c004d)&&!_0x15a625){if(_0x32d236[_0x19a6('0x127')]>=_0x2c004d[_0x19a6('0x199')]){_0x3057a0[_0x19a6('0x129')](_0x32d236,_0x5f0b68,_0x20e296,_0x19a6('0x1b9'));}else{_0x3057a0['stateGlobal'](_0x32d236,_0x5f0b68,_0x20e296,_0x19a6('0x1b9'));}}break;default:_0x2c004d['outboundUnknownCallsDay']+=0x1;_0x32d236[_0x19a6('0x6a')]=0xc;_0x32d236['statedesc']=_0xdac8f8[_0x19a6('0xbf')];_0x31b25e=_0x2c004d[_0x19a6('0x19a')];_0x51b8e1=_0x2c004d[_0x19a6('0xce')];hopperUtils[_0x19a6('0xc3')](_0x32d236)[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x1ba')));if(_0x3057a0[_0x19a6('0x1a2')](_0xdac8f8['reason'],_0x5c948f,_0x2c004d)&&!_0x15a625){if(_0x32d236[_0x19a6('0x119')]+_0x32d236[_0x19a6('0x11a')]+_0x32d236[_0x19a6('0x11b')]+_0x32d236['countnosuchnumberretry']+_0x32d236[_0x19a6('0xd3')]+_0x32d236[_0x19a6('0xe4')]+_0x32d236['countmachineretry']+_0x32d236[_0x19a6('0x127')]>=_0x2c004d[_0x19a6('0x11d')]){_0x3057a0[_0x19a6('0x11e')](_0x32d236,_0x5f0b68,_0x20e296,_0xdac8f8['reason']);}else{_0x3057a0[_0x19a6('0x129')](_0x32d236,_0x5f0b68,_0x20e296,_0xdac8f8[_0x19a6('0xbf')]);}}}})['then'](function(){if(_0x15a625){hopperUtils[_0x19a6('0xe0')](_0x32d236,_0x31b25e,_0x51b8e1)[_0x19a6('0x39')](function(){return _0x5f0b68(0x1);});}});});};Dialer['prototype'][_0x19a6('0x11e')]=function(_0x27817a,_0x28b9e9,_0x475f55,_0x5a2777){var _0x5ef07a=new Final(_0x27817a);_0x5ef07a['state']=0xf;_0x5ef07a[_0x19a6('0xca')]=_0x19a6('0x1bb');this[_0x19a6('0x129')](_0x5ef07a,_0x28b9e9,_0x475f55,_0x5a2777);};Dialer[_0x19a6('0x7c')][_0x19a6('0x129')]=function(_0x3eef37,_0x15e0ca,_0x49b025,_0x3177f9){hopperUtils[_0x19a6('0xc5')](_0x3eef37)[_0x19a6('0x39')](function(){return _0x15e0ca(msgResponse(_0x19a6('0x19c'),_0x19a6('0x1bc'),_0x3177f9));})['catch'](function(){return _0x49b025(msgResponse(_0x19a6('0x1bd'),'Failure','contact\x20not\x20moved'));});};Dialer[_0x19a6('0x7c')][_0x19a6('0xa')]=function(_0x2b9801){var _0x20a6d3=_0x2b9801[_0x19a6('0x1be')]/0x64;var _0x16526b=_0x2b9801[_0x19a6('0xc8')]/(_0x2b9801[_0x19a6('0xc8')]+_0x2b9801[_0x19a6('0x10d')]);var _0x377990=Math['round'](_0x2b9801[_0x19a6('0x1bf')]*(_0x2b9801[_0x19a6('0x1c0')]/0x64));var _0x53e544=Math['round'](_0x2b9801[_0x19a6('0x1bf')]*(_0x2b9801[_0x19a6('0x1c1')]/0x64));var _0x246e40=_0x2b9801[_0x19a6('0x137')]+_0x2b9801[_0x19a6('0x139')];var _0x4853a2=Math[_0x19a6('0x1c2')](_0x2b9801[_0x19a6('0x52')]*_0x2b9801['erlangAbandonmentRate']*_0x2b9801[_0x19a6('0x1c3')]*_0x2b9801['predictiveIntervalMultiplicativeFactor']);if(_[_0x19a6('0x4c')](_0x2b9801[_0x19a6('0x5a')])){if(!_[_0x19a6('0x4c')](_0x2b9801[_0x19a6('0x26')])){_0x2b9801[_0x19a6('0x26')]=undefined;loggerPredictive[_0x19a6('0x60')](_0x19a6('0x1c4'),_0x19a6('0x1c5'));}if(!_[_0x19a6('0x4c')](_0x2b9801[_0x19a6('0x5e')])){loggerPredictive[_0x19a6('0x60')](_0x19a6('0x1c4'),_0x19a6('0x1c6'));clearInterval(_0x2b9801[_0x19a6('0x5e')]);_0x2b9801[_0x19a6('0x5e')]=undefined;}_0x2b9801[_0x19a6('0x5a')]=moment()[_0x19a6('0x40')](_0x19a6('0xbe'));loggerPredictive[_0x19a6('0x43')](_0x2b9801[_0x19a6('0x5c')],_0x19a6('0x1c7'),_0x2b9801[_0x19a6('0x5a')]);this['handlePower'](_0x2b9801,0x1);}else if(ifInterval(_0x2b9801[_0x19a6('0x1c8')],_0x2b9801[_0x19a6('0x5a')])){this[_0x19a6('0xac')](_0x2b9801,0x1);loggerPredictiveCalls[_0x19a6('0x43')]('[startMethodPredictive][StartProgressive][Loop]',_0x2b9801[_0x19a6('0x5a')],_0x2b9801['name']);_0x2b9801[_0x19a6('0x52')]=0x0;_0x2b9801[_0x19a6('0xc9')]=0x0;}else if(_0x20a6d3<_0x16526b&&_0x2b9801[_0x19a6('0x1c9')]===_0x19a6('0x1ca')){clearPredictiveAttributes(_0x2b9801);loggerPredictive['info'](_0x19a6('0x1cb'),_0x19a6('0x1cc'),_0x16526b,'startProgressive',_0x2b9801[_0x19a6('0x5c')]);}else if(_0x4853a2<_0x2b9801[_0x19a6('0xc9')]&&_0x2b9801['dialPredictiveOptimization']===_0x19a6('0x1ca')){clearPredictiveAttributes(_0x2b9801);loggerPredictive[_0x19a6('0x43')]('[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]',_0x19a6('0x1cd'),_0x4853a2,_0x19a6('0x1ce'),_0x2b9801['predictiveIntervalErlangCallsDroppedCalls'],_0x19a6('0x5a'),_0x2b9801['name']);}else if(!ifInterval(_0x2b9801[_0x19a6('0x1c8')],_0x2b9801['startProgressive'])&&_[_0x19a6('0x4c')](_0x2b9801[_0x19a6('0x26')])&&!_[_0x19a6('0x4c')](_0x2b9801['startProgressive'])){_0x2b9801['startPredictive']=moment()['format'](_0x19a6('0xbe'));loggerPredictive[_0x19a6('0x43')](_0x2b9801['name'],_0x19a6('0x1cf'),_0x2b9801[_0x19a6('0x26')]);hopperUtils['avgHandleTime'](_0x2b9801[_0x19a6('0x1c8')])[_0x19a6('0x39')](this[_0x19a6('0x1d0')](_0x2b9801))[_0x19a6('0x39')](mergeDataErlangB(_0x2b9801))[_0x19a6('0x39')](this[_0x19a6('0x1d1')](_0x2b9801))['catch'](loggerCatchPredictive('Predictive\x20after\x20first\x20interval',_0x2b9801));}else if(!ifInterval(_0x2b9801[_0x19a6('0x1c8')],_0x2b9801[_0x19a6('0x26')])){_0x2b9801[_0x19a6('0xc9')]=0x0;_0x2b9801[_0x19a6('0x26')]=moment()['format'](_0x19a6('0xbe'));loggerPredictive[_0x19a6('0x43')](_0x2b9801[_0x19a6('0x5c')],_0x19a6('0x1d2'),_0x2b9801[_0x19a6('0x26')]);clearInterval(_0x2b9801[_0x19a6('0x5e')]);_0x2b9801[_0x19a6('0x5e')]=undefined;hopperUtils[_0x19a6('0x1d3')](_0x2b9801[_0x19a6('0x1c8')])[_0x19a6('0x39')](this[_0x19a6('0x1d0')](_0x2b9801))['then'](mergeDataErlangB(_0x2b9801))[_0x19a6('0x39')](this[_0x19a6('0x1d1')](_0x2b9801))[_0x19a6('0x9a')](loggerCatchPredictive(_0x19a6('0x1d4'),_0x2b9801));}else if(_0x2b9801[_0x19a6('0x1bf')]&&_0x246e40<_0x2b9801[_0x19a6('0x1bf')]-_0x53e544){clearPredictiveAttributes(_0x2b9801);loggerPredictive[_0x19a6('0x43')](_0x2b9801['name'],_0x19a6('0x1d5'),_0x246e40,')\x20are\x20less\x20than\x20threshold\x20(',_0x2b9801[_0x19a6('0x1bf')],'-',_0x53e544,'=',_0x2b9801[_0x19a6('0x1bf')]-_0x53e544,')');}else if(_0x2b9801[_0x19a6('0x1bf')]&&_0x246e40>_0x2b9801[_0x19a6('0x1bf')]+_0x377990){clearPredictiveAttributes(_0x2b9801);loggerPredictive[_0x19a6('0x43')](_0x2b9801[_0x19a6('0x5c')],_0x19a6('0x1d5'),_0x246e40,_0x19a6('0x1d6'),_0x2b9801[_0x19a6('0x1bf')],'+',_0x377990,'=',_0x2b9801[_0x19a6('0x1bf')]+_0x377990,')');}};Dialer[_0x19a6('0x7c')]['getDataPredictive']=function(_0x11d68d){var _0x48efd9=this;return function(_0x643ae6){return new Promise(function(_0x2b845a,_0x80f44e){_['merge'](_0x11d68d,_0x643ae6[0x0]);if(checkGetDataPredictive(_0x643ae6[0x0])){var _0x18ad52=_0x11d68d[_0x19a6('0x1bf')]=_0x11d68d[_0x19a6('0x139')]+_0x11d68d['available'];var _0x153385=_0x11d68d[_0x19a6('0x1c8')]*0x3c;var _0xc40dbf=_0x643ae6[0x0]['predictiveIntervalAvgTalktime']+_0x643ae6[0x0][_0x19a6('0x49')];var _0x6b5211=(_0x643ae6[0x0][_0x19a6('0x1d7')]+_0x643ae6[0x0][_0x19a6('0x45')]+_0x643ae6[0x0][_0x19a6('0x47')])/_0x643ae6[0x0][_0x19a6('0x1d8')];_0x11d68d['predictiveIntervalHitRate']=_0x6b5211>0x0?_0x6b5211:0x1;switch(_0x11d68d[_0x19a6('0x1c9')]){case _0x19a6('0x1ca'):var _0x1089bb=_0x11d68d[_0x19a6('0x1be')]/0x64;return _0x48efd9[_0x19a6('0x1d9')](_0x18ad52,_0x153385,_0xc40dbf,_0x6b5211,_0x1089bb)[_0x19a6('0x39')](function(_0x4ffa2b){return _0x2b845a(_0x4ffa2b);});case _0x19a6('0x1da'):var _0x3cbab7=_0x11d68d[_0x19a6('0x1be')]/0x64;return _0x48efd9[_0x19a6('0x1db')](_0x18ad52,_0x153385,_0xc40dbf,_0x6b5211,_0x3cbab7)['then'](function(_0x4a464c){return _0x2b845a(_0x4a464c);});default:return _0x80f44e(msgResponse('[getDataPredictive]','Failure',_0x19a6('0x1dc')));}}else{return _0x80f44e(msgResponse(_0x19a6('0x1dd'),_0x19a6('0x8c'),_0x19a6('0x1de')));}});};};Dialer[_0x19a6('0x7c')]['getDataPredictiveOld']=function(_0x29109e){var _0x223993=this;return function(_0x4f86a3){return new Promise(function(_0x5c5e3e,_0x37992a){_[_0x19a6('0x58')](_0x29109e,_0x4f86a3[0x0]);if(checkGetDataPredictive(_0x4f86a3[0x0])){loggerPredictive[_0x19a6('0x43')](JSON[_0x19a6('0x6e')](_0x4f86a3[0x0]));if(_0x29109e[_0x19a6('0x1c9')]===_0x19a6('0x1ca')){return _0x223993['getVoiceQueueRtPauses'](_0x29109e['id'])[_0x19a6('0x39')](function(_0x244aea){var _0x530c74=_0x29109e[_0x19a6('0x1df')]-_0x244aea[0x0][_0x19a6('0x1e0')];var _0x300fd7=_0x29109e[_0x19a6('0x1c8')]*0x3c;var _0x1cc382=_0x4f86a3[0x0][_0x19a6('0x4d')]+_0x4f86a3[0x0][_0x19a6('0x49')];var _0x352a60=(_0x4f86a3[0x0][_0x19a6('0x1d7')]+_0x4f86a3[0x0]['predictiveIntervalDroppedCallsTimeout']+_0x4f86a3[0x0][_0x19a6('0x47')])/_0x4f86a3[0x0][_0x19a6('0x1d8')];var _0x1551ca=_0x29109e[_0x19a6('0x1be')]/0x64;_0x29109e[_0x19a6('0x1e1')]=_0x244aea[0x0]['outboundQueuePauses']||0x0;_0x29109e['predictiveIntervalHitRate']=_0x352a60>0x0?_0x352a60:0x1;return _0x223993['abandonmentRate'](_0x530c74,_0x300fd7,_0x1cc382,_0x352a60,_0x1551ca);})[_0x19a6('0x39')](function(_0x5ac5b6){return _0x5c5e3e(_0x5ac5b6);})[_0x19a6('0x9a')](function(_0x2abc2f){return _0x37992a(msgResponse('[CatchErlangB]',_0x19a6('0x8c'),JSON[_0x19a6('0x6e')](_0x2abc2f)));});}if(_0x29109e[_0x19a6('0x1c9')]===_0x19a6('0x1da')){return _0x223993['getVoiceQueueRtPauses'](_0x29109e['id'])[_0x19a6('0x39')](function(_0xee85ee){var _0x1f79dc=_0x29109e[_0x19a6('0x1df')]-_0xee85ee[0x0]['outboundQueuePauses'];var _0x778c5b=_0x29109e[_0x19a6('0x1c8')]*0x3c;var _0x277941=_0x4f86a3[0x0][_0x19a6('0x4d')]+_0x4f86a3[0x0][_0x19a6('0x49')];var _0x592e2a=(_0x4f86a3[0x0]['predictiveIntervalAnsweredCalls']+_0x4f86a3[0x0]['predictiveIntervalDroppedCallsTimeout']+_0x4f86a3[0x0][_0x19a6('0x47')])/_0x4f86a3[0x0][_0x19a6('0x1d8')];var _0x5c08a1=_0x29109e[_0x19a6('0x1be')]/0x64;_0x29109e['predictiveIntervalPauses']=_0xee85ee[0x0][_0x19a6('0x1e0')]||0x0;_0x29109e[_0x19a6('0x1c3')]=_0x592e2a>0x0?_0x592e2a:0x1;return _0x223993[_0x19a6('0x1db')](_0x1f79dc,_0x778c5b,_0x277941,_0x592e2a,_0x5c08a1);})[_0x19a6('0x39')](function(_0xa42a20){return _0x5c5e3e(_0xa42a20);})['catch'](function(_0x4d9198){return _0x37992a(msgResponse(_0x19a6('0x1e2'),'Failure',JSON['stringify'](_0x4d9198)));});}}else{return _0x37992a(msgResponse(_0x19a6('0x1dd'),_0x19a6('0x8c'),_0x19a6('0x1de')));}});};};Dialer['prototype']['startMethodPredictive']=function(_0x47b5ed){var _0x434de7=this;return function(){var _0x442248=0x0;var _0x57b8cf=Math[_0x19a6('0x1c2')](_0x47b5ed[_0x19a6('0x53')]*0x3e8);if(_0x57b8cf>0x0){_0x57b8cf=_0x57b8cf<0x64?0x64:_0x57b8cf;loggerPredictive['info'](_0x47b5ed['name'],_0x19a6('0x1e3'),_0x57b8cf,_0x19a6('0x1e4'));_0x47b5ed['handlePredictive']=setInterval(function(){_0x434de7[_0x19a6('0x5e')](_0x47b5ed);loggerPredictiveCalls[_0x19a6('0x43')](_0x19a6('0x1e5'),_0x442248+=0x1);},_0x57b8cf);}else{loggerPredictive[_0x19a6('0x43')](_0x47b5ed[_0x19a6('0x5c')],_0x19a6('0x1e6'));}};};Dialer[_0x19a6('0x7c')][_0x19a6('0x1e7')]=function(_0x58d0cd,_0x3bfe75){var _0x3f134e=this;return function(_0x2e1d06){if(_['isEmpty'](_0x2e1d06)){if(_['isNil'](_0x3bfe75[_0x19a6('0x152')])||!_0x3bfe75[_0x19a6('0x1e8')]){if(_0x58d0cd[_0x19a6('0xaa')]===_0x19a6('0xae')){_0x58d0cd[_0x19a6('0x6b')]=_['isUndefined'](_0x58d0cd['queueStatusComplete'])?!![]:_0x58d0cd[_0x19a6('0x6b')];var _0x2c15cc=uuid['v4']();_0x3f134e[_0x19a6('0x22')][_0x2c15cc]=new Action(_0x58d0cd,_0x3bfe75,_0x2c15cc);loggerBooked['info'](_0x19a6('0x1e9'),_0x2c15cc,'queueStatusComplete:\x20',JSON[_0x19a6('0x6e')](_0x58d0cd[_0x19a6('0x6b')]),_0x19a6('0x1ea'),_0x58d0cd['name']);if(_0x58d0cd[_0x19a6('0x6b')]){_0x58d0cd[_0x19a6('0x6b')]=![];_0x3f134e[_0x19a6('0xf1')][_0x3f134e[_0x19a6('0x22')][_0x2c15cc][_0x19a6('0xba')]]=[];ami[_0x19a6('0x94')]({'actionid':_0x2c15cc,'action':_0x19a6('0x1eb'),'queue':_0x58d0cd[_0x19a6('0x5c')]})[_0x19a6('0x9a')](function(){_0x3f134e[_0x19a6('0xbd')](_0x58d0cd);hopperUtils['rescheduleContact']({'active':![],'ContactId':_0x3f134e['actions'][_0x2c15cc][_0x19a6('0xd6')],'ListId':_0x3f134e[_0x19a6('0x22')][_0x2c15cc][_0x19a6('0xd7')],'VoiceQueueId':_0x3f134e[_0x19a6('0x22')][_0x2c15cc][_0x19a6('0xd8')]||undefined,'CampaignId':_0x3f134e[_0x19a6('0x22')][_0x2c15cc]['CampaignId']||undefined})[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x1ec')));delete _0x3f134e[_0x19a6('0x22')][_0x2c15cc];});}else{loggerBooked['info'](_0x19a6('0x1ed'),JSON[_0x19a6('0x6e')](_0x58d0cd[_0x19a6('0x6b')]),_0x19a6('0x1ea'),_0x58d0cd[_0x19a6('0x5c')]);_0x3f134e['updateOriginated'](_0x58d0cd);hopperUtils[_0x19a6('0xd2')]({'active':![],'ContactId':_0x3f134e['actions'][_0x2c15cc][_0x19a6('0xd6')],'ListId':_0x3f134e['actions'][_0x2c15cc]['ListId'],'VoiceQueueId':_0x3f134e[_0x19a6('0x22')][_0x2c15cc][_0x19a6('0xd8')]||undefined,'CampaignId':_0x3f134e[_0x19a6('0x22')][_0x2c15cc][_0x19a6('0xd9')]||undefined})[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x1ec')));delete _0x3f134e[_0x19a6('0x22')][_0x2c15cc];}}else{return _0x3f134e[_0x19a6('0x158')](_0x58d0cd,_0x3bfe75);}}else{if(utils[_0x19a6('0x59')](undefined,_0x3bfe75[_0x19a6('0x1ee')])<_0x58d0cd[_0x19a6('0x1ef')]*0x3c){if(_0x3bfe75[_0x19a6('0x147')]&&!_0x3bfe75['Agent'][_0x19a6('0x1f0')]){_0x3f134e[_0x19a6('0x1b')][_0x19a6('0xf5')](_0x3bfe75['id'])[_0x19a6('0x19')](function(){_0x3f134e['updateOriginated'](_0x58d0cd);});}else{hopperUtils[_0x19a6('0x1f1')]({'active':![]},_0x3bfe75['id'],0x1)[_0x19a6('0x19')](function(){_0x3f134e[_0x19a6('0xbd')](_0x58d0cd);});}}else{_0x58d0cd[_0x19a6('0x1f2')]+=0x1;_0x3f134e[_0x19a6('0xbd')](_0x58d0cd);if(_0x58d0cd['dialRecallInQueue']){hopperUtils[_0x19a6('0xd2')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x3bfe75[_0x19a6('0xd6')],'ListId':_0x3bfe75[_0x19a6('0xd7')],'VoiceQueueId':_0x3bfe75[_0x19a6('0xd8')]||undefined,'CampaignId':_0x3bfe75[_0x19a6('0xd9')]||undefined})[_0x19a6('0x9a')](loggerCatch('[rescheduleContact][dialRecallInQueue]'));hopperUtils[_0x19a6('0xc3')](createObjHistory(_0x58d0cd,_0x3bfe75,utils[_0x19a6('0x65')]['QUEUE_RECALL'],0x17,'RecallInQueue'))['catch'](loggerCatch(_0x19a6('0x1f3')));}else{_0x3f134e['saveInDb'](createObjHistory(_0x58d0cd,_0x3bfe75,utils[_0x19a6('0x65')][_0x19a6('0x1f4')],0x16,'RecallFailedTimeout'),'[Originate][HistoryRecallClose][historyCatch]',_0x19a6('0x1f5'));}}}}else{_0x58d0cd[_0x19a6('0x1f6')]+=0x1;_0x3f134e[_0x19a6('0x112')](createObjHistory(_0x58d0cd,_0x3bfe75,utils[_0x19a6('0x65')]['BLACKLIST'],0xd,_0x19a6('0x1f7')),'[Originate][historyBlacklist]','[Originate][MoveBlacklist]');throw'inBlackList';}};};Dialer[_0x19a6('0x7c')][_0x19a6('0x157')]=function(_0x2de136){var _0x128c5d=this;var _0x13cd3f=_0x2de136[_0x19a6('0x1f8')]-_0x2de136['originated']-_0x2de136[_0x19a6('0x1f9')];emitCampaignSummary(_0x2de136);if(_0x13cd3f>0x0){if(_0x13cd3f>this['maxNumberOriginate']){_0x13cd3f=this[_0x19a6('0x20')];}_0x2de136[_0x19a6('0x1f9')]+=_0x13cd3f;hopperUtils[_0x19a6('0x1fa')](_0x2de136['id'],_0x13cd3f,_0x2de136[_0x19a6('0x1fb')],_0x2de136)[_0x19a6('0x39')](function(_0x4f65f7){_0x2de136[_0x19a6('0x1f9')]-=_0x13cd3f;_0x2de136['temp']=_0x2de136[_0x19a6('0x1f9')]>0x0?_0x2de136['temp']:0x0;if(!utils[_0x19a6('0x1fc')](_0x4f65f7)){_0x2de136[_0x19a6('0x64')]=utils[_0x19a6('0x65')][_0x19a6('0x68')];logger['info'](_0x19a6('0x1fd')+_0x2de136[_0x19a6('0x5c')]);}else{_0x2de136[_0x19a6('0x77')]+=_0x4f65f7[_0x19a6('0x92')];_0x2de136[_0x19a6('0x64')]=utils['CAMPAIGN_STATUS'][_0x19a6('0x1fe')];for(var _0x55ac19=0x0;_0x55ac19<_0x4f65f7[_0x19a6('0x92')];_0x55ac19+=0x1){_0x2de136[_0x19a6('0x1ff')]+=0x1;if(_[_0x19a6('0xee')](_0x4f65f7[_0x55ac19])||_[_0x19a6('0xee')](_0x4f65f7[_0x55ac19][_0x19a6('0x171')])||_[_0x19a6('0xee')](_0x4f65f7[_0x55ac19][_0x19a6('0x15c')])){_0x128c5d[_0x19a6('0x200')](_0x19a6('0x201'),_0x2de136,_0x4f65f7[_0x55ac19]);}else{hopperUtils[_0x19a6('0x202')](_[_0x19a6('0xf2')](_0x4f65f7[_0x55ac19],[_0x19a6('0xd9'),'phone']))[_0x19a6('0x39')](_0x128c5d[_0x19a6('0x1e7')](_0x2de136,_0x4f65f7[_0x55ac19]))[_0x19a6('0x9a')](_0x128c5d[_0x19a6('0x203')](_0x19a6('0x204'),_0x2de136));}}}})[_0x19a6('0x9a')](loggerGetContactDialer('[getContactCampaign2]',_0x2de136,_0x13cd3f));}};Dialer['prototype'][_0x19a6('0xac')]=function(_0x15166e,_0x144e73){var _0x46ea73=this;var _0x3acd2f=[];if(_0x144e73<0x1||_0x15166e['dialMethod']===_0x19a6('0xae')){_0x144e73=0x1;}var _0x517231=Math['floor'](_0x15166e['available']*_0x144e73)-_0x15166e['originated']-_0x15166e[_0x19a6('0x1f9')];if(_0x15166e[_0x19a6('0x205')]>0x0){var _0x3b1d8d=_0x15166e[_0x19a6('0x205')]-_0x15166e['originated']-_0x15166e[_0x19a6('0x139')]-_0x15166e['temp']-_0x15166e[_0x19a6('0x13a')];if(_0x517231>_0x3b1d8d){_0x517231=_0x3b1d8d;}}if(_0x517231>0x0){if(_0x15166e[_0x19a6('0xaa')]===_0x19a6('0xae')){_0x517231=0x1;}if(_0x517231>this[_0x19a6('0x20')]){_0x517231=this[_0x19a6('0x20')];}_0x15166e[_0x19a6('0x1f9')]+=_0x517231;for(var _0x449871 in this[_0x19a6('0x1e')]){if(typeof this[_0x19a6('0x1e')][_0x449871]!==_0x19a6('0xa3')){if(this[_0x19a6('0x1e')][_0x449871][_0x19a6('0x6a')]===_0x19a6('0x206')&&this[_0x19a6('0x1e')][_0x449871][_0x19a6('0x80')]===_0x19a6('0x81')){_0x3acd2f[_0x19a6('0x93')](this[_0x19a6('0x1e')][_0x449871]['id']);}}}hopperUtils['getContactDialer'](_0x15166e,_0x3acd2f,_0x517231)['then'](function(_0x262950){_0x15166e[_0x19a6('0x1f9')]-=_0x517231;_0x15166e['temp']=_0x15166e['temp']>0x0?_0x15166e[_0x19a6('0x1f9')]:0x0;if(!utils[_0x19a6('0x1fc')](_0x262950)){hopperUtils['countReScheduled'](_0x15166e)['then'](sendMessageReschedule(_0x15166e))[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x207')));}else{_0x15166e['originated']+=_0x262950[_0x19a6('0x92')];_0x15166e[_0x19a6('0x64')]=_0x15166e[_0x19a6('0xaa')]===_0x19a6('0xae')?utils[_0x19a6('0x65')][_0x19a6('0x13b')]:utils['CAMPAIGN_STATUS']['RUNNING'];for(var _0x424341=0x0;_0x424341<_0x262950['length'];_0x424341+=0x1){if(_[_0x19a6('0xee')](_0x262950[_0x424341])||_['isNil'](_0x262950[_0x424341][_0x19a6('0x171')])||_[_0x19a6('0xee')](_0x262950[_0x424341]['phone'])){_0x46ea73[_0x19a6('0x200')](_0x19a6('0x201'),_0x15166e,_0x262950[_0x424341]);}else{hopperUtils[_0x19a6('0x208')](_[_0x19a6('0xf2')](_0x262950[_0x424341],['VoiceQueueId','phone']))[_0x19a6('0x39')](_0x46ea73['checkContactBlack'](_0x15166e,_0x262950[_0x424341]))[_0x19a6('0x9a')](_0x46ea73[_0x19a6('0x203')](_0x19a6('0x201'),_0x15166e));}}}})[_0x19a6('0x9a')](loggerGetContactDialer(_0x19a6('0x209'),_0x15166e,_0x517231));}};Dialer[_0x19a6('0x7c')][_0x19a6('0x5e')]=function(_0x311702){if(_0x311702[_0x19a6('0x205')]>0x0){var _0x54613d=_0x311702['dialLimitQueue']-_0x311702[_0x19a6('0x77')]-_0x311702[_0x19a6('0x139')];if(_0x54613d>0x0){this['tryOriginatePredictive'](_0x311702);}else{loggerPredictiveCalls[_0x19a6('0x43')](_0x19a6('0x20a'));}}else{this[_0x19a6('0x20b')](_0x311702);}};Dialer['prototype'][_0x19a6('0x20b')]=function(_0x363d77){var _0x5ae405=this;var _0x15d3c3=[];_0x363d77[_0x19a6('0x77')]+=0x1;for(var _0x2cb294 in this[_0x19a6('0x1e')]){if(typeof this[_0x19a6('0x1e')][_0x2cb294]!==_0x19a6('0xa3')){if(this[_0x19a6('0x1e')][_0x2cb294]['state']===_0x19a6('0x206')&&this[_0x19a6('0x1e')][_0x2cb294][_0x19a6('0x80')]===_0x19a6('0x81')){_0x15d3c3[_0x19a6('0x93')](this[_0x19a6('0x1e')][_0x2cb294]['id']);}}}return this['getContactDialer'](_0x363d77['id'],_0x15d3c3,0x1,_0x363d77[_0x19a6('0x1fb')],_0x363d77)[_0x19a6('0x39')](function(_0x2fd150){if(!utils['checkContactEmpty'](_0x2fd150)){utils[_0x19a6('0x62')](_0x363d77,0x1,0x0);return hopperUtils[_0x19a6('0x20c')](_0x363d77)[_0x19a6('0x39')](sendMessageReschedule(_0x363d77))[_0x19a6('0x9a')](loggerCatch(_0x19a6('0x207')));}else{_0x363d77['message']=utils['CAMPAIGN_STATUS'][_0x19a6('0x1fe')];if(_['isNil'](_0x2fd150[0x0])||_['isNil'](_0x2fd150[0x0][_0x19a6('0x171')])||_[_0x19a6('0xee')](_0x2fd150[0x0][_0x19a6('0x15c')])){_0x5ae405[_0x19a6('0x200')](_0x19a6('0x201'),_0x363d77,_0x2fd150[0x0]);}else{return hopperUtils[_0x19a6('0x208')](_[_0x19a6('0xf2')](_0x2fd150[0x0],['VoiceQueueId',_0x19a6('0x15c')]))[_0x19a6('0x39')](_0x5ae405['checkContactBlack'](_0x363d77,_0x2fd150[0x0]))[_0x19a6('0x9a')](_0x5ae405[_0x19a6('0x203')]('[actionOriginatePredictive]\x20',_0x363d77));}}})[_0x19a6('0x9a')](loggerGetContactDialer(_0x19a6('0x20d'),_0x363d77,0x1));};Dialer[_0x19a6('0x7c')][_0x19a6('0x1d9')]=function(_0x27bc11,_0x2c2b9e,_0x3e8331,_0x1be03,_0x4118ec,_0x40384a){loggerPredictive[_0x19a6('0x43')](_0x19a6('0x20e'));loggerPredictive[_0x19a6('0x43')](_0x19a6('0x20f'),_0x27bc11);loggerPredictive[_0x19a6('0x43')](_0x19a6('0x210'),_0x2c2b9e);loggerPredictive[_0x19a6('0x43')](_0x19a6('0x211'),_0x3e8331);loggerPredictive[_0x19a6('0x43')]('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',_0x1be03);loggerPredictive[_0x19a6('0x43')]('Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x4118ec);loggerPredictive[_0x19a6('0x43')](_0x19a6('0x4b'));return new Promise(function(_0x3509db,_0x2dd0c8){if(_0x27bc11<=0x0||isNaN(_0x27bc11)){return _0x2dd0c8(msgResponse('[abandonmentRate]',_0x19a6('0xb8'),_0x19a6('0x212')+_0x27bc11));}if(_0x3e8331<=0x0||isNaN(_0x3e8331)){return _0x2dd0c8(msgResponse(_0x19a6('0x213'),'Error',_0x19a6('0x214')+_0x3e8331));}if(_0x1be03<=0x0||isNaN(_0x1be03)){return _0x2dd0c8(msgResponse('[abandonmentRate]',_0x19a6('0xb8'),_0x19a6('0x215')+_0x1be03));}if(_0x2c2b9e<=0x0||isNaN(_0x2c2b9e)){return _0x2dd0c8(msgResponse(_0x19a6('0x213'),_0x19a6('0xb8'),_0x19a6('0x216')+_0x2c2b9e));}if(_0x4118ec<=0x0||isNaN(_0x4118ec)){return _0x2dd0c8(msgResponse(_0x19a6('0x213'),_0x19a6('0xb8'),_0x19a6('0x217')+_0x4118ec));}_0x40384a=_0x40384a||0x0;var _0x499c83=0x1/_0x3e8331;var _0x4ffff6=0x0;var _0x2e62cb=0x0;var _0x3f8bcc=0x0;var _0x2fde3b=0x0;for(var _0xf59f4b=0x0;_0x3f8bcc<_0x4118ec;_0xf59f4b+=0x1){_0x2e62cb=_0xf59f4b/_0x2c2b9e;_0x4ffff6=(_0x1be03*_0x2e62cb+_0x40384a)/_0x499c83;_0x3f8bcc=utils[_0x19a6('0x218')](_0x4ffff6,_0x27bc11);_0x2fde3b=_0x4ffff6/_0x27bc11*(0x1-utils[_0x19a6('0x218')](_0x4ffff6,_0x27bc11));}return _0x3509db({'erlangCalls':_0xf59f4b,'erlangCallToSecond':_0x2c2b9e/_0xf59f4b,'erlangAbandonmentRate':_0x3f8bcc,'erlangBusyFactor':_0x2fde3b});});};Dialer['prototype']['busyFactor']=function(_0x38d9ba,_0x2223e3,_0x54d18b,_0x3f64cb,_0x54293e,_0x19121f){loggerPredictive[_0x19a6('0x43')](_0x19a6('0x219'));loggerPredictive[_0x19a6('0x43')](_0x19a6('0x20f'),_0x38d9ba);loggerPredictive[_0x19a6('0x43')](_0x19a6('0x210'),_0x2223e3);loggerPredictive[_0x19a6('0x43')](_0x19a6('0x211'),_0x54d18b);loggerPredictive[_0x19a6('0x43')](_0x19a6('0x21a'),_0x3f64cb);loggerPredictive['info'](_0x19a6('0x21b'),_0x54293e);loggerPredictive['info'](_0x19a6('0x4b'));return new Promise(function(_0x274bee,_0x3aa9d4){if(_0x38d9ba<=0x0||isNaN(_0x38d9ba)){return _0x3aa9d4(msgResponse(_0x19a6('0x21c'),_0x19a6('0xb8'),_0x19a6('0x212')+_0x38d9ba));}if(_0x54d18b<=0x0||isNaN(_0x54d18b)){return _0x3aa9d4(msgResponse(_0x19a6('0x21c'),_0x19a6('0xb8'),_0x19a6('0x214')+_0x54d18b));}if(_0x3f64cb<=0x0||isNaN(_0x3f64cb)){return _0x3aa9d4(msgResponse(_0x19a6('0x21c'),_0x19a6('0xb8'),_0x19a6('0x215')+_0x3f64cb));}if(_0x2223e3<=0x0||isNaN(_0x2223e3)){return _0x3aa9d4(msgResponse(_0x19a6('0x21c'),_0x19a6('0xb8'),_0x19a6('0x216')+_0x2223e3));}if(_0x54293e<=0x0||isNaN(_0x54293e)){return _0x3aa9d4(msgResponse(_0x19a6('0x21c'),'Error','Umin\x20=\x20'+_0x54293e));}_0x19121f=_0x19121f||0x0;var _0x5cb004=0x1/_0x54d18b;var _0x3a78e8=0x0;var _0x335e31=0x0;var _0x54348c=0x0;var _0x1585b2=0x0;for(var _0xc4692=0x0;_0x1585b2<_0x54293e;_0xc4692+=0x1){_0x335e31=_0xc4692/_0x2223e3;_0x3a78e8=(_0x3f64cb*_0x335e31+_0x19121f)/_0x5cb004;_0x54348c=utils[_0x19a6('0x218')](_0x3a78e8,_0x38d9ba);_0x1585b2=_0x3a78e8/_0x38d9ba*(0x1-utils[_0x19a6('0x218')](_0x3a78e8,_0x38d9ba));}return _0x274bee({'erlangCalls':_0xc4692,'erlangCallToSecond':_0x2223e3/_0xc4692,'erlangAbandonmentRate':_0x54348c,'erlangBusyFactor':_0x1585b2});});};module[_0x19a6('0x21d')]=Dialer;