65951d8c83b4677822415eb70471781ed5f23088
[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 _0xe1d3=['phone','contact\x20is\x20undefine','getCaller','dialQueueProject','NONE','\x22agi://%s/square,%s\x22','isOutboundQueue','\x22%s,%s%s,,,%s\x22','xcally-motion-dialer','XMD-AMDINITIALSILENCE','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDGreeting','XMD-AMDAFTERGREETINGSILENCE','dialAMDAfterGreetingSilence','XMD-AMDTOTALANALYSISTIME','dialAMDTotalAnalysisTime','XMD-AMDMINWORDLENGTH','dialAMDMinWordLength','XMD-AMDBETWEENWORDSSILENCE','dialAMDBetweenWordsSilence','XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','XMD-VOICEQUEUEID','XMD-CAMPAIGNID','setXMDContactVariables','Contact','getCallerId','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','dialOriginateCallerIdNumber','callerid','XMD-ORIGINATECALLERIDNAME','originatecalleridname','extractCalleridName','XMD-ORIGINATECALLERIDNUM','variables','originate','SIP/%s/%s%s','dialPrefix','dialCutDigit','trim','dialOriginateTimeout','outboundOriginateFailureCallsDay','[originateError]:\x20%s','originate\x20action\x20Error','checkRetriveMax','countnoanswerretry','countnosuchnumberretry','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','[rescheduleContact][NoAnswer]','[rescheduleContact]\x20[Busy]','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','[rescheduleContact][NoSuchNumber]','dialAbandonedMaxRetry','[rescheduleContact][Machine]','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','[rescheduleContact][AgentReject]','[callProgressDetecting]','entity\x20is\x20undefine','evt\x20is\x20undefine','reason','NoSuchNumber','custom:agentnosuchnumber','callAdditionalPhoneAfterMin','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','buildNoAnswerEventPayload','custom:agentnoanswer','[syncAgentComplete][createHistory][3]','reason\x203\x20ringing\x20no\x20answer','outboundBusyCallsDay','busy','dialBusyRetryFrequency','[syncAgentComplete][createHistory][5]','dialBusyMaxRetry','reason\x205\x20busy','outboundCongestionCallsDay','Congestion','congestion','[syncAgentComplete][createHistory][8]','reason\x208\x20congestion','outboundAbandonedCallsDay','Abandoned','reason\x2011\x20abandoned','AgentReject','custom:agentreject','agentreject','[syncAgentComplete][createHistory][20]','reason\x2020\x20agentreject','[syncAgentComplete][createHistory][?]','Global','[moveContactManagedDialer][0]','contact\x20not\x20moved','dialPredictiveOptimizationPercentage','round','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','floor','erlangAbandonmentRate','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','[startMethodPredictive][StartProgressive]','[startMethodPredictive][StartProgressive][Loop]','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day','dialPredictiveOptimization','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','Drop\x20in\x20this\x20interval','dialPredictiveInterval','started\x20in\x20predictive\x20at','avgHandleTime','startMethodPredictive','Predictive\x20after\x20first\x20interval','recalculate\x20predictive\x20at','getDataPredictive',')\x20are\x20less\x20than\x20threshold\x20(','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20more\x20than\x20threshold\x20(','agentBusyFactor','busyFactor','[getDataPredictive]','Unknown\x20Predictive','check\x20failure','getDataPredictiveOld','loggedIn','outboundQueuePauses','predictiveIntervalPauses','[CatchErlangB]','one\x20call\x20every:','milliseconds','[handlePredictive]','UserId','queueStatusComplete:\x20','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','Queue:\x20','scheduledat','dialRecallMeTimeout','voicePause','unlockContact','outboundReCallsDay','dialRecallInQueue','QUEUE_RECALL','[Originate][HistoryDialRecallInQueue][historyCatch]','RECALL_TIMEOUT','RecallFailedTimeout','[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]','outboundBlacklistCallsDay','BLACKLIST','Blacklist','[Originate][MoveBlacklist]','inBlackList','limitCalls','getContactDialerIvr','RUNNING','ivrTotalCallsDays','checkIsBlackListIvr','[getContactCampaign2]','dialLimitQueue','pTalking','not_inuse','getContactDialer','countReScheduled','[countReScheduled]\x20','checkIsBlackList','checkContactBlack','[actionOriginate]\x20','[getContactDialer2]','tryOriginatePredictive','checkContactEmpty','[actionOriginatePredictive]\x20','abandonmentRate','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[abandonmentRate]','interval\x20=\x20','Amax\x20=\x20','erlangb','----\x20Agent\x20Busy\x20Factor\x20----','Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[busyFactor]','Ts\x20=\x20','p\x20=\x20','exports','moment','./utils','../preview/util/util','dialer','../../../config/logger','predictive','predictiveCalls','syncQueueSummary','redis','defaults','../rpc/cmHopper','../rpc/voiceQueueRt','../rpc/interval','./models/action','./models/queueCallerAbandon','env','XCALLY_IP_AGI','enqueue','tail','finally','sequence','preview','voiceQueues','agents','trunks','maxNumberOriginate','channels','actions','contactsId','optionPredictive','startPredictive','startProgressive','ivrOriginated','queueBooked','queueBookedRR','queuesSummary','agentconnect','bind','queuecallerabandon','syncQueueCallerAbandon','originateresponse','syncOriginateResponse','agentcomplete','syncAgentComplete','custom:queuesummary','custom:queuesummarycomplete','hangup','syncHangup','newexten','syncNewExten','syncQueueMember','queuestatuscomplete','syncQueueStatusComplete','loopCampaigns','loopClearZombieChannels','previewRecallmeReminderInterval','isUndefined','emit','debug','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','inspect','format','voice:queue:%s','isEmpty','info','-----\x20Stats\x20Predictive\x20---','Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalTotalCalls','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAnsweredCalls','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsTimeout','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsCallersExit','AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgHoldtime','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgTalktime','---------------------------','Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','---------\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','merge','getSeconds','startProgressive\x20value\x20cleared','name','handlePredictive','handlePredictive\x20interval\x20cleared','error','stack','checkContactLowerLimitOriginate','temp','contactsRescheduled','message','CAMPAIGN_STATUS','CONTACTS_RESCHEDULED','[getContactDialer2][ReScheduled]','contacts','NO_AVAILABLE_CONTACTS','statedesc','queueStatusComplete','[unlockQueueStatus][undefined]','[booked][unlockQueueStatus]','stringify','Interval','NULL_INTERVAL','\x20INTERVAL_IS_NULL','Intervals','isIVRCampaignActive','\x20NOT\x20Active','campaign:ivr:%s','campaign:save','sendMessageOneNotActive','originated','INACTIVE','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','is\x20not\x20active','DISACTIVED','is\x20disactive','[ifTime][Action]','Error','prototype','isTrunkReachable','active','SIP/%s','status','reachable','checkIsTrunkReachable','Trunk','TrunkBackup','TRUNK_NOT_REACHABLE','checkIfTime','ifTimeIvr','checkIfTimeIntervals','ifTime','Failure','\x20Intervals\x20is\x20null\x20','EMPTY_INTERVAL','\x20Intervals\x20is\x20empty\x20','timezones','UNKNOWN_TIMEZONE','\x20Timezone\x20unknow\x20','isArray','length','push','command','iftime\x20%s,%s','interval','then','content','indexOf','Action','all','some','OVERTIME_GLOBAL_INTERVAL','OVERTIME_INTERVAL','[ifTime][promiseAll]','Global:\x20','\x20Interval\x20is\x20overtime:\x20','catch','resetActiveCalls','syncCampaigns','campaigns','isIVRCampaign','resolve','dialTimezone','launchHandleIvr','[syncCampaigns]','checkDialMethod','dialMethod','progressive','handlePower','dialPowerLevel','booked','Queue','method\x20not\x20recognized','silly','Voice\x20Queue\x20%s\x20$s','intervalIftime','Timezone:\x20','AMI\x20IfTime','syncAgentConnect','queue','uniqueId','uniqueid','type','updateOriginated','YYYY-MM-DD\x20HH:mm:ss','outboundAnswerCallsDay','agiafterat','dialQueueProject2','dialAgiAfterHangupAgent','createHistory','moveContactManagedDialer','[syncAgentComplete]','ivr','droptime','outboundDropCallsDayTimeout','predictiveIntervalErlangCallsDroppedCalls','state','dropreason','TIMEOUT','countdropretry','dialDropRetryFrequency','verifyAdditionalPhones','additional','dialDropMaxRetry','rescheduleContact','add','minutes','ContactId','ListId','CampaignId','[rescheduleContact][Drop]','Drop','starttime','endtime','calleridname','calleridnum','[syncAgentComplete][createHistory][10]','countabandonedretry','countglobal','voiceQueue','dialAbandonedRetryFrequency','VoiceQueueId','[rescheduleContact][Abandoned]','[syncAgentComplete][createHistory][11]','swapAdditionalPhones','channel','actionid','strategy','rrmemory','isNil','locked','paused','stateinterface','pick','idHopper','roundrobin','run','[Catch][Preview][syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','_rr','unlockRR','[booked][RR]','contactAgent-idHopper:\x20','[booked][RR][finaly]','Agent:\x20','[booked][unlock]','[booked][unlock2]','[unlock2][syncQueueStatusComplete]','[unlock3][syncQueueStatusComplete]','responsetime','getQueue','response','Success','callProgressDetecting','[callProgressDetecting]\x20','variable','amdstatus','exten','dialAMDActive','HANGUP','outboundAnswerAgiCallsDay','HangupInAMD','AMD','custom:amd','buildObj','amd','saveInDb','[syncHangupInAMD][createHistory]','[syncHangupInAMD]','value','[syncAgentComplete][createHistory][0]','countbusyretry','countcongestionretry','countagentrejectretry','dialGlobalMaxRetry','stateGlobal','reason19\x20machine....','countmachineretry','createStateFinal','dialMachineRetryFrequency','[syncHangupInAMDIvr]','Machine','membername','reason\x2019\x20machine....','ivrAnswerCallsDay','[syncHangupIvr][createHistory]','[syncHangupIvr]','AnswerAGI','outboundUnknownCallsDay','cause-txt','Unknow','running','isPreviewCampaign','statusMessage','getQueueCampaignStatusMessage','available','inUse','talking','ACTIVE','[syncQueueSummary]','compareToOutboundQueue','queueSummaryCountersUpdated','assign','throttle','filter','map','user:%s','checkPreviewRecallReminder','clearZombieChannels','[uniqueid]','undefined','No\x20such\x20channel','[Dialer][checkChannel]','[Dialer][checkChannel][ivr]','getVoiceQueueRtPauses','[getVoiceQueueRtPauses]\x20','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','loggerHandler','emptyContact','notFound','[emptyContact][createHistory]','[emptyContact]','queueCallerAbandonCreateState','[syncAgentComplete][createHistory]','[syncQueueCallerAbandon]\x20[Drop]','Agent','user:dialPreviewRecallReminder','handleIvr','actionOriginate','object','voiceQueue\x20is\x20undefine'];(function(_0x1e6e4e,_0x2b1b09){var _0x3d746b=function(_0x4483dd){while(--_0x4483dd){_0x1e6e4e['push'](_0x1e6e4e['shift']());}};_0x3d746b(++_0x2b1b09);}(_0xe1d3,0xc7));var _0x3e1d=function(_0x5c85fb,_0x3ee344){_0x5c85fb=_0x5c85fb-0x0;var _0x17df0d=_0xe1d3[_0x5c85fb];return _0x17df0d;};'use strict';var util=require('util');var _=require('lodash');var uuid=require('uuid');var moment=require(_0x3e1d('0x0'));var rr=require('rr');var Redis=require('ioredis');var utils=require(_0x3e1d('0x1'));var hopperUtils=require('./utils/hopper');var ut=require(_0x3e1d('0x2'));var config=require('../../../config/environment/');var logger=require('../../../config/logger')(_0x3e1d('0x3'));var loggerBooked=require(_0x3e1d('0x4'))('booked');var loggerPredictive=require(_0x3e1d('0x4'))(_0x3e1d('0x5'));var loggerPredictiveCalls=require(_0x3e1d('0x4'))(_0x3e1d('0x6'));var loggerSyncQueueSummary=require(_0x3e1d('0x4'))(_0x3e1d('0x7'));var ami=require('../ami');config[_0x3e1d('0x8')]=_[_0x3e1d('0x9')](config[_0x3e1d('0x8')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x3e1d('0x8')]));var cmHopper=require(_0x3e1d('0xa'));var voiceQueueRt=require(_0x3e1d('0xb'));var RpcSetting=require('../rpc/setting');var Interval=require(_0x3e1d('0xc'));var Action=require(_0x3e1d('0xd'));var History=require('./models/history');var Final=require('./models/final');var AgentComplete=require('./models/agentComplete');var QueueCallerAbandon=require(_0x3e1d('0xe'));var Hangup=require('./models/hangup');var ipAgi=process[_0x3e1d('0xf')][_0x3e1d('0x10')]||'127.0.0.1';var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence['prototype'][_0x3e1d('0x11')]=function(_0x2b4bef){this[_0x3e1d('0x12')]=this[_0x3e1d('0x12')]?this[_0x3e1d('0x12')][_0x3e1d('0x13')](_0x2b4bef):_0x2b4bef();};function Dialer(_0x14f791,_0x3c4161){this[_0x3e1d('0x14')]=new Sequence();this[_0x3e1d('0x15')]=_0x3c4161;this[_0x3e1d('0x16')]=_0x14f791[_0x3e1d('0x16')];this['campaigns']=_0x14f791['campaigns'];this['agents']=_0x14f791[_0x3e1d('0x17')];this['trunks']=_0x14f791[_0x3e1d('0x18')];this[_0x3e1d('0x19')]=config[_0x3e1d('0x19')]||0x2;this[_0x3e1d('0x1a')]={};this[_0x3e1d('0x1b')]={};this[_0x3e1d('0x1c')]={};this['uniqueId']={};this[_0x3e1d('0x1d')]={};this[_0x3e1d('0x1e')]={};this[_0x3e1d('0x1f')]={};this[_0x3e1d('0x20')]={};this[_0x3e1d('0x21')]={};this[_0x3e1d('0x22')]={};this[_0x3e1d('0x23')]={};ami['on'](_0x3e1d('0x24'),this['syncAgentConnect'][_0x3e1d('0x25')](this));ami['on'](_0x3e1d('0x26'),this[_0x3e1d('0x27')][_0x3e1d('0x25')](this));ami['on'](_0x3e1d('0x28'),this[_0x3e1d('0x29')][_0x3e1d('0x25')](this));ami['on'](_0x3e1d('0x2a'),this[_0x3e1d('0x2b')]['bind'](this));ami['on'](_0x3e1d('0x2c'),this['syncQueueSummary'][_0x3e1d('0x25')](this));ami['on'](_0x3e1d('0x2d'),this['syncQueueSummaryComplete']['bind'](this));ami['on'](_0x3e1d('0x2e'),this[_0x3e1d('0x2f')][_0x3e1d('0x25')](this));ami['on'](_0x3e1d('0x30'),this[_0x3e1d('0x31')][_0x3e1d('0x25')](this));ami['on']('varset',this['syncVarSet'][_0x3e1d('0x25')](this));ami['on']('queuemember',this[_0x3e1d('0x32')][_0x3e1d('0x25')](this));ami['on'](_0x3e1d('0x33'),this[_0x3e1d('0x34')][_0x3e1d('0x25')](this));this[_0x3e1d('0x35')]();this[_0x3e1d('0x36')]();RpcSetting['getSettings']()['then'](function(_0x33854e){previewRecallmeReminderInterval=_0x33854e[_0x3e1d('0x37')];});}function isNotNull(_0x34f258){return _0x34f258!==null&&!_[_0x3e1d('0x38')](_0x34f258);}function msgResponse(_0x513e6f,_0x1a753b,_0x3b6b8b){return{'action':_0x513e6f,'response':_0x1a753b,'message':_0x3b6b8b,'stack':_0x3b6b8b};}function emit(_0x4dd1e9,_0x3c8e4e,_0x30369a){io['to'](_0x4dd1e9)[_0x3e1d('0x39')](_0x3c8e4e,_0x30369a);}function emitOutboundVoiceQueueSummary(_0x216eb0){if(_0x216eb0['type']==='outbound'){logger[_0x3e1d('0x3a')](_0x3e1d('0x3b'),util[_0x3e1d('0x3c')](_0x216eb0,{'showHidden':![],'depth':null}));emit(util[_0x3e1d('0x3d')](_0x3e1d('0x3e'),_0x216eb0['name']),'voice_queue:save',_0x216eb0);}}function checkGetDataPredictive(_0x2e85a2){if(isNotNull(_0x2e85a2)&&!_[_0x3e1d('0x3f')](_0x2e85a2)){loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x41'));loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x42'),_0x2e85a2[_0x3e1d('0x43')]);loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x44'),_0x2e85a2[_0x3e1d('0x45')]);loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x46'),_0x2e85a2[_0x3e1d('0x47')]);loggerPredictive['info'](_0x3e1d('0x48'),_0x2e85a2[_0x3e1d('0x49')]);loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x4a'),_0x2e85a2[_0x3e1d('0x4b')]);loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x4c'),_0x2e85a2[_0x3e1d('0x4d')]);loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x4e'));if(_0x2e85a2[_0x3e1d('0x43')]>0x0){if(!_['isUndefined'](_0x2e85a2['predictiveIntervalAvgTalktime'])&&_0x2e85a2[_0x3e1d('0x4d')]>0x0){return!![];}loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x4f'));if(!_[_0x3e1d('0x38')](_0x2e85a2['predictiveIntervalAvgHoldtime'])&&_0x2e85a2[_0x3e1d('0x4b')]>0x0){return!![];}loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x50'));}else{loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x51'));}}else{loggerPredictive[_0x3e1d('0x40')]('History\x20information\x20are\x20empty');}return![];}function mergeDataErlangB(_0x19ee97){return function(_0x12b9da){loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x52'));loggerPredictive['info'](_0x3e1d('0x53'),_0x12b9da[_0x3e1d('0x54')]);loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x55'),_0x12b9da[_0x3e1d('0x56')]);loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x57'),_0x12b9da['erlangAbandonmentRate']);loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x58'),_0x12b9da['erlangBusyFactor']);loggerPredictive['info'](_0x3e1d('0x57'),_0x12b9da['erlangAbandonmentRate']);loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x4e'));_[_0x3e1d('0x59')](_0x19ee97,_0x12b9da);};}function ifInterval(_0x27a615,_0x1774f){if(_[_0x3e1d('0x38')](_0x1774f)){return![];}return utils[_0x3e1d('0x5a')](undefined,_0x1774f)<_0x27a615*0x3c;}function clearPredictiveAttributes(_0x5b5f8f){if(_0x5b5f8f[_0x3e1d('0x1f')]){_0x5b5f8f[_0x3e1d('0x1f')]=undefined;loggerPredictive[_0x3e1d('0x3a')](_0x5b5f8f['name'],_0x3e1d('0x5b'));}if(_0x5b5f8f[_0x3e1d('0x1e')]){_0x5b5f8f['startPredictive']=undefined;loggerPredictive[_0x3e1d('0x3a')](_0x5b5f8f[_0x3e1d('0x5c')],'startPredictive\x20value\x20cleared');}if(_0x5b5f8f[_0x3e1d('0x5d')]){clearInterval(_0x5b5f8f[_0x3e1d('0x5d')]);_0x5b5f8f[_0x3e1d('0x5d')]=undefined;loggerPredictive[_0x3e1d('0x3a')](_0x5b5f8f[_0x3e1d('0x5c')],_0x3e1d('0x5e'));}}function loggerCatchPredictive(_0x326aa6,_0x4b977b){return function(_0x2218d7){loggerPredictive[_0x3e1d('0x5f')](_0x4b977b[_0x3e1d('0x5c')],_0x326aa6);loggerPredictive[_0x3e1d('0x5f')](_0x2218d7[_0x3e1d('0x60')]);clearPredictiveAttributes(_0x4b977b);};}function loggerCatch(_0x3e45cd){return function(_0x3d79f2){logger[_0x3e1d('0x5f')](_0x3e45cd,util[_0x3e1d('0x3c')](_0x3d79f2,{'showHidden':![],'depth':null}));};}function loggerGetContactDialer(_0x1b50fd,_0x27d045,_0x5edb5e){return function(_0x4b3029){utils[_0x3e1d('0x61')](_0x27d045,_0x5edb5e,0x0);_0x27d045[_0x3e1d('0x62')]=0x0;logger[_0x3e1d('0x5f')](_0x1b50fd,util[_0x3e1d('0x3c')](_0x4b3029,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x5341a5){return function(_0xa31683){if(isNotNull(_0xa31683)&&isNotNull(_0xa31683[0x0])){if(_0xa31683[0x0][_0x3e1d('0x63')]>0x0){_0x5341a5[_0x3e1d('0x64')]=utils[_0x3e1d('0x65')][_0x3e1d('0x66')];logger[_0x3e1d('0x40')](_0x3e1d('0x67')+_0x5341a5[_0x3e1d('0x5c')],_0xa31683[0x0][_0x3e1d('0x63')],_0x3e1d('0x68'));}else{_0x5341a5[_0x3e1d('0x64')]=utils[_0x3e1d('0x65')][_0x3e1d('0x69')];logger[_0x3e1d('0x40')]('[getContactDialer2][Empty]'+_0x5341a5[_0x3e1d('0x5c')]);}}};}function createObjHistory(_0x4c7dee,_0x55afb8,_0x22973e,_0x2631d2,_0x234b2b){_0x4c7dee[_0x3e1d('0x64')]=_0x22973e;var _0x30f59e=new Action(_0x4c7dee,_0x55afb8);var _0x481a08=new History(_0x30f59e);_0x481a08['state']=_0x2631d2;_0x481a08[_0x3e1d('0x6a')]=_0x234b2b;_0x481a08['endtime']=_0x30f59e['starttime'];return _0x481a08;}function unlockQueueStatus(_0x10de34,_0x2cf19b){setTimeout(function(){if(_[_0x3e1d('0x38')](_0x10de34[_0x3e1d('0x6b')])){loggerBooked[_0x3e1d('0x5f')](_0x3e1d('0x6c'),_0x2cf19b);}_0x10de34['queueStatusComplete']=!![];loggerBooked[_0x3e1d('0x40')](_0x3e1d('0x6d'),_0x2cf19b,JSON[_0x3e1d('0x6e')](_['pick'](_0x10de34,[_0x3e1d('0x5c'),_0x3e1d('0x6b')])));},0x1f3);}function checkInterval(_0x4e3293){return function(){if(!isNotNull(_0x4e3293[_0x3e1d('0x6f')])){_0x4e3293[_0x3e1d('0x64')]=utils['CAMPAIGN_STATUS'][_0x3e1d('0x70')];throw _0x4e3293[_0x3e1d('0x5c')]+_0x3e1d('0x71');}if(!isNotNull(_0x4e3293[_0x3e1d('0x6f')][_0x3e1d('0x72')])){_0x4e3293[_0x3e1d('0x64')]=utils[_0x3e1d('0x65')][_0x3e1d('0x70')];throw _0x4e3293['name']+'\x20INTERVAL_IS_NULL';}if(!isNotNull(_[_0x3e1d('0x3f')](_0x4e3293[_0x3e1d('0x6f')][_0x3e1d('0x72')]))){_0x4e3293[_0x3e1d('0x64')]=utils[_0x3e1d('0x65')][_0x3e1d('0x70')];throw _0x4e3293[_0x3e1d('0x5c')]+_0x3e1d('0x71');}};}function checkIsIVRCampaignActive(_0x57c8aa){return function(){if(!utils[_0x3e1d('0x73')](_0x57c8aa)){_0x57c8aa[_0x3e1d('0x64')]=utils[_0x3e1d('0x65')]['INACTIVE'];throw _0x57c8aa[_0x3e1d('0x5c')]+_0x3e1d('0x74');}};}function emitCampaignSummary(_0x35d2d6){if(utils['isIVRCampaign'](_0x35d2d6)){emit(util[_0x3e1d('0x3d')](_0x3e1d('0x75'),_0x35d2d6['name']),_0x3e1d('0x76'),_0x35d2d6);}}function loggerCatchQueueSummary(_0x1ba805,_0x256ccc){return function(_0xa761ff){clearPredictiveAttributes(_0x256ccc);emitCampaignSummary(_0x256ccc);loggerSyncQueueSummary[_0x3e1d('0x3a')](_0x1ba805,util[_0x3e1d('0x3c')](_0xa761ff,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x4c0ea2){if(_0x4c0ea2[_0x3e1d('0x77')]){if(_0x4c0ea2[_0x3e1d('0x78')]===0x0){_0x4c0ea2[_0x3e1d('0x77')]=![];_0x4c0ea2[_0x3e1d('0x64')]=utils[_0x3e1d('0x65')][_0x3e1d('0x79')];loggerSyncQueueSummary[_0x3e1d('0x3a')](_0x3e1d('0x7a'),_0x4c0ea2['name'],_0x3e1d('0x7b'));}else{_0x4c0ea2[_0x3e1d('0x64')]=utils[_0x3e1d('0x65')][_0x3e1d('0x7c')];loggerSyncQueueSummary[_0x3e1d('0x3a')](_0x3e1d('0x7a'),_0x4c0ea2['name'],_0x3e1d('0x7d'));}emitCampaignSummary(_0x4c0ea2);}}function myreject(_0x50b4e3){return function(_0x52ef07){return _0x50b4e3(msgResponse(_0x3e1d('0x7e'),_0x3e1d('0x7f'),JSON['stringify'](_0x52ef07)));};}Dialer[_0x3e1d('0x80')][_0x3e1d('0x81')]=function(_0x3d5e79){return!_[_0x3e1d('0x38')](_0x3d5e79)&&_0x3d5e79&&!_[_0x3e1d('0x38')](_0x3d5e79[_0x3e1d('0x5c')])&&!_['isUndefined'](_0x3d5e79['active'])&&_0x3d5e79[_0x3e1d('0x82')]&&(this[_0x3e1d('0x18')][util[_0x3e1d('0x3d')](_0x3e1d('0x83'),_0x3d5e79[_0x3e1d('0x5c')])][_0x3e1d('0x84')]===_0x3e1d('0x85')||this['trunks'][util['format'](_0x3e1d('0x83'),_0x3d5e79['name'])][_0x3e1d('0x84')]==='unmonitored');};Dialer[_0x3e1d('0x80')][_0x3e1d('0x86')]=function(_0x21c9e9){var _0xf40a7f=this;return function(){if(!_0xf40a7f[_0x3e1d('0x81')](_0x21c9e9[_0x3e1d('0x87')])){if(!_0xf40a7f[_0x3e1d('0x81')](_0x21c9e9[_0x3e1d('0x88')])){_0x21c9e9[_0x3e1d('0x64')]=utils[_0x3e1d('0x65')][_0x3e1d('0x89')];throw _0x21c9e9[_0x3e1d('0x5c')]+'\x20trunk\x20is\x20not\x20reachable';}}};};Dialer['prototype'][_0x3e1d('0x8a')]=function(_0x2b6ce5,_0x53e33e,_0x45ca3b,_0x34d261){var _0x34b4db=this;return function(){var _0x1c46e3=!![];return _0x34b4db[_0x3e1d('0x8b')](_0x2b6ce5,_0x53e33e,_0x45ca3b,_0x34d261,_0x1c46e3);};};Dialer[_0x3e1d('0x80')][_0x3e1d('0x8c')]=function(_0x1f824e,_0x282f25,_0x31b735,_0x3e13db){var _0x43fe5e=this;return function(){var _0x30b650=![];return _0x43fe5e[_0x3e1d('0x8b')](_0x1f824e['Intervals'],_0x282f25,_0x31b735,_0x3e13db,_0x30b650);};};Dialer[_0x3e1d('0x80')]['ifTimeIvr']=function(_0x4edc2b,_0x42d026,_0x254409,_0x5dc634,_0x373456){var _0xccaa93=[];return new Promise(function(_0x4b9062,_0xb3016c){if(!isNotNull(_0x4edc2b)){_0x5dc634[_0x3e1d('0x64')]=utils[_0x3e1d('0x65')][_0x3e1d('0x70')];return _0xb3016c(msgResponse(_0x3e1d('0x8d'),_0x3e1d('0x8e'),_0x254409+_0x3e1d('0x8f')));}if(_['isEmpty'](_0x4edc2b)){_0x5dc634[_0x3e1d('0x64')]=utils[_0x3e1d('0x65')][_0x3e1d('0x90')];return _0xb3016c(msgResponse(_0x3e1d('0x8d'),'Failure',_0x254409+_0x3e1d('0x91')));}if(_0x42d026&&_[_0x3e1d('0x38')](config[_0x3e1d('0x92')][_0x42d026])){_0x5dc634[_0x3e1d('0x64')]=utils[_0x3e1d('0x65')][_0x3e1d('0x93')];return _0xb3016c(msgResponse(_0x3e1d('0x8d'),_0x3e1d('0x8e'),_0x254409+_0x3e1d('0x94')+_0x42d026));}if(_[_0x3e1d('0x95')](_0x4edc2b)){for(var _0x4ecff3=0x0;_0x4ecff3<_0x4edc2b[_0x3e1d('0x96')];_0x4ecff3+=0x1){_0xccaa93[_0x3e1d('0x97')](ami['Action']({'action':_0x3e1d('0x98'),'command':util[_0x3e1d('0x3d')](_0x3e1d('0x99'),_0x4edc2b[_0x4ecff3][_0x3e1d('0x9a')],!_[_0x3e1d('0x38')](config['timezones'][_0x42d026])?_0x42d026:'')})[_0x3e1d('0x9b')](function(_0x4f1c0e){return _0x4f1c0e[_0x3e1d('0x9c')][_0x3e1d('0x9d')]('true')>=0x0;})['catch'](myreject(_0xb3016c)));}}else{_0xccaa93[_0x3e1d('0x97')](ami[_0x3e1d('0x9e')]({'action':_0x3e1d('0x98'),'command':util[_0x3e1d('0x3d')](_0x3e1d('0x99'),_0x4edc2b,!_['isUndefined'](config[_0x3e1d('0x92')][_0x42d026])?_0x42d026:'')})['then'](function(_0x3a2685){return _0x3a2685[_0x3e1d('0x9c')][_0x3e1d('0x9d')]('true')>=0x0;})['catch'](myreject(_0xb3016c)));}Promise[_0x3e1d('0x9f')](_0xccaa93)[_0x3e1d('0x9b')](function(_0x10160e){var _0x4517db=_[_0x3e1d('0xa0')](_0x10160e);if(_0x4517db){return _0x4b9062(_0x4517db);}else{_0x5dc634['message']=_0x373456?utils['CAMPAIGN_STATUS'][_0x3e1d('0xa1')]:utils['CAMPAIGN_STATUS'][_0x3e1d('0xa2')];return _0xb3016c(msgResponse(_0x3e1d('0xa3'),_0x3e1d('0x8e'),_0x3e1d('0xa4')+_0x373456+'\x20'+_0x254409+_0x3e1d('0xa5')+util[_0x3e1d('0x3c')](_0x4edc2b,{'showHidden':![],'depth':null})+'Timezone:\x20'+_0x42d026));}})[_0x3e1d('0xa6')](function(_0x2da611){return _0xb3016c(msgResponse('ifTime',_0x3e1d('0x8e'),JSON[_0x3e1d('0x6e')](_0x2da611)));});});};Dialer[_0x3e1d('0x80')]['loopCampaigns']=function(){var _0x313fab=this;return cmHopper[_0x3e1d('0xa7')]({'active':![]},{'where':{'active':!![]}})['then'](function(){setInterval(function(){_0x313fab[_0x3e1d('0xa8')]();},0x3e8);});};Dialer[_0x3e1d('0x80')][_0x3e1d('0xa8')]=function(){var _0xf0a345=this;var _0x15080b;for(var _0x138c4f in this[_0x3e1d('0xa9')]){if(typeof this[_0x3e1d('0xa9')][_0x138c4f]!=='undefined'){_0x15080b=this[_0x3e1d('0xa9')][_0x138c4f];if(utils[_0x3e1d('0xaa')](_0x15080b)&&utils[_0x3e1d('0x73')](_0x15080b)){_0x15080b[_0x3e1d('0x77')]=!![];Promise[_0x3e1d('0xab')]()['then'](checkIsIVRCampaignActive(_0x15080b))['then'](checkInterval(_0x15080b))[_0x3e1d('0x9b')](_0xf0a345[_0x3e1d('0x86')](_0x15080b))[_0x3e1d('0x9b')](_0xf0a345[_0x3e1d('0x8a')](_0x15080b['dialGlobalInterval'],_0x15080b[_0x3e1d('0xac')],_0x15080b['name'],_0x15080b))[_0x3e1d('0x9b')](_0xf0a345['checkIfTimeIntervals'](_0x15080b['Interval'],_0x15080b[_0x3e1d('0xac')],_0x15080b[_0x3e1d('0x5c')],_0x15080b))['then'](_0xf0a345[_0x3e1d('0xad')](_0x15080b))[_0x3e1d('0xa6')](loggerCatchQueueSummary(_0x3e1d('0xae'),_0x15080b));}else{notSendMessagesCampaign(_0x15080b);}}}};Dialer[_0x3e1d('0x80')][_0x3e1d('0xaf')]=function(_0x4707ba){if(_0x4707ba['dialMethod']!==_0x3e1d('0x5')){clearPredictiveAttributes(_0x4707ba);}switch(_0x4707ba[_0x3e1d('0xb0')]){case _0x3e1d('0xb1'):this[_0x3e1d('0xb2')](_0x4707ba,0x1);break;case'power':this[_0x3e1d('0xb2')](_0x4707ba,_0x4707ba[_0x3e1d('0xb3')]);break;case'predictive':this[_0x3e1d('0x5')](_0x4707ba);break;case _0x3e1d('0xb4'):this['handlePower'](_0x4707ba,0x1);break;default:logger[_0x3e1d('0x5f')](_0x3e1d('0xb5'),_0x4707ba[_0x3e1d('0x5c')],_0x3e1d('0xb6'));}};Dialer[_0x3e1d('0x80')][_0x3e1d('0x8d')]=function(_0x54370d,_0x51fce7){var _0xad2575=_0x54370d[_0x3e1d('0xac')];var _0x529ca7=_0x51fce7?_0x54370d['dialGlobalInterval']:_0x54370d[_0x3e1d('0x6f')][_0x3e1d('0x72')];logger[_0x3e1d('0xb7')]('Dialer::ifTime()',_0x529ca7,_0xad2575,_0x54370d[_0x3e1d('0x5c')],util['format'](_0x3e1d('0xb8'),_0x54370d['name'],_0x54370d['id']));var _0x7de256=null;return Interval[_0x3e1d('0xb9')](_0x529ca7,_0xad2575)['then'](function(_0x228b9f){if(_0x228b9f===!![]){return _0x228b9f;}else{_0x54370d[_0x3e1d('0x64')]=_0x51fce7?utils[_0x3e1d('0x65')][_0x3e1d('0xa1')]:utils[_0x3e1d('0x65')][_0x3e1d('0xa2')];_0x7de256=msgResponse('[ifTime][promiseAll]',_0x3e1d('0x8e'),'Global:\x20'+_0x51fce7+'\x20'+_0x54370d[_0x3e1d('0x5c')]+_0x3e1d('0xa5')+util['inspect'](_0x529ca7,{'showHidden':![],'depth':null})+_0x3e1d('0xba')+_0xad2575);}if(_0x7de256!==null){logger[_0x3e1d('0xb7')]('Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:',_0x7de256);_0x7de256['isGlobal']=_0x51fce7;throw _0x7de256;}})[_0x3e1d('0xa6')](function(_0x2661bf){logger[_0x3e1d('0x5f')](_0x3e1d('0xbb'),_0x2661bf);throw msgResponse(_0x3e1d('0x7e'),_0x3e1d('0x7f'),util[_0x3e1d('0x3c')](_0x2661bf,{'showHidden':![],'depth':null}));});};Dialer['prototype'][_0x3e1d('0xbc')]=function(_0x1f19fe){if(this['voiceQueues'][_0x1f19fe[_0x3e1d('0xbd')]]){if(this[_0x3e1d('0xbe')][_0x1f19fe[_0x3e1d('0xbf')]]&&this[_0x3e1d('0xbe')][_0x1f19fe[_0x3e1d('0xbf')]][_0x3e1d('0xc0')]!=='ivr'){this[_0x3e1d('0xc1')](this[_0x3e1d('0x16')][_0x1f19fe['queue']]);this[_0x3e1d('0xbe')][_0x1f19fe['uniqueid']]['answertime']=moment()['format'](_0x3e1d('0xc2'));}}};Dialer[_0x3e1d('0x80')][_0x3e1d('0x2b')]=function(_0x472094){var _0x2e5c3f=this[_0x3e1d('0xbe')][_0x472094[_0x3e1d('0xbf')]];if(this[_0x3e1d('0x16')][_0x472094[_0x3e1d('0xbd')]]){if(_0x2e5c3f&&_0x2e5c3f['type']!=='ivr'){delete this[_0x3e1d('0xbe')][_0x472094[_0x3e1d('0xbf')]];this[_0x3e1d('0x16')][_0x472094[_0x3e1d('0xbd')]][_0x3e1d('0xc3')]+=0x1;var _0x1f3746=new AgentComplete(_0x2e5c3f,_0x472094);if(_0x472094['reason']==='agent'){_0x1f3746[_0x3e1d('0xc4')]=this['voiceQueues'][_0x472094[_0x3e1d('0xbd')]][_0x3e1d('0xc5')]&&this[_0x3e1d('0x16')][_0x472094[_0x3e1d('0xbd')]][_0x3e1d('0xc6')]?moment()[_0x3e1d('0x3d')](_0x3e1d('0xc2')):undefined;}hopperUtils[_0x3e1d('0xc7')](_0x1f3746)[_0x3e1d('0xa6')](loggerCatch('[syncAgentComplete][createHistory]'));hopperUtils[_0x3e1d('0xc8')](_0x1f3746)[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0xc9')));}}};Dialer['prototype'][_0x3e1d('0x27')]=function(_0x87d050){var _0x56286b=this[_0x3e1d('0xbe')][_0x87d050[_0x3e1d('0xbf')]];var _0x2b7138=this;var _0x32eadb=![];var _0x309e24;var _0x11e878;if(this[_0x3e1d('0x16')][_0x87d050['queue']]){if(_0x56286b&&_0x56286b['type']!==_0x3e1d('0xca')){delete this['uniqueId'][_0x87d050[_0x3e1d('0xbf')]];this[_0x3e1d('0xc1')](this[_0x3e1d('0x16')][_0x87d050[_0x3e1d('0xbd')]]);_0x56286b['droptime']=moment()[_0x3e1d('0x3d')](_0x3e1d('0xc2'));var _0x3863e7=new QueueCallerAbandon(_0x56286b,_0x87d050);if(utils['getSeconds'](_0x56286b[_0x3e1d('0xcb')],_0x56286b['responsetime'])>=_0x56286b['dialQueueTimeout']){this['voiceQueues'][_0x87d050['queue']][_0x3e1d('0x47')]+=0x1;this[_0x3e1d('0x16')][_0x87d050[_0x3e1d('0xbd')]][_0x3e1d('0xcc')]+=0x1;this[_0x3e1d('0x16')][_0x87d050[_0x3e1d('0xbd')]][_0x3e1d('0xcd')]+=0x1;_0x3863e7[_0x3e1d('0xce')]=0xa;_0x3863e7[_0x3e1d('0x6a')]='Drop';_0x3863e7[_0x3e1d('0xcf')]=_0x3e1d('0xd0');_0x3863e7[_0x3e1d('0xc4')]=this[_0x3e1d('0x16')][_0x87d050[_0x3e1d('0xbd')]][_0x3e1d('0xc5')]?moment()['format']('YYYY-MM-DD\x20HH:mm:ss'):undefined;_0x3863e7[_0x3e1d('0xd1')]+=0x1;_0x3863e7['countglobal']+=0x1;_0x309e24=this[_0x3e1d('0x16')][_0x87d050[_0x3e1d('0xbd')]][_0x3e1d('0xd2')];_0x11e878=this[_0x3e1d('0x16')][_0x87d050['queue']]['callAdditionalPhoneAfterMin'];hopperUtils[_0x3e1d('0xd3')](_0x3863e7,_0x3863e7[_0x3e1d('0xce')],_0x56286b['voiceQueue'])['then'](function(_0x211758){_0x32eadb=_0x211758[_0x3e1d('0xd4')]==0x1;if(_0x3863e7[_0x3e1d('0xd1')]>=_0x2b7138[_0x3e1d('0x16')][_0x87d050[_0x3e1d('0xbd')]][_0x3e1d('0xd5')]){_0x2b7138['queueCallerAbandonCreateState'](_0x3863e7,_0x211758['additional']);}else{hopperUtils[_0x3e1d('0xd6')]({'active':![],'countdropretry':_0x3863e7['countdropretry'],'scheduledat':moment()[_0x3e1d('0xd7')](_0x2b7138[_0x3e1d('0x16')][_0x87d050['queue']]['dialDropRetryFrequency'],_0x3e1d('0xd8'))[_0x3e1d('0x3d')](_0x3e1d('0xc2')),'ContactId':_0x56286b[_0x3e1d('0xd9')],'ListId':_0x56286b[_0x3e1d('0xda')],'VoiceQueueId':_0x56286b['VoiceQueueId']||undefined,'CampaignId':_0x56286b[_0x3e1d('0xdb')]||undefined})[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0xdc')));var _0x3e1303=new History(_0x3863e7);_0x3e1303[_0x3e1d('0xce')]=0xa;_0x3e1303[_0x3e1d('0x6a')]=_0x3e1d('0xdd');_0x3e1303[_0x3e1d('0xde')]=moment()[_0x3e1d('0x3d')]('YYYY-MM-DD\x20HH:mm:ss');_0x3e1303[_0x3e1d('0xdf')]=_0x3e1303[_0x3e1d('0xde')];_0x3e1303[_0x3e1d('0xe0')]=_0x3863e7['calleridname'];_0x3e1303[_0x3e1d('0xe1')]=_0x3863e7['calleridnum'];hopperUtils[_0x3e1d('0xc7')](_0x3e1303)[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0xe2')));}})[_0x3e1d('0x9b')](function(){if(_0x32eadb)hopperUtils['swapAdditionalPhones'](_0x3863e7,_0x309e24,_0x11e878)[_0x3e1d('0x9b')](function(){return 0x1;});});}else{this['voiceQueues'][_0x87d050[_0x3e1d('0xbd')]][_0x3e1d('0x49')]+=0x1;this[_0x3e1d('0x16')][_0x87d050[_0x3e1d('0xbd')]]['outboundDropCallsDayCallersExit']+=0x1;_0x3863e7['state']=0xb;_0x3863e7[_0x3e1d('0x6a')]='Abandoned';_0x3863e7[_0x3e1d('0xcf')]='CALLEREXIT';_0x3863e7[_0x3e1d('0xe3')]+=0x1;_0x3863e7[_0x3e1d('0xe4')]+=0x1;_0x309e24=this[_0x3e1d('0x16')][_0x87d050[_0x3e1d('0xbd')]]['dialAbandonedRetryFrequency'];_0x11e878=this[_0x3e1d('0x16')][_0x87d050['queue']]['callAdditionalPhoneAfterMin'];hopperUtils['verifyAdditionalPhones'](_0x3863e7,_0x3863e7[_0x3e1d('0xce')],_0x56286b[_0x3e1d('0xe5')])['then'](function(_0x376652){if(_0x3863e7[_0x3e1d('0xe3')]>=_0x2b7138['voiceQueues'][_0x87d050[_0x3e1d('0xbd')]]['dialAbandonedMaxRetry']){_0x2b7138['queueCallerAbandonCreateState'](_0x3863e7,_0x376652[_0x3e1d('0xd4')]);}else{hopperUtils['rescheduleContact']({'active':![],'countabandonedretry':_0x3863e7[_0x3e1d('0xe3')],'scheduledat':moment()[_0x3e1d('0xd7')](_0x2b7138[_0x3e1d('0x16')][_0x87d050[_0x3e1d('0xbd')]][_0x3e1d('0xe6')],'minutes')[_0x3e1d('0x3d')](_0x3e1d('0xc2')),'ContactId':_0x56286b[_0x3e1d('0xd9')],'ListId':_0x56286b[_0x3e1d('0xda')],'VoiceQueueId':_0x56286b[_0x3e1d('0xe7')]||undefined,'CampaignId':_0x56286b['CampaignId']||undefined})[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0xe8')));var _0x32a265=new History(_0x3863e7);_0x32a265[_0x3e1d('0xce')]=0xb;_0x32a265['statedesc']='Abandoned';_0x32a265[_0x3e1d('0xde')]=moment()[_0x3e1d('0x3d')](_0x3e1d('0xc2'));_0x32a265[_0x3e1d('0xdf')]=_0x32a265['starttime'];_0x32a265[_0x3e1d('0xe0')]=_0x3863e7[_0x3e1d('0xe0')];_0x32a265[_0x3e1d('0xe1')]=_0x3863e7['calleridnum'];hopperUtils[_0x3e1d('0xc7')](_0x32a265)['catch'](loggerCatch(_0x3e1d('0xe9')));}})[_0x3e1d('0x9b')](function(){if(_0x32eadb)hopperUtils[_0x3e1d('0xea')](_0x3863e7,_0x309e24,_0x11e878)[_0x3e1d('0x9b')](function(){return 0x1;});});}}}};Dialer[_0x3e1d('0x80')]['syncNewExten']=function(_0x1a75ce){if(this[_0x3e1d('0x1b')][_0x1a75ce[_0x3e1d('0xbf')]]){this[_0x3e1d('0x1b')][_0x1a75ce[_0x3e1d('0xbf')]][_0x3e1d('0xeb')]=_0x1a75ce['channel'];}if(this[_0x3e1d('0xbe')][_0x1a75ce[_0x3e1d('0xbf')]]){this[_0x3e1d('0xbe')][_0x1a75ce[_0x3e1d('0xbf')]][_0x3e1d('0xeb')]=_0x1a75ce[_0x3e1d('0xeb')];}};Dialer[_0x3e1d('0x80')][_0x3e1d('0x32')]=function(_0x26766a){if(!this[_0x3e1d('0x1b')][_0x26766a['actionid']]){return;}var _0x284fdf=this[_0x3e1d('0x16')][this[_0x3e1d('0x1b')][_0x26766a[_0x3e1d('0xec')]][_0x3e1d('0xbd')]][_0x3e1d('0xed')]||_0x3e1d('0xee');if(_0x284fdf==='roundrobin'){if(this['actions'][_0x26766a[_0x3e1d('0xec')]]&&_[_0x3e1d('0xef')](this[_0x3e1d('0x1b')][_0x26766a[_0x3e1d('0xec')]][_0x3e1d('0xf0')])&&_0x26766a['status']==='1'&&_0x26766a[_0x3e1d('0xf1')]==='0'){if(this['agents'][_0x26766a['stateinterface']]){if(!this[_0x3e1d('0x17')][_0x26766a['stateinterface']][_0x3e1d('0xf0')]){this[_0x3e1d('0x17')][_0x26766a['stateinterface']][_0x3e1d('0xf0')]=!![];this[_0x3e1d('0x1b')][_0x26766a['actionid']][_0x3e1d('0xf0')]=!![];this[_0x3e1d('0x1b')][_0x26766a[_0x3e1d('0xec')]][_0x3e1d('0xf2')]=_0x26766a[_0x3e1d('0xf2')];}}}}else if(_0x284fdf===_0x3e1d('0xee')){if(this['actions'][_0x26766a[_0x3e1d('0xec')]]){if(this[_0x3e1d('0x17')][_0x26766a[_0x3e1d('0xf2')]]){this['actions'][_0x26766a['actionid']]['stateinterface']=_0x26766a['stateinterface'];if(_['isNil'](this['queueBooked'][this[_0x3e1d('0x1b')][_0x26766a[_0x3e1d('0xec')]][_0x3e1d('0xbd')]])){this[_0x3e1d('0x21')][this[_0x3e1d('0x1b')][_0x26766a[_0x3e1d('0xec')]][_0x3e1d('0xbd')]]=[];}this['queueBooked'][this['actions'][_0x26766a[_0x3e1d('0xec')]]['queue']][_0x3e1d('0x97')](_[_0x3e1d('0x59')](_[_0x3e1d('0xf3')](this[_0x3e1d('0x1b')][_0x26766a[_0x3e1d('0xec')]],[_0x3e1d('0xf4'),_0x3e1d('0xf2')]),{'status':_0x26766a[_0x3e1d('0x84')],'paused':_0x26766a['paused']}));}}}};Dialer[_0x3e1d('0x80')][_0x3e1d('0x34')]=function(_0x2068ab){if(!this[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]]){return;}var _0x22d434=this;var _0x2e5c86=this['voiceQueues'][this['actions'][_0x2068ab['actionid']][_0x3e1d('0xbd')]];var _0x411473=_0x2e5c86['strategy']||_0x3e1d('0xee');if(_0x411473===_0x3e1d('0xf5')){if(this['actions'][_0x2068ab['actionid']]&&this[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]][_0x3e1d('0xf2')]){this['preview'][_0x3e1d('0xf6')](this[_0x3e1d('0x1b')][_0x2068ab['actionid']][_0x3e1d('0xf4')],this['actions'][_0x2068ab[_0x3e1d('0xec')]][_0x3e1d('0xf2')])[_0x3e1d('0xa6')](function(_0xf51727){logger[_0x3e1d('0x5f')](_0x3e1d('0xf7'),util['inspect'](_0xf51727,{'showHidden':![],'depth':null}));})[_0x3e1d('0x13')](function(){_0x22d434[_0x3e1d('0xc1')](_0x22d434[_0x3e1d('0x16')][_0x22d434[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]][_0x3e1d('0xbd')]]);_0x22d434['agents'][_0x22d434[_0x3e1d('0x1b')][_0x2068ab['actionid']]['stateinterface']]['locked']=![];delete _0x22d434[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]];unlockQueueStatus(_0x2e5c86);});}else{this['updateOriginated'](this[_0x3e1d('0x16')][this[_0x3e1d('0x1b')][_0x2068ab['actionid']][_0x3e1d('0xbd')]]);hopperUtils[_0x3e1d('0xd6')]({'active':![],'ContactId':this[_0x3e1d('0x1b')][_0x2068ab['actionid']][_0x3e1d('0xd9')],'ListId':this['actions'][_0x2068ab['actionid']][_0x3e1d('0xda')],'VoiceQueueId':this[_0x3e1d('0x1b')][_0x2068ab['actionid']][_0x3e1d('0xe7')]||undefined,'CampaignId':this[_0x3e1d('0x1b')][_0x2068ab['actionid']]['CampaignId']||undefined})[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0xf8')));delete this[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]];unlockQueueStatus(_0x2e5c86);}}else if(_0x411473===_0x3e1d('0xee')){var _0x492dda;if(this[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]]&&!_[_0x3e1d('0x3f')](this[_0x3e1d('0x21')][this[_0x3e1d('0x1b')][_0x2068ab['actionid']][_0x3e1d('0xbd')]])){if(this[_0x3e1d('0x22')][_0x22d434[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]][_0x3e1d('0xbd')]]){this[_0x3e1d('0x22')][_0x22d434[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]][_0x3e1d('0xbd')]]=this['queueBookedRR'][this[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]]['queue']]?this[_0x3e1d('0x22')][this[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]][_0x3e1d('0xbd')]]:this[_0x3e1d('0x21')][this[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]][_0x3e1d('0xbd')]]?this['queueBooked'][this[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]][_0x3e1d('0xbd')]][_0x3e1d('0xf9')]||0x0:0x0;}this[_0x3e1d('0x21')][this[_0x3e1d('0x1b')][_0x2068ab['actionid']][_0x3e1d('0xbd')]][_0x3e1d('0xf9')]=this[_0x3e1d('0x22')][this[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]]['queue']];for(var _0x33915e=0x0;_0x33915e<this['queueBooked'][this[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]][_0x3e1d('0xbd')]][_0x3e1d('0x96')];_0x33915e+=0x1){_0x492dda=rr(this[_0x3e1d('0x21')][this[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]][_0x3e1d('0xbd')]]);this[_0x3e1d('0x22')][_0x22d434[_0x3e1d('0x1b')][_0x2068ab['actionid']][_0x3e1d('0xbd')]]=this[_0x3e1d('0x21')][this['actions'][_0x2068ab['actionid']][_0x3e1d('0xbd')]][_0x3e1d('0xf9')];if(_0x492dda[_0x3e1d('0x84')]==='1'&&_0x492dda['paused']==='0'){break;}}if(!_[_0x3e1d('0xef')](_0x492dda)){this[_0x3e1d('0x17')][_0x492dda[_0x3e1d('0xf2')]]['unlockRR']=_[_0x3e1d('0x38')](this[_0x3e1d('0x17')][_0x492dda[_0x3e1d('0xf2')]][_0x3e1d('0xfa')])?!![]:this['agents'][_0x492dda[_0x3e1d('0xf2')]][_0x3e1d('0xfa')];}loggerBooked[_0x3e1d('0x40')](_0x3e1d('0xfb'),_0x2068ab['actionid'],'Agent:\x20',JSON['stringify'](_[_0x3e1d('0xf3')](this['agents'][_0x492dda[_0x3e1d('0xf2')]],[_0x3e1d('0x5c'),'unlockRR'])),_0x3e1d('0xfc'),JSON[_0x3e1d('0x6e')](_0x492dda[_0x3e1d('0xf4')]));if(!_[_0x3e1d('0xef')](_0x492dda)&&_0x492dda['status']==='1'&&_0x492dda[_0x3e1d('0xf1')]==='0'&&this[_0x3e1d('0x17')][_0x492dda[_0x3e1d('0xf2')]][_0x3e1d('0xfa')]){this[_0x3e1d('0x17')][_0x492dda[_0x3e1d('0xf2')]]['unlockRR']=![];this[_0x3e1d('0x21')][_0x22d434['actions'][_0x2068ab[_0x3e1d('0xec')]][_0x3e1d('0xbd')]]=[];this[_0x3e1d('0x15')][_0x3e1d('0xf6')](_0x492dda[_0x3e1d('0xf4')],_0x492dda['stateinterface'])[_0x3e1d('0xa6')](function(_0xa425c6){logger[_0x3e1d('0x5f')](_0x3e1d('0xf7'),util[_0x3e1d('0x3c')](_0xa425c6,{'showHidden':![],'depth':null}));})[_0x3e1d('0x13')](function(){_0x22d434[_0x3e1d('0xc1')](_0x22d434[_0x3e1d('0x16')][_0x22d434['actions'][_0x2068ab[_0x3e1d('0xec')]][_0x3e1d('0xbd')]]);setTimeout(function(){_0x22d434[_0x3e1d('0x17')][_0x492dda[_0x3e1d('0xf2')]]['unlockRR']=!![];loggerBooked[_0x3e1d('0x40')](_0x3e1d('0xfd'),_0x2068ab[_0x3e1d('0xec')],_0x3e1d('0xfe'),JSON[_0x3e1d('0x6e')](_[_0x3e1d('0xf3')](_0x22d434['agents'][_0x492dda['stateinterface']],[_0x3e1d('0x5c'),_0x3e1d('0xfa')])),'contactAgent-idHopper:\x20',JSON[_0x3e1d('0x6e')](_0x492dda[_0x3e1d('0xf4')]));},0xc7);delete _0x22d434[_0x3e1d('0x1b')][_0x2068ab['actionid']];unlockQueueStatus(_0x2e5c86,_0x2068ab[_0x3e1d('0xec')]);});}else{loggerBooked[_0x3e1d('0x40')](_0x3e1d('0xff'));this['updateOriginated'](this[_0x3e1d('0x16')][this['actions'][_0x2068ab[_0x3e1d('0xec')]]['queue']]);hopperUtils['rescheduleContact']({'active':![],'ContactId':this[_0x3e1d('0x1b')][_0x2068ab['actionid']][_0x3e1d('0xd9')],'ListId':this['actions'][_0x2068ab['actionid']][_0x3e1d('0xda')],'VoiceQueueId':this['actions'][_0x2068ab['actionid']]['VoiceQueueId']||undefined,'CampaignId':this[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]][_0x3e1d('0xdb')]||undefined})[_0x3e1d('0xa6')](loggerCatch('[unlock][syncQueueStatusComplete]'));delete this[_0x3e1d('0x1b')][_0x2068ab['actionid']];unlockQueueStatus(_0x2e5c86);}}else{loggerBooked[_0x3e1d('0x40')](_0x3e1d('0x100'));this[_0x3e1d('0xc1')](this['voiceQueues'][this[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]]['queue']]);hopperUtils[_0x3e1d('0xd6')]({'active':![],'ContactId':this['actions'][_0x2068ab[_0x3e1d('0xec')]]['ContactId'],'ListId':this['actions'][_0x2068ab[_0x3e1d('0xec')]]['ListId'],'VoiceQueueId':this[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]]['VoiceQueueId']||undefined,'CampaignId':this['actions'][_0x2068ab['actionid']][_0x3e1d('0xdb')]||undefined})[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x101')));delete this[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]];unlockQueueStatus(_0x2e5c86);}}else{loggerBooked['info']('[booked][unlock3]');this[_0x3e1d('0xc1')](this[_0x3e1d('0x16')][this[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]]['queue']]);hopperUtils[_0x3e1d('0xd6')]({'active':![],'ContactId':this['actions'][_0x2068ab[_0x3e1d('0xec')]]['ContactId'],'ListId':this[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]][_0x3e1d('0xda')],'VoiceQueueId':this[_0x3e1d('0x1b')][_0x2068ab['actionid']][_0x3e1d('0xe7')]||undefined,'CampaignId':this[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]][_0x3e1d('0xdb')]||undefined})[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x102')));delete this[_0x3e1d('0x1b')][_0x2068ab[_0x3e1d('0xec')]];unlockQueueStatus(_0x2e5c86);}};Dialer['prototype'][_0x3e1d('0x29')]=function(_0x317f6b){var _0x1d6177=this[_0x3e1d('0x1b')][_0x317f6b[_0x3e1d('0xec')]];if(_0x1d6177){delete this['actions'][_0x317f6b[_0x3e1d('0xec')]];_0x1d6177[_0x3e1d('0x103')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');var _0x13d8c0=_0x1d6177[_0x3e1d('0xc0')]===_0x3e1d('0xca')?this[_0x3e1d('0xa9')][_0x1d6177[_0x3e1d('0xbd')]]:this[_0x3e1d('0x16')][_0x1d6177[_0x3e1d('0x104')]()];if(_0x317f6b[_0x3e1d('0x105')]!==_0x3e1d('0x106')){this[_0x3e1d('0xc1')](_0x13d8c0);return this[_0x3e1d('0x107')](_0x1d6177,_0x13d8c0,_0x317f6b)[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x108')));}this['uniqueId'][_0x317f6b[_0x3e1d('0xbf')]]=_0x1d6177;}};Dialer[_0x3e1d('0x80')]['syncVarSet']=function(_0x4e5458){var _0x354fd6=this;var _0x4ffe01=this['uniqueId'][_0x4e5458[_0x3e1d('0xbf')]];var _0x507078;if(!_[_0x3e1d('0xef')](_0x4e5458)&&!_['isNil'](_0x4e5458[_0x3e1d('0x109')])&&!_['isNil'](_0x4e5458['variable'][_0x3e1d('0x10a')])&&_0x4e5458[_0x3e1d('0x10b')]==='xcally-motion-dialer'&&_0x4ffe01){if(_0x4ffe01[_0x3e1d('0xc0')]!==_0x3e1d('0xca')&&this['voiceQueues'][_0x4ffe01['queue']][_0x3e1d('0x10c')]&&_0x4e5458['value']===_0x3e1d('0x10d')){delete this[_0x3e1d('0xbe')][_0x4e5458[_0x3e1d('0xbf')]];this[_0x3e1d('0xc1')](this['voiceQueues'][_0x4ffe01[_0x3e1d('0xbd')]]);this[_0x3e1d('0x16')][_0x4ffe01[_0x3e1d('0xbd')]][_0x3e1d('0xc3')]+=0x1;this[_0x3e1d('0x16')][_0x4ffe01[_0x3e1d('0xbd')]][_0x3e1d('0x10e')]+=0x1;_0x507078=new Hangup(_0x4ffe01,_0x4e5458);_0x507078[_0x3e1d('0xce')]=0x12;_0x507078[_0x3e1d('0x6a')]=_0x3e1d('0x10f');_0x507078['membername']=_0x3e1d('0x110');ami[_0x3e1d('0x39')](_0x3e1d('0x111'),ut[_0x3e1d('0x112')](_0x507078,_0x3e1d('0x113')));this[_0x3e1d('0x114')](_0x507078,_0x3e1d('0x115'),_0x3e1d('0x116'));}if(_0x4ffe01[_0x3e1d('0xc0')]!==_0x3e1d('0xca')&&this[_0x3e1d('0x16')][_0x4ffe01[_0x3e1d('0xbd')]][_0x3e1d('0x10c')]&&_0x4e5458[_0x3e1d('0x117')]==='MACHINE'){return new Promise(function(_0x32ea7a,_0x20c599){delete _0x354fd6[_0x3e1d('0xbe')][_0x4e5458['uniqueid']];_0x354fd6[_0x3e1d('0xc1')](_0x354fd6[_0x3e1d('0x16')][_0x4ffe01[_0x3e1d('0xbd')]]);_0x354fd6[_0x3e1d('0x16')][_0x4ffe01[_0x3e1d('0xbd')]][_0x3e1d('0xc3')]+=0x1;_0x354fd6[_0x3e1d('0x16')][_0x4ffe01['queue']][_0x3e1d('0x10e')]+=0x1;var _0x589afe=_0x354fd6[_0x3e1d('0x16')][_0x4ffe01[_0x3e1d('0xbd')]];var _0x57cd6c=new Hangup(_0x4ffe01,_0x4e5458);_0x57cd6c[_0x3e1d('0xce')]=0x13;_0x57cd6c[_0x3e1d('0x6a')]='Machine';_0x57cd6c['membername']=_0x3e1d('0x110');_0x57cd6c['countmachineretry']+=0x1;_0x57cd6c['countglobal']+=0x1;_0x57cd6c[_0x3e1d('0x113')]=!![];ami['emit'](_0x3e1d('0x111'),ut[_0x3e1d('0x112')](_0x57cd6c,_0x3e1d('0x113')));hopperUtils[_0x3e1d('0xc7')](_0x57cd6c)[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x118')));if(_0x57cd6c[_0x3e1d('0x119')]+_0x57cd6c[_0x3e1d('0x11a')]+_0x57cd6c['countnoanswerretry']+_0x57cd6c['countnosuchnumberretry']+_0x57cd6c[_0x3e1d('0xd1')]+_0x57cd6c[_0x3e1d('0xe3')]+_0x57cd6c['countmachineretry']+_0x57cd6c[_0x3e1d('0x11b')]>=_0x589afe[_0x3e1d('0x11c')]){_0x354fd6[_0x3e1d('0x11d')](_0x57cd6c,_0x32ea7a,_0x20c599,_0x3e1d('0x11e'));}else{if(_0x57cd6c[_0x3e1d('0x11f')]>=_0x589afe['dialMachineMaxRetry']){_0x354fd6[_0x3e1d('0x120')](_0x57cd6c,_0x32ea7a,_0x20c599,'reason\x2019\x20machine....');}else{hopperUtils[_0x3e1d('0xd6')]({'active':![],'countmachineretry':_0x57cd6c[_0x3e1d('0x11f')],'scheduledat':moment()[_0x3e1d('0xd7')](_0x589afe[_0x3e1d('0x121')],_0x3e1d('0xd8'))[_0x3e1d('0x3d')](_0x3e1d('0xc2')),'ContactId':_0x57cd6c['ContactId'],'ListId':_0x57cd6c[_0x3e1d('0xda')],'VoiceQueueId':_0x57cd6c[_0x3e1d('0xe7')]||undefined,'CampaignId':_0x57cd6c[_0x3e1d('0xdb')]||undefined})[_0x3e1d('0xa6')](loggerCatch('[rescheduleContact][Machine]'));_0x32ea7a({'reschedule':0x1});}}});}if(_0x4ffe01[_0x3e1d('0xc0')]===_0x3e1d('0xca')&&this[_0x3e1d('0xa9')][_0x4ffe01[_0x3e1d('0xbd')]][_0x3e1d('0x10c')]&&_0x4e5458[_0x3e1d('0x117')]==='HANGUP'){delete this[_0x3e1d('0xbe')][_0x4e5458[_0x3e1d('0xbf')]];this[_0x3e1d('0xc1')](this[_0x3e1d('0xa9')][_0x4ffe01[_0x3e1d('0xbd')]]);_0x507078=new Hangup(_0x4ffe01,_0x4e5458);_0x507078[_0x3e1d('0xce')]=0x12;_0x507078['statedesc']=_0x3e1d('0x10f');_0x507078['membername']=_0x3e1d('0x110');ami[_0x3e1d('0x39')](_0x3e1d('0x111'),ut['buildObj'](_0x507078,_0x3e1d('0x113')));this['saveInDb'](_0x507078,'[syncHangupInAMDIvr][createHistory]',_0x3e1d('0x122'));}if(_0x4ffe01[_0x3e1d('0xc0')]==='ivr'&&this[_0x3e1d('0xa9')][_0x4ffe01[_0x3e1d('0xbd')]]['dialAMDActive']&&_0x4e5458[_0x3e1d('0x117')]==='MACHINE'){return new Promise(function(_0x3a4080,_0x294b4d){delete _0x354fd6[_0x3e1d('0xbe')][_0x4e5458[_0x3e1d('0xbf')]];_0x354fd6[_0x3e1d('0xc1')](_0x354fd6['campaigns'][_0x4ffe01['queue']]);_0x354fd6[_0x3e1d('0xa9')][_0x4ffe01[_0x3e1d('0xbd')]][_0x3e1d('0xc3')]+=0x1;_0x354fd6[_0x3e1d('0xa9')][_0x4ffe01[_0x3e1d('0xbd')]]['outboundAnswerAgiCallsDay']+=0x1;var _0x19069a=_0x354fd6[_0x3e1d('0xa9')][_0x4ffe01[_0x3e1d('0xbd')]];var _0x2fa1d1=new Hangup(_0x4ffe01,_0x4e5458);_0x2fa1d1[_0x3e1d('0xce')]=0x13;_0x2fa1d1[_0x3e1d('0x6a')]=_0x3e1d('0x123');_0x2fa1d1[_0x3e1d('0x124')]=_0x3e1d('0x110');_0x2fa1d1['countmachineretry']+=0x1;_0x2fa1d1[_0x3e1d('0xe4')]+=0x1;_0x2fa1d1[_0x3e1d('0x113')]=!![];ami[_0x3e1d('0x39')](_0x3e1d('0x111'),ut[_0x3e1d('0x112')](_0x2fa1d1,_0x3e1d('0x113')));hopperUtils[_0x3e1d('0xc7')](_0x2fa1d1)[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x118')));if(_0x2fa1d1['countbusyretry']+_0x2fa1d1[_0x3e1d('0x11a')]+_0x2fa1d1['countnoanswerretry']+_0x2fa1d1['countnosuchnumberretry']+_0x2fa1d1['countdropretry']+_0x2fa1d1[_0x3e1d('0xe3')]+_0x2fa1d1[_0x3e1d('0x11f')]+_0x2fa1d1[_0x3e1d('0x11b')]>=_0x19069a[_0x3e1d('0x11c')]){_0x354fd6['stateGlobal'](_0x2fa1d1,_0x3a4080,_0x294b4d,_0x3e1d('0x11e'));}else{if(_0x2fa1d1[_0x3e1d('0x11f')]>=_0x19069a['dialMachineMaxRetry']){_0x354fd6['createStateFinal'](_0x2fa1d1,_0x3a4080,_0x294b4d,_0x3e1d('0x125'));}else{hopperUtils['rescheduleContact']({'active':![],'countmachineretry':_0x2fa1d1[_0x3e1d('0x11f')],'scheduledat':moment()[_0x3e1d('0xd7')](_0x19069a[_0x3e1d('0x121')],_0x3e1d('0xd8'))['format'](_0x3e1d('0xc2')),'ContactId':_0x2fa1d1[_0x3e1d('0xd9')],'ListId':_0x2fa1d1['ListId'],'VoiceQueueId':_0x2fa1d1[_0x3e1d('0xe7')]||undefined,'CampaignId':_0x2fa1d1[_0x3e1d('0xdb')]||undefined})['catch'](loggerCatch('[rescheduleContact][Machine]'));_0x3a4080({'reschedule':0x1});}}});}}};Dialer[_0x3e1d('0x80')][_0x3e1d('0x2f')]=function(_0x63e443){var _0xd8db0e=this[_0x3e1d('0xbe')][_0x63e443[_0x3e1d('0xbf')]];var _0x306124;if(_0xd8db0e&&_0xd8db0e[_0x3e1d('0xc0')]===_0x3e1d('0xca')){delete this[_0x3e1d('0xbe')][_0x63e443[_0x3e1d('0xbf')]];this[_0x3e1d('0xc1')](this[_0x3e1d('0xa9')][_0xd8db0e[_0x3e1d('0xbd')]]);this['campaigns'][_0xd8db0e[_0x3e1d('0xbd')]][_0x3e1d('0x126')]+=0x1;_0x306124=new Hangup(_0xd8db0e,_0x63e443);hopperUtils['createHistory'](_0x306124)[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x127')));hopperUtils[_0x3e1d('0xc8')](_0x306124)['catch'](loggerCatch(_0x3e1d('0x128')));}if(_0xd8db0e&&_0xd8db0e['type']!==_0x3e1d('0xca')&&isNotNull(this[_0x3e1d('0x16')][_0xd8db0e[_0x3e1d('0xbd')]]['dialQueueProject'])){delete this['uniqueId'][_0x63e443[_0x3e1d('0xbf')]];this[_0x3e1d('0xc1')](this[_0x3e1d('0x16')][_0xd8db0e['queue']]);this['voiceQueues'][_0xd8db0e['queue']][_0x3e1d('0xc3')]+=0x1;this[_0x3e1d('0x16')][_0xd8db0e['queue']][_0x3e1d('0x10e')]+=0x1;_0x306124=new Hangup(_0xd8db0e,_0x63e443);_0x306124['state']=0x10;_0x306124[_0x3e1d('0x6a')]=_0x3e1d('0x129');_0x306124['membername']='AGI';hopperUtils[_0x3e1d('0xc7')](_0x306124)[_0x3e1d('0xa6')](loggerCatch('[syncHangupIvr][createHistory]'));hopperUtils[_0x3e1d('0xc8')](_0x306124)[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x128')));}if(_0xd8db0e&&_0xd8db0e[_0x3e1d('0xc0')]!==_0x3e1d('0xca')&&!isNotNull(this[_0x3e1d('0x16')][_0xd8db0e[_0x3e1d('0xbd')]]['dialQueueProject'])){delete this[_0x3e1d('0xbe')][_0x63e443[_0x3e1d('0xbf')]];this[_0x3e1d('0xc1')](this[_0x3e1d('0x16')][_0xd8db0e[_0x3e1d('0xbd')]]);this['voiceQueues'][_0xd8db0e[_0x3e1d('0xbd')]][_0x3e1d('0x12a')]+=0x1;_0x306124=new Hangup(_0xd8db0e,_0x63e443);_0x306124['state']=0xc;_0x306124[_0x3e1d('0x6a')]=_0x63e443[_0x3e1d('0x12b')];_0x306124[_0x3e1d('0x124')]=_0x3e1d('0x12c');hopperUtils[_0x3e1d('0xc7')](_0x306124)[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x127')));hopperUtils[_0x3e1d('0xc8')](_0x306124)[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x128')));}};Dialer['prototype'][_0x3e1d('0x7')]=function(_0x30f20f){var _0x2938ab=this;if(!_0x2938ab[_0x3e1d('0x23')][_0x30f20f['name']]){_0x2938ab[_0x3e1d('0x23')][_0x30f20f[_0x3e1d('0x5c')]]={'running':![]};}else if(_0x2938ab[_0x3e1d('0x23')][_0x30f20f[_0x3e1d('0x5c')]]['running']===!![]){return;}else if(_0x2938ab['queuesSummary'][_0x30f20f['name']][_0x3e1d('0x12d')]===![]){_0x2938ab[_0x3e1d('0x23')][_0x30f20f[_0x3e1d('0x5c')]][_0x3e1d('0x12d')]=!![];}var _0x16003d=_0x2938ab['voiceQueues'][_0x30f20f[_0x3e1d('0x5c')]];var _0x54034b=_0x16003d[_0x3e1d('0x64')]!==utils['CAMPAIGN_STATUS']['INACTIVE'];var _0x5441e0=utils[_0x3e1d('0x12e')](_0x16003d);_0x16003d[_0x3e1d('0x12f')]=utils[_0x3e1d('0x130')](_0x16003d,_0x2938ab[_0x3e1d('0x18')]);Promise[_0x3e1d('0xab')]()[_0x3e1d('0x9b')](function(){if(_0x16003d['statusMessage']===utils[_0x3e1d('0x65')][_0x3e1d('0x79')]){if(_0x54034b){clearPredictiveAttributes(_0x16003d);_0x30f20f[_0x3e1d('0x1e')]=undefined;_0x30f20f[_0x3e1d('0x1f')]=undefined;}if(_0x16003d[_0x3e1d('0x12f')]===utils['CAMPAIGN_STATUS']['INACTIVE']){_0x30f20f[_0x3e1d('0x131')]=0x0;_0x30f20f[_0x3e1d('0xf1')]=0x0;_0x30f20f[_0x3e1d('0x132')]=0x0;_0x30f20f[_0x3e1d('0x133')]=0x0;_0x30f20f['pTalking']=0x0;}}else if(_0x16003d[_0x3e1d('0x12f')]===utils[_0x3e1d('0x65')][_0x3e1d('0x134')]&&!_0x5441e0){return _0x2938ab[_0x3e1d('0x8d')](_0x16003d,!![])['then'](function(){return _0x2938ab[_0x3e1d('0x8d')](_0x16003d,![]);})['then'](function(){return _0x2938ab[_0x3e1d('0xaf')](_0x16003d);})[_0x3e1d('0xa6')](function(_0x1ded6d){loggerSyncQueueSummary[_0x3e1d('0x3a')](_0x3e1d('0x135'),util[_0x3e1d('0x3c')](_0x1ded6d,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x16003d);});}else{clearPredictiveAttributes(_0x16003d);}})[_0x3e1d('0x9b')](function(){var _0x1173bf=_0x30f20f[_0x3e1d('0x136')](_0x16003d);if(_0x1173bf||_0x16003d[_0x3e1d('0x137')]){_0x16003d['queueSummaryCountersUpdated']=![];_0x30f20f['updateReportFromOutboundQueue'](_0x16003d);Object[_0x3e1d('0x138')](_0x16003d,_0x30f20f);emitOutboundVoiceQueueSummary(_0x30f20f);}_0x2938ab[_0x3e1d('0x23')][_0x16003d[_0x3e1d('0x5c')]][_0x3e1d('0x12d')]=![];})[_0x3e1d('0xa6')](function(_0x2d259e){logger[_0x3e1d('0x5f')](_0x3e1d('0x135'),util[_0x3e1d('0x3c')](_0x2d259e,{'showHidden':![],'depth':null}));_0x2938ab[_0x3e1d('0x23')][_0x16003d[_0x3e1d('0x5c')]][_0x3e1d('0x12d')]=![];});};Dialer[_0x3e1d('0x80')]['syncQueueSummaryComplete']=_[_0x3e1d('0x139')](function(){var _0x3846a3=_[_0x3e1d('0x13a')](this[_0x3e1d('0x16')],function(_0x495c66){return _0x495c66['dialPreviewRecallmeReminder'];});var _0x3c4ce2=_[_0x3e1d('0x13a')](this[_0x3e1d('0x17')],function(_0x4cb2cf){return _0x4cb2cf['online']&&_0x4cb2cf[_0x3e1d('0x84')]===_0x3e1d('0x85');});if(_0x3846a3[_0x3e1d('0x96')]>0x0&&_0x3c4ce2['length']>0x0){return Promise[_0x3e1d('0xab')]()[_0x3e1d('0x9b')](cmHopper['handlePreviewRecallNotifications'](_[_0x3e1d('0x13b')](_0x3846a3,'id'),previewRecallmeReminderInterval,_[_0x3e1d('0x13b')](_0x3c4ce2,'id')))[_0x3e1d('0x9b')](function(_0x4ee34a){for(var _0x4565b2=0x0;_0x4565b2<_0x4ee34a[_0x3e1d('0x96')];_0x4565b2++){var _0x3b0521=_0x4ee34a[_0x4565b2]['Agent'][_0x3e1d('0x5c')];if(_0x3b0521)io['to'](util[_0x3e1d('0x3d')](_0x3e1d('0x13c'),_0x3b0521))[_0x3e1d('0x39')]('user:dialPreviewRecallReminder',{'hopper':_0x4ee34a[_0x4565b2]});}})[_0x3e1d('0xa6')](function(_0x172259){logger[_0x3e1d('0x5f')](_0x3e1d('0x13d'),_0x172259);});}},0x3c*0x3e8,{'leading':!![]});Dialer[_0x3e1d('0x80')]['loopClearZombieChannels']=function(){var _0x31de54=this;setInterval(function(){_0x31de54[_0x3e1d('0x13e')](_0x31de54[_0x3e1d('0xbe')],_0x3e1d('0x13f'));_0x31de54['clearZombieChannels'](_0x31de54[_0x3e1d('0x1b')],'[actions]');},0x32c8);};Dialer[_0x3e1d('0x80')][_0x3e1d('0x13e')]=function(_0x59ea5d,_0x40cdb4){var _0x5bd565=this;for(var _0x478481 in _0x59ea5d){if(typeof _0x59ea5d[_0x478481]!==_0x3e1d('0x140')){this[_0x3e1d('0x14')]['enqueue'](function(){if(!_[_0x3e1d('0xef')](_0x59ea5d[_0x478481])){return ami['Action']({'action':_0x3e1d('0x84'),'channel':_0x59ea5d[_0x478481][_0x3e1d('0xeb')]})[_0x3e1d('0xa6')](function(_0x362811){if(_0x362811[_0x3e1d('0x64')]===_0x3e1d('0x141')){setTimeout(function(){if(_0x59ea5d[_0x478481]&&_0x59ea5d[_0x478481][_0x3e1d('0xc0')]!=='ivr'){_0x5bd565[_0x3e1d('0xc1')](_0x5bd565[_0x3e1d('0x16')][_0x59ea5d[_0x478481][_0x3e1d('0xbd')]]);logger[_0x3e1d('0x5f')](_0x3e1d('0x142'),_0x40cdb4,_0x478481,_0x59ea5d[_0x478481][_0x3e1d('0xbd')]);delete _0x59ea5d[_0x478481];}if(_0x59ea5d[_0x478481]&&_0x59ea5d[_0x478481][_0x3e1d('0xc0')]===_0x3e1d('0xca')){_0x5bd565['updateOriginated'](_0x5bd565['campaigns'][_0x59ea5d[_0x478481][_0x3e1d('0xbd')]]);logger[_0x3e1d('0x5f')](_0x3e1d('0x143'),_0x40cdb4,_0x478481,_0x59ea5d[_0x478481]['queue']);delete _0x59ea5d[_0x478481];}},0x2328);}});}});}}};Dialer[_0x3e1d('0x80')][_0x3e1d('0x144')]=function(_0x259c11){return Promise[_0x3e1d('0xab')]()['then'](voiceQueueRt[_0x3e1d('0x144')](_0x259c11))['catch'](loggerCatch(_0x3e1d('0x145')));};Dialer[_0x3e1d('0x80')][_0x3e1d('0xc1')]=function(_0x2a8d8a){if(!_[_0x3e1d('0x38')](_0x2a8d8a)&&_0x2a8d8a!==null){if(typeof _0x2a8d8a['originated']!==_0x3e1d('0x140')){if(_0x2a8d8a[_0x3e1d('0x78')]>0x0){_0x2a8d8a['originated']-=0x1;}else{logger[_0x3e1d('0x5f')](_0x3e1d('0x146'));}}}else{logger[_0x3e1d('0x5f')](_0x3e1d('0x147'));}};Dialer[_0x3e1d('0x80')][_0x3e1d('0x148')]=function(_0x22ffa0,_0x51378a){var _0x364961=this;return function(_0x983ef9){_0x364961[_0x3e1d('0xc1')](_0x51378a);logger[_0x3e1d('0x5f')](_0x22ffa0,util[_0x3e1d('0x3c')](_0x983ef9,{'showHidden':![],'depth':null}));};};Dialer[_0x3e1d('0x80')][_0x3e1d('0x149')]=function(_0x3bbb41,_0x3285f1,_0x36581a){var _0x31fc2e={'state':0x19,'statedesc':_0x3e1d('0x14a')};this[_0x3e1d('0xc1')](_0x3285f1);this[_0x3e1d('0x114')](_['merge'](_0x31fc2e,_['pick'](_0x36581a,[_0x3e1d('0xd9'),'ListId','UserId',_0x3e1d('0xe7'),'CampaignId'])),_0x3e1d('0x14b'),_0x3e1d('0x14c'));logger[_0x3e1d('0x5f')](_0x3bbb41);};Dialer[_0x3e1d('0x80')][_0x3e1d('0x114')]=function(_0x35710a,_0x17c08c,_0x346c51){hopperUtils[_0x3e1d('0xc7')](_0x35710a)[_0x3e1d('0xa6')](loggerCatch(_0x17c08c));hopperUtils['moveContactManagedDialer'](_0x35710a)[_0x3e1d('0xa6')](loggerCatch(_0x346c51));};Dialer[_0x3e1d('0x80')][_0x3e1d('0x14d')]=function(_0x11823b,_0x5b10d9){hopperUtils['createHistory'](_0x11823b)[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x14e')));if(_0x5b10d9==0x0){hopperUtils[_0x3e1d('0xc8')](_0x11823b)[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x14f')));}};Dialer['prototype']['checkPreviewRecallReminder']=function(_0x1df70f){return Promise[_0x3e1d('0xab')]()[_0x3e1d('0x9b')](cmHopper['handlePreviewRecallNotifications'](_0x1df70f['id'],previewRecallmeReminderInterval))[_0x3e1d('0x9b')](function(_0x40101d){for(var _0x4087de=0x0;_0x4087de<_0x40101d['length'];_0x4087de++){var _0x40acd8=_0x40101d[_0x4087de][_0x3e1d('0x150')][_0x3e1d('0x5c')];if(_0x40acd8)io['to'](util['format'](_0x3e1d('0x13c'),_0x40acd8))['emit'](_0x3e1d('0x151'),{'hopper':_0x40101d[_0x4087de]});}})[_0x3e1d('0xa6')](function(){});};Dialer[_0x3e1d('0x80')][_0x3e1d('0xad')]=function(_0x1237f2){var _0x4872d2=this;return function(){_0x4872d2[_0x3e1d('0x152')](_0x1237f2);};};Dialer[_0x3e1d('0x80')][_0x3e1d('0x153')]=function(_0x27dc7b,_0x1e77d7){var _0x17593c=this;var _0x3adeb4=uuid['v4']();this[_0x3e1d('0x1b')][_0x3adeb4]=new Action(_0x27dc7b,_0x1e77d7,_0x3adeb4);return new Promise(function(_0x218f09,_0x3b7b81){if(_[_0x3e1d('0x38')](_0x27dc7b)&&typeof _0x27dc7b!==_0x3e1d('0x154')){return _0x3b7b81(msgResponse('originate',_0x3e1d('0x8e'),_0x3e1d('0x155')));}if(_[_0x3e1d('0x38')](_0x1e77d7[_0x3e1d('0x156')])||_0x1e77d7[_0x3e1d('0x156')]===null){return _0x3b7b81(msgResponse('originate',_0x3e1d('0x8e'),_0x3e1d('0x157')));}var _0x488cdc={'XMD-CALLERID':_0x17593c[_0x3e1d('0x1b')][_0x3adeb4][_0x3e1d('0x158')](),'XMD-AGI':_0x27dc7b[_0x3e1d('0x159')]?util[_0x3e1d('0x3d')]('\x22agi://%s/square,%s\x22',ipAgi,_0x27dc7b[_0x3e1d('0x159')]):_0x3e1d('0x15a'),'XMD-AGIAFTER':_0x27dc7b[_0x3e1d('0xc5')]?util['format'](_0x3e1d('0x15b'),ipAgi,_0x27dc7b[_0x3e1d('0xc5')]):_0x3e1d('0x15a'),'XMD-QUEUE':utils[_0x3e1d('0x15c')](_0x27dc7b)?util[_0x3e1d('0x3d')](_0x3e1d('0x15d'),_0x27dc7b[_0x3e1d('0x5c')],_0x27dc7b['dialQueueOptions']||'',_0x27dc7b['dialAgiAfterHangupAgent']?'c':'',_0x27dc7b['dialQueueTimeout']||0x3):_0x3e1d('0x15a'),'XMD-CONTACTID':_0x1e77d7['ContactId'],'XMD-CDRTYPE':_0x3e1d('0x3'),'CALLERID(all)':_0x17593c[_0x3e1d('0x1b')][_0x3adeb4][_0x3e1d('0x158')](),'XMD-AMD':_0x27dc7b[_0x3e1d('0x10c')]?'ACTIVE':'NONE','XMD-DESTINATION':_0x3e1d('0x15e')};if(_0x27dc7b[_0x3e1d('0x10c')]){_0x488cdc[_0x3e1d('0x15f')]=_0x27dc7b[_0x3e1d('0x160')]||0x9c4;_0x488cdc[_0x3e1d('0x161')]=_0x27dc7b[_0x3e1d('0x162')]||0x5dc;_0x488cdc[_0x3e1d('0x163')]=_0x27dc7b[_0x3e1d('0x164')]||0x320;_0x488cdc[_0x3e1d('0x165')]=_0x27dc7b[_0x3e1d('0x166')]||0x1388;_0x488cdc[_0x3e1d('0x167')]=_0x27dc7b[_0x3e1d('0x168')]||0x64;_0x488cdc[_0x3e1d('0x169')]=_0x27dc7b[_0x3e1d('0x16a')]||0x32;_0x488cdc[_0x3e1d('0x16b')]=_0x27dc7b[_0x3e1d('0x16c')]||0x3;_0x488cdc['XMD-AMDSILENCETHRESHOLD']=_0x27dc7b[_0x3e1d('0x16d')]||0x100;_0x488cdc['XMD-AMDMAXIMUMWORDLENGTH']=_0x27dc7b[_0x3e1d('0x16e')]||0x1388;}if(utils['isOutboundQueue'](_0x27dc7b)){_0x488cdc[_0x3e1d('0x16f')]=_0x1e77d7[_0x3e1d('0xe7')];}else{_0x488cdc[_0x3e1d('0x170')]=_0x1e77d7[_0x3e1d('0xdb')];}var _0x3b3194=utils[_0x3e1d('0x171')](_0x1e77d7[_0x3e1d('0x172')]);Object['assign'](_0x488cdc,_0x3b3194);var _0x510a93=_0x17593c[_0x3e1d('0x81')](_0x27dc7b[_0x3e1d('0x87')])?utils[_0x3e1d('0x173')](_0x27dc7b[_0x3e1d('0x87')]['callerid'],_0x27dc7b[_0x3e1d('0x174')],_0x27dc7b[_0x3e1d('0x175')]>0x0?utils[_0x3e1d('0x176')](_0x27dc7b[_0x3e1d('0x177')],_0x27dc7b[_0x3e1d('0x175')]):_0x27dc7b[_0x3e1d('0x177')]):utils[_0x3e1d('0x173')](_[_0x3e1d('0xef')](_0x27dc7b['TrunkBackup'])?_0x27dc7b[_0x3e1d('0x87')][_0x3e1d('0x178')]:_0x27dc7b[_0x3e1d('0x88')]['callerid'],_0x27dc7b[_0x3e1d('0x174')],_0x27dc7b[_0x3e1d('0x175')]>0x0?utils[_0x3e1d('0x176')](_0x27dc7b[_0x3e1d('0x177')],_0x27dc7b[_0x3e1d('0x175')]):_0x27dc7b[_0x3e1d('0x177')]);if(_0x510a93){_0x488cdc[_0x3e1d('0x179')]=_0x17593c[_0x3e1d('0x1b')][_0x3adeb4][_0x3e1d('0x17a')]=utils[_0x3e1d('0x17b')](_0x510a93);_0x488cdc[_0x3e1d('0x17c')]=_0x1e77d7[_0x3e1d('0x156')];}_0x27dc7b[_0x3e1d('0x17d')]=_0x488cdc;return ami[_0x3e1d('0x9e')]({'actionid':_0x3adeb4,'action':_0x3e1d('0x17e'),'channel':_0x17593c[_0x3e1d('0x81')](_0x27dc7b[_0x3e1d('0x87')])?util[_0x3e1d('0x3d')](_0x3e1d('0x17f'),_0x27dc7b[_0x3e1d('0x87')][_0x3e1d('0x5c')],isNotNull(_0x27dc7b[_0x3e1d('0x180')])?_0x27dc7b[_0x3e1d('0x180')]['trim']()||'':'',_0x27dc7b[_0x3e1d('0x181')]>0x0?_0x1e77d7['phone']['substring'](_0x27dc7b[_0x3e1d('0x181')]):_0x1e77d7[_0x3e1d('0x156')]):util['format'](_0x3e1d('0x17f'),_['isNil'](_0x27dc7b[_0x3e1d('0x88')])?_0x27dc7b['Trunk'][_0x3e1d('0x5c')]:_0x27dc7b[_0x3e1d('0x88')][_0x3e1d('0x5c')],isNotNull(_0x27dc7b[_0x3e1d('0x180')])?_0x27dc7b[_0x3e1d('0x180')][_0x3e1d('0x182')]()||'':'',_0x27dc7b[_0x3e1d('0x181')]>0x0?_0x1e77d7[_0x3e1d('0x156')]['substring'](_0x27dc7b['dialCutDigit']):_0x1e77d7[_0x3e1d('0x156')]),'callerid':_0x510a93,'Exten':_0x3e1d('0x15e'),'Context':'from-sip','Priority':'1','variable':_0x488cdc,'timeout':(_0x27dc7b[_0x3e1d('0x183')]||0x1e)*0x3e8,'async':!![],'channelid':_0x3adeb4})[_0x3e1d('0x9b')](function(_0x3ecfc4){return _0x218f09(_0x3ecfc4);})['catch'](function(_0x2ebfe5){_0x27dc7b[_0x3e1d('0x184')]+=0x1;var _0x113ac9=new History(_0x17593c[_0x3e1d('0x1b')][_0x3adeb4]);logger['error'](util[_0x3e1d('0x3d')](_0x3e1d('0x185'),JSON[_0x3e1d('0x6e')](_0x2ebfe5)));_0x113ac9[_0x3e1d('0xce')]=0xe;_0x113ac9['statedesc']='OriginateError';_0x113ac9[_0x3e1d('0xde')]=moment()[_0x3e1d('0x3d')](_0x3e1d('0xc2'));_0x113ac9[_0x3e1d('0xdf')]=_0x113ac9[_0x3e1d('0xde')];hopperUtils[_0x3e1d('0xc7')](_0x113ac9)[_0x3e1d('0xa6')](loggerCatch('[originate][error]'));_0x17593c[_0x3e1d('0xc8')](_0x113ac9)[_0x3e1d('0xa6')](loggerCatch('[originate][error]'))[_0x3e1d('0x13')](function(){delete _0x17593c[_0x3e1d('0x1b')][_0x3adeb4];return _0x3b7b81(msgResponse(_0x3e1d('0x17e'),_0x3e1d('0x7f'),_0x3e1d('0x186')));});});});};Dialer[_0x3e1d('0x80')][_0x3e1d('0x187')]=function(_0x42edd0,_0x1dd21c,_0x505636){var _0x502c68=new History(_0x1dd21c);if(_0x502c68[_0x3e1d('0x119')]+_0x502c68[_0x3e1d('0x11a')]+_0x502c68[_0x3e1d('0x188')]+_0x502c68[_0x3e1d('0x189')]+_0x502c68[_0x3e1d('0xd1')]+_0x502c68[_0x3e1d('0xe3')]+_0x502c68[_0x3e1d('0x11f')]+_0x502c68['countagentrejectretry']>=_0x505636[_0x3e1d('0x11c')]-0x1){return!![];}switch(_0x42edd0){case 0x3:if(_0x502c68[_0x3e1d('0x188')]>=_0x505636[_0x3e1d('0x18a')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countnoanswerretry':_0x502c68[_0x3e1d('0x188')]+=0x1,'scheduledat':moment()[_0x3e1d('0xd7')](_0x505636[_0x3e1d('0x18b')],_0x3e1d('0xd8'))[_0x3e1d('0x3d')](_0x3e1d('0xc2')),'ContactId':_0x502c68[_0x3e1d('0xd9')],'ListId':_0x502c68['ListId'],'VoiceQueueId':_0x502c68[_0x3e1d('0xe7')]||undefined,'CampaignId':_0x502c68[_0x3e1d('0xdb')]||undefined})[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x18c')));break;case 0x5:if(_0x502c68[_0x3e1d('0x119')]>=_0x505636['dialBusyMaxRetry']-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countbusyretry':_0x502c68[_0x3e1d('0x119')]+=0x1,'scheduledat':moment()[_0x3e1d('0xd7')](_0x505636['dialBusyRetryFrequency'],_0x3e1d('0xd8'))[_0x3e1d('0x3d')](_0x3e1d('0xc2')),'ContactId':_0x502c68[_0x3e1d('0xd9')],'ListId':_0x502c68[_0x3e1d('0xda')],'VoiceQueueId':_0x502c68[_0x3e1d('0xe7')]||undefined,'CampaignId':_0x502c68['CampaignId']||undefined})[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x18d')));break;case 0x8:if(_0x502c68[_0x3e1d('0x11a')]>=_0x505636['dialCongestionMaxRetry']-0x1){return!![];}hopperUtils[_0x3e1d('0xd6')]({'active':![],'countcongestionretry':_0x502c68['countcongestionretry']+=0x1,'scheduledat':moment()[_0x3e1d('0xd7')](_0x505636[_0x3e1d('0x18e')],_0x3e1d('0xd8'))[_0x3e1d('0x3d')](_0x3e1d('0xc2')),'ContactId':_0x502c68[_0x3e1d('0xd9')],'ListId':_0x502c68[_0x3e1d('0xda')],'VoiceQueueId':_0x502c68[_0x3e1d('0xe7')]||undefined,'CampaignId':_0x502c68['CampaignId']||undefined})[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x18f')));break;case 0x0:if(_0x502c68['countnosuchnumberretry']>=_0x505636[_0x3e1d('0x190')]-0x1){return!![];}else{hopperUtils[_0x3e1d('0xd6')]({'active':![],'countnosuchnumberretry':_0x502c68['countnosuchnumberretry']+=0x1,'scheduledat':moment()[_0x3e1d('0xd7')](_0x505636[_0x3e1d('0x191')],_0x3e1d('0xd8'))[_0x3e1d('0x3d')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x502c68[_0x3e1d('0xd9')],'ListId':_0x502c68[_0x3e1d('0xda')],'VoiceQueueId':_0x502c68[_0x3e1d('0xe7')]||undefined,'CampaignId':_0x502c68[_0x3e1d('0xdb')]||undefined})[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x192')));}break;case 0xa:if(_0x502c68[_0x3e1d('0xd1')]>=_0x505636['dialDropMaxRetry']-0x1){return!![];}hopperUtils[_0x3e1d('0xd6')]({'active':![],'countdropretry':_0x502c68[_0x3e1d('0xd1')]+=0x1,'scheduledat':moment()['add'](_0x505636['dialDropRetryFrequency'],_0x3e1d('0xd8'))['format'](_0x3e1d('0xc2')),'ContactId':_0x502c68[_0x3e1d('0xd9')],'ListId':_0x502c68[_0x3e1d('0xda')],'VoiceQueueId':_0x502c68[_0x3e1d('0xe7')]||undefined,'CampaignId':_0x502c68[_0x3e1d('0xdb')]||undefined})[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0xdc')));break;case 0xb:if(_0x502c68[_0x3e1d('0xe3')]>=_0x505636[_0x3e1d('0x193')]-0x1){return!![];}hopperUtils[_0x3e1d('0xd6')]({'active':![],'countabandonedretry':_0x502c68['countabandonedretry']+=0x1,'scheduledat':moment()[_0x3e1d('0xd7')](_0x505636[_0x3e1d('0xe6')],_0x3e1d('0xd8'))[_0x3e1d('0x3d')](_0x3e1d('0xc2')),'ContactId':_0x502c68[_0x3e1d('0xd9')],'ListId':_0x502c68['ListId'],'VoiceQueueId':_0x502c68[_0x3e1d('0xe7')]||undefined,'CampaignId':_0x502c68[_0x3e1d('0xdb')]||undefined})[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0xe8')));break;case 0x13:if(_0x502c68['countmachineretry']>=_0x505636['dialMachineMaxRetry']-0x1){return!![];}hopperUtils[_0x3e1d('0xd6')]({'active':![],'countmachineretry':_0x502c68[_0x3e1d('0x11f')]+=0x1,'scheduledat':moment()[_0x3e1d('0xd7')](_0x505636[_0x3e1d('0x121')],_0x3e1d('0xd8'))[_0x3e1d('0x3d')](_0x3e1d('0xc2')),'ContactId':_0x502c68['ContactId'],'ListId':_0x502c68[_0x3e1d('0xda')],'VoiceQueueId':_0x502c68[_0x3e1d('0xe7')]||undefined,'CampaignId':_0x502c68[_0x3e1d('0xdb')]||undefined})[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x194')));break;case 0x14:if(_0x502c68[_0x3e1d('0x11b')]>=_0x505636[_0x3e1d('0x195')]-0x1){return!![];}hopperUtils[_0x3e1d('0xd6')]({'active':![],'countagentrejectretry':_0x502c68['countagentrejectretry']+=0x1,'scheduledat':moment()[_0x3e1d('0xd7')](_0x505636[_0x3e1d('0x196')],_0x3e1d('0xd8'))['format'](_0x3e1d('0xc2')),'ContactId':_0x502c68['ContactId'],'ListId':_0x502c68[_0x3e1d('0xda')],'VoiceQueueId':_0x502c68[_0x3e1d('0xe7')]||undefined,'CampaignId':_0x502c68['CampaignId']||undefined})[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x197')));break;default:return!![];}};Dialer['prototype'][_0x3e1d('0x107')]=function(_0x412b94,_0x286814,_0x5717a0){var _0x58ed05=this;var _0x980cec=new History(_0x412b94);var _0x4cd3a5=![];var _0x2d960c;var _0x19992f;return new Promise(function(_0x608e52,_0x2f5b02){if(_['isUndefined'](_0x286814)&&typeof _0x286814!==_0x3e1d('0x154')){return _0x2f5b02(msgResponse(_0x3e1d('0x198'),_0x3e1d('0x8e'),_0x3e1d('0x199')));}if(_['isUndefined'](_0x5717a0)&&typeof _0x5717a0!==_0x3e1d('0x154')){return _0x2f5b02(msgResponse(_0x3e1d('0x198'),_0x3e1d('0x8e'),_0x3e1d('0x19a')));}hopperUtils['verifyAdditionalPhones'](_0x980cec,_0x5717a0[_0x3e1d('0x19b')],_0x286814)['then'](function(_0x57778c){if(_0x57778c[_0x3e1d('0xd4')]==0x1)_0x4cd3a5=!![];switch(_0x5717a0[_0x3e1d('0x19b')]){case'0':_0x286814['outboundNoSuchCallsDay']+=0x1;_0x980cec[_0x3e1d('0xce')]=0x0;_0x980cec['statedesc']=_0x3e1d('0x19c');_0x980cec[_0x3e1d('0x189')]+=0x1;_0x980cec[_0x3e1d('0xe4')]+=0x1;ami['emit'](_0x3e1d('0x19d'),ut[_0x3e1d('0x112')](_0x412b94,'nosuchnumber'));_0x2d960c=_0x286814[_0x3e1d('0x191')];_0x19992f=_0x286814[_0x3e1d('0x19e')];hopperUtils['createHistory'](_0x980cec)['catch'](loggerCatch(_0x3e1d('0x118')));if(_0x58ed05[_0x3e1d('0x187')](0x0,_0x412b94,_0x286814)&&!_0x4cd3a5){if(_0x980cec[_0x3e1d('0x189')]>=_0x286814['dialNoSuchNumberMaxRetry']){_0x58ed05[_0x3e1d('0x120')](_0x980cec,_0x608e52,_0x2f5b02,_0x3e1d('0x19f'));}else{_0x58ed05['stateGlobal'](_0x980cec,_0x608e52,_0x2f5b02,'reason\x200\x20no\x20such\x20number....');}}break;case'3':_0x286814[_0x3e1d('0x1a0')]+=0x1;_0x980cec[_0x3e1d('0xce')]=0x3;_0x980cec[_0x3e1d('0x6a')]='NoAnswer';_0x980cec[_0x3e1d('0x188')]+=0x1;_0x980cec['countglobal']+=0x1;var _0xb8388a=ut[_0x3e1d('0x1a1')](_0x412b94,_0x286814);ami['emit'](_0x3e1d('0x1a2'),_0xb8388a);_0x2d960c=_0x286814[_0x3e1d('0x18b')];_0x19992f=_0x286814[_0x3e1d('0x19e')];hopperUtils[_0x3e1d('0xc7')](_0x980cec)[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x1a3')));if(_0x58ed05['checkRetriveMax'](0x3,_0x412b94,_0x286814)&&!_0x4cd3a5){if(_0x980cec[_0x3e1d('0x188')]>=_0x286814['dialNoAnswerMaxRetry']){_0x58ed05[_0x3e1d('0x120')](_0x980cec,_0x608e52,_0x2f5b02,_0x3e1d('0x1a4'));}else{_0x58ed05[_0x3e1d('0x11d')](_0x980cec,_0x608e52,_0x2f5b02,'reason\x203\x20ringing\x20no\x20answer');}}break;case'5':_0x286814[_0x3e1d('0x1a5')]+=0x1;_0x980cec[_0x3e1d('0xce')]=0x5;_0x980cec[_0x3e1d('0x6a')]='Busy';_0x980cec['countbusyretry']+=0x1;_0x980cec['countglobal']+=0x1;ami[_0x3e1d('0x39')]('custom:agentbusy',ut[_0x3e1d('0x112')](_0x412b94,_0x3e1d('0x1a6')));_0x2d960c=_0x286814[_0x3e1d('0x1a7')];_0x19992f=_0x286814[_0x3e1d('0x19e')];hopperUtils['createHistory'](_0x980cec)[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x1a8')));if(_0x58ed05['checkRetriveMax'](0x5,_0x412b94,_0x286814)&&!_0x4cd3a5){if(_0x980cec[_0x3e1d('0x119')]>=_0x286814[_0x3e1d('0x1a9')]){_0x58ed05[_0x3e1d('0x120')](_0x980cec,_0x608e52,_0x2f5b02,_0x3e1d('0x1aa'));}else{_0x58ed05[_0x3e1d('0x11d')](_0x980cec,_0x608e52,_0x2f5b02,_0x3e1d('0x1aa'));}}break;case'8':_0x286814[_0x3e1d('0x1ab')]+=0x1;_0x980cec[_0x3e1d('0xce')]=0x8;_0x980cec[_0x3e1d('0x6a')]=_0x3e1d('0x1ac');_0x980cec['countcongestionretry']+=0x1;_0x980cec[_0x3e1d('0xe4')]+=0x1;_0x2d960c=_0x286814[_0x3e1d('0x18e')];_0x19992f=_0x286814[_0x3e1d('0x19e')];ami[_0x3e1d('0x39')]('custom:agentcongestion',ut[_0x3e1d('0x112')](_0x412b94,_0x3e1d('0x1ad')));hopperUtils[_0x3e1d('0xc7')](_0x980cec)['catch'](loggerCatch(_0x3e1d('0x1ae')));if(_0x58ed05[_0x3e1d('0x187')](0x8,_0x412b94,_0x286814)&&!_0x4cd3a5){if(_0x980cec['countcongestionretry']>=_0x286814['dialCongestionMaxRetry']){_0x58ed05[_0x3e1d('0x120')](_0x980cec,_0x608e52,_0x2f5b02,_0x3e1d('0x1af'));}else{_0x58ed05[_0x3e1d('0x11d')](_0x980cec,_0x608e52,_0x2f5b02,'reason\x208\x20congestion');}}break;case'11':_0x286814[_0x3e1d('0x1b0')]+=0x1;_0x980cec[_0x3e1d('0xce')]=0xb;_0x980cec[_0x3e1d('0x6a')]=_0x3e1d('0x1b1');_0x980cec[_0x3e1d('0xe3')]+=0x1;_0x980cec[_0x3e1d('0xe4')]+=0x1;_0x2d960c=_0x286814[_0x3e1d('0xe6')];_0x19992f=_0x286814[_0x3e1d('0x19e')];hopperUtils[_0x3e1d('0xc7')](_0x980cec)[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0xe9')));if(_0x58ed05[_0x3e1d('0x187')](0xb,_0x412b94,_0x286814)&&!_0x4cd3a5){if(_0x980cec[_0x3e1d('0xe3')]>=_0x286814[_0x3e1d('0x193')]){_0x58ed05[_0x3e1d('0x120')](_0x980cec,_0x608e52,_0x2f5b02,_0x3e1d('0x1b2'));}else{_0x58ed05[_0x3e1d('0x11d')](_0x980cec,_0x608e52,_0x2f5b02,_0x3e1d('0x1b2'));}}break;case'20':_0x286814['outboundRejectCallsDay']+=0x1;_0x980cec['state']=0x14;_0x980cec['statedesc']=_0x3e1d('0x1b3');_0x980cec['countagentrejectretry']+=0x1;_0x980cec[_0x3e1d('0xe4')]+=0x1;_0x2d960c=_0x286814[_0x3e1d('0x196')];_0x19992f=_0x286814[_0x3e1d('0x19e')];ami[_0x3e1d('0x39')](_0x3e1d('0x1b4'),ut[_0x3e1d('0x112')](_0x412b94,_0x3e1d('0x1b5')));hopperUtils[_0x3e1d('0xc7')](_0x980cec)[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x1b6')));if(_0x58ed05[_0x3e1d('0x187')](0x14,_0x412b94,_0x286814)&&!_0x4cd3a5){if(_0x980cec[_0x3e1d('0x11b')]>=_0x286814[_0x3e1d('0x195')]){_0x58ed05[_0x3e1d('0x120')](_0x980cec,_0x608e52,_0x2f5b02,_0x3e1d('0x1b7'));}else{_0x58ed05[_0x3e1d('0x11d')](_0x980cec,_0x608e52,_0x2f5b02,_0x3e1d('0x1b7'));}}break;default:_0x286814[_0x3e1d('0x12a')]+=0x1;_0x980cec[_0x3e1d('0xce')]=0xc;_0x980cec[_0x3e1d('0x6a')]=_0x5717a0[_0x3e1d('0x19b')];_0x2d960c=_0x286814[_0x3e1d('0x196')];_0x19992f=_0x286814['callAdditionalPhoneAfterMin'];hopperUtils['createHistory'](_0x980cec)['catch'](loggerCatch(_0x3e1d('0x1b8')));if(_0x58ed05[_0x3e1d('0x187')](_0x5717a0['reason'],_0x412b94,_0x286814)&&!_0x4cd3a5){if(_0x980cec[_0x3e1d('0x119')]+_0x980cec['countcongestionretry']+_0x980cec[_0x3e1d('0x188')]+_0x980cec[_0x3e1d('0x189')]+_0x980cec[_0x3e1d('0xd1')]+_0x980cec[_0x3e1d('0xe3')]+_0x980cec['countmachineretry']+_0x980cec['countagentrejectretry']>=_0x286814[_0x3e1d('0x11c')]){_0x58ed05[_0x3e1d('0x11d')](_0x980cec,_0x608e52,_0x2f5b02,_0x5717a0[_0x3e1d('0x19b')]);}else{_0x58ed05['createStateFinal'](_0x980cec,_0x608e52,_0x2f5b02,_0x5717a0['reason']);}}}})[_0x3e1d('0x9b')](function(){if(_0x4cd3a5){hopperUtils[_0x3e1d('0xea')](_0x980cec,_0x2d960c,_0x19992f)['then'](function(){return _0x608e52(0x1);});}});});};Dialer[_0x3e1d('0x80')][_0x3e1d('0x11d')]=function(_0x57c086,_0x326770,_0x552e87,_0x3edbfe){var _0x3c967f=new Final(_0x57c086);_0x3c967f[_0x3e1d('0xce')]=0xf;_0x3c967f[_0x3e1d('0x6a')]=_0x3e1d('0x1b9');this[_0x3e1d('0x120')](_0x3c967f,_0x326770,_0x552e87,_0x3edbfe);};Dialer[_0x3e1d('0x80')][_0x3e1d('0x120')]=function(_0xbc78f5,_0x3c3952,_0x454489,_0x36b111){hopperUtils[_0x3e1d('0xc8')](_0xbc78f5)[_0x3e1d('0x9b')](function(){return _0x3c3952(msgResponse(_0x3e1d('0x198'),'Success',_0x36b111));})['catch'](function(){return _0x454489(msgResponse(_0x3e1d('0x1ba'),_0x3e1d('0x8e'),_0x3e1d('0x1bb')));});};Dialer[_0x3e1d('0x80')]['predictive']=function(_0x53bd03){var _0x232a33=_0x53bd03[_0x3e1d('0x1bc')]/0x64;var _0x495019=_0x53bd03[_0x3e1d('0xcc')]/(_0x53bd03[_0x3e1d('0xcc')]+_0x53bd03[_0x3e1d('0xc3')]);var _0x57e65=Math[_0x3e1d('0x1bd')](_0x53bd03[_0x3e1d('0x1be')]*(_0x53bd03[_0x3e1d('0x1bf')]/0x64));var _0x4e6484=Math[_0x3e1d('0x1bd')](_0x53bd03[_0x3e1d('0x1be')]*(_0x53bd03[_0x3e1d('0x1c0')]/0x64));var _0xb5d715=_0x53bd03[_0x3e1d('0x131')]+_0x53bd03[_0x3e1d('0x133')];var _0x3d1536=Math[_0x3e1d('0x1c1')](_0x53bd03[_0x3e1d('0x54')]*_0x53bd03[_0x3e1d('0x1c2')]*_0x53bd03[_0x3e1d('0x1c3')]*_0x53bd03[_0x3e1d('0x1c4')]);if(_['isUndefined'](_0x53bd03[_0x3e1d('0x1f')])){if(!_['isUndefined'](_0x53bd03[_0x3e1d('0x1e')])){_0x53bd03[_0x3e1d('0x1e')]=undefined;loggerPredictive[_0x3e1d('0x5f')]('[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine');}if(!_[_0x3e1d('0x38')](_0x53bd03['handlePredictive'])){loggerPredictive[_0x3e1d('0x5f')](_0x3e1d('0x1c5'),'check\x20handlePredictive\x20is\x20not\x20undefine');clearInterval(_0x53bd03[_0x3e1d('0x5d')]);_0x53bd03[_0x3e1d('0x5d')]=undefined;}_0x53bd03[_0x3e1d('0x1f')]=moment()['format'](_0x3e1d('0xc2'));loggerPredictive[_0x3e1d('0x40')](_0x53bd03[_0x3e1d('0x5c')],'collection\x20data\x20in\x20progressive\x20at',_0x53bd03[_0x3e1d('0x1f')]);this[_0x3e1d('0xb2')](_0x53bd03,0x1);}else if(ifInterval(_0x53bd03['dialPredictiveInterval'],_0x53bd03[_0x3e1d('0x1f')])){this[_0x3e1d('0xb2')](_0x53bd03,0x1);loggerPredictiveCalls[_0x3e1d('0x40')](_0x3e1d('0x1c6'),_0x53bd03[_0x3e1d('0x1f')],_0x53bd03[_0x3e1d('0x5c')]);_0x53bd03[_0x3e1d('0x54')]=0x0;_0x53bd03[_0x3e1d('0xcd')]=0x0;}else if(_0x232a33<_0x495019&&_0x53bd03['dialPredictiveOptimization']===_0x3e1d('0x1c7')){clearPredictiveAttributes(_0x53bd03);loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x1c8'),_0x3e1d('0x1c9'),_0x495019,_0x3e1d('0x1f'),_0x53bd03['name']);}else if(_0x3d1536<_0x53bd03[_0x3e1d('0xcd')]&&_0x53bd03[_0x3e1d('0x1ca')]===_0x3e1d('0x1c7')){clearPredictiveAttributes(_0x53bd03);loggerPredictive['info'](_0x3e1d('0x1cb'),_0x3e1d('0x1cc'),_0x3d1536,_0x3e1d('0x1cd'),_0x53bd03[_0x3e1d('0xcd')],_0x3e1d('0x1f'),_0x53bd03['name']);}else if(!ifInterval(_0x53bd03[_0x3e1d('0x1ce')],_0x53bd03[_0x3e1d('0x1f')])&&_[_0x3e1d('0x38')](_0x53bd03['startPredictive'])&&!_['isUndefined'](_0x53bd03[_0x3e1d('0x1f')])){_0x53bd03[_0x3e1d('0x1e')]=moment()[_0x3e1d('0x3d')](_0x3e1d('0xc2'));loggerPredictive[_0x3e1d('0x40')](_0x53bd03[_0x3e1d('0x5c')],_0x3e1d('0x1cf'),_0x53bd03[_0x3e1d('0x1e')]);hopperUtils[_0x3e1d('0x1d0')](_0x53bd03['dialPredictiveInterval'])['then'](this['getDataPredictive'](_0x53bd03))['then'](mergeDataErlangB(_0x53bd03))[_0x3e1d('0x9b')](this[_0x3e1d('0x1d1')](_0x53bd03))[_0x3e1d('0xa6')](loggerCatchPredictive(_0x3e1d('0x1d2'),_0x53bd03));}else if(!ifInterval(_0x53bd03[_0x3e1d('0x1ce')],_0x53bd03['startPredictive'])){_0x53bd03[_0x3e1d('0xcd')]=0x0;_0x53bd03[_0x3e1d('0x1e')]=moment()[_0x3e1d('0x3d')](_0x3e1d('0xc2'));loggerPredictive[_0x3e1d('0x40')](_0x53bd03['name'],_0x3e1d('0x1d3'),_0x53bd03['startPredictive']);clearInterval(_0x53bd03[_0x3e1d('0x5d')]);_0x53bd03[_0x3e1d('0x5d')]=undefined;hopperUtils[_0x3e1d('0x1d0')](_0x53bd03[_0x3e1d('0x1ce')])[_0x3e1d('0x9b')](this[_0x3e1d('0x1d4')](_0x53bd03))[_0x3e1d('0x9b')](mergeDataErlangB(_0x53bd03))[_0x3e1d('0x9b')](this[_0x3e1d('0x1d1')](_0x53bd03))[_0x3e1d('0xa6')](loggerCatchPredictive('Predictive\x20for\x20every\x20interval',_0x53bd03));}else if(_0x53bd03['predictiveIntervalAvailable']&&_0xb5d715<_0x53bd03[_0x3e1d('0x1be')]-_0x4e6484){clearPredictiveAttributes(_0x53bd03);loggerPredictive[_0x3e1d('0x40')](_0x53bd03[_0x3e1d('0x5c')],'switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',_0xb5d715,_0x3e1d('0x1d5'),_0x53bd03['predictiveIntervalAvailable'],'-',_0x4e6484,'=',_0x53bd03[_0x3e1d('0x1be')]-_0x4e6484,')');}else if(_0x53bd03['predictiveIntervalAvailable']&&_0xb5d715>_0x53bd03[_0x3e1d('0x1be')]+_0x57e65){clearPredictiveAttributes(_0x53bd03);loggerPredictive[_0x3e1d('0x40')](_0x53bd03[_0x3e1d('0x5c')],_0x3e1d('0x1d6'),_0xb5d715,_0x3e1d('0x1d7'),_0x53bd03[_0x3e1d('0x1be')],'+',_0x57e65,'=',_0x53bd03[_0x3e1d('0x1be')]+_0x57e65,')');}};Dialer[_0x3e1d('0x80')][_0x3e1d('0x1d4')]=function(_0x458d5c){var _0x24ca6b=this;return function(_0x425508){return new Promise(function(_0x6a2b89,_0x36e7d1){_[_0x3e1d('0x59')](_0x458d5c,_0x425508[0x0]);if(checkGetDataPredictive(_0x425508[0x0])){var _0x599305=_0x458d5c[_0x3e1d('0x1be')]=_0x458d5c[_0x3e1d('0x133')]+_0x458d5c[_0x3e1d('0x131')];var _0x342be3=_0x458d5c[_0x3e1d('0x1ce')]*0x3c;var _0x30df7f=_0x425508[0x0][_0x3e1d('0x4d')]+_0x425508[0x0][_0x3e1d('0x4b')];var _0xcff4c3=(_0x425508[0x0][_0x3e1d('0x45')]+_0x425508[0x0][_0x3e1d('0x47')]+_0x425508[0x0][_0x3e1d('0x49')])/_0x425508[0x0]['predictiveIntervalTotalCalls'];_0x458d5c[_0x3e1d('0x1c3')]=_0xcff4c3>0x0?_0xcff4c3:0x1;switch(_0x458d5c[_0x3e1d('0x1ca')]){case'dropRate':var _0xa7d44f=_0x458d5c[_0x3e1d('0x1bc')]/0x64;return _0x24ca6b['abandonmentRate'](_0x599305,_0x342be3,_0x30df7f,_0xcff4c3,_0xa7d44f)[_0x3e1d('0x9b')](function(_0xdc925c){return _0x6a2b89(_0xdc925c);});case _0x3e1d('0x1d8'):var _0x4b6308=_0x458d5c[_0x3e1d('0x1bc')]/0x64;return _0x24ca6b[_0x3e1d('0x1d9')](_0x599305,_0x342be3,_0x30df7f,_0xcff4c3,_0x4b6308)[_0x3e1d('0x9b')](function(_0xa19e14){return _0x6a2b89(_0xa19e14);});default:return _0x36e7d1(msgResponse(_0x3e1d('0x1da'),_0x3e1d('0x8e'),_0x3e1d('0x1db')));}}else{return _0x36e7d1(msgResponse(_0x3e1d('0x1da'),_0x3e1d('0x8e'),_0x3e1d('0x1dc')));}});};};Dialer[_0x3e1d('0x80')][_0x3e1d('0x1dd')]=function(_0x2e2aba){var _0x5e4cf7=this;return function(_0x2b859b){return new Promise(function(_0x1cedb7,_0x6c468b){_[_0x3e1d('0x59')](_0x2e2aba,_0x2b859b[0x0]);if(checkGetDataPredictive(_0x2b859b[0x0])){loggerPredictive[_0x3e1d('0x40')](JSON[_0x3e1d('0x6e')](_0x2b859b[0x0]));if(_0x2e2aba[_0x3e1d('0x1ca')]==='dropRate'){return _0x5e4cf7[_0x3e1d('0x144')](_0x2e2aba['id'])[_0x3e1d('0x9b')](function(_0xfa5ec8){var _0x19708f=_0x2e2aba[_0x3e1d('0x1de')]-_0xfa5ec8[0x0][_0x3e1d('0x1df')];var _0x6c72e8=_0x2e2aba[_0x3e1d('0x1ce')]*0x3c;var _0x36466b=_0x2b859b[0x0][_0x3e1d('0x4d')]+_0x2b859b[0x0][_0x3e1d('0x4b')];var _0x234d4a=(_0x2b859b[0x0][_0x3e1d('0x45')]+_0x2b859b[0x0]['predictiveIntervalDroppedCallsTimeout']+_0x2b859b[0x0][_0x3e1d('0x49')])/_0x2b859b[0x0][_0x3e1d('0x43')];var _0x36306e=_0x2e2aba[_0x3e1d('0x1bc')]/0x64;_0x2e2aba[_0x3e1d('0x1e0')]=_0xfa5ec8[0x0][_0x3e1d('0x1df')]||0x0;_0x2e2aba['predictiveIntervalHitRate']=_0x234d4a>0x0?_0x234d4a:0x1;return _0x5e4cf7['abandonmentRate'](_0x19708f,_0x6c72e8,_0x36466b,_0x234d4a,_0x36306e);})[_0x3e1d('0x9b')](function(_0x2dc5ba){return _0x1cedb7(_0x2dc5ba);})['catch'](function(_0x4ac7f7){return _0x6c468b(msgResponse(_0x3e1d('0x1e1'),_0x3e1d('0x8e'),JSON[_0x3e1d('0x6e')](_0x4ac7f7)));});}if(_0x2e2aba[_0x3e1d('0x1ca')]==='agentBusyFactor'){return _0x5e4cf7[_0x3e1d('0x144')](_0x2e2aba['id'])[_0x3e1d('0x9b')](function(_0x1d5a03){var _0x12d2b4=_0x2e2aba['loggedIn']-_0x1d5a03[0x0]['outboundQueuePauses'];var _0x2df508=_0x2e2aba[_0x3e1d('0x1ce')]*0x3c;var _0x12dfab=_0x2b859b[0x0][_0x3e1d('0x4d')]+_0x2b859b[0x0]['predictiveIntervalAvgHoldtime'];var _0x338755=(_0x2b859b[0x0][_0x3e1d('0x45')]+_0x2b859b[0x0][_0x3e1d('0x47')]+_0x2b859b[0x0][_0x3e1d('0x49')])/_0x2b859b[0x0]['predictiveIntervalTotalCalls'];var _0x230d73=_0x2e2aba['dialPredictiveOptimizationPercentage']/0x64;_0x2e2aba[_0x3e1d('0x1e0')]=_0x1d5a03[0x0][_0x3e1d('0x1df')]||0x0;_0x2e2aba['predictiveIntervalHitRate']=_0x338755>0x0?_0x338755:0x1;return _0x5e4cf7[_0x3e1d('0x1d9')](_0x12d2b4,_0x2df508,_0x12dfab,_0x338755,_0x230d73);})['then'](function(_0x940d67){return _0x1cedb7(_0x940d67);})[_0x3e1d('0xa6')](function(_0x5c75be){return _0x6c468b(msgResponse(_0x3e1d('0x1e1'),_0x3e1d('0x8e'),JSON[_0x3e1d('0x6e')](_0x5c75be)));});}}else{return _0x6c468b(msgResponse('[getDataPredictive]',_0x3e1d('0x8e'),_0x3e1d('0x1dc')));}});};};Dialer['prototype']['startMethodPredictive']=function(_0x25a06b){var _0x490174=this;return function(){var _0x30a3bf=0x0;var _0x577d78=Math['floor'](_0x25a06b[_0x3e1d('0x56')]*0x3e8);if(_0x577d78>0x0){_0x577d78=_0x577d78<0x64?0x64:_0x577d78;loggerPredictive[_0x3e1d('0x40')](_0x25a06b[_0x3e1d('0x5c')],_0x3e1d('0x1e2'),_0x577d78,_0x3e1d('0x1e3'));_0x25a06b['handlePredictive']=setInterval(function(){_0x490174[_0x3e1d('0x5d')](_0x25a06b);loggerPredictiveCalls[_0x3e1d('0x40')](_0x3e1d('0x1e4'),_0x30a3bf+=0x1);},_0x577d78);}else{loggerPredictive[_0x3e1d('0x40')](_0x25a06b[_0x3e1d('0x5c')],'fail\x20to\x20scheduled\x20calls');}};};Dialer['prototype']['checkContactBlack']=function(_0x54f48a,_0x300c11){var _0x11b158=this;return function(_0xd80842){if(_[_0x3e1d('0x3f')](_0xd80842)){if(_[_0x3e1d('0xef')](_0x300c11[_0x3e1d('0x1e5')])||!_0x300c11['recallme']){if(_0x54f48a['dialMethod']===_0x3e1d('0xb4')){_0x54f48a[_0x3e1d('0x6b')]=_[_0x3e1d('0x38')](_0x54f48a[_0x3e1d('0x6b')])?!![]:_0x54f48a['queueStatusComplete'];var _0x32c157=uuid['v4']();_0x11b158['actions'][_0x32c157]=new Action(_0x54f48a,_0x300c11,_0x32c157);loggerBooked[_0x3e1d('0x40')]('[booked][checkContactBlack]',_0x32c157,_0x3e1d('0x1e6'),JSON[_0x3e1d('0x6e')](_0x54f48a['queueStatusComplete']),'Queue:\x20',_0x54f48a[_0x3e1d('0x5c')]);if(_0x54f48a['queueStatusComplete']){_0x54f48a['queueStatusComplete']=![];_0x11b158[_0x3e1d('0x21')][_0x11b158['actions'][_0x32c157][_0x3e1d('0xbd')]]=[];ami['Action']({'actionid':_0x32c157,'action':'queuestatus','queue':_0x54f48a['name']})[_0x3e1d('0xa6')](function(){_0x11b158[_0x3e1d('0xc1')](_0x54f48a);hopperUtils['rescheduleContact']({'active':![],'ContactId':_0x11b158['actions'][_0x32c157][_0x3e1d('0xd9')],'ListId':_0x11b158[_0x3e1d('0x1b')][_0x32c157][_0x3e1d('0xda')],'VoiceQueueId':_0x11b158[_0x3e1d('0x1b')][_0x32c157][_0x3e1d('0xe7')]||undefined,'CampaignId':_0x11b158[_0x3e1d('0x1b')][_0x32c157][_0x3e1d('0xdb')]||undefined})[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x1e7')));delete _0x11b158['actions'][_0x32c157];});}else{loggerBooked['info'](_0x3e1d('0x1e8'),JSON['stringify'](_0x54f48a[_0x3e1d('0x6b')]),_0x3e1d('0x1e9'),_0x54f48a['name']);_0x11b158[_0x3e1d('0xc1')](_0x54f48a);hopperUtils[_0x3e1d('0xd6')]({'active':![],'ContactId':_0x11b158[_0x3e1d('0x1b')][_0x32c157][_0x3e1d('0xd9')],'ListId':_0x11b158[_0x3e1d('0x1b')][_0x32c157][_0x3e1d('0xda')],'VoiceQueueId':_0x11b158[_0x3e1d('0x1b')][_0x32c157][_0x3e1d('0xe7')]||undefined,'CampaignId':_0x11b158[_0x3e1d('0x1b')][_0x32c157]['CampaignId']||undefined})[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x1e7')));delete _0x11b158[_0x3e1d('0x1b')][_0x32c157];}}else{return _0x11b158[_0x3e1d('0x153')](_0x54f48a,_0x300c11);}}else{if(utils[_0x3e1d('0x5a')](undefined,_0x300c11[_0x3e1d('0x1ea')])<_0x54f48a[_0x3e1d('0x1eb')]*0x3c){if(_0x300c11[_0x3e1d('0x150')]&&!_0x300c11[_0x3e1d('0x150')][_0x3e1d('0x1ec')]){_0x11b158[_0x3e1d('0x15')][_0x3e1d('0xf6')](_0x300c11['id'])[_0x3e1d('0x13')](function(){_0x11b158[_0x3e1d('0xc1')](_0x54f48a);});}else{hopperUtils[_0x3e1d('0x1ed')]({'active':![]},_0x300c11['id'],0x1)[_0x3e1d('0x13')](function(){_0x11b158[_0x3e1d('0xc1')](_0x54f48a);});}}else{_0x54f48a[_0x3e1d('0x1ee')]+=0x1;_0x11b158[_0x3e1d('0xc1')](_0x54f48a);if(_0x54f48a[_0x3e1d('0x1ef')]){hopperUtils[_0x3e1d('0xd6')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x300c11[_0x3e1d('0xd9')],'ListId':_0x300c11[_0x3e1d('0xda')],'VoiceQueueId':_0x300c11['VoiceQueueId']||undefined,'CampaignId':_0x300c11[_0x3e1d('0xdb')]||undefined})[_0x3e1d('0xa6')](loggerCatch('[rescheduleContact][dialRecallInQueue]'));hopperUtils[_0x3e1d('0xc7')](createObjHistory(_0x54f48a,_0x300c11,utils[_0x3e1d('0x65')][_0x3e1d('0x1f0')],0x17,'RecallInQueue'))[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x1f1')));}else{_0x11b158[_0x3e1d('0x114')](createObjHistory(_0x54f48a,_0x300c11,utils[_0x3e1d('0x65')][_0x3e1d('0x1f2')],0x16,_0x3e1d('0x1f3')),_0x3e1d('0x1f4'),_0x3e1d('0x1f5'));}}}}else{_0x54f48a[_0x3e1d('0x1f6')]+=0x1;_0x11b158[_0x3e1d('0x114')](createObjHistory(_0x54f48a,_0x300c11,utils[_0x3e1d('0x65')][_0x3e1d('0x1f7')],0xd,_0x3e1d('0x1f8')),'[Originate][historyBlacklist]',_0x3e1d('0x1f9'));throw _0x3e1d('0x1fa');}};};Dialer['prototype']['handleIvr']=function(_0x386175){var _0x26c8dc=this;var _0x3517a3=_0x386175[_0x3e1d('0x1fb')]-_0x386175['originated'];emitCampaignSummary(_0x386175);if(_0x3517a3>0x0&&_0x386175[_0x3e1d('0x62')]==0x0){if(_0x3517a3>this[_0x3e1d('0x19')]){_0x3517a3=this['maxNumberOriginate'];}_0x386175[_0x3e1d('0x62')]=0x1;hopperUtils[_0x3e1d('0x1fc')](_0x386175,_0x3517a3)[_0x3e1d('0x9b')](function(_0xbbb528){_0x386175[_0x3e1d('0x62')]=0x0;if(_0xbbb528){if(!utils['checkContactEmpty'](_0xbbb528)){_0x386175[_0x3e1d('0x64')]=utils[_0x3e1d('0x65')][_0x3e1d('0x69')];logger[_0x3e1d('0x40')]('[getContactCampaign2][Empty]'+_0x386175[_0x3e1d('0x5c')]);}else{_0x386175['originated']+=_0xbbb528[_0x3e1d('0x96')];_0x386175[_0x3e1d('0x64')]=utils[_0x3e1d('0x65')][_0x3e1d('0x1fd')];for(var _0x503672=0x0;_0x503672<_0xbbb528['length'];_0x503672+=0x1){_0x386175[_0x3e1d('0x1fe')]+=0x1;if(_[_0x3e1d('0xef')](_0xbbb528[_0x503672])||_['isNil'](_0xbbb528[_0x503672][_0x3e1d('0x172')])||_[_0x3e1d('0xef')](_0xbbb528[_0x503672]['phone'])){_0x26c8dc[_0x3e1d('0x149')]('[actionOriginate]\x20',_0x386175,_0xbbb528[_0x503672]);}else{hopperUtils[_0x3e1d('0x1ff')](_[_0x3e1d('0xf3')](_0xbbb528[_0x503672],['CampaignId',_0x3e1d('0x156')]))[_0x3e1d('0x9b')](_0x26c8dc['checkContactBlack'](_0x386175,_0xbbb528[_0x503672]))[_0x3e1d('0xa6')](_0x26c8dc[_0x3e1d('0x148')]('[actionOriginateIvr]\x20',_0x386175));}}}}})['catch'](loggerGetContactDialer(_0x3e1d('0x200'),_0x386175,_0x3517a3));}};Dialer[_0x3e1d('0x80')][_0x3e1d('0xb2')]=function(_0x41cad3,_0x456cc5){var _0x51abb2=this;var _0x2f598d=[];if(_0x456cc5<0x1||_0x41cad3['dialMethod']===_0x3e1d('0xb4')){_0x456cc5=0x1;}var _0x2a96d3=Math[_0x3e1d('0x1c1')](_0x41cad3[_0x3e1d('0x131')]*_0x456cc5)-_0x41cad3[_0x3e1d('0x78')];if(_0x41cad3[_0x3e1d('0x201')]>0x0){var _0x3a75d3=_0x41cad3[_0x3e1d('0x201')]-_0x41cad3[_0x3e1d('0x78')]-_0x41cad3[_0x3e1d('0x133')]-_0x41cad3[_0x3e1d('0x202')];if(_0x2a96d3>_0x3a75d3){_0x2a96d3=_0x3a75d3;}}if(_0x2a96d3>0x0&&_0x41cad3[_0x3e1d('0x62')]==0x0){if(_0x41cad3['dialMethod']==='booked'){_0x2a96d3=0x1;}if(_0x2a96d3>this[_0x3e1d('0x19')]){_0x2a96d3=this[_0x3e1d('0x19')];}for(var _0x387ffb in this[_0x3e1d('0x17')]){if(typeof this['agents'][_0x387ffb]!=='undefined'){if(this[_0x3e1d('0x17')][_0x387ffb][_0x3e1d('0xce')]===_0x3e1d('0x203')&&this[_0x3e1d('0x17')][_0x387ffb]['status']==='reachable'){_0x2f598d['push'](this['agents'][_0x387ffb]['id']);}}}_0x41cad3[_0x3e1d('0x62')]=0x1;hopperUtils[_0x3e1d('0x204')](_0x41cad3,_0x2f598d,_0x2a96d3)[_0x3e1d('0x9b')](function(_0x521677){_0x41cad3[_0x3e1d('0x62')]=0x0;if(_0x521677){if(!utils['checkContactEmpty'](_0x521677)){hopperUtils[_0x3e1d('0x205')](_0x41cad3)['then'](sendMessageReschedule(_0x41cad3))[_0x3e1d('0xa6')](loggerCatch(_0x3e1d('0x206')));}else{_0x41cad3[_0x3e1d('0x78')]+=_0x521677[_0x3e1d('0x96')];_0x41cad3[_0x3e1d('0x64')]=_0x41cad3[_0x3e1d('0xb0')]===_0x3e1d('0xb4')?utils['CAMPAIGN_STATUS'][_0x3e1d('0x134')]:utils['CAMPAIGN_STATUS'][_0x3e1d('0x1fd')];for(var _0x2bde70=0x0;_0x2bde70<_0x521677['length'];_0x2bde70+=0x1){if(_['isNil'](_0x521677[_0x2bde70])||_[_0x3e1d('0xef')](_0x521677[_0x2bde70][_0x3e1d('0x172')])||_['isNil'](_0x521677[_0x2bde70][_0x3e1d('0x156')])){_0x51abb2[_0x3e1d('0x149')]('[actionOriginate]\x20',_0x41cad3,_0x521677[_0x2bde70]);}else{hopperUtils[_0x3e1d('0x207')](_[_0x3e1d('0xf3')](_0x521677[_0x2bde70],['VoiceQueueId',_0x3e1d('0x156')]))['then'](_0x51abb2[_0x3e1d('0x208')](_0x41cad3,_0x521677[_0x2bde70]))[_0x3e1d('0xa6')](_0x51abb2['loggerHandler'](_0x3e1d('0x209'),_0x41cad3));}}}}})[_0x3e1d('0xa6')](loggerGetContactDialer(_0x3e1d('0x20a'),_0x41cad3,_0x2a96d3));}};Dialer[_0x3e1d('0x80')][_0x3e1d('0x5d')]=function(_0x395839){if(_0x395839[_0x3e1d('0x201')]>0x0){var _0x250f0e=_0x395839[_0x3e1d('0x201')]-_0x395839[_0x3e1d('0x78')]-_0x395839[_0x3e1d('0x133')];if(_0x250f0e>0x0&&_0x395839['temp']==0x0){this[_0x3e1d('0x20b')](_0x395839);}else{loggerPredictiveCalls[_0x3e1d('0x40')]('[handlePredictive][limitChannel]');}}else{this[_0x3e1d('0x20b')](_0x395839);}};Dialer['prototype'][_0x3e1d('0x20b')]=function(_0xd9976d){var _0x5df307=this;var _0x200d60=[];_0xd9976d[_0x3e1d('0x78')]+=0x1;for(var _0x36fb07 in this['agents']){if(typeof this[_0x3e1d('0x17')][_0x36fb07]!==_0x3e1d('0x140')){if(this['agents'][_0x36fb07][_0x3e1d('0xce')]===_0x3e1d('0x203')&&this[_0x3e1d('0x17')][_0x36fb07][_0x3e1d('0x84')]===_0x3e1d('0x85')){_0x200d60[_0x3e1d('0x97')](this[_0x3e1d('0x17')][_0x36fb07]['id']);}}}_0xd9976d[_0x3e1d('0x62')]=0x1;return this[_0x3e1d('0x204')](_0xd9976d['id'],_0x200d60,0x1,_0xd9976d['dialOrderByScheduledAt'],_0xd9976d)[_0x3e1d('0x9b')](function(_0xdba3d2){_0xd9976d[_0x3e1d('0x62')]=0x1;if(_0xdba3d2){if(!utils[_0x3e1d('0x20c')](_0xdba3d2)){utils[_0x3e1d('0x61')](_0xd9976d,0x1,0x0);return hopperUtils[_0x3e1d('0x205')](_0xd9976d)[_0x3e1d('0x9b')](sendMessageReschedule(_0xd9976d))['catch'](loggerCatch(_0x3e1d('0x206')));}else{_0xd9976d[_0x3e1d('0x64')]=utils[_0x3e1d('0x65')][_0x3e1d('0x1fd')];if(_[_0x3e1d('0xef')](_0xdba3d2[0x0])||_['isNil'](_0xdba3d2[0x0][_0x3e1d('0x172')])||_[_0x3e1d('0xef')](_0xdba3d2[0x0]['phone'])){_0x5df307[_0x3e1d('0x149')](_0x3e1d('0x209'),_0xd9976d,_0xdba3d2[0x0]);}else{return hopperUtils['checkIsBlackList'](_['pick'](_0xdba3d2[0x0],['VoiceQueueId',_0x3e1d('0x156')]))[_0x3e1d('0x9b')](_0x5df307['checkContactBlack'](_0xd9976d,_0xdba3d2[0x0]))['catch'](_0x5df307[_0x3e1d('0x148')](_0x3e1d('0x20d'),_0xd9976d));}}}})['catch'](loggerGetContactDialer('[getContactDialerPredictive]',_0xd9976d,0x1));};Dialer[_0x3e1d('0x80')][_0x3e1d('0x20e')]=function(_0x1fba22,_0x19bdf9,_0x441bdc,_0xa22204,_0x2bc0ca,_0x3a33bd){loggerPredictive[_0x3e1d('0x40')]('--------\x20Drop\x20Rate\x20--------');loggerPredictive[_0x3e1d('0x40')]('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',_0x1fba22);loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x20f'),_0x19bdf9);loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x210'),_0x441bdc);loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x211'),_0xa22204);loggerPredictive['info'](_0x3e1d('0x212'),_0x2bc0ca);loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x4e'));return new Promise(function(_0x342b63,_0x42e84c){if(_0x1fba22<=0x0||isNaN(_0x1fba22)){return _0x42e84c(msgResponse('[abandonmentRate]',_0x3e1d('0x7f'),'m\x20=\x20'+_0x1fba22));}if(_0x441bdc<=0x0||isNaN(_0x441bdc)){return _0x42e84c(msgResponse(_0x3e1d('0x213'),'Error','Ts\x20=\x20'+_0x441bdc));}if(_0xa22204<=0x0||isNaN(_0xa22204)){return _0x42e84c(msgResponse(_0x3e1d('0x213'),_0x3e1d('0x7f'),'p\x20=\x20'+_0xa22204));}if(_0x19bdf9<=0x0||isNaN(_0x19bdf9)){return _0x42e84c(msgResponse(_0x3e1d('0x213'),_0x3e1d('0x7f'),_0x3e1d('0x214')+_0x19bdf9));}if(_0x2bc0ca<=0x0||isNaN(_0x2bc0ca)){return _0x42e84c(msgResponse(_0x3e1d('0x213'),'Error',_0x3e1d('0x215')+_0x2bc0ca));}_0x3a33bd=_0x3a33bd||0x0;var _0x2c70c7=0x1/_0x441bdc;var _0x2135c5=0x0;var _0x5e5b3e=0x0;var _0x12b82b=0x0;var _0x4c3bec=0x0;for(var _0x3c8e68=0x0;_0x12b82b<_0x2bc0ca;_0x3c8e68+=0x1){_0x5e5b3e=_0x3c8e68/_0x19bdf9;_0x2135c5=(_0xa22204*_0x5e5b3e+_0x3a33bd)/_0x2c70c7;_0x12b82b=utils['erlangb'](_0x2135c5,_0x1fba22);_0x4c3bec=_0x2135c5/_0x1fba22*(0x1-utils[_0x3e1d('0x216')](_0x2135c5,_0x1fba22));}return _0x342b63({'erlangCalls':_0x3c8e68,'erlangCallToSecond':_0x19bdf9/_0x3c8e68,'erlangAbandonmentRate':_0x12b82b,'erlangBusyFactor':_0x4c3bec});});};Dialer[_0x3e1d('0x80')][_0x3e1d('0x1d9')]=function(_0x5d1327,_0x2956fc,_0x9d744f,_0x3069bc,_0x3a49d0,_0xf41ba7){loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x217'));loggerPredictive[_0x3e1d('0x40')]('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',_0x5d1327);loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x20f'),_0x2956fc);loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x210'),_0x9d744f);loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x211'),_0x3069bc);loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x218'),_0x3a49d0);loggerPredictive[_0x3e1d('0x40')](_0x3e1d('0x4e'));return new Promise(function(_0x202f38,_0xb88739){if(_0x5d1327<=0x0||isNaN(_0x5d1327)){return _0xb88739(msgResponse(_0x3e1d('0x219'),_0x3e1d('0x7f'),'m\x20=\x20'+_0x5d1327));}if(_0x9d744f<=0x0||isNaN(_0x9d744f)){return _0xb88739(msgResponse(_0x3e1d('0x219'),_0x3e1d('0x7f'),_0x3e1d('0x21a')+_0x9d744f));}if(_0x3069bc<=0x0||isNaN(_0x3069bc)){return _0xb88739(msgResponse('[busyFactor]',_0x3e1d('0x7f'),_0x3e1d('0x21b')+_0x3069bc));}if(_0x2956fc<=0x0||isNaN(_0x2956fc)){return _0xb88739(msgResponse('[busyFactor]','Error','interval\x20=\x20'+_0x2956fc));}if(_0x3a49d0<=0x0||isNaN(_0x3a49d0)){return _0xb88739(msgResponse(_0x3e1d('0x219'),'Error','Umin\x20=\x20'+_0x3a49d0));}_0xf41ba7=_0xf41ba7||0x0;var _0x3b7ee5=0x1/_0x9d744f;var _0x13302d=0x0;var _0x4f4ae3=0x0;var _0x3d3611=0x0;var _0x82c09f=0x0;for(var _0x4ece90=0x0;_0x82c09f<_0x3a49d0;_0x4ece90+=0x1){_0x4f4ae3=_0x4ece90/_0x2956fc;_0x13302d=(_0x3069bc*_0x4f4ae3+_0xf41ba7)/_0x3b7ee5;_0x3d3611=utils[_0x3e1d('0x216')](_0x13302d,_0x5d1327);_0x82c09f=_0x13302d/_0x5d1327*(0x1-utils[_0x3e1d('0x216')](_0x13302d,_0x5d1327));}return _0x202f38({'erlangCalls':_0x4ece90,'erlangCallToSecond':_0x2956fc/_0x4ece90,'erlangAbandonmentRate':_0x3d3611,'erlangBusyFactor':_0x82c09f});});};module[_0x3e1d('0x21c')]=Dialer;