Built motion from commit b0a9a629.|2.6.33
[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 _0x71a1=['[syncAgentCompleteIvr]','[syncHangupIvr]','AnswerAGI','AGI','[syncHangup2]','[syncAgentComplete][createHistory]','outboundUnknownCallsDay','Unknown','[syncHangup][createHistory]','running','isPreviewCampaign','statusMessage','getQueueCampaignStatusMessage','resolve','INACTIVE','startPredictive','available','talking','pTalking','ACTIVE','[syncQueueSummary]','compareToOutboundQueue','queueSummaryCountersUpdated','updateReportFromOutboundQueue','assign','throttle','filter','online','handlePreviewRecallNotifications','map','user:%s','user:dialPreviewRecallReminder','checkPreviewRecallReminder','clearZombieChannels','[uniqueid]','[actions]','[clearZombieChannels]','[Dialer][checkChannel][ivr]','getVoiceQueueRtPauses','[getVoiceQueueRtPauses]\x20','emptyContact','notFound','[emptyContact]','UserId','[emptyContact][createHistory]','[syncQueueCallerAbandon]\x20[Drop]','Agent','handleIvr','actionOriginate','object','originate','voiceQueue\x20is\x20undefine','phone','contact\x20is\x20undefine','dialQueueProject','NONE','\x22agi://%s/square,%s\x22','isOutboundQueue','\x22%s,%s%s,,,%s\x22','dialQueueOptions','getCaller','xcally-motion-dialer','XMD-AMDINITIALSILENCE','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDGreeting','XMD-AMDAFTERGREETINGSILENCE','XMD-AMDTOTALANALYSISTIME','dialAMDTotalAnalysisTime','XMD-AMDMINWORDLENGTH','XMD-AMDBETWEENWORDSSILENCE','XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','XMD-AMDSILENCETHRESHOLD','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','dialAMDMaximumWordLength','XMD-VOICEQUEUEID','XMD-CAMPAIGNID','Contact','getCallerId','callerid','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','dialOriginateCallerIdNumber','dialOriginateCallerIdName','originatecalleridname','extractCalleridName','XMD-ORIGINATECALLERIDNUM','variables','SIP/%s/%s%s','trim','dialCutDigit','substring','dialPrefix','from-sip','dialOriginateTimeout','outboundOriginateFailureCallsDay','[originateError]:\x20%s','OriginateError','[originate][error]','originate\x20action\x20Error','checkRetriveMax','dialNoAnswerRetryFrequency','dialBusyMaxRetry','[rescheduleContact]\x20[Busy]','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialNoSuchNumberMaxRetry','[rescheduleContact][Abandoned]','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','callProgressDetecting','[callProgressDetecting]','entity\x20is\x20undefine','evt\x20is\x20undefine','outboundNoSuchCallsDay','nosuchnumber','dialNoSuchNumberRetryFrequency','callAdditionalPhoneAfterMin','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','NoAnswer','buildNoAnswerEventPayload','custom:agentnoanswer','[syncAgentComplete][createHistory][3]','reason\x203\x20ringing\x20no\x20answer','outboundBusyCallsDay','Busy','busy','dialBusyRetryFrequency','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','outboundCongestionCallsDay','Congestion','congestion','[syncAgentComplete][createHistory][8]','outboundAbandonedCallsDay','reason\x2011\x20abandoned','outboundRejectCallsDay','AgentReject','custom:agentreject','agentreject','reason\x2020\x20agentreject','Global','[moveContactManagedDialer][0]','contact\x20not\x20moved','dialPredictiveOptimizationPercentage','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','round','predictiveIntervalMinThreshold','floor','erlangAbandonmentRate','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','[startMethodPredictive][StartProgressive][Loop]','dialPredictiveOptimization','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','Drop\x20in\x20this\x20interval','dialPredictiveInterval','started\x20in\x20predictive\x20at','getDataPredictive','startMethodPredictive','Predictive\x20after\x20first\x20interval','recalculate\x20predictive\x20at','avgHandleTime','Predictive\x20for\x20every\x20interval','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(','abandonmentRate','agentBusyFactor','[getDataPredictive]','Unknown\x20Predictive','getDataPredictiveOld','loggedIn','outboundQueuePauses','predictiveIntervalPauses','busyFactor','[CatchErlangB]','check\x20failure','[handlePredictive]','fail\x20to\x20scheduled\x20calls','recallme','[booked][checkContactBlack]','queueStatusComplete:\x20','Queue:\x20','[checkContactBlack]','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','scheduledat','dialRecallMeTimeout','unlockContact','[rescheduleContact][dialRecallInQueue]','QUEUE_RECALL','RecallInQueue','[Originate][HistoryDialRecallInQueue][historyCatch]','RECALL_TIMEOUT','RecallFailedTimeout','[Originate][HistoryRecallClose]','outboundBlacklistCallsDay','BLACKLIST','Blacklist','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','inBlackList','temp','getContactDialerIvr','checkContactEmpty','[getContactCampaign2][Empty]','RUNNING','ivrTotalCallsDays','checkIsBlackListIvr','checkContactBlack','[actionOriginateIvr]','[handleIvr]','[getContactCampaign2]','dialLimitQueue','not_inuse','getContactDialer','[countReScheduled]\x20','checkIsBlackList','[actionOriginate]','tryOriginatePredictive','[handlePredictive][limitChannel]','dialOrderByScheduledAt','checkContactLowerLimitOriginate','countReScheduled','[actionOriginatePredictive]','--------\x20Drop\x20Rate\x20--------','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[abandonmentRate]','m\x20=\x20','p\x20=\x20','interval\x20=\x20','erlangb','----\x20Agent\x20Busy\x20Factor\x20----','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[busyFactor]','Ts\x20=\x20','Umin\x20=\x20','util','lodash','uuid','moment','ioredis','./utils','./utils/hopper','../preview/util/util','dialer','../../../config/logger','booked','predictiveCalls','syncQueueSummary','../ami','redis','localhost','../rpc/cmHopper','../rpc/voiceQueueRt','../rpc/setting','../rpc/interval','./models/action','./models/history','./models/final','./models/agentComplete','./models/queueCallerAbandon','env','XCALLY_IP_AGI','127.0.0.1','prototype','enqueue','tail','preview','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','channels','actions','contactsId','optionPredictive','ivrOriginated','queueBooked','queueBookedRR','queuesSummary','agentconnect','syncAgentConnect','queuecallerabandon','bind','originateresponse','syncOriginateResponse','agentcomplete','syncAgentComplete','custom:queuesummary','syncQueueSummaryComplete','hangup','newexten','varset','syncVarSet','queuemember','syncQueueMember','queuestatuscomplete','syncQueueStatusComplete','loopCampaigns','loopClearZombieChannels','getSettings','then','type','outbound','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','inspect','format','voice:queue:%s','name','voice_queue:save','isEmpty','info','-----\x20Stats\x20Predictive\x20---','Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAnsweredCalls','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsTimeout','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgHoldtime','---------------------------','predictiveIntervalTotalCalls','isUndefined','predictiveIntervalAvgTalktime','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','History\x20information\x20are\x20empty','---------\x20ErlangB\x20---------','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCalls','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCallToSecond','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangBusyFactor','merge','getSeconds','startProgressive','debug','handlePredictive','handlePredictive\x20interval\x20cleared','error','stack','contactsRescheduled','message','CONTACTS_RESCHEDULED','[getContactDialer2][ReScheduled]','CAMPAIGN_STATUS','NO_AVAILABLE_CONTACTS','[getContactDialer2][Empty]','state','statedesc','endtime','starttime','queueStatusComplete','[unlockQueueStatus][undefined]','[booked][unlockQueueStatus]','stringify','pick','Interval','NULL_INTERVAL','\x20INTERVAL_IS_NULL','Intervals','isIVRCampaignActive','isIVRCampaign','originated','sendMessageOneNotActive','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','DISACTIVED','is\x20deactivated','[ifTime][Action]','Error','active','SIP/%s','status','reachable','unmonitored','checkIsTrunkReachable','isTrunkReachable','Trunk','TrunkBackup','ifTimeIvr','checkIfTimeIntervals','ifTime','Failure','EMPTY_INTERVAL','\x20Intervals\x20is\x20empty\x20','timezones','UNKNOWN_TIMEZONE','\x20Timezone\x20unknow\x20','isArray','length','Action','iftime\x20%s,%s','interval','content','indexOf','true','catch','push','command','all','some','OVERTIME_GLOBAL_INTERVAL','OVERTIME_INTERVAL','Global:\x20','\x20Interval\x20is\x20overtime:\x20','Timezone:\x20','resetActiveCalls','syncCampaigns','undefined','checkIfTime','dialGlobalInterval','dialTimezone','launchHandleIvr','[syncCampaigns]','checkDialMethod','dialMethod','predictive','progressive','handlePower','power','dialPowerLevel','Queue','method\x20not\x20recognized','silly','Voice\x20Queue\x20%s\x20$s','intervalIftime','Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:','isGlobal','AMI\x20IfTime','queue','uniqueid','ivr','decrementOriginate','[syncAgentConnect]','uniqueId','answertime','outboundAnswerCallsDay','reason','agiafterat','dialQueueProject2','dialAgiAfterHangupAgent','YYYY-MM-DD\x20HH:mm:ss','createHistory','[syncAgentComplete]','syncQueueCallerAbandon','[syncQueueCallerAbandon]','droptime','responsetime','dialQueueTimeout','outboundDropCallsDayTimeout','predictiveIntervalErlangCallsDroppedCalls','Drop','TIMEOUT','countdropretry','countglobal','verifyAdditionalPhones','voiceQueue','additional','dialDropMaxRetry','queueCallerAbandonCreateState','add','dialDropRetryFrequency','minutes','ListId','VoiceQueueId','CampaignId','[rescheduleContact][Drop]','calleridname','[syncAgentComplete][createHistory][10]','swapAdditionalPhones','predictiveIntervalDroppedCallsCallersExit','outboundDropCallsDayCallersExit','Abandoned','CALLEREXIT','countabandonedretry','dialAbandonedRetryFrequency','dialAbandonedMaxRetry','rescheduleContact','ContactId','calleridnum','channel','actionid','strategy','rrmemory','roundrobin','isNil','paused','stateinterface','locked','run','idHopper','finally','[syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','_rr','unlockRR','[booked][RR]','Agent:\x20','contactAgent-idHopper:\x20','[Catch][Preview][syncQueueStatusComplete]','[booked][unlock]','[booked][unlock2]','[unlock2][syncQueueStatusComplete]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','response','Success','[syncOriginateResponse]','[callProgressDetecting]\x20','variable','amdstatus','dialAMDActive','value','HANGUP','outboundAnswerAgiCallsDay','HangupInAMD','membername','AMD','emit','buildObj','amd','saveInDb','[syncHangupInAMD][createHistory]','[syncHangupInAMD]','Machine','countmachineretry','[syncAgentComplete][createHistory][0]','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countagentrejectretry','dialGlobalMaxRetry','reason19\x20machine....','dialMachineMaxRetry','createStateFinal','reason\x2019\x20machine....','dialMachineRetryFrequency','custom:amd','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','MACHINE','stateGlobal','[rescheduleContact][Machine]','syncHangup','[syncHangup]','ivrAnswerCallsDay','cause-txt','Normal\x20Clearing','[syncAgentCompleteIvr][createHistory]','moveContactManagedDialer'];(function(_0x28fd0a,_0x3014c0){var _0x2f9ff6=function(_0xbe8e72){while(--_0xbe8e72){_0x28fd0a['push'](_0x28fd0a['shift']());}};_0x2f9ff6(++_0x3014c0);}(_0x71a1,0xfa));var _0x171a=function(_0x3cf49a,_0x54f14b){_0x3cf49a=_0x3cf49a-0x0;var _0x355fdd=_0x71a1[_0x3cf49a];return _0x355fdd;};'use strict';var util=require(_0x171a('0x0'));var _=require(_0x171a('0x1'));var uuid=require(_0x171a('0x2'));var moment=require(_0x171a('0x3'));var rr=require('rr');var Redis=require(_0x171a('0x4'));var utils=require(_0x171a('0x5'));var hopperUtils=require(_0x171a('0x6'));var ut=require(_0x171a('0x7'));var config=require('../../../config/environment/');var logger=require('../../../config/logger')(_0x171a('0x8'));var loggerBooked=require(_0x171a('0x9'))(_0x171a('0xa'));var loggerPredictive=require(_0x171a('0x9'))('predictive');var loggerPredictiveCalls=require('../../../config/logger')(_0x171a('0xb'));var loggerSyncQueueSummary=require(_0x171a('0x9'))(_0x171a('0xc'));var ami=require(_0x171a('0xd'));config[_0x171a('0xe')]=_['defaults'](config['redis'],{'host':_0x171a('0xf'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));var cmHopper=require(_0x171a('0x10'));var voiceQueueRt=require(_0x171a('0x11'));var RpcSetting=require(_0x171a('0x12'));var Interval=require(_0x171a('0x13'));var Action=require(_0x171a('0x14'));var History=require(_0x171a('0x15'));var Final=require(_0x171a('0x16'));var AgentComplete=require(_0x171a('0x17'));var QueueCallerAbandon=require(_0x171a('0x18'));var Hangup=require('./models/hangup');var ipAgi=process[_0x171a('0x19')][_0x171a('0x1a')]||_0x171a('0x1b');var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence[_0x171a('0x1c')][_0x171a('0x1d')]=function(_0xa589f5){this[_0x171a('0x1e')]=this['tail']?this['tail']['finally'](_0xa589f5):_0xa589f5();};function Dialer(_0x5784ee,_0x4b269f){this['sequence']=new Sequence();this[_0x171a('0x1f')]=_0x4b269f;this['voiceQueues']=_0x5784ee[_0x171a('0x20')];this[_0x171a('0x21')]=_0x5784ee[_0x171a('0x21')];this[_0x171a('0x22')]=_0x5784ee[_0x171a('0x22')];this[_0x171a('0x23')]=_0x5784ee[_0x171a('0x23')];this[_0x171a('0x24')]=config[_0x171a('0x24')]||0x2;this[_0x171a('0x25')]={};this[_0x171a('0x26')]={};this[_0x171a('0x27')]={};this['uniqueId']={};this[_0x171a('0x28')]={};this['startPredictive']={};this['startProgressive']={};this[_0x171a('0x29')]={};this[_0x171a('0x2a')]={};this[_0x171a('0x2b')]={};this[_0x171a('0x2c')]={};ami['on'](_0x171a('0x2d'),this[_0x171a('0x2e')]['bind'](this));ami['on'](_0x171a('0x2f'),this['syncQueueCallerAbandon'][_0x171a('0x30')](this));ami['on'](_0x171a('0x31'),this[_0x171a('0x32')][_0x171a('0x30')](this));ami['on'](_0x171a('0x33'),this[_0x171a('0x34')]['bind'](this));ami['on'](_0x171a('0x35'),this['syncQueueSummary'][_0x171a('0x30')](this));ami['on']('custom:queuesummarycomplete',this[_0x171a('0x36')][_0x171a('0x30')](this));ami['on'](_0x171a('0x37'),this['syncHangup']['bind'](this));ami['on'](_0x171a('0x38'),this['syncNewExten'][_0x171a('0x30')](this));ami['on'](_0x171a('0x39'),this[_0x171a('0x3a')]['bind'](this));ami['on'](_0x171a('0x3b'),this[_0x171a('0x3c')]['bind'](this));ami['on'](_0x171a('0x3d'),this[_0x171a('0x3e')]['bind'](this));this[_0x171a('0x3f')]();this[_0x171a('0x40')]();RpcSetting[_0x171a('0x41')]()[_0x171a('0x42')](function(_0x3226fd){previewRecallmeReminderInterval=_0x3226fd['previewRecallmeReminderInterval'];});}function isNotNull(_0x22deca){return _0x22deca!==null&&!_['isUndefined'](_0x22deca);}function msgResponse(_0x285964,_0x3c05d5,_0x4ec492){return{'action':_0x285964,'response':_0x3c05d5,'message':_0x4ec492,'stack':_0x4ec492};}function emit(_0x441522,_0x2f50bf,_0x4fd6ed){io['to'](_0x441522)['emit'](_0x2f50bf,_0x4fd6ed);}function emitOutboundVoiceQueueSummary(_0x937b45){if(_0x937b45[_0x171a('0x43')]===_0x171a('0x44')){logger['debug'](_0x171a('0x45'),util[_0x171a('0x46')](_0x937b45,{'showHidden':![],'depth':null}));emit(util[_0x171a('0x47')](_0x171a('0x48'),_0x937b45[_0x171a('0x49')]),_0x171a('0x4a'),_0x937b45);}}function checkGetDataPredictive(_0x3666c4){if(isNotNull(_0x3666c4)&&!_[_0x171a('0x4b')](_0x3666c4)){loggerPredictive[_0x171a('0x4c')](_0x171a('0x4d'));loggerPredictive[_0x171a('0x4c')](_0x171a('0x4e'),_0x3666c4['predictiveIntervalTotalCalls']);loggerPredictive[_0x171a('0x4c')]('Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x3666c4[_0x171a('0x4f')]);loggerPredictive[_0x171a('0x4c')](_0x171a('0x50'),_0x3666c4[_0x171a('0x51')]);loggerPredictive[_0x171a('0x4c')](_0x171a('0x52'),_0x3666c4['predictiveIntervalDroppedCallsCallersExit']);loggerPredictive[_0x171a('0x4c')](_0x171a('0x53'),_0x3666c4[_0x171a('0x54')]);loggerPredictive[_0x171a('0x4c')]('AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x3666c4['predictiveIntervalAvgTalktime']);loggerPredictive[_0x171a('0x4c')](_0x171a('0x55'));if(_0x3666c4[_0x171a('0x56')]>0x0){if(!_[_0x171a('0x57')](_0x3666c4['predictiveIntervalAvgTalktime'])&&_0x3666c4[_0x171a('0x58')]>0x0){return!![];}loggerPredictive[_0x171a('0x4c')]('Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive');if(!_['isUndefined'](_0x3666c4['predictiveIntervalAvgHoldtime'])&&_0x3666c4[_0x171a('0x54')]>0x0){return!![];}loggerPredictive[_0x171a('0x4c')](_0x171a('0x59'));}else{loggerPredictive['info']('Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive');}}else{loggerPredictive[_0x171a('0x4c')](_0x171a('0x5a'));}return![];}function mergeDataErlangB(_0x2ffbe1){return function(_0x557924){loggerPredictive['info'](_0x171a('0x5b'));loggerPredictive[_0x171a('0x4c')](_0x171a('0x5c'),_0x557924[_0x171a('0x5d')]);loggerPredictive['info'](_0x171a('0x5e'),_0x557924[_0x171a('0x5f')]);loggerPredictive[_0x171a('0x4c')](_0x171a('0x60'),_0x557924['erlangAbandonmentRate']);loggerPredictive[_0x171a('0x4c')](_0x171a('0x61'),_0x557924[_0x171a('0x62')]);loggerPredictive[_0x171a('0x4c')]('Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x557924['erlangAbandonmentRate']);loggerPredictive['info'](_0x171a('0x55'));_[_0x171a('0x63')](_0x2ffbe1,_0x557924);};}function ifInterval(_0x8e421d,_0x414f50){if(_[_0x171a('0x57')](_0x414f50)){return![];}return utils[_0x171a('0x64')](undefined,_0x414f50)<_0x8e421d*0x3c;}function clearPredictiveAttributes(_0xc070f4){if(_0xc070f4['startProgressive']){_0xc070f4[_0x171a('0x65')]=undefined;loggerPredictive[_0x171a('0x66')](_0xc070f4['name'],'startProgressive\x20value\x20cleared');}if(_0xc070f4['startPredictive']){_0xc070f4['startPredictive']=undefined;loggerPredictive['debug'](_0xc070f4[_0x171a('0x49')],'startPredictive\x20value\x20cleared');}if(_0xc070f4[_0x171a('0x67')]){clearInterval(_0xc070f4[_0x171a('0x67')]);_0xc070f4[_0x171a('0x67')]=undefined;loggerPredictive[_0x171a('0x66')](_0xc070f4[_0x171a('0x49')],_0x171a('0x68'));}}function loggerCatchPredictive(_0x512844,_0x298f5b){return function(_0x58737b){loggerPredictive[_0x171a('0x69')](_0x298f5b[_0x171a('0x49')],_0x512844);loggerPredictive[_0x171a('0x69')](_0x58737b[_0x171a('0x6a')]);clearPredictiveAttributes(_0x298f5b);};}function loggerCatch(_0x59df8e){return function(_0x5176a5){logger['error'](_0x59df8e,util[_0x171a('0x46')](_0x5176a5,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0xaa0ef7){return function(_0x397aab){if(isNotNull(_0x397aab)&&isNotNull(_0x397aab[0x0])){if(_0x397aab[0x0][_0x171a('0x6b')]>0x0){_0xaa0ef7[_0x171a('0x6c')]=utils['CAMPAIGN_STATUS'][_0x171a('0x6d')];logger[_0x171a('0x4c')](_0x171a('0x6e')+_0xaa0ef7[_0x171a('0x49')],_0x397aab[0x0][_0x171a('0x6b')],'contacts');}else{_0xaa0ef7['message']=utils[_0x171a('0x6f')][_0x171a('0x70')];logger['info'](_0x171a('0x71')+_0xaa0ef7['name']);}}};}function createObjHistory(_0x1133ab,_0x503ce7,_0x4cfd82,_0x887316,_0x5445e9){_0x1133ab['message']=_0x4cfd82;var _0x1ff1b4=new Action(_0x1133ab,_0x503ce7);var _0x5d16a8=new History(_0x1ff1b4);_0x5d16a8[_0x171a('0x72')]=_0x887316;_0x5d16a8[_0x171a('0x73')]=_0x5445e9;_0x5d16a8[_0x171a('0x74')]=_0x1ff1b4[_0x171a('0x75')];return _0x5d16a8;}function unlockQueueStatus(_0x470105,_0x5e99d4){setTimeout(function(){if(_['isUndefined'](_0x470105[_0x171a('0x76')])){loggerBooked[_0x171a('0x69')](_0x171a('0x77'),_0x5e99d4);}_0x470105[_0x171a('0x76')]=!![];loggerBooked[_0x171a('0x4c')](_0x171a('0x78'),_0x5e99d4,JSON[_0x171a('0x79')](_[_0x171a('0x7a')](_0x470105,['name','queueStatusComplete'])));},0x1f3);}function checkInterval(_0x1d588e){return function(){if(!isNotNull(_0x1d588e[_0x171a('0x7b')])){_0x1d588e[_0x171a('0x6c')]=utils[_0x171a('0x6f')][_0x171a('0x7c')];throw _0x1d588e[_0x171a('0x49')]+_0x171a('0x7d');}if(!isNotNull(_0x1d588e[_0x171a('0x7b')]['Intervals'])){_0x1d588e[_0x171a('0x6c')]=utils[_0x171a('0x6f')][_0x171a('0x7c')];throw _0x1d588e[_0x171a('0x49')]+_0x171a('0x7d');}if(!isNotNull(_[_0x171a('0x4b')](_0x1d588e[_0x171a('0x7b')][_0x171a('0x7e')]))){_0x1d588e[_0x171a('0x6c')]=utils[_0x171a('0x6f')]['NULL_INTERVAL'];throw _0x1d588e['name']+_0x171a('0x7d');}};}function checkIsIVRCampaignActive(_0x575f4c){return function(){if(!utils[_0x171a('0x7f')](_0x575f4c)){_0x575f4c[_0x171a('0x6c')]=utils['CAMPAIGN_STATUS']['INACTIVE'];throw _0x575f4c['name']+'\x20NOT\x20Active';}};}function emitCampaignSummary(_0x52e74e){if(utils[_0x171a('0x80')](_0x52e74e)){emit(util[_0x171a('0x47')]('campaign:ivr:%s',_0x52e74e[_0x171a('0x49')]),'campaign:save',_0x52e74e);}}function loggerCatchQueueSummary(_0x219edf,_0x3b0c32){return function(_0x623c1){clearPredictiveAttributes(_0x3b0c32);emitCampaignSummary(_0x3b0c32);loggerSyncQueueSummary['debug'](_0x219edf,util[_0x171a('0x46')](_0x623c1,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x27e76e){if(_0x27e76e['sendMessageOneNotActive']){if(_0x27e76e[_0x171a('0x81')]===0x0){_0x27e76e[_0x171a('0x82')]=![];_0x27e76e[_0x171a('0x6c')]=utils[_0x171a('0x6f')]['INACTIVE'];loggerSyncQueueSummary[_0x171a('0x66')](_0x171a('0x83'),_0x27e76e[_0x171a('0x49')],'is\x20not\x20active');}else{_0x27e76e[_0x171a('0x6c')]=utils[_0x171a('0x6f')][_0x171a('0x84')];loggerSyncQueueSummary[_0x171a('0x66')](_0x171a('0x83'),_0x27e76e[_0x171a('0x49')],_0x171a('0x85'));}emitCampaignSummary(_0x27e76e);}}function myreject(_0x218954){return function(_0x439912){return _0x218954(msgResponse(_0x171a('0x86'),_0x171a('0x87'),JSON[_0x171a('0x79')](_0x439912)));};}Dialer['prototype']['isTrunkReachable']=function(_0x5a1969){return!_[_0x171a('0x57')](_0x5a1969)&&_0x5a1969&&!_[_0x171a('0x57')](_0x5a1969['name'])&&!_[_0x171a('0x57')](_0x5a1969[_0x171a('0x88')])&&_0x5a1969['active']&&(this[_0x171a('0x23')][util[_0x171a('0x47')](_0x171a('0x89'),_0x5a1969[_0x171a('0x49')])][_0x171a('0x8a')]===_0x171a('0x8b')||this['trunks'][util[_0x171a('0x47')](_0x171a('0x89'),_0x5a1969[_0x171a('0x49')])][_0x171a('0x8a')]===_0x171a('0x8c'));};Dialer[_0x171a('0x1c')][_0x171a('0x8d')]=function(_0x31a888){var _0x22f70e=this;return function(){if(!_0x22f70e[_0x171a('0x8e')](_0x31a888[_0x171a('0x8f')])){if(!_0x22f70e['isTrunkReachable'](_0x31a888[_0x171a('0x90')])){_0x31a888[_0x171a('0x6c')]=utils[_0x171a('0x6f')]['TRUNK_NOT_REACHABLE'];throw _0x31a888[_0x171a('0x49')]+'\x20trunk\x20is\x20not\x20reachable';}}};};Dialer['prototype']['checkIfTime']=function(_0x2aeb9c,_0x59193c,_0x2212fe,_0x47d6a0){var _0xea1737=this;return function(){var _0x20bb1f=!![];return _0xea1737[_0x171a('0x91')](_0x2aeb9c,_0x59193c,_0x2212fe,_0x47d6a0,_0x20bb1f);};};Dialer[_0x171a('0x1c')][_0x171a('0x92')]=function(_0x3744af,_0x878834,_0x8f745f,_0x22fb0b){var _0x10c780=this;return function(){var _0x68ba5e=![];return _0x10c780[_0x171a('0x91')](_0x3744af['Intervals'],_0x878834,_0x8f745f,_0x22fb0b,_0x68ba5e);};};Dialer['prototype'][_0x171a('0x91')]=function(_0x5d8003,_0x3001f0,_0x1ea4f7,_0x4e6c89,_0xdc883a){var _0x2804d3=[];return new Promise(function(_0x1db486,_0x421ef4){if(!isNotNull(_0x5d8003)){_0x4e6c89[_0x171a('0x6c')]=utils[_0x171a('0x6f')]['NULL_INTERVAL'];return _0x421ef4(msgResponse(_0x171a('0x93'),_0x171a('0x94'),_0x1ea4f7+'\x20Intervals\x20is\x20null\x20'));}if(_[_0x171a('0x4b')](_0x5d8003)){_0x4e6c89['message']=utils['CAMPAIGN_STATUS'][_0x171a('0x95')];return _0x421ef4(msgResponse(_0x171a('0x93'),_0x171a('0x94'),_0x1ea4f7+_0x171a('0x96')));}if(_0x3001f0&&_[_0x171a('0x57')](config[_0x171a('0x97')][_0x3001f0])){_0x4e6c89['message']=utils[_0x171a('0x6f')][_0x171a('0x98')];return _0x421ef4(msgResponse(_0x171a('0x93'),_0x171a('0x94'),_0x1ea4f7+_0x171a('0x99')+_0x3001f0));}if(_[_0x171a('0x9a')](_0x5d8003)){for(var _0x193dab=0x0;_0x193dab<_0x5d8003[_0x171a('0x9b')];_0x193dab+=0x1){_0x2804d3['push'](ami[_0x171a('0x9c')]({'action':'command','command':util[_0x171a('0x47')](_0x171a('0x9d'),_0x5d8003[_0x193dab][_0x171a('0x9e')],!_['isUndefined'](config['timezones'][_0x3001f0])?_0x3001f0:'')})[_0x171a('0x42')](function(_0x1a8594){return _0x1a8594[_0x171a('0x9f')][_0x171a('0xa0')](_0x171a('0xa1'))>=0x0;})[_0x171a('0xa2')](myreject(_0x421ef4)));}}else{_0x2804d3[_0x171a('0xa3')](ami['Action']({'action':_0x171a('0xa4'),'command':util[_0x171a('0x47')](_0x171a('0x9d'),_0x5d8003,!_['isUndefined'](config['timezones'][_0x3001f0])?_0x3001f0:'')})[_0x171a('0x42')](function(_0x4a0055){return _0x4a0055[_0x171a('0x9f')][_0x171a('0xa0')](_0x171a('0xa1'))>=0x0;})[_0x171a('0xa2')](myreject(_0x421ef4)));}Promise[_0x171a('0xa5')](_0x2804d3)[_0x171a('0x42')](function(_0x303859){var _0x2c865b=_[_0x171a('0xa6')](_0x303859);if(_0x2c865b){return _0x1db486(_0x2c865b);}else{_0x4e6c89['message']=_0xdc883a?utils[_0x171a('0x6f')][_0x171a('0xa7')]:utils[_0x171a('0x6f')][_0x171a('0xa8')];return _0x421ef4(msgResponse('[ifTime][promiseAll]',_0x171a('0x94'),_0x171a('0xa9')+_0xdc883a+'\x20'+_0x1ea4f7+_0x171a('0xaa')+util[_0x171a('0x46')](_0x5d8003,{'showHidden':![],'depth':null})+_0x171a('0xab')+_0x3001f0));}})[_0x171a('0xa2')](function(_0x39017f){return _0x421ef4(msgResponse(_0x171a('0x93'),_0x171a('0x94'),JSON[_0x171a('0x79')](_0x39017f)));});});};Dialer['prototype']['loopCampaigns']=function(){var _0x599d56=this;return cmHopper[_0x171a('0xac')]({'active':![]},{'where':{'active':!![]}})['then'](function(){setInterval(function(){_0x599d56[_0x171a('0xad')]();},0x3e8);});};Dialer[_0x171a('0x1c')][_0x171a('0xad')]=function(){var _0x2a2757=this;var _0x6662ba;for(var _0x2300d5 in this[_0x171a('0x21')]){if(typeof this[_0x171a('0x21')][_0x2300d5]!==_0x171a('0xae')){_0x6662ba=this[_0x171a('0x21')][_0x2300d5];if(utils[_0x171a('0x80')](_0x6662ba)&&utils[_0x171a('0x7f')](_0x6662ba)){_0x6662ba[_0x171a('0x82')]=!![];Promise['resolve']()['then'](checkIsIVRCampaignActive(_0x6662ba))['then'](checkInterval(_0x6662ba))[_0x171a('0x42')](_0x2a2757[_0x171a('0x8d')](_0x6662ba))['then'](_0x2a2757[_0x171a('0xaf')](_0x6662ba[_0x171a('0xb0')],_0x6662ba[_0x171a('0xb1')],_0x6662ba[_0x171a('0x49')],_0x6662ba))['then'](_0x2a2757[_0x171a('0x92')](_0x6662ba['Interval'],_0x6662ba[_0x171a('0xb1')],_0x6662ba[_0x171a('0x49')],_0x6662ba))[_0x171a('0x42')](_0x2a2757[_0x171a('0xb2')](_0x6662ba))[_0x171a('0xa2')](loggerCatchQueueSummary(_0x171a('0xb3'),_0x6662ba));}else{notSendMessagesCampaign(_0x6662ba);}}}};Dialer['prototype'][_0x171a('0xb4')]=function(_0x506b33){if(_0x506b33[_0x171a('0xb5')]!==_0x171a('0xb6')){clearPredictiveAttributes(_0x506b33);}switch(_0x506b33[_0x171a('0xb5')]){case _0x171a('0xb7'):this[_0x171a('0xb8')](_0x506b33,0x1);break;case _0x171a('0xb9'):this['handlePower'](_0x506b33,_0x506b33[_0x171a('0xba')]);break;case _0x171a('0xb6'):this[_0x171a('0xb6')](_0x506b33);break;case _0x171a('0xa'):this[_0x171a('0xb8')](_0x506b33,0x1);break;default:logger[_0x171a('0x69')](_0x171a('0xbb'),_0x506b33[_0x171a('0x49')],_0x171a('0xbc'));}};Dialer[_0x171a('0x1c')][_0x171a('0x93')]=function(_0x46d05b,_0x1b4bef){var _0x29c503=_0x46d05b['dialTimezone'];var _0x1c8f50=_0x1b4bef?_0x46d05b[_0x171a('0xb0')]:_0x46d05b[_0x171a('0x7b')][_0x171a('0x7e')];logger[_0x171a('0xbd')]('Dialer::ifTime()',_0x1c8f50,_0x29c503,_0x46d05b['name'],util[_0x171a('0x47')](_0x171a('0xbe'),_0x46d05b[_0x171a('0x49')],_0x46d05b['id']));var _0xbec132=null;return Interval[_0x171a('0xbf')](_0x1c8f50,_0x29c503)[_0x171a('0x42')](function(_0x536c2d){if(_0x536c2d===!![]){return _0x536c2d;}else{_0x46d05b[_0x171a('0x6c')]=_0x1b4bef?utils[_0x171a('0x6f')][_0x171a('0xa7')]:utils[_0x171a('0x6f')][_0x171a('0xa8')];_0xbec132=msgResponse('[ifTime][promiseAll]',_0x171a('0x94'),'Global:\x20'+_0x1b4bef+'\x20'+_0x46d05b[_0x171a('0x49')]+_0x171a('0xaa')+util[_0x171a('0x46')](_0x1c8f50,{'showHidden':![],'depth':null})+_0x171a('0xab')+_0x29c503);}if(_0xbec132!==null){logger[_0x171a('0xbd')](_0x171a('0xc0'),_0xbec132);_0xbec132[_0x171a('0xc1')]=_0x1b4bef;throw _0xbec132;}})[_0x171a('0xa2')](function(_0x4fc68e){logger['error'](_0x171a('0xc2'),_0x4fc68e);throw msgResponse(_0x171a('0x86'),_0x171a('0x87'),util[_0x171a('0x46')](_0x4fc68e,{'showHidden':![],'depth':null}));});};Dialer[_0x171a('0x1c')][_0x171a('0x2e')]=function(_0x1283e8){if(this[_0x171a('0x20')][_0x1283e8[_0x171a('0xc3')]]){if(this['uniqueId'][_0x1283e8[_0x171a('0xc4')]]&&this['uniqueId'][_0x1283e8[_0x171a('0xc4')]][_0x171a('0x43')]!==_0x171a('0xc5')){utils[_0x171a('0xc6')](this['voiceQueues'][_0x1283e8[_0x171a('0xc3')]],_0x171a('0xc7'));this[_0x171a('0xc8')][_0x1283e8[_0x171a('0xc4')]][_0x171a('0xc9')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}}};Dialer[_0x171a('0x1c')]['syncAgentComplete']=function(_0x23b798){var _0x38739b=this[_0x171a('0xc8')][_0x23b798['uniqueid']];if(this[_0x171a('0x20')][_0x23b798[_0x171a('0xc3')]]){if(_0x38739b&&_0x38739b[_0x171a('0x43')]!==_0x171a('0xc5')){delete this[_0x171a('0xc8')][_0x23b798[_0x171a('0xc4')]];this[_0x171a('0x20')][_0x23b798[_0x171a('0xc3')]][_0x171a('0xca')]+=0x1;var _0x35d30a=new AgentComplete(_0x38739b,_0x23b798);if(_0x23b798[_0x171a('0xcb')]==='agent'){_0x35d30a[_0x171a('0xcc')]=this[_0x171a('0x20')][_0x23b798[_0x171a('0xc3')]][_0x171a('0xcd')]&&this[_0x171a('0x20')][_0x23b798['queue']][_0x171a('0xce')]?moment()[_0x171a('0x47')](_0x171a('0xcf')):undefined;}hopperUtils[_0x171a('0xd0')](_0x35d30a)[_0x171a('0xa2')](loggerCatch('[syncAgentComplete][createHistory]'));hopperUtils['moveContactManagedDialer'](_0x35d30a)[_0x171a('0xa2')](loggerCatch(_0x171a('0xd1')));}}};Dialer[_0x171a('0x1c')][_0x171a('0xd2')]=function(_0x406e01){var _0x552275=this[_0x171a('0xc8')][_0x406e01[_0x171a('0xc4')]];var _0xdf8089=this;var _0x52b1eb=![];var _0x8d0a2f;var _0x5b36eb;if(this[_0x171a('0x20')][_0x406e01[_0x171a('0xc3')]]){if(_0x552275&&_0x552275['type']!==_0x171a('0xc5')){delete this['uniqueId'][_0x406e01['uniqueid']];utils[_0x171a('0xc6')](this[_0x171a('0x20')][_0x406e01[_0x171a('0xc3')]],_0x171a('0xd3'));_0x552275[_0x171a('0xd4')]=moment()[_0x171a('0x47')](_0x171a('0xcf'));var _0x4e9e97=new QueueCallerAbandon(_0x552275,_0x406e01);if(utils[_0x171a('0x64')](_0x552275[_0x171a('0xd4')],_0x552275[_0x171a('0xd5')])>=_0x552275[_0x171a('0xd6')]){this['voiceQueues'][_0x406e01[_0x171a('0xc3')]][_0x171a('0x51')]+=0x1;this[_0x171a('0x20')][_0x406e01[_0x171a('0xc3')]][_0x171a('0xd7')]+=0x1;this['voiceQueues'][_0x406e01['queue']][_0x171a('0xd8')]+=0x1;_0x4e9e97[_0x171a('0x72')]=0xa;_0x4e9e97['statedesc']=_0x171a('0xd9');_0x4e9e97['dropreason']=_0x171a('0xda');_0x4e9e97[_0x171a('0xcc')]=this[_0x171a('0x20')][_0x406e01[_0x171a('0xc3')]][_0x171a('0xcd')]?moment()['format'](_0x171a('0xcf')):undefined;_0x4e9e97[_0x171a('0xdb')]+=0x1;_0x4e9e97[_0x171a('0xdc')]+=0x1;_0x8d0a2f=this[_0x171a('0x20')][_0x406e01[_0x171a('0xc3')]]['dialDropRetryFrequency'];_0x5b36eb=this[_0x171a('0x20')][_0x406e01[_0x171a('0xc3')]]['callAdditionalPhoneAfterMin'];hopperUtils[_0x171a('0xdd')](_0x4e9e97,_0x4e9e97[_0x171a('0x72')],_0x552275[_0x171a('0xde')])['then'](function(_0x1b8c8c){_0x52b1eb=_0x1b8c8c[_0x171a('0xdf')]==0x1;if(_0x4e9e97['countdropretry']>=_0xdf8089['voiceQueues'][_0x406e01['queue']][_0x171a('0xe0')]){_0xdf8089[_0x171a('0xe1')](_0x4e9e97,_0x1b8c8c['additional']);}else{hopperUtils['rescheduleContact']({'active':![],'countdropretry':_0x4e9e97[_0x171a('0xdb')],'scheduledat':moment()[_0x171a('0xe2')](_0xdf8089[_0x171a('0x20')][_0x406e01[_0x171a('0xc3')]][_0x171a('0xe3')],_0x171a('0xe4'))[_0x171a('0x47')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x552275['ContactId'],'ListId':_0x552275[_0x171a('0xe5')],'VoiceQueueId':_0x552275[_0x171a('0xe6')]||undefined,'CampaignId':_0x552275[_0x171a('0xe7')]||undefined})[_0x171a('0xa2')](loggerCatch(_0x171a('0xe8')));var _0x2ef5ce=new History(_0x4e9e97);_0x2ef5ce[_0x171a('0x72')]=0xa;_0x2ef5ce['statedesc']='Drop';_0x2ef5ce[_0x171a('0x75')]=moment()[_0x171a('0x47')](_0x171a('0xcf'));_0x2ef5ce[_0x171a('0x74')]=_0x2ef5ce[_0x171a('0x75')];_0x2ef5ce[_0x171a('0xe9')]=_0x4e9e97[_0x171a('0xe9')];_0x2ef5ce['calleridnum']=_0x4e9e97['calleridnum'];hopperUtils[_0x171a('0xd0')](_0x2ef5ce)['catch'](loggerCatch(_0x171a('0xea')));}})[_0x171a('0x42')](function(){if(_0x52b1eb)hopperUtils[_0x171a('0xeb')](_0x4e9e97,_0x8d0a2f,_0x5b36eb)[_0x171a('0x42')](function(){return 0x1;});});}else{this[_0x171a('0x20')][_0x406e01['queue']][_0x171a('0xec')]+=0x1;this[_0x171a('0x20')][_0x406e01[_0x171a('0xc3')]][_0x171a('0xed')]+=0x1;_0x4e9e97[_0x171a('0x72')]=0xb;_0x4e9e97['statedesc']=_0x171a('0xee');_0x4e9e97['dropreason']=_0x171a('0xef');_0x4e9e97[_0x171a('0xf0')]+=0x1;_0x4e9e97[_0x171a('0xdc')]+=0x1;_0x8d0a2f=this[_0x171a('0x20')][_0x406e01[_0x171a('0xc3')]][_0x171a('0xf1')];_0x5b36eb=this[_0x171a('0x20')][_0x406e01[_0x171a('0xc3')]]['callAdditionalPhoneAfterMin'];hopperUtils[_0x171a('0xdd')](_0x4e9e97,_0x4e9e97[_0x171a('0x72')],_0x552275[_0x171a('0xde')])[_0x171a('0x42')](function(_0x301840){if(_0x4e9e97[_0x171a('0xf0')]>=_0xdf8089[_0x171a('0x20')][_0x406e01['queue']][_0x171a('0xf2')]){_0xdf8089[_0x171a('0xe1')](_0x4e9e97,_0x301840[_0x171a('0xdf')]);}else{hopperUtils[_0x171a('0xf3')]({'active':![],'countabandonedretry':_0x4e9e97['countabandonedretry'],'scheduledat':moment()[_0x171a('0xe2')](_0xdf8089[_0x171a('0x20')][_0x406e01[_0x171a('0xc3')]][_0x171a('0xf1')],_0x171a('0xe4'))['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x552275[_0x171a('0xf4')],'ListId':_0x552275[_0x171a('0xe5')],'VoiceQueueId':_0x552275['VoiceQueueId']||undefined,'CampaignId':_0x552275[_0x171a('0xe7')]||undefined})[_0x171a('0xa2')](loggerCatch('[rescheduleContact][Abandoned]'));var _0x383222=new History(_0x4e9e97);_0x383222['state']=0xb;_0x383222[_0x171a('0x73')]='Abandoned';_0x383222[_0x171a('0x75')]=moment()[_0x171a('0x47')](_0x171a('0xcf'));_0x383222[_0x171a('0x74')]=_0x383222[_0x171a('0x75')];_0x383222['calleridname']=_0x4e9e97[_0x171a('0xe9')];_0x383222[_0x171a('0xf5')]=_0x4e9e97[_0x171a('0xf5')];hopperUtils['createHistory'](_0x383222)[_0x171a('0xa2')](loggerCatch('[syncAgentComplete][createHistory][11]'));}})[_0x171a('0x42')](function(){if(_0x52b1eb)hopperUtils[_0x171a('0xeb')](_0x4e9e97,_0x8d0a2f,_0x5b36eb)['then'](function(){return 0x1;});});}}}};Dialer[_0x171a('0x1c')]['syncNewExten']=function(_0x57c820){if(this['actions'][_0x57c820[_0x171a('0xc4')]]){this[_0x171a('0x26')][_0x57c820[_0x171a('0xc4')]][_0x171a('0xf6')]=_0x57c820[_0x171a('0xf6')];}if(this[_0x171a('0xc8')][_0x57c820['uniqueid']]){this[_0x171a('0xc8')][_0x57c820[_0x171a('0xc4')]][_0x171a('0xf6')]=_0x57c820[_0x171a('0xf6')];}};Dialer['prototype'][_0x171a('0x3c')]=function(_0x2f5a92){if(!this[_0x171a('0x26')][_0x2f5a92['actionid']]){return;}var _0x186e32=this[_0x171a('0x20')][this['actions'][_0x2f5a92[_0x171a('0xf7')]][_0x171a('0xc3')]][_0x171a('0xf8')]||_0x171a('0xf9');if(_0x186e32===_0x171a('0xfa')){if(this[_0x171a('0x26')][_0x2f5a92[_0x171a('0xf7')]]&&_[_0x171a('0xfb')](this[_0x171a('0x26')][_0x2f5a92['actionid']]['locked'])&&_0x2f5a92['status']==='1'&&_0x2f5a92[_0x171a('0xfc')]==='0'){if(this[_0x171a('0x22')][_0x2f5a92[_0x171a('0xfd')]]){if(!this[_0x171a('0x22')][_0x2f5a92[_0x171a('0xfd')]]['locked']){this[_0x171a('0x22')][_0x2f5a92[_0x171a('0xfd')]]['locked']=!![];this[_0x171a('0x26')][_0x2f5a92['actionid']][_0x171a('0xfe')]=!![];this[_0x171a('0x26')][_0x2f5a92['actionid']][_0x171a('0xfd')]=_0x2f5a92['stateinterface'];}}}}else if(_0x186e32===_0x171a('0xf9')){if(this[_0x171a('0x26')][_0x2f5a92['actionid']]){if(this[_0x171a('0x22')][_0x2f5a92[_0x171a('0xfd')]]){this[_0x171a('0x26')][_0x2f5a92[_0x171a('0xf7')]][_0x171a('0xfd')]=_0x2f5a92[_0x171a('0xfd')];if(_[_0x171a('0xfb')](this['queueBooked'][this[_0x171a('0x26')][_0x2f5a92[_0x171a('0xf7')]][_0x171a('0xc3')]])){this['queueBooked'][this[_0x171a('0x26')][_0x2f5a92[_0x171a('0xf7')]][_0x171a('0xc3')]]=[];}this[_0x171a('0x2a')][this['actions'][_0x2f5a92[_0x171a('0xf7')]][_0x171a('0xc3')]][_0x171a('0xa3')](_[_0x171a('0x63')](_[_0x171a('0x7a')](this[_0x171a('0x26')][_0x2f5a92[_0x171a('0xf7')]],['idHopper',_0x171a('0xfd')]),{'status':_0x2f5a92[_0x171a('0x8a')],'paused':_0x2f5a92[_0x171a('0xfc')]}));}}}};Dialer[_0x171a('0x1c')][_0x171a('0x3e')]=function(_0x1a24fe){if(!this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]]){return;}var _0x10a80f=this;var _0xeeec37=this['voiceQueues'][this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xc3')]];var _0x570839=_0xeeec37['strategy']||'rrmemory';if(_0x570839==='roundrobin'){if(this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]]&&this[_0x171a('0x26')][_0x1a24fe['actionid']][_0x171a('0xfd')]){this['preview'][_0x171a('0xff')](this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0x100')],this[_0x171a('0x26')][_0x1a24fe['actionid']][_0x171a('0xfd')])['catch'](function(_0x295e07){logger[_0x171a('0x69')]('[Catch][Preview][syncQueueStatusComplete]',util[_0x171a('0x46')](_0x295e07,{'showHidden':![],'depth':null}));})[_0x171a('0x101')](function(){utils[_0x171a('0xc6')](_0x10a80f[_0x171a('0x20')][_0x10a80f[_0x171a('0x26')][_0x1a24fe['actionid']][_0x171a('0xc3')]],_0x171a('0x102'));_0x10a80f[_0x171a('0x22')][_0x10a80f['actions'][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xfd')]]['locked']=![];delete _0x10a80f['actions'][_0x1a24fe[_0x171a('0xf7')]];unlockQueueStatus(_0xeeec37);});}else{utils[_0x171a('0xc6')](this[_0x171a('0x20')][this[_0x171a('0x26')][_0x1a24fe['actionid']][_0x171a('0xc3')]],_0x171a('0x102'));hopperUtils['rescheduleContact']({'active':![],'ContactId':this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]]['ContactId'],'ListId':this['actions'][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xe5')],'VoiceQueueId':this['actions'][_0x1a24fe['actionid']][_0x171a('0xe6')]||undefined,'CampaignId':this['actions'][_0x1a24fe['actionid']]['CampaignId']||undefined})[_0x171a('0xa2')](loggerCatch(_0x171a('0x103')));delete this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]];unlockQueueStatus(_0xeeec37);}}else if(_0x570839===_0x171a('0xf9')){var _0x40c576;if(this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]]&&!_[_0x171a('0x4b')](this[_0x171a('0x2a')][this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xc3')]])){if(this['queueBookedRR'][_0x10a80f[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xc3')]]){this[_0x171a('0x2b')][_0x10a80f[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xc3')]]=this[_0x171a('0x2b')][this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]]['queue']]?this[_0x171a('0x2b')][this['actions'][_0x1a24fe[_0x171a('0xf7')]]['queue']]:this['queueBooked'][this[_0x171a('0x26')][_0x1a24fe['actionid']][_0x171a('0xc3')]]?this[_0x171a('0x2a')][this['actions'][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xc3')]][_0x171a('0x104')]||0x0:0x0;}this[_0x171a('0x2a')][this['actions'][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xc3')]][_0x171a('0x104')]=this['queueBookedRR'][this[_0x171a('0x26')][_0x1a24fe['actionid']][_0x171a('0xc3')]];for(var _0x5d47f4=0x0;_0x5d47f4<this['queueBooked'][this[_0x171a('0x26')][_0x1a24fe['actionid']][_0x171a('0xc3')]]['length'];_0x5d47f4+=0x1){_0x40c576=rr(this[_0x171a('0x2a')][this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xc3')]]);this['queueBookedRR'][_0x10a80f[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]]['queue']]=this[_0x171a('0x2a')][this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xc3')]][_0x171a('0x104')];if(_0x40c576[_0x171a('0x8a')]==='1'&&_0x40c576[_0x171a('0xfc')]==='0'){break;}}if(!_[_0x171a('0xfb')](_0x40c576)){this['agents'][_0x40c576[_0x171a('0xfd')]][_0x171a('0x105')]=_[_0x171a('0x57')](this[_0x171a('0x22')][_0x40c576[_0x171a('0xfd')]][_0x171a('0x105')])?!![]:this[_0x171a('0x22')][_0x40c576[_0x171a('0xfd')]][_0x171a('0x105')];}loggerBooked[_0x171a('0x4c')](_0x171a('0x106'),_0x1a24fe[_0x171a('0xf7')],_0x171a('0x107'),JSON[_0x171a('0x79')](_[_0x171a('0x7a')](this[_0x171a('0x22')][_0x40c576[_0x171a('0xfd')]],[_0x171a('0x49'),'unlockRR'])),_0x171a('0x108'),JSON[_0x171a('0x79')](_0x40c576[_0x171a('0x100')]));if(!_[_0x171a('0xfb')](_0x40c576)&&_0x40c576[_0x171a('0x8a')]==='1'&&_0x40c576[_0x171a('0xfc')]==='0'&&this[_0x171a('0x22')][_0x40c576[_0x171a('0xfd')]][_0x171a('0x105')]){this[_0x171a('0x22')][_0x40c576[_0x171a('0xfd')]][_0x171a('0x105')]=![];this[_0x171a('0x2a')][_0x10a80f['actions'][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xc3')]]=[];this[_0x171a('0x1f')][_0x171a('0xff')](_0x40c576['idHopper'],_0x40c576['stateinterface'])[_0x171a('0xa2')](function(_0x3745b6){logger[_0x171a('0x69')](_0x171a('0x109'),util[_0x171a('0x46')](_0x3745b6,{'showHidden':![],'depth':null}));})[_0x171a('0x101')](function(){utils[_0x171a('0xc6')](_0x10a80f['voiceQueues'][_0x10a80f[_0x171a('0x26')][_0x1a24fe['actionid']][_0x171a('0xc3')]],_0x171a('0x102'));setTimeout(function(){_0x10a80f[_0x171a('0x22')][_0x40c576[_0x171a('0xfd')]][_0x171a('0x105')]=!![];loggerBooked[_0x171a('0x4c')]('[booked][RR][finaly]',_0x1a24fe[_0x171a('0xf7')],'Agent:\x20',JSON[_0x171a('0x79')](_['pick'](_0x10a80f[_0x171a('0x22')][_0x40c576[_0x171a('0xfd')]],['name',_0x171a('0x105')])),_0x171a('0x108'),JSON[_0x171a('0x79')](_0x40c576[_0x171a('0x100')]));},0xc7);delete _0x10a80f[_0x171a('0x26')][_0x1a24fe['actionid']];unlockQueueStatus(_0xeeec37,_0x1a24fe['actionid']);});}else{loggerBooked[_0x171a('0x4c')](_0x171a('0x10a'));utils[_0x171a('0xc6')](this[_0x171a('0x20')][this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xc3')]],_0x171a('0x102'));hopperUtils[_0x171a('0xf3')]({'active':![],'ContactId':this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xf4')],'ListId':this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]]['ListId'],'VoiceQueueId':this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xe6')]||undefined,'CampaignId':this['actions'][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xe7')]||undefined})['catch'](loggerCatch(_0x171a('0x103')));delete this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]];unlockQueueStatus(_0xeeec37);}}else{loggerBooked[_0x171a('0x4c')](_0x171a('0x10b'));utils['decrementOriginate'](this[_0x171a('0x20')][this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]]['queue']],'[syncQueueStatusComplete]');hopperUtils[_0x171a('0xf3')]({'active':![],'ContactId':this[_0x171a('0x26')][_0x1a24fe['actionid']]['ContactId'],'ListId':this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xe5')],'VoiceQueueId':this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]]['VoiceQueueId']||undefined,'CampaignId':this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xe7')]||undefined})['catch'](loggerCatch(_0x171a('0x10c')));delete this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]];unlockQueueStatus(_0xeeec37);}}else{loggerBooked['info'](_0x171a('0x10d'));utils[_0x171a('0xc6')](this['voiceQueues'][this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xc3')]],_0x171a('0x102'));hopperUtils[_0x171a('0xf3')]({'active':![],'ContactId':this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xf4')],'ListId':this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]][_0x171a('0xe5')],'VoiceQueueId':this['actions'][_0x1a24fe['actionid']][_0x171a('0xe6')]||undefined,'CampaignId':this[_0x171a('0x26')][_0x1a24fe['actionid']]['CampaignId']||undefined})['catch'](loggerCatch(_0x171a('0x10e')));delete this[_0x171a('0x26')][_0x1a24fe[_0x171a('0xf7')]];unlockQueueStatus(_0xeeec37);}};Dialer['prototype'][_0x171a('0x32')]=function(_0x6a2ad5){var _0xb9e5ab=this['actions'][_0x6a2ad5[_0x171a('0xf7')]];if(_0xb9e5ab){delete this[_0x171a('0x26')][_0x6a2ad5[_0x171a('0xf7')]];_0xb9e5ab[_0x171a('0xd5')]=moment()[_0x171a('0x47')](_0x171a('0xcf'));var _0x31a9d2=_0xb9e5ab[_0x171a('0x43')]===_0x171a('0xc5')?this[_0x171a('0x21')][_0xb9e5ab['queue']]:this['voiceQueues'][_0xb9e5ab['getQueue']()];if(_0x6a2ad5[_0x171a('0x10f')]!==_0x171a('0x110')){utils[_0x171a('0xc6')](_0x31a9d2,_0x171a('0x111'));return this['callProgressDetecting'](_0xb9e5ab,_0x31a9d2,_0x6a2ad5)[_0x171a('0xa2')](loggerCatch(_0x171a('0x112')));}this[_0x171a('0xc8')][_0x6a2ad5[_0x171a('0xc4')]]=_0xb9e5ab;}};Dialer['prototype'][_0x171a('0x3a')]=function(_0x17624c){var _0x317fee=this;var _0x118112=this[_0x171a('0xc8')][_0x17624c[_0x171a('0xc4')]];var _0x387a64;if(!_[_0x171a('0xfb')](_0x17624c)&&!_[_0x171a('0xfb')](_0x17624c[_0x171a('0x113')])&&!_['isNil'](_0x17624c[_0x171a('0x113')][_0x171a('0x114')])&&_0x17624c['exten']==='xcally-motion-dialer'&&_0x118112){if(_0x118112[_0x171a('0x43')]!==_0x171a('0xc5')&&this['voiceQueues'][_0x118112[_0x171a('0xc3')]][_0x171a('0x115')]&&_0x17624c[_0x171a('0x116')]===_0x171a('0x117')){delete this[_0x171a('0xc8')][_0x17624c['uniqueid']];utils[_0x171a('0xc6')](this[_0x171a('0x20')][_0x118112[_0x171a('0xc3')]],'[syncVarSet]');this['voiceQueues'][_0x118112[_0x171a('0xc3')]][_0x171a('0xca')]+=0x1;this['voiceQueues'][_0x118112['queue']][_0x171a('0x118')]+=0x1;_0x387a64=new Hangup(_0x118112,_0x17624c);_0x387a64[_0x171a('0x72')]=0x12;_0x387a64[_0x171a('0x73')]=_0x171a('0x119');_0x387a64[_0x171a('0x11a')]=_0x171a('0x11b');ami[_0x171a('0x11c')]('custom:amd',ut[_0x171a('0x11d')](_0x387a64,_0x171a('0x11e')));this[_0x171a('0x11f')](_0x387a64,_0x171a('0x120'),_0x171a('0x121'));}if(_0x118112['type']!==_0x171a('0xc5')&&this[_0x171a('0x20')][_0x118112[_0x171a('0xc3')]]['dialAMDActive']&&_0x17624c[_0x171a('0x116')]==='MACHINE'){return new Promise(function(_0xec9194,_0x535554){delete _0x317fee['uniqueId'][_0x17624c['uniqueid']];utils['decrementOriginate'](_0x317fee[_0x171a('0x20')][_0x118112[_0x171a('0xc3')]],'[syncVarSet]');_0x317fee[_0x171a('0x20')][_0x118112[_0x171a('0xc3')]]['outboundAnswerCallsDay']+=0x1;_0x317fee[_0x171a('0x20')][_0x118112[_0x171a('0xc3')]][_0x171a('0x118')]+=0x1;var _0x3e5f1a=_0x317fee[_0x171a('0x20')][_0x118112[_0x171a('0xc3')]];var _0x31a2e=new Hangup(_0x118112,_0x17624c);_0x31a2e[_0x171a('0x72')]=0x13;_0x31a2e[_0x171a('0x73')]=_0x171a('0x122');_0x31a2e['membername']=_0x171a('0x11b');_0x31a2e[_0x171a('0x123')]+=0x1;_0x31a2e[_0x171a('0xdc')]+=0x1;_0x31a2e[_0x171a('0x11e')]=!![];ami[_0x171a('0x11c')]('custom:amd',ut['buildObj'](_0x31a2e,_0x171a('0x11e')));hopperUtils['createHistory'](_0x31a2e)['catch'](loggerCatch(_0x171a('0x124')));if(_0x31a2e[_0x171a('0x125')]+_0x31a2e[_0x171a('0x126')]+_0x31a2e[_0x171a('0x127')]+_0x31a2e[_0x171a('0x128')]+_0x31a2e[_0x171a('0xdb')]+_0x31a2e['countabandonedretry']+_0x31a2e[_0x171a('0x123')]+_0x31a2e[_0x171a('0x129')]>=_0x3e5f1a[_0x171a('0x12a')]){_0x317fee['stateGlobal'](_0x31a2e,_0xec9194,_0x535554,_0x171a('0x12b'));}else{if(_0x31a2e[_0x171a('0x123')]>=_0x3e5f1a[_0x171a('0x12c')]){_0x317fee[_0x171a('0x12d')](_0x31a2e,_0xec9194,_0x535554,_0x171a('0x12e'));}else{hopperUtils[_0x171a('0xf3')]({'active':![],'countmachineretry':_0x31a2e[_0x171a('0x123')],'scheduledat':moment()[_0x171a('0xe2')](_0x3e5f1a[_0x171a('0x12f')],_0x171a('0xe4'))[_0x171a('0x47')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x31a2e[_0x171a('0xf4')],'ListId':_0x31a2e[_0x171a('0xe5')],'VoiceQueueId':_0x31a2e[_0x171a('0xe6')]||undefined,'CampaignId':_0x31a2e[_0x171a('0xe7')]||undefined})['catch'](loggerCatch('[rescheduleContact][Machine]'));_0xec9194({'reschedule':0x1});}}});}if(_0x118112['type']==='ivr'&&this['campaigns'][_0x118112[_0x171a('0xc3')]][_0x171a('0x115')]&&_0x17624c[_0x171a('0x116')]===_0x171a('0x117')){delete this[_0x171a('0xc8')][_0x17624c[_0x171a('0xc4')]];utils['decrementOriginate'](this[_0x171a('0x21')][_0x118112[_0x171a('0xc3')]],'[syncVarSet]');_0x387a64=new Hangup(_0x118112,_0x17624c);_0x387a64[_0x171a('0x72')]=0x12;_0x387a64[_0x171a('0x73')]=_0x171a('0x119');_0x387a64[_0x171a('0x11a')]=_0x171a('0x11b');ami['emit'](_0x171a('0x130'),ut[_0x171a('0x11d')](_0x387a64,_0x171a('0x11e')));this[_0x171a('0x11f')](_0x387a64,_0x171a('0x131'),_0x171a('0x132'));}if(_0x118112[_0x171a('0x43')]===_0x171a('0xc5')&&this['campaigns'][_0x118112[_0x171a('0xc3')]][_0x171a('0x115')]&&_0x17624c['value']===_0x171a('0x133')){return new Promise(function(_0x22704e,_0x3ea510){delete _0x317fee[_0x171a('0xc8')][_0x17624c[_0x171a('0xc4')]];utils[_0x171a('0xc6')](_0x317fee['campaigns'][_0x118112[_0x171a('0xc3')]],'[syncVarSet]');_0x317fee[_0x171a('0x21')][_0x118112[_0x171a('0xc3')]][_0x171a('0xca')]+=0x1;_0x317fee[_0x171a('0x21')][_0x118112[_0x171a('0xc3')]]['outboundAnswerAgiCallsDay']+=0x1;var _0x3d1e86=_0x317fee[_0x171a('0x21')][_0x118112[_0x171a('0xc3')]];var _0x1e482d=new Hangup(_0x118112,_0x17624c);_0x1e482d[_0x171a('0x72')]=0x13;_0x1e482d[_0x171a('0x73')]=_0x171a('0x122');_0x1e482d[_0x171a('0x11a')]=_0x171a('0x11b');_0x1e482d[_0x171a('0x123')]+=0x1;_0x1e482d[_0x171a('0xdc')]+=0x1;_0x1e482d[_0x171a('0x11e')]=!![];ami[_0x171a('0x11c')](_0x171a('0x130'),ut[_0x171a('0x11d')](_0x1e482d,_0x171a('0x11e')));hopperUtils[_0x171a('0xd0')](_0x1e482d)[_0x171a('0xa2')](loggerCatch(_0x171a('0x124')));if(_0x1e482d[_0x171a('0x125')]+_0x1e482d['countcongestionretry']+_0x1e482d[_0x171a('0x127')]+_0x1e482d['countnosuchnumberretry']+_0x1e482d['countdropretry']+_0x1e482d[_0x171a('0xf0')]+_0x1e482d[_0x171a('0x123')]+_0x1e482d[_0x171a('0x129')]>=_0x3d1e86[_0x171a('0x12a')]){_0x317fee[_0x171a('0x134')](_0x1e482d,_0x22704e,_0x3ea510,_0x171a('0x12b'));}else{if(_0x1e482d[_0x171a('0x123')]>=_0x3d1e86[_0x171a('0x12c')]){_0x317fee['createStateFinal'](_0x1e482d,_0x22704e,_0x3ea510,_0x171a('0x12e'));}else{hopperUtils[_0x171a('0xf3')]({'active':![],'countmachineretry':_0x1e482d[_0x171a('0x123')],'scheduledat':moment()['add'](_0x3d1e86[_0x171a('0x12f')],_0x171a('0xe4'))['format'](_0x171a('0xcf')),'ContactId':_0x1e482d['ContactId'],'ListId':_0x1e482d['ListId'],'VoiceQueueId':_0x1e482d['VoiceQueueId']||undefined,'CampaignId':_0x1e482d[_0x171a('0xe7')]||undefined})[_0x171a('0xa2')](loggerCatch(_0x171a('0x135')));_0x22704e({'reschedule':0x1});}}});}}};Dialer[_0x171a('0x1c')][_0x171a('0x136')]=function(_0x46fa19){var _0xe3fc29=this[_0x171a('0xc8')][_0x46fa19[_0x171a('0xc4')]];var _0x52b8b6;if(!_0xe3fc29){return;}if(_0xe3fc29[_0x171a('0x43')]===_0x171a('0xc5')){delete this['uniqueId'][_0x46fa19['uniqueid']];utils[_0x171a('0xc6')](this['campaigns'][_0xe3fc29['queue']],_0x171a('0x137'));this[_0x171a('0x21')][_0xe3fc29['queue']][_0x171a('0x138')]+=0x1;if(_0x46fa19[_0x171a('0x139')]===_0x171a('0x13a')){const _0xaad4ee=new AgentComplete(_0xe3fc29,_0x46fa19);_0xaad4ee[_0x171a('0xe7')]=this[_0x171a('0x21')][_0xe3fc29['queue']]['id'];hopperUtils['createHistory'](_0xaad4ee)[_0x171a('0xa2')](loggerCatch(_0x171a('0x13b')));hopperUtils[_0x171a('0x13c')](_0xaad4ee)[_0x171a('0xa2')](loggerCatch(_0x171a('0x13d')));}else{_0x52b8b6=new Hangup(_0xe3fc29,_0x46fa19);hopperUtils[_0x171a('0xd0')](_0x52b8b6)[_0x171a('0xa2')](loggerCatch('[syncHangupIvr][createHistory]'));hopperUtils[_0x171a('0x13c')](_0x52b8b6)[_0x171a('0xa2')](loggerCatch(_0x171a('0x13e')));}}else{if(isNotNull(this['voiceQueues'][_0xe3fc29['queue']]['dialQueueProject'])){delete this[_0x171a('0xc8')][_0x46fa19['uniqueid']];utils['decrementOriginate'](this[_0x171a('0x20')][_0xe3fc29[_0x171a('0xc3')]],_0x171a('0x137'));this[_0x171a('0x20')][_0xe3fc29[_0x171a('0xc3')]][_0x171a('0xca')]+=0x1;this[_0x171a('0x20')][_0xe3fc29['queue']]['outboundAnswerAgiCallsDay']+=0x1;_0x52b8b6=new Hangup(_0xe3fc29,_0x46fa19);_0x52b8b6[_0x171a('0x72')]=0x10;_0x52b8b6[_0x171a('0x73')]=_0x171a('0x13f');_0x52b8b6['membername']=_0x171a('0x140');hopperUtils[_0x171a('0xd0')](_0x52b8b6)[_0x171a('0xa2')](loggerCatch('[syncHangupIvr][createHistory]'));hopperUtils['moveContactManagedDialer'](_0x52b8b6)[_0x171a('0xa2')](loggerCatch(_0x171a('0x13e')));}else{delete this['uniqueId'][_0x46fa19['uniqueid']];utils[_0x171a('0xc6')](this[_0x171a('0x20')][_0xe3fc29[_0x171a('0xc3')]],_0x171a('0x141'));if(_0x46fa19[_0x171a('0x139')]===_0x171a('0x13a')){this[_0x171a('0x20')][_0xe3fc29[_0x171a('0xc3')]][_0x171a('0xca')]+=0x1;const _0x22ce3a=new AgentComplete(_0xe3fc29,_0x46fa19);_0x22ce3a['VoiceQueueId']=this['voiceQueues'][_0xe3fc29[_0x171a('0xc3')]]['id'];hopperUtils[_0x171a('0xd0')](_0x22ce3a)[_0x171a('0xa2')](loggerCatch(_0x171a('0x142')));hopperUtils['moveContactManagedDialer'](_0x22ce3a)[_0x171a('0xa2')](loggerCatch(_0x171a('0xd1')));}else{this[_0x171a('0x20')][_0xe3fc29[_0x171a('0xc3')]][_0x171a('0x143')]+=0x1;_0x52b8b6=new Hangup(_0xe3fc29,_0x46fa19);_0x52b8b6[_0x171a('0x72')]=0xc;_0x52b8b6[_0x171a('0x73')]=_0x46fa19[_0x171a('0x139')];_0x52b8b6[_0x171a('0x11a')]=_0x171a('0x144');hopperUtils[_0x171a('0xd0')](_0x52b8b6)[_0x171a('0xa2')](loggerCatch(_0x171a('0x145')));hopperUtils['moveContactManagedDialer'](_0x52b8b6)['catch'](loggerCatch(_0x171a('0x137')));}}}};Dialer['prototype'][_0x171a('0xc')]=function(_0x48ca10){var _0x160555=this;if(!_0x160555['queuesSummary'][_0x48ca10[_0x171a('0x49')]]){_0x160555[_0x171a('0x2c')][_0x48ca10['name']]={'running':![]};}else if(_0x160555[_0x171a('0x2c')][_0x48ca10[_0x171a('0x49')]][_0x171a('0x146')]===!![]){return;}else if(_0x160555[_0x171a('0x2c')][_0x48ca10['name']]['running']===![]){_0x160555[_0x171a('0x2c')][_0x48ca10[_0x171a('0x49')]][_0x171a('0x146')]=!![];}var _0x2d0d07=_0x160555[_0x171a('0x20')][_0x48ca10[_0x171a('0x49')]];var _0x9b52df=_0x2d0d07[_0x171a('0x6c')]!==utils['CAMPAIGN_STATUS']['INACTIVE'];var _0x2bbadb=utils[_0x171a('0x147')](_0x2d0d07);_0x2d0d07[_0x171a('0x148')]=utils[_0x171a('0x149')](_0x2d0d07,_0x160555[_0x171a('0x23')]);Promise[_0x171a('0x14a')]()['then'](function(){if(_0x2d0d07[_0x171a('0x148')]===utils[_0x171a('0x6f')][_0x171a('0x14b')]){if(_0x9b52df){clearPredictiveAttributes(_0x2d0d07);_0x48ca10[_0x171a('0x14c')]=undefined;_0x48ca10[_0x171a('0x65')]=undefined;}if(_0x2d0d07['statusMessage']===utils[_0x171a('0x6f')]['INACTIVE']){_0x48ca10[_0x171a('0x14d')]=0x0;_0x48ca10[_0x171a('0xfc')]=0x0;_0x48ca10['inUse']=0x0;_0x48ca10[_0x171a('0x14e')]=0x0;_0x48ca10[_0x171a('0x14f')]=0x0;}}else if(_0x2d0d07[_0x171a('0x148')]===utils[_0x171a('0x6f')][_0x171a('0x150')]&&!_0x2bbadb){return _0x160555[_0x171a('0x93')](_0x2d0d07,!![])[_0x171a('0x42')](function(){return _0x160555[_0x171a('0x93')](_0x2d0d07,![]);})['then'](function(){return _0x160555[_0x171a('0xb4')](_0x2d0d07);})[_0x171a('0xa2')](function(_0x522705){loggerSyncQueueSummary[_0x171a('0x66')](_0x171a('0x151'),util[_0x171a('0x46')](_0x522705,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x2d0d07);});}else{clearPredictiveAttributes(_0x2d0d07);}})[_0x171a('0x42')](function(){var _0x3e3217=_0x48ca10[_0x171a('0x152')](_0x2d0d07);if(_0x3e3217||_0x2d0d07[_0x171a('0x153')]){_0x2d0d07[_0x171a('0x153')]=![];_0x48ca10[_0x171a('0x154')](_0x2d0d07);Object[_0x171a('0x155')](_0x2d0d07,_0x48ca10);emitOutboundVoiceQueueSummary(_0x48ca10);}_0x160555[_0x171a('0x2c')][_0x2d0d07['name']][_0x171a('0x146')]=![];})[_0x171a('0xa2')](function(_0x49e574){logger[_0x171a('0x69')]('[syncQueueSummary]',util[_0x171a('0x46')](_0x49e574,{'showHidden':![],'depth':null}));_0x160555[_0x171a('0x2c')][_0x2d0d07[_0x171a('0x49')]][_0x171a('0x146')]=![];});};Dialer[_0x171a('0x1c')]['syncQueueSummaryComplete']=_[_0x171a('0x156')](function(){var _0x4befed=_[_0x171a('0x157')](this[_0x171a('0x20')],function(_0x10e973){return _0x10e973['dialPreviewRecallmeReminder'];});var _0x62c658=_[_0x171a('0x157')](this[_0x171a('0x22')],function(_0x17c122){return _0x17c122[_0x171a('0x158')]&&_0x17c122[_0x171a('0x8a')]===_0x171a('0x8b');});if(_0x4befed[_0x171a('0x9b')]>0x0&&_0x62c658['length']>0x0){return Promise[_0x171a('0x14a')]()[_0x171a('0x42')](cmHopper[_0x171a('0x159')](_[_0x171a('0x15a')](_0x4befed,'id'),previewRecallmeReminderInterval,_[_0x171a('0x15a')](_0x62c658,'id')))[_0x171a('0x42')](function(_0x5cd387){for(var _0x23dbe0=0x0;_0x23dbe0<_0x5cd387['length'];_0x23dbe0++){var _0x264352=_0x5cd387[_0x23dbe0]['Agent']['name'];if(_0x264352)io['to'](util[_0x171a('0x47')](_0x171a('0x15b'),_0x264352))[_0x171a('0x11c')](_0x171a('0x15c'),{'hopper':_0x5cd387[_0x23dbe0]});}})['catch'](function(_0x4553ea){logger[_0x171a('0x69')](_0x171a('0x15d'),_0x4553ea);});}},0x3c*0x3e8,{'leading':!![]});Dialer[_0x171a('0x1c')][_0x171a('0x40')]=function(){var _0x4fbe88=this;setInterval(function(){_0x4fbe88[_0x171a('0x15e')](_0x4fbe88['uniqueId'],_0x171a('0x15f'));_0x4fbe88[_0x171a('0x15e')](_0x4fbe88['actions'],_0x171a('0x160'));},0x32c8);};Dialer['prototype']['clearZombieChannels']=function(_0x31ca4e,_0x3dc431){var _0x41ed28=this;for(var _0x7c82fa in _0x31ca4e){if(typeof _0x31ca4e[_0x7c82fa]!==_0x171a('0xae')){this['sequence']['enqueue'](function(){if(!_[_0x171a('0xfb')](_0x31ca4e[_0x7c82fa])){return ami[_0x171a('0x9c')]({'action':_0x171a('0x8a'),'channel':_0x31ca4e[_0x7c82fa]['channel']})['catch'](function(_0xa890fc){if(_0xa890fc[_0x171a('0x6c')]==='No\x20such\x20channel'){setTimeout(function(){if(_0x31ca4e[_0x7c82fa]&&_0x31ca4e[_0x7c82fa][_0x171a('0x43')]!==_0x171a('0xc5')){utils[_0x171a('0xc6')](_0x41ed28[_0x171a('0x20')][_0x31ca4e[_0x7c82fa][_0x171a('0xc3')]],_0x171a('0x161'));logger[_0x171a('0x69')]('[Dialer][checkChannel]',_0x3dc431,_0x7c82fa,_0x31ca4e[_0x7c82fa]['queue']);delete _0x31ca4e[_0x7c82fa];}if(_0x31ca4e[_0x7c82fa]&&_0x31ca4e[_0x7c82fa][_0x171a('0x43')]===_0x171a('0xc5')){utils['decrementOriginate'](_0x41ed28[_0x171a('0x21')][_0x31ca4e[_0x7c82fa][_0x171a('0xc3')]],'[clearZombieChannels]');logger[_0x171a('0x69')](_0x171a('0x162'),_0x3dc431,_0x7c82fa,_0x31ca4e[_0x7c82fa][_0x171a('0xc3')]);delete _0x31ca4e[_0x7c82fa];}},0x2328);}});}});}}};Dialer['prototype'][_0x171a('0x163')]=function(_0x3b870e){return Promise[_0x171a('0x14a')]()[_0x171a('0x42')](voiceQueueRt[_0x171a('0x163')](_0x3b870e))[_0x171a('0xa2')](loggerCatch(_0x171a('0x164')));};Dialer[_0x171a('0x1c')][_0x171a('0x165')]=function(_0x4cd9d5,_0x4356c3,_0x2e7168){var _0x2721e4={'state':0x19,'statedesc':_0x171a('0x166')};utils[_0x171a('0xc6')](_0x4356c3,_0x171a('0x167')+_0x4cd9d5);this[_0x171a('0x11f')](_[_0x171a('0x63')](_0x2721e4,_[_0x171a('0x7a')](_0x2e7168,[_0x171a('0xf4'),'ListId',_0x171a('0x168'),_0x171a('0xe6'),_0x171a('0xe7')])),_0x171a('0x169'),_0x171a('0x167'));logger[_0x171a('0x69')](_0x4cd9d5);};Dialer[_0x171a('0x1c')][_0x171a('0x11f')]=function(_0x4ec2c0,_0x379886,_0x38edc7){hopperUtils[_0x171a('0xd0')](_0x4ec2c0)['catch'](loggerCatch(_0x379886));hopperUtils[_0x171a('0x13c')](_0x4ec2c0)[_0x171a('0xa2')](loggerCatch(_0x38edc7));};Dialer[_0x171a('0x1c')][_0x171a('0xe1')]=function(_0x4a30f3,_0x4a872d){hopperUtils['createHistory'](_0x4a30f3)['catch'](loggerCatch(_0x171a('0x142')));if(_0x4a872d==0x0){hopperUtils[_0x171a('0x13c')](_0x4a30f3)[_0x171a('0xa2')](loggerCatch(_0x171a('0x16a')));}};Dialer[_0x171a('0x1c')][_0x171a('0x15d')]=function(_0x531495){return Promise[_0x171a('0x14a')]()[_0x171a('0x42')](cmHopper['handlePreviewRecallNotifications'](_0x531495['id'],previewRecallmeReminderInterval))[_0x171a('0x42')](function(_0x195dc2){for(var _0x1fda31=0x0;_0x1fda31<_0x195dc2[_0x171a('0x9b')];_0x1fda31++){var _0x36966c=_0x195dc2[_0x1fda31][_0x171a('0x16b')][_0x171a('0x49')];if(_0x36966c)io['to'](util[_0x171a('0x47')](_0x171a('0x15b'),_0x36966c))[_0x171a('0x11c')](_0x171a('0x15c'),{'hopper':_0x195dc2[_0x1fda31]});}})[_0x171a('0xa2')](function(){});};Dialer[_0x171a('0x1c')][_0x171a('0xb2')]=function(_0x1c54a0){var _0x2f42fe=this;return function(){_0x2f42fe[_0x171a('0x16c')](_0x1c54a0);};};Dialer[_0x171a('0x1c')][_0x171a('0x16d')]=function(_0x69e2ce,_0x14655a){var _0x59fe50=this;var _0x1499e4=uuid['v4']();this[_0x171a('0x26')][_0x1499e4]=new Action(_0x69e2ce,_0x14655a,_0x1499e4);return new Promise(function(_0x70f34,_0x29678d){if(_[_0x171a('0x57')](_0x69e2ce)&&typeof _0x69e2ce!==_0x171a('0x16e')){return _0x29678d(msgResponse(_0x171a('0x16f'),'Failure',_0x171a('0x170')));}if(_[_0x171a('0x57')](_0x14655a[_0x171a('0x171')])||_0x14655a[_0x171a('0x171')]===null){return _0x29678d(msgResponse(_0x171a('0x16f'),_0x171a('0x94'),_0x171a('0x172')));}var _0x120bc4={'XMD-CALLERID':_0x59fe50[_0x171a('0x26')][_0x1499e4]['getCaller'](),'XMD-AGI':_0x69e2ce[_0x171a('0x173')]?util[_0x171a('0x47')]('\x22agi://%s/square,%s\x22',ipAgi,_0x69e2ce[_0x171a('0x173')]):_0x171a('0x174'),'XMD-AGIAFTER':_0x69e2ce[_0x171a('0xcd')]?util[_0x171a('0x47')](_0x171a('0x175'),ipAgi,_0x69e2ce['dialQueueProject2']):'NONE','XMD-QUEUE':utils[_0x171a('0x176')](_0x69e2ce)?util[_0x171a('0x47')](_0x171a('0x177'),_0x69e2ce[_0x171a('0x49')],_0x69e2ce[_0x171a('0x178')]||'',_0x69e2ce[_0x171a('0xce')]?'c':'',_0x69e2ce[_0x171a('0xd6')]||0x3):'NONE','XMD-CONTACTID':_0x14655a[_0x171a('0xf4')],'XMD-CDRTYPE':_0x171a('0x8'),'CALLERID(all)':_0x59fe50[_0x171a('0x26')][_0x1499e4][_0x171a('0x179')](),'XMD-AMD':_0x69e2ce[_0x171a('0x115')]?'ACTIVE':_0x171a('0x174'),'XMD-DESTINATION':_0x171a('0x17a')};if(_0x69e2ce[_0x171a('0x115')]){_0x120bc4[_0x171a('0x17b')]=_0x69e2ce[_0x171a('0x17c')]||0x9c4;_0x120bc4[_0x171a('0x17d')]=_0x69e2ce[_0x171a('0x17e')]||0x5dc;_0x120bc4[_0x171a('0x17f')]=_0x69e2ce['dialAMDAfterGreetingSilence']||0x320;_0x120bc4[_0x171a('0x180')]=_0x69e2ce[_0x171a('0x181')]||0x1388;_0x120bc4[_0x171a('0x182')]=_0x69e2ce['dialAMDMinWordLength']||0x64;_0x120bc4[_0x171a('0x183')]=_0x69e2ce['dialAMDBetweenWordsSilence']||0x32;_0x120bc4[_0x171a('0x184')]=_0x69e2ce[_0x171a('0x185')]||0x3;_0x120bc4[_0x171a('0x186')]=_0x69e2ce[_0x171a('0x187')]||0x100;_0x120bc4[_0x171a('0x188')]=_0x69e2ce[_0x171a('0x189')]||0x1388;}if(utils[_0x171a('0x176')](_0x69e2ce)){_0x120bc4[_0x171a('0x18a')]=_0x14655a[_0x171a('0xe6')];}else{_0x120bc4[_0x171a('0x18b')]=_0x14655a['CampaignId'];}var _0xf0ef9e=utils['setXMDContactVariables'](_0x14655a[_0x171a('0x18c')]);Object[_0x171a('0x155')](_0x120bc4,_0xf0ef9e);var _0x61e42=_0x59fe50[_0x171a('0x8e')](_0x69e2ce[_0x171a('0x8f')])?utils[_0x171a('0x18d')](_0x69e2ce['Trunk'][_0x171a('0x18e')],_0x69e2ce['dialOriginateCallerIdName'],_0x69e2ce[_0x171a('0x18f')]>0x0?utils[_0x171a('0x190')](_0x69e2ce['dialOriginateCallerIdNumber'],_0x69e2ce[_0x171a('0x18f')]):_0x69e2ce[_0x171a('0x191')]):utils[_0x171a('0x18d')](_[_0x171a('0xfb')](_0x69e2ce[_0x171a('0x90')])?_0x69e2ce[_0x171a('0x8f')]['callerid']:_0x69e2ce[_0x171a('0x90')]['callerid'],_0x69e2ce[_0x171a('0x192')],_0x69e2ce[_0x171a('0x18f')]>0x0?utils[_0x171a('0x190')](_0x69e2ce[_0x171a('0x191')],_0x69e2ce[_0x171a('0x18f')]):_0x69e2ce[_0x171a('0x191')]);if(_0x61e42){_0x120bc4['XMD-ORIGINATECALLERIDNAME']=_0x59fe50['actions'][_0x1499e4][_0x171a('0x193')]=utils[_0x171a('0x194')](_0x61e42);_0x120bc4[_0x171a('0x195')]=_0x14655a['phone'];}_0x69e2ce[_0x171a('0x196')]=_0x120bc4;return ami['Action']({'actionid':_0x1499e4,'action':_0x171a('0x16f'),'channel':_0x59fe50[_0x171a('0x8e')](_0x69e2ce[_0x171a('0x8f')])?util[_0x171a('0x47')](_0x171a('0x197'),_0x69e2ce[_0x171a('0x8f')]['name'],isNotNull(_0x69e2ce['dialPrefix'])?_0x69e2ce['dialPrefix'][_0x171a('0x198')]()||'':'',_0x69e2ce[_0x171a('0x199')]>0x0?_0x14655a[_0x171a('0x171')][_0x171a('0x19a')](_0x69e2ce['dialCutDigit']):_0x14655a[_0x171a('0x171')]):util[_0x171a('0x47')](_0x171a('0x197'),_[_0x171a('0xfb')](_0x69e2ce[_0x171a('0x90')])?_0x69e2ce[_0x171a('0x8f')][_0x171a('0x49')]:_0x69e2ce[_0x171a('0x90')][_0x171a('0x49')],isNotNull(_0x69e2ce[_0x171a('0x19b')])?_0x69e2ce[_0x171a('0x19b')]['trim']()||'':'',_0x69e2ce[_0x171a('0x199')]>0x0?_0x14655a[_0x171a('0x171')][_0x171a('0x19a')](_0x69e2ce[_0x171a('0x199')]):_0x14655a[_0x171a('0x171')]),'callerid':_0x61e42,'Exten':'xcally-motion-dialer','Context':_0x171a('0x19c'),'Priority':'1','variable':_0x120bc4,'timeout':(_0x69e2ce[_0x171a('0x19d')]||0x1e)*0x3e8,'async':!![],'channelid':_0x1499e4})[_0x171a('0x42')](function(_0x377d4b){return _0x70f34(_0x377d4b);})[_0x171a('0xa2')](function(_0x4e1ccf){_0x69e2ce[_0x171a('0x19e')]+=0x1;var _0x6ffef5=new History(_0x59fe50['actions'][_0x1499e4]);logger[_0x171a('0x69')](util['format'](_0x171a('0x19f'),JSON[_0x171a('0x79')](_0x4e1ccf)));_0x6ffef5[_0x171a('0x72')]=0xe;_0x6ffef5['statedesc']=_0x171a('0x1a0');_0x6ffef5[_0x171a('0x75')]=moment()[_0x171a('0x47')](_0x171a('0xcf'));_0x6ffef5[_0x171a('0x74')]=_0x6ffef5[_0x171a('0x75')];hopperUtils['createHistory'](_0x6ffef5)['catch'](loggerCatch(_0x171a('0x1a1')));_0x59fe50[_0x171a('0x13c')](_0x6ffef5)[_0x171a('0xa2')](loggerCatch('[originate][error]'))['finally'](function(){delete _0x59fe50['actions'][_0x1499e4];return _0x29678d(msgResponse(_0x171a('0x16f'),_0x171a('0x87'),_0x171a('0x1a2')));});});});};Dialer['prototype'][_0x171a('0x1a3')]=function(_0x56adc1,_0x755f1c,_0x2189f5){var _0x2596a2=new History(_0x755f1c);if(_0x2596a2['countbusyretry']+_0x2596a2[_0x171a('0x126')]+_0x2596a2[_0x171a('0x127')]+_0x2596a2[_0x171a('0x128')]+_0x2596a2[_0x171a('0xdb')]+_0x2596a2[_0x171a('0xf0')]+_0x2596a2[_0x171a('0x123')]+_0x2596a2['countagentrejectretry']>=_0x2189f5[_0x171a('0x12a')]-0x1){return!![];}switch(_0x56adc1){case 0x3:if(_0x2596a2[_0x171a('0x127')]>=_0x2189f5['dialNoAnswerMaxRetry']-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countnoanswerretry':_0x2596a2[_0x171a('0x127')]+=0x1,'scheduledat':moment()['add'](_0x2189f5[_0x171a('0x1a4')],_0x171a('0xe4'))['format'](_0x171a('0xcf')),'ContactId':_0x2596a2['ContactId'],'ListId':_0x2596a2['ListId'],'VoiceQueueId':_0x2596a2[_0x171a('0xe6')]||undefined,'CampaignId':_0x2596a2[_0x171a('0xe7')]||undefined})[_0x171a('0xa2')](loggerCatch('[rescheduleContact][NoAnswer]'));break;case 0x5:if(_0x2596a2[_0x171a('0x125')]>=_0x2189f5[_0x171a('0x1a5')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countbusyretry':_0x2596a2[_0x171a('0x125')]+=0x1,'scheduledat':moment()['add'](_0x2189f5['dialBusyRetryFrequency'],'minutes')[_0x171a('0x47')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x2596a2[_0x171a('0xf4')],'ListId':_0x2596a2[_0x171a('0xe5')],'VoiceQueueId':_0x2596a2[_0x171a('0xe6')]||undefined,'CampaignId':_0x2596a2[_0x171a('0xe7')]||undefined})[_0x171a('0xa2')](loggerCatch(_0x171a('0x1a6')));break;case 0x8:if(_0x2596a2[_0x171a('0x126')]>=_0x2189f5[_0x171a('0x1a7')]-0x1){return!![];}hopperUtils[_0x171a('0xf3')]({'active':![],'countcongestionretry':_0x2596a2[_0x171a('0x126')]+=0x1,'scheduledat':moment()['add'](_0x2189f5[_0x171a('0x1a8')],_0x171a('0xe4'))[_0x171a('0x47')](_0x171a('0xcf')),'ContactId':_0x2596a2[_0x171a('0xf4')],'ListId':_0x2596a2[_0x171a('0xe5')],'VoiceQueueId':_0x2596a2[_0x171a('0xe6')]||undefined,'CampaignId':_0x2596a2[_0x171a('0xe7')]||undefined})['catch'](loggerCatch('[rescheduleContact]\x20[Congestion]'));break;case 0x0:if(_0x2596a2[_0x171a('0x128')]>=_0x2189f5[_0x171a('0x1a9')]-0x1){return!![];}else{hopperUtils[_0x171a('0xf3')]({'active':![],'countnosuchnumberretry':_0x2596a2['countnosuchnumberretry']+=0x1,'scheduledat':moment()[_0x171a('0xe2')](_0x2189f5['dialNoSuchNumberRetryFrequency'],_0x171a('0xe4'))[_0x171a('0x47')](_0x171a('0xcf')),'ContactId':_0x2596a2[_0x171a('0xf4')],'ListId':_0x2596a2[_0x171a('0xe5')],'VoiceQueueId':_0x2596a2[_0x171a('0xe6')]||undefined,'CampaignId':_0x2596a2[_0x171a('0xe7')]||undefined})['catch'](loggerCatch('[rescheduleContact][NoSuchNumber]'));}break;case 0xa:if(_0x2596a2[_0x171a('0xdb')]>=_0x2189f5[_0x171a('0xe0')]-0x1){return!![];}hopperUtils[_0x171a('0xf3')]({'active':![],'countdropretry':_0x2596a2['countdropretry']+=0x1,'scheduledat':moment()[_0x171a('0xe2')](_0x2189f5[_0x171a('0xe3')],_0x171a('0xe4'))[_0x171a('0x47')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x2596a2[_0x171a('0xf4')],'ListId':_0x2596a2[_0x171a('0xe5')],'VoiceQueueId':_0x2596a2['VoiceQueueId']||undefined,'CampaignId':_0x2596a2[_0x171a('0xe7')]||undefined})[_0x171a('0xa2')](loggerCatch(_0x171a('0xe8')));break;case 0xb:if(_0x2596a2[_0x171a('0xf0')]>=_0x2189f5[_0x171a('0xf2')]-0x1){return!![];}hopperUtils[_0x171a('0xf3')]({'active':![],'countabandonedretry':_0x2596a2[_0x171a('0xf0')]+=0x1,'scheduledat':moment()[_0x171a('0xe2')](_0x2189f5[_0x171a('0xf1')],_0x171a('0xe4'))[_0x171a('0x47')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x2596a2['ContactId'],'ListId':_0x2596a2[_0x171a('0xe5')],'VoiceQueueId':_0x2596a2['VoiceQueueId']||undefined,'CampaignId':_0x2596a2[_0x171a('0xe7')]||undefined})[_0x171a('0xa2')](loggerCatch(_0x171a('0x1aa')));break;case 0x13:if(_0x2596a2[_0x171a('0x123')]>=_0x2189f5[_0x171a('0x12c')]-0x1){return!![];}hopperUtils[_0x171a('0xf3')]({'active':![],'countmachineretry':_0x2596a2['countmachineretry']+=0x1,'scheduledat':moment()[_0x171a('0xe2')](_0x2189f5[_0x171a('0x12f')],_0x171a('0xe4'))[_0x171a('0x47')](_0x171a('0xcf')),'ContactId':_0x2596a2[_0x171a('0xf4')],'ListId':_0x2596a2[_0x171a('0xe5')],'VoiceQueueId':_0x2596a2[_0x171a('0xe6')]||undefined,'CampaignId':_0x2596a2['CampaignId']||undefined})[_0x171a('0xa2')](loggerCatch(_0x171a('0x135')));break;case 0x14:if(_0x2596a2[_0x171a('0x129')]>=_0x2189f5[_0x171a('0x1ab')]-0x1){return!![];}hopperUtils[_0x171a('0xf3')]({'active':![],'countagentrejectretry':_0x2596a2['countagentrejectretry']+=0x1,'scheduledat':moment()[_0x171a('0xe2')](_0x2189f5[_0x171a('0x1ac')],_0x171a('0xe4'))[_0x171a('0x47')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x2596a2[_0x171a('0xf4')],'ListId':_0x2596a2[_0x171a('0xe5')],'VoiceQueueId':_0x2596a2[_0x171a('0xe6')]||undefined,'CampaignId':_0x2596a2[_0x171a('0xe7')]||undefined})[_0x171a('0xa2')](loggerCatch('[rescheduleContact][AgentReject]'));break;default:return!![];}};Dialer[_0x171a('0x1c')][_0x171a('0x1ad')]=function(_0x3fe572,_0x304b0c,_0x37b11e){var _0x5a46ee=this;var _0x47426f=new History(_0x3fe572);var _0x4102b8=![];var _0x45ff5d;var _0x2ea709;return new Promise(function(_0x3e499d,_0x8d513d){if(_['isUndefined'](_0x304b0c)&&typeof _0x304b0c!=='object'){return _0x8d513d(msgResponse(_0x171a('0x1ae'),_0x171a('0x94'),_0x171a('0x1af')));}if(_[_0x171a('0x57')](_0x37b11e)&&typeof _0x37b11e!=='object'){return _0x8d513d(msgResponse(_0x171a('0x1ae'),_0x171a('0x94'),_0x171a('0x1b0')));}hopperUtils['verifyAdditionalPhones'](_0x47426f,_0x37b11e['reason'],_0x304b0c)[_0x171a('0x42')](function(_0x26988c){if(_0x26988c[_0x171a('0xdf')]==0x1)_0x4102b8=!![];switch(_0x37b11e[_0x171a('0xcb')]){case'0':_0x304b0c[_0x171a('0x1b1')]+=0x1;_0x47426f[_0x171a('0x72')]=0x0;_0x47426f[_0x171a('0x73')]='NoSuchNumber';_0x47426f[_0x171a('0x128')]+=0x1;_0x47426f[_0x171a('0xdc')]+=0x1;ami[_0x171a('0x11c')]('custom:agentnosuchnumber',ut['buildObj'](_0x3fe572,_0x171a('0x1b2')));_0x45ff5d=_0x304b0c[_0x171a('0x1b3')];_0x2ea709=_0x304b0c[_0x171a('0x1b4')];hopperUtils['createHistory'](_0x47426f)[_0x171a('0xa2')](loggerCatch(_0x171a('0x124')));if(_0x5a46ee[_0x171a('0x1a3')](0x0,_0x3fe572,_0x304b0c)&&!_0x4102b8){if(_0x47426f[_0x171a('0x128')]>=_0x304b0c[_0x171a('0x1a9')]){_0x5a46ee[_0x171a('0x12d')](_0x47426f,_0x3e499d,_0x8d513d,_0x171a('0x1b5'));}else{_0x5a46ee[_0x171a('0x134')](_0x47426f,_0x3e499d,_0x8d513d,_0x171a('0x1b5'));}}break;case'3':_0x304b0c[_0x171a('0x1b6')]+=0x1;_0x47426f['state']=0x3;_0x47426f['statedesc']=_0x171a('0x1b7');_0x47426f[_0x171a('0x127')]+=0x1;_0x47426f[_0x171a('0xdc')]+=0x1;var _0x3bca81=ut[_0x171a('0x1b8')](_0x3fe572,_0x304b0c);ami['emit'](_0x171a('0x1b9'),_0x3bca81);_0x45ff5d=_0x304b0c[_0x171a('0x1a4')];_0x2ea709=_0x304b0c[_0x171a('0x1b4')];hopperUtils[_0x171a('0xd0')](_0x47426f)[_0x171a('0xa2')](loggerCatch(_0x171a('0x1ba')));if(_0x5a46ee[_0x171a('0x1a3')](0x3,_0x3fe572,_0x304b0c)&&!_0x4102b8){if(_0x47426f[_0x171a('0x127')]>=_0x304b0c['dialNoAnswerMaxRetry']){_0x5a46ee[_0x171a('0x12d')](_0x47426f,_0x3e499d,_0x8d513d,_0x171a('0x1bb'));}else{_0x5a46ee['stateGlobal'](_0x47426f,_0x3e499d,_0x8d513d,_0x171a('0x1bb'));}}break;case'5':_0x304b0c[_0x171a('0x1bc')]+=0x1;_0x47426f['state']=0x5;_0x47426f[_0x171a('0x73')]=_0x171a('0x1bd');_0x47426f[_0x171a('0x125')]+=0x1;_0x47426f['countglobal']+=0x1;ami['emit']('custom:agentbusy',ut[_0x171a('0x11d')](_0x3fe572,_0x171a('0x1be')));_0x45ff5d=_0x304b0c[_0x171a('0x1bf')];_0x2ea709=_0x304b0c[_0x171a('0x1b4')];hopperUtils[_0x171a('0xd0')](_0x47426f)[_0x171a('0xa2')](loggerCatch(_0x171a('0x1c0')));if(_0x5a46ee[_0x171a('0x1a3')](0x5,_0x3fe572,_0x304b0c)&&!_0x4102b8){if(_0x47426f[_0x171a('0x125')]>=_0x304b0c[_0x171a('0x1a5')]){_0x5a46ee['createStateFinal'](_0x47426f,_0x3e499d,_0x8d513d,_0x171a('0x1c1'));}else{_0x5a46ee[_0x171a('0x134')](_0x47426f,_0x3e499d,_0x8d513d,'reason\x205\x20busy');}}break;case'8':_0x304b0c[_0x171a('0x1c2')]+=0x1;_0x47426f['state']=0x8;_0x47426f[_0x171a('0x73')]=_0x171a('0x1c3');_0x47426f[_0x171a('0x126')]+=0x1;_0x47426f['countglobal']+=0x1;_0x45ff5d=_0x304b0c[_0x171a('0x1a8')];_0x2ea709=_0x304b0c['callAdditionalPhoneAfterMin'];ami[_0x171a('0x11c')]('custom:agentcongestion',ut[_0x171a('0x11d')](_0x3fe572,_0x171a('0x1c4')));hopperUtils['createHistory'](_0x47426f)[_0x171a('0xa2')](loggerCatch(_0x171a('0x1c5')));if(_0x5a46ee[_0x171a('0x1a3')](0x8,_0x3fe572,_0x304b0c)&&!_0x4102b8){if(_0x47426f[_0x171a('0x126')]>=_0x304b0c['dialCongestionMaxRetry']){_0x5a46ee[_0x171a('0x12d')](_0x47426f,_0x3e499d,_0x8d513d,'reason\x208\x20congestion');}else{_0x5a46ee[_0x171a('0x134')](_0x47426f,_0x3e499d,_0x8d513d,'reason\x208\x20congestion');}}break;case'11':_0x304b0c[_0x171a('0x1c6')]+=0x1;_0x47426f[_0x171a('0x72')]=0xb;_0x47426f[_0x171a('0x73')]=_0x171a('0xee');_0x47426f['countabandonedretry']+=0x1;_0x47426f[_0x171a('0xdc')]+=0x1;_0x45ff5d=_0x304b0c[_0x171a('0xf1')];_0x2ea709=_0x304b0c['callAdditionalPhoneAfterMin'];hopperUtils['createHistory'](_0x47426f)[_0x171a('0xa2')](loggerCatch('[syncAgentComplete][createHistory][11]'));if(_0x5a46ee[_0x171a('0x1a3')](0xb,_0x3fe572,_0x304b0c)&&!_0x4102b8){if(_0x47426f[_0x171a('0xf0')]>=_0x304b0c[_0x171a('0xf2')]){_0x5a46ee[_0x171a('0x12d')](_0x47426f,_0x3e499d,_0x8d513d,'reason\x2011\x20abandoned');}else{_0x5a46ee[_0x171a('0x134')](_0x47426f,_0x3e499d,_0x8d513d,_0x171a('0x1c7'));}}break;case'20':_0x304b0c[_0x171a('0x1c8')]+=0x1;_0x47426f[_0x171a('0x72')]=0x14;_0x47426f[_0x171a('0x73')]=_0x171a('0x1c9');_0x47426f[_0x171a('0x129')]+=0x1;_0x47426f[_0x171a('0xdc')]+=0x1;_0x45ff5d=_0x304b0c[_0x171a('0x1ac')];_0x2ea709=_0x304b0c[_0x171a('0x1b4')];ami[_0x171a('0x11c')](_0x171a('0x1ca'),ut['buildObj'](_0x3fe572,_0x171a('0x1cb')));hopperUtils[_0x171a('0xd0')](_0x47426f)[_0x171a('0xa2')](loggerCatch('[syncAgentComplete][createHistory][20]'));if(_0x5a46ee[_0x171a('0x1a3')](0x14,_0x3fe572,_0x304b0c)&&!_0x4102b8){if(_0x47426f[_0x171a('0x129')]>=_0x304b0c['dialAgentRejectMaxRetry']){_0x5a46ee['createStateFinal'](_0x47426f,_0x3e499d,_0x8d513d,_0x171a('0x1cc'));}else{_0x5a46ee['stateGlobal'](_0x47426f,_0x3e499d,_0x8d513d,_0x171a('0x1cc'));}}break;default:_0x304b0c['outboundUnknownCallsDay']+=0x1;_0x47426f[_0x171a('0x72')]=0xc;_0x47426f[_0x171a('0x73')]=_0x37b11e['reason'];_0x45ff5d=_0x304b0c[_0x171a('0x1ac')];_0x2ea709=_0x304b0c[_0x171a('0x1b4')];hopperUtils[_0x171a('0xd0')](_0x47426f)[_0x171a('0xa2')](loggerCatch('[syncAgentComplete][createHistory][?]'));if(_0x5a46ee[_0x171a('0x1a3')](_0x37b11e[_0x171a('0xcb')],_0x3fe572,_0x304b0c)&&!_0x4102b8){if(_0x47426f[_0x171a('0x125')]+_0x47426f[_0x171a('0x126')]+_0x47426f[_0x171a('0x127')]+_0x47426f[_0x171a('0x128')]+_0x47426f[_0x171a('0xdb')]+_0x47426f[_0x171a('0xf0')]+_0x47426f[_0x171a('0x123')]+_0x47426f[_0x171a('0x129')]>=_0x304b0c[_0x171a('0x12a')]){_0x5a46ee[_0x171a('0x134')](_0x47426f,_0x3e499d,_0x8d513d,_0x37b11e[_0x171a('0xcb')]);}else{_0x5a46ee[_0x171a('0x12d')](_0x47426f,_0x3e499d,_0x8d513d,_0x37b11e[_0x171a('0xcb')]);}}}})[_0x171a('0x42')](function(){if(_0x4102b8){hopperUtils[_0x171a('0xeb')](_0x47426f,_0x45ff5d,_0x2ea709)[_0x171a('0x42')](function(){return _0x3e499d(0x1);});}});});};Dialer[_0x171a('0x1c')][_0x171a('0x134')]=function(_0x5a5b0c,_0x2b268c,_0xb3180c,_0x23a362){var _0x539f00=new Final(_0x5a5b0c);_0x539f00[_0x171a('0x72')]=0xf;_0x539f00[_0x171a('0x73')]=_0x171a('0x1cd');this[_0x171a('0x12d')](_0x539f00,_0x2b268c,_0xb3180c,_0x23a362);};Dialer[_0x171a('0x1c')][_0x171a('0x12d')]=function(_0x58d735,_0x445719,_0x138ee0,_0x35dc0a){hopperUtils['moveContactManagedDialer'](_0x58d735)[_0x171a('0x42')](function(){return _0x445719(msgResponse(_0x171a('0x1ae'),_0x171a('0x110'),_0x35dc0a));})[_0x171a('0xa2')](function(){return _0x138ee0(msgResponse(_0x171a('0x1ce'),'Failure',_0x171a('0x1cf')));});};Dialer['prototype'][_0x171a('0xb6')]=function(_0x35dd90){var _0x1a844b=_0x35dd90[_0x171a('0x1d0')]/0x64;var _0x26cf5f=_0x35dd90[_0x171a('0xd7')]/(_0x35dd90[_0x171a('0xd7')]+_0x35dd90[_0x171a('0xca')]);var _0x98b199=Math['round'](_0x35dd90[_0x171a('0x1d1')]*(_0x35dd90[_0x171a('0x1d2')]/0x64));var _0x550938=Math[_0x171a('0x1d3')](_0x35dd90[_0x171a('0x1d1')]*(_0x35dd90[_0x171a('0x1d4')]/0x64));var _0x4f4434=_0x35dd90[_0x171a('0x14d')]+_0x35dd90['talking'];var _0xfaf901=Math[_0x171a('0x1d5')](_0x35dd90[_0x171a('0x5d')]*_0x35dd90[_0x171a('0x1d6')]*_0x35dd90[_0x171a('0x1d7')]*_0x35dd90[_0x171a('0x1d8')]);if(_[_0x171a('0x57')](_0x35dd90[_0x171a('0x65')])){if(!_[_0x171a('0x57')](_0x35dd90[_0x171a('0x14c')])){_0x35dd90[_0x171a('0x14c')]=undefined;loggerPredictive[_0x171a('0x69')](_0x171a('0x1d9'),_0x171a('0x1da'));}if(!_['isUndefined'](_0x35dd90[_0x171a('0x67')])){loggerPredictive[_0x171a('0x69')](_0x171a('0x1d9'),_0x171a('0x1db'));clearInterval(_0x35dd90[_0x171a('0x67')]);_0x35dd90['handlePredictive']=undefined;}_0x35dd90['startProgressive']=moment()[_0x171a('0x47')](_0x171a('0xcf'));loggerPredictive['info'](_0x35dd90[_0x171a('0x49')],_0x171a('0x1dc'),_0x35dd90[_0x171a('0x65')]);this[_0x171a('0xb8')](_0x35dd90,0x1);}else if(ifInterval(_0x35dd90['dialPredictiveInterval'],_0x35dd90[_0x171a('0x65')])){this[_0x171a('0xb8')](_0x35dd90,0x1);loggerPredictiveCalls[_0x171a('0x4c')](_0x171a('0x1dd'),_0x35dd90[_0x171a('0x65')],_0x35dd90[_0x171a('0x49')]);_0x35dd90[_0x171a('0x5d')]=0x0;_0x35dd90[_0x171a('0xd8')]=0x0;}else if(_0x1a844b<_0x26cf5f&&_0x35dd90[_0x171a('0x1de')]===_0x171a('0x1df')){clearPredictiveAttributes(_0x35dd90);loggerPredictive[_0x171a('0x4c')](_0x171a('0x1e0'),_0x171a('0x1e1'),_0x26cf5f,'startProgressive',_0x35dd90[_0x171a('0x49')]);}else if(_0xfaf901<_0x35dd90[_0x171a('0xd8')]&&_0x35dd90['dialPredictiveOptimization']===_0x171a('0x1df')){clearPredictiveAttributes(_0x35dd90);loggerPredictive['info'](_0x171a('0x1e2'),_0x171a('0x1e3'),_0xfaf901,_0x171a('0x1e4'),_0x35dd90['predictiveIntervalErlangCallsDroppedCalls'],_0x171a('0x65'),_0x35dd90[_0x171a('0x49')]);}else if(!ifInterval(_0x35dd90[_0x171a('0x1e5')],_0x35dd90[_0x171a('0x65')])&&_[_0x171a('0x57')](_0x35dd90[_0x171a('0x14c')])&&!_[_0x171a('0x57')](_0x35dd90[_0x171a('0x65')])){_0x35dd90[_0x171a('0x14c')]=moment()[_0x171a('0x47')]('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive[_0x171a('0x4c')](_0x35dd90[_0x171a('0x49')],_0x171a('0x1e6'),_0x35dd90[_0x171a('0x14c')]);hopperUtils['avgHandleTime'](_0x35dd90[_0x171a('0x1e5')])['then'](this[_0x171a('0x1e7')](_0x35dd90))[_0x171a('0x42')](mergeDataErlangB(_0x35dd90))[_0x171a('0x42')](this[_0x171a('0x1e8')](_0x35dd90))['catch'](loggerCatchPredictive(_0x171a('0x1e9'),_0x35dd90));}else if(!ifInterval(_0x35dd90[_0x171a('0x1e5')],_0x35dd90[_0x171a('0x14c')])){_0x35dd90[_0x171a('0xd8')]=0x0;_0x35dd90[_0x171a('0x14c')]=moment()[_0x171a('0x47')](_0x171a('0xcf'));loggerPredictive[_0x171a('0x4c')](_0x35dd90['name'],_0x171a('0x1ea'),_0x35dd90[_0x171a('0x14c')]);clearInterval(_0x35dd90[_0x171a('0x67')]);_0x35dd90[_0x171a('0x67')]=undefined;hopperUtils[_0x171a('0x1eb')](_0x35dd90[_0x171a('0x1e5')])[_0x171a('0x42')](this[_0x171a('0x1e7')](_0x35dd90))[_0x171a('0x42')](mergeDataErlangB(_0x35dd90))['then'](this[_0x171a('0x1e8')](_0x35dd90))[_0x171a('0xa2')](loggerCatchPredictive(_0x171a('0x1ec'),_0x35dd90));}else if(_0x35dd90[_0x171a('0x1d1')]&&_0x4f4434<_0x35dd90['predictiveIntervalAvailable']-_0x550938){clearPredictiveAttributes(_0x35dd90);loggerPredictive['info'](_0x35dd90[_0x171a('0x49')],_0x171a('0x1ed'),_0x4f4434,')\x20are\x20less\x20than\x20threshold\x20(',_0x35dd90[_0x171a('0x1d1')],'-',_0x550938,'=',_0x35dd90['predictiveIntervalAvailable']-_0x550938,')');}else if(_0x35dd90[_0x171a('0x1d1')]&&_0x4f4434>_0x35dd90[_0x171a('0x1d1')]+_0x98b199){clearPredictiveAttributes(_0x35dd90);loggerPredictive[_0x171a('0x4c')](_0x35dd90[_0x171a('0x49')],'switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',_0x4f4434,')\x20are\x20more\x20than\x20threshold\x20(',_0x35dd90[_0x171a('0x1d1')],'+',_0x98b199,'=',_0x35dd90[_0x171a('0x1d1')]+_0x98b199,')');}};Dialer[_0x171a('0x1c')][_0x171a('0x1e7')]=function(_0x5d3785){var _0x427c4d=this;return function(_0xec9a20){return new Promise(function(_0x559481,_0x3ee409){_[_0x171a('0x63')](_0x5d3785,_0xec9a20[0x0]);if(checkGetDataPredictive(_0xec9a20[0x0])){var _0x3eec2b=_0x5d3785[_0x171a('0x1d1')]=_0x5d3785[_0x171a('0x14e')]+_0x5d3785[_0x171a('0x14d')];var _0x13e819=_0x5d3785[_0x171a('0x1e5')]*0x3c;var _0x41569b=_0xec9a20[0x0][_0x171a('0x58')]+_0xec9a20[0x0][_0x171a('0x54')];var _0x16f33b=(_0xec9a20[0x0][_0x171a('0x4f')]+_0xec9a20[0x0]['predictiveIntervalDroppedCallsTimeout']+_0xec9a20[0x0][_0x171a('0xec')])/_0xec9a20[0x0][_0x171a('0x56')];_0x5d3785['predictiveIntervalHitRate']=_0x16f33b>0x0?_0x16f33b:0x1;switch(_0x5d3785[_0x171a('0x1de')]){case'dropRate':var _0x916cc5=_0x5d3785[_0x171a('0x1d0')]/0x64;return _0x427c4d[_0x171a('0x1ee')](_0x3eec2b,_0x13e819,_0x41569b,_0x16f33b,_0x916cc5)[_0x171a('0x42')](function(_0x3299fc){return _0x559481(_0x3299fc);});case _0x171a('0x1ef'):var _0x52b035=_0x5d3785[_0x171a('0x1d0')]/0x64;return _0x427c4d['busyFactor'](_0x3eec2b,_0x13e819,_0x41569b,_0x16f33b,_0x52b035)[_0x171a('0x42')](function(_0x3d5dc2){return _0x559481(_0x3d5dc2);});default:return _0x3ee409(msgResponse(_0x171a('0x1f0'),'Failure',_0x171a('0x1f1')));}}else{return _0x3ee409(msgResponse('[getDataPredictive]',_0x171a('0x94'),'check\x20failure'));}});};};Dialer[_0x171a('0x1c')][_0x171a('0x1f2')]=function(_0x1df1de){var _0x4f8a14=this;return function(_0x48ce28){return new Promise(function(_0x20963e,_0x9656e9){_[_0x171a('0x63')](_0x1df1de,_0x48ce28[0x0]);if(checkGetDataPredictive(_0x48ce28[0x0])){loggerPredictive['info'](JSON['stringify'](_0x48ce28[0x0]));if(_0x1df1de[_0x171a('0x1de')]===_0x171a('0x1df')){return _0x4f8a14[_0x171a('0x163')](_0x1df1de['id'])[_0x171a('0x42')](function(_0x189bcd){var _0x2edca2=_0x1df1de[_0x171a('0x1f3')]-_0x189bcd[0x0][_0x171a('0x1f4')];var _0x2b156a=_0x1df1de[_0x171a('0x1e5')]*0x3c;var _0x16c84f=_0x48ce28[0x0][_0x171a('0x58')]+_0x48ce28[0x0]['predictiveIntervalAvgHoldtime'];var _0x5cc0d4=(_0x48ce28[0x0][_0x171a('0x4f')]+_0x48ce28[0x0][_0x171a('0x51')]+_0x48ce28[0x0][_0x171a('0xec')])/_0x48ce28[0x0][_0x171a('0x56')];var _0x2cf02f=_0x1df1de[_0x171a('0x1d0')]/0x64;_0x1df1de[_0x171a('0x1f5')]=_0x189bcd[0x0][_0x171a('0x1f4')]||0x0;_0x1df1de[_0x171a('0x1d7')]=_0x5cc0d4>0x0?_0x5cc0d4:0x1;return _0x4f8a14[_0x171a('0x1ee')](_0x2edca2,_0x2b156a,_0x16c84f,_0x5cc0d4,_0x2cf02f);})[_0x171a('0x42')](function(_0x3c0772){return _0x20963e(_0x3c0772);})[_0x171a('0xa2')](function(_0x39ee1a){return _0x9656e9(msgResponse('[CatchErlangB]',_0x171a('0x94'),JSON[_0x171a('0x79')](_0x39ee1a)));});}if(_0x1df1de[_0x171a('0x1de')]==='agentBusyFactor'){return _0x4f8a14[_0x171a('0x163')](_0x1df1de['id'])[_0x171a('0x42')](function(_0x156045){var _0x28c1f8=_0x1df1de[_0x171a('0x1f3')]-_0x156045[0x0][_0x171a('0x1f4')];var _0x321103=_0x1df1de[_0x171a('0x1e5')]*0x3c;var _0x4a1b51=_0x48ce28[0x0][_0x171a('0x58')]+_0x48ce28[0x0][_0x171a('0x54')];var _0x9b038b=(_0x48ce28[0x0][_0x171a('0x4f')]+_0x48ce28[0x0][_0x171a('0x51')]+_0x48ce28[0x0]['predictiveIntervalDroppedCallsCallersExit'])/_0x48ce28[0x0][_0x171a('0x56')];var _0x50b67e=_0x1df1de[_0x171a('0x1d0')]/0x64;_0x1df1de[_0x171a('0x1f5')]=_0x156045[0x0]['outboundQueuePauses']||0x0;_0x1df1de[_0x171a('0x1d7')]=_0x9b038b>0x0?_0x9b038b:0x1;return _0x4f8a14[_0x171a('0x1f6')](_0x28c1f8,_0x321103,_0x4a1b51,_0x9b038b,_0x50b67e);})['then'](function(_0x30ecbb){return _0x20963e(_0x30ecbb);})[_0x171a('0xa2')](function(_0x4154f){return _0x9656e9(msgResponse(_0x171a('0x1f7'),_0x171a('0x94'),JSON['stringify'](_0x4154f)));});}}else{return _0x9656e9(msgResponse(_0x171a('0x1f0'),_0x171a('0x94'),_0x171a('0x1f8')));}});};};Dialer[_0x171a('0x1c')][_0x171a('0x1e8')]=function(_0x3fddd4){var _0x2b9c4d=this;return function(){var _0x4c1617=0x0;var _0x2be29a=Math[_0x171a('0x1d5')](_0x3fddd4['erlangCallToSecond']*0x3e8);if(_0x2be29a>0x0){_0x2be29a=_0x2be29a<0x64?0x64:_0x2be29a;loggerPredictive['info'](_0x3fddd4[_0x171a('0x49')],'one\x20call\x20every:',_0x2be29a,'milliseconds');_0x3fddd4[_0x171a('0x67')]=setInterval(function(){_0x2b9c4d[_0x171a('0x67')](_0x3fddd4);loggerPredictiveCalls[_0x171a('0x4c')](_0x171a('0x1f9'),_0x4c1617+=0x1);},_0x2be29a);}else{loggerPredictive['info'](_0x3fddd4[_0x171a('0x49')],_0x171a('0x1fa'));}};};Dialer['prototype']['checkContactBlack']=function(_0xeb846d,_0x4a7ec4){var _0x4a3e64=this;return function(_0x4d0d85){if(_['isEmpty'](_0x4d0d85)){if(_[_0x171a('0xfb')](_0x4a7ec4[_0x171a('0x168')])||!_0x4a7ec4[_0x171a('0x1fb')]){if(_0xeb846d[_0x171a('0xb5')]===_0x171a('0xa')){_0xeb846d[_0x171a('0x76')]=_[_0x171a('0x57')](_0xeb846d[_0x171a('0x76')])?!![]:_0xeb846d[_0x171a('0x76')];var _0x411c65=uuid['v4']();_0x4a3e64[_0x171a('0x26')][_0x411c65]=new Action(_0xeb846d,_0x4a7ec4,_0x411c65);loggerBooked[_0x171a('0x4c')](_0x171a('0x1fc'),_0x411c65,_0x171a('0x1fd'),JSON[_0x171a('0x79')](_0xeb846d[_0x171a('0x76')]),_0x171a('0x1fe'),_0xeb846d[_0x171a('0x49')]);if(_0xeb846d[_0x171a('0x76')]){_0xeb846d[_0x171a('0x76')]=![];_0x4a3e64[_0x171a('0x2a')][_0x4a3e64[_0x171a('0x26')][_0x411c65][_0x171a('0xc3')]]=[];ami[_0x171a('0x9c')]({'actionid':_0x411c65,'action':'queuestatus','queue':_0xeb846d[_0x171a('0x49')]})[_0x171a('0xa2')](function(){utils['decrementOriginate'](_0xeb846d,_0x171a('0x1ff'));hopperUtils['rescheduleContact']({'active':![],'ContactId':_0x4a3e64[_0x171a('0x26')][_0x411c65][_0x171a('0xf4')],'ListId':_0x4a3e64[_0x171a('0x26')][_0x411c65][_0x171a('0xe5')],'VoiceQueueId':_0x4a3e64[_0x171a('0x26')][_0x411c65][_0x171a('0xe6')]||undefined,'CampaignId':_0x4a3e64[_0x171a('0x26')][_0x411c65][_0x171a('0xe7')]||undefined})[_0x171a('0xa2')](loggerCatch(_0x171a('0x200')));delete _0x4a3e64[_0x171a('0x26')][_0x411c65];});}else{loggerBooked[_0x171a('0x4c')](_0x171a('0x201'),JSON[_0x171a('0x79')](_0xeb846d['queueStatusComplete']),_0x171a('0x1fe'),_0xeb846d[_0x171a('0x49')]);utils[_0x171a('0xc6')](_0xeb846d,_0x171a('0x1ff'));hopperUtils['rescheduleContact']({'active':![],'ContactId':_0x4a3e64['actions'][_0x411c65][_0x171a('0xf4')],'ListId':_0x4a3e64[_0x171a('0x26')][_0x411c65][_0x171a('0xe5')],'VoiceQueueId':_0x4a3e64['actions'][_0x411c65][_0x171a('0xe6')]||undefined,'CampaignId':_0x4a3e64[_0x171a('0x26')][_0x411c65]['CampaignId']||undefined})['catch'](loggerCatch(_0x171a('0x200')));delete _0x4a3e64[_0x171a('0x26')][_0x411c65];}}else{return _0x4a3e64[_0x171a('0x16d')](_0xeb846d,_0x4a7ec4);}}else{if(utils[_0x171a('0x64')](undefined,_0x4a7ec4[_0x171a('0x202')])<_0xeb846d[_0x171a('0x203')]*0x3c){if(_0x4a7ec4['Agent']&&!_0x4a7ec4[_0x171a('0x16b')]['voicePause']){_0x4a3e64[_0x171a('0x1f')]['run'](_0x4a7ec4['id'])['finally'](function(){utils['decrementOriginate'](_0xeb846d,'[checkContactBlack]');});}else{hopperUtils[_0x171a('0x204')]({'active':![]},_0x4a7ec4['id'],0x1)[_0x171a('0x101')](function(){utils[_0x171a('0xc6')](_0xeb846d,'[checkContactBlack]');});}}else{_0xeb846d['outboundReCallsDay']+=0x1;utils['decrementOriginate'](_0xeb846d,_0x171a('0x1ff'));if(_0xeb846d['dialRecallInQueue']){hopperUtils['rescheduleContact']({'active':![],'recallme':![],'UserId':null,'ContactId':_0x4a7ec4[_0x171a('0xf4')],'ListId':_0x4a7ec4[_0x171a('0xe5')],'VoiceQueueId':_0x4a7ec4[_0x171a('0xe6')]||undefined,'CampaignId':_0x4a7ec4['CampaignId']||undefined})[_0x171a('0xa2')](loggerCatch(_0x171a('0x205')));hopperUtils[_0x171a('0xd0')](createObjHistory(_0xeb846d,_0x4a7ec4,utils[_0x171a('0x6f')][_0x171a('0x206')],0x17,_0x171a('0x207')))[_0x171a('0xa2')](loggerCatch(_0x171a('0x208')));}else{_0x4a3e64[_0x171a('0x11f')](createObjHistory(_0xeb846d,_0x4a7ec4,utils['CAMPAIGN_STATUS'][_0x171a('0x209')],0x16,_0x171a('0x20a')),'[Originate][HistoryRecallClose][historyCatch]',_0x171a('0x20b'));}}}}else{_0xeb846d[_0x171a('0x20c')]+=0x1;_0x4a3e64[_0x171a('0x11f')](createObjHistory(_0xeb846d,_0x4a7ec4,utils[_0x171a('0x6f')][_0x171a('0x20d')],0xd,_0x171a('0x20e')),_0x171a('0x20f'),_0x171a('0x210'));throw _0x171a('0x211');}};};Dialer[_0x171a('0x1c')][_0x171a('0x16c')]=function(_0xa4d0d7){var _0x5aa462=this;var _0x3fed25=_0xa4d0d7['limitCalls']-_0xa4d0d7['originated'];emitCampaignSummary(_0xa4d0d7);if(_0x3fed25>0x0&&_0xa4d0d7[_0x171a('0x212')]==0x0){if(_0x3fed25>this['maxNumberOriginate']){_0x3fed25=this[_0x171a('0x24')];}_0xa4d0d7[_0x171a('0x212')]=0x1;hopperUtils[_0x171a('0x213')](_0xa4d0d7,_0x3fed25)['then'](function(_0x18e110){_0xa4d0d7[_0x171a('0x212')]=0x0;if(_0x18e110){if(!utils[_0x171a('0x214')](_0x18e110)){_0xa4d0d7[_0x171a('0x6c')]=utils[_0x171a('0x6f')][_0x171a('0x70')];logger[_0x171a('0x4c')](_0x171a('0x215')+_0xa4d0d7[_0x171a('0x49')]);}else{_0xa4d0d7[_0x171a('0x81')]+=_0x18e110[_0x171a('0x9b')];_0xa4d0d7[_0x171a('0x6c')]=utils[_0x171a('0x6f')][_0x171a('0x216')];for(var _0x12e616=0x0;_0x12e616<_0x18e110[_0x171a('0x9b')];_0x12e616+=0x1){_0xa4d0d7[_0x171a('0x217')]+=0x1;if(_[_0x171a('0xfb')](_0x18e110[_0x12e616])||_[_0x171a('0xfb')](_0x18e110[_0x12e616][_0x171a('0x18c')])||_[_0x171a('0xfb')](_0x18e110[_0x12e616][_0x171a('0x171')])){_0x5aa462[_0x171a('0x165')]('[actionOriginate]\x20',_0xa4d0d7,_0x18e110[_0x12e616]);}else{hopperUtils[_0x171a('0x218')](_[_0x171a('0x7a')](_0x18e110[_0x12e616],[_0x171a('0xe7'),_0x171a('0x171')]))[_0x171a('0x42')](_0x5aa462[_0x171a('0x219')](_0xa4d0d7,_0x18e110[_0x12e616]))[_0x171a('0xa2')](function(_0x5ef1f4){logger[_0x171a('0x69')](_0x171a('0x21a'),_0x5ef1f4);utils['decrementOriginate'](_0xa4d0d7,_0x171a('0x21b'));});}}}}})['catch'](function(_0x448cbb){_0xa4d0d7[_0x171a('0x212')]=0x0;logger['error'](_0x171a('0x21c'),_0x448cbb);});}};Dialer[_0x171a('0x1c')][_0x171a('0xb8')]=function(_0x305a44,_0x445529){var _0x3f525f=this;var _0x215eda=[];if(_0x445529<0x1||_0x305a44[_0x171a('0xb5')]==='booked'){_0x445529=0x1;}var _0x54bd0c=Math[_0x171a('0x1d5')](_0x305a44[_0x171a('0x14d')]*_0x445529)-_0x305a44[_0x171a('0x81')];if(_0x305a44[_0x171a('0x21d')]>0x0){var _0x59df91=_0x305a44[_0x171a('0x21d')]-_0x305a44[_0x171a('0x81')]-_0x305a44[_0x171a('0x14e')]-_0x305a44[_0x171a('0x14f')];if(_0x54bd0c>_0x59df91){_0x54bd0c=_0x59df91;}}if(_0x54bd0c>0x0&&_0x305a44[_0x171a('0x212')]==0x0){if(_0x305a44['dialMethod']===_0x171a('0xa')){_0x54bd0c=0x1;}if(_0x54bd0c>this[_0x171a('0x24')]){_0x54bd0c=this['maxNumberOriginate'];}for(var _0x56424d in this[_0x171a('0x22')]){if(typeof this[_0x171a('0x22')][_0x56424d]!==_0x171a('0xae')){if(this[_0x171a('0x22')][_0x56424d]['state']===_0x171a('0x21e')&&this[_0x171a('0x22')][_0x56424d]['status']===_0x171a('0x8b')){_0x215eda['push'](this['agents'][_0x56424d]['id']);}}}_0x305a44[_0x171a('0x212')]=0x1;hopperUtils[_0x171a('0x21f')](_0x305a44,_0x215eda,_0x54bd0c)[_0x171a('0x42')](function(_0x38474d){_0x305a44['temp']=0x0;if(_0x38474d){if(!utils[_0x171a('0x214')](_0x38474d)){hopperUtils['countReScheduled'](_0x305a44)[_0x171a('0x42')](sendMessageReschedule(_0x305a44))['catch'](loggerCatch(_0x171a('0x220')));}else{_0x305a44[_0x171a('0x81')]+=_0x38474d[_0x171a('0x9b')];_0x305a44['message']=_0x305a44['dialMethod']===_0x171a('0xa')?utils['CAMPAIGN_STATUS'][_0x171a('0x150')]:utils[_0x171a('0x6f')][_0x171a('0x216')];for(var _0x4dfb01=0x0;_0x4dfb01<_0x38474d['length'];_0x4dfb01+=0x1){if(_[_0x171a('0xfb')](_0x38474d[_0x4dfb01])||_['isNil'](_0x38474d[_0x4dfb01]['Contact'])||_[_0x171a('0xfb')](_0x38474d[_0x4dfb01][_0x171a('0x171')])){_0x3f525f[_0x171a('0x165')]('[actionOriginate]\x20',_0x305a44,_0x38474d[_0x4dfb01]);}else{hopperUtils[_0x171a('0x221')](_['pick'](_0x38474d[_0x4dfb01],[_0x171a('0xe6'),_0x171a('0x171')]))[_0x171a('0x42')](_0x3f525f[_0x171a('0x219')](_0x305a44,_0x38474d[_0x4dfb01]))['catch'](function(_0x1a168c){logger['error'](_0x171a('0x222'),_0x1a168c);utils[_0x171a('0xc6')](_0x305a44,'[handlePower]');});}}}}})[_0x171a('0xa2')](function(_0x216608){_0x305a44['temp']=0x0;logger['error'](_0x171a('0x21c'),_0x216608);});}};Dialer[_0x171a('0x1c')]['handlePredictive']=function(_0x3fd0e4){if(_0x3fd0e4[_0x171a('0x21d')]>0x0){var _0x2363b5=_0x3fd0e4[_0x171a('0x21d')]-_0x3fd0e4['originated']-_0x3fd0e4[_0x171a('0x14e')];if(_0x2363b5>0x0&&_0x3fd0e4['temp']==0x0){this[_0x171a('0x223')](_0x3fd0e4);}else{loggerPredictiveCalls[_0x171a('0x4c')](_0x171a('0x224'));}}else{this['tryOriginatePredictive'](_0x3fd0e4);}};Dialer[_0x171a('0x1c')][_0x171a('0x223')]=function(_0x582ea2){var _0x8543c6=this;var _0x5771a3=[];_0x582ea2[_0x171a('0x81')]+=0x1;for(var _0x1a75e1 in this['agents']){if(typeof this[_0x171a('0x22')][_0x1a75e1]!=='undefined'){if(this[_0x171a('0x22')][_0x1a75e1][_0x171a('0x72')]===_0x171a('0x21e')&&this[_0x171a('0x22')][_0x1a75e1][_0x171a('0x8a')]===_0x171a('0x8b')){_0x5771a3['push'](this[_0x171a('0x22')][_0x1a75e1]['id']);}}}_0x582ea2[_0x171a('0x212')]=0x1;return this['getContactDialer'](_0x582ea2['id'],_0x5771a3,0x1,_0x582ea2[_0x171a('0x225')],_0x582ea2)[_0x171a('0x42')](function(_0x3a037b){_0x582ea2['temp']=0x1;if(_0x3a037b){if(!utils[_0x171a('0x214')](_0x3a037b)){utils[_0x171a('0x226')](_0x582ea2,0x1,0x0);return hopperUtils[_0x171a('0x227')](_0x582ea2)[_0x171a('0x42')](sendMessageReschedule(_0x582ea2))[_0x171a('0xa2')](loggerCatch(_0x171a('0x220')));}else{_0x582ea2['message']=utils[_0x171a('0x6f')][_0x171a('0x216')];if(_['isNil'](_0x3a037b[0x0])||_[_0x171a('0xfb')](_0x3a037b[0x0][_0x171a('0x18c')])||_['isNil'](_0x3a037b[0x0]['phone'])){_0x8543c6[_0x171a('0x165')]('[actionOriginate]\x20',_0x582ea2,_0x3a037b[0x0]);}else{return hopperUtils['checkIsBlackList'](_['pick'](_0x3a037b[0x0],[_0x171a('0xe6'),_0x171a('0x171')]))[_0x171a('0x42')](_0x8543c6[_0x171a('0x219')](_0x582ea2,_0x3a037b[0x0]))['catch'](function(_0x41add8){logger[_0x171a('0x69')](_0x171a('0x228'),_0x41add8);utils[_0x171a('0xc6')](_0x582ea2,'[actionOriginatePredictive]');});}}}})[_0x171a('0xa2')](function(_0x131fac){_0x582ea2[_0x171a('0x212')]=0x0;logger['error']('[getContactCampaign2]',_0x131fac);});};Dialer[_0x171a('0x1c')][_0x171a('0x1ee')]=function(_0x3e06c7,_0x2ec1ce,_0x198d0a,_0x16e3c2,_0x26ce33,_0x9359b7){loggerPredictive['info'](_0x171a('0x229'));loggerPredictive['info'](_0x171a('0x22a'),_0x3e06c7);loggerPredictive[_0x171a('0x4c')]('Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x2ec1ce);loggerPredictive[_0x171a('0x4c')](_0x171a('0x22b'),_0x198d0a);loggerPredictive[_0x171a('0x4c')]('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',_0x16e3c2);loggerPredictive[_0x171a('0x4c')](_0x171a('0x22c'),_0x26ce33);loggerPredictive[_0x171a('0x4c')](_0x171a('0x55'));return new Promise(function(_0x3b662d,_0x5ee466){if(_0x3e06c7<=0x0||isNaN(_0x3e06c7)){return _0x5ee466(msgResponse(_0x171a('0x22d'),_0x171a('0x87'),_0x171a('0x22e')+_0x3e06c7));}if(_0x198d0a<=0x0||isNaN(_0x198d0a)){return _0x5ee466(msgResponse(_0x171a('0x22d'),'Error','Ts\x20=\x20'+_0x198d0a));}if(_0x16e3c2<=0x0||isNaN(_0x16e3c2)){return _0x5ee466(msgResponse(_0x171a('0x22d'),_0x171a('0x87'),_0x171a('0x22f')+_0x16e3c2));}if(_0x2ec1ce<=0x0||isNaN(_0x2ec1ce)){return _0x5ee466(msgResponse(_0x171a('0x22d'),'Error',_0x171a('0x230')+_0x2ec1ce));}if(_0x26ce33<=0x0||isNaN(_0x26ce33)){return _0x5ee466(msgResponse(_0x171a('0x22d'),_0x171a('0x87'),'Amax\x20=\x20'+_0x26ce33));}_0x9359b7=_0x9359b7||0x0;var _0x55fd58=0x1/_0x198d0a;var _0x2f0595=0x0;var _0x53306c=0x0;var _0x43bc94=0x0;var _0x2b3ca6=0x0;for(var _0x550fcc=0x0;_0x43bc94<_0x26ce33;_0x550fcc+=0x1){_0x53306c=_0x550fcc/_0x2ec1ce;_0x2f0595=(_0x16e3c2*_0x53306c+_0x9359b7)/_0x55fd58;_0x43bc94=utils[_0x171a('0x231')](_0x2f0595,_0x3e06c7);_0x2b3ca6=_0x2f0595/_0x3e06c7*(0x1-utils[_0x171a('0x231')](_0x2f0595,_0x3e06c7));}return _0x3b662d({'erlangCalls':_0x550fcc,'erlangCallToSecond':_0x2ec1ce/_0x550fcc,'erlangAbandonmentRate':_0x43bc94,'erlangBusyFactor':_0x2b3ca6});});};Dialer[_0x171a('0x1c')][_0x171a('0x1f6')]=function(_0x598dc8,_0x5b5a40,_0x11e1b5,_0x384eb2,_0x454794,_0x469ced){loggerPredictive['info'](_0x171a('0x232'));loggerPredictive[_0x171a('0x4c')](_0x171a('0x22a'),_0x598dc8);loggerPredictive[_0x171a('0x4c')](_0x171a('0x233'),_0x5b5a40);loggerPredictive[_0x171a('0x4c')](_0x171a('0x22b'),_0x11e1b5);loggerPredictive['info']('P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x384eb2);loggerPredictive[_0x171a('0x4c')]('Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x454794);loggerPredictive[_0x171a('0x4c')](_0x171a('0x55'));return new Promise(function(_0xfb9c9b,_0x3b1614){if(_0x598dc8<=0x0||isNaN(_0x598dc8)){return _0x3b1614(msgResponse(_0x171a('0x234'),'Error',_0x171a('0x22e')+_0x598dc8));}if(_0x11e1b5<=0x0||isNaN(_0x11e1b5)){return _0x3b1614(msgResponse('[busyFactor]',_0x171a('0x87'),_0x171a('0x235')+_0x11e1b5));}if(_0x384eb2<=0x0||isNaN(_0x384eb2)){return _0x3b1614(msgResponse(_0x171a('0x234'),_0x171a('0x87'),'p\x20=\x20'+_0x384eb2));}if(_0x5b5a40<=0x0||isNaN(_0x5b5a40)){return _0x3b1614(msgResponse(_0x171a('0x234'),'Error','interval\x20=\x20'+_0x5b5a40));}if(_0x454794<=0x0||isNaN(_0x454794)){return _0x3b1614(msgResponse(_0x171a('0x234'),'Error',_0x171a('0x236')+_0x454794));}_0x469ced=_0x469ced||0x0;var _0x4dc4f9=0x1/_0x11e1b5;var _0x50b159=0x0;var _0x502cbf=0x0;var _0x4118eb=0x0;var _0x194a15=0x0;for(var _0x2a6029=0x0;_0x194a15<_0x454794;_0x2a6029+=0x1){_0x502cbf=_0x2a6029/_0x5b5a40;_0x50b159=(_0x384eb2*_0x502cbf+_0x469ced)/_0x4dc4f9;_0x4118eb=utils['erlangb'](_0x50b159,_0x598dc8);_0x194a15=_0x50b159/_0x598dc8*(0x1-utils[_0x171a('0x231')](_0x50b159,_0x598dc8));}return _0xfb9c9b({'erlangCalls':_0x2a6029,'erlangCallToSecond':_0x5b5a40/_0x2a6029,'erlangAbandonmentRate':_0x4118eb,'erlangBusyFactor':_0x194a15});});};module['exports']=Dialer;