Built motion from commit f8768ebe.|2.6.15
[motion2.git] / server / services / ami / dialer / index.js
index bf46e36..85c06c8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x282f=['Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsCallersExit','AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgHoldtime','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgTalktime','---------------------------','isUndefined','Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','History\x20information\x20are\x20empty','---------\x20ErlangB\x20---------','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCalls','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCallToSecond','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangAbandonmentRate','merge','getSeconds','name','startPredictive\x20value\x20cleared','handlePredictive','handlePredictive\x20interval\x20cleared','error','stack','inspect','checkContactLowerLimitOriginate','contactsRescheduled','message','CAMPAIGN_STATUS','CONTACTS_RESCHEDULED','[getContactDialer2][ReScheduled]','contacts','state','statedesc','endtime','starttime','queueStatusComplete','[unlockQueueStatus][undefined]','[booked][unlockQueueStatus]','stringify','pick','Interval','Intervals','NULL_INTERVAL','\x20INTERVAL_IS_NULL','isIVRCampaignActive','INACTIVE','campaign:ivr:%s','campaign:save','sendMessageOneNotActive','originated','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','is\x20not\x20active','[ifTime][Action]','Error','isTrunkReachable','active','status','reachable','SIP/%s','unmonitored','checkIsTrunkReachable','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','push','Action','interval','true','command','iftime\x20%s,%s','indexOf','catch','all','some','OVERTIME_GLOBAL_INTERVAL','OVERTIME_INTERVAL','[ifTime][promiseAll]','Global:\x20','Timezone:\x20','resetActiveCalls','then','syncCampaigns','undefined','isIVRCampaign','resolve','dialTimezone','launchHandleIvr','[syncCampaigns]','checkDialMethod','dialMethod','progressive','handlePower','power','Queue','method\x20not\x20recognized','silly','Dialer::ifTime()','Voice\x20Queue\x20%s\x20$s','intervalIftime','\x20Interval\x20is\x20overtime:\x20','Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:','queue','uniqueid','updateOriginated','YYYY-MM-DD\x20HH:mm:ss','ivr','outboundAnswerCallsDay','reason','agent','agiafterat','dialQueueProject2','createHistory','[syncAgentComplete][createHistory]','moveContactManagedDialer','droptime','predictiveIntervalDroppedCallsTimeout','outboundDropCallsDayTimeout','predictiveIntervalErlangCallsDroppedCalls','Drop','dropreason','TIMEOUT','countdropretry','countglobal','callAdditionalPhoneAfterMin','verifyAdditionalPhones','voiceQueue','additional','queueCallerAbandonCreateState','rescheduleContact','add','dialDropRetryFrequency','ContactId','ListId','CampaignId','[rescheduleContact][Drop]','calleridname','calleridnum','[syncAgentComplete][createHistory][10]','swapAdditionalPhones','outboundDropCallsDayCallersExit','countabandonedretry','dialAbandonedMaxRetry','minutes','Abandoned','[syncAgentComplete][createHistory][11]','actions','channel','actionid','strategy','rrmemory','isNil','locked','paused','stateinterface','idHopper','roundrobin','run','[Catch][Preview][syncQueueStatusComplete]','VoiceQueueId','[unlock][syncQueueStatusComplete]','_rr','length','unlockRR','[booked][RR]','Agent:\x20','contactAgent-idHopper:\x20','[booked][RR][finaly]','[booked][unlock]','[unlock2][syncQueueStatusComplete]','[unlock3][syncQueueStatusComplete]','Success','[callProgressDetecting]\x20','variable','amdstatus','exten','xcally-motion-dialer','dialAMDActive','value','HANGUP','outboundAnswerAgiCallsDay','HangupInAMD','membername','AMD','buildObj','saveInDb','[syncHangupInAMD]','MACHINE','Machine','countmachineretry','amd','custom:amd','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countagentrejectretry','dialGlobalMaxRetry','stateGlobal','reason19\x20machine....','createStateFinal','reason\x2019\x20machine....','dialMachineRetryFrequency','[rescheduleContact][Machine]','[syncHangupInAMDIvr]','[syncAgentComplete][createHistory][0]','ivrAnswerCallsDay','[syncHangupIvr][createHistory]','dialQueueProject','AnswerAGI','AGI','[syncHangupIvr]','cause-txt','queuesSummary','running','statusMessage','inUse','talking','[syncQueueSummary]','compareToOutboundQueue','queueSummaryCountersUpdated','updateReportFromOutboundQueue','assign','throttle','dialPreviewRecallmeReminder','filter','handlePreviewRecallNotifications','map','Agent','user:%s','user:dialPreviewRecallReminder','clearZombieChannels','[uniqueid]','[actions]','sequence','enqueue','[Dialer][checkChannel][ivr]','getVoiceQueueRtPauses','[getVoiceQueueRtPauses]\x20','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','loggerHandler','emptyContact','notFound','UserId','[emptyContact][createHistory]','[emptyContact]','[syncQueueCallerAbandon]\x20[Drop]','checkPreviewRecallReminder','handleIvr','object','originate','phone','contact\x20is\x20undefine','getCaller','\x22agi://%s/square,%s\x22','NONE','isOutboundQueue','\x22%s,%s%s,,,%s\x22','dialQueueOptions','dialAgiAfterHangupAgent','dialer','ACTIVE','XMD-AMDINITIALSILENCE','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDGreeting','dialAMDMinWordLength','XMD-AMDBETWEENWORDSSILENCE','dialAMDBetweenWordsSilence','XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','XMD-AMDSILENCETHRESHOLD','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','dialAMDMaximumWordLength','Contact','createdAt','updatedAt','Trunk','getCallerId','callerid','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','dialOriginateCallerIdNumber','XMD-ORIGINATECALLERIDNAME','XMD-ORIGINATECALLERIDNUM','variables','dialPrefix','trim','dialCutDigit','substring','SIP/%s/%s%s','from-sip','dialOriginateTimeout','OriginateError','[originate][error]','originate\x20action\x20Error','[rescheduleContact][NoAnswer]','dialCongestionMaxRetry','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','[rescheduleContact][NoSuchNumber]','dialAbandonedRetryFrequency','[rescheduleContact][Abandoned]','dialMachineMaxRetry','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','[rescheduleContact][AgentReject]','callProgressDetecting','[callProgressDetecting]','outboundNoSuchCallsDay','NoSuchNumber','custom:agentnosuchnumber','nosuchnumber','checkRetriveMax','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','buildNoAnswerEventPayload','custom:agentnoanswer','dialNoAnswerRetryFrequency','[syncAgentComplete][createHistory][3]','dialNoAnswerMaxRetry','reason\x203\x20ringing\x20no\x20answer','outboundBusyCallsDay','Busy','busy','dialBusyRetryFrequency','[syncAgentComplete][createHistory][5]','dialBusyMaxRetry','reason\x205\x20busy','outboundCongestionCallsDay','Congestion','custom:agentcongestion','congestion','[syncAgentComplete][createHistory][8]','reason\x208\x20congestion','outboundAbandonedCallsDay','reason\x2011\x20abandoned','AgentReject','custom:agentreject','reason\x2020\x20agentreject','outboundUnknownCallsDay','[syncAgentComplete][createHistory][?]','Global','[moveContactManagedDialer][0]','contact\x20not\x20moved','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','round','predictiveIntervalMinThreshold','available','floor','predictiveIntervalHitRate','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','dialPredictiveInterval','[startMethodPredictive][StartProgressive][Loop]','dialPredictiveOptimization','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','started\x20in\x20predictive\x20at','avgHandleTime','getDataPredictive','startMethodPredictive','Predictive\x20after\x20first\x20interval','Predictive\x20for\x20every\x20interval','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20less\x20than\x20threshold\x20(',')\x20are\x20more\x20than\x20threshold\x20(','dialPredictiveOptimizationPercentage','abandonmentRate','agentBusyFactor','busyFactor','[getDataPredictive]','check\x20failure','getDataPredictiveOld','loggedIn','outboundQueuePauses','predictiveIntervalPauses','one\x20call\x20every:','milliseconds','[handlePredictive]','fail\x20to\x20scheduled\x20calls','checkContactBlack','[booked][checkContactBlack]','Queue:\x20','queuestatus','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','actionOriginate','scheduledat','dialRecallMeTimeout','unlockContact','[rescheduleContact][dialRecallInQueue]','QUEUE_RECALL','RecallInQueue','[Originate][HistoryDialRecallInQueue][historyCatch]','RECALL_TIMEOUT','[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]','outboundBlacklistCallsDay','BLACKLIST','Blacklist','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','inBlackList','temp','getContactDialerIvr','checkContactEmpty','ivrTotalCallsDays','[actionOriginate]\x20','checkIsBlackListIvr','dialLimitQueue','pTalking','[countReScheduled]\x20','RUNNING','checkIsBlackList','[getContactDialer2]','tryOriginatePredictive','[handlePredictive][limitChannel]','not_inuse','getContactDialer','dialOrderByScheduledAt','[actionOriginatePredictive]\x20','--------\x20Drop\x20Rate\x20--------','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[abandonmentRate]','m\x20=\x20','p\x20=\x20','interval\x20=\x20','Amax\x20=\x20','erlangb','----\x20Agent\x20Busy\x20Factor\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','Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[busyFactor]','Umin\x20=\x20','exports','lodash','uuid','moment','ioredis','./utils','./utils/hopper','../preview/util/util','../../../config/environment/','booked','../../../config/logger','predictive','predictiveCalls','syncQueueSummary','../ami','redis','defaults','localhost','socket.io-emitter','../rpc/cmHopper','../rpc/interval','./models/history','./models/final','./models/agentComplete','./models/queueCallerAbandon','./models/hangup','XCALLY_IP_AGI','127.0.0.1','prototype','tail','finally','preview','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','channels','contactsId','uniqueId','optionPredictive','startPredictive','startProgressive','ivrOriginated','queueBooked','queueBookedRR','agentconnect','syncAgentConnect','queuecallerabandon','syncQueueCallerAbandon','originateresponse','syncOriginateResponse','bind','agentcomplete','syncAgentComplete','custom:queuesummary','custom:queuesummarycomplete','syncQueueSummaryComplete','syncHangup','newexten','syncNewExten','varset','syncVarSet','queuemember','syncQueueMember','syncQueueStatusComplete','loopCampaigns','loopClearZombieChannels','previewRecallmeReminderInterval','emit','type','debug','format','voice:queue:%s','voice_queue:save','isEmpty','info','-----\x20Stats\x20Predictive\x20---','Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls'];(function(_0x4ec7c9,_0x17d6fd){var _0x7b3e6a=function(_0x4cf2a0){while(--_0x4cf2a0){_0x4ec7c9['push'](_0x4ec7c9['shift']());}};_0x7b3e6a(++_0x17d6fd);}(_0x282f,0x1d1));var _0xf282=function(_0x2f7b77,_0x297376){_0x2f7b77=_0x2f7b77-0x0;var _0x588e0a=_0x282f[_0x2f7b77];return _0x588e0a;};'use strict';var util=require('util');var _=require(_0xf282('0x0'));var uuid=require(_0xf282('0x1'));var moment=require(_0xf282('0x2'));var rr=require('rr');var Redis=require(_0xf282('0x3'));var utils=require(_0xf282('0x4'));var hopperUtils=require(_0xf282('0x5'));var ut=require(_0xf282('0x6'));var config=require(_0xf282('0x7'));var logger=require('../../../config/logger')('dialer');var loggerBooked=require('../../../config/logger')(_0xf282('0x8'));var loggerPredictive=require(_0xf282('0x9'))(_0xf282('0xa'));var loggerPredictiveCalls=require('../../../config/logger')(_0xf282('0xb'));var loggerSyncQueueSummary=require('../../../config/logger')(_0xf282('0xc'));var ami=require(_0xf282('0xd'));config[_0xf282('0xe')]=_[_0xf282('0xf')](config['redis'],{'host':_0xf282('0x10'),'port':0x18eb});var io=require(_0xf282('0x11'))(new Redis(config[_0xf282('0xe')]));var cmHopper=require(_0xf282('0x12'));var voiceQueueRt=require('../rpc/voiceQueueRt');var RpcSetting=require('../rpc/setting');var Interval=require(_0xf282('0x13'));var Action=require('./models/action');var History=require(_0xf282('0x14'));var Final=require(_0xf282('0x15'));var AgentComplete=require(_0xf282('0x16'));var QueueCallerAbandon=require(_0xf282('0x17'));var Hangup=require(_0xf282('0x18'));var ipAgi=process['env'][_0xf282('0x19')]||_0xf282('0x1a');var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence[_0xf282('0x1b')]['enqueue']=function(_0x460495){this[_0xf282('0x1c')]=this['tail']?this[_0xf282('0x1c')][_0xf282('0x1d')](_0x460495):_0x460495();};function Dialer(_0x393546,_0x5706ef){this['sequence']=new Sequence();this[_0xf282('0x1e')]=_0x5706ef;this[_0xf282('0x1f')]=_0x393546[_0xf282('0x1f')];this[_0xf282('0x20')]=_0x393546[_0xf282('0x20')];this[_0xf282('0x21')]=_0x393546[_0xf282('0x21')];this[_0xf282('0x22')]=_0x393546[_0xf282('0x22')];this[_0xf282('0x23')]=config[_0xf282('0x23')]||0x2;this[_0xf282('0x24')]={};this['actions']={};this[_0xf282('0x25')]={};this[_0xf282('0x26')]={};this[_0xf282('0x27')]={};this[_0xf282('0x28')]={};this[_0xf282('0x29')]={};this[_0xf282('0x2a')]={};this[_0xf282('0x2b')]={};this[_0xf282('0x2c')]={};this['queuesSummary']={};ami['on'](_0xf282('0x2d'),this[_0xf282('0x2e')]['bind'](this));ami['on'](_0xf282('0x2f'),this[_0xf282('0x30')]['bind'](this));ami['on'](_0xf282('0x31'),this[_0xf282('0x32')][_0xf282('0x33')](this));ami['on'](_0xf282('0x34'),this[_0xf282('0x35')][_0xf282('0x33')](this));ami['on'](_0xf282('0x36'),this[_0xf282('0xc')][_0xf282('0x33')](this));ami['on'](_0xf282('0x37'),this[_0xf282('0x38')][_0xf282('0x33')](this));ami['on']('hangup',this[_0xf282('0x39')][_0xf282('0x33')](this));ami['on'](_0xf282('0x3a'),this[_0xf282('0x3b')][_0xf282('0x33')](this));ami['on'](_0xf282('0x3c'),this[_0xf282('0x3d')]['bind'](this));ami['on'](_0xf282('0x3e'),this[_0xf282('0x3f')]['bind'](this));ami['on']('queuestatuscomplete',this[_0xf282('0x40')]['bind'](this));this[_0xf282('0x41')]();this[_0xf282('0x42')]();RpcSetting['getSettings']()['then'](function(_0x5adbdd){previewRecallmeReminderInterval=_0x5adbdd[_0xf282('0x43')];});}function isNotNull(_0x39d677){return _0x39d677!==null&&!_['isUndefined'](_0x39d677);}function msgResponse(_0x25ec37,_0x22b893,_0x314abb){return{'action':_0x25ec37,'response':_0x22b893,'message':_0x314abb,'stack':_0x314abb};}function emit(_0x2ed9bb,_0x361bd6,_0x59ff55){io['to'](_0x2ed9bb)[_0xf282('0x44')](_0x361bd6,_0x59ff55);}function emitOutboundVoiceQueueSummary(_0x3edc8b){if(_0x3edc8b[_0xf282('0x45')]==='outbound'){logger[_0xf282('0x46')]('[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:',util['inspect'](_0x3edc8b,{'showHidden':![],'depth':null}));emit(util[_0xf282('0x47')](_0xf282('0x48'),_0x3edc8b['name']),_0xf282('0x49'),_0x3edc8b);}}function checkGetDataPredictive(_0x11dcae){if(isNotNull(_0x11dcae)&&!_[_0xf282('0x4a')](_0x11dcae)){loggerPredictive[_0xf282('0x4b')](_0xf282('0x4c'));loggerPredictive[_0xf282('0x4b')](_0xf282('0x4d'),_0x11dcae[_0xf282('0x4e')]);loggerPredictive[_0xf282('0x4b')]('Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x11dcae[_0xf282('0x4f')]);loggerPredictive[_0xf282('0x4b')]('Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x11dcae['predictiveIntervalDroppedCallsTimeout']);loggerPredictive['info'](_0xf282('0x50'),_0x11dcae[_0xf282('0x51')]);loggerPredictive[_0xf282('0x4b')](_0xf282('0x52'),_0x11dcae[_0xf282('0x53')]);loggerPredictive['info'](_0xf282('0x54'),_0x11dcae[_0xf282('0x55')]);loggerPredictive[_0xf282('0x4b')](_0xf282('0x56'));if(_0x11dcae[_0xf282('0x4e')]>0x0){if(!_[_0xf282('0x57')](_0x11dcae[_0xf282('0x55')])&&_0x11dcae[_0xf282('0x55')]>0x0){return!![];}loggerPredictive[_0xf282('0x4b')](_0xf282('0x58'));if(!_[_0xf282('0x57')](_0x11dcae['predictiveIntervalAvgHoldtime'])&&_0x11dcae['predictiveIntervalAvgHoldtime']>0x0){return!![];}loggerPredictive[_0xf282('0x4b')](_0xf282('0x59'));}else{loggerPredictive[_0xf282('0x4b')](_0xf282('0x5a'));}}else{loggerPredictive[_0xf282('0x4b')](_0xf282('0x5b'));}return![];}function mergeDataErlangB(_0x1b7ad0){return function(_0x3d4d2e){loggerPredictive[_0xf282('0x4b')](_0xf282('0x5c'));loggerPredictive[_0xf282('0x4b')](_0xf282('0x5d'),_0x3d4d2e[_0xf282('0x5e')]);loggerPredictive['info'](_0xf282('0x5f'),_0x3d4d2e[_0xf282('0x60')]);loggerPredictive['info'](_0xf282('0x61'),_0x3d4d2e['erlangAbandonmentRate']);loggerPredictive[_0xf282('0x4b')](_0xf282('0x62'),_0x3d4d2e['erlangBusyFactor']);loggerPredictive[_0xf282('0x4b')](_0xf282('0x61'),_0x3d4d2e[_0xf282('0x63')]);loggerPredictive[_0xf282('0x4b')]('---------------------------');_[_0xf282('0x64')](_0x1b7ad0,_0x3d4d2e);};}function ifInterval(_0x4144aa,_0x3a0cbd){if(_['isUndefined'](_0x3a0cbd)){return![];}return utils[_0xf282('0x65')](undefined,_0x3a0cbd)<_0x4144aa*0x3c;}function clearPredictiveAttributes(_0xb3efb8){if(_0xb3efb8[_0xf282('0x29')]){_0xb3efb8[_0xf282('0x29')]=undefined;loggerPredictive[_0xf282('0x46')](_0xb3efb8[_0xf282('0x66')],'startProgressive\x20value\x20cleared');}if(_0xb3efb8[_0xf282('0x28')]){_0xb3efb8[_0xf282('0x28')]=undefined;loggerPredictive[_0xf282('0x46')](_0xb3efb8['name'],_0xf282('0x67'));}if(_0xb3efb8[_0xf282('0x68')]){clearInterval(_0xb3efb8[_0xf282('0x68')]);_0xb3efb8[_0xf282('0x68')]=undefined;loggerPredictive['debug'](_0xb3efb8[_0xf282('0x66')],_0xf282('0x69'));}}function loggerCatchPredictive(_0x1df720,_0x2771db){return function(_0x1729d4){loggerPredictive[_0xf282('0x6a')](_0x2771db[_0xf282('0x66')],_0x1df720);loggerPredictive[_0xf282('0x6a')](_0x1729d4[_0xf282('0x6b')]);clearPredictiveAttributes(_0x2771db);};}function loggerCatch(_0x4997b3){return function(_0x5a3109){logger[_0xf282('0x6a')](_0x4997b3,util[_0xf282('0x6c')](_0x5a3109,{'showHidden':![],'depth':null}));};}function loggerGetContactDialer(_0x112ede,_0xf02260,_0x56233a){return function(_0x303062){utils[_0xf282('0x6d')](_0xf02260,_0x56233a,0x0);logger[_0xf282('0x6a')](_0x112ede,util[_0xf282('0x6c')](_0x303062,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0xc5ecf1){return function(_0x5079e9){if(isNotNull(_0x5079e9)&&isNotNull(_0x5079e9[0x0])){if(_0x5079e9[0x0][_0xf282('0x6e')]>0x0){_0xc5ecf1[_0xf282('0x6f')]=utils[_0xf282('0x70')][_0xf282('0x71')];logger[_0xf282('0x4b')](_0xf282('0x72')+_0xc5ecf1[_0xf282('0x66')],_0x5079e9[0x0][_0xf282('0x6e')],_0xf282('0x73'));}else{_0xc5ecf1['message']=utils[_0xf282('0x70')]['NO_AVAILABLE_CONTACTS'];logger['info']('[getContactDialer2][Empty]'+_0xc5ecf1[_0xf282('0x66')]);}}};}function createObjHistory(_0x503cf7,_0x1ba24b,_0x3a7f1d,_0x332a03,_0x42a51b){_0x503cf7[_0xf282('0x6f')]=_0x3a7f1d;var _0x5001e0=new Action(_0x503cf7,_0x1ba24b);var _0x13d035=new History(_0x5001e0);_0x13d035[_0xf282('0x74')]=_0x332a03;_0x13d035[_0xf282('0x75')]=_0x42a51b;_0x13d035[_0xf282('0x76')]=_0x5001e0[_0xf282('0x77')];return _0x13d035;}function unlockQueueStatus(_0x22ec93,_0x47d2d0){setTimeout(function(){if(_[_0xf282('0x57')](_0x22ec93[_0xf282('0x78')])){loggerBooked['error'](_0xf282('0x79'),_0x47d2d0);}_0x22ec93['queueStatusComplete']=!![];loggerBooked[_0xf282('0x4b')](_0xf282('0x7a'),_0x47d2d0,JSON[_0xf282('0x7b')](_[_0xf282('0x7c')](_0x22ec93,[_0xf282('0x66'),'queueStatusComplete'])));},0x1f3);}function checkInterval(_0x263366){return function(){if(!isNotNull(_0x263366[_0xf282('0x7d')])){_0x263366['message']=utils[_0xf282('0x70')]['NULL_INTERVAL'];throw _0x263366['name']+'\x20INTERVAL_IS_NULL';}if(!isNotNull(_0x263366[_0xf282('0x7d')][_0xf282('0x7e')])){_0x263366[_0xf282('0x6f')]=utils[_0xf282('0x70')][_0xf282('0x7f')];throw _0x263366[_0xf282('0x66')]+_0xf282('0x80');}if(!isNotNull(_['isEmpty'](_0x263366[_0xf282('0x7d')]['Intervals']))){_0x263366[_0xf282('0x6f')]=utils[_0xf282('0x70')][_0xf282('0x7f')];throw _0x263366[_0xf282('0x66')]+_0xf282('0x80');}};}function checkIsIVRCampaignActive(_0x316ca7){return function(){if(!utils[_0xf282('0x81')](_0x316ca7)){_0x316ca7[_0xf282('0x6f')]=utils[_0xf282('0x70')][_0xf282('0x82')];throw _0x316ca7[_0xf282('0x66')]+'\x20NOT\x20Active';}};}function emitCampaignSummary(_0x55b0db){if(utils['isIVRCampaign'](_0x55b0db)){emit(util[_0xf282('0x47')](_0xf282('0x83'),_0x55b0db[_0xf282('0x66')]),_0xf282('0x84'),_0x55b0db);}}function loggerCatchQueueSummary(_0x48ad80,_0x574d98){return function(_0x1d46f0){clearPredictiveAttributes(_0x574d98);emitCampaignSummary(_0x574d98);loggerSyncQueueSummary[_0xf282('0x46')](_0x48ad80,util['inspect'](_0x1d46f0,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x454d56){if(_0x454d56[_0xf282('0x85')]){if(_0x454d56[_0xf282('0x86')]===0x0){_0x454d56[_0xf282('0x85')]=![];_0x454d56['message']=utils[_0xf282('0x70')][_0xf282('0x82')];loggerSyncQueueSummary[_0xf282('0x46')](_0xf282('0x87'),_0x454d56['name'],_0xf282('0x88'));}else{_0x454d56[_0xf282('0x6f')]=utils[_0xf282('0x70')]['DISACTIVED'];loggerSyncQueueSummary[_0xf282('0x46')]('[syncQueueSummary]\x20Campaign\x20Ivr:\x20',_0x454d56[_0xf282('0x66')],'is\x20disactive');}emitCampaignSummary(_0x454d56);}}function myreject(_0x24e070){return function(_0x1fc2c1){return _0x24e070(msgResponse(_0xf282('0x89'),_0xf282('0x8a'),JSON[_0xf282('0x7b')](_0x1fc2c1)));};}Dialer[_0xf282('0x1b')][_0xf282('0x8b')]=function(_0x370e41){return!_[_0xf282('0x57')](_0x370e41)&&_0x370e41&&!_['isUndefined'](_0x370e41[_0xf282('0x66')])&&!_[_0xf282('0x57')](_0x370e41['active'])&&_0x370e41[_0xf282('0x8c')]&&(this[_0xf282('0x22')][util[_0xf282('0x47')]('SIP/%s',_0x370e41[_0xf282('0x66')])][_0xf282('0x8d')]===_0xf282('0x8e')||this[_0xf282('0x22')][util['format'](_0xf282('0x8f'),_0x370e41[_0xf282('0x66')])][_0xf282('0x8d')]===_0xf282('0x90'));};Dialer[_0xf282('0x1b')][_0xf282('0x91')]=function(_0x3b690a){var _0x3def11=this;return function(){if(!_0x3def11['isTrunkReachable'](_0x3b690a['Trunk'])){if(!_0x3def11[_0xf282('0x8b')](_0x3b690a[_0xf282('0x92')])){_0x3b690a[_0xf282('0x6f')]=utils[_0xf282('0x70')][_0xf282('0x93')];throw _0x3b690a[_0xf282('0x66')]+'\x20trunk\x20is\x20not\x20reachable';}}};};Dialer[_0xf282('0x1b')][_0xf282('0x94')]=function(_0xabf0f8,_0x3defb9,_0x40154c,_0x532ff6){var _0x35bf75=this;return function(){var _0x6343e2=!![];return _0x35bf75[_0xf282('0x95')](_0xabf0f8,_0x3defb9,_0x40154c,_0x532ff6,_0x6343e2);};};Dialer[_0xf282('0x1b')][_0xf282('0x96')]=function(_0x4a87a3,_0x13abd3,_0x233bc6,_0x33084e){var _0x15d3da=this;return function(){var _0x5c66b8=![];return _0x15d3da[_0xf282('0x95')](_0x4a87a3[_0xf282('0x7e')],_0x13abd3,_0x233bc6,_0x33084e,_0x5c66b8);};};Dialer['prototype'][_0xf282('0x95')]=function(_0x6383d8,_0x269095,_0x12c274,_0x196f20,_0x19f2da){var _0x14298d=[];return new Promise(function(_0xcd05b8,_0x54ff04){if(!isNotNull(_0x6383d8)){_0x196f20['message']=utils[_0xf282('0x70')][_0xf282('0x7f')];return _0x54ff04(msgResponse(_0xf282('0x97'),_0xf282('0x98'),_0x12c274+_0xf282('0x99')));}if(_[_0xf282('0x4a')](_0x6383d8)){_0x196f20[_0xf282('0x6f')]=utils[_0xf282('0x70')][_0xf282('0x9a')];return _0x54ff04(msgResponse(_0xf282('0x97'),_0xf282('0x98'),_0x12c274+_0xf282('0x9b')));}if(_0x269095&&_[_0xf282('0x57')](config[_0xf282('0x9c')][_0x269095])){_0x196f20[_0xf282('0x6f')]=utils[_0xf282('0x70')][_0xf282('0x9d')];return _0x54ff04(msgResponse('ifTime','Failure',_0x12c274+_0xf282('0x9e')+_0x269095));}if(_[_0xf282('0x9f')](_0x6383d8)){for(var _0x24c587=0x0;_0x24c587<_0x6383d8['length'];_0x24c587+=0x1){_0x14298d[_0xf282('0xa0')](ami[_0xf282('0xa1')]({'action':'command','command':util[_0xf282('0x47')]('iftime\x20%s,%s',_0x6383d8[_0x24c587][_0xf282('0xa2')],!_[_0xf282('0x57')](config[_0xf282('0x9c')][_0x269095])?_0x269095:'')})['then'](function(_0xa5646d){return _0xa5646d['content']['indexOf'](_0xf282('0xa3'))>=0x0;})['catch'](myreject(_0x54ff04)));}}else{_0x14298d['push'](ami[_0xf282('0xa1')]({'action':_0xf282('0xa4'),'command':util['format'](_0xf282('0xa5'),_0x6383d8,!_['isUndefined'](config[_0xf282('0x9c')][_0x269095])?_0x269095:'')})['then'](function(_0x302ad0){return _0x302ad0['content'][_0xf282('0xa6')](_0xf282('0xa3'))>=0x0;})[_0xf282('0xa7')](myreject(_0x54ff04)));}Promise[_0xf282('0xa8')](_0x14298d)['then'](function(_0x139403){var _0x1c73e2=_[_0xf282('0xa9')](_0x139403);if(_0x1c73e2){return _0xcd05b8(_0x1c73e2);}else{_0x196f20[_0xf282('0x6f')]=_0x19f2da?utils[_0xf282('0x70')][_0xf282('0xaa')]:utils[_0xf282('0x70')][_0xf282('0xab')];return _0x54ff04(msgResponse(_0xf282('0xac'),_0xf282('0x98'),_0xf282('0xad')+_0x19f2da+'\x20'+_0x12c274+'\x20Interval\x20is\x20overtime:\x20'+util[_0xf282('0x6c')](_0x6383d8,{'showHidden':![],'depth':null})+_0xf282('0xae')+_0x269095));}})[_0xf282('0xa7')](function(_0x4b2024){return _0x54ff04(msgResponse(_0xf282('0x97'),_0xf282('0x98'),JSON[_0xf282('0x7b')](_0x4b2024)));});});};Dialer['prototype'][_0xf282('0x41')]=function(){var _0x1ba60b=this;return cmHopper[_0xf282('0xaf')]({'active':![]},{'where':{'active':!![]}})[_0xf282('0xb0')](function(){setInterval(function(){_0x1ba60b[_0xf282('0xb1')]();},0x3e8);});};Dialer[_0xf282('0x1b')][_0xf282('0xb1')]=function(){var _0x20eb4d=this;var _0x36f113;for(var _0x3e084e in this[_0xf282('0x20')]){if(typeof this[_0xf282('0x20')][_0x3e084e]!==_0xf282('0xb2')){_0x36f113=this[_0xf282('0x20')][_0x3e084e];if(utils[_0xf282('0xb3')](_0x36f113)&&utils[_0xf282('0x81')](_0x36f113)){_0x36f113[_0xf282('0x85')]=!![];Promise[_0xf282('0xb4')]()['then'](checkIsIVRCampaignActive(_0x36f113))['then'](checkInterval(_0x36f113))['then'](_0x20eb4d[_0xf282('0x91')](_0x36f113))[_0xf282('0xb0')](_0x20eb4d[_0xf282('0x94')](_0x36f113['dialGlobalInterval'],_0x36f113[_0xf282('0xb5')],_0x36f113[_0xf282('0x66')],_0x36f113))['then'](_0x20eb4d[_0xf282('0x96')](_0x36f113['Interval'],_0x36f113['dialTimezone'],_0x36f113['name'],_0x36f113))[_0xf282('0xb0')](_0x20eb4d[_0xf282('0xb6')](_0x36f113))[_0xf282('0xa7')](loggerCatchQueueSummary(_0xf282('0xb7'),_0x36f113));}else{notSendMessagesCampaign(_0x36f113);}}}};Dialer[_0xf282('0x1b')][_0xf282('0xb8')]=function(_0x19673b){if(_0x19673b[_0xf282('0xb9')]!==_0xf282('0xa')){clearPredictiveAttributes(_0x19673b);}switch(_0x19673b[_0xf282('0xb9')]){case _0xf282('0xba'):this[_0xf282('0xbb')](_0x19673b,0x1);break;case _0xf282('0xbc'):this[_0xf282('0xbb')](_0x19673b,_0x19673b['dialPowerLevel']);break;case _0xf282('0xa'):this['predictive'](_0x19673b);break;case _0xf282('0x8'):this[_0xf282('0xbb')](_0x19673b,0x1);break;default:logger[_0xf282('0x6a')](_0xf282('0xbd'),_0x19673b[_0xf282('0x66')],_0xf282('0xbe'));}};Dialer[_0xf282('0x1b')][_0xf282('0x97')]=function(_0x26af86,_0x4a625b){var _0x223f6b=_0x26af86[_0xf282('0xb5')];var _0x20107b=_0x4a625b?_0x26af86['dialGlobalInterval']:_0x26af86[_0xf282('0x7d')][_0xf282('0x7e')];logger[_0xf282('0xbf')](_0xf282('0xc0'),_0x20107b,_0x223f6b,_0x26af86[_0xf282('0x66')],util[_0xf282('0x47')](_0xf282('0xc1'),_0x26af86[_0xf282('0x66')],_0x26af86['id']));var _0x559576=null;return Interval[_0xf282('0xc2')](_0x20107b,_0x223f6b)[_0xf282('0xb0')](function(_0x57faff){if(_0x57faff===!![]){return _0x57faff;}else{_0x26af86[_0xf282('0x6f')]=_0x4a625b?utils[_0xf282('0x70')][_0xf282('0xaa')]:utils[_0xf282('0x70')]['OVERTIME_INTERVAL'];_0x559576=msgResponse('[ifTime][promiseAll]',_0xf282('0x98'),_0xf282('0xad')+_0x4a625b+'\x20'+_0x26af86[_0xf282('0x66')]+_0xf282('0xc3')+util['inspect'](_0x20107b,{'showHidden':![],'depth':null})+'Timezone:\x20'+_0x223f6b);}if(_0x559576!==null){logger[_0xf282('0xbf')](_0xf282('0xc4'),_0x559576);_0x559576['isGlobal']=_0x4a625b;throw _0x559576;}})[_0xf282('0xa7')](function(_0x549881){logger[_0xf282('0x6a')]('AMI\x20IfTime',_0x549881);throw msgResponse(_0xf282('0x89'),_0xf282('0x8a'),util['inspect'](_0x549881,{'showHidden':![],'depth':null}));});};Dialer[_0xf282('0x1b')][_0xf282('0x2e')]=function(_0x183c18){if(this['voiceQueues'][_0x183c18[_0xf282('0xc5')]]){if(this['uniqueId'][_0x183c18[_0xf282('0xc6')]]&&this[_0xf282('0x26')][_0x183c18[_0xf282('0xc6')]][_0xf282('0x45')]!=='ivr'){this[_0xf282('0xc7')](this['voiceQueues'][_0x183c18['queue']]);this[_0xf282('0x26')][_0x183c18['uniqueid']]['answertime']=moment()[_0xf282('0x47')](_0xf282('0xc8'));}}};Dialer[_0xf282('0x1b')][_0xf282('0x35')]=function(_0x283c2a){var _0x230da8=this['uniqueId'][_0x283c2a[_0xf282('0xc6')]];if(this[_0xf282('0x1f')][_0x283c2a[_0xf282('0xc5')]]){if(_0x230da8&&_0x230da8[_0xf282('0x45')]!==_0xf282('0xc9')){delete this[_0xf282('0x26')][_0x283c2a[_0xf282('0xc6')]];this[_0xf282('0x1f')][_0x283c2a[_0xf282('0xc5')]][_0xf282('0xca')]+=0x1;var _0x389ad2=new AgentComplete(_0x230da8,_0x283c2a);if(_0x283c2a[_0xf282('0xcb')]===_0xf282('0xcc')){_0x389ad2[_0xf282('0xcd')]=this[_0xf282('0x1f')][_0x283c2a[_0xf282('0xc5')]][_0xf282('0xce')]&&this[_0xf282('0x1f')][_0x283c2a[_0xf282('0xc5')]]['dialAgiAfterHangupAgent']?moment()[_0xf282('0x47')](_0xf282('0xc8')):undefined;}hopperUtils[_0xf282('0xcf')](_0x389ad2)['catch'](loggerCatch(_0xf282('0xd0')));hopperUtils[_0xf282('0xd1')](_0x389ad2)['catch'](loggerCatch('[syncAgentComplete]'));}}};Dialer[_0xf282('0x1b')][_0xf282('0x30')]=function(_0x80a6ea){var _0x321b7b=this['uniqueId'][_0x80a6ea['uniqueid']];var _0x9f4df2=this;var _0x491e70=![];var _0x109064;var _0xe2298f;if(this[_0xf282('0x1f')][_0x80a6ea['queue']]){if(_0x321b7b&&_0x321b7b[_0xf282('0x45')]!==_0xf282('0xc9')){delete this[_0xf282('0x26')][_0x80a6ea[_0xf282('0xc6')]];this[_0xf282('0xc7')](this[_0xf282('0x1f')][_0x80a6ea['queue']]);_0x321b7b[_0xf282('0xd2')]=moment()[_0xf282('0x47')](_0xf282('0xc8'));var _0x20fd84=new QueueCallerAbandon(_0x321b7b,_0x80a6ea);if(utils[_0xf282('0x65')](_0x321b7b[_0xf282('0xd2')],_0x321b7b['responsetime'])>=_0x321b7b['dialQueueTimeout']){this[_0xf282('0x1f')][_0x80a6ea[_0xf282('0xc5')]][_0xf282('0xd3')]+=0x1;this[_0xf282('0x1f')][_0x80a6ea['queue']][_0xf282('0xd4')]+=0x1;this[_0xf282('0x1f')][_0x80a6ea['queue']][_0xf282('0xd5')]+=0x1;_0x20fd84[_0xf282('0x74')]=0xa;_0x20fd84['statedesc']=_0xf282('0xd6');_0x20fd84[_0xf282('0xd7')]=_0xf282('0xd8');_0x20fd84[_0xf282('0xcd')]=this[_0xf282('0x1f')][_0x80a6ea['queue']][_0xf282('0xce')]?moment()['format'](_0xf282('0xc8')):undefined;_0x20fd84[_0xf282('0xd9')]+=0x1;_0x20fd84[_0xf282('0xda')]+=0x1;_0x109064=this[_0xf282('0x1f')][_0x80a6ea[_0xf282('0xc5')]]['dialDropRetryFrequency'];_0xe2298f=this[_0xf282('0x1f')][_0x80a6ea[_0xf282('0xc5')]][_0xf282('0xdb')];hopperUtils[_0xf282('0xdc')](_0x20fd84,_0x20fd84[_0xf282('0x74')],_0x321b7b[_0xf282('0xdd')])[_0xf282('0xb0')](function(_0x4a0d39){_0x491e70=_0x4a0d39[_0xf282('0xde')]==0x1;if(_0x20fd84['countdropretry']>=_0x9f4df2['voiceQueues'][_0x80a6ea[_0xf282('0xc5')]]['dialDropMaxRetry']){_0x9f4df2[_0xf282('0xdf')](_0x20fd84,_0x4a0d39[_0xf282('0xde')]);}else{hopperUtils[_0xf282('0xe0')]({'active':![],'countdropretry':_0x20fd84[_0xf282('0xd9')],'scheduledat':moment()[_0xf282('0xe1')](_0x9f4df2['voiceQueues'][_0x80a6ea['queue']][_0xf282('0xe2')],'minutes')[_0xf282('0x47')](_0xf282('0xc8')),'ContactId':_0x321b7b[_0xf282('0xe3')],'ListId':_0x321b7b[_0xf282('0xe4')],'VoiceQueueId':_0x321b7b['VoiceQueueId']||undefined,'CampaignId':_0x321b7b[_0xf282('0xe5')]||undefined})[_0xf282('0xa7')](loggerCatch(_0xf282('0xe6')));var _0x337786=new History(_0x20fd84);_0x337786[_0xf282('0x74')]=0xa;_0x337786[_0xf282('0x75')]=_0xf282('0xd6');_0x337786[_0xf282('0x77')]=moment()[_0xf282('0x47')](_0xf282('0xc8'));_0x337786[_0xf282('0x76')]=_0x337786['starttime'];_0x337786[_0xf282('0xe7')]=_0x20fd84[_0xf282('0xe7')];_0x337786[_0xf282('0xe8')]=_0x20fd84[_0xf282('0xe8')];hopperUtils[_0xf282('0xcf')](_0x337786)[_0xf282('0xa7')](loggerCatch(_0xf282('0xe9')));}})[_0xf282('0xb0')](function(){if(_0x491e70)hopperUtils[_0xf282('0xea')](_0x20fd84,_0x109064,_0xe2298f)['then'](function(){return 0x1;});});}else{this['voiceQueues'][_0x80a6ea[_0xf282('0xc5')]]['predictiveIntervalDroppedCallsCallersExit']+=0x1;this[_0xf282('0x1f')][_0x80a6ea['queue']][_0xf282('0xeb')]+=0x1;_0x20fd84[_0xf282('0x74')]=0xb;_0x20fd84['statedesc']='Abandoned';_0x20fd84[_0xf282('0xd7')]='CALLEREXIT';_0x20fd84['countabandonedretry']+=0x1;_0x20fd84['countglobal']+=0x1;_0x109064=this[_0xf282('0x1f')][_0x80a6ea['queue']]['dialAbandonedRetryFrequency'];_0xe2298f=this[_0xf282('0x1f')][_0x80a6ea[_0xf282('0xc5')]]['callAdditionalPhoneAfterMin'];hopperUtils[_0xf282('0xdc')](_0x20fd84,_0x20fd84[_0xf282('0x74')],_0x321b7b[_0xf282('0xdd')])[_0xf282('0xb0')](function(_0x26af59){if(_0x20fd84[_0xf282('0xec')]>=_0x9f4df2[_0xf282('0x1f')][_0x80a6ea['queue']][_0xf282('0xed')]){_0x9f4df2['queueCallerAbandonCreateState'](_0x20fd84,_0x26af59[_0xf282('0xde')]);}else{hopperUtils[_0xf282('0xe0')]({'active':![],'countabandonedretry':_0x20fd84['countabandonedretry'],'scheduledat':moment()['add'](_0x9f4df2[_0xf282('0x1f')][_0x80a6ea[_0xf282('0xc5')]]['dialAbandonedRetryFrequency'],_0xf282('0xee'))['format'](_0xf282('0xc8')),'ContactId':_0x321b7b[_0xf282('0xe3')],'ListId':_0x321b7b['ListId'],'VoiceQueueId':_0x321b7b['VoiceQueueId']||undefined,'CampaignId':_0x321b7b[_0xf282('0xe5')]||undefined})[_0xf282('0xa7')](loggerCatch('[rescheduleContact][Abandoned]'));var _0x3754b6=new History(_0x20fd84);_0x3754b6[_0xf282('0x74')]=0xb;_0x3754b6['statedesc']=_0xf282('0xef');_0x3754b6[_0xf282('0x77')]=moment()[_0xf282('0x47')](_0xf282('0xc8'));_0x3754b6['endtime']=_0x3754b6[_0xf282('0x77')];_0x3754b6[_0xf282('0xe7')]=_0x20fd84[_0xf282('0xe7')];_0x3754b6['calleridnum']=_0x20fd84[_0xf282('0xe8')];hopperUtils[_0xf282('0xcf')](_0x3754b6)[_0xf282('0xa7')](loggerCatch(_0xf282('0xf0')));}})[_0xf282('0xb0')](function(){if(_0x491e70)hopperUtils[_0xf282('0xea')](_0x20fd84,_0x109064,_0xe2298f)[_0xf282('0xb0')](function(){return 0x1;});});}}}};Dialer[_0xf282('0x1b')][_0xf282('0x3b')]=function(_0x7d1442){if(this[_0xf282('0xf1')][_0x7d1442[_0xf282('0xc6')]]){this['actions'][_0x7d1442[_0xf282('0xc6')]][_0xf282('0xf2')]=_0x7d1442[_0xf282('0xf2')];}if(this[_0xf282('0x26')][_0x7d1442['uniqueid']]){this[_0xf282('0x26')][_0x7d1442[_0xf282('0xc6')]][_0xf282('0xf2')]=_0x7d1442[_0xf282('0xf2')];}};Dialer[_0xf282('0x1b')][_0xf282('0x3f')]=function(_0x5bbfba){if(!this[_0xf282('0xf1')][_0x5bbfba[_0xf282('0xf3')]]){return;}var _0x25fa47=this[_0xf282('0x1f')][this[_0xf282('0xf1')][_0x5bbfba[_0xf282('0xf3')]]['queue']][_0xf282('0xf4')]||_0xf282('0xf5');if(_0x25fa47==='roundrobin'){if(this['actions'][_0x5bbfba[_0xf282('0xf3')]]&&_[_0xf282('0xf6')](this[_0xf282('0xf1')][_0x5bbfba[_0xf282('0xf3')]][_0xf282('0xf7')])&&_0x5bbfba['status']==='1'&&_0x5bbfba[_0xf282('0xf8')]==='0'){if(this['agents'][_0x5bbfba[_0xf282('0xf9')]]){if(!this[_0xf282('0x21')][_0x5bbfba['stateinterface']][_0xf282('0xf7')]){this[_0xf282('0x21')][_0x5bbfba[_0xf282('0xf9')]]['locked']=!![];this[_0xf282('0xf1')][_0x5bbfba[_0xf282('0xf3')]]['locked']=!![];this['actions'][_0x5bbfba[_0xf282('0xf3')]][_0xf282('0xf9')]=_0x5bbfba[_0xf282('0xf9')];}}}}else if(_0x25fa47==='rrmemory'){if(this['actions'][_0x5bbfba['actionid']]){if(this[_0xf282('0x21')][_0x5bbfba[_0xf282('0xf9')]]){this[_0xf282('0xf1')][_0x5bbfba[_0xf282('0xf3')]]['stateinterface']=_0x5bbfba[_0xf282('0xf9')];if(_[_0xf282('0xf6')](this[_0xf282('0x2b')][this['actions'][_0x5bbfba[_0xf282('0xf3')]][_0xf282('0xc5')]])){this[_0xf282('0x2b')][this[_0xf282('0xf1')][_0x5bbfba['actionid']][_0xf282('0xc5')]]=[];}this[_0xf282('0x2b')][this[_0xf282('0xf1')][_0x5bbfba[_0xf282('0xf3')]]['queue']][_0xf282('0xa0')](_[_0xf282('0x64')](_[_0xf282('0x7c')](this['actions'][_0x5bbfba[_0xf282('0xf3')]],[_0xf282('0xfa'),_0xf282('0xf9')]),{'status':_0x5bbfba[_0xf282('0x8d')],'paused':_0x5bbfba[_0xf282('0xf8')]}));}}}};Dialer[_0xf282('0x1b')][_0xf282('0x40')]=function(_0x424053){if(!this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]]){return;}var _0x50db00=this;var _0x39e279=this[_0xf282('0x1f')][this['actions'][_0x424053[_0xf282('0xf3')]][_0xf282('0xc5')]];var _0xb4ad95=_0x39e279['strategy']||_0xf282('0xf5');if(_0xb4ad95===_0xf282('0xfb')){if(this['actions'][_0x424053['actionid']]&&this['actions'][_0x424053['actionid']][_0xf282('0xf9')]){this[_0xf282('0x1e')][_0xf282('0xfc')](this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]][_0xf282('0xfa')],this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]][_0xf282('0xf9')])['catch'](function(_0x4de364){logger[_0xf282('0x6a')](_0xf282('0xfd'),util[_0xf282('0x6c')](_0x4de364,{'showHidden':![],'depth':null}));})[_0xf282('0x1d')](function(){_0x50db00['updateOriginated'](_0x50db00[_0xf282('0x1f')][_0x50db00['actions'][_0x424053['actionid']][_0xf282('0xc5')]]);_0x50db00[_0xf282('0x21')][_0x50db00[_0xf282('0xf1')][_0x424053['actionid']][_0xf282('0xf9')]][_0xf282('0xf7')]=![];delete _0x50db00['actions'][_0x424053[_0xf282('0xf3')]];unlockQueueStatus(_0x39e279);});}else{this[_0xf282('0xc7')](this[_0xf282('0x1f')][this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]][_0xf282('0xc5')]]);hopperUtils[_0xf282('0xe0')]({'active':![],'ContactId':this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]]['ContactId'],'ListId':this[_0xf282('0xf1')][_0x424053['actionid']]['ListId'],'VoiceQueueId':this['actions'][_0x424053[_0xf282('0xf3')]][_0xf282('0xfe')]||undefined,'CampaignId':this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]][_0xf282('0xe5')]||undefined})['catch'](loggerCatch(_0xf282('0xff')));delete this['actions'][_0x424053['actionid']];unlockQueueStatus(_0x39e279);}}else if(_0xb4ad95===_0xf282('0xf5')){var _0x416b4c;if(this[_0xf282('0xf1')][_0x424053['actionid']]&&!_[_0xf282('0x4a')](this['queueBooked'][this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]][_0xf282('0xc5')]])){if(this['queueBookedRR'][_0x50db00[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]][_0xf282('0xc5')]]){this[_0xf282('0x2c')][_0x50db00[_0xf282('0xf1')][_0x424053['actionid']][_0xf282('0xc5')]]=this['queueBookedRR'][this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]][_0xf282('0xc5')]]?this[_0xf282('0x2c')][this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]][_0xf282('0xc5')]]:this['queueBooked'][this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]]['queue']]?this['queueBooked'][this['actions'][_0x424053[_0xf282('0xf3')]][_0xf282('0xc5')]][_0xf282('0x100')]||0x0:0x0;}this[_0xf282('0x2b')][this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]][_0xf282('0xc5')]][_0xf282('0x100')]=this[_0xf282('0x2c')][this['actions'][_0x424053[_0xf282('0xf3')]]['queue']];for(var _0x4ef635=0x0;_0x4ef635<this[_0xf282('0x2b')][this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]][_0xf282('0xc5')]][_0xf282('0x101')];_0x4ef635+=0x1){_0x416b4c=rr(this[_0xf282('0x2b')][this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]][_0xf282('0xc5')]]);this['queueBookedRR'][_0x50db00[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]][_0xf282('0xc5')]]=this[_0xf282('0x2b')][this['actions'][_0x424053['actionid']][_0xf282('0xc5')]]['_rr'];if(_0x416b4c[_0xf282('0x8d')]==='1'&&_0x416b4c['paused']==='0'){break;}}if(!_[_0xf282('0xf6')](_0x416b4c)){this[_0xf282('0x21')][_0x416b4c['stateinterface']][_0xf282('0x102')]=_[_0xf282('0x57')](this[_0xf282('0x21')][_0x416b4c['stateinterface']][_0xf282('0x102')])?!![]:this[_0xf282('0x21')][_0x416b4c['stateinterface']]['unlockRR'];}loggerBooked[_0xf282('0x4b')](_0xf282('0x103'),_0x424053['actionid'],_0xf282('0x104'),JSON[_0xf282('0x7b')](_[_0xf282('0x7c')](this[_0xf282('0x21')][_0x416b4c[_0xf282('0xf9')]],[_0xf282('0x66'),_0xf282('0x102')])),_0xf282('0x105'),JSON['stringify'](_0x416b4c[_0xf282('0xfa')]));if(!_['isNil'](_0x416b4c)&&_0x416b4c[_0xf282('0x8d')]==='1'&&_0x416b4c['paused']==='0'&&this['agents'][_0x416b4c[_0xf282('0xf9')]][_0xf282('0x102')]){this[_0xf282('0x21')][_0x416b4c[_0xf282('0xf9')]][_0xf282('0x102')]=![];this[_0xf282('0x2b')][_0x50db00[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]][_0xf282('0xc5')]]=[];this[_0xf282('0x1e')][_0xf282('0xfc')](_0x416b4c[_0xf282('0xfa')],_0x416b4c[_0xf282('0xf9')])[_0xf282('0xa7')](function(_0x1e0e0b){logger['error'](_0xf282('0xfd'),util[_0xf282('0x6c')](_0x1e0e0b,{'showHidden':![],'depth':null}));})[_0xf282('0x1d')](function(){_0x50db00['updateOriginated'](_0x50db00['voiceQueues'][_0x50db00[_0xf282('0xf1')][_0x424053['actionid']][_0xf282('0xc5')]]);setTimeout(function(){_0x50db00[_0xf282('0x21')][_0x416b4c[_0xf282('0xf9')]][_0xf282('0x102')]=!![];loggerBooked[_0xf282('0x4b')](_0xf282('0x106'),_0x424053[_0xf282('0xf3')],_0xf282('0x104'),JSON['stringify'](_[_0xf282('0x7c')](_0x50db00['agents'][_0x416b4c[_0xf282('0xf9')]],[_0xf282('0x66'),_0xf282('0x102')])),'contactAgent-idHopper:\x20',JSON[_0xf282('0x7b')](_0x416b4c[_0xf282('0xfa')]));},0xc7);delete _0x50db00[_0xf282('0xf1')][_0x424053['actionid']];unlockQueueStatus(_0x39e279,_0x424053[_0xf282('0xf3')]);});}else{loggerBooked[_0xf282('0x4b')](_0xf282('0x107'));this[_0xf282('0xc7')](this[_0xf282('0x1f')][this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]][_0xf282('0xc5')]]);hopperUtils['rescheduleContact']({'active':![],'ContactId':this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]][_0xf282('0xe3')],'ListId':this[_0xf282('0xf1')][_0x424053['actionid']][_0xf282('0xe4')],'VoiceQueueId':this['actions'][_0x424053[_0xf282('0xf3')]][_0xf282('0xfe')]||undefined,'CampaignId':this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]][_0xf282('0xe5')]||undefined})[_0xf282('0xa7')](loggerCatch(_0xf282('0xff')));delete this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]];unlockQueueStatus(_0x39e279);}}else{loggerBooked['info']('[booked][unlock2]');this['updateOriginated'](this[_0xf282('0x1f')][this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]][_0xf282('0xc5')]]);hopperUtils[_0xf282('0xe0')]({'active':![],'ContactId':this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]][_0xf282('0xe3')],'ListId':this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]][_0xf282('0xe4')],'VoiceQueueId':this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]]['VoiceQueueId']||undefined,'CampaignId':this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]]['CampaignId']||undefined})[_0xf282('0xa7')](loggerCatch(_0xf282('0x108')));delete this['actions'][_0x424053[_0xf282('0xf3')]];unlockQueueStatus(_0x39e279);}}else{loggerBooked[_0xf282('0x4b')]('[booked][unlock3]');this['updateOriginated'](this[_0xf282('0x1f')][this[_0xf282('0xf1')][_0x424053[_0xf282('0xf3')]]['queue']]);hopperUtils[_0xf282('0xe0')]({'active':![],'ContactId':this['actions'][_0x424053[_0xf282('0xf3')]][_0xf282('0xe3')],'ListId':this['actions'][_0x424053['actionid']][_0xf282('0xe4')],'VoiceQueueId':this['actions'][_0x424053[_0xf282('0xf3')]][_0xf282('0xfe')]||undefined,'CampaignId':this['actions'][_0x424053[_0xf282('0xf3')]]['CampaignId']||undefined})[_0xf282('0xa7')](loggerCatch(_0xf282('0x109')));delete this['actions'][_0x424053[_0xf282('0xf3')]];unlockQueueStatus(_0x39e279);}};Dialer[_0xf282('0x1b')][_0xf282('0x32')]=function(_0x4b910f){var _0x56860b=this[_0xf282('0xf1')][_0x4b910f[_0xf282('0xf3')]];if(_0x56860b){delete this[_0xf282('0xf1')][_0x4b910f[_0xf282('0xf3')]];_0x56860b['responsetime']=moment()[_0xf282('0x47')](_0xf282('0xc8'));var _0x4f55a3=_0x56860b[_0xf282('0x45')]===_0xf282('0xc9')?this[_0xf282('0x20')][_0x56860b[_0xf282('0xc5')]]:this[_0xf282('0x1f')][_0x56860b['getQueue']()];if(_0x4b910f['response']!==_0xf282('0x10a')){this['updateOriginated'](_0x4f55a3);return this['callProgressDetecting'](_0x56860b,_0x4f55a3,_0x4b910f)[_0xf282('0xa7')](loggerCatch(_0xf282('0x10b')));}this[_0xf282('0x26')][_0x4b910f[_0xf282('0xc6')]]=_0x56860b;}};Dialer['prototype'][_0xf282('0x3d')]=function(_0x1b71d7){var _0x135f03=this;var _0x3e5869=this[_0xf282('0x26')][_0x1b71d7[_0xf282('0xc6')]];var _0x2346a3;if(!_[_0xf282('0xf6')](_0x1b71d7)&&!_[_0xf282('0xf6')](_0x1b71d7[_0xf282('0x10c')])&&!_[_0xf282('0xf6')](_0x1b71d7[_0xf282('0x10c')][_0xf282('0x10d')])&&_0x1b71d7[_0xf282('0x10e')]===_0xf282('0x10f')&&_0x3e5869){if(_0x3e5869[_0xf282('0x45')]!==_0xf282('0xc9')&&this['voiceQueues'][_0x3e5869[_0xf282('0xc5')]][_0xf282('0x110')]&&_0x1b71d7[_0xf282('0x111')]===_0xf282('0x112')){delete this[_0xf282('0x26')][_0x1b71d7[_0xf282('0xc6')]];this[_0xf282('0xc7')](this['voiceQueues'][_0x3e5869[_0xf282('0xc5')]]);this['voiceQueues'][_0x3e5869[_0xf282('0xc5')]][_0xf282('0xca')]+=0x1;this[_0xf282('0x1f')][_0x3e5869[_0xf282('0xc5')]][_0xf282('0x113')]+=0x1;_0x2346a3=new Hangup(_0x3e5869,_0x1b71d7);_0x2346a3[_0xf282('0x74')]=0x12;_0x2346a3[_0xf282('0x75')]=_0xf282('0x114');_0x2346a3[_0xf282('0x115')]=_0xf282('0x116');ami[_0xf282('0x44')]('custom:amd',ut[_0xf282('0x117')](_0x2346a3,'amd'));this[_0xf282('0x118')](_0x2346a3,'[syncHangupInAMD][createHistory]',_0xf282('0x119'));}if(_0x3e5869[_0xf282('0x45')]!=='ivr'&&this[_0xf282('0x1f')][_0x3e5869[_0xf282('0xc5')]][_0xf282('0x110')]&&_0x1b71d7[_0xf282('0x111')]===_0xf282('0x11a')){return new Promise(function(_0x54d280,_0x3b81ae){delete _0x135f03['uniqueId'][_0x1b71d7[_0xf282('0xc6')]];_0x135f03['updateOriginated'](_0x135f03[_0xf282('0x1f')][_0x3e5869['queue']]);_0x135f03[_0xf282('0x1f')][_0x3e5869[_0xf282('0xc5')]]['outboundAnswerCallsDay']+=0x1;_0x135f03['voiceQueues'][_0x3e5869['queue']][_0xf282('0x113')]+=0x1;var _0x50f204=_0x135f03['voiceQueues'][_0x3e5869[_0xf282('0xc5')]];var _0x52f7f7=new Hangup(_0x3e5869,_0x1b71d7);_0x52f7f7[_0xf282('0x74')]=0x13;_0x52f7f7['statedesc']=_0xf282('0x11b');_0x52f7f7[_0xf282('0x115')]=_0xf282('0x116');_0x52f7f7[_0xf282('0x11c')]+=0x1;_0x52f7f7[_0xf282('0xda')]+=0x1;_0x52f7f7[_0xf282('0x11d')]=!![];ami[_0xf282('0x44')](_0xf282('0x11e'),ut[_0xf282('0x117')](_0x52f7f7,_0xf282('0x11d')));hopperUtils[_0xf282('0xcf')](_0x52f7f7)[_0xf282('0xa7')](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x52f7f7[_0xf282('0x11f')]+_0x52f7f7[_0xf282('0x120')]+_0x52f7f7[_0xf282('0x121')]+_0x52f7f7[_0xf282('0x122')]+_0x52f7f7['countdropretry']+_0x52f7f7['countabandonedretry']+_0x52f7f7[_0xf282('0x11c')]+_0x52f7f7[_0xf282('0x123')]>=_0x50f204[_0xf282('0x124')]){_0x135f03[_0xf282('0x125')](_0x52f7f7,_0x54d280,_0x3b81ae,_0xf282('0x126'));}else{if(_0x52f7f7['countmachineretry']>=_0x50f204['dialMachineMaxRetry']){_0x135f03[_0xf282('0x127')](_0x52f7f7,_0x54d280,_0x3b81ae,_0xf282('0x128'));}else{hopperUtils[_0xf282('0xe0')]({'active':![],'countmachineretry':_0x52f7f7[_0xf282('0x11c')],'scheduledat':moment()[_0xf282('0xe1')](_0x50f204[_0xf282('0x129')],_0xf282('0xee'))[_0xf282('0x47')](_0xf282('0xc8')),'ContactId':_0x52f7f7[_0xf282('0xe3')],'ListId':_0x52f7f7[_0xf282('0xe4')],'VoiceQueueId':_0x52f7f7[_0xf282('0xfe')]||undefined,'CampaignId':_0x52f7f7[_0xf282('0xe5')]||undefined})['catch'](loggerCatch(_0xf282('0x12a')));_0x54d280({'reschedule':0x1});}}});}if(_0x3e5869['type']===_0xf282('0xc9')&&this[_0xf282('0x20')][_0x3e5869['queue']]['dialAMDActive']&&_0x1b71d7[_0xf282('0x111')]===_0xf282('0x112')){delete this[_0xf282('0x26')][_0x1b71d7['uniqueid']];this['updateOriginated'](this[_0xf282('0x20')][_0x3e5869[_0xf282('0xc5')]]);_0x2346a3=new Hangup(_0x3e5869,_0x1b71d7);_0x2346a3['state']=0x12;_0x2346a3[_0xf282('0x75')]='HangupInAMD';_0x2346a3['membername']='AMD';ami[_0xf282('0x44')]('custom:amd',ut['buildObj'](_0x2346a3,_0xf282('0x11d')));this[_0xf282('0x118')](_0x2346a3,'[syncHangupInAMDIvr][createHistory]',_0xf282('0x12b'));}if(_0x3e5869['type']===_0xf282('0xc9')&&this[_0xf282('0x20')][_0x3e5869[_0xf282('0xc5')]][_0xf282('0x110')]&&_0x1b71d7[_0xf282('0x111')]===_0xf282('0x11a')){return new Promise(function(_0x56bbd8,_0x231633){delete _0x135f03['uniqueId'][_0x1b71d7[_0xf282('0xc6')]];_0x135f03[_0xf282('0xc7')](_0x135f03[_0xf282('0x20')][_0x3e5869[_0xf282('0xc5')]]);_0x135f03[_0xf282('0x20')][_0x3e5869[_0xf282('0xc5')]][_0xf282('0xca')]+=0x1;_0x135f03[_0xf282('0x20')][_0x3e5869[_0xf282('0xc5')]][_0xf282('0x113')]+=0x1;var _0x923f46=_0x135f03[_0xf282('0x20')][_0x3e5869['queue']];var _0x39eca2=new Hangup(_0x3e5869,_0x1b71d7);_0x39eca2['state']=0x13;_0x39eca2['statedesc']=_0xf282('0x11b');_0x39eca2[_0xf282('0x115')]=_0xf282('0x116');_0x39eca2[_0xf282('0x11c')]+=0x1;_0x39eca2[_0xf282('0xda')]+=0x1;_0x39eca2[_0xf282('0x11d')]=!![];ami[_0xf282('0x44')](_0xf282('0x11e'),ut[_0xf282('0x117')](_0x39eca2,_0xf282('0x11d')));hopperUtils[_0xf282('0xcf')](_0x39eca2)[_0xf282('0xa7')](loggerCatch(_0xf282('0x12c')));if(_0x39eca2[_0xf282('0x11f')]+_0x39eca2[_0xf282('0x120')]+_0x39eca2[_0xf282('0x121')]+_0x39eca2[_0xf282('0x122')]+_0x39eca2[_0xf282('0xd9')]+_0x39eca2[_0xf282('0xec')]+_0x39eca2['countmachineretry']+_0x39eca2[_0xf282('0x123')]>=_0x923f46[_0xf282('0x124')]){_0x135f03['stateGlobal'](_0x39eca2,_0x56bbd8,_0x231633,_0xf282('0x126'));}else{if(_0x39eca2[_0xf282('0x11c')]>=_0x923f46['dialMachineMaxRetry']){_0x135f03[_0xf282('0x127')](_0x39eca2,_0x56bbd8,_0x231633,_0xf282('0x128'));}else{hopperUtils[_0xf282('0xe0')]({'active':![],'countmachineretry':_0x39eca2['countmachineretry'],'scheduledat':moment()[_0xf282('0xe1')](_0x923f46['dialMachineRetryFrequency'],'minutes')['format'](_0xf282('0xc8')),'ContactId':_0x39eca2[_0xf282('0xe3')],'ListId':_0x39eca2[_0xf282('0xe4')],'VoiceQueueId':_0x39eca2[_0xf282('0xfe')]||undefined,'CampaignId':_0x39eca2[_0xf282('0xe5')]||undefined})['catch'](loggerCatch(_0xf282('0x12a')));_0x56bbd8({'reschedule':0x1});}}});}}};Dialer['prototype']['syncHangup']=function(_0x11b07b){var _0x5411d5=this[_0xf282('0x26')][_0x11b07b[_0xf282('0xc6')]];var _0x461f45;if(_0x5411d5&&_0x5411d5[_0xf282('0x45')]===_0xf282('0xc9')){delete this[_0xf282('0x26')][_0x11b07b['uniqueid']];this[_0xf282('0xc7')](this[_0xf282('0x20')][_0x5411d5['queue']]);this['campaigns'][_0x5411d5['queue']][_0xf282('0x12d')]+=0x1;_0x461f45=new Hangup(_0x5411d5,_0x11b07b);hopperUtils[_0xf282('0xcf')](_0x461f45)['catch'](loggerCatch(_0xf282('0x12e')));hopperUtils[_0xf282('0xd1')](_0x461f45)[_0xf282('0xa7')](loggerCatch('[syncHangupIvr]'));}if(_0x5411d5&&_0x5411d5[_0xf282('0x45')]!==_0xf282('0xc9')&&isNotNull(this['voiceQueues'][_0x5411d5[_0xf282('0xc5')]][_0xf282('0x12f')])){delete this[_0xf282('0x26')][_0x11b07b[_0xf282('0xc6')]];this[_0xf282('0xc7')](this[_0xf282('0x1f')][_0x5411d5[_0xf282('0xc5')]]);this[_0xf282('0x1f')][_0x5411d5[_0xf282('0xc5')]][_0xf282('0xca')]+=0x1;this[_0xf282('0x1f')][_0x5411d5[_0xf282('0xc5')]][_0xf282('0x113')]+=0x1;_0x461f45=new Hangup(_0x5411d5,_0x11b07b);_0x461f45[_0xf282('0x74')]=0x10;_0x461f45['statedesc']=_0xf282('0x130');_0x461f45[_0xf282('0x115')]=_0xf282('0x131');hopperUtils[_0xf282('0xcf')](_0x461f45)[_0xf282('0xa7')](loggerCatch(_0xf282('0x12e')));hopperUtils[_0xf282('0xd1')](_0x461f45)['catch'](loggerCatch(_0xf282('0x132')));}if(_0x5411d5&&_0x5411d5[_0xf282('0x45')]!=='ivr'&&!isNotNull(this[_0xf282('0x1f')][_0x5411d5[_0xf282('0xc5')]][_0xf282('0x12f')])){delete this['uniqueId'][_0x11b07b[_0xf282('0xc6')]];this['updateOriginated'](this['voiceQueues'][_0x5411d5['queue']]);this[_0xf282('0x1f')][_0x5411d5[_0xf282('0xc5')]]['outboundUnknownCallsDay']+=0x1;_0x461f45=new Hangup(_0x5411d5,_0x11b07b);_0x461f45[_0xf282('0x74')]=0xc;_0x461f45[_0xf282('0x75')]=_0x11b07b[_0xf282('0x133')];_0x461f45['membername']='Unknow';hopperUtils[_0xf282('0xcf')](_0x461f45)[_0xf282('0xa7')](loggerCatch(_0xf282('0x12e')));hopperUtils['moveContactManagedDialer'](_0x461f45)['catch'](loggerCatch(_0xf282('0x132')));}};Dialer[_0xf282('0x1b')]['syncQueueSummary']=function(_0x52099e){var _0x4bfc7e=this;if(!_0x4bfc7e[_0xf282('0x134')][_0x52099e['name']]){_0x4bfc7e[_0xf282('0x134')][_0x52099e[_0xf282('0x66')]]={'running':![]};}else if(_0x4bfc7e[_0xf282('0x134')][_0x52099e[_0xf282('0x66')]]['running']===!![]){return;}else if(_0x4bfc7e[_0xf282('0x134')][_0x52099e[_0xf282('0x66')]][_0xf282('0x135')]===![]){_0x4bfc7e[_0xf282('0x134')][_0x52099e['name']][_0xf282('0x135')]=!![];}var _0x28b136=_0x4bfc7e[_0xf282('0x1f')][_0x52099e[_0xf282('0x66')]];var _0x32a90d=_0x28b136[_0xf282('0x6f')]!==utils[_0xf282('0x70')][_0xf282('0x82')];var _0x1cf113=utils['isPreviewCampaign'](_0x28b136);_0x28b136[_0xf282('0x136')]=utils['getQueueCampaignStatusMessage'](_0x28b136,_0x4bfc7e[_0xf282('0x22')]);Promise[_0xf282('0xb4')]()[_0xf282('0xb0')](function(){if(_0x28b136[_0xf282('0x136')]===utils[_0xf282('0x70')][_0xf282('0x82')]){if(_0x32a90d){clearPredictiveAttributes(_0x28b136);_0x52099e[_0xf282('0x28')]=undefined;_0x52099e['startProgressive']=undefined;}if(_0x28b136[_0xf282('0x136')]===utils[_0xf282('0x70')]['INACTIVE']){_0x52099e['available']=0x0;_0x52099e['paused']=0x0;_0x52099e[_0xf282('0x137')]=0x0;_0x52099e[_0xf282('0x138')]=0x0;_0x52099e['pTalking']=0x0;}}else if(_0x28b136[_0xf282('0x136')]===utils[_0xf282('0x70')]['ACTIVE']&&!_0x1cf113){return _0x4bfc7e[_0xf282('0x97')](_0x28b136,!![])['then'](function(){return _0x4bfc7e[_0xf282('0x97')](_0x28b136,![]);})[_0xf282('0xb0')](function(){return _0x4bfc7e[_0xf282('0xb8')](_0x28b136);})[_0xf282('0xa7')](function(_0x1dbdc8){loggerSyncQueueSummary['debug'](_0xf282('0x139'),util['inspect'](_0x1dbdc8,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x28b136);});}else{clearPredictiveAttributes(_0x28b136);}})[_0xf282('0xb0')](function(){var _0x58c72c=_0x52099e[_0xf282('0x13a')](_0x28b136);if(_0x58c72c||_0x28b136[_0xf282('0x13b')]){_0x28b136[_0xf282('0x13b')]=![];_0x52099e[_0xf282('0x13c')](_0x28b136);Object[_0xf282('0x13d')](_0x28b136,_0x52099e);emitOutboundVoiceQueueSummary(_0x52099e);}_0x4bfc7e['queuesSummary'][_0x28b136['name']]['running']=![];})[_0xf282('0xa7')](function(_0x533b79){logger[_0xf282('0x6a')](_0xf282('0x139'),util[_0xf282('0x6c')](_0x533b79,{'showHidden':![],'depth':null}));_0x4bfc7e['queuesSummary'][_0x28b136['name']][_0xf282('0x135')]=![];});};Dialer['prototype'][_0xf282('0x38')]=_[_0xf282('0x13e')](function(){var _0x15f6b5=_['filter'](this['voiceQueues'],function(_0x3cc3b4){return _0x3cc3b4[_0xf282('0x13f')];});var _0x391381=_[_0xf282('0x140')](this[_0xf282('0x21')],function(_0x29b0e2){return _0x29b0e2['online']&&_0x29b0e2[_0xf282('0x8d')]===_0xf282('0x8e');});if(_0x15f6b5[_0xf282('0x101')]>0x0&&_0x391381['length']>0x0){return Promise[_0xf282('0xb4')]()[_0xf282('0xb0')](cmHopper[_0xf282('0x141')](_[_0xf282('0x142')](_0x15f6b5,'id'),previewRecallmeReminderInterval,_['map'](_0x391381,'id')))[_0xf282('0xb0')](function(_0x537bd7){for(var _0x226a1d=0x0;_0x226a1d<_0x537bd7[_0xf282('0x101')];_0x226a1d++){var _0x548db1=_0x537bd7[_0x226a1d][_0xf282('0x143')][_0xf282('0x66')];if(_0x548db1)io['to'](util[_0xf282('0x47')](_0xf282('0x144'),_0x548db1))[_0xf282('0x44')](_0xf282('0x145'),{'hopper':_0x537bd7[_0x226a1d]});}})[_0xf282('0xa7')](function(_0x3e4c6d){logger[_0xf282('0x6a')]('checkPreviewRecallReminder',_0x3e4c6d);});}},0x3c*0x3e8,{'leading':!![]});Dialer[_0xf282('0x1b')][_0xf282('0x42')]=function(){var _0x2ae4f8=this;setInterval(function(){_0x2ae4f8[_0xf282('0x146')](_0x2ae4f8['uniqueId'],_0xf282('0x147'));_0x2ae4f8[_0xf282('0x146')](_0x2ae4f8[_0xf282('0xf1')],_0xf282('0x148'));},0x32c8);};Dialer[_0xf282('0x1b')][_0xf282('0x146')]=function(_0x3c502c,_0x327a2a){var _0x343150=this;for(var _0x6314ad in _0x3c502c){if(typeof _0x3c502c[_0x6314ad]!==_0xf282('0xb2')){this[_0xf282('0x149')][_0xf282('0x14a')](function(){if(!_[_0xf282('0xf6')](_0x3c502c[_0x6314ad])){return ami['Action']({'action':_0xf282('0x8d'),'channel':_0x3c502c[_0x6314ad][_0xf282('0xf2')]})['catch'](function(_0x22760a){if(_0x22760a[_0xf282('0x6f')]==='No\x20such\x20channel'){setTimeout(function(){if(_0x3c502c[_0x6314ad]&&_0x3c502c[_0x6314ad][_0xf282('0x45')]!==_0xf282('0xc9')){_0x343150['updateOriginated'](_0x343150['voiceQueues'][_0x3c502c[_0x6314ad]['queue']]);logger['error']('[Dialer][checkChannel]',_0x327a2a,_0x6314ad,_0x3c502c[_0x6314ad][_0xf282('0xc5')]);delete _0x3c502c[_0x6314ad];}if(_0x3c502c[_0x6314ad]&&_0x3c502c[_0x6314ad]['type']===_0xf282('0xc9')){_0x343150[_0xf282('0xc7')](_0x343150[_0xf282('0x20')][_0x3c502c[_0x6314ad][_0xf282('0xc5')]]);logger[_0xf282('0x6a')](_0xf282('0x14b'),_0x327a2a,_0x6314ad,_0x3c502c[_0x6314ad]['queue']);delete _0x3c502c[_0x6314ad];}},0x2328);}});}});}}};Dialer[_0xf282('0x1b')][_0xf282('0x14c')]=function(_0x5405b1){return Promise[_0xf282('0xb4')]()[_0xf282('0xb0')](voiceQueueRt[_0xf282('0x14c')](_0x5405b1))[_0xf282('0xa7')](loggerCatch(_0xf282('0x14d')));};Dialer[_0xf282('0x1b')][_0xf282('0xc7')]=function(_0x58ac22){if(!_[_0xf282('0x57')](_0x58ac22)&&_0x58ac22!==null){if(typeof _0x58ac22[_0xf282('0x86')]!=='undefined'){if(_0x58ac22[_0xf282('0x86')]>0x0){_0x58ac22[_0xf282('0x86')]-=0x1;}else{logger[_0xf282('0x6a')](_0xf282('0x14e'));}}}else{logger[_0xf282('0x6a')](_0xf282('0x14f'));}};Dialer[_0xf282('0x1b')][_0xf282('0x150')]=function(_0x45b800,_0x38a0bb){var _0x3d251e=this;return function(_0x1288b6){_0x3d251e[_0xf282('0xc7')](_0x38a0bb);logger[_0xf282('0x6a')](_0x45b800,util['inspect'](_0x1288b6,{'showHidden':![],'depth':null}));};};Dialer[_0xf282('0x1b')][_0xf282('0x151')]=function(_0x4cf6e2,_0x38542b,_0x42cc18){var _0x53ba13={'state':0x19,'statedesc':_0xf282('0x152')};this['updateOriginated'](_0x38542b);this[_0xf282('0x118')](_[_0xf282('0x64')](_0x53ba13,_[_0xf282('0x7c')](_0x42cc18,[_0xf282('0xe3'),_0xf282('0xe4'),_0xf282('0x153'),_0xf282('0xfe'),_0xf282('0xe5')])),_0xf282('0x154'),_0xf282('0x155'));logger[_0xf282('0x6a')](_0x4cf6e2);};Dialer[_0xf282('0x1b')][_0xf282('0x118')]=function(_0x4bff84,_0x726e7,_0xa7fcba){hopperUtils[_0xf282('0xcf')](_0x4bff84)[_0xf282('0xa7')](loggerCatch(_0x726e7));hopperUtils[_0xf282('0xd1')](_0x4bff84)[_0xf282('0xa7')](loggerCatch(_0xa7fcba));};Dialer[_0xf282('0x1b')][_0xf282('0xdf')]=function(_0x14bef0,_0x5d44a6){hopperUtils['createHistory'](_0x14bef0)['catch'](loggerCatch(_0xf282('0xd0')));if(_0x5d44a6==0x0){hopperUtils[_0xf282('0xd1')](_0x14bef0)[_0xf282('0xa7')](loggerCatch(_0xf282('0x156')));}};Dialer[_0xf282('0x1b')][_0xf282('0x157')]=function(_0x382491){return Promise['resolve']()[_0xf282('0xb0')](cmHopper['handlePreviewRecallNotifications'](_0x382491['id'],previewRecallmeReminderInterval))[_0xf282('0xb0')](function(_0x2030e1){for(var _0x25124d=0x0;_0x25124d<_0x2030e1[_0xf282('0x101')];_0x25124d++){var _0x8b34bf=_0x2030e1[_0x25124d][_0xf282('0x143')][_0xf282('0x66')];if(_0x8b34bf)io['to'](util[_0xf282('0x47')]('user:%s',_0x8b34bf))[_0xf282('0x44')](_0xf282('0x145'),{'hopper':_0x2030e1[_0x25124d]});}})[_0xf282('0xa7')](function(){});};Dialer[_0xf282('0x1b')]['launchHandleIvr']=function(_0x45b119){var _0x130d0a=this;return function(){_0x130d0a[_0xf282('0x158')](_0x45b119);};};Dialer[_0xf282('0x1b')]['actionOriginate']=function(_0x55c8c4,_0x5b9c42){var _0x41561e=this;var _0x423cba=uuid['v4']();this['actions'][_0x423cba]=new Action(_0x55c8c4,_0x5b9c42,_0x423cba);return new Promise(function(_0x2f0e9a,_0xf8a58b){if(_[_0xf282('0x57')](_0x55c8c4)&&typeof _0x55c8c4!==_0xf282('0x159')){return _0xf8a58b(msgResponse(_0xf282('0x15a'),'Failure','voiceQueue\x20is\x20undefine'));}if(_[_0xf282('0x57')](_0x5b9c42[_0xf282('0x15b')])||_0x5b9c42['phone']===null){return _0xf8a58b(msgResponse(_0xf282('0x15a'),_0xf282('0x98'),_0xf282('0x15c')));}var _0x276de9={'XMD-CALLERID':_0x41561e[_0xf282('0xf1')][_0x423cba][_0xf282('0x15d')](),'XMD-AGI':_0x55c8c4[_0xf282('0x12f')]?util[_0xf282('0x47')](_0xf282('0x15e'),ipAgi,_0x55c8c4[_0xf282('0x12f')]):_0xf282('0x15f'),'XMD-AGIAFTER':_0x55c8c4[_0xf282('0xce')]?util[_0xf282('0x47')](_0xf282('0x15e'),ipAgi,_0x55c8c4['dialQueueProject2']):_0xf282('0x15f'),'XMD-QUEUE':utils[_0xf282('0x160')](_0x55c8c4)?util[_0xf282('0x47')](_0xf282('0x161'),_0x55c8c4[_0xf282('0x66')],_0x55c8c4[_0xf282('0x162')]||'',_0x55c8c4[_0xf282('0x163')]?'c':'',_0x55c8c4['dialQueueTimeout']||0x3):_0xf282('0x15f'),'XMD-CONTACTID':_0x5b9c42[_0xf282('0xe3')],'XMD-CDRTYPE':_0xf282('0x164'),'CALLERID(all)':_0x41561e[_0xf282('0xf1')][_0x423cba][_0xf282('0x15d')](),'XMD-AMD':_0x55c8c4[_0xf282('0x110')]?_0xf282('0x165'):_0xf282('0x15f'),'XMD-DESTINATION':_0xf282('0x10f')};if(_0x55c8c4[_0xf282('0x110')]){_0x276de9[_0xf282('0x166')]=_0x55c8c4[_0xf282('0x167')]||0x9c4;_0x276de9[_0xf282('0x168')]=_0x55c8c4[_0xf282('0x169')]||0x5dc;_0x276de9['XMD-AMDAFTERGREETINGSILENCE']=_0x55c8c4['dialAMDAfterGreetingSilence']||0x320;_0x276de9['XMD-AMDTOTALANALYSISTIME']=_0x55c8c4['dialAMDTotalAnalysisTime']||0x1388;_0x276de9['XMD-AMDMINWORDLENGTH']=_0x55c8c4[_0xf282('0x16a')]||0x64;_0x276de9[_0xf282('0x16b')]=_0x55c8c4[_0xf282('0x16c')]||0x32;_0x276de9[_0xf282('0x16d')]=_0x55c8c4[_0xf282('0x16e')]||0x3;_0x276de9[_0xf282('0x16f')]=_0x55c8c4[_0xf282('0x170')]||0x100;_0x276de9[_0xf282('0x171')]=_0x55c8c4[_0xf282('0x172')]||0x1388;}if(utils[_0xf282('0x160')](_0x55c8c4)){_0x276de9['XMD-VOICEQUEUEID']=_0x5b9c42[_0xf282('0xfe')];}else{_0x276de9['XMD-CAMPAIGNID']=_0x5b9c42[_0xf282('0xe5')];}for(var _0x18aea9 in _0x5b9c42[_0xf282('0x173')]){if(typeof _0x5b9c42[_0xf282('0x173')][_0x18aea9]!==_0xf282('0xb2')){if(isNotNull(_0x5b9c42[_0xf282('0x173')][_0x18aea9])&&_0x18aea9!=='id'&&_0x18aea9!=='tags'&&_0x18aea9!==_0xf282('0x174')&&_0x18aea9!==_0xf282('0x175')){_0x276de9[util[_0xf282('0x47')]('%s%s','XMD-',_['toUpper'](_0x18aea9))]=_0x5b9c42[_0xf282('0x173')][_0x18aea9];}}}var _0x5c1167=_0x41561e[_0xf282('0x8b')](_0x55c8c4[_0xf282('0x176')])?utils[_0xf282('0x177')](_0x55c8c4[_0xf282('0x176')][_0xf282('0x178')],_0x55c8c4[_0xf282('0x179')],_0x55c8c4[_0xf282('0x17a')]>0x0?utils[_0xf282('0x17b')](_0x55c8c4[_0xf282('0x17c')],_0x55c8c4[_0xf282('0x17a')]):_0x55c8c4[_0xf282('0x17c')]):utils[_0xf282('0x177')](_[_0xf282('0xf6')](_0x55c8c4[_0xf282('0x92')])?_0x55c8c4[_0xf282('0x176')][_0xf282('0x178')]:_0x55c8c4[_0xf282('0x92')][_0xf282('0x178')],_0x55c8c4[_0xf282('0x179')],_0x55c8c4[_0xf282('0x17a')]>0x0?utils[_0xf282('0x17b')](_0x55c8c4['dialOriginateCallerIdNumber'],_0x55c8c4[_0xf282('0x17a')]):_0x55c8c4[_0xf282('0x17c')]);if(_0x5c1167){_0x276de9[_0xf282('0x17d')]=_0x41561e[_0xf282('0xf1')][_0x423cba]['originatecalleridname']=utils['extractCalleridName'](_0x5c1167);_0x276de9[_0xf282('0x17e')]=_0x5b9c42[_0xf282('0x15b')];}_0x55c8c4[_0xf282('0x17f')]=_0x276de9;return ami['Action']({'actionid':_0x423cba,'action':'originate','channel':_0x41561e[_0xf282('0x8b')](_0x55c8c4[_0xf282('0x176')])?util[_0xf282('0x47')]('SIP/%s/%s%s',_0x55c8c4[_0xf282('0x176')]['name'],isNotNull(_0x55c8c4[_0xf282('0x180')])?_0x55c8c4[_0xf282('0x180')][_0xf282('0x181')]()||'':'',_0x55c8c4[_0xf282('0x182')]>0x0?_0x5b9c42[_0xf282('0x15b')][_0xf282('0x183')](_0x55c8c4[_0xf282('0x182')]):_0x5b9c42[_0xf282('0x15b')]):util[_0xf282('0x47')](_0xf282('0x184'),_[_0xf282('0xf6')](_0x55c8c4[_0xf282('0x92')])?_0x55c8c4[_0xf282('0x176')]['name']:_0x55c8c4['TrunkBackup'][_0xf282('0x66')],isNotNull(_0x55c8c4[_0xf282('0x180')])?_0x55c8c4[_0xf282('0x180')]['trim']()||'':'',_0x55c8c4[_0xf282('0x182')]>0x0?_0x5b9c42[_0xf282('0x15b')][_0xf282('0x183')](_0x55c8c4[_0xf282('0x182')]):_0x5b9c42[_0xf282('0x15b')]),'callerid':_0x5c1167,'Exten':_0xf282('0x10f'),'Context':_0xf282('0x185'),'Priority':'1','variable':_0x276de9,'timeout':(_0x55c8c4[_0xf282('0x186')]||0x1e)*0x3e8,'async':!![],'channelid':_0x423cba})[_0xf282('0xb0')](function(_0x2ea734){return _0x2f0e9a(_0x2ea734);})['catch'](function(_0x5f115d){_0x55c8c4['outboundOriginateFailureCallsDay']+=0x1;var _0x310fc4=new History(_0x41561e[_0xf282('0xf1')][_0x423cba]);logger['error'](util['format']('[originateError]:\x20%s',JSON[_0xf282('0x7b')](_0x5f115d)));_0x310fc4[_0xf282('0x74')]=0xe;_0x310fc4['statedesc']=_0xf282('0x187');_0x310fc4['starttime']=moment()[_0xf282('0x47')](_0xf282('0xc8'));_0x310fc4[_0xf282('0x76')]=_0x310fc4[_0xf282('0x77')];hopperUtils['createHistory'](_0x310fc4)[_0xf282('0xa7')](loggerCatch(_0xf282('0x188')));_0x41561e[_0xf282('0xd1')](_0x310fc4)[_0xf282('0xa7')](loggerCatch(_0xf282('0x188')))['finally'](function(){delete _0x41561e['actions'][_0x423cba];return _0xf8a58b(msgResponse(_0xf282('0x15a'),'Error',_0xf282('0x189')));});});});};Dialer['prototype']['checkRetriveMax']=function(_0x9369ef,_0x378ab5,_0x40455b){var _0xa1c298=new History(_0x378ab5);if(_0xa1c298[_0xf282('0x11f')]+_0xa1c298[_0xf282('0x120')]+_0xa1c298[_0xf282('0x121')]+_0xa1c298[_0xf282('0x122')]+_0xa1c298[_0xf282('0xd9')]+_0xa1c298[_0xf282('0xec')]+_0xa1c298[_0xf282('0x11c')]+_0xa1c298[_0xf282('0x123')]>=_0x40455b[_0xf282('0x124')]-0x1){return!![];}switch(_0x9369ef){case 0x3:if(_0xa1c298['countnoanswerretry']>=_0x40455b['dialNoAnswerMaxRetry']-0x1){return!![];}hopperUtils[_0xf282('0xe0')]({'active':![],'countnoanswerretry':_0xa1c298['countnoanswerretry']+=0x1,'scheduledat':moment()[_0xf282('0xe1')](_0x40455b['dialNoAnswerRetryFrequency'],_0xf282('0xee'))['format'](_0xf282('0xc8')),'ContactId':_0xa1c298[_0xf282('0xe3')],'ListId':_0xa1c298[_0xf282('0xe4')],'VoiceQueueId':_0xa1c298['VoiceQueueId']||undefined,'CampaignId':_0xa1c298[_0xf282('0xe5')]||undefined})[_0xf282('0xa7')](loggerCatch(_0xf282('0x18a')));break;case 0x5:if(_0xa1c298['countbusyretry']>=_0x40455b['dialBusyMaxRetry']-0x1){return!![];}hopperUtils[_0xf282('0xe0')]({'active':![],'countbusyretry':_0xa1c298[_0xf282('0x11f')]+=0x1,'scheduledat':moment()[_0xf282('0xe1')](_0x40455b['dialBusyRetryFrequency'],'minutes')['format'](_0xf282('0xc8')),'ContactId':_0xa1c298[_0xf282('0xe3')],'ListId':_0xa1c298['ListId'],'VoiceQueueId':_0xa1c298[_0xf282('0xfe')]||undefined,'CampaignId':_0xa1c298[_0xf282('0xe5')]||undefined})[_0xf282('0xa7')](loggerCatch('[rescheduleContact]\x20[Busy]'));break;case 0x8:if(_0xa1c298['countcongestionretry']>=_0x40455b[_0xf282('0x18b')]-0x1){return!![];}hopperUtils[_0xf282('0xe0')]({'active':![],'countcongestionretry':_0xa1c298[_0xf282('0x120')]+=0x1,'scheduledat':moment()['add'](_0x40455b[_0xf282('0x18c')],_0xf282('0xee'))[_0xf282('0x47')](_0xf282('0xc8')),'ContactId':_0xa1c298[_0xf282('0xe3')],'ListId':_0xa1c298['ListId'],'VoiceQueueId':_0xa1c298[_0xf282('0xfe')]||undefined,'CampaignId':_0xa1c298[_0xf282('0xe5')]||undefined})['catch'](loggerCatch(_0xf282('0x18d')));break;case 0x0:if(_0xa1c298['countnosuchnumberretry']>=_0x40455b[_0xf282('0x18e')]-0x1){return!![];}else{hopperUtils[_0xf282('0xe0')]({'active':![],'countnosuchnumberretry':_0xa1c298[_0xf282('0x122')]+=0x1,'scheduledat':moment()[_0xf282('0xe1')](_0x40455b[_0xf282('0x18f')],_0xf282('0xee'))[_0xf282('0x47')](_0xf282('0xc8')),'ContactId':_0xa1c298[_0xf282('0xe3')],'ListId':_0xa1c298[_0xf282('0xe4')],'VoiceQueueId':_0xa1c298['VoiceQueueId']||undefined,'CampaignId':_0xa1c298['CampaignId']||undefined})[_0xf282('0xa7')](loggerCatch(_0xf282('0x190')));}break;case 0xa:if(_0xa1c298[_0xf282('0xd9')]>=_0x40455b['dialDropMaxRetry']-0x1){return!![];}hopperUtils[_0xf282('0xe0')]({'active':![],'countdropretry':_0xa1c298['countdropretry']+=0x1,'scheduledat':moment()['add'](_0x40455b[_0xf282('0xe2')],_0xf282('0xee'))['format'](_0xf282('0xc8')),'ContactId':_0xa1c298[_0xf282('0xe3')],'ListId':_0xa1c298[_0xf282('0xe4')],'VoiceQueueId':_0xa1c298[_0xf282('0xfe')]||undefined,'CampaignId':_0xa1c298[_0xf282('0xe5')]||undefined})[_0xf282('0xa7')](loggerCatch(_0xf282('0xe6')));break;case 0xb:if(_0xa1c298[_0xf282('0xec')]>=_0x40455b[_0xf282('0xed')]-0x1){return!![];}hopperUtils[_0xf282('0xe0')]({'active':![],'countabandonedretry':_0xa1c298[_0xf282('0xec')]+=0x1,'scheduledat':moment()['add'](_0x40455b[_0xf282('0x191')],_0xf282('0xee'))[_0xf282('0x47')](_0xf282('0xc8')),'ContactId':_0xa1c298[_0xf282('0xe3')],'ListId':_0xa1c298[_0xf282('0xe4')],'VoiceQueueId':_0xa1c298[_0xf282('0xfe')]||undefined,'CampaignId':_0xa1c298[_0xf282('0xe5')]||undefined})[_0xf282('0xa7')](loggerCatch(_0xf282('0x192')));break;case 0x13:if(_0xa1c298['countmachineretry']>=_0x40455b[_0xf282('0x193')]-0x1){return!![];}hopperUtils[_0xf282('0xe0')]({'active':![],'countmachineretry':_0xa1c298['countmachineretry']+=0x1,'scheduledat':moment()[_0xf282('0xe1')](_0x40455b[_0xf282('0x129')],_0xf282('0xee'))[_0xf282('0x47')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0xa1c298[_0xf282('0xe3')],'ListId':_0xa1c298[_0xf282('0xe4')],'VoiceQueueId':_0xa1c298[_0xf282('0xfe')]||undefined,'CampaignId':_0xa1c298[_0xf282('0xe5')]||undefined})[_0xf282('0xa7')](loggerCatch(_0xf282('0x12a')));break;case 0x14:if(_0xa1c298[_0xf282('0x123')]>=_0x40455b[_0xf282('0x194')]-0x1){return!![];}hopperUtils[_0xf282('0xe0')]({'active':![],'countagentrejectretry':_0xa1c298[_0xf282('0x123')]+=0x1,'scheduledat':moment()[_0xf282('0xe1')](_0x40455b[_0xf282('0x195')],_0xf282('0xee'))[_0xf282('0x47')](_0xf282('0xc8')),'ContactId':_0xa1c298['ContactId'],'ListId':_0xa1c298[_0xf282('0xe4')],'VoiceQueueId':_0xa1c298[_0xf282('0xfe')]||undefined,'CampaignId':_0xa1c298['CampaignId']||undefined})['catch'](loggerCatch(_0xf282('0x196')));break;default:return!![];}};Dialer[_0xf282('0x1b')][_0xf282('0x197')]=function(_0x332e7b,_0x1b2a9a,_0x4296ae){var _0x14058d=this;var _0x5d59f8=new History(_0x332e7b);var _0x1bd20d=![];var _0x5526e0;var _0x19a0ea;return new Promise(function(_0x32a451,_0x2cf005){if(_['isUndefined'](_0x1b2a9a)&&typeof _0x1b2a9a!==_0xf282('0x159')){return _0x2cf005(msgResponse(_0xf282('0x198'),'Failure','entity\x20is\x20undefine'));}if(_[_0xf282('0x57')](_0x4296ae)&&typeof _0x4296ae!==_0xf282('0x159')){return _0x2cf005(msgResponse(_0xf282('0x198'),'Failure','evt\x20is\x20undefine'));}hopperUtils['verifyAdditionalPhones'](_0x5d59f8,_0x4296ae[_0xf282('0xcb')],_0x1b2a9a)[_0xf282('0xb0')](function(_0x32700d){if(_0x32700d[_0xf282('0xde')]==0x1)_0x1bd20d=!![];switch(_0x4296ae['reason']){case'0':_0x1b2a9a[_0xf282('0x199')]+=0x1;_0x5d59f8[_0xf282('0x74')]=0x0;_0x5d59f8[_0xf282('0x75')]=_0xf282('0x19a');_0x5d59f8['countnosuchnumberretry']+=0x1;_0x5d59f8['countglobal']+=0x1;ami[_0xf282('0x44')](_0xf282('0x19b'),ut[_0xf282('0x117')](_0x332e7b,_0xf282('0x19c')));_0x5526e0=_0x1b2a9a[_0xf282('0x18f')];_0x19a0ea=_0x1b2a9a[_0xf282('0xdb')];hopperUtils[_0xf282('0xcf')](_0x5d59f8)[_0xf282('0xa7')](loggerCatch(_0xf282('0x12c')));if(_0x14058d[_0xf282('0x19d')](0x0,_0x332e7b,_0x1b2a9a)&&!_0x1bd20d){if(_0x5d59f8[_0xf282('0x122')]>=_0x1b2a9a['dialNoSuchNumberMaxRetry']){_0x14058d[_0xf282('0x127')](_0x5d59f8,_0x32a451,_0x2cf005,_0xf282('0x19e'));}else{_0x14058d[_0xf282('0x125')](_0x5d59f8,_0x32a451,_0x2cf005,_0xf282('0x19e'));}}break;case'3':_0x1b2a9a[_0xf282('0x19f')]+=0x1;_0x5d59f8['state']=0x3;_0x5d59f8['statedesc']='NoAnswer';_0x5d59f8[_0xf282('0x121')]+=0x1;_0x5d59f8[_0xf282('0xda')]+=0x1;var _0x41399a=ut[_0xf282('0x1a0')](_0x332e7b,_0x1b2a9a);ami['emit'](_0xf282('0x1a1'),_0x41399a);_0x5526e0=_0x1b2a9a[_0xf282('0x1a2')];_0x19a0ea=_0x1b2a9a['callAdditionalPhoneAfterMin'];hopperUtils[_0xf282('0xcf')](_0x5d59f8)['catch'](loggerCatch(_0xf282('0x1a3')));if(_0x14058d[_0xf282('0x19d')](0x3,_0x332e7b,_0x1b2a9a)&&!_0x1bd20d){if(_0x5d59f8['countnoanswerretry']>=_0x1b2a9a[_0xf282('0x1a4')]){_0x14058d['createStateFinal'](_0x5d59f8,_0x32a451,_0x2cf005,_0xf282('0x1a5'));}else{_0x14058d['stateGlobal'](_0x5d59f8,_0x32a451,_0x2cf005,_0xf282('0x1a5'));}}break;case'5':_0x1b2a9a[_0xf282('0x1a6')]+=0x1;_0x5d59f8['state']=0x5;_0x5d59f8[_0xf282('0x75')]=_0xf282('0x1a7');_0x5d59f8[_0xf282('0x11f')]+=0x1;_0x5d59f8[_0xf282('0xda')]+=0x1;ami['emit']('custom:agentbusy',ut['buildObj'](_0x332e7b,_0xf282('0x1a8')));_0x5526e0=_0x1b2a9a[_0xf282('0x1a9')];_0x19a0ea=_0x1b2a9a[_0xf282('0xdb')];hopperUtils['createHistory'](_0x5d59f8)[_0xf282('0xa7')](loggerCatch(_0xf282('0x1aa')));if(_0x14058d[_0xf282('0x19d')](0x5,_0x332e7b,_0x1b2a9a)&&!_0x1bd20d){if(_0x5d59f8[_0xf282('0x11f')]>=_0x1b2a9a[_0xf282('0x1ab')]){_0x14058d[_0xf282('0x127')](_0x5d59f8,_0x32a451,_0x2cf005,'reason\x205\x20busy');}else{_0x14058d[_0xf282('0x125')](_0x5d59f8,_0x32a451,_0x2cf005,_0xf282('0x1ac'));}}break;case'8':_0x1b2a9a[_0xf282('0x1ad')]+=0x1;_0x5d59f8[_0xf282('0x74')]=0x8;_0x5d59f8['statedesc']=_0xf282('0x1ae');_0x5d59f8[_0xf282('0x120')]+=0x1;_0x5d59f8[_0xf282('0xda')]+=0x1;_0x5526e0=_0x1b2a9a['dialCongestionRetryFrequency'];_0x19a0ea=_0x1b2a9a['callAdditionalPhoneAfterMin'];ami[_0xf282('0x44')](_0xf282('0x1af'),ut[_0xf282('0x117')](_0x332e7b,_0xf282('0x1b0')));hopperUtils[_0xf282('0xcf')](_0x5d59f8)[_0xf282('0xa7')](loggerCatch(_0xf282('0x1b1')));if(_0x14058d['checkRetriveMax'](0x8,_0x332e7b,_0x1b2a9a)&&!_0x1bd20d){if(_0x5d59f8[_0xf282('0x120')]>=_0x1b2a9a[_0xf282('0x18b')]){_0x14058d['createStateFinal'](_0x5d59f8,_0x32a451,_0x2cf005,_0xf282('0x1b2'));}else{_0x14058d[_0xf282('0x125')](_0x5d59f8,_0x32a451,_0x2cf005,_0xf282('0x1b2'));}}break;case'11':_0x1b2a9a[_0xf282('0x1b3')]+=0x1;_0x5d59f8[_0xf282('0x74')]=0xb;_0x5d59f8[_0xf282('0x75')]=_0xf282('0xef');_0x5d59f8[_0xf282('0xec')]+=0x1;_0x5d59f8[_0xf282('0xda')]+=0x1;_0x5526e0=_0x1b2a9a[_0xf282('0x191')];_0x19a0ea=_0x1b2a9a['callAdditionalPhoneAfterMin'];hopperUtils[_0xf282('0xcf')](_0x5d59f8)[_0xf282('0xa7')](loggerCatch(_0xf282('0xf0')));if(_0x14058d[_0xf282('0x19d')](0xb,_0x332e7b,_0x1b2a9a)&&!_0x1bd20d){if(_0x5d59f8['countabandonedretry']>=_0x1b2a9a['dialAbandonedMaxRetry']){_0x14058d[_0xf282('0x127')](_0x5d59f8,_0x32a451,_0x2cf005,_0xf282('0x1b4'));}else{_0x14058d['stateGlobal'](_0x5d59f8,_0x32a451,_0x2cf005,_0xf282('0x1b4'));}}break;case'20':_0x1b2a9a['outboundRejectCallsDay']+=0x1;_0x5d59f8[_0xf282('0x74')]=0x14;_0x5d59f8[_0xf282('0x75')]=_0xf282('0x1b5');_0x5d59f8['countagentrejectretry']+=0x1;_0x5d59f8[_0xf282('0xda')]+=0x1;_0x5526e0=_0x1b2a9a[_0xf282('0x195')];_0x19a0ea=_0x1b2a9a[_0xf282('0xdb')];ami['emit'](_0xf282('0x1b6'),ut['buildObj'](_0x332e7b,'agentreject'));hopperUtils['createHistory'](_0x5d59f8)[_0xf282('0xa7')](loggerCatch('[syncAgentComplete][createHistory][20]'));if(_0x14058d[_0xf282('0x19d')](0x14,_0x332e7b,_0x1b2a9a)&&!_0x1bd20d){if(_0x5d59f8[_0xf282('0x123')]>=_0x1b2a9a[_0xf282('0x194')]){_0x14058d[_0xf282('0x127')](_0x5d59f8,_0x32a451,_0x2cf005,_0xf282('0x1b7'));}else{_0x14058d[_0xf282('0x125')](_0x5d59f8,_0x32a451,_0x2cf005,_0xf282('0x1b7'));}}break;default:_0x1b2a9a[_0xf282('0x1b8')]+=0x1;_0x5d59f8[_0xf282('0x74')]=0xc;_0x5d59f8[_0xf282('0x75')]=_0x4296ae[_0xf282('0xcb')];_0x5526e0=_0x1b2a9a[_0xf282('0x195')];_0x19a0ea=_0x1b2a9a['callAdditionalPhoneAfterMin'];hopperUtils[_0xf282('0xcf')](_0x5d59f8)[_0xf282('0xa7')](loggerCatch(_0xf282('0x1b9')));if(_0x14058d[_0xf282('0x19d')](_0x4296ae[_0xf282('0xcb')],_0x332e7b,_0x1b2a9a)&&!_0x1bd20d){if(_0x5d59f8[_0xf282('0x11f')]+_0x5d59f8['countcongestionretry']+_0x5d59f8[_0xf282('0x121')]+_0x5d59f8['countnosuchnumberretry']+_0x5d59f8['countdropretry']+_0x5d59f8[_0xf282('0xec')]+_0x5d59f8[_0xf282('0x11c')]+_0x5d59f8[_0xf282('0x123')]>=_0x1b2a9a['dialGlobalMaxRetry']){_0x14058d[_0xf282('0x125')](_0x5d59f8,_0x32a451,_0x2cf005,_0x4296ae[_0xf282('0xcb')]);}else{_0x14058d[_0xf282('0x127')](_0x5d59f8,_0x32a451,_0x2cf005,_0x4296ae[_0xf282('0xcb')]);}}}})[_0xf282('0xb0')](function(){if(_0x1bd20d){hopperUtils[_0xf282('0xea')](_0x5d59f8,_0x5526e0,_0x19a0ea)[_0xf282('0xb0')](function(){return _0x32a451(0x1);});}});});};Dialer[_0xf282('0x1b')][_0xf282('0x125')]=function(_0x233567,_0x1153f8,_0x1e36d9,_0x33f238){var _0x1e416e=new Final(_0x233567);_0x1e416e[_0xf282('0x74')]=0xf;_0x1e416e[_0xf282('0x75')]=_0xf282('0x1ba');this['createStateFinal'](_0x1e416e,_0x1153f8,_0x1e36d9,_0x33f238);};Dialer[_0xf282('0x1b')][_0xf282('0x127')]=function(_0x1cd7bf,_0x401f52,_0x208352,_0x5aa850){hopperUtils[_0xf282('0xd1')](_0x1cd7bf)[_0xf282('0xb0')](function(){return _0x401f52(msgResponse('[callProgressDetecting]','Success',_0x5aa850));})[_0xf282('0xa7')](function(){return _0x208352(msgResponse(_0xf282('0x1bb'),_0xf282('0x98'),_0xf282('0x1bc')));});};Dialer[_0xf282('0x1b')][_0xf282('0xa')]=function(_0xcff6d8){var _0x3bf096=_0xcff6d8['dialPredictiveOptimizationPercentage']/0x64;var _0x3c1183=_0xcff6d8[_0xf282('0xd4')]/(_0xcff6d8[_0xf282('0xd4')]+_0xcff6d8[_0xf282('0xca')]);var _0xf90158=Math['round'](_0xcff6d8[_0xf282('0x1bd')]*(_0xcff6d8[_0xf282('0x1be')]/0x64));var _0x49c883=Math[_0xf282('0x1bf')](_0xcff6d8['predictiveIntervalAvailable']*(_0xcff6d8[_0xf282('0x1c0')]/0x64));var _0x536cae=_0xcff6d8[_0xf282('0x1c1')]+_0xcff6d8[_0xf282('0x138')];var _0xd605cf=Math[_0xf282('0x1c2')](_0xcff6d8[_0xf282('0x5e')]*_0xcff6d8['erlangAbandonmentRate']*_0xcff6d8[_0xf282('0x1c3')]*_0xcff6d8['predictiveIntervalMultiplicativeFactor']);if(_[_0xf282('0x57')](_0xcff6d8[_0xf282('0x29')])){if(!_[_0xf282('0x57')](_0xcff6d8[_0xf282('0x28')])){_0xcff6d8[_0xf282('0x28')]=undefined;loggerPredictive['error'](_0xf282('0x1c4'),_0xf282('0x1c5'));}if(!_[_0xf282('0x57')](_0xcff6d8[_0xf282('0x68')])){loggerPredictive['error'](_0xf282('0x1c4'),_0xf282('0x1c6'));clearInterval(_0xcff6d8[_0xf282('0x68')]);_0xcff6d8['handlePredictive']=undefined;}_0xcff6d8[_0xf282('0x29')]=moment()[_0xf282('0x47')](_0xf282('0xc8'));loggerPredictive[_0xf282('0x4b')](_0xcff6d8['name'],_0xf282('0x1c7'),_0xcff6d8[_0xf282('0x29')]);this['handlePower'](_0xcff6d8,0x1);}else if(ifInterval(_0xcff6d8[_0xf282('0x1c8')],_0xcff6d8[_0xf282('0x29')])){this[_0xf282('0xbb')](_0xcff6d8,0x1);loggerPredictiveCalls[_0xf282('0x4b')](_0xf282('0x1c9'),_0xcff6d8['startProgressive'],_0xcff6d8[_0xf282('0x66')]);_0xcff6d8['erlangCalls']=0x0;_0xcff6d8[_0xf282('0xd5')]=0x0;}else if(_0x3bf096<_0x3c1183&&_0xcff6d8[_0xf282('0x1ca')]===_0xf282('0x1cb')){clearPredictiveAttributes(_0xcff6d8);loggerPredictive[_0xf282('0x4b')](_0xf282('0x1cc'),_0xf282('0x1cd'),_0x3c1183,_0xf282('0x29'),_0xcff6d8['name']);}else if(_0xd605cf<_0xcff6d8[_0xf282('0xd5')]&&_0xcff6d8['dialPredictiveOptimization']===_0xf282('0x1cb')){clearPredictiveAttributes(_0xcff6d8);loggerPredictive[_0xf282('0x4b')](_0xf282('0x1ce'),_0xf282('0x1cf'),_0xd605cf,'Drop\x20in\x20this\x20interval',_0xcff6d8['predictiveIntervalErlangCallsDroppedCalls'],_0xf282('0x29'),_0xcff6d8[_0xf282('0x66')]);}else if(!ifInterval(_0xcff6d8['dialPredictiveInterval'],_0xcff6d8[_0xf282('0x29')])&&_[_0xf282('0x57')](_0xcff6d8['startPredictive'])&&!_[_0xf282('0x57')](_0xcff6d8['startProgressive'])){_0xcff6d8[_0xf282('0x28')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive['info'](_0xcff6d8['name'],_0xf282('0x1d0'),_0xcff6d8['startPredictive']);hopperUtils[_0xf282('0x1d1')](_0xcff6d8[_0xf282('0x1c8')])['then'](this[_0xf282('0x1d2')](_0xcff6d8))[_0xf282('0xb0')](mergeDataErlangB(_0xcff6d8))[_0xf282('0xb0')](this[_0xf282('0x1d3')](_0xcff6d8))[_0xf282('0xa7')](loggerCatchPredictive(_0xf282('0x1d4'),_0xcff6d8));}else if(!ifInterval(_0xcff6d8[_0xf282('0x1c8')],_0xcff6d8[_0xf282('0x28')])){_0xcff6d8[_0xf282('0xd5')]=0x0;_0xcff6d8[_0xf282('0x28')]=moment()[_0xf282('0x47')](_0xf282('0xc8'));loggerPredictive[_0xf282('0x4b')](_0xcff6d8[_0xf282('0x66')],'recalculate\x20predictive\x20at',_0xcff6d8[_0xf282('0x28')]);clearInterval(_0xcff6d8['handlePredictive']);_0xcff6d8[_0xf282('0x68')]=undefined;hopperUtils[_0xf282('0x1d1')](_0xcff6d8['dialPredictiveInterval'])[_0xf282('0xb0')](this['getDataPredictive'](_0xcff6d8))[_0xf282('0xb0')](mergeDataErlangB(_0xcff6d8))[_0xf282('0xb0')](this[_0xf282('0x1d3')](_0xcff6d8))[_0xf282('0xa7')](loggerCatchPredictive(_0xf282('0x1d5'),_0xcff6d8));}else if(_0xcff6d8[_0xf282('0x1bd')]&&_0x536cae<_0xcff6d8[_0xf282('0x1bd')]-_0x49c883){clearPredictiveAttributes(_0xcff6d8);loggerPredictive[_0xf282('0x4b')](_0xcff6d8[_0xf282('0x66')],_0xf282('0x1d6'),_0x536cae,_0xf282('0x1d7'),_0xcff6d8[_0xf282('0x1bd')],'-',_0x49c883,'=',_0xcff6d8[_0xf282('0x1bd')]-_0x49c883,')');}else if(_0xcff6d8['predictiveIntervalAvailable']&&_0x536cae>_0xcff6d8['predictiveIntervalAvailable']+_0xf90158){clearPredictiveAttributes(_0xcff6d8);loggerPredictive[_0xf282('0x4b')](_0xcff6d8['name'],_0xf282('0x1d6'),_0x536cae,_0xf282('0x1d8'),_0xcff6d8['predictiveIntervalAvailable'],'+',_0xf90158,'=',_0xcff6d8[_0xf282('0x1bd')]+_0xf90158,')');}};Dialer[_0xf282('0x1b')][_0xf282('0x1d2')]=function(_0x10607d){var _0x14d6e6=this;return function(_0x2b936b){return new Promise(function(_0x4421da,_0x17d44c){_['merge'](_0x10607d,_0x2b936b[0x0]);if(checkGetDataPredictive(_0x2b936b[0x0])){var _0x418b16=_0x10607d['predictiveIntervalAvailable']=_0x10607d['talking']+_0x10607d[_0xf282('0x1c1')];var _0x42174b=_0x10607d['dialPredictiveInterval']*0x3c;var _0x227eee=_0x2b936b[0x0]['predictiveIntervalAvgTalktime']+_0x2b936b[0x0][_0xf282('0x53')];var _0x4af518=(_0x2b936b[0x0][_0xf282('0x4f')]+_0x2b936b[0x0][_0xf282('0xd3')]+_0x2b936b[0x0][_0xf282('0x51')])/_0x2b936b[0x0][_0xf282('0x4e')];_0x10607d['predictiveIntervalHitRate']=_0x4af518>0x0?_0x4af518:0x1;switch(_0x10607d[_0xf282('0x1ca')]){case _0xf282('0x1cb'):var _0x486caa=_0x10607d[_0xf282('0x1d9')]/0x64;return _0x14d6e6[_0xf282('0x1da')](_0x418b16,_0x42174b,_0x227eee,_0x4af518,_0x486caa)[_0xf282('0xb0')](function(_0xd108e2){return _0x4421da(_0xd108e2);});case _0xf282('0x1db'):var _0x2c3c4a=_0x10607d[_0xf282('0x1d9')]/0x64;return _0x14d6e6[_0xf282('0x1dc')](_0x418b16,_0x42174b,_0x227eee,_0x4af518,_0x2c3c4a)[_0xf282('0xb0')](function(_0x468ba5){return _0x4421da(_0x468ba5);});default:return _0x17d44c(msgResponse(_0xf282('0x1dd'),'Failure','Unknown\x20Predictive'));}}else{return _0x17d44c(msgResponse('[getDataPredictive]',_0xf282('0x98'),_0xf282('0x1de')));}});};};Dialer[_0xf282('0x1b')][_0xf282('0x1df')]=function(_0x3793f2){var _0x1c5ecd=this;return function(_0x187743){return new Promise(function(_0x95ae70,_0x2cc6c1){_[_0xf282('0x64')](_0x3793f2,_0x187743[0x0]);if(checkGetDataPredictive(_0x187743[0x0])){loggerPredictive[_0xf282('0x4b')](JSON[_0xf282('0x7b')](_0x187743[0x0]));if(_0x3793f2[_0xf282('0x1ca')]===_0xf282('0x1cb')){return _0x1c5ecd['getVoiceQueueRtPauses'](_0x3793f2['id'])[_0xf282('0xb0')](function(_0x5c0801){var _0x525b54=_0x3793f2[_0xf282('0x1e0')]-_0x5c0801[0x0][_0xf282('0x1e1')];var _0x13c554=_0x3793f2[_0xf282('0x1c8')]*0x3c;var _0x8fac3c=_0x187743[0x0][_0xf282('0x55')]+_0x187743[0x0][_0xf282('0x53')];var _0x5960d0=(_0x187743[0x0][_0xf282('0x4f')]+_0x187743[0x0][_0xf282('0xd3')]+_0x187743[0x0]['predictiveIntervalDroppedCallsCallersExit'])/_0x187743[0x0][_0xf282('0x4e')];var _0x505fba=_0x3793f2[_0xf282('0x1d9')]/0x64;_0x3793f2[_0xf282('0x1e2')]=_0x5c0801[0x0][_0xf282('0x1e1')]||0x0;_0x3793f2[_0xf282('0x1c3')]=_0x5960d0>0x0?_0x5960d0:0x1;return _0x1c5ecd[_0xf282('0x1da')](_0x525b54,_0x13c554,_0x8fac3c,_0x5960d0,_0x505fba);})['then'](function(_0x154c93){return _0x95ae70(_0x154c93);})[_0xf282('0xa7')](function(_0x3e0d19){return _0x2cc6c1(msgResponse('[CatchErlangB]',_0xf282('0x98'),JSON[_0xf282('0x7b')](_0x3e0d19)));});}if(_0x3793f2[_0xf282('0x1ca')]==='agentBusyFactor'){return _0x1c5ecd[_0xf282('0x14c')](_0x3793f2['id'])['then'](function(_0x290c28){var _0x3e51aa=_0x3793f2[_0xf282('0x1e0')]-_0x290c28[0x0][_0xf282('0x1e1')];var _0x54a6d4=_0x3793f2[_0xf282('0x1c8')]*0x3c;var _0x1d8051=_0x187743[0x0]['predictiveIntervalAvgTalktime']+_0x187743[0x0]['predictiveIntervalAvgHoldtime'];var _0x852d4c=(_0x187743[0x0][_0xf282('0x4f')]+_0x187743[0x0][_0xf282('0xd3')]+_0x187743[0x0][_0xf282('0x51')])/_0x187743[0x0]['predictiveIntervalTotalCalls'];var _0x1b6e71=_0x3793f2[_0xf282('0x1d9')]/0x64;_0x3793f2[_0xf282('0x1e2')]=_0x290c28[0x0][_0xf282('0x1e1')]||0x0;_0x3793f2[_0xf282('0x1c3')]=_0x852d4c>0x0?_0x852d4c:0x1;return _0x1c5ecd[_0xf282('0x1dc')](_0x3e51aa,_0x54a6d4,_0x1d8051,_0x852d4c,_0x1b6e71);})[_0xf282('0xb0')](function(_0x541f0c){return _0x95ae70(_0x541f0c);})['catch'](function(_0x616326){return _0x2cc6c1(msgResponse('[CatchErlangB]','Failure',JSON[_0xf282('0x7b')](_0x616326)));});}}else{return _0x2cc6c1(msgResponse(_0xf282('0x1dd'),'Failure',_0xf282('0x1de')));}});};};Dialer['prototype'][_0xf282('0x1d3')]=function(_0x2fa1e7){var _0x4f026a=this;return function(){var _0x39bdff=0x0;var _0x394049=Math[_0xf282('0x1c2')](_0x2fa1e7[_0xf282('0x60')]*0x3e8);if(_0x394049>0x0){_0x394049=_0x394049<0x64?0x64:_0x394049;loggerPredictive['info'](_0x2fa1e7[_0xf282('0x66')],_0xf282('0x1e3'),_0x394049,_0xf282('0x1e4'));_0x2fa1e7[_0xf282('0x68')]=setInterval(function(){_0x4f026a[_0xf282('0x68')](_0x2fa1e7);loggerPredictiveCalls[_0xf282('0x4b')](_0xf282('0x1e5'),_0x39bdff+=0x1);},_0x394049);}else{loggerPredictive['info'](_0x2fa1e7[_0xf282('0x66')],_0xf282('0x1e6'));}};};Dialer['prototype'][_0xf282('0x1e7')]=function(_0x38de86,_0x78af66){var _0x4acafa=this;return function(_0x530e65){if(_[_0xf282('0x4a')](_0x530e65)){if(_[_0xf282('0xf6')](_0x78af66[_0xf282('0x153')])||!_0x78af66['recallme']){if(_0x38de86['dialMethod']===_0xf282('0x8')){_0x38de86[_0xf282('0x78')]=_[_0xf282('0x57')](_0x38de86[_0xf282('0x78')])?!![]:_0x38de86[_0xf282('0x78')];var _0x23377b=uuid['v4']();_0x4acafa[_0xf282('0xf1')][_0x23377b]=new Action(_0x38de86,_0x78af66,_0x23377b);loggerBooked['info'](_0xf282('0x1e8'),_0x23377b,'queueStatusComplete:\x20',JSON[_0xf282('0x7b')](_0x38de86['queueStatusComplete']),_0xf282('0x1e9'),_0x38de86['name']);if(_0x38de86['queueStatusComplete']){_0x38de86[_0xf282('0x78')]=![];_0x4acafa[_0xf282('0x2b')][_0x4acafa[_0xf282('0xf1')][_0x23377b][_0xf282('0xc5')]]=[];ami['Action']({'actionid':_0x23377b,'action':_0xf282('0x1ea'),'queue':_0x38de86['name']})['catch'](function(){_0x4acafa[_0xf282('0xc7')](_0x38de86);hopperUtils[_0xf282('0xe0')]({'active':![],'ContactId':_0x4acafa['actions'][_0x23377b]['ContactId'],'ListId':_0x4acafa[_0xf282('0xf1')][_0x23377b]['ListId'],'VoiceQueueId':_0x4acafa[_0xf282('0xf1')][_0x23377b][_0xf282('0xfe')]||undefined,'CampaignId':_0x4acafa[_0xf282('0xf1')][_0x23377b][_0xf282('0xe5')]||undefined})[_0xf282('0xa7')](loggerCatch(_0xf282('0x1eb')));delete _0x4acafa[_0xf282('0xf1')][_0x23377b];});}else{loggerBooked['info'](_0xf282('0x1ec'),JSON['stringify'](_0x38de86[_0xf282('0x78')]),_0xf282('0x1e9'),_0x38de86['name']);_0x4acafa[_0xf282('0xc7')](_0x38de86);hopperUtils[_0xf282('0xe0')]({'active':![],'ContactId':_0x4acafa[_0xf282('0xf1')][_0x23377b][_0xf282('0xe3')],'ListId':_0x4acafa['actions'][_0x23377b][_0xf282('0xe4')],'VoiceQueueId':_0x4acafa['actions'][_0x23377b][_0xf282('0xfe')]||undefined,'CampaignId':_0x4acafa[_0xf282('0xf1')][_0x23377b][_0xf282('0xe5')]||undefined})[_0xf282('0xa7')](loggerCatch('[unlockOriginate][syncQueueStatusComplete]'));delete _0x4acafa[_0xf282('0xf1')][_0x23377b];}}else{return _0x4acafa[_0xf282('0x1ed')](_0x38de86,_0x78af66);}}else{if(utils[_0xf282('0x65')](undefined,_0x78af66[_0xf282('0x1ee')])<_0x38de86[_0xf282('0x1ef')]*0x3c){if(_0x78af66['Agent']&&!_0x78af66[_0xf282('0x143')]['voicePause']){_0x4acafa[_0xf282('0x1e')][_0xf282('0xfc')](_0x78af66['id'])[_0xf282('0x1d')](function(){_0x4acafa[_0xf282('0xc7')](_0x38de86);});}else{hopperUtils[_0xf282('0x1f0')]({'active':![]},_0x78af66['id'],0x1)[_0xf282('0x1d')](function(){_0x4acafa[_0xf282('0xc7')](_0x38de86);});}}else{_0x38de86['outboundReCallsDay']+=0x1;_0x4acafa[_0xf282('0xc7')](_0x38de86);if(_0x38de86['dialRecallInQueue']){hopperUtils[_0xf282('0xe0')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x78af66['ContactId'],'ListId':_0x78af66['ListId'],'VoiceQueueId':_0x78af66[_0xf282('0xfe')]||undefined,'CampaignId':_0x78af66[_0xf282('0xe5')]||undefined})[_0xf282('0xa7')](loggerCatch(_0xf282('0x1f1')));hopperUtils[_0xf282('0xcf')](createObjHistory(_0x38de86,_0x78af66,utils[_0xf282('0x70')][_0xf282('0x1f2')],0x17,_0xf282('0x1f3')))['catch'](loggerCatch(_0xf282('0x1f4')));}else{_0x4acafa[_0xf282('0x118')](createObjHistory(_0x38de86,_0x78af66,utils['CAMPAIGN_STATUS'][_0xf282('0x1f5')],0x16,'RecallFailedTimeout'),_0xf282('0x1f6'),_0xf282('0x1f7'));}}}}else{_0x38de86[_0xf282('0x1f8')]+=0x1;_0x4acafa[_0xf282('0x118')](createObjHistory(_0x38de86,_0x78af66,utils[_0xf282('0x70')][_0xf282('0x1f9')],0xd,_0xf282('0x1fa')),_0xf282('0x1fb'),_0xf282('0x1fc'));throw _0xf282('0x1fd');}};};Dialer[_0xf282('0x1b')][_0xf282('0x158')]=function(_0xd092f0){var _0x15887a=this;var _0x3730ca=_0xd092f0['limitCalls']-_0xd092f0[_0xf282('0x86')]-_0xd092f0[_0xf282('0x1fe')];emitCampaignSummary(_0xd092f0);if(_0x3730ca>0x0){if(_0x3730ca>this[_0xf282('0x23')]){_0x3730ca=this[_0xf282('0x23')];}_0xd092f0[_0xf282('0x1fe')]+=_0x3730ca;hopperUtils[_0xf282('0x1ff')](_0xd092f0,_0x3730ca)['then'](function(_0x5324b0){_0xd092f0[_0xf282('0x1fe')]-=_0x3730ca;_0xd092f0[_0xf282('0x1fe')]=_0xd092f0['temp']>0x0?_0xd092f0[_0xf282('0x1fe')]:0x0;if(!utils[_0xf282('0x200')](_0x5324b0)){_0xd092f0[_0xf282('0x6f')]=utils['CAMPAIGN_STATUS']['NO_AVAILABLE_CONTACTS'];logger[_0xf282('0x4b')]('[getContactCampaign2][Empty]'+_0xd092f0['name']);}else{_0xd092f0[_0xf282('0x86')]+=_0x5324b0[_0xf282('0x101')];_0xd092f0['message']=utils[_0xf282('0x70')]['RUNNING'];for(var _0x263747=0x0;_0x263747<_0x5324b0[_0xf282('0x101')];_0x263747+=0x1){_0xd092f0[_0xf282('0x201')]+=0x1;if(_[_0xf282('0xf6')](_0x5324b0[_0x263747])||_['isNil'](_0x5324b0[_0x263747][_0xf282('0x173')])||_['isNil'](_0x5324b0[_0x263747][_0xf282('0x15b')])){_0x15887a[_0xf282('0x151')](_0xf282('0x202'),_0xd092f0,_0x5324b0[_0x263747]);}else{hopperUtils[_0xf282('0x203')](_['pick'](_0x5324b0[_0x263747],[_0xf282('0xe5'),_0xf282('0x15b')]))[_0xf282('0xb0')](_0x15887a[_0xf282('0x1e7')](_0xd092f0,_0x5324b0[_0x263747]))['catch'](_0x15887a[_0xf282('0x150')]('[actionOriginateIvr]\x20',_0xd092f0));}}}})['catch'](loggerGetContactDialer('[getContactCampaign2]',_0xd092f0,_0x3730ca));}};Dialer['prototype'][_0xf282('0xbb')]=function(_0x2c5208,_0x2c6c70){var _0x3759ac=this;var _0x2c71ac=[];if(_0x2c6c70<0x1||_0x2c5208['dialMethod']===_0xf282('0x8')){_0x2c6c70=0x1;}var _0x570093=Math[_0xf282('0x1c2')](_0x2c5208[_0xf282('0x1c1')]*_0x2c6c70)-_0x2c5208[_0xf282('0x86')]-_0x2c5208['temp'];if(_0x2c5208[_0xf282('0x204')]>0x0){var _0x4355ff=_0x2c5208[_0xf282('0x204')]-_0x2c5208[_0xf282('0x86')]-_0x2c5208[_0xf282('0x138')]-_0x2c5208[_0xf282('0x1fe')]-_0x2c5208[_0xf282('0x205')];if(_0x570093>_0x4355ff){_0x570093=_0x4355ff;}}if(_0x570093>0x0){if(_0x2c5208[_0xf282('0xb9')]===_0xf282('0x8')){_0x570093=0x1;}if(_0x570093>this['maxNumberOriginate']){_0x570093=this[_0xf282('0x23')];}_0x2c5208[_0xf282('0x1fe')]+=_0x570093;for(var _0x343c09 in this['agents']){if(typeof this[_0xf282('0x21')][_0x343c09]!==_0xf282('0xb2')){if(this[_0xf282('0x21')][_0x343c09][_0xf282('0x74')]==='not_inuse'&&this['agents'][_0x343c09][_0xf282('0x8d')]===_0xf282('0x8e')){_0x2c71ac[_0xf282('0xa0')](this[_0xf282('0x21')][_0x343c09]['id']);}}}hopperUtils['getContactDialer'](_0x2c5208,_0x2c71ac,_0x570093)['then'](function(_0x102e11){_0x2c5208['temp']-=_0x570093;_0x2c5208[_0xf282('0x1fe')]=_0x2c5208[_0xf282('0x1fe')]>0x0?_0x2c5208[_0xf282('0x1fe')]:0x0;if(!utils['checkContactEmpty'](_0x102e11)){hopperUtils['countReScheduled'](_0x2c5208)[_0xf282('0xb0')](sendMessageReschedule(_0x2c5208))[_0xf282('0xa7')](loggerCatch(_0xf282('0x206')));}else{_0x2c5208[_0xf282('0x86')]+=_0x102e11[_0xf282('0x101')];_0x2c5208['message']=_0x2c5208['dialMethod']===_0xf282('0x8')?utils['CAMPAIGN_STATUS'][_0xf282('0x165')]:utils[_0xf282('0x70')][_0xf282('0x207')];for(var _0x3c8cae=0x0;_0x3c8cae<_0x102e11[_0xf282('0x101')];_0x3c8cae+=0x1){if(_[_0xf282('0xf6')](_0x102e11[_0x3c8cae])||_[_0xf282('0xf6')](_0x102e11[_0x3c8cae][_0xf282('0x173')])||_[_0xf282('0xf6')](_0x102e11[_0x3c8cae][_0xf282('0x15b')])){_0x3759ac[_0xf282('0x151')](_0xf282('0x202'),_0x2c5208,_0x102e11[_0x3c8cae]);}else{hopperUtils[_0xf282('0x208')](_[_0xf282('0x7c')](_0x102e11[_0x3c8cae],[_0xf282('0xfe'),_0xf282('0x15b')]))[_0xf282('0xb0')](_0x3759ac[_0xf282('0x1e7')](_0x2c5208,_0x102e11[_0x3c8cae]))[_0xf282('0xa7')](_0x3759ac[_0xf282('0x150')](_0xf282('0x202'),_0x2c5208));}}}})[_0xf282('0xa7')](loggerGetContactDialer(_0xf282('0x209'),_0x2c5208,_0x570093));}};Dialer[_0xf282('0x1b')][_0xf282('0x68')]=function(_0x59b775){if(_0x59b775['dialLimitQueue']>0x0){var _0x26bb24=_0x59b775[_0xf282('0x204')]-_0x59b775[_0xf282('0x86')]-_0x59b775['talking'];if(_0x26bb24>0x0){this[_0xf282('0x20a')](_0x59b775);}else{loggerPredictiveCalls['info'](_0xf282('0x20b'));}}else{this[_0xf282('0x20a')](_0x59b775);}};Dialer[_0xf282('0x1b')][_0xf282('0x20a')]=function(_0x367628){var _0x382a5e=this;var _0x3056fe=[];_0x367628[_0xf282('0x86')]+=0x1;for(var _0x1daac7 in this[_0xf282('0x21')]){if(typeof this[_0xf282('0x21')][_0x1daac7]!=='undefined'){if(this[_0xf282('0x21')][_0x1daac7]['state']===_0xf282('0x20c')&&this[_0xf282('0x21')][_0x1daac7]['status']==='reachable'){_0x3056fe[_0xf282('0xa0')](this['agents'][_0x1daac7]['id']);}}}return this[_0xf282('0x20d')](_0x367628['id'],_0x3056fe,0x1,_0x367628[_0xf282('0x20e')],_0x367628)[_0xf282('0xb0')](function(_0x39636f){if(!utils[_0xf282('0x200')](_0x39636f)){utils[_0xf282('0x6d')](_0x367628,0x1,0x0);return hopperUtils['countReScheduled'](_0x367628)['then'](sendMessageReschedule(_0x367628))[_0xf282('0xa7')](loggerCatch(_0xf282('0x206')));}else{_0x367628[_0xf282('0x6f')]=utils[_0xf282('0x70')][_0xf282('0x207')];if(_['isNil'](_0x39636f[0x0])||_[_0xf282('0xf6')](_0x39636f[0x0][_0xf282('0x173')])||_[_0xf282('0xf6')](_0x39636f[0x0][_0xf282('0x15b')])){_0x382a5e[_0xf282('0x151')](_0xf282('0x202'),_0x367628,_0x39636f[0x0]);}else{return hopperUtils['checkIsBlackList'](_[_0xf282('0x7c')](_0x39636f[0x0],['VoiceQueueId',_0xf282('0x15b')]))['then'](_0x382a5e[_0xf282('0x1e7')](_0x367628,_0x39636f[0x0]))[_0xf282('0xa7')](_0x382a5e[_0xf282('0x150')](_0xf282('0x20f'),_0x367628));}}})[_0xf282('0xa7')](loggerGetContactDialer('[getContactDialerPredictive]',_0x367628,0x1));};Dialer[_0xf282('0x1b')]['abandonmentRate']=function(_0x9765e7,_0x207584,_0x50742a,_0x340b44,_0x2071d4,_0x4005d7){loggerPredictive[_0xf282('0x4b')](_0xf282('0x210'));loggerPredictive[_0xf282('0x4b')](_0xf282('0x211'),_0x9765e7);loggerPredictive[_0xf282('0x4b')](_0xf282('0x212'),_0x207584);loggerPredictive['info']('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',_0x50742a);loggerPredictive[_0xf282('0x4b')](_0xf282('0x213'),_0x340b44);loggerPredictive[_0xf282('0x4b')](_0xf282('0x214'),_0x2071d4);loggerPredictive['info'](_0xf282('0x56'));return new Promise(function(_0x578c57,_0x287fc6){if(_0x9765e7<=0x0||isNaN(_0x9765e7)){return _0x287fc6(msgResponse(_0xf282('0x215'),_0xf282('0x8a'),_0xf282('0x216')+_0x9765e7));}if(_0x50742a<=0x0||isNaN(_0x50742a)){return _0x287fc6(msgResponse(_0xf282('0x215'),_0xf282('0x8a'),'Ts\x20=\x20'+_0x50742a));}if(_0x340b44<=0x0||isNaN(_0x340b44)){return _0x287fc6(msgResponse(_0xf282('0x215'),_0xf282('0x8a'),_0xf282('0x217')+_0x340b44));}if(_0x207584<=0x0||isNaN(_0x207584)){return _0x287fc6(msgResponse(_0xf282('0x215'),_0xf282('0x8a'),_0xf282('0x218')+_0x207584));}if(_0x2071d4<=0x0||isNaN(_0x2071d4)){return _0x287fc6(msgResponse('[abandonmentRate]',_0xf282('0x8a'),_0xf282('0x219')+_0x2071d4));}_0x4005d7=_0x4005d7||0x0;var _0x2c0bb2=0x1/_0x50742a;var _0x537b9e=0x0;var _0x49746c=0x0;var _0x4b0608=0x0;var _0x4ba9d3=0x0;for(var _0x2781ac=0x0;_0x4b0608<_0x2071d4;_0x2781ac+=0x1){_0x49746c=_0x2781ac/_0x207584;_0x537b9e=(_0x340b44*_0x49746c+_0x4005d7)/_0x2c0bb2;_0x4b0608=utils[_0xf282('0x21a')](_0x537b9e,_0x9765e7);_0x4ba9d3=_0x537b9e/_0x9765e7*(0x1-utils[_0xf282('0x21a')](_0x537b9e,_0x9765e7));}return _0x578c57({'erlangCalls':_0x2781ac,'erlangCallToSecond':_0x207584/_0x2781ac,'erlangAbandonmentRate':_0x4b0608,'erlangBusyFactor':_0x4ba9d3});});};Dialer[_0xf282('0x1b')][_0xf282('0x1dc')]=function(_0x25ad74,_0x54199f,_0x9669a6,_0x3d8577,_0x17fe43,_0x204248){loggerPredictive[_0xf282('0x4b')](_0xf282('0x21b'));loggerPredictive[_0xf282('0x4b')](_0xf282('0x211'),_0x25ad74);loggerPredictive[_0xf282('0x4b')](_0xf282('0x212'),_0x54199f);loggerPredictive['info'](_0xf282('0x21c'),_0x9669a6);loggerPredictive['info'](_0xf282('0x213'),_0x3d8577);loggerPredictive[_0xf282('0x4b')](_0xf282('0x21d'),_0x17fe43);loggerPredictive['info']('---------------------------');return new Promise(function(_0x47b58d,_0x59df9f){if(_0x25ad74<=0x0||isNaN(_0x25ad74)){return _0x59df9f(msgResponse('[busyFactor]',_0xf282('0x8a'),'m\x20=\x20'+_0x25ad74));}if(_0x9669a6<=0x0||isNaN(_0x9669a6)){return _0x59df9f(msgResponse(_0xf282('0x21e'),_0xf282('0x8a'),'Ts\x20=\x20'+_0x9669a6));}if(_0x3d8577<=0x0||isNaN(_0x3d8577)){return _0x59df9f(msgResponse('[busyFactor]',_0xf282('0x8a'),_0xf282('0x217')+_0x3d8577));}if(_0x54199f<=0x0||isNaN(_0x54199f)){return _0x59df9f(msgResponse(_0xf282('0x21e'),'Error',_0xf282('0x218')+_0x54199f));}if(_0x17fe43<=0x0||isNaN(_0x17fe43)){return _0x59df9f(msgResponse(_0xf282('0x21e'),_0xf282('0x8a'),_0xf282('0x21f')+_0x17fe43));}_0x204248=_0x204248||0x0;var _0x209e11=0x1/_0x9669a6;var _0x1d9939=0x0;var _0x5a4553=0x0;var _0x22e15a=0x0;var _0x52efe4=0x0;for(var _0x398fcc=0x0;_0x52efe4<_0x17fe43;_0x398fcc+=0x1){_0x5a4553=_0x398fcc/_0x54199f;_0x1d9939=(_0x3d8577*_0x5a4553+_0x204248)/_0x209e11;_0x22e15a=utils['erlangb'](_0x1d9939,_0x25ad74);_0x52efe4=_0x1d9939/_0x25ad74*(0x1-utils['erlangb'](_0x1d9939,_0x25ad74));}return _0x47b58d({'erlangCalls':_0x398fcc,'erlangCallToSecond':_0x54199f/_0x398fcc,'erlangAbandonmentRate':_0x22e15a,'erlangBusyFactor':_0x52efe4});});};module[_0xf282('0x220')]=Dialer;
\ No newline at end of file
+var _0xe997=['[syncQueueSummary]','compareToOutboundQueue','queueSummaryCountersUpdated','assign','syncQueueSummaryComplete','throttle','filter','dialPreviewRecallmeReminder','handlePreviewRecallNotifications','map','Agent','checkPreviewRecallReminder','clearZombieChannels','[actions]','enqueue','[Dialer][checkChannel]','[Dialer][checkChannel][ivr]','getVoiceQueueRtPauses','[getVoiceQueueRtPauses]\x20','[updateOriginated]\x20is\x20null\x20or\x20undefined','emptyContact','notFound','merge','UserId','[emptyContact][createHistory]','[emptyContact]','[syncQueueCallerAbandon]\x20[Drop]','user:dialPreviewRecallReminder','handleIvr','object','originate','voiceQueue\x20is\x20undefine','phone','getCaller','\x22agi://%s/square,%s\x22','NONE','isOutboundQueue','\x22%s,%s%s,,,%s\x22','dialQueueOptions','dialAgiAfterHangupAgent','XMD-AMDINITIALSILENCE','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','XMD-AMDTOTALANALYSISTIME','dialAMDTotalAnalysisTime','dialAMDBetweenWordsSilence','XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','XMD-AMDSILENCETHRESHOLD','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','dialAMDMaximumWordLength','setXMDContactVariables','Contact','callerid','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','dialOriginateCallerIdNumber','getCallerId','dialOriginateCallerIdName','XMD-ORIGINATECALLERIDNAME','originatecalleridname','extractCalleridName','variables','dialPrefix','trim','dialCutDigit','substring','SIP/%s/%s%s','from-sip','dialOriginateTimeout','[originateError]:\x20%s','OriginateError','[originate][error]','originate\x20action\x20Error','checkRetriveMax','add','[rescheduleContact][NoAnswer]','[rescheduleContact]\x20[Busy]','dialCongestionMaxRetry','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','[rescheduleContact][NoSuchNumber]','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','[rescheduleContact][AgentReject]','[callProgressDetecting]','outboundNoSuchCallsDay','NoSuchNumber','custom:agentnosuchnumber','createStateFinal','reason\x200\x20no\x20such\x20number....','NoAnswer','buildNoAnswerEventPayload','custom:agentnoanswer','[syncAgentComplete][createHistory][3]','dialNoAnswerMaxRetry','reason\x203\x20ringing\x20no\x20answer','outboundBusyCallsDay','Busy','busy','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','outboundCongestionCallsDay','Congestion','custom:agentcongestion','congestion','reason\x208\x20congestion','outboundAbandonedCallsDay','reason\x2011\x20abandoned','outboundRejectCallsDay','AgentReject','custom:agentreject','agentreject','[syncAgentComplete][createHistory][20]','reason\x2020\x20agentreject','[moveContactManagedDialer][0]','contact\x20not\x20moved','dialPredictiveOptimizationPercentage','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','round','available','floor','erlangCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','dialPredictiveInterval','[startMethodPredictive][StartProgressive][Loop]','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','Drop\x20in\x20this\x20interval','started\x20in\x20predictive\x20at','avgHandleTime','startMethodPredictive','Predictive\x20after\x20first\x20interval','recalculate\x20predictive\x20at','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20less\x20than\x20threshold\x20(',')\x20are\x20more\x20than\x20threshold\x20(','getDataPredictive','abandonmentRate','agentBusyFactor','busyFactor','Unknown\x20Predictive','[getDataPredictive]','check\x20failure','dialPredictiveOptimization','loggedIn','outboundQueuePauses','predictiveIntervalAvgHoldtime','predictiveIntervalPauses','[CatchErlangB]','one\x20call\x20every:','milliseconds','[handlePredictive]','fail\x20to\x20scheduled\x20calls','checkContactBlack','recallme','[booked][checkContactBlack]','queueStatusComplete:\x20','queuestatus','[booked][checkContactBlack][else]','[unlockOriginate][syncQueueStatusComplete]','actionOriginate','scheduledat','dialRecallMeTimeout','voicePause','unlockContact','outboundReCallsDay','[rescheduleContact][dialRecallInQueue]','RecallInQueue','[Originate][HistoryDialRecallInQueue][historyCatch]','RecallFailedTimeout','[Originate][HistoryRecallClose][historyCatch]','outboundBlacklistCallsDay','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','inBlackList','temp','checkContactEmpty','[getContactCampaign2][Empty]','ivrTotalCallsDays','[actionOriginate]\x20','[actionOriginateIvr]\x20','[getContactCampaign2]','dialLimitQueue','not_inuse','countReScheduled','[countReScheduled]\x20','RUNNING','loggerHandler','tryOriginatePredictive','[handlePredictive][limitChannel]','getContactDialer','dialOrderByScheduledAt','checkIsBlackList','[getContactDialerPredictive]','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','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','m\x20=\x20','[abandonmentRate]','Ts\x20=\x20','p\x20=\x20','erlangb','----\x20Agent\x20Busy\x20Factor\x20----','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','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','Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[busyFactor]','interval\x20=\x20','Umin\x20=\x20','exports','util','lodash','uuid','moment','ioredis','./utils','./utils/hopper','../preview/util/util','../../../config/environment/','../../../config/logger','dialer','syncQueueSummary','../ami','redis','defaults','localhost','socket.io-emitter','../rpc/cmHopper','../rpc/voiceQueueRt','../rpc/setting','../rpc/interval','./models/action','./models/history','./models/final','./models/agentComplete','./models/queueCallerAbandon','./models/hangup','env','XCALLY_IP_AGI','tail','sequence','preview','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','channels','actions','contactsId','uniqueId','optionPredictive','startPredictive','ivrOriginated','queueBooked','queueBookedRR','queuesSummary','syncAgentConnect','bind','queuecallerabandon','syncQueueCallerAbandon','originateresponse','syncOriginateResponse','agentcomplete','syncAgentComplete','custom:queuesummary','custom:queuesummarycomplete','syncHangup','newexten','varset','syncVarSet','queuemember','syncQueueMember','syncQueueStatusComplete','loopCampaigns','loopClearZombieChannels','then','isUndefined','emit','type','outbound','debug','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','format','voice:queue:%s','info','-----\x20Stats\x20Predictive\x20---','predictiveIntervalTotalCalls','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAnsweredCalls','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsTimeout','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsCallersExit','AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgTalktime','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','History\x20information\x20are\x20empty','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCallToSecond','erlangAbandonmentRate','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangBusyFactor','---------------------------','getSeconds','startProgressive','name','startPredictive\x20value\x20cleared','handlePredictive','error','inspect','contactsRescheduled','message','CAMPAIGN_STATUS','CONTACTS_RESCHEDULED','[getContactDialer2][ReScheduled]','contacts','NO_AVAILABLE_CONTACTS','[getContactDialer2][Empty]','statedesc','endtime','starttime','[unlockQueueStatus][undefined]','[booked][unlockQueueStatus]','pick','queueStatusComplete','NULL_INTERVAL','\x20INTERVAL_IS_NULL','Intervals','Interval','isIVRCampaignActive','INACTIVE','\x20NOT\x20Active','isIVRCampaign','campaign:ivr:%s','campaign:save','originated','sendMessageOneNotActive','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','is\x20not\x20active','is\x20disactive','[ifTime][Action]','Error','prototype','isTrunkReachable','active','SIP/%s','reachable','status','unmonitored','checkIsTrunkReachable','Trunk','TrunkBackup','TRUNK_NOT_REACHABLE','checkIfTime','ifTimeIvr','checkIfTimeIntervals','ifTime','Failure','EMPTY_INTERVAL','\x20Intervals\x20is\x20empty\x20','timezones','UNKNOWN_TIMEZONE','push','Action','command','iftime\x20%s,%s','interval','content','true','catch','indexOf','all','some','OVERTIME_GLOBAL_INTERVAL','OVERTIME_INTERVAL','Global:\x20','\x20Interval\x20is\x20overtime:\x20','stringify','resetActiveCalls','syncCampaigns','undefined','resolve','dialGlobalInterval','dialTimezone','launchHandleIvr','[syncCampaigns]','checkDialMethod','dialMethod','predictive','progressive','handlePower','power','dialPowerLevel','booked','Queue','method\x20not\x20recognized','silly','Dialer::ifTime()','Voice\x20Queue\x20%s\x20$s','[ifTime][promiseAll]','Timezone:\x20','Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:','isGlobal','queue','ivr','updateOriginated','answertime','uniqueid','reason','agent','YYYY-MM-DD\x20HH:mm:ss','[syncAgentComplete][createHistory]','[syncAgentComplete]','droptime','dialQueueTimeout','outboundDropCallsDayTimeout','predictiveIntervalErlangCallsDroppedCalls','state','Drop','dropreason','TIMEOUT','agiafterat','dialQueueProject2','countdropretry','countglobal','dialDropRetryFrequency','verifyAdditionalPhones','additional','dialDropMaxRetry','minutes','ContactId','ListId','VoiceQueueId','CampaignId','[rescheduleContact][Drop]','calleridname','calleridnum','createHistory','[syncAgentComplete][createHistory][10]','swapAdditionalPhones','outboundDropCallsDayCallersExit','Abandoned','CALLEREXIT','countabandonedretry','dialAbandonedRetryFrequency','callAdditionalPhoneAfterMin','voiceQueue','dialAbandonedMaxRetry','[rescheduleContact][Abandoned]','[syncAgentComplete][createHistory][11]','syncNewExten','channel','actionid','rrmemory','roundrobin','isNil','paused','stateinterface','locked','idHopper','strategy','run','[Catch][Preview][syncQueueStatusComplete]','finally','rescheduleContact','[unlock][syncQueueStatusComplete]','isEmpty','_rr','length','unlockRR','[booked][RR]','contactAgent-idHopper:\x20','Agent:\x20','[booked][unlock]','[unlock2][syncQueueStatusComplete]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','responsetime','getQueue','response','Success','variable','amdstatus','exten','xcally-motion-dialer','dialAMDActive','value','HANGUP','outboundAnswerCallsDay','outboundAnswerAgiCallsDay','HangupInAMD','membername','AMD','custom:amd','buildObj','amd','saveInDb','[syncHangupInAMD][createHistory]','[syncHangupInAMD]','Machine','countmachineretry','[syncAgentComplete][createHistory][0]','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countagentrejectretry','stateGlobal','reason19\x20machine....','dialMachineRetryFrequency','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','MACHINE','dialGlobalMaxRetry','dialMachineMaxRetry','reason\x2019\x20machine....','[rescheduleContact][Machine]','ivrAnswerCallsDay','dialQueueProject','AnswerAGI','[syncHangupIvr][createHistory]','moveContactManagedDialer','outboundUnknownCallsDay','cause-txt','Unknow','[syncHangupIvr]','running','isPreviewCampaign','statusMessage','getQueueCampaignStatusMessage','inUse','talking','pTalking','ACTIVE'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xe997,0xde));var _0x7e99=function(_0x2d4823,_0x5d7a62){_0x2d4823=_0x2d4823-0x0;var _0x52ba23=_0xe997[_0x2d4823];return _0x52ba23;};'use strict';var util=require(_0x7e99('0x0'));var _=require(_0x7e99('0x1'));var uuid=require(_0x7e99('0x2'));var moment=require(_0x7e99('0x3'));var rr=require('rr');var Redis=require(_0x7e99('0x4'));var utils=require(_0x7e99('0x5'));var hopperUtils=require(_0x7e99('0x6'));var ut=require(_0x7e99('0x7'));var config=require(_0x7e99('0x8'));var logger=require(_0x7e99('0x9'))(_0x7e99('0xa'));var loggerBooked=require(_0x7e99('0x9'))('booked');var loggerPredictive=require(_0x7e99('0x9'))('predictive');var loggerPredictiveCalls=require(_0x7e99('0x9'))('predictiveCalls');var loggerSyncQueueSummary=require(_0x7e99('0x9'))(_0x7e99('0xb'));var ami=require(_0x7e99('0xc'));config[_0x7e99('0xd')]=_[_0x7e99('0xe')](config[_0x7e99('0xd')],{'host':_0x7e99('0xf'),'port':0x18eb});var io=require(_0x7e99('0x10'))(new Redis(config[_0x7e99('0xd')]));var cmHopper=require(_0x7e99('0x11'));var voiceQueueRt=require(_0x7e99('0x12'));var RpcSetting=require(_0x7e99('0x13'));var Interval=require(_0x7e99('0x14'));var Action=require(_0x7e99('0x15'));var History=require(_0x7e99('0x16'));var Final=require(_0x7e99('0x17'));var AgentComplete=require(_0x7e99('0x18'));var QueueCallerAbandon=require(_0x7e99('0x19'));var Hangup=require(_0x7e99('0x1a'));var ipAgi=process[_0x7e99('0x1b')][_0x7e99('0x1c')]||'127.0.0.1';var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence['prototype']['enqueue']=function(_0x3ae62b){this[_0x7e99('0x1d')]=this[_0x7e99('0x1d')]?this[_0x7e99('0x1d')]['finally'](_0x3ae62b):_0x3ae62b();};function Dialer(_0x12ebf1,_0x1fc260){this[_0x7e99('0x1e')]=new Sequence();this[_0x7e99('0x1f')]=_0x1fc260;this[_0x7e99('0x20')]=_0x12ebf1[_0x7e99('0x20')];this[_0x7e99('0x21')]=_0x12ebf1[_0x7e99('0x21')];this[_0x7e99('0x22')]=_0x12ebf1['agents'];this[_0x7e99('0x23')]=_0x12ebf1[_0x7e99('0x23')];this[_0x7e99('0x24')]=config['maxNumberOriginate']||0x2;this[_0x7e99('0x25')]={};this[_0x7e99('0x26')]={};this[_0x7e99('0x27')]={};this[_0x7e99('0x28')]={};this[_0x7e99('0x29')]={};this[_0x7e99('0x2a')]={};this['startProgressive']={};this[_0x7e99('0x2b')]={};this[_0x7e99('0x2c')]={};this[_0x7e99('0x2d')]={};this[_0x7e99('0x2e')]={};ami['on']('agentconnect',this[_0x7e99('0x2f')][_0x7e99('0x30')](this));ami['on'](_0x7e99('0x31'),this[_0x7e99('0x32')]['bind'](this));ami['on'](_0x7e99('0x33'),this[_0x7e99('0x34')]['bind'](this));ami['on'](_0x7e99('0x35'),this[_0x7e99('0x36')]['bind'](this));ami['on'](_0x7e99('0x37'),this['syncQueueSummary'][_0x7e99('0x30')](this));ami['on'](_0x7e99('0x38'),this['syncQueueSummaryComplete'][_0x7e99('0x30')](this));ami['on']('hangup',this[_0x7e99('0x39')][_0x7e99('0x30')](this));ami['on'](_0x7e99('0x3a'),this['syncNewExten'][_0x7e99('0x30')](this));ami['on'](_0x7e99('0x3b'),this[_0x7e99('0x3c')][_0x7e99('0x30')](this));ami['on'](_0x7e99('0x3d'),this[_0x7e99('0x3e')][_0x7e99('0x30')](this));ami['on']('queuestatuscomplete',this[_0x7e99('0x3f')][_0x7e99('0x30')](this));this[_0x7e99('0x40')]();this[_0x7e99('0x41')]();RpcSetting['getSettings']()[_0x7e99('0x42')](function(_0x266cbc){previewRecallmeReminderInterval=_0x266cbc['previewRecallmeReminderInterval'];});}function isNotNull(_0x2ff2f8){return _0x2ff2f8!==null&&!_[_0x7e99('0x43')](_0x2ff2f8);}function msgResponse(_0x340a23,_0x47ac42,_0x14c84b){return{'action':_0x340a23,'response':_0x47ac42,'message':_0x14c84b,'stack':_0x14c84b};}function emit(_0x337c50,_0x278dcc,_0x1935be){io['to'](_0x337c50)[_0x7e99('0x44')](_0x278dcc,_0x1935be);}function emitOutboundVoiceQueueSummary(_0x2379e6){if(_0x2379e6[_0x7e99('0x45')]===_0x7e99('0x46')){logger[_0x7e99('0x47')](_0x7e99('0x48'),util['inspect'](_0x2379e6,{'showHidden':![],'depth':null}));emit(util[_0x7e99('0x49')](_0x7e99('0x4a'),_0x2379e6['name']),'voice_queue:save',_0x2379e6);}}function checkGetDataPredictive(_0x204e8b){if(isNotNull(_0x204e8b)&&!_['isEmpty'](_0x204e8b)){loggerPredictive[_0x7e99('0x4b')](_0x7e99('0x4c'));loggerPredictive[_0x7e99('0x4b')]('Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x204e8b[_0x7e99('0x4d')]);loggerPredictive[_0x7e99('0x4b')](_0x7e99('0x4e'),_0x204e8b[_0x7e99('0x4f')]);loggerPredictive[_0x7e99('0x4b')](_0x7e99('0x50'),_0x204e8b[_0x7e99('0x51')]);loggerPredictive[_0x7e99('0x4b')](_0x7e99('0x52'),_0x204e8b[_0x7e99('0x53')]);loggerPredictive[_0x7e99('0x4b')](_0x7e99('0x54'),_0x204e8b['predictiveIntervalAvgHoldtime']);loggerPredictive[_0x7e99('0x4b')](_0x7e99('0x55'),_0x204e8b[_0x7e99('0x56')]);loggerPredictive[_0x7e99('0x4b')]('---------------------------');if(_0x204e8b[_0x7e99('0x4d')]>0x0){if(!_[_0x7e99('0x43')](_0x204e8b[_0x7e99('0x56')])&&_0x204e8b[_0x7e99('0x56')]>0x0){return!![];}loggerPredictive[_0x7e99('0x4b')]('Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive');if(!_[_0x7e99('0x43')](_0x204e8b['predictiveIntervalAvgHoldtime'])&&_0x204e8b['predictiveIntervalAvgHoldtime']>0x0){return!![];}loggerPredictive['info']('Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive');}else{loggerPredictive['info'](_0x7e99('0x57'));}}else{loggerPredictive[_0x7e99('0x4b')](_0x7e99('0x58'));}return![];}function mergeDataErlangB(_0x4efe4c){return function(_0x1dfc9d){loggerPredictive[_0x7e99('0x4b')]('---------\x20ErlangB\x20---------');loggerPredictive[_0x7e99('0x4b')](_0x7e99('0x59'),_0x1dfc9d['erlangCalls']);loggerPredictive['info'](_0x7e99('0x5a'),_0x1dfc9d[_0x7e99('0x5b')]);loggerPredictive[_0x7e99('0x4b')]('Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x1dfc9d[_0x7e99('0x5c')]);loggerPredictive[_0x7e99('0x4b')](_0x7e99('0x5d'),_0x1dfc9d[_0x7e99('0x5e')]);loggerPredictive[_0x7e99('0x4b')]('Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x1dfc9d[_0x7e99('0x5c')]);loggerPredictive[_0x7e99('0x4b')](_0x7e99('0x5f'));_['merge'](_0x4efe4c,_0x1dfc9d);};}function ifInterval(_0x1d0647,_0x279989){if(_[_0x7e99('0x43')](_0x279989)){return![];}return utils[_0x7e99('0x60')](undefined,_0x279989)<_0x1d0647*0x3c;}function clearPredictiveAttributes(_0x239b34){if(_0x239b34[_0x7e99('0x61')]){_0x239b34[_0x7e99('0x61')]=undefined;loggerPredictive[_0x7e99('0x47')](_0x239b34['name'],'startProgressive\x20value\x20cleared');}if(_0x239b34[_0x7e99('0x2a')]){_0x239b34['startPredictive']=undefined;loggerPredictive[_0x7e99('0x47')](_0x239b34[_0x7e99('0x62')],_0x7e99('0x63'));}if(_0x239b34[_0x7e99('0x64')]){clearInterval(_0x239b34[_0x7e99('0x64')]);_0x239b34[_0x7e99('0x64')]=undefined;loggerPredictive['debug'](_0x239b34[_0x7e99('0x62')],'handlePredictive\x20interval\x20cleared');}}function loggerCatchPredictive(_0x141a5b,_0x576b97){return function(_0x502c09){loggerPredictive[_0x7e99('0x65')](_0x576b97[_0x7e99('0x62')],_0x141a5b);loggerPredictive[_0x7e99('0x65')](_0x502c09['stack']);clearPredictiveAttributes(_0x576b97);};}function loggerCatch(_0xe39b74){return function(_0x5c9f54){logger[_0x7e99('0x65')](_0xe39b74,util['inspect'](_0x5c9f54,{'showHidden':![],'depth':null}));};}function loggerGetContactDialer(_0x3a22a0,_0x2c7afb,_0x3c07a0){return function(_0x181aea){utils['checkContactLowerLimitOriginate'](_0x2c7afb,_0x3c07a0,0x0);logger[_0x7e99('0x65')](_0x3a22a0,util[_0x7e99('0x66')](_0x181aea,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x4d35b6){return function(_0x5418b7){if(isNotNull(_0x5418b7)&&isNotNull(_0x5418b7[0x0])){if(_0x5418b7[0x0][_0x7e99('0x67')]>0x0){_0x4d35b6[_0x7e99('0x68')]=utils[_0x7e99('0x69')][_0x7e99('0x6a')];logger[_0x7e99('0x4b')](_0x7e99('0x6b')+_0x4d35b6[_0x7e99('0x62')],_0x5418b7[0x0][_0x7e99('0x67')],_0x7e99('0x6c'));}else{_0x4d35b6[_0x7e99('0x68')]=utils['CAMPAIGN_STATUS'][_0x7e99('0x6d')];logger['info'](_0x7e99('0x6e')+_0x4d35b6[_0x7e99('0x62')]);}}};}function createObjHistory(_0x2d6725,_0x42fce7,_0x22dd0c,_0x1d130d,_0xb0c80b){_0x2d6725[_0x7e99('0x68')]=_0x22dd0c;var _0x5ea250=new Action(_0x2d6725,_0x42fce7);var _0xa9583e=new History(_0x5ea250);_0xa9583e['state']=_0x1d130d;_0xa9583e[_0x7e99('0x6f')]=_0xb0c80b;_0xa9583e[_0x7e99('0x70')]=_0x5ea250[_0x7e99('0x71')];return _0xa9583e;}function unlockQueueStatus(_0x47cf61,_0x3c957e){setTimeout(function(){if(_[_0x7e99('0x43')](_0x47cf61['queueStatusComplete'])){loggerBooked[_0x7e99('0x65')](_0x7e99('0x72'),_0x3c957e);}_0x47cf61['queueStatusComplete']=!![];loggerBooked['info'](_0x7e99('0x73'),_0x3c957e,JSON['stringify'](_[_0x7e99('0x74')](_0x47cf61,['name',_0x7e99('0x75')])));},0x1f3);}function checkInterval(_0x290338){return function(){if(!isNotNull(_0x290338['Interval'])){_0x290338[_0x7e99('0x68')]=utils[_0x7e99('0x69')][_0x7e99('0x76')];throw _0x290338[_0x7e99('0x62')]+_0x7e99('0x77');}if(!isNotNull(_0x290338['Interval'][_0x7e99('0x78')])){_0x290338[_0x7e99('0x68')]=utils[_0x7e99('0x69')][_0x7e99('0x76')];throw _0x290338[_0x7e99('0x62')]+_0x7e99('0x77');}if(!isNotNull(_['isEmpty'](_0x290338[_0x7e99('0x79')]['Intervals']))){_0x290338['message']=utils['CAMPAIGN_STATUS']['NULL_INTERVAL'];throw _0x290338[_0x7e99('0x62')]+_0x7e99('0x77');}};}function checkIsIVRCampaignActive(_0x2541ff){return function(){if(!utils[_0x7e99('0x7a')](_0x2541ff)){_0x2541ff[_0x7e99('0x68')]=utils[_0x7e99('0x69')][_0x7e99('0x7b')];throw _0x2541ff[_0x7e99('0x62')]+_0x7e99('0x7c');}};}function emitCampaignSummary(_0x19d60d){if(utils[_0x7e99('0x7d')](_0x19d60d)){emit(util[_0x7e99('0x49')](_0x7e99('0x7e'),_0x19d60d[_0x7e99('0x62')]),_0x7e99('0x7f'),_0x19d60d);}}function loggerCatchQueueSummary(_0x388202,_0x3a4d44){return function(_0xca0dd8){clearPredictiveAttributes(_0x3a4d44);emitCampaignSummary(_0x3a4d44);loggerSyncQueueSummary[_0x7e99('0x47')](_0x388202,util[_0x7e99('0x66')](_0xca0dd8,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x4dfbc8){if(_0x4dfbc8['sendMessageOneNotActive']){if(_0x4dfbc8[_0x7e99('0x80')]===0x0){_0x4dfbc8[_0x7e99('0x81')]=![];_0x4dfbc8[_0x7e99('0x68')]=utils[_0x7e99('0x69')][_0x7e99('0x7b')];loggerSyncQueueSummary[_0x7e99('0x47')](_0x7e99('0x82'),_0x4dfbc8[_0x7e99('0x62')],_0x7e99('0x83'));}else{_0x4dfbc8['message']=utils[_0x7e99('0x69')]['DISACTIVED'];loggerSyncQueueSummary['debug'](_0x7e99('0x82'),_0x4dfbc8['name'],_0x7e99('0x84'));}emitCampaignSummary(_0x4dfbc8);}}function myreject(_0x544383){return function(_0x3c8eaf){return _0x544383(msgResponse(_0x7e99('0x85'),_0x7e99('0x86'),JSON['stringify'](_0x3c8eaf)));};}Dialer[_0x7e99('0x87')][_0x7e99('0x88')]=function(_0x29309a){return!_['isUndefined'](_0x29309a)&&_0x29309a&&!_[_0x7e99('0x43')](_0x29309a[_0x7e99('0x62')])&&!_[_0x7e99('0x43')](_0x29309a[_0x7e99('0x89')])&&_0x29309a[_0x7e99('0x89')]&&(this[_0x7e99('0x23')][util[_0x7e99('0x49')](_0x7e99('0x8a'),_0x29309a[_0x7e99('0x62')])]['status']===_0x7e99('0x8b')||this[_0x7e99('0x23')][util['format'](_0x7e99('0x8a'),_0x29309a[_0x7e99('0x62')])][_0x7e99('0x8c')]===_0x7e99('0x8d'));};Dialer['prototype'][_0x7e99('0x8e')]=function(_0x1aa069){var _0x2d7aea=this;return function(){if(!_0x2d7aea[_0x7e99('0x88')](_0x1aa069[_0x7e99('0x8f')])){if(!_0x2d7aea[_0x7e99('0x88')](_0x1aa069[_0x7e99('0x90')])){_0x1aa069['message']=utils['CAMPAIGN_STATUS'][_0x7e99('0x91')];throw _0x1aa069[_0x7e99('0x62')]+'\x20trunk\x20is\x20not\x20reachable';}}};};Dialer[_0x7e99('0x87')][_0x7e99('0x92')]=function(_0x1d48fd,_0x1f2b41,_0x1d95a5,_0x545fad){var _0x1ebcf5=this;return function(){var _0x161392=!![];return _0x1ebcf5[_0x7e99('0x93')](_0x1d48fd,_0x1f2b41,_0x1d95a5,_0x545fad,_0x161392);};};Dialer[_0x7e99('0x87')][_0x7e99('0x94')]=function(_0x1be7ec,_0x2519fd,_0xa2bd74,_0x453ec3){var _0x18ae69=this;return function(){var _0x192cfc=![];return _0x18ae69[_0x7e99('0x93')](_0x1be7ec['Intervals'],_0x2519fd,_0xa2bd74,_0x453ec3,_0x192cfc);};};Dialer[_0x7e99('0x87')][_0x7e99('0x93')]=function(_0x110250,_0x30b542,_0x436b62,_0x29cfbe,_0x37ea44){var _0x5f4900=[];return new Promise(function(_0x5b1dae,_0x28509e){if(!isNotNull(_0x110250)){_0x29cfbe[_0x7e99('0x68')]=utils[_0x7e99('0x69')]['NULL_INTERVAL'];return _0x28509e(msgResponse(_0x7e99('0x95'),_0x7e99('0x96'),_0x436b62+'\x20Intervals\x20is\x20null\x20'));}if(_['isEmpty'](_0x110250)){_0x29cfbe[_0x7e99('0x68')]=utils['CAMPAIGN_STATUS'][_0x7e99('0x97')];return _0x28509e(msgResponse(_0x7e99('0x95'),_0x7e99('0x96'),_0x436b62+_0x7e99('0x98')));}if(_0x30b542&&_[_0x7e99('0x43')](config[_0x7e99('0x99')][_0x30b542])){_0x29cfbe[_0x7e99('0x68')]=utils['CAMPAIGN_STATUS'][_0x7e99('0x9a')];return _0x28509e(msgResponse(_0x7e99('0x95'),_0x7e99('0x96'),_0x436b62+'\x20Timezone\x20unknow\x20'+_0x30b542));}if(_['isArray'](_0x110250)){for(var _0x21046e=0x0;_0x21046e<_0x110250['length'];_0x21046e+=0x1){_0x5f4900[_0x7e99('0x9b')](ami[_0x7e99('0x9c')]({'action':_0x7e99('0x9d'),'command':util[_0x7e99('0x49')](_0x7e99('0x9e'),_0x110250[_0x21046e][_0x7e99('0x9f')],!_[_0x7e99('0x43')](config[_0x7e99('0x99')][_0x30b542])?_0x30b542:'')})[_0x7e99('0x42')](function(_0x33b9c8){return _0x33b9c8[_0x7e99('0xa0')]['indexOf'](_0x7e99('0xa1'))>=0x0;})[_0x7e99('0xa2')](myreject(_0x28509e)));}}else{_0x5f4900[_0x7e99('0x9b')](ami[_0x7e99('0x9c')]({'action':_0x7e99('0x9d'),'command':util[_0x7e99('0x49')]('iftime\x20%s,%s',_0x110250,!_[_0x7e99('0x43')](config[_0x7e99('0x99')][_0x30b542])?_0x30b542:'')})[_0x7e99('0x42')](function(_0x4a66ba){return _0x4a66ba['content'][_0x7e99('0xa3')](_0x7e99('0xa1'))>=0x0;})[_0x7e99('0xa2')](myreject(_0x28509e)));}Promise[_0x7e99('0xa4')](_0x5f4900)['then'](function(_0x9d94cc){var _0x1f1f0c=_[_0x7e99('0xa5')](_0x9d94cc);if(_0x1f1f0c){return _0x5b1dae(_0x1f1f0c);}else{_0x29cfbe[_0x7e99('0x68')]=_0x37ea44?utils[_0x7e99('0x69')][_0x7e99('0xa6')]:utils[_0x7e99('0x69')][_0x7e99('0xa7')];return _0x28509e(msgResponse('[ifTime][promiseAll]','Failure',_0x7e99('0xa8')+_0x37ea44+'\x20'+_0x436b62+_0x7e99('0xa9')+util[_0x7e99('0x66')](_0x110250,{'showHidden':![],'depth':null})+'Timezone:\x20'+_0x30b542));}})['catch'](function(_0x5afa46){return _0x28509e(msgResponse('ifTime',_0x7e99('0x96'),JSON[_0x7e99('0xaa')](_0x5afa46)));});});};Dialer[_0x7e99('0x87')]['loopCampaigns']=function(){var _0x4611a8=this;return cmHopper[_0x7e99('0xab')]({'active':![]},{'where':{'active':!![]}})['then'](function(){setInterval(function(){_0x4611a8[_0x7e99('0xac')]();},0x3e8);});};Dialer['prototype'][_0x7e99('0xac')]=function(){var _0x190cfb=this;var _0x26ae89;for(var _0x456ad4 in this[_0x7e99('0x21')]){if(typeof this[_0x7e99('0x21')][_0x456ad4]!==_0x7e99('0xad')){_0x26ae89=this[_0x7e99('0x21')][_0x456ad4];if(utils[_0x7e99('0x7d')](_0x26ae89)&&utils[_0x7e99('0x7a')](_0x26ae89)){_0x26ae89[_0x7e99('0x81')]=!![];Promise[_0x7e99('0xae')]()[_0x7e99('0x42')](checkIsIVRCampaignActive(_0x26ae89))[_0x7e99('0x42')](checkInterval(_0x26ae89))[_0x7e99('0x42')](_0x190cfb[_0x7e99('0x8e')](_0x26ae89))[_0x7e99('0x42')](_0x190cfb[_0x7e99('0x92')](_0x26ae89[_0x7e99('0xaf')],_0x26ae89[_0x7e99('0xb0')],_0x26ae89[_0x7e99('0x62')],_0x26ae89))['then'](_0x190cfb[_0x7e99('0x94')](_0x26ae89[_0x7e99('0x79')],_0x26ae89[_0x7e99('0xb0')],_0x26ae89[_0x7e99('0x62')],_0x26ae89))['then'](_0x190cfb[_0x7e99('0xb1')](_0x26ae89))[_0x7e99('0xa2')](loggerCatchQueueSummary(_0x7e99('0xb2'),_0x26ae89));}else{notSendMessagesCampaign(_0x26ae89);}}}};Dialer[_0x7e99('0x87')][_0x7e99('0xb3')]=function(_0xd2edae){if(_0xd2edae[_0x7e99('0xb4')]!==_0x7e99('0xb5')){clearPredictiveAttributes(_0xd2edae);}switch(_0xd2edae[_0x7e99('0xb4')]){case _0x7e99('0xb6'):this[_0x7e99('0xb7')](_0xd2edae,0x1);break;case _0x7e99('0xb8'):this[_0x7e99('0xb7')](_0xd2edae,_0xd2edae[_0x7e99('0xb9')]);break;case _0x7e99('0xb5'):this[_0x7e99('0xb5')](_0xd2edae);break;case _0x7e99('0xba'):this[_0x7e99('0xb7')](_0xd2edae,0x1);break;default:logger[_0x7e99('0x65')](_0x7e99('0xbb'),_0xd2edae[_0x7e99('0x62')],_0x7e99('0xbc'));}};Dialer[_0x7e99('0x87')]['ifTime']=function(_0x2d427e,_0x16e394){var _0x1174b8=_0x2d427e[_0x7e99('0xb0')];var _0x3824a3=_0x16e394?_0x2d427e['dialGlobalInterval']:_0x2d427e[_0x7e99('0x79')][_0x7e99('0x78')];logger[_0x7e99('0xbd')](_0x7e99('0xbe'),_0x3824a3,_0x1174b8,_0x2d427e['name'],util['format'](_0x7e99('0xbf'),_0x2d427e[_0x7e99('0x62')],_0x2d427e['id']));var _0x422ae8=null;return Interval['intervalIftime'](_0x3824a3,_0x1174b8)[_0x7e99('0x42')](function(_0x39f04e){if(_0x39f04e===!![]){return _0x39f04e;}else{_0x2d427e[_0x7e99('0x68')]=_0x16e394?utils[_0x7e99('0x69')][_0x7e99('0xa6')]:utils[_0x7e99('0x69')]['OVERTIME_INTERVAL'];_0x422ae8=msgResponse(_0x7e99('0xc0'),'Failure',_0x7e99('0xa8')+_0x16e394+'\x20'+_0x2d427e[_0x7e99('0x62')]+'\x20Interval\x20is\x20overtime:\x20'+util[_0x7e99('0x66')](_0x3824a3,{'showHidden':![],'depth':null})+_0x7e99('0xc1')+_0x1174b8);}if(_0x422ae8!==null){logger[_0x7e99('0xbd')](_0x7e99('0xc2'),_0x422ae8);_0x422ae8[_0x7e99('0xc3')]=_0x16e394;throw _0x422ae8;}})[_0x7e99('0xa2')](function(_0x11014e){logger[_0x7e99('0x65')]('AMI\x20IfTime',_0x11014e);throw msgResponse('[ifTime][Action]',_0x7e99('0x86'),util[_0x7e99('0x66')](_0x11014e,{'showHidden':![],'depth':null}));});};Dialer[_0x7e99('0x87')]['syncAgentConnect']=function(_0x3113b6){if(this[_0x7e99('0x20')][_0x3113b6[_0x7e99('0xc4')]]){if(this[_0x7e99('0x28')][_0x3113b6['uniqueid']]&&this[_0x7e99('0x28')][_0x3113b6['uniqueid']][_0x7e99('0x45')]!==_0x7e99('0xc5')){this[_0x7e99('0xc6')](this[_0x7e99('0x20')][_0x3113b6[_0x7e99('0xc4')]]);this['uniqueId'][_0x3113b6['uniqueid']][_0x7e99('0xc7')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}}};Dialer['prototype'][_0x7e99('0x36')]=function(_0x1968cd){var _0x3a28e7=this[_0x7e99('0x28')][_0x1968cd[_0x7e99('0xc8')]];if(this[_0x7e99('0x20')][_0x1968cd[_0x7e99('0xc4')]]){if(_0x3a28e7&&_0x3a28e7['type']!==_0x7e99('0xc5')){delete this[_0x7e99('0x28')][_0x1968cd['uniqueid']];this['voiceQueues'][_0x1968cd[_0x7e99('0xc4')]]['outboundAnswerCallsDay']+=0x1;var _0x268f28=new AgentComplete(_0x3a28e7,_0x1968cd);if(_0x1968cd[_0x7e99('0xc9')]===_0x7e99('0xca')){_0x268f28['agiafterat']=this[_0x7e99('0x20')][_0x1968cd['queue']]['dialQueueProject2']&&this[_0x7e99('0x20')][_0x1968cd[_0x7e99('0xc4')]]['dialAgiAfterHangupAgent']?moment()[_0x7e99('0x49')](_0x7e99('0xcb')):undefined;}hopperUtils['createHistory'](_0x268f28)[_0x7e99('0xa2')](loggerCatch(_0x7e99('0xcc')));hopperUtils['moveContactManagedDialer'](_0x268f28)[_0x7e99('0xa2')](loggerCatch(_0x7e99('0xcd')));}}};Dialer[_0x7e99('0x87')][_0x7e99('0x32')]=function(_0x547e0c){var _0x35adc8=this[_0x7e99('0x28')][_0x547e0c['uniqueid']];var _0x28b0e6=this;var _0x17a270=![];var _0x113bf4;var _0x26605f;if(this[_0x7e99('0x20')][_0x547e0c[_0x7e99('0xc4')]]){if(_0x35adc8&&_0x35adc8['type']!==_0x7e99('0xc5')){delete this[_0x7e99('0x28')][_0x547e0c[_0x7e99('0xc8')]];this['updateOriginated'](this[_0x7e99('0x20')][_0x547e0c[_0x7e99('0xc4')]]);_0x35adc8[_0x7e99('0xce')]=moment()[_0x7e99('0x49')](_0x7e99('0xcb'));var _0x20b780=new QueueCallerAbandon(_0x35adc8,_0x547e0c);if(utils[_0x7e99('0x60')](_0x35adc8['droptime'],_0x35adc8['responsetime'])>=_0x35adc8[_0x7e99('0xcf')]){this[_0x7e99('0x20')][_0x547e0c['queue']][_0x7e99('0x51')]+=0x1;this[_0x7e99('0x20')][_0x547e0c['queue']][_0x7e99('0xd0')]+=0x1;this[_0x7e99('0x20')][_0x547e0c[_0x7e99('0xc4')]][_0x7e99('0xd1')]+=0x1;_0x20b780[_0x7e99('0xd2')]=0xa;_0x20b780[_0x7e99('0x6f')]=_0x7e99('0xd3');_0x20b780[_0x7e99('0xd4')]=_0x7e99('0xd5');_0x20b780[_0x7e99('0xd6')]=this[_0x7e99('0x20')][_0x547e0c[_0x7e99('0xc4')]][_0x7e99('0xd7')]?moment()['format']('YYYY-MM-DD\x20HH:mm:ss'):undefined;_0x20b780[_0x7e99('0xd8')]+=0x1;_0x20b780[_0x7e99('0xd9')]+=0x1;_0x113bf4=this[_0x7e99('0x20')][_0x547e0c['queue']][_0x7e99('0xda')];_0x26605f=this[_0x7e99('0x20')][_0x547e0c['queue']]['callAdditionalPhoneAfterMin'];hopperUtils[_0x7e99('0xdb')](_0x20b780,_0x20b780['state'],_0x35adc8['voiceQueue'])['then'](function(_0x46e54f){_0x17a270=_0x46e54f[_0x7e99('0xdc')]==0x1;if(_0x20b780[_0x7e99('0xd8')]>=_0x28b0e6['voiceQueues'][_0x547e0c[_0x7e99('0xc4')]][_0x7e99('0xdd')]){_0x28b0e6['queueCallerAbandonCreateState'](_0x20b780,_0x46e54f[_0x7e99('0xdc')]);}else{hopperUtils['rescheduleContact']({'active':![],'countdropretry':_0x20b780['countdropretry'],'scheduledat':moment()['add'](_0x28b0e6[_0x7e99('0x20')][_0x547e0c[_0x7e99('0xc4')]][_0x7e99('0xda')],_0x7e99('0xde'))['format'](_0x7e99('0xcb')),'ContactId':_0x35adc8[_0x7e99('0xdf')],'ListId':_0x35adc8[_0x7e99('0xe0')],'VoiceQueueId':_0x35adc8[_0x7e99('0xe1')]||undefined,'CampaignId':_0x35adc8[_0x7e99('0xe2')]||undefined})[_0x7e99('0xa2')](loggerCatch(_0x7e99('0xe3')));var _0x543d06=new History(_0x20b780);_0x543d06[_0x7e99('0xd2')]=0xa;_0x543d06[_0x7e99('0x6f')]='Drop';_0x543d06['starttime']=moment()[_0x7e99('0x49')]('YYYY-MM-DD\x20HH:mm:ss');_0x543d06[_0x7e99('0x70')]=_0x543d06['starttime'];_0x543d06['calleridname']=_0x20b780[_0x7e99('0xe4')];_0x543d06['calleridnum']=_0x20b780[_0x7e99('0xe5')];hopperUtils[_0x7e99('0xe6')](_0x543d06)['catch'](loggerCatch(_0x7e99('0xe7')));}})['then'](function(){if(_0x17a270)hopperUtils[_0x7e99('0xe8')](_0x20b780,_0x113bf4,_0x26605f)[_0x7e99('0x42')](function(){return 0x1;});});}else{this[_0x7e99('0x20')][_0x547e0c[_0x7e99('0xc4')]][_0x7e99('0x53')]+=0x1;this['voiceQueues'][_0x547e0c[_0x7e99('0xc4')]][_0x7e99('0xe9')]+=0x1;_0x20b780['state']=0xb;_0x20b780[_0x7e99('0x6f')]=_0x7e99('0xea');_0x20b780['dropreason']=_0x7e99('0xeb');_0x20b780[_0x7e99('0xec')]+=0x1;_0x20b780[_0x7e99('0xd9')]+=0x1;_0x113bf4=this['voiceQueues'][_0x547e0c[_0x7e99('0xc4')]][_0x7e99('0xed')];_0x26605f=this[_0x7e99('0x20')][_0x547e0c[_0x7e99('0xc4')]][_0x7e99('0xee')];hopperUtils['verifyAdditionalPhones'](_0x20b780,_0x20b780[_0x7e99('0xd2')],_0x35adc8[_0x7e99('0xef')])[_0x7e99('0x42')](function(_0x137bf7){if(_0x20b780[_0x7e99('0xec')]>=_0x28b0e6[_0x7e99('0x20')][_0x547e0c[_0x7e99('0xc4')]][_0x7e99('0xf0')]){_0x28b0e6['queueCallerAbandonCreateState'](_0x20b780,_0x137bf7[_0x7e99('0xdc')]);}else{hopperUtils['rescheduleContact']({'active':![],'countabandonedretry':_0x20b780[_0x7e99('0xec')],'scheduledat':moment()['add'](_0x28b0e6[_0x7e99('0x20')][_0x547e0c['queue']][_0x7e99('0xed')],_0x7e99('0xde'))[_0x7e99('0x49')](_0x7e99('0xcb')),'ContactId':_0x35adc8[_0x7e99('0xdf')],'ListId':_0x35adc8[_0x7e99('0xe0')],'VoiceQueueId':_0x35adc8['VoiceQueueId']||undefined,'CampaignId':_0x35adc8[_0x7e99('0xe2')]||undefined})[_0x7e99('0xa2')](loggerCatch(_0x7e99('0xf1')));var _0x41e124=new History(_0x20b780);_0x41e124[_0x7e99('0xd2')]=0xb;_0x41e124[_0x7e99('0x6f')]=_0x7e99('0xea');_0x41e124[_0x7e99('0x71')]=moment()[_0x7e99('0x49')](_0x7e99('0xcb'));_0x41e124[_0x7e99('0x70')]=_0x41e124[_0x7e99('0x71')];_0x41e124[_0x7e99('0xe4')]=_0x20b780[_0x7e99('0xe4')];_0x41e124[_0x7e99('0xe5')]=_0x20b780['calleridnum'];hopperUtils[_0x7e99('0xe6')](_0x41e124)['catch'](loggerCatch(_0x7e99('0xf2')));}})[_0x7e99('0x42')](function(){if(_0x17a270)hopperUtils[_0x7e99('0xe8')](_0x20b780,_0x113bf4,_0x26605f)[_0x7e99('0x42')](function(){return 0x1;});});}}}};Dialer[_0x7e99('0x87')][_0x7e99('0xf3')]=function(_0x33e274){if(this[_0x7e99('0x26')][_0x33e274[_0x7e99('0xc8')]]){this['actions'][_0x33e274[_0x7e99('0xc8')]][_0x7e99('0xf4')]=_0x33e274[_0x7e99('0xf4')];}if(this['uniqueId'][_0x33e274[_0x7e99('0xc8')]]){this[_0x7e99('0x28')][_0x33e274['uniqueid']]['channel']=_0x33e274[_0x7e99('0xf4')];}};Dialer[_0x7e99('0x87')]['syncQueueMember']=function(_0x93c33){if(!this[_0x7e99('0x26')][_0x93c33[_0x7e99('0xf5')]]){return;}var _0x1e6f1b=this[_0x7e99('0x20')][this[_0x7e99('0x26')][_0x93c33[_0x7e99('0xf5')]][_0x7e99('0xc4')]]['strategy']||_0x7e99('0xf6');if(_0x1e6f1b===_0x7e99('0xf7')){if(this[_0x7e99('0x26')][_0x93c33[_0x7e99('0xf5')]]&&_[_0x7e99('0xf8')](this['actions'][_0x93c33[_0x7e99('0xf5')]]['locked'])&&_0x93c33[_0x7e99('0x8c')]==='1'&&_0x93c33[_0x7e99('0xf9')]==='0'){if(this[_0x7e99('0x22')][_0x93c33[_0x7e99('0xfa')]]){if(!this['agents'][_0x93c33[_0x7e99('0xfa')]][_0x7e99('0xfb')]){this[_0x7e99('0x22')][_0x93c33[_0x7e99('0xfa')]][_0x7e99('0xfb')]=!![];this['actions'][_0x93c33[_0x7e99('0xf5')]]['locked']=!![];this[_0x7e99('0x26')][_0x93c33['actionid']][_0x7e99('0xfa')]=_0x93c33[_0x7e99('0xfa')];}}}}else if(_0x1e6f1b==='rrmemory'){if(this[_0x7e99('0x26')][_0x93c33[_0x7e99('0xf5')]]){if(this[_0x7e99('0x22')][_0x93c33['stateinterface']]){this[_0x7e99('0x26')][_0x93c33[_0x7e99('0xf5')]]['stateinterface']=_0x93c33[_0x7e99('0xfa')];if(_['isNil'](this[_0x7e99('0x2c')][this['actions'][_0x93c33[_0x7e99('0xf5')]][_0x7e99('0xc4')]])){this['queueBooked'][this[_0x7e99('0x26')][_0x93c33[_0x7e99('0xf5')]][_0x7e99('0xc4')]]=[];}this['queueBooked'][this[_0x7e99('0x26')][_0x93c33[_0x7e99('0xf5')]][_0x7e99('0xc4')]][_0x7e99('0x9b')](_['merge'](_['pick'](this[_0x7e99('0x26')][_0x93c33['actionid']],[_0x7e99('0xfc'),_0x7e99('0xfa')]),{'status':_0x93c33[_0x7e99('0x8c')],'paused':_0x93c33[_0x7e99('0xf9')]}));}}}};Dialer[_0x7e99('0x87')]['syncQueueStatusComplete']=function(_0x50f3c6){if(!this['actions'][_0x50f3c6['actionid']]){return;}var _0x1d76a4=this;var _0x2b9ebc=this[_0x7e99('0x20')][this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xc4')]];var _0x2932b7=_0x2b9ebc[_0x7e99('0xfd')]||_0x7e99('0xf6');if(_0x2932b7===_0x7e99('0xf7')){if(this[_0x7e99('0x26')][_0x50f3c6['actionid']]&&this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xfa')]){this[_0x7e99('0x1f')][_0x7e99('0xfe')](this['actions'][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xfc')],this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xfa')])[_0x7e99('0xa2')](function(_0x53e6c2){logger['error'](_0x7e99('0xff'),util[_0x7e99('0x66')](_0x53e6c2,{'showHidden':![],'depth':null}));})[_0x7e99('0x100')](function(){_0x1d76a4[_0x7e99('0xc6')](_0x1d76a4[_0x7e99('0x20')][_0x1d76a4['actions'][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xc4')]]);_0x1d76a4[_0x7e99('0x22')][_0x1d76a4['actions'][_0x50f3c6[_0x7e99('0xf5')]]['stateinterface']][_0x7e99('0xfb')]=![];delete _0x1d76a4[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]];unlockQueueStatus(_0x2b9ebc);});}else{this[_0x7e99('0xc6')](this[_0x7e99('0x20')][this[_0x7e99('0x26')][_0x50f3c6['actionid']]['queue']]);hopperUtils[_0x7e99('0x101')]({'active':![],'ContactId':this[_0x7e99('0x26')][_0x50f3c6['actionid']]['ContactId'],'ListId':this['actions'][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xe0')],'VoiceQueueId':this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xe1')]||undefined,'CampaignId':this['actions'][_0x50f3c6[_0x7e99('0xf5')]]['CampaignId']||undefined})[_0x7e99('0xa2')](loggerCatch(_0x7e99('0x102')));delete this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]];unlockQueueStatus(_0x2b9ebc);}}else if(_0x2932b7===_0x7e99('0xf6')){var _0x2119c6;if(this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]]&&!_[_0x7e99('0x103')](this[_0x7e99('0x2c')][this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]]['queue']])){if(this['queueBookedRR'][_0x1d76a4[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xc4')]]){this[_0x7e99('0x2d')][_0x1d76a4[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xc4')]]=this['queueBookedRR'][this['actions'][_0x50f3c6['actionid']]['queue']]?this['queueBookedRR'][this[_0x7e99('0x26')][_0x50f3c6['actionid']][_0x7e99('0xc4')]]:this[_0x7e99('0x2c')][this['actions'][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xc4')]]?this[_0x7e99('0x2c')][this['actions'][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xc4')]][_0x7e99('0x104')]||0x0:0x0;}this[_0x7e99('0x2c')][this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xc4')]][_0x7e99('0x104')]=this[_0x7e99('0x2d')][this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]]['queue']];for(var _0x5da316=0x0;_0x5da316<this[_0x7e99('0x2c')][this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]]['queue']][_0x7e99('0x105')];_0x5da316+=0x1){_0x2119c6=rr(this[_0x7e99('0x2c')][this['actions'][_0x50f3c6['actionid']][_0x7e99('0xc4')]]);this[_0x7e99('0x2d')][_0x1d76a4[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xc4')]]=this[_0x7e99('0x2c')][this['actions'][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xc4')]][_0x7e99('0x104')];if(_0x2119c6[_0x7e99('0x8c')]==='1'&&_0x2119c6[_0x7e99('0xf9')]==='0'){break;}}if(!_[_0x7e99('0xf8')](_0x2119c6)){this[_0x7e99('0x22')][_0x2119c6[_0x7e99('0xfa')]][_0x7e99('0x106')]=_[_0x7e99('0x43')](this[_0x7e99('0x22')][_0x2119c6[_0x7e99('0xfa')]]['unlockRR'])?!![]:this['agents'][_0x2119c6[_0x7e99('0xfa')]]['unlockRR'];}loggerBooked[_0x7e99('0x4b')](_0x7e99('0x107'),_0x50f3c6[_0x7e99('0xf5')],'Agent:\x20',JSON[_0x7e99('0xaa')](_[_0x7e99('0x74')](this['agents'][_0x2119c6[_0x7e99('0xfa')]],[_0x7e99('0x62'),'unlockRR'])),_0x7e99('0x108'),JSON[_0x7e99('0xaa')](_0x2119c6[_0x7e99('0xfc')]));if(!_[_0x7e99('0xf8')](_0x2119c6)&&_0x2119c6['status']==='1'&&_0x2119c6[_0x7e99('0xf9')]==='0'&&this[_0x7e99('0x22')][_0x2119c6[_0x7e99('0xfa')]]['unlockRR']){this[_0x7e99('0x22')][_0x2119c6[_0x7e99('0xfa')]][_0x7e99('0x106')]=![];this[_0x7e99('0x2c')][_0x1d76a4['actions'][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xc4')]]=[];this['preview'][_0x7e99('0xfe')](_0x2119c6[_0x7e99('0xfc')],_0x2119c6[_0x7e99('0xfa')])[_0x7e99('0xa2')](function(_0x3a862d){logger[_0x7e99('0x65')](_0x7e99('0xff'),util[_0x7e99('0x66')](_0x3a862d,{'showHidden':![],'depth':null}));})['finally'](function(){_0x1d76a4[_0x7e99('0xc6')](_0x1d76a4[_0x7e99('0x20')][_0x1d76a4['actions'][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xc4')]]);setTimeout(function(){_0x1d76a4['agents'][_0x2119c6['stateinterface']][_0x7e99('0x106')]=!![];loggerBooked[_0x7e99('0x4b')]('[booked][RR][finaly]',_0x50f3c6[_0x7e99('0xf5')],_0x7e99('0x109'),JSON[_0x7e99('0xaa')](_['pick'](_0x1d76a4[_0x7e99('0x22')][_0x2119c6['stateinterface']],['name',_0x7e99('0x106')])),_0x7e99('0x108'),JSON[_0x7e99('0xaa')](_0x2119c6[_0x7e99('0xfc')]));},0xc7);delete _0x1d76a4[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]];unlockQueueStatus(_0x2b9ebc,_0x50f3c6['actionid']);});}else{loggerBooked[_0x7e99('0x4b')](_0x7e99('0x10a'));this[_0x7e99('0xc6')](this[_0x7e99('0x20')][this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]]['queue']]);hopperUtils[_0x7e99('0x101')]({'active':![],'ContactId':this[_0x7e99('0x26')][_0x50f3c6['actionid']][_0x7e99('0xdf')],'ListId':this['actions'][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xe0')],'VoiceQueueId':this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]]['VoiceQueueId']||undefined,'CampaignId':this[_0x7e99('0x26')][_0x50f3c6['actionid']][_0x7e99('0xe2')]||undefined})['catch'](loggerCatch(_0x7e99('0x102')));delete this['actions'][_0x50f3c6[_0x7e99('0xf5')]];unlockQueueStatus(_0x2b9ebc);}}else{loggerBooked[_0x7e99('0x4b')]('[booked][unlock2]');this[_0x7e99('0xc6')](this[_0x7e99('0x20')][this[_0x7e99('0x26')][_0x50f3c6['actionid']]['queue']]);hopperUtils[_0x7e99('0x101')]({'active':![],'ContactId':this[_0x7e99('0x26')][_0x50f3c6['actionid']][_0x7e99('0xdf')],'ListId':this[_0x7e99('0x26')][_0x50f3c6['actionid']][_0x7e99('0xe0')],'VoiceQueueId':this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xe1')]||undefined,'CampaignId':this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xe2')]||undefined})[_0x7e99('0xa2')](loggerCatch(_0x7e99('0x10b')));delete this['actions'][_0x50f3c6[_0x7e99('0xf5')]];unlockQueueStatus(_0x2b9ebc);}}else{loggerBooked[_0x7e99('0x4b')](_0x7e99('0x10c'));this[_0x7e99('0xc6')](this[_0x7e99('0x20')][this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xc4')]]);hopperUtils[_0x7e99('0x101')]({'active':![],'ContactId':this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xdf')],'ListId':this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]]['ListId'],'VoiceQueueId':this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xe1')]||undefined,'CampaignId':this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]][_0x7e99('0xe2')]||undefined})[_0x7e99('0xa2')](loggerCatch(_0x7e99('0x10d')));delete this[_0x7e99('0x26')][_0x50f3c6[_0x7e99('0xf5')]];unlockQueueStatus(_0x2b9ebc);}};Dialer[_0x7e99('0x87')]['syncOriginateResponse']=function(_0x4f8228){var _0x3d0705=this['actions'][_0x4f8228[_0x7e99('0xf5')]];if(_0x3d0705){delete this[_0x7e99('0x26')][_0x4f8228[_0x7e99('0xf5')]];_0x3d0705[_0x7e99('0x10e')]=moment()[_0x7e99('0x49')](_0x7e99('0xcb'));var _0x3c3aca=_0x3d0705[_0x7e99('0x45')]==='ivr'?this[_0x7e99('0x21')][_0x3d0705[_0x7e99('0xc4')]]:this['voiceQueues'][_0x3d0705[_0x7e99('0x10f')]()];if(_0x4f8228[_0x7e99('0x110')]!==_0x7e99('0x111')){this[_0x7e99('0xc6')](_0x3c3aca);return this['callProgressDetecting'](_0x3d0705,_0x3c3aca,_0x4f8228)[_0x7e99('0xa2')](loggerCatch('[callProgressDetecting]\x20'));}this[_0x7e99('0x28')][_0x4f8228[_0x7e99('0xc8')]]=_0x3d0705;}};Dialer[_0x7e99('0x87')]['syncVarSet']=function(_0x1cd900){var _0x271a58=this;var _0x5adb8b=this[_0x7e99('0x28')][_0x1cd900['uniqueid']];var _0x47b453;if(!_[_0x7e99('0xf8')](_0x1cd900)&&!_['isNil'](_0x1cd900[_0x7e99('0x112')])&&!_[_0x7e99('0xf8')](_0x1cd900[_0x7e99('0x112')][_0x7e99('0x113')])&&_0x1cd900[_0x7e99('0x114')]===_0x7e99('0x115')&&_0x5adb8b){if(_0x5adb8b['type']!==_0x7e99('0xc5')&&this[_0x7e99('0x20')][_0x5adb8b[_0x7e99('0xc4')]][_0x7e99('0x116')]&&_0x1cd900[_0x7e99('0x117')]===_0x7e99('0x118')){delete this['uniqueId'][_0x1cd900[_0x7e99('0xc8')]];this[_0x7e99('0xc6')](this[_0x7e99('0x20')][_0x5adb8b[_0x7e99('0xc4')]]);this[_0x7e99('0x20')][_0x5adb8b['queue']][_0x7e99('0x119')]+=0x1;this['voiceQueues'][_0x5adb8b[_0x7e99('0xc4')]][_0x7e99('0x11a')]+=0x1;_0x47b453=new Hangup(_0x5adb8b,_0x1cd900);_0x47b453[_0x7e99('0xd2')]=0x12;_0x47b453[_0x7e99('0x6f')]=_0x7e99('0x11b');_0x47b453[_0x7e99('0x11c')]=_0x7e99('0x11d');ami['emit'](_0x7e99('0x11e'),ut[_0x7e99('0x11f')](_0x47b453,_0x7e99('0x120')));this[_0x7e99('0x121')](_0x47b453,_0x7e99('0x122'),_0x7e99('0x123'));}if(_0x5adb8b['type']!=='ivr'&&this[_0x7e99('0x20')][_0x5adb8b[_0x7e99('0xc4')]][_0x7e99('0x116')]&&_0x1cd900[_0x7e99('0x117')]==='MACHINE'){return new Promise(function(_0x3b7df3,_0x25f087){delete _0x271a58[_0x7e99('0x28')][_0x1cd900[_0x7e99('0xc8')]];_0x271a58[_0x7e99('0xc6')](_0x271a58['voiceQueues'][_0x5adb8b[_0x7e99('0xc4')]]);_0x271a58[_0x7e99('0x20')][_0x5adb8b[_0x7e99('0xc4')]][_0x7e99('0x119')]+=0x1;_0x271a58[_0x7e99('0x20')][_0x5adb8b[_0x7e99('0xc4')]][_0x7e99('0x11a')]+=0x1;var _0x165192=_0x271a58[_0x7e99('0x20')][_0x5adb8b[_0x7e99('0xc4')]];var _0x358c65=new Hangup(_0x5adb8b,_0x1cd900);_0x358c65[_0x7e99('0xd2')]=0x13;_0x358c65['statedesc']=_0x7e99('0x124');_0x358c65['membername']=_0x7e99('0x11d');_0x358c65[_0x7e99('0x125')]+=0x1;_0x358c65[_0x7e99('0xd9')]+=0x1;_0x358c65['amd']=!![];ami['emit'](_0x7e99('0x11e'),ut[_0x7e99('0x11f')](_0x358c65,'amd'));hopperUtils[_0x7e99('0xe6')](_0x358c65)[_0x7e99('0xa2')](loggerCatch(_0x7e99('0x126')));if(_0x358c65[_0x7e99('0x127')]+_0x358c65[_0x7e99('0x128')]+_0x358c65[_0x7e99('0x129')]+_0x358c65[_0x7e99('0x12a')]+_0x358c65[_0x7e99('0xd8')]+_0x358c65[_0x7e99('0xec')]+_0x358c65[_0x7e99('0x125')]+_0x358c65[_0x7e99('0x12b')]>=_0x165192['dialGlobalMaxRetry']){_0x271a58[_0x7e99('0x12c')](_0x358c65,_0x3b7df3,_0x25f087,_0x7e99('0x12d'));}else{if(_0x358c65[_0x7e99('0x125')]>=_0x165192['dialMachineMaxRetry']){_0x271a58['createStateFinal'](_0x358c65,_0x3b7df3,_0x25f087,'reason\x2019\x20machine....');}else{hopperUtils['rescheduleContact']({'active':![],'countmachineretry':_0x358c65[_0x7e99('0x125')],'scheduledat':moment()['add'](_0x165192[_0x7e99('0x12e')],_0x7e99('0xde'))[_0x7e99('0x49')](_0x7e99('0xcb')),'ContactId':_0x358c65[_0x7e99('0xdf')],'ListId':_0x358c65[_0x7e99('0xe0')],'VoiceQueueId':_0x358c65[_0x7e99('0xe1')]||undefined,'CampaignId':_0x358c65['CampaignId']||undefined})[_0x7e99('0xa2')](loggerCatch('[rescheduleContact][Machine]'));_0x3b7df3({'reschedule':0x1});}}});}if(_0x5adb8b[_0x7e99('0x45')]==='ivr'&&this['campaigns'][_0x5adb8b[_0x7e99('0xc4')]][_0x7e99('0x116')]&&_0x1cd900[_0x7e99('0x117')]===_0x7e99('0x118')){delete this['uniqueId'][_0x1cd900['uniqueid']];this[_0x7e99('0xc6')](this[_0x7e99('0x21')][_0x5adb8b[_0x7e99('0xc4')]]);_0x47b453=new Hangup(_0x5adb8b,_0x1cd900);_0x47b453[_0x7e99('0xd2')]=0x12;_0x47b453[_0x7e99('0x6f')]=_0x7e99('0x11b');_0x47b453['membername']=_0x7e99('0x11d');ami[_0x7e99('0x44')](_0x7e99('0x11e'),ut[_0x7e99('0x11f')](_0x47b453,_0x7e99('0x120')));this[_0x7e99('0x121')](_0x47b453,_0x7e99('0x12f'),_0x7e99('0x130'));}if(_0x5adb8b[_0x7e99('0x45')]===_0x7e99('0xc5')&&this[_0x7e99('0x21')][_0x5adb8b[_0x7e99('0xc4')]]['dialAMDActive']&&_0x1cd900[_0x7e99('0x117')]===_0x7e99('0x131')){return new Promise(function(_0x1db41f,_0x11d0b1){delete _0x271a58[_0x7e99('0x28')][_0x1cd900[_0x7e99('0xc8')]];_0x271a58[_0x7e99('0xc6')](_0x271a58[_0x7e99('0x21')][_0x5adb8b[_0x7e99('0xc4')]]);_0x271a58['campaigns'][_0x5adb8b[_0x7e99('0xc4')]][_0x7e99('0x119')]+=0x1;_0x271a58[_0x7e99('0x21')][_0x5adb8b[_0x7e99('0xc4')]][_0x7e99('0x11a')]+=0x1;var _0x51066b=_0x271a58['campaigns'][_0x5adb8b[_0x7e99('0xc4')]];var _0x44184f=new Hangup(_0x5adb8b,_0x1cd900);_0x44184f['state']=0x13;_0x44184f[_0x7e99('0x6f')]=_0x7e99('0x124');_0x44184f[_0x7e99('0x11c')]=_0x7e99('0x11d');_0x44184f[_0x7e99('0x125')]+=0x1;_0x44184f['countglobal']+=0x1;_0x44184f[_0x7e99('0x120')]=!![];ami[_0x7e99('0x44')](_0x7e99('0x11e'),ut['buildObj'](_0x44184f,'amd'));hopperUtils[_0x7e99('0xe6')](_0x44184f)['catch'](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x44184f[_0x7e99('0x127')]+_0x44184f[_0x7e99('0x128')]+_0x44184f[_0x7e99('0x129')]+_0x44184f['countnosuchnumberretry']+_0x44184f['countdropretry']+_0x44184f[_0x7e99('0xec')]+_0x44184f[_0x7e99('0x125')]+_0x44184f['countagentrejectretry']>=_0x51066b[_0x7e99('0x132')]){_0x271a58[_0x7e99('0x12c')](_0x44184f,_0x1db41f,_0x11d0b1,_0x7e99('0x12d'));}else{if(_0x44184f[_0x7e99('0x125')]>=_0x51066b[_0x7e99('0x133')]){_0x271a58['createStateFinal'](_0x44184f,_0x1db41f,_0x11d0b1,_0x7e99('0x134'));}else{hopperUtils['rescheduleContact']({'active':![],'countmachineretry':_0x44184f[_0x7e99('0x125')],'scheduledat':moment()['add'](_0x51066b['dialMachineRetryFrequency'],_0x7e99('0xde'))[_0x7e99('0x49')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x44184f[_0x7e99('0xdf')],'ListId':_0x44184f[_0x7e99('0xe0')],'VoiceQueueId':_0x44184f[_0x7e99('0xe1')]||undefined,'CampaignId':_0x44184f[_0x7e99('0xe2')]||undefined})[_0x7e99('0xa2')](loggerCatch(_0x7e99('0x135')));_0x1db41f({'reschedule':0x1});}}});}}};Dialer[_0x7e99('0x87')][_0x7e99('0x39')]=function(_0x5bffab){var _0x46d2b5=this[_0x7e99('0x28')][_0x5bffab['uniqueid']];var _0x5db444;if(_0x46d2b5&&_0x46d2b5[_0x7e99('0x45')]===_0x7e99('0xc5')){delete this[_0x7e99('0x28')][_0x5bffab[_0x7e99('0xc8')]];this[_0x7e99('0xc6')](this[_0x7e99('0x21')][_0x46d2b5[_0x7e99('0xc4')]]);this[_0x7e99('0x21')][_0x46d2b5[_0x7e99('0xc4')]][_0x7e99('0x136')]+=0x1;_0x5db444=new Hangup(_0x46d2b5,_0x5bffab);hopperUtils[_0x7e99('0xe6')](_0x5db444)['catch'](loggerCatch('[syncHangupIvr][createHistory]'));hopperUtils['moveContactManagedDialer'](_0x5db444)[_0x7e99('0xa2')](loggerCatch('[syncHangupIvr]'));}if(_0x46d2b5&&_0x46d2b5[_0x7e99('0x45')]!=='ivr'&&isNotNull(this[_0x7e99('0x20')][_0x46d2b5['queue']][_0x7e99('0x137')])){delete this[_0x7e99('0x28')][_0x5bffab[_0x7e99('0xc8')]];this[_0x7e99('0xc6')](this[_0x7e99('0x20')][_0x46d2b5[_0x7e99('0xc4')]]);this[_0x7e99('0x20')][_0x46d2b5[_0x7e99('0xc4')]][_0x7e99('0x119')]+=0x1;this[_0x7e99('0x20')][_0x46d2b5[_0x7e99('0xc4')]][_0x7e99('0x11a')]+=0x1;_0x5db444=new Hangup(_0x46d2b5,_0x5bffab);_0x5db444[_0x7e99('0xd2')]=0x10;_0x5db444[_0x7e99('0x6f')]=_0x7e99('0x138');_0x5db444[_0x7e99('0x11c')]='AGI';hopperUtils['createHistory'](_0x5db444)['catch'](loggerCatch(_0x7e99('0x139')));hopperUtils[_0x7e99('0x13a')](_0x5db444)[_0x7e99('0xa2')](loggerCatch('[syncHangupIvr]'));}if(_0x46d2b5&&_0x46d2b5[_0x7e99('0x45')]!==_0x7e99('0xc5')&&!isNotNull(this['voiceQueues'][_0x46d2b5['queue']][_0x7e99('0x137')])){delete this[_0x7e99('0x28')][_0x5bffab['uniqueid']];this[_0x7e99('0xc6')](this['voiceQueues'][_0x46d2b5[_0x7e99('0xc4')]]);this['voiceQueues'][_0x46d2b5['queue']][_0x7e99('0x13b')]+=0x1;_0x5db444=new Hangup(_0x46d2b5,_0x5bffab);_0x5db444[_0x7e99('0xd2')]=0xc;_0x5db444[_0x7e99('0x6f')]=_0x5bffab[_0x7e99('0x13c')];_0x5db444[_0x7e99('0x11c')]=_0x7e99('0x13d');hopperUtils[_0x7e99('0xe6')](_0x5db444)[_0x7e99('0xa2')](loggerCatch('[syncHangupIvr][createHistory]'));hopperUtils[_0x7e99('0x13a')](_0x5db444)['catch'](loggerCatch(_0x7e99('0x13e')));}};Dialer['prototype'][_0x7e99('0xb')]=function(_0x2db8cd){var _0x2f46a1=this;if(!_0x2f46a1[_0x7e99('0x2e')][_0x2db8cd['name']]){_0x2f46a1[_0x7e99('0x2e')][_0x2db8cd['name']]={'running':![]};}else if(_0x2f46a1[_0x7e99('0x2e')][_0x2db8cd[_0x7e99('0x62')]][_0x7e99('0x13f')]===!![]){return;}else if(_0x2f46a1[_0x7e99('0x2e')][_0x2db8cd[_0x7e99('0x62')]][_0x7e99('0x13f')]===![]){_0x2f46a1['queuesSummary'][_0x2db8cd[_0x7e99('0x62')]]['running']=!![];}var _0x47434b=_0x2f46a1[_0x7e99('0x20')][_0x2db8cd[_0x7e99('0x62')]];var _0x43c431=_0x47434b[_0x7e99('0x68')]!==utils[_0x7e99('0x69')]['INACTIVE'];var _0x177245=utils[_0x7e99('0x140')](_0x47434b);_0x47434b[_0x7e99('0x141')]=utils[_0x7e99('0x142')](_0x47434b,_0x2f46a1[_0x7e99('0x23')]);Promise['resolve']()[_0x7e99('0x42')](function(){if(_0x47434b[_0x7e99('0x141')]===utils[_0x7e99('0x69')]['INACTIVE']){if(_0x43c431){clearPredictiveAttributes(_0x47434b);_0x2db8cd[_0x7e99('0x2a')]=undefined;_0x2db8cd['startProgressive']=undefined;}if(_0x47434b[_0x7e99('0x141')]===utils[_0x7e99('0x69')][_0x7e99('0x7b')]){_0x2db8cd['available']=0x0;_0x2db8cd['paused']=0x0;_0x2db8cd[_0x7e99('0x143')]=0x0;_0x2db8cd[_0x7e99('0x144')]=0x0;_0x2db8cd[_0x7e99('0x145')]=0x0;}}else if(_0x47434b['statusMessage']===utils[_0x7e99('0x69')][_0x7e99('0x146')]&&!_0x177245){return _0x2f46a1[_0x7e99('0x95')](_0x47434b,!![])[_0x7e99('0x42')](function(){return _0x2f46a1[_0x7e99('0x95')](_0x47434b,![]);})[_0x7e99('0x42')](function(){return _0x2f46a1[_0x7e99('0xb3')](_0x47434b);})[_0x7e99('0xa2')](function(_0x1ad43b){loggerSyncQueueSummary['debug'](_0x7e99('0x147'),util['inspect'](_0x1ad43b,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x47434b);});}else{clearPredictiveAttributes(_0x47434b);}})[_0x7e99('0x42')](function(){var _0x30b665=_0x2db8cd[_0x7e99('0x148')](_0x47434b);if(_0x30b665||_0x47434b[_0x7e99('0x149')]){_0x47434b[_0x7e99('0x149')]=![];_0x2db8cd['updateReportFromOutboundQueue'](_0x47434b);Object[_0x7e99('0x14a')](_0x47434b,_0x2db8cd);emitOutboundVoiceQueueSummary(_0x2db8cd);}_0x2f46a1[_0x7e99('0x2e')][_0x47434b[_0x7e99('0x62')]][_0x7e99('0x13f')]=![];})[_0x7e99('0xa2')](function(_0x485d0e){logger['error'](_0x7e99('0x147'),util['inspect'](_0x485d0e,{'showHidden':![],'depth':null}));_0x2f46a1[_0x7e99('0x2e')][_0x47434b[_0x7e99('0x62')]][_0x7e99('0x13f')]=![];});};Dialer[_0x7e99('0x87')][_0x7e99('0x14b')]=_[_0x7e99('0x14c')](function(){var _0x2d8eb9=_[_0x7e99('0x14d')](this[_0x7e99('0x20')],function(_0x40768e){return _0x40768e[_0x7e99('0x14e')];});var _0x3a9188=_[_0x7e99('0x14d')](this['agents'],function(_0x33bfce){return _0x33bfce['online']&&_0x33bfce['status']==='reachable';});if(_0x2d8eb9[_0x7e99('0x105')]>0x0&&_0x3a9188[_0x7e99('0x105')]>0x0){return Promise[_0x7e99('0xae')]()[_0x7e99('0x42')](cmHopper[_0x7e99('0x14f')](_['map'](_0x2d8eb9,'id'),previewRecallmeReminderInterval,_[_0x7e99('0x150')](_0x3a9188,'id')))[_0x7e99('0x42')](function(_0x3415a1){for(var _0x170b48=0x0;_0x170b48<_0x3415a1['length'];_0x170b48++){var _0x170ec8=_0x3415a1[_0x170b48][_0x7e99('0x151')][_0x7e99('0x62')];if(_0x170ec8)io['to'](util[_0x7e99('0x49')]('user:%s',_0x170ec8))['emit']('user:dialPreviewRecallReminder',{'hopper':_0x3415a1[_0x170b48]});}})[_0x7e99('0xa2')](function(_0x1cc5de){logger[_0x7e99('0x65')](_0x7e99('0x152'),_0x1cc5de);});}},0x3c*0x3e8,{'leading':!![]});Dialer[_0x7e99('0x87')][_0x7e99('0x41')]=function(){var _0x5bb0fd=this;setInterval(function(){_0x5bb0fd['clearZombieChannels'](_0x5bb0fd[_0x7e99('0x28')],'[uniqueid]');_0x5bb0fd[_0x7e99('0x153')](_0x5bb0fd[_0x7e99('0x26')],_0x7e99('0x154'));},0x32c8);};Dialer[_0x7e99('0x87')][_0x7e99('0x153')]=function(_0x281f87,_0x5547c3){var _0x22b789=this;for(var _0x1bea8 in _0x281f87){if(typeof _0x281f87[_0x1bea8]!==_0x7e99('0xad')){this[_0x7e99('0x1e')][_0x7e99('0x155')](function(){if(!_[_0x7e99('0xf8')](_0x281f87[_0x1bea8])){return ami[_0x7e99('0x9c')]({'action':_0x7e99('0x8c'),'channel':_0x281f87[_0x1bea8]['channel']})[_0x7e99('0xa2')](function(_0x10b566){if(_0x10b566[_0x7e99('0x68')]==='No\x20such\x20channel'){setTimeout(function(){if(_0x281f87[_0x1bea8]&&_0x281f87[_0x1bea8][_0x7e99('0x45')]!==_0x7e99('0xc5')){_0x22b789[_0x7e99('0xc6')](_0x22b789['voiceQueues'][_0x281f87[_0x1bea8][_0x7e99('0xc4')]]);logger[_0x7e99('0x65')](_0x7e99('0x156'),_0x5547c3,_0x1bea8,_0x281f87[_0x1bea8][_0x7e99('0xc4')]);delete _0x281f87[_0x1bea8];}if(_0x281f87[_0x1bea8]&&_0x281f87[_0x1bea8][_0x7e99('0x45')]==='ivr'){_0x22b789[_0x7e99('0xc6')](_0x22b789[_0x7e99('0x21')][_0x281f87[_0x1bea8][_0x7e99('0xc4')]]);logger[_0x7e99('0x65')](_0x7e99('0x157'),_0x5547c3,_0x1bea8,_0x281f87[_0x1bea8]['queue']);delete _0x281f87[_0x1bea8];}},0x2328);}});}});}}};Dialer['prototype'][_0x7e99('0x158')]=function(_0x1e0b29){return Promise[_0x7e99('0xae')]()[_0x7e99('0x42')](voiceQueueRt[_0x7e99('0x158')](_0x1e0b29))[_0x7e99('0xa2')](loggerCatch(_0x7e99('0x159')));};Dialer[_0x7e99('0x87')][_0x7e99('0xc6')]=function(_0x3e9de2){if(!_[_0x7e99('0x43')](_0x3e9de2)&&_0x3e9de2!==null){if(typeof _0x3e9de2['originated']!==_0x7e99('0xad')){if(_0x3e9de2['originated']>0x0){_0x3e9de2[_0x7e99('0x80')]-=0x1;}else{logger['error']('[updateOriginated]\x20object\x20originated\x20is\x20negative');}}}else{logger[_0x7e99('0x65')](_0x7e99('0x15a'));}};Dialer['prototype']['loggerHandler']=function(_0x18f7dd,_0x30859c){var _0x17b5a4=this;return function(_0x537b8a){_0x17b5a4['updateOriginated'](_0x30859c);logger[_0x7e99('0x65')](_0x18f7dd,util[_0x7e99('0x66')](_0x537b8a,{'showHidden':![],'depth':null}));};};Dialer[_0x7e99('0x87')][_0x7e99('0x15b')]=function(_0x31ea99,_0x23e9c9,_0x38ad72){var _0x44be03={'state':0x19,'statedesc':_0x7e99('0x15c')};this[_0x7e99('0xc6')](_0x23e9c9);this['saveInDb'](_[_0x7e99('0x15d')](_0x44be03,_[_0x7e99('0x74')](_0x38ad72,[_0x7e99('0xdf'),_0x7e99('0xe0'),_0x7e99('0x15e'),_0x7e99('0xe1'),_0x7e99('0xe2')])),_0x7e99('0x15f'),_0x7e99('0x160'));logger['error'](_0x31ea99);};Dialer[_0x7e99('0x87')][_0x7e99('0x121')]=function(_0x446bb9,_0x337028,_0x4e2c26){hopperUtils[_0x7e99('0xe6')](_0x446bb9)[_0x7e99('0xa2')](loggerCatch(_0x337028));hopperUtils[_0x7e99('0x13a')](_0x446bb9)[_0x7e99('0xa2')](loggerCatch(_0x4e2c26));};Dialer[_0x7e99('0x87')]['queueCallerAbandonCreateState']=function(_0x26193b,_0x3c9b7e){hopperUtils[_0x7e99('0xe6')](_0x26193b)[_0x7e99('0xa2')](loggerCatch(_0x7e99('0xcc')));if(_0x3c9b7e==0x0){hopperUtils['moveContactManagedDialer'](_0x26193b)[_0x7e99('0xa2')](loggerCatch(_0x7e99('0x161')));}};Dialer[_0x7e99('0x87')][_0x7e99('0x152')]=function(_0x54eb7b){return Promise[_0x7e99('0xae')]()[_0x7e99('0x42')](cmHopper['handlePreviewRecallNotifications'](_0x54eb7b['id'],previewRecallmeReminderInterval))[_0x7e99('0x42')](function(_0xe43e8d){for(var _0x58b788=0x0;_0x58b788<_0xe43e8d[_0x7e99('0x105')];_0x58b788++){var _0x1e2562=_0xe43e8d[_0x58b788][_0x7e99('0x151')][_0x7e99('0x62')];if(_0x1e2562)io['to'](util[_0x7e99('0x49')]('user:%s',_0x1e2562))[_0x7e99('0x44')](_0x7e99('0x162'),{'hopper':_0xe43e8d[_0x58b788]});}})[_0x7e99('0xa2')](function(){});};Dialer['prototype'][_0x7e99('0xb1')]=function(_0x4784d7){var _0x229843=this;return function(){_0x229843[_0x7e99('0x163')](_0x4784d7);};};Dialer[_0x7e99('0x87')]['actionOriginate']=function(_0x59d267,_0x36651a){var _0x50bfaf=this;var _0x1d807c=uuid['v4']();this[_0x7e99('0x26')][_0x1d807c]=new Action(_0x59d267,_0x36651a,_0x1d807c);return new Promise(function(_0x2a6fc7,_0x2e3522){if(_[_0x7e99('0x43')](_0x59d267)&&typeof _0x59d267!==_0x7e99('0x164')){return _0x2e3522(msgResponse(_0x7e99('0x165'),_0x7e99('0x96'),_0x7e99('0x166')));}if(_['isUndefined'](_0x36651a[_0x7e99('0x167')])||_0x36651a[_0x7e99('0x167')]===null){return _0x2e3522(msgResponse(_0x7e99('0x165'),'Failure','contact\x20is\x20undefine'));}var _0x295f18={'XMD-CALLERID':_0x50bfaf[_0x7e99('0x26')][_0x1d807c][_0x7e99('0x168')](),'XMD-AGI':_0x59d267[_0x7e99('0x137')]?util['format'](_0x7e99('0x169'),ipAgi,_0x59d267[_0x7e99('0x137')]):_0x7e99('0x16a'),'XMD-AGIAFTER':_0x59d267[_0x7e99('0xd7')]?util[_0x7e99('0x49')]('\x22agi://%s/square,%s\x22',ipAgi,_0x59d267[_0x7e99('0xd7')]):_0x7e99('0x16a'),'XMD-QUEUE':utils[_0x7e99('0x16b')](_0x59d267)?util[_0x7e99('0x49')](_0x7e99('0x16c'),_0x59d267[_0x7e99('0x62')],_0x59d267[_0x7e99('0x16d')]||'',_0x59d267[_0x7e99('0x16e')]?'c':'',_0x59d267[_0x7e99('0xcf')]||0x3):_0x7e99('0x16a'),'XMD-CONTACTID':_0x36651a[_0x7e99('0xdf')],'XMD-CDRTYPE':_0x7e99('0xa'),'CALLERID(all)':_0x50bfaf[_0x7e99('0x26')][_0x1d807c]['getCaller'](),'XMD-AMD':_0x59d267['dialAMDActive']?_0x7e99('0x146'):_0x7e99('0x16a'),'XMD-DESTINATION':'xcally-motion-dialer'};if(_0x59d267['dialAMDActive']){_0x295f18[_0x7e99('0x16f')]=_0x59d267[_0x7e99('0x170')]||0x9c4;_0x295f18['XMD-AMDGREETING']=_0x59d267[_0x7e99('0x171')]||0x5dc;_0x295f18['XMD-AMDAFTERGREETINGSILENCE']=_0x59d267[_0x7e99('0x172')]||0x320;_0x295f18[_0x7e99('0x173')]=_0x59d267[_0x7e99('0x174')]||0x1388;_0x295f18['XMD-AMDMINWORDLENGTH']=_0x59d267['dialAMDMinWordLength']||0x64;_0x295f18['XMD-AMDBETWEENWORDSSILENCE']=_0x59d267[_0x7e99('0x175')]||0x32;_0x295f18[_0x7e99('0x176')]=_0x59d267[_0x7e99('0x177')]||0x3;_0x295f18[_0x7e99('0x178')]=_0x59d267[_0x7e99('0x179')]||0x100;_0x295f18[_0x7e99('0x17a')]=_0x59d267[_0x7e99('0x17b')]||0x1388;}if(utils['isOutboundQueue'](_0x59d267)){_0x295f18['XMD-VOICEQUEUEID']=_0x36651a[_0x7e99('0xe1')];}else{_0x295f18['XMD-CAMPAIGNID']=_0x36651a[_0x7e99('0xe2')];}var _0x1054f6=utils[_0x7e99('0x17c')](_0x36651a[_0x7e99('0x17d')]);Object[_0x7e99('0x14a')](_0x295f18,_0x1054f6);var _0xe2195d=_0x50bfaf[_0x7e99('0x88')](_0x59d267[_0x7e99('0x8f')])?utils['getCallerId'](_0x59d267[_0x7e99('0x8f')][_0x7e99('0x17e')],_0x59d267['dialOriginateCallerIdName'],_0x59d267[_0x7e99('0x17f')]>0x0?utils[_0x7e99('0x180')](_0x59d267['dialOriginateCallerIdNumber'],_0x59d267[_0x7e99('0x17f')]):_0x59d267[_0x7e99('0x181')]):utils[_0x7e99('0x182')](_[_0x7e99('0xf8')](_0x59d267[_0x7e99('0x90')])?_0x59d267[_0x7e99('0x8f')][_0x7e99('0x17e')]:_0x59d267[_0x7e99('0x90')][_0x7e99('0x17e')],_0x59d267[_0x7e99('0x183')],_0x59d267[_0x7e99('0x17f')]>0x0?utils[_0x7e99('0x180')](_0x59d267[_0x7e99('0x181')],_0x59d267[_0x7e99('0x17f')]):_0x59d267[_0x7e99('0x181')]);if(_0xe2195d){_0x295f18[_0x7e99('0x184')]=_0x50bfaf[_0x7e99('0x26')][_0x1d807c][_0x7e99('0x185')]=utils[_0x7e99('0x186')](_0xe2195d);_0x295f18['XMD-ORIGINATECALLERIDNUM']=_0x36651a['phone'];}_0x59d267[_0x7e99('0x187')]=_0x295f18;return ami[_0x7e99('0x9c')]({'actionid':_0x1d807c,'action':_0x7e99('0x165'),'channel':_0x50bfaf[_0x7e99('0x88')](_0x59d267[_0x7e99('0x8f')])?util[_0x7e99('0x49')]('SIP/%s/%s%s',_0x59d267[_0x7e99('0x8f')][_0x7e99('0x62')],isNotNull(_0x59d267[_0x7e99('0x188')])?_0x59d267[_0x7e99('0x188')][_0x7e99('0x189')]()||'':'',_0x59d267[_0x7e99('0x18a')]>0x0?_0x36651a[_0x7e99('0x167')][_0x7e99('0x18b')](_0x59d267[_0x7e99('0x18a')]):_0x36651a[_0x7e99('0x167')]):util[_0x7e99('0x49')](_0x7e99('0x18c'),_[_0x7e99('0xf8')](_0x59d267[_0x7e99('0x90')])?_0x59d267[_0x7e99('0x8f')][_0x7e99('0x62')]:_0x59d267[_0x7e99('0x90')][_0x7e99('0x62')],isNotNull(_0x59d267[_0x7e99('0x188')])?_0x59d267[_0x7e99('0x188')]['trim']()||'':'',_0x59d267[_0x7e99('0x18a')]>0x0?_0x36651a['phone'][_0x7e99('0x18b')](_0x59d267[_0x7e99('0x18a')]):_0x36651a['phone']),'callerid':_0xe2195d,'Exten':'xcally-motion-dialer','Context':_0x7e99('0x18d'),'Priority':'1','variable':_0x295f18,'timeout':(_0x59d267[_0x7e99('0x18e')]||0x1e)*0x3e8,'async':!![],'channelid':_0x1d807c})[_0x7e99('0x42')](function(_0x400705){return _0x2a6fc7(_0x400705);})[_0x7e99('0xa2')](function(_0x5f4aa0){_0x59d267['outboundOriginateFailureCallsDay']+=0x1;var _0x407f1c=new History(_0x50bfaf[_0x7e99('0x26')][_0x1d807c]);logger[_0x7e99('0x65')](util[_0x7e99('0x49')](_0x7e99('0x18f'),JSON[_0x7e99('0xaa')](_0x5f4aa0)));_0x407f1c[_0x7e99('0xd2')]=0xe;_0x407f1c[_0x7e99('0x6f')]=_0x7e99('0x190');_0x407f1c[_0x7e99('0x71')]=moment()[_0x7e99('0x49')](_0x7e99('0xcb'));_0x407f1c[_0x7e99('0x70')]=_0x407f1c[_0x7e99('0x71')];hopperUtils['createHistory'](_0x407f1c)['catch'](loggerCatch(_0x7e99('0x191')));_0x50bfaf['moveContactManagedDialer'](_0x407f1c)['catch'](loggerCatch('[originate][error]'))[_0x7e99('0x100')](function(){delete _0x50bfaf[_0x7e99('0x26')][_0x1d807c];return _0x2e3522(msgResponse(_0x7e99('0x165'),_0x7e99('0x86'),_0x7e99('0x192')));});});});};Dialer[_0x7e99('0x87')][_0x7e99('0x193')]=function(_0x18769e,_0x46f51a,_0x24ff34){var _0x283abe=new History(_0x46f51a);if(_0x283abe[_0x7e99('0x127')]+_0x283abe[_0x7e99('0x128')]+_0x283abe[_0x7e99('0x129')]+_0x283abe[_0x7e99('0x12a')]+_0x283abe[_0x7e99('0xd8')]+_0x283abe[_0x7e99('0xec')]+_0x283abe[_0x7e99('0x125')]+_0x283abe[_0x7e99('0x12b')]>=_0x24ff34[_0x7e99('0x132')]-0x1){return!![];}switch(_0x18769e){case 0x3:if(_0x283abe['countnoanswerretry']>=_0x24ff34['dialNoAnswerMaxRetry']-0x1){return!![];}hopperUtils[_0x7e99('0x101')]({'active':![],'countnoanswerretry':_0x283abe['countnoanswerretry']+=0x1,'scheduledat':moment()[_0x7e99('0x194')](_0x24ff34['dialNoAnswerRetryFrequency'],_0x7e99('0xde'))[_0x7e99('0x49')](_0x7e99('0xcb')),'ContactId':_0x283abe[_0x7e99('0xdf')],'ListId':_0x283abe['ListId'],'VoiceQueueId':_0x283abe[_0x7e99('0xe1')]||undefined,'CampaignId':_0x283abe[_0x7e99('0xe2')]||undefined})['catch'](loggerCatch(_0x7e99('0x195')));break;case 0x5:if(_0x283abe[_0x7e99('0x127')]>=_0x24ff34['dialBusyMaxRetry']-0x1){return!![];}hopperUtils[_0x7e99('0x101')]({'active':![],'countbusyretry':_0x283abe[_0x7e99('0x127')]+=0x1,'scheduledat':moment()['add'](_0x24ff34['dialBusyRetryFrequency'],_0x7e99('0xde'))[_0x7e99('0x49')](_0x7e99('0xcb')),'ContactId':_0x283abe['ContactId'],'ListId':_0x283abe[_0x7e99('0xe0')],'VoiceQueueId':_0x283abe[_0x7e99('0xe1')]||undefined,'CampaignId':_0x283abe[_0x7e99('0xe2')]||undefined})[_0x7e99('0xa2')](loggerCatch(_0x7e99('0x196')));break;case 0x8:if(_0x283abe[_0x7e99('0x128')]>=_0x24ff34[_0x7e99('0x197')]-0x1){return!![];}hopperUtils[_0x7e99('0x101')]({'active':![],'countcongestionretry':_0x283abe[_0x7e99('0x128')]+=0x1,'scheduledat':moment()[_0x7e99('0x194')](_0x24ff34[_0x7e99('0x198')],_0x7e99('0xde'))[_0x7e99('0x49')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x283abe[_0x7e99('0xdf')],'ListId':_0x283abe[_0x7e99('0xe0')],'VoiceQueueId':_0x283abe[_0x7e99('0xe1')]||undefined,'CampaignId':_0x283abe[_0x7e99('0xe2')]||undefined})['catch'](loggerCatch(_0x7e99('0x199')));break;case 0x0:if(_0x283abe[_0x7e99('0x12a')]>=_0x24ff34[_0x7e99('0x19a')]-0x1){return!![];}else{hopperUtils[_0x7e99('0x101')]({'active':![],'countnosuchnumberretry':_0x283abe[_0x7e99('0x12a')]+=0x1,'scheduledat':moment()[_0x7e99('0x194')](_0x24ff34[_0x7e99('0x19b')],_0x7e99('0xde'))[_0x7e99('0x49')](_0x7e99('0xcb')),'ContactId':_0x283abe[_0x7e99('0xdf')],'ListId':_0x283abe[_0x7e99('0xe0')],'VoiceQueueId':_0x283abe[_0x7e99('0xe1')]||undefined,'CampaignId':_0x283abe['CampaignId']||undefined})['catch'](loggerCatch(_0x7e99('0x19c')));}break;case 0xa:if(_0x283abe[_0x7e99('0xd8')]>=_0x24ff34[_0x7e99('0xdd')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countdropretry':_0x283abe[_0x7e99('0xd8')]+=0x1,'scheduledat':moment()[_0x7e99('0x194')](_0x24ff34[_0x7e99('0xda')],_0x7e99('0xde'))[_0x7e99('0x49')](_0x7e99('0xcb')),'ContactId':_0x283abe[_0x7e99('0xdf')],'ListId':_0x283abe[_0x7e99('0xe0')],'VoiceQueueId':_0x283abe['VoiceQueueId']||undefined,'CampaignId':_0x283abe['CampaignId']||undefined})[_0x7e99('0xa2')](loggerCatch(_0x7e99('0xe3')));break;case 0xb:if(_0x283abe[_0x7e99('0xec')]>=_0x24ff34[_0x7e99('0xf0')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countabandonedretry':_0x283abe['countabandonedretry']+=0x1,'scheduledat':moment()[_0x7e99('0x194')](_0x24ff34[_0x7e99('0xed')],_0x7e99('0xde'))[_0x7e99('0x49')](_0x7e99('0xcb')),'ContactId':_0x283abe['ContactId'],'ListId':_0x283abe[_0x7e99('0xe0')],'VoiceQueueId':_0x283abe[_0x7e99('0xe1')]||undefined,'CampaignId':_0x283abe[_0x7e99('0xe2')]||undefined})[_0x7e99('0xa2')](loggerCatch('[rescheduleContact][Abandoned]'));break;case 0x13:if(_0x283abe[_0x7e99('0x125')]>=_0x24ff34['dialMachineMaxRetry']-0x1){return!![];}hopperUtils[_0x7e99('0x101')]({'active':![],'countmachineretry':_0x283abe[_0x7e99('0x125')]+=0x1,'scheduledat':moment()[_0x7e99('0x194')](_0x24ff34['dialMachineRetryFrequency'],_0x7e99('0xde'))[_0x7e99('0x49')](_0x7e99('0xcb')),'ContactId':_0x283abe[_0x7e99('0xdf')],'ListId':_0x283abe[_0x7e99('0xe0')],'VoiceQueueId':_0x283abe[_0x7e99('0xe1')]||undefined,'CampaignId':_0x283abe[_0x7e99('0xe2')]||undefined})['catch'](loggerCatch('[rescheduleContact][Machine]'));break;case 0x14:if(_0x283abe[_0x7e99('0x12b')]>=_0x24ff34[_0x7e99('0x19d')]-0x1){return!![];}hopperUtils[_0x7e99('0x101')]({'active':![],'countagentrejectretry':_0x283abe[_0x7e99('0x12b')]+=0x1,'scheduledat':moment()[_0x7e99('0x194')](_0x24ff34[_0x7e99('0x19e')],_0x7e99('0xde'))['format'](_0x7e99('0xcb')),'ContactId':_0x283abe[_0x7e99('0xdf')],'ListId':_0x283abe['ListId'],'VoiceQueueId':_0x283abe[_0x7e99('0xe1')]||undefined,'CampaignId':_0x283abe[_0x7e99('0xe2')]||undefined})[_0x7e99('0xa2')](loggerCatch(_0x7e99('0x19f')));break;default:return!![];}};Dialer[_0x7e99('0x87')]['callProgressDetecting']=function(_0x12b6e6,_0x68ebee,_0x528e94){var _0x360354=this;var _0x5baf61=new History(_0x12b6e6);var _0x3c5070=![];var _0x38849e;var _0x3624fd;return new Promise(function(_0x4098fc,_0x4cf371){if(_[_0x7e99('0x43')](_0x68ebee)&&typeof _0x68ebee!==_0x7e99('0x164')){return _0x4cf371(msgResponse(_0x7e99('0x1a0'),_0x7e99('0x96'),'entity\x20is\x20undefine'));}if(_[_0x7e99('0x43')](_0x528e94)&&typeof _0x528e94!==_0x7e99('0x164')){return _0x4cf371(msgResponse(_0x7e99('0x1a0'),_0x7e99('0x96'),'evt\x20is\x20undefine'));}hopperUtils['verifyAdditionalPhones'](_0x5baf61,_0x528e94[_0x7e99('0xc9')],_0x68ebee)[_0x7e99('0x42')](function(_0x126c58){if(_0x126c58['additional']==0x1)_0x3c5070=!![];switch(_0x528e94[_0x7e99('0xc9')]){case'0':_0x68ebee[_0x7e99('0x1a1')]+=0x1;_0x5baf61[_0x7e99('0xd2')]=0x0;_0x5baf61['statedesc']=_0x7e99('0x1a2');_0x5baf61[_0x7e99('0x12a')]+=0x1;_0x5baf61[_0x7e99('0xd9')]+=0x1;ami[_0x7e99('0x44')](_0x7e99('0x1a3'),ut[_0x7e99('0x11f')](_0x12b6e6,'nosuchnumber'));_0x38849e=_0x68ebee[_0x7e99('0x19b')];_0x3624fd=_0x68ebee[_0x7e99('0xee')];hopperUtils[_0x7e99('0xe6')](_0x5baf61)[_0x7e99('0xa2')](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x360354[_0x7e99('0x193')](0x0,_0x12b6e6,_0x68ebee)&&!_0x3c5070){if(_0x5baf61['countnosuchnumberretry']>=_0x68ebee[_0x7e99('0x19a')]){_0x360354[_0x7e99('0x1a4')](_0x5baf61,_0x4098fc,_0x4cf371,_0x7e99('0x1a5'));}else{_0x360354[_0x7e99('0x12c')](_0x5baf61,_0x4098fc,_0x4cf371,'reason\x200\x20no\x20such\x20number....');}}break;case'3':_0x68ebee['outboundNoAnswerCallsDay']+=0x1;_0x5baf61['state']=0x3;_0x5baf61[_0x7e99('0x6f')]=_0x7e99('0x1a6');_0x5baf61['countnoanswerretry']+=0x1;_0x5baf61[_0x7e99('0xd9')]+=0x1;var _0x2ef7a4=ut[_0x7e99('0x1a7')](_0x12b6e6,_0x68ebee);ami[_0x7e99('0x44')](_0x7e99('0x1a8'),_0x2ef7a4);_0x38849e=_0x68ebee['dialNoAnswerRetryFrequency'];_0x3624fd=_0x68ebee['callAdditionalPhoneAfterMin'];hopperUtils['createHistory'](_0x5baf61)[_0x7e99('0xa2')](loggerCatch(_0x7e99('0x1a9')));if(_0x360354['checkRetriveMax'](0x3,_0x12b6e6,_0x68ebee)&&!_0x3c5070){if(_0x5baf61[_0x7e99('0x129')]>=_0x68ebee[_0x7e99('0x1aa')]){_0x360354[_0x7e99('0x1a4')](_0x5baf61,_0x4098fc,_0x4cf371,'reason\x203\x20ringing\x20no\x20answer');}else{_0x360354['stateGlobal'](_0x5baf61,_0x4098fc,_0x4cf371,_0x7e99('0x1ab'));}}break;case'5':_0x68ebee[_0x7e99('0x1ac')]+=0x1;_0x5baf61[_0x7e99('0xd2')]=0x5;_0x5baf61['statedesc']=_0x7e99('0x1ad');_0x5baf61[_0x7e99('0x127')]+=0x1;_0x5baf61[_0x7e99('0xd9')]+=0x1;ami[_0x7e99('0x44')]('custom:agentbusy',ut[_0x7e99('0x11f')](_0x12b6e6,_0x7e99('0x1ae')));_0x38849e=_0x68ebee['dialBusyRetryFrequency'];_0x3624fd=_0x68ebee[_0x7e99('0xee')];hopperUtils[_0x7e99('0xe6')](_0x5baf61)['catch'](loggerCatch(_0x7e99('0x1af')));if(_0x360354[_0x7e99('0x193')](0x5,_0x12b6e6,_0x68ebee)&&!_0x3c5070){if(_0x5baf61[_0x7e99('0x127')]>=_0x68ebee['dialBusyMaxRetry']){_0x360354[_0x7e99('0x1a4')](_0x5baf61,_0x4098fc,_0x4cf371,_0x7e99('0x1b0'));}else{_0x360354[_0x7e99('0x12c')](_0x5baf61,_0x4098fc,_0x4cf371,'reason\x205\x20busy');}}break;case'8':_0x68ebee[_0x7e99('0x1b1')]+=0x1;_0x5baf61[_0x7e99('0xd2')]=0x8;_0x5baf61[_0x7e99('0x6f')]=_0x7e99('0x1b2');_0x5baf61[_0x7e99('0x128')]+=0x1;_0x5baf61['countglobal']+=0x1;_0x38849e=_0x68ebee[_0x7e99('0x198')];_0x3624fd=_0x68ebee[_0x7e99('0xee')];ami['emit'](_0x7e99('0x1b3'),ut[_0x7e99('0x11f')](_0x12b6e6,_0x7e99('0x1b4')));hopperUtils[_0x7e99('0xe6')](_0x5baf61)[_0x7e99('0xa2')](loggerCatch('[syncAgentComplete][createHistory][8]'));if(_0x360354[_0x7e99('0x193')](0x8,_0x12b6e6,_0x68ebee)&&!_0x3c5070){if(_0x5baf61[_0x7e99('0x128')]>=_0x68ebee['dialCongestionMaxRetry']){_0x360354[_0x7e99('0x1a4')](_0x5baf61,_0x4098fc,_0x4cf371,_0x7e99('0x1b5'));}else{_0x360354['stateGlobal'](_0x5baf61,_0x4098fc,_0x4cf371,_0x7e99('0x1b5'));}}break;case'11':_0x68ebee[_0x7e99('0x1b6')]+=0x1;_0x5baf61['state']=0xb;_0x5baf61[_0x7e99('0x6f')]=_0x7e99('0xea');_0x5baf61[_0x7e99('0xec')]+=0x1;_0x5baf61['countglobal']+=0x1;_0x38849e=_0x68ebee['dialAbandonedRetryFrequency'];_0x3624fd=_0x68ebee[_0x7e99('0xee')];hopperUtils[_0x7e99('0xe6')](_0x5baf61)['catch'](loggerCatch(_0x7e99('0xf2')));if(_0x360354[_0x7e99('0x193')](0xb,_0x12b6e6,_0x68ebee)&&!_0x3c5070){if(_0x5baf61['countabandonedretry']>=_0x68ebee['dialAbandonedMaxRetry']){_0x360354[_0x7e99('0x1a4')](_0x5baf61,_0x4098fc,_0x4cf371,_0x7e99('0x1b7'));}else{_0x360354[_0x7e99('0x12c')](_0x5baf61,_0x4098fc,_0x4cf371,_0x7e99('0x1b7'));}}break;case'20':_0x68ebee[_0x7e99('0x1b8')]+=0x1;_0x5baf61[_0x7e99('0xd2')]=0x14;_0x5baf61['statedesc']=_0x7e99('0x1b9');_0x5baf61['countagentrejectretry']+=0x1;_0x5baf61[_0x7e99('0xd9')]+=0x1;_0x38849e=_0x68ebee[_0x7e99('0x19e')];_0x3624fd=_0x68ebee['callAdditionalPhoneAfterMin'];ami[_0x7e99('0x44')](_0x7e99('0x1ba'),ut[_0x7e99('0x11f')](_0x12b6e6,_0x7e99('0x1bb')));hopperUtils[_0x7e99('0xe6')](_0x5baf61)[_0x7e99('0xa2')](loggerCatch(_0x7e99('0x1bc')));if(_0x360354[_0x7e99('0x193')](0x14,_0x12b6e6,_0x68ebee)&&!_0x3c5070){if(_0x5baf61[_0x7e99('0x12b')]>=_0x68ebee[_0x7e99('0x19d')]){_0x360354['createStateFinal'](_0x5baf61,_0x4098fc,_0x4cf371,_0x7e99('0x1bd'));}else{_0x360354[_0x7e99('0x12c')](_0x5baf61,_0x4098fc,_0x4cf371,'reason\x2020\x20agentreject');}}break;default:_0x68ebee[_0x7e99('0x13b')]+=0x1;_0x5baf61[_0x7e99('0xd2')]=0xc;_0x5baf61[_0x7e99('0x6f')]=_0x528e94[_0x7e99('0xc9')];_0x38849e=_0x68ebee[_0x7e99('0x19e')];_0x3624fd=_0x68ebee['callAdditionalPhoneAfterMin'];hopperUtils[_0x7e99('0xe6')](_0x5baf61)[_0x7e99('0xa2')](loggerCatch('[syncAgentComplete][createHistory][?]'));if(_0x360354[_0x7e99('0x193')](_0x528e94['reason'],_0x12b6e6,_0x68ebee)&&!_0x3c5070){if(_0x5baf61[_0x7e99('0x127')]+_0x5baf61['countcongestionretry']+_0x5baf61[_0x7e99('0x129')]+_0x5baf61['countnosuchnumberretry']+_0x5baf61[_0x7e99('0xd8')]+_0x5baf61[_0x7e99('0xec')]+_0x5baf61[_0x7e99('0x125')]+_0x5baf61['countagentrejectretry']>=_0x68ebee['dialGlobalMaxRetry']){_0x360354[_0x7e99('0x12c')](_0x5baf61,_0x4098fc,_0x4cf371,_0x528e94[_0x7e99('0xc9')]);}else{_0x360354[_0x7e99('0x1a4')](_0x5baf61,_0x4098fc,_0x4cf371,_0x528e94['reason']);}}}})[_0x7e99('0x42')](function(){if(_0x3c5070){hopperUtils[_0x7e99('0xe8')](_0x5baf61,_0x38849e,_0x3624fd)[_0x7e99('0x42')](function(){return _0x4098fc(0x1);});}});});};Dialer[_0x7e99('0x87')][_0x7e99('0x12c')]=function(_0x1f9cd8,_0xdca782,_0x347651,_0x1a5621){var _0x5490d9=new Final(_0x1f9cd8);_0x5490d9[_0x7e99('0xd2')]=0xf;_0x5490d9[_0x7e99('0x6f')]='Global';this[_0x7e99('0x1a4')](_0x5490d9,_0xdca782,_0x347651,_0x1a5621);};Dialer[_0x7e99('0x87')][_0x7e99('0x1a4')]=function(_0x2a9c53,_0x1bfaa4,_0x296d4c,_0x4d4a2d){hopperUtils[_0x7e99('0x13a')](_0x2a9c53)[_0x7e99('0x42')](function(){return _0x1bfaa4(msgResponse(_0x7e99('0x1a0'),_0x7e99('0x111'),_0x4d4a2d));})[_0x7e99('0xa2')](function(){return _0x296d4c(msgResponse(_0x7e99('0x1be'),_0x7e99('0x96'),_0x7e99('0x1bf')));});};Dialer[_0x7e99('0x87')][_0x7e99('0xb5')]=function(_0x969397){var _0x4d3db1=_0x969397[_0x7e99('0x1c0')]/0x64;var _0x49b6ba=_0x969397[_0x7e99('0xd0')]/(_0x969397['outboundDropCallsDayTimeout']+_0x969397['outboundAnswerCallsDay']);var _0x2265f1=Math['round'](_0x969397[_0x7e99('0x1c1')]*(_0x969397[_0x7e99('0x1c2')]/0x64));var _0x14fbe6=Math[_0x7e99('0x1c3')](_0x969397[_0x7e99('0x1c1')]*(_0x969397['predictiveIntervalMinThreshold']/0x64));var _0x30f5ac=_0x969397[_0x7e99('0x1c4')]+_0x969397[_0x7e99('0x144')];var _0x3c55d3=Math[_0x7e99('0x1c5')](_0x969397[_0x7e99('0x1c6')]*_0x969397[_0x7e99('0x5c')]*_0x969397[_0x7e99('0x1c7')]*_0x969397[_0x7e99('0x1c8')]);if(_[_0x7e99('0x43')](_0x969397['startProgressive'])){if(!_['isUndefined'](_0x969397[_0x7e99('0x2a')])){_0x969397['startPredictive']=undefined;loggerPredictive[_0x7e99('0x65')](_0x7e99('0x1c9'),_0x7e99('0x1ca'));}if(!_['isUndefined'](_0x969397[_0x7e99('0x64')])){loggerPredictive[_0x7e99('0x65')](_0x7e99('0x1c9'),_0x7e99('0x1cb'));clearInterval(_0x969397[_0x7e99('0x64')]);_0x969397[_0x7e99('0x64')]=undefined;}_0x969397[_0x7e99('0x61')]=moment()['format'](_0x7e99('0xcb'));loggerPredictive[_0x7e99('0x4b')](_0x969397[_0x7e99('0x62')],_0x7e99('0x1cc'),_0x969397[_0x7e99('0x61')]);this[_0x7e99('0xb7')](_0x969397,0x1);}else if(ifInterval(_0x969397[_0x7e99('0x1cd')],_0x969397[_0x7e99('0x61')])){this['handlePower'](_0x969397,0x1);loggerPredictiveCalls[_0x7e99('0x4b')](_0x7e99('0x1ce'),_0x969397[_0x7e99('0x61')],_0x969397['name']);_0x969397[_0x7e99('0x1c6')]=0x0;_0x969397[_0x7e99('0xd1')]=0x0;}else if(_0x4d3db1<_0x49b6ba&&_0x969397['dialPredictiveOptimization']===_0x7e99('0x1cf')){clearPredictiveAttributes(_0x969397);loggerPredictive['info']('[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day',_0x49b6ba,_0x7e99('0x61'),_0x969397[_0x7e99('0x62')]);}else if(_0x3c55d3<_0x969397[_0x7e99('0xd1')]&&_0x969397['dialPredictiveOptimization']===_0x7e99('0x1cf')){clearPredictiveAttributes(_0x969397);loggerPredictive[_0x7e99('0x4b')](_0x7e99('0x1d0'),_0x7e99('0x1d1'),_0x3c55d3,_0x7e99('0x1d2'),_0x969397['predictiveIntervalErlangCallsDroppedCalls'],_0x7e99('0x61'),_0x969397[_0x7e99('0x62')]);}else if(!ifInterval(_0x969397[_0x7e99('0x1cd')],_0x969397['startProgressive'])&&_[_0x7e99('0x43')](_0x969397[_0x7e99('0x2a')])&&!_['isUndefined'](_0x969397['startProgressive'])){_0x969397[_0x7e99('0x2a')]=moment()[_0x7e99('0x49')](_0x7e99('0xcb'));loggerPredictive[_0x7e99('0x4b')](_0x969397[_0x7e99('0x62')],_0x7e99('0x1d3'),_0x969397['startPredictive']);hopperUtils[_0x7e99('0x1d4')](_0x969397['dialPredictiveInterval'])[_0x7e99('0x42')](this['getDataPredictive'](_0x969397))['then'](mergeDataErlangB(_0x969397))[_0x7e99('0x42')](this[_0x7e99('0x1d5')](_0x969397))[_0x7e99('0xa2')](loggerCatchPredictive(_0x7e99('0x1d6'),_0x969397));}else if(!ifInterval(_0x969397['dialPredictiveInterval'],_0x969397[_0x7e99('0x2a')])){_0x969397[_0x7e99('0xd1')]=0x0;_0x969397[_0x7e99('0x2a')]=moment()[_0x7e99('0x49')](_0x7e99('0xcb'));loggerPredictive[_0x7e99('0x4b')](_0x969397[_0x7e99('0x62')],_0x7e99('0x1d7'),_0x969397[_0x7e99('0x2a')]);clearInterval(_0x969397[_0x7e99('0x64')]);_0x969397[_0x7e99('0x64')]=undefined;hopperUtils['avgHandleTime'](_0x969397['dialPredictiveInterval'])[_0x7e99('0x42')](this['getDataPredictive'](_0x969397))['then'](mergeDataErlangB(_0x969397))['then'](this['startMethodPredictive'](_0x969397))['catch'](loggerCatchPredictive('Predictive\x20for\x20every\x20interval',_0x969397));}else if(_0x969397[_0x7e99('0x1c1')]&&_0x30f5ac<_0x969397['predictiveIntervalAvailable']-_0x14fbe6){clearPredictiveAttributes(_0x969397);loggerPredictive[_0x7e99('0x4b')](_0x969397[_0x7e99('0x62')],_0x7e99('0x1d8'),_0x30f5ac,_0x7e99('0x1d9'),_0x969397['predictiveIntervalAvailable'],'-',_0x14fbe6,'=',_0x969397['predictiveIntervalAvailable']-_0x14fbe6,')');}else if(_0x969397[_0x7e99('0x1c1')]&&_0x30f5ac>_0x969397[_0x7e99('0x1c1')]+_0x2265f1){clearPredictiveAttributes(_0x969397);loggerPredictive[_0x7e99('0x4b')](_0x969397[_0x7e99('0x62')],_0x7e99('0x1d8'),_0x30f5ac,_0x7e99('0x1da'),_0x969397[_0x7e99('0x1c1')],'+',_0x2265f1,'=',_0x969397[_0x7e99('0x1c1')]+_0x2265f1,')');}};Dialer['prototype'][_0x7e99('0x1db')]=function(_0x6166a0){var _0xb462ec=this;return function(_0x85db64){return new Promise(function(_0x2d823d,_0x27ba8e){_['merge'](_0x6166a0,_0x85db64[0x0]);if(checkGetDataPredictive(_0x85db64[0x0])){var _0x4b5c5d=_0x6166a0[_0x7e99('0x1c1')]=_0x6166a0['talking']+_0x6166a0[_0x7e99('0x1c4')];var _0x52861e=_0x6166a0[_0x7e99('0x1cd')]*0x3c;var _0x1cdfde=_0x85db64[0x0][_0x7e99('0x56')]+_0x85db64[0x0]['predictiveIntervalAvgHoldtime'];var _0x11d23b=(_0x85db64[0x0][_0x7e99('0x4f')]+_0x85db64[0x0][_0x7e99('0x51')]+_0x85db64[0x0][_0x7e99('0x53')])/_0x85db64[0x0][_0x7e99('0x4d')];_0x6166a0[_0x7e99('0x1c7')]=_0x11d23b>0x0?_0x11d23b:0x1;switch(_0x6166a0['dialPredictiveOptimization']){case'dropRate':var _0x519457=_0x6166a0['dialPredictiveOptimizationPercentage']/0x64;return _0xb462ec[_0x7e99('0x1dc')](_0x4b5c5d,_0x52861e,_0x1cdfde,_0x11d23b,_0x519457)['then'](function(_0x14d017){return _0x2d823d(_0x14d017);});case _0x7e99('0x1dd'):var _0x288750=_0x6166a0['dialPredictiveOptimizationPercentage']/0x64;return _0xb462ec[_0x7e99('0x1de')](_0x4b5c5d,_0x52861e,_0x1cdfde,_0x11d23b,_0x288750)[_0x7e99('0x42')](function(_0xb09158){return _0x2d823d(_0xb09158);});default:return _0x27ba8e(msgResponse('[getDataPredictive]',_0x7e99('0x96'),_0x7e99('0x1df')));}}else{return _0x27ba8e(msgResponse(_0x7e99('0x1e0'),'Failure',_0x7e99('0x1e1')));}});};};Dialer[_0x7e99('0x87')]['getDataPredictiveOld']=function(_0x56aa7f){var _0xf6c132=this;return function(_0x5175ea){return new Promise(function(_0x3c58c1,_0x27f3e3){_[_0x7e99('0x15d')](_0x56aa7f,_0x5175ea[0x0]);if(checkGetDataPredictive(_0x5175ea[0x0])){loggerPredictive[_0x7e99('0x4b')](JSON[_0x7e99('0xaa')](_0x5175ea[0x0]));if(_0x56aa7f[_0x7e99('0x1e2')]===_0x7e99('0x1cf')){return _0xf6c132[_0x7e99('0x158')](_0x56aa7f['id'])[_0x7e99('0x42')](function(_0x585501){var _0x51dee9=_0x56aa7f[_0x7e99('0x1e3')]-_0x585501[0x0][_0x7e99('0x1e4')];var _0x3b0b4f=_0x56aa7f[_0x7e99('0x1cd')]*0x3c;var _0x32bb63=_0x5175ea[0x0][_0x7e99('0x56')]+_0x5175ea[0x0][_0x7e99('0x1e5')];var _0x20c834=(_0x5175ea[0x0][_0x7e99('0x4f')]+_0x5175ea[0x0][_0x7e99('0x51')]+_0x5175ea[0x0][_0x7e99('0x53')])/_0x5175ea[0x0][_0x7e99('0x4d')];var _0x5e01cc=_0x56aa7f[_0x7e99('0x1c0')]/0x64;_0x56aa7f[_0x7e99('0x1e6')]=_0x585501[0x0]['outboundQueuePauses']||0x0;_0x56aa7f['predictiveIntervalHitRate']=_0x20c834>0x0?_0x20c834:0x1;return _0xf6c132['abandonmentRate'](_0x51dee9,_0x3b0b4f,_0x32bb63,_0x20c834,_0x5e01cc);})['then'](function(_0x3e549a){return _0x3c58c1(_0x3e549a);})[_0x7e99('0xa2')](function(_0x141939){return _0x27f3e3(msgResponse(_0x7e99('0x1e7'),'Failure',JSON['stringify'](_0x141939)));});}if(_0x56aa7f[_0x7e99('0x1e2')]===_0x7e99('0x1dd')){return _0xf6c132[_0x7e99('0x158')](_0x56aa7f['id'])['then'](function(_0x592b9a){var _0x2c1ae4=_0x56aa7f[_0x7e99('0x1e3')]-_0x592b9a[0x0][_0x7e99('0x1e4')];var _0x3d8d09=_0x56aa7f[_0x7e99('0x1cd')]*0x3c;var _0x449238=_0x5175ea[0x0][_0x7e99('0x56')]+_0x5175ea[0x0][_0x7e99('0x1e5')];var _0x3b5e92=(_0x5175ea[0x0][_0x7e99('0x4f')]+_0x5175ea[0x0][_0x7e99('0x51')]+_0x5175ea[0x0][_0x7e99('0x53')])/_0x5175ea[0x0][_0x7e99('0x4d')];var _0x27ae0f=_0x56aa7f['dialPredictiveOptimizationPercentage']/0x64;_0x56aa7f[_0x7e99('0x1e6')]=_0x592b9a[0x0][_0x7e99('0x1e4')]||0x0;_0x56aa7f[_0x7e99('0x1c7')]=_0x3b5e92>0x0?_0x3b5e92:0x1;return _0xf6c132[_0x7e99('0x1de')](_0x2c1ae4,_0x3d8d09,_0x449238,_0x3b5e92,_0x27ae0f);})[_0x7e99('0x42')](function(_0x3f6d53){return _0x3c58c1(_0x3f6d53);})[_0x7e99('0xa2')](function(_0x3467cc){return _0x27f3e3(msgResponse(_0x7e99('0x1e7'),_0x7e99('0x96'),JSON['stringify'](_0x3467cc)));});}}else{return _0x27f3e3(msgResponse(_0x7e99('0x1e0'),_0x7e99('0x96'),_0x7e99('0x1e1')));}});};};Dialer[_0x7e99('0x87')]['startMethodPredictive']=function(_0x4ec1c4){var _0x47a765=this;return function(){var _0x4ae432=0x0;var _0x157a52=Math[_0x7e99('0x1c5')](_0x4ec1c4[_0x7e99('0x5b')]*0x3e8);if(_0x157a52>0x0){_0x157a52=_0x157a52<0x64?0x64:_0x157a52;loggerPredictive[_0x7e99('0x4b')](_0x4ec1c4[_0x7e99('0x62')],_0x7e99('0x1e8'),_0x157a52,_0x7e99('0x1e9'));_0x4ec1c4[_0x7e99('0x64')]=setInterval(function(){_0x47a765[_0x7e99('0x64')](_0x4ec1c4);loggerPredictiveCalls[_0x7e99('0x4b')](_0x7e99('0x1ea'),_0x4ae432+=0x1);},_0x157a52);}else{loggerPredictive[_0x7e99('0x4b')](_0x4ec1c4['name'],_0x7e99('0x1eb'));}};};Dialer[_0x7e99('0x87')][_0x7e99('0x1ec')]=function(_0x4fad60,_0x1bda07){var _0x4aa944=this;return function(_0x30792e){if(_[_0x7e99('0x103')](_0x30792e)){if(_['isNil'](_0x1bda07[_0x7e99('0x15e')])||!_0x1bda07[_0x7e99('0x1ed')]){if(_0x4fad60['dialMethod']===_0x7e99('0xba')){_0x4fad60['queueStatusComplete']=_[_0x7e99('0x43')](_0x4fad60[_0x7e99('0x75')])?!![]:_0x4fad60['queueStatusComplete'];var _0x69724d=uuid['v4']();_0x4aa944[_0x7e99('0x26')][_0x69724d]=new Action(_0x4fad60,_0x1bda07,_0x69724d);loggerBooked['info'](_0x7e99('0x1ee'),_0x69724d,_0x7e99('0x1ef'),JSON[_0x7e99('0xaa')](_0x4fad60[_0x7e99('0x75')]),'Queue:\x20',_0x4fad60[_0x7e99('0x62')]);if(_0x4fad60['queueStatusComplete']){_0x4fad60[_0x7e99('0x75')]=![];_0x4aa944[_0x7e99('0x2c')][_0x4aa944[_0x7e99('0x26')][_0x69724d][_0x7e99('0xc4')]]=[];ami[_0x7e99('0x9c')]({'actionid':_0x69724d,'action':_0x7e99('0x1f0'),'queue':_0x4fad60[_0x7e99('0x62')]})[_0x7e99('0xa2')](function(){_0x4aa944[_0x7e99('0xc6')](_0x4fad60);hopperUtils[_0x7e99('0x101')]({'active':![],'ContactId':_0x4aa944[_0x7e99('0x26')][_0x69724d][_0x7e99('0xdf')],'ListId':_0x4aa944[_0x7e99('0x26')][_0x69724d][_0x7e99('0xe0')],'VoiceQueueId':_0x4aa944['actions'][_0x69724d][_0x7e99('0xe1')]||undefined,'CampaignId':_0x4aa944[_0x7e99('0x26')][_0x69724d]['CampaignId']||undefined})[_0x7e99('0xa2')](loggerCatch('[unlockOriginate][syncQueueStatusComplete]'));delete _0x4aa944['actions'][_0x69724d];});}else{loggerBooked[_0x7e99('0x4b')](_0x7e99('0x1f1'),JSON['stringify'](_0x4fad60[_0x7e99('0x75')]),'Queue:\x20',_0x4fad60[_0x7e99('0x62')]);_0x4aa944[_0x7e99('0xc6')](_0x4fad60);hopperUtils['rescheduleContact']({'active':![],'ContactId':_0x4aa944['actions'][_0x69724d]['ContactId'],'ListId':_0x4aa944[_0x7e99('0x26')][_0x69724d][_0x7e99('0xe0')],'VoiceQueueId':_0x4aa944[_0x7e99('0x26')][_0x69724d][_0x7e99('0xe1')]||undefined,'CampaignId':_0x4aa944[_0x7e99('0x26')][_0x69724d][_0x7e99('0xe2')]||undefined})[_0x7e99('0xa2')](loggerCatch(_0x7e99('0x1f2')));delete _0x4aa944[_0x7e99('0x26')][_0x69724d];}}else{return _0x4aa944[_0x7e99('0x1f3')](_0x4fad60,_0x1bda07);}}else{if(utils[_0x7e99('0x60')](undefined,_0x1bda07[_0x7e99('0x1f4')])<_0x4fad60[_0x7e99('0x1f5')]*0x3c){if(_0x1bda07[_0x7e99('0x151')]&&!_0x1bda07['Agent'][_0x7e99('0x1f6')]){_0x4aa944[_0x7e99('0x1f')][_0x7e99('0xfe')](_0x1bda07['id'])[_0x7e99('0x100')](function(){_0x4aa944[_0x7e99('0xc6')](_0x4fad60);});}else{hopperUtils[_0x7e99('0x1f7')]({'active':![]},_0x1bda07['id'],0x1)[_0x7e99('0x100')](function(){_0x4aa944['updateOriginated'](_0x4fad60);});}}else{_0x4fad60[_0x7e99('0x1f8')]+=0x1;_0x4aa944['updateOriginated'](_0x4fad60);if(_0x4fad60['dialRecallInQueue']){hopperUtils[_0x7e99('0x101')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x1bda07['ContactId'],'ListId':_0x1bda07[_0x7e99('0xe0')],'VoiceQueueId':_0x1bda07[_0x7e99('0xe1')]||undefined,'CampaignId':_0x1bda07[_0x7e99('0xe2')]||undefined})[_0x7e99('0xa2')](loggerCatch(_0x7e99('0x1f9')));hopperUtils[_0x7e99('0xe6')](createObjHistory(_0x4fad60,_0x1bda07,utils[_0x7e99('0x69')]['QUEUE_RECALL'],0x17,_0x7e99('0x1fa')))[_0x7e99('0xa2')](loggerCatch(_0x7e99('0x1fb')));}else{_0x4aa944['saveInDb'](createObjHistory(_0x4fad60,_0x1bda07,utils[_0x7e99('0x69')]['RECALL_TIMEOUT'],0x16,_0x7e99('0x1fc')),_0x7e99('0x1fd'),'[Originate][HistoryRecallClose]');}}}}else{_0x4fad60[_0x7e99('0x1fe')]+=0x1;_0x4aa944['saveInDb'](createObjHistory(_0x4fad60,_0x1bda07,utils[_0x7e99('0x69')]['BLACKLIST'],0xd,'Blacklist'),_0x7e99('0x1ff'),_0x7e99('0x200'));throw _0x7e99('0x201');}};};Dialer[_0x7e99('0x87')][_0x7e99('0x163')]=function(_0x10f805){var _0x2fc603=this;var _0x1e7046=_0x10f805['limitCalls']-_0x10f805['originated'];emitCampaignSummary(_0x10f805);if(_0x1e7046>0x0&&_0x10f805[_0x7e99('0x202')]==0x0){if(_0x1e7046>this[_0x7e99('0x24')]){_0x1e7046=this[_0x7e99('0x24')];}_0x10f805[_0x7e99('0x202')]=0x1;hopperUtils['getContactDialerIvr'](_0x10f805,_0x1e7046)['then'](function(_0x56b1df){_0x10f805['temp']=0x0;if(_0x56b1df){if(!utils[_0x7e99('0x203')](_0x56b1df)){_0x10f805[_0x7e99('0x68')]=utils[_0x7e99('0x69')][_0x7e99('0x6d')];logger[_0x7e99('0x4b')](_0x7e99('0x204')+_0x10f805[_0x7e99('0x62')]);}else{_0x10f805[_0x7e99('0x80')]+=_0x56b1df['length'];_0x10f805['message']=utils['CAMPAIGN_STATUS']['RUNNING'];for(var _0x4d4a6a=0x0;_0x4d4a6a<_0x56b1df[_0x7e99('0x105')];_0x4d4a6a+=0x1){_0x10f805[_0x7e99('0x205')]+=0x1;if(_[_0x7e99('0xf8')](_0x56b1df[_0x4d4a6a])||_['isNil'](_0x56b1df[_0x4d4a6a][_0x7e99('0x17d')])||_[_0x7e99('0xf8')](_0x56b1df[_0x4d4a6a][_0x7e99('0x167')])){_0x2fc603[_0x7e99('0x15b')](_0x7e99('0x206'),_0x10f805,_0x56b1df[_0x4d4a6a]);}else{hopperUtils['checkIsBlackListIvr'](_[_0x7e99('0x74')](_0x56b1df[_0x4d4a6a],[_0x7e99('0xe2'),'phone']))[_0x7e99('0x42')](_0x2fc603[_0x7e99('0x1ec')](_0x10f805,_0x56b1df[_0x4d4a6a]))[_0x7e99('0xa2')](_0x2fc603['loggerHandler'](_0x7e99('0x207'),_0x10f805));}}}}})[_0x7e99('0xa2')](loggerGetContactDialer(_0x7e99('0x208'),_0x10f805,_0x1e7046));}};Dialer['prototype'][_0x7e99('0xb7')]=function(_0x4415f0,_0xdc3ba4){var _0x40f277=this;var _0x410514=[];if(_0xdc3ba4<0x1||_0x4415f0[_0x7e99('0xb4')]==='booked'){_0xdc3ba4=0x1;}var _0x3b6544=Math[_0x7e99('0x1c5')](_0x4415f0[_0x7e99('0x1c4')]*_0xdc3ba4)-_0x4415f0['originated'];if(_0x4415f0[_0x7e99('0x209')]>0x0){var _0x2016cd=_0x4415f0[_0x7e99('0x209')]-_0x4415f0['originated']-_0x4415f0[_0x7e99('0x144')]-_0x4415f0[_0x7e99('0x145')];if(_0x3b6544>_0x2016cd){_0x3b6544=_0x2016cd;}}if(_0x3b6544>0x0&&_0x4415f0[_0x7e99('0x202')]==0x0){if(_0x4415f0['dialMethod']==='booked'){_0x3b6544=0x1;}if(_0x3b6544>this[_0x7e99('0x24')]){_0x3b6544=this[_0x7e99('0x24')];}for(var _0x362499 in this[_0x7e99('0x22')]){if(typeof this[_0x7e99('0x22')][_0x362499]!==_0x7e99('0xad')){if(this[_0x7e99('0x22')][_0x362499][_0x7e99('0xd2')]===_0x7e99('0x20a')&&this['agents'][_0x362499][_0x7e99('0x8c')]===_0x7e99('0x8b')){_0x410514[_0x7e99('0x9b')](this['agents'][_0x362499]['id']);}}}_0x4415f0[_0x7e99('0x202')]=0x1;hopperUtils['getContactDialer'](_0x4415f0,_0x410514,_0x3b6544)[_0x7e99('0x42')](function(_0x436015){_0x4415f0[_0x7e99('0x202')]=0x0;if(_0x436015){if(!utils[_0x7e99('0x203')](_0x436015)){hopperUtils[_0x7e99('0x20b')](_0x4415f0)[_0x7e99('0x42')](sendMessageReschedule(_0x4415f0))['catch'](loggerCatch(_0x7e99('0x20c')));}else{_0x4415f0[_0x7e99('0x80')]+=_0x436015[_0x7e99('0x105')];_0x4415f0[_0x7e99('0x68')]=_0x4415f0[_0x7e99('0xb4')]===_0x7e99('0xba')?utils['CAMPAIGN_STATUS'][_0x7e99('0x146')]:utils['CAMPAIGN_STATUS'][_0x7e99('0x20d')];for(var _0x4ea991=0x0;_0x4ea991<_0x436015[_0x7e99('0x105')];_0x4ea991+=0x1){if(_['isNil'](_0x436015[_0x4ea991])||_['isNil'](_0x436015[_0x4ea991][_0x7e99('0x17d')])||_['isNil'](_0x436015[_0x4ea991][_0x7e99('0x167')])){_0x40f277[_0x7e99('0x15b')](_0x7e99('0x206'),_0x4415f0,_0x436015[_0x4ea991]);}else{hopperUtils['checkIsBlackList'](_[_0x7e99('0x74')](_0x436015[_0x4ea991],[_0x7e99('0xe1'),_0x7e99('0x167')]))[_0x7e99('0x42')](_0x40f277[_0x7e99('0x1ec')](_0x4415f0,_0x436015[_0x4ea991]))['catch'](_0x40f277[_0x7e99('0x20e')](_0x7e99('0x206'),_0x4415f0));}}}}})[_0x7e99('0xa2')](loggerGetContactDialer('[getContactDialer2]',_0x4415f0,_0x3b6544));}};Dialer[_0x7e99('0x87')][_0x7e99('0x64')]=function(_0x321f8c){if(_0x321f8c[_0x7e99('0x209')]>0x0){var _0x510aa1=_0x321f8c[_0x7e99('0x209')]-_0x321f8c[_0x7e99('0x80')]-_0x321f8c[_0x7e99('0x144')];if(_0x510aa1>0x0&&_0x321f8c['temp']==0x0){this[_0x7e99('0x20f')](_0x321f8c);}else{loggerPredictiveCalls[_0x7e99('0x4b')](_0x7e99('0x210'));}}else{this[_0x7e99('0x20f')](_0x321f8c);}};Dialer['prototype']['tryOriginatePredictive']=function(_0x38a0bd){var _0x3794b3=this;var _0x5c19aa=[];_0x38a0bd[_0x7e99('0x80')]+=0x1;for(var _0xa3b1ff in this['agents']){if(typeof this[_0x7e99('0x22')][_0xa3b1ff]!==_0x7e99('0xad')){if(this['agents'][_0xa3b1ff][_0x7e99('0xd2')]==='not_inuse'&&this[_0x7e99('0x22')][_0xa3b1ff]['status']===_0x7e99('0x8b')){_0x5c19aa[_0x7e99('0x9b')](this[_0x7e99('0x22')][_0xa3b1ff]['id']);}}}_0x38a0bd[_0x7e99('0x202')]=0x1;return this[_0x7e99('0x211')](_0x38a0bd['id'],_0x5c19aa,0x1,_0x38a0bd[_0x7e99('0x212')],_0x38a0bd)[_0x7e99('0x42')](function(_0x5b5bda){_0x38a0bd[_0x7e99('0x202')]=0x1;if(_0x5b5bda){if(!utils[_0x7e99('0x203')](_0x5b5bda)){utils['checkContactLowerLimitOriginate'](_0x38a0bd,0x1,0x0);return hopperUtils[_0x7e99('0x20b')](_0x38a0bd)[_0x7e99('0x42')](sendMessageReschedule(_0x38a0bd))[_0x7e99('0xa2')](loggerCatch(_0x7e99('0x20c')));}else{_0x38a0bd[_0x7e99('0x68')]=utils['CAMPAIGN_STATUS'][_0x7e99('0x20d')];if(_[_0x7e99('0xf8')](_0x5b5bda[0x0])||_['isNil'](_0x5b5bda[0x0]['Contact'])||_[_0x7e99('0xf8')](_0x5b5bda[0x0][_0x7e99('0x167')])){_0x3794b3[_0x7e99('0x15b')](_0x7e99('0x206'),_0x38a0bd,_0x5b5bda[0x0]);}else{return hopperUtils[_0x7e99('0x213')](_[_0x7e99('0x74')](_0x5b5bda[0x0],[_0x7e99('0xe1'),_0x7e99('0x167')]))['then'](_0x3794b3[_0x7e99('0x1ec')](_0x38a0bd,_0x5b5bda[0x0]))[_0x7e99('0xa2')](_0x3794b3['loggerHandler']('[actionOriginatePredictive]\x20',_0x38a0bd));}}}})[_0x7e99('0xa2')](loggerGetContactDialer(_0x7e99('0x214'),_0x38a0bd,0x1));};Dialer[_0x7e99('0x87')][_0x7e99('0x1dc')]=function(_0x4e4809,_0x3c1553,_0x4166c1,_0xb33d6f,_0x5aef3f,_0x23ae43){loggerPredictive['info']('--------\x20Drop\x20Rate\x20--------');loggerPredictive['info'](_0x7e99('0x215'),_0x4e4809);loggerPredictive[_0x7e99('0x4b')]('Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x3c1553);loggerPredictive[_0x7e99('0x4b')]('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',_0x4166c1);loggerPredictive[_0x7e99('0x4b')](_0x7e99('0x216'),_0xb33d6f);loggerPredictive[_0x7e99('0x4b')](_0x7e99('0x217'),_0x5aef3f);loggerPredictive[_0x7e99('0x4b')](_0x7e99('0x5f'));return new Promise(function(_0x51f60a,_0x1b517e){if(_0x4e4809<=0x0||isNaN(_0x4e4809)){return _0x1b517e(msgResponse('[abandonmentRate]',_0x7e99('0x86'),_0x7e99('0x218')+_0x4e4809));}if(_0x4166c1<=0x0||isNaN(_0x4166c1)){return _0x1b517e(msgResponse(_0x7e99('0x219'),'Error',_0x7e99('0x21a')+_0x4166c1));}if(_0xb33d6f<=0x0||isNaN(_0xb33d6f)){return _0x1b517e(msgResponse('[abandonmentRate]',_0x7e99('0x86'),_0x7e99('0x21b')+_0xb33d6f));}if(_0x3c1553<=0x0||isNaN(_0x3c1553)){return _0x1b517e(msgResponse(_0x7e99('0x219'),_0x7e99('0x86'),'interval\x20=\x20'+_0x3c1553));}if(_0x5aef3f<=0x0||isNaN(_0x5aef3f)){return _0x1b517e(msgResponse(_0x7e99('0x219'),_0x7e99('0x86'),'Amax\x20=\x20'+_0x5aef3f));}_0x23ae43=_0x23ae43||0x0;var _0x216ffa=0x1/_0x4166c1;var _0x516392=0x0;var _0x5de0c7=0x0;var _0x4bcfee=0x0;var _0x5da46c=0x0;for(var _0xd853bc=0x0;_0x4bcfee<_0x5aef3f;_0xd853bc+=0x1){_0x5de0c7=_0xd853bc/_0x3c1553;_0x516392=(_0xb33d6f*_0x5de0c7+_0x23ae43)/_0x216ffa;_0x4bcfee=utils[_0x7e99('0x21c')](_0x516392,_0x4e4809);_0x5da46c=_0x516392/_0x4e4809*(0x1-utils['erlangb'](_0x516392,_0x4e4809));}return _0x51f60a({'erlangCalls':_0xd853bc,'erlangCallToSecond':_0x3c1553/_0xd853bc,'erlangAbandonmentRate':_0x4bcfee,'erlangBusyFactor':_0x5da46c});});};Dialer[_0x7e99('0x87')][_0x7e99('0x1de')]=function(_0x4ed2d1,_0x2cc325,_0xdc7ca5,_0x2e4c5d,_0x59ef50,_0x5b6003){loggerPredictive['info'](_0x7e99('0x21d'));loggerPredictive['info'](_0x7e99('0x215'),_0x4ed2d1);loggerPredictive['info'](_0x7e99('0x21e'),_0x2cc325);loggerPredictive[_0x7e99('0x4b')](_0x7e99('0x21f'),_0xdc7ca5);loggerPredictive[_0x7e99('0x4b')](_0x7e99('0x216'),_0x2e4c5d);loggerPredictive['info'](_0x7e99('0x220'),_0x59ef50);loggerPredictive[_0x7e99('0x4b')](_0x7e99('0x5f'));return new Promise(function(_0x48561d,_0x59a377){if(_0x4ed2d1<=0x0||isNaN(_0x4ed2d1)){return _0x59a377(msgResponse(_0x7e99('0x221'),_0x7e99('0x86'),_0x7e99('0x218')+_0x4ed2d1));}if(_0xdc7ca5<=0x0||isNaN(_0xdc7ca5)){return _0x59a377(msgResponse(_0x7e99('0x221'),_0x7e99('0x86'),'Ts\x20=\x20'+_0xdc7ca5));}if(_0x2e4c5d<=0x0||isNaN(_0x2e4c5d)){return _0x59a377(msgResponse(_0x7e99('0x221'),_0x7e99('0x86'),_0x7e99('0x21b')+_0x2e4c5d));}if(_0x2cc325<=0x0||isNaN(_0x2cc325)){return _0x59a377(msgResponse(_0x7e99('0x221'),_0x7e99('0x86'),_0x7e99('0x222')+_0x2cc325));}if(_0x59ef50<=0x0||isNaN(_0x59ef50)){return _0x59a377(msgResponse(_0x7e99('0x221'),'Error',_0x7e99('0x223')+_0x59ef50));}_0x5b6003=_0x5b6003||0x0;var _0x3f908b=0x1/_0xdc7ca5;var _0x5617ba=0x0;var _0x3a9eef=0x0;var _0x56d831=0x0;var _0x183039=0x0;for(var _0x425d9b=0x0;_0x183039<_0x59ef50;_0x425d9b+=0x1){_0x3a9eef=_0x425d9b/_0x2cc325;_0x5617ba=(_0x2e4c5d*_0x3a9eef+_0x5b6003)/_0x3f908b;_0x56d831=utils['erlangb'](_0x5617ba,_0x4ed2d1);_0x183039=_0x5617ba/_0x4ed2d1*(0x1-utils[_0x7e99('0x21c')](_0x5617ba,_0x4ed2d1));}return _0x48561d({'erlangCalls':_0x425d9b,'erlangCallToSecond':_0x2cc325/_0x425d9b,'erlangAbandonmentRate':_0x56d831,'erlangBusyFactor':_0x183039});});};module[_0x7e99('0x224')]=Dialer;
\ No newline at end of file