Built motion from commit a9fb64cc6defd8fb3a5cc199221f878e91c0e969. Version 3.0.0...
[motion-next.git] / server / services / ami / dialer / index.js
1 const a1056_0x4a37=['[rescheduleContact][Drop]','Failure','[syncAgentComplete][createHistory][10]','reason\x2011\x20abandoned','resolve','INTERVAL_IS_NULL','[unlock][syncQueueStatusComplete]','p\x20=\x20','[handlePredictive][limitChannel]','YYYY-MM-DD\x20HH:mm:ss','isSuccess','custom:agentcongestion','dialGlobalInterval','maxNumberOriginate','syncOriginateResponse','actionid','contactAgent-idHopper:\x20','Drop','outboundOriginateFailureCallsDay','INTERVAL_IS_EMPTY','countReScheduled','catch','phone','predictive','---------------------------','AgentReject','substring','startPredictive','paused','ContactId','originatecalleridname','outboundRejectCallsDay','dialRecallMeTimeout','dialOriginateTimeout','checkDialMethod','[Originate][HistoryRecallClose]','contactsRescheduled','dialLimitQueue','reason\x200\x20no\x20such\x20number....','checkIsBlackListIvr','abandonmentRate','inspect','dialAMDGreeting','ivrTotalCallsDays','../../../config/environment/','\x22%s\x22\x20<%s>','[rescheduleContact][NoSuchNumber]','updateOriginated','XMD-AMDTOTALANALYSISTIME','syncCampaigns','active','countcongestionretry','XMD-AMDMINWORDLENGTH','[startMethodPredictive][StartProgressive][Loop]','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','syncHangup','clearZombieChannels','actions','outbound','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','\x20Interval\x20is\x20overtime:\x20','INTERVAL_IS_OVERTIME','format','stack','Timezone:\x20','syncNewExten','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','ivr','--------\x20Drop\x20Rate\x20--------','[rescheduleContact][dialRecallInQueue]','is\x20disactive','dialQueueOptions','interval\x20=\x20','predictiveIntervalErlangCallsDroppedCalls','temp','predictiveIntervalPauses','response','originateresponse','rescheduleContact','syncQueueStatusComplete','campaign:save','value','cause-txt','unlockRR','XMD-AMDMAXIMUMNUMBEROFWORDS','custom:agentbusy','SIP/%s/%s%s','../preview/util/util','[syncQueueSummary]\x20Campaign\x20Queue:\x20','evt\x20is\x20undefine','RUNNING','[rescheduleContact]\x20','ifTime','[getContactCampaign2]','predictiveIntervalMaxThreshold','./queueCallerAbandon','loopCampaigns','checkContactBlack','NoSuchNumber','erlangCalls','outboundCongestionCallsDay','countmachineretry','[getContactDialer2][Empty]','amdstatus','countdropretry','available','predictiveIntervalDroppedCallsCallersExit','[actionOriginate]\x20','../rpc/cmHopper','queuemember','[getContactDialer]\x20','[booked][unlock3]','sumBillable','AMD','checkIsBlackList','\x20Intervals\x20is\x20empty\x20','sendMessageOneNotActive','[rescheduleContact][Machine]','AnswerAGI','isNil','seconds','add','Dropped\x20calls\x20day','[getDataPredictive]','reachable','predictiveIntervalErlangCalls','talking','\x20NOT\x20Active','lodash','Busy','agentcomplete','createdAt','strategy','[actions]','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(','./hangup','is\x20not\x20active','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','History\x20information\x20are\x20empty','[Dialer][checkChannel][ivr]','command','varset','getDataPredictive','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','voiceQueues','callerid','statedesc','dialCutDigit','RECALLINQUEUE','[Originate][MoveBlacklist]','handleIvr','syncQueueCallerAbandon','voiceQueue\x20is\x20undefine','reason\x2019\x20machine....','erlangBusyFactor','check\x20predictive\x20is\x20not\x20undefine','queueBookedRR','../rpc/cmHopperBlack','random','IS_DISACTIVED','loggerHandler','XMD-AMDMAXIMUMWORDLENGTH','[Originate][HistoryDialRecallInQueue][historyCatch]','isArray','checkIfTime','predictiveIntervalAvgTalktime','BLACKLIST','outboundBlacklistCallsDay','uuid','not_inuse','[syncCampaigns]','dialMachineMaxRetry','started\x20in\x20predictive\x20at','dialer','predictiveIntervalHitRate','XMD-AMDSILENCETHRESHOLD','starttime','RecallFailedTimeout','HANGUP','custom:agentnosuchnumber','getContactDialerIvr','dialAgentRejectMaxRetry','queueStatusComplete:\x20','[unlockOriginate][syncQueueStatusComplete]','amd','moveContactManagedDialer','createHistory','dialPredictiveOptimizationPercentage','UserId','util','[getContactCampaign2][Empty]','Trunk','checkIfTimeIntervals','Max\x20Drop\x20','contact\x20not\x20moved','dropreason','Agent','[moveContactManagedDialer]\x20','outboundUnknownCallsDay','Agent:\x20','outboundDropCallsDayCallersExit','originate\x20action\x20Error','\x20trunk\x20is\x20not\x20reachable','NOT_ACTIVE','merge','\x20Intervals\x20is\x20null\x20','Action','match','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','agents','total','[rescheduleContact][NoAnswer]','info','agentconnect','interval','contacts','predictiveIntervalAnsweredCalls','dialQueueTimeout','[rescheduleContact]\x20[Congestion]','one\x20call\x20every:','check\x20failure','AGI','[syncAgentComplete][createHistory]','[checkIsBlackListIvr]\x20','dialPowerLevel','predictiveCalls','tryOriginatePredictive','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','originate','averageHandleTime','\x22agi://%s/square,%s\x22','[callProgressDetecting]\x20','undefined','../rpc/voiceQueueRt','dialAbandonedMaxRetry','[countReScheduled]\x20','md5','AVAILABLE_CONTACTS_FINISHED','%s%s','[syncHangupInAMDIvr][createHistory]','string','loggedInDb','noanswer','from-sip','countglobal','emptyContact','outboundQueuePauses','type','reason\x203\x20ringing\x20no\x20answer','dialOriginateCallerIdName','agent','content','outboundNoAnswerCallsDay','moment','Success','predictiveIntervalDroppedCallsTimeout','recallme','unmanaged','XMD-ORIGINATECALLERIDNUM','method\x20not\x20recognized','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','outboundAnswerCallsDay','---------\x20ErlangB\x20---------','dialAMDAfterGreetingSilence','XMD-','syncVarSet','stateGlobal','Unknow','reason','responsetime','[syncAgentComplete]','buildObj','emit','Blacklist','collection\x20data\x20in\x20progressive\x20at','./agentComplete','Global:\x20','VoiceQueueId','[unlockContact]\x20','Interval','message','timezones','xcally-motion-dialer','./action','voice_queue:save','dialNoSuchNumberRetryFrequency','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','Error','predictiveIntervalAvgHoldtime','countnosuchnumberretry','countbusyretry','Machine','XMD-AMDAFTERGREETINGSILENCE','[decremetOriginate]\x20is\x20null\x20or\x20undefined','exports','membername','TRUNK_IS_NOT_REACHABLE','[syncAgentComplete][createHistory][8]','trim','queueCallerAbandonCreateState','unlockContact','getContactDialer','[booked][unlock]','[syncAgentComplete][createHistory][0]','roundrobin','trunks','dialTimezone','[syncAgentComplete][createHistory][?]','[Dialer][checkChannel]','clearing\x20variable\x20handle\x20predictive','queueStatusComplete','nosuchnumber','No\x20such\x20channel','-----\x20Stats\x20Predictive\x20---','dialAMDMinWordLength','dialAMDBetweenWordsSilence','outboundAnswerAgiCallsDay','syncQueueSummary','Ts\x20=\x20','outboundBusyCallsDay','[checkIsBlackList]\x20','predictiveIntervalMultiplicativeFactor','[startMethodPredictive][StartProgressive]','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','state','dialAgentRejectRetryFrequency','preview','XMD-AMDGREETING','XMD-CAMPAIGNID','[callProgressDetecting]','../ami','../rpc/cmHopperHistory','tail','[booked][RR]','XMD-AMDINITIALSILENCE','../../../config/logger','./final','[originateError]:\x20%s','indexOf','syncAgentConnect','isTrunkReachable','[uniqueid]','[booked][RR][finaly]','Unknown\x20Predictive','reason\x2020\x20agentreject','reason\x205\x20busy','recalculate\x20predictive\x20at','dialPredictiveOptimization','dialBusyMaxRetry','originated','congestion','dialOriginateCallerIdNumber','[originate][error]','abandoned','m\x20=\x20','minutes','handlePower','dialQueueProject2','[CatchErlangB]','loopClearZombieChannels','----\x20Agent\x20Busy\x20Factor\x20----','dialActive','[averageHandleTime]\x20','object','calleridnum','loggedIn','limitCalls','\x20Timezone\x20unknow\x20','actionOriginate','name','TIMEZONE_UNKNOW','clearing\x20variable\x20start\x20progressive','ivrAnswerCallsDay','[rescheduleContact][AgentReject]','Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','dialAgiAfterHangupAgent','push','predictiveIntervalTotalCalls','[Originate][HistoryRecallClose][historyCatch]','finally','pTalking','clearing\x20variable\x20start\x20predictive','[Catch][Preview][syncQueueStatusComplete]','predictiveIntervalAvailable','[syncHangupInAMDIvr]','[booked][checkContactBlack][else]','iftime\x20%s,%s','uniqueId','[getContactDialer2]','endtime','uniqueid','originatecalleridnum','enqueue','countnoanswerretry','NONE','updatedAt','error','[syncQueueCallerAbandon]\x20[Drop]','isUndefined','Contact.phone','_rr','erlangAbandonmentRate','run','dialMethod','dialNoAnswerMaxRetry','toUpper','reason19\x20machine....','createStateFinal','voicePause','voice:queue:%s','Contact','length','queueBooked','pick','stringify','RecallInQueue','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','checkIsTrunkReachable','all','sumDuration','Intervals','dialDropMaxRetry','campaign:ivr:%s','saveInDb','reason\x208\x20congestion','dropRate','milliseconds','MACHINE','startMethodPredictive','[getContactDialer2][ReScheduled]','dialQueueProject','checkRetriveMax','locked','rrmemory','[rescheduleContact][Abandoned]','ACTIVE','\x5cw{0,','[getContactDialerPredictive]','Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','replace','busyFactor','optionPredictive','countabandonedretry','[updateOriginated]\x20object\x20originated\x20is\x20negative','Drop\x20in\x20this\x20interval','Amax\x20=\x20','dialNoSuchNumberMaxRetry','[abandonmentRate]','syncQueueMember','Contact\x20updated','bind','outboundReCallsDay','dialNoAnswerRetryFrequency','calleridname','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','queue','AGENTS_NOT_LOGGED','handlePredictive','../../../config/config.service','\x20INTERVAL_IS_NULL','getVoiceQueueRtPauses','[busyFactor]','getCaller','dialDropRetryFrequency','exten','dialAbandonedRetryFrequency','CampaignId','sequence','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','droptime','erlangCallToSecond','dialOrderByScheduledAt','dialPrefix','ListId','dialAMDActive','[unlockQueueStatus][undefined]','status','agentBusyFactor','[syncAgentComplete][createHistory][20]','agiafterat','getQueue','\x22\x22\x20<>','dialPredictiveInterval','log','countagentrejectretry','prototype','custom:agentnoanswer','custom:queuesummary','channels','Abandoned','booked','[ifTime][Action]','dialCongestionRetryFrequency','XMD-VOICEQUEUEID','stateinterface','Queue:\x20','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','dialAMDMaximumWordLength','AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','outboundDropCallsDayTimeout','round','[syncHangupIvr][createHistory]','dialMachineRetryFrequency','[emptyContact]','floor','dialAMDTotalAnalysisTime','campaigns','[syncAgentComplete][createHistory][11]','TrunkBackup','[booked][checkContactBlack]','dialRandomLastDigitCallerIdNumber','channel','variable','dialRecallInQueue','dialGlobalMaxRetry','then',')\x20are\x20more\x20than\x20threshold\x20(','queuestatus','idHopper','RECALLFAILEDTIMEOUT','agentreject','diff','answered','predictiveIntervalMinThreshold','outboundNoSuchCallsDay','[syncHangupIvr]','sumHoldTime','isEmpty','Umin\x20=\x20','true','startProgressive'];(function(_0x5e4821,_0x4a37e3){const _0x337ac7=function(_0x105e66){while(--_0x105e66){_0x5e4821['push'](_0x5e4821['shift']());}};_0x337ac7(++_0x4a37e3);}(a1056_0x4a37,0x163));const a1056_0x337a=function(_0x5e4821,_0x4a37e3){_0x5e4821=_0x5e4821-0x0;let _0x337ac7=a1056_0x4a37[_0x5e4821];return _0x337ac7;};const _0x4831e9=a1056_0x337a;'use strict';const util=require(_0x4831e9('0x16e')),_=require(_0x4831e9('0x131')),uuid=require(_0x4831e9('0x159')),moment=require(_0x4831e9('0x1ae')),rr=require('rr'),md5=require(_0x4831e9('0x19d')),ut=require(_0x4831e9('0x108')),config=require(_0x4831e9('0xdd')),logger=require('../../../config/logger')('dialer'),loggerBooked=require(_0x4831e9('0x200'))(_0x4831e9('0x88')),loggerPredictive=require(_0x4831e9('0x200'))(_0x4831e9('0xc8')),loggerPredictiveCalls=require(_0x4831e9('0x200'))(_0x4831e9('0x192')),loggerSyncQueueSummary=require(_0x4831e9('0x200'))('syncQueueSummary'),ami=require(_0x4831e9('0x1fb')),{getSocket}=require('../../../rediscache'),io=getSocket(),cmHopper=require(_0x4831e9('0x11d')),cmHopperHistory=require(_0x4831e9('0x1fc')),cmHopperBlack=require(_0x4831e9('0x14e')),voiceQueueRt=require(_0x4831e9('0x19a')),Action=require(_0x4831e9('0x1cc')),History=require('./history'),Final=require(_0x4831e9('0x201')),AgentComplete=require(_0x4831e9('0x1c4')),QueueCallerAbandon=require(_0x4831e9('0x110')),Hangup=require(_0x4831e9('0x138')),{getConfigService}=require(_0x4831e9('0x68')),strategy={'rrmemory':_0x4831e9('0x4e'),'roundrobin':_0x4831e9('0x1e1')},Sequence=function(){};Sequence[_0x4831e9('0x83')]['enqueue']=function(_0x105e66){const _0x54e1c7=_0x4831e9;this['tail']=this[_0x54e1c7('0x1fd')]?this[_0x54e1c7('0x1fd')][_0x54e1c7('0x18')](_0x105e66):_0x105e66();};function Dialer(_0x47803d,_0x5d8195){const _0x4c0522=_0x4831e9;this[_0x4c0522('0x71')]=new Sequence(),this['preview']=_0x5d8195,this[_0x4c0522('0x141')]=_0x47803d[_0x4c0522('0x141')],this[_0x4c0522('0x98')]=_0x47803d[_0x4c0522('0x98')],this[_0x4c0522('0x182')]=_0x47803d[_0x4c0522('0x182')],this[_0x4c0522('0x1e2')]=_0x47803d['trunks'],this[_0x4c0522('0xbe')]=config[_0x4c0522('0xbe')]||0x2,this[_0x4c0522('0x86')]={},this[_0x4c0522('0xea')]={},this['contactsId']={},this[_0x4c0522('0x20')]={},this[_0x4c0522('0x56')]={},this['startPredictive']={},this['startProgressive']={},this['ivrOriginated']={},this[_0x4c0522('0x39')]={},this[_0x4c0522('0x14d')]={},ami['on'](_0x4c0522('0x186'),this['syncAgentConnect'][_0x4c0522('0x5f')](this)),ami['on']('queuecallerabandon',this[_0x4c0522('0x148')][_0x4c0522('0x5f')](this)),ami['on'](_0x4c0522('0xfe'),this['syncOriginateResponse'][_0x4c0522('0x5f')](this)),ami['on'](_0x4c0522('0x133'),this['syncAgentComplete'][_0x4c0522('0x5f')](this)),ami['on'](_0x4c0522('0x85'),this[_0x4c0522('0x1ee')]['bind'](this)),ami['on']('hangup',this['syncHangup'][_0x4c0522('0x5f')](this)),ami['on']('newexten',this[_0x4c0522('0xf2')][_0x4c0522('0x5f')](this)),ami['on'](_0x4c0522('0x13e'),this[_0x4c0522('0x1ba')][_0x4c0522('0x5f')](this)),ami['on'](_0x4c0522('0x11e'),this[_0x4c0522('0x5d')][_0x4c0522('0x5f')](this)),ami['on']('queuestatuscomplete',this[_0x4c0522('0x100')]['bind'](this)),this['loopCampaigns'](),this[_0x4c0522('0x4')]();}function isNotNull(_0x464a0a){return _0x464a0a!==null&&!_['isUndefined'](_0x464a0a);}function checkIsLoggedIn(_0x21d45e,_0x26123e){return function(){const _0x123f87=a1056_0x337a;if(_0x26123e<=0x0){_0x21d45e[_0x123f87('0x1c9')]=_0x123f87('0x66');throw _0x21d45e['name']+'\x20AGENTS\x20NOT\x20LOGGED';}};}function isActive(_0x1d65e5){return _0x1d65e5;}function checkIsActive(_0x1b0f09,_0x5db4c5){return function(){const _0x558083=a1056_0x337a;if(!isActive(_0x5db4c5)){_0x1b0f09[_0x558083('0x1c9')]=_0x558083('0x17c');throw _0x1b0f09[_0x558083('0xe')]+_0x558083('0x130');}};}function checkInterval(_0x51f0bf){return function(){const _0x16d3f6=a1056_0x337a;if(!isNotNull(_0x51f0bf[_0x16d3f6('0x1c8')])){_0x51f0bf[_0x16d3f6('0x1c9')]=_0x16d3f6('0xb6');throw _0x51f0bf[_0x16d3f6('0xe')]+_0x16d3f6('0x69');}if(!isNotNull(_0x51f0bf[_0x16d3f6('0x1c8')][_0x16d3f6('0x41')])){_0x51f0bf[_0x16d3f6('0x1c9')]=_0x16d3f6('0xb6');throw _0x51f0bf[_0x16d3f6('0xe')]+_0x16d3f6('0x69');}if(!isNotNull(_[_0x16d3f6('0xad')](_0x51f0bf[_0x16d3f6('0x1c8')]['Intervals']))){_0x51f0bf[_0x16d3f6('0x1c9')]=_0x16d3f6('0xb6');throw _0x51f0bf[_0x16d3f6('0xe')]+_0x16d3f6('0x69');}};}function msgResponse(_0x368fc5,_0x3a4a70,_0x290336){return{'action':_0x368fc5,'response':_0x3a4a70,'message':_0x290336,'stack':_0x290336};}function myreject(_0x47b818){return function(_0x3cc318){const _0x3c00aa=a1056_0x337a;return _0x47b818(msgResponse(_0x3c00aa('0x89'),_0x3c00aa('0x1d0'),JSON[_0x3c00aa('0x3b')](_0x3cc318)));};}function getSeconds(_0xa5979a,_0x385660){const _0x18a435=_0x4831e9,_0x536fe5=moment(_0xa5979a)[_0x18a435('0x47')](0x0),_0x378611=moment(_0x385660)['milliseconds'](0x0);return _0x536fe5['diff'](_0x378611,_0x18a435('0x129'));}function emit(_0x48d152,_0x3b00d6,_0x32581e){const _0x1a3c1b=_0x4831e9;io['to'](_0x48d152)[_0x1a3c1b('0x1c1')](_0x3b00d6,_0x32581e);}function emitVoiceQueueSummary(_0x49f099){const _0x5a6c38=_0x4831e9;if(_0x49f099[_0x5a6c38('0x1a8')]==='outbound'){const _0x42587b={'id':_0x49f099['id'],'name':_0x49f099[_0x5a6c38('0xe')],'strategy':_0x49f099[_0x5a6c38('0x135')],'answered':_0x49f099[_0x5a6c38('0xa8')],'available':_0x49f099[_0x5a6c38('0x11a')],'loggedIn':_0x49f099[_0x5a6c38('0xa')],'pTalking':_0x49f099[_0x5a6c38('0x19')],'sumBillable':_0x49f099[_0x5a6c38('0x121')],'sumDuration':_0x49f099[_0x5a6c38('0x40')],'sumHoldTime':_0x49f099[_0x5a6c38('0xac')]||0x0,'talking':_0x49f099[_0x5a6c38('0x12f')],'total':_0x49f099[_0x5a6c38('0x183')],'type':_0x49f099[_0x5a6c38('0x1a8')],'unmanaged':_0x49f099[_0x5a6c38('0x1b2')],'abandoned':_0x49f099[_0x5a6c38('0x212')],'waiting':_0x49f099['waiting'],'loggedInDb':_0x49f099[_0x5a6c38('0x1a2')],'dialActive':_0x49f099['dialActive'],'dialMethod':_0x49f099[_0x5a6c38('0x30')],'dialOriginateCallerIdName':_0x49f099[_0x5a6c38('0x1aa')],'dialOriginateCallerIdNumber':_0x49f099[_0x5a6c38('0x210')],'dialOriginateTimeout':_0x49f099[_0x5a6c38('0xd2')],'dialPrefix':_0x49f099[_0x5a6c38('0x76')],'outboundAnswerAgiCallsDay':_0x49f099[_0x5a6c38('0x1ed')],'outboundAnswerCallsDay':_0x49f099['outboundAnswerCallsDay'],'outboundBlacklistCallsDay':_0x49f099[_0x5a6c38('0x158')],'outboundBusyCallsDay':_0x49f099['outboundBusyCallsDay'],'outboundCongestionCallsDay':_0x49f099[_0x5a6c38('0x115')],'outboundDropCallsDayACS':_0x49f099['outboundDropCallsDayACS'],'outboundDropCallsDayCallersExit':_0x49f099[_0x5a6c38('0x179')],'outboundDropCallsDayTimeout':_0x49f099[_0x5a6c38('0x91')],'outboundNoAnswerCallsDay':_0x49f099[_0x5a6c38('0x1ad')],'outboundNoSuchCallsDay':_0x49f099[_0x5a6c38('0xaa')],'outboundOriginateFailureCallsDay':_0x49f099[_0x5a6c38('0xc3')],'outboundReCallsDay':_0x49f099[_0x5a6c38('0x60')],'outboundRejectCallsDay':_0x49f099['outboundRejectCallsDay'],'outboundUnknownCallsDay':_0x49f099[_0x5a6c38('0x177')],'predictiveIntervalAnsweredCalls':_0x49f099[_0x5a6c38('0x189')],'predictiveIntervalAvgHoldtime':_0x49f099[_0x5a6c38('0x1d1')],'predictiveIntervalAvgTalktime':_0x49f099['predictiveIntervalAvgTalktime'],'predictiveIntervalDroppedCallsCallersExit':_0x49f099[_0x5a6c38('0x11b')],'predictiveIntervalDroppedCallsTimeout':_0x49f099['predictiveIntervalDroppedCallsTimeout'],'predictiveIntervalErlangCalls':_0x49f099[_0x5a6c38('0x12e')],'predictiveIntervalErlangCallsDroppedCalls':_0x49f099[_0x5a6c38('0xfa')],'predictiveIntervalHitRate':_0x49f099[_0x5a6c38('0x15f')],'predictiveIntervalMultiplicativeFactor':_0x49f099['predictiveIntervalMultiplicativeFactor'],'predictiveIntervalPauses':_0x49f099['predictiveIntervalPauses'],'predictiveIntervalAvailable':_0x49f099[_0x5a6c38('0x1c')],'predictiveIntervalTotalCalls':_0x49f099[_0x5a6c38('0x16')],'message':_0x49f099[_0x5a6c38('0x1c9')],'originated':_0x49f099[_0x5a6c38('0x20e')],'erlangCalls':_0x49f099[_0x5a6c38('0x114')],'erlangCallToSecond':_0x49f099['erlangCallToSecond'],'erlangAbandonmentRate':_0x49f099[_0x5a6c38('0x2e')],'erlangBusyFactor':_0x49f099[_0x5a6c38('0x14b')],'startPredictive':_0x49f099[_0x5a6c38('0xcc')],'startProgressive':_0x49f099['startProgressive']};_0x49f099[_0x5a6c38('0x170')]&&(_0x42587b[_0x5a6c38('0x170')]={'id':_0x49f099[_0x5a6c38('0x170')]['id'],'name':_0x49f099[_0x5a6c38('0x170')]['name'],'active':_0x49f099[_0x5a6c38('0x170')][_0x5a6c38('0xe3')],'callerid':_0x49f099[_0x5a6c38('0x170')][_0x5a6c38('0x142')]});_0x49f099[_0x5a6c38('0x1c8')]&&(_0x42587b['Interval']={'id':_0x49f099['Interval']['id'],'name':_0x49f099[_0x5a6c38('0x1c8')][_0x5a6c38('0xe')]});const _0x1b7f24=md5(JSON['stringify'](_0x42587b));_0x49f099[_0x5a6c38('0x19d')]!==_0x1b7f24&&(_0x49f099['md5']=_0x1b7f24,emit(util['format'](_0x5a6c38('0x36'),_0x42587b[_0x5a6c38('0xe')]),_0x5a6c38('0x1cd'),_0x42587b));}}function emitCampaignSummary(_0x38b563){const _0x428ea0=_0x4831e9;_0x38b563[_0x428ea0('0x1a8')]==='ivr'&&emit(util[_0x428ea0('0xef')](_0x428ea0('0x43'),_0x38b563[_0x428ea0('0xe')]),_0x428ea0('0x101'),_0x38b563);}function checkGetDataPredictive(_0x51dffa){const _0x570819=_0x4831e9;if(isNotNull(_0x51dffa)){if(!_[_0x570819('0xad')](_0x51dffa)){loggerPredictive[_0x570819('0x185')](_0x570819('0x1ea')),loggerPredictive['info'](_0x570819('0x53'),_0x51dffa[_0x570819('0x16')]),loggerPredictive['info'](_0x570819('0x64'),_0x51dffa['predictiveIntervalAnsweredCalls']),loggerPredictive['info']('Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x51dffa[_0x570819('0x1b0')]),loggerPredictive[_0x570819('0x185')](_0x570819('0x63'),_0x51dffa['predictiveIntervalDroppedCallsCallersExit']),loggerPredictive[_0x570819('0x185')](_0x570819('0x90'),_0x51dffa[_0x570819('0x1d1')]),loggerPredictive[_0x570819('0x185')](_0x570819('0x181'),_0x51dffa[_0x570819('0x156')]),loggerPredictive['info'](_0x570819('0xc9'));if(_0x51dffa[_0x570819('0x16')]>0x0){if(!_[_0x570819('0x2b')](_0x51dffa[_0x570819('0x156')])&&_0x51dffa[_0x570819('0x156')]>0x0)return!![];else loggerPredictive[_0x570819('0x185')]('Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive');if(!_['isUndefined'](_0x51dffa[_0x570819('0x1d1')])&&_0x51dffa['predictiveIntervalAvgHoldtime']>0x0)return!![];else loggerPredictive[_0x570819('0x185')](_0x570819('0xec'));}else loggerPredictive['info'](_0x570819('0x8e'));}else loggerPredictive['info'](_0x570819('0x13b'));}else loggerPredictive[_0x570819('0x185')](_0x570819('0x13b'));return![];}function mergeDataErlangB(_0x1c57f5){return function(_0xe013d0){const _0x1686ac=a1056_0x337a;loggerPredictive[_0x1686ac('0x185')](_0x1686ac('0x1b7')),loggerPredictive[_0x1686ac('0x185')](_0x1686ac('0x1f4'),_0xe013d0[_0x1686ac('0x114')]),loggerPredictive[_0x1686ac('0x185')](_0x1686ac('0x1b5'),_0xe013d0[_0x1686ac('0x74')]),loggerPredictive[_0x1686ac('0x185')](_0x1686ac('0xf3'),_0xe013d0['erlangAbandonmentRate']),loggerPredictive[_0x1686ac('0x185')](_0x1686ac('0x194'),_0xe013d0[_0x1686ac('0x14b')]),loggerPredictive[_0x1686ac('0x185')](_0x1686ac('0xf3'),_0xe013d0[_0x1686ac('0x2e')]),loggerPredictive['info'](_0x1686ac('0xc9')),_[_0x1686ac('0x17d')](_0x1c57f5,_0xe013d0);};}function getDiff(_0x26a809){const _0x835bd7=_0x4831e9,_0x159bce=moment()['milliseconds'](0x0),_0x293ec8=moment(_0x26a809)['milliseconds'](0x0);return _0x159bce[_0x835bd7('0xa7')](_0x293ec8,_0x835bd7('0x129'));}function ifInterval(_0x4e494b,_0x3624f9){const _0x11c6b1=_0x4831e9;if(_[_0x11c6b1('0x2b')](_0x3624f9))return![];return getDiff(_0x3624f9)<_0x4e494b*0x3c?!![]:![];}function freeVariablesPredictive(_0x5054dd){const _0x1b6590=_0x4831e9;isNotNull(_0x5054dd)&&(!_[_0x1b6590('0x2b')](_0x5054dd[_0x1b6590('0xb0')])&&(_0x5054dd['startProgressive']=undefined,loggerPredictive[_0x1b6590('0x185')](_0x5054dd[_0x1b6590('0xe')],_0x1b6590('0x10'))),!_[_0x1b6590('0x2b')](_0x5054dd['startPredictive'])&&(_0x5054dd[_0x1b6590('0xcc')]=undefined,loggerPredictive[_0x1b6590('0x185')](_0x5054dd[_0x1b6590('0xe')],_0x1b6590('0x1a'))),!_['isUndefined'](_0x5054dd[_0x1b6590('0x67')])&&(clearInterval(_0x5054dd[_0x1b6590('0x67')]),_0x5054dd['handlePredictive']=undefined,loggerPredictive[_0x1b6590('0x185')](_0x5054dd[_0x1b6590('0xe')],_0x1b6590('0x1e6'))));}function erlangb(_0x32f75c,_0x16cdac){if(_0x16cdac===0x0)return 0x0;let _0x191646=0x1;for(let _0x5f3ffb=0x1;_0x5f3ffb<=_0x16cdac;_0x5f3ffb+=0x1){_0x191646=0x1+_0x191646*_0x5f3ffb/_0x32f75c;}return 0x1/_0x191646;}function isVoiceQueueOutbound(_0xbbfa61){return _0xbbfa61==='outbound';}function isNotPreview(_0x77efd0){const _0x26a935=_0x4831e9;return _0x77efd0!==_0x26a935('0x1f7');}function isCampaignIvr(_0x5ce21d){const _0x816d08=_0x4831e9;return _0x5ce21d===_0x816d08('0xf4');}function getCallerId(_0x11a75e,_0x5ba00d,_0x3ee5d3){const _0x5c6c1e=_0x4831e9;if(!_[_0x5c6c1e('0x2b')](_0x3ee5d3)&&_0x5c6c1e('0x1a1')===typeof _0x3ee5d3&&!_[_0x5c6c1e('0xad')](_0x3ee5d3)){if(!_[_0x5c6c1e('0x2b')](_0x5ba00d)&&_0x5c6c1e('0x1a1')===typeof _0x5ba00d&&!_['isEmpty'](_0x5ba00d))return util['format'](_0x5c6c1e('0xde'),_0x5ba00d,_0x3ee5d3);return util['format']('\x22%s\x22\x20<%s>',_0x3ee5d3,_0x3ee5d3);}if(!_[_0x5c6c1e('0x2b')](_0x11a75e)&&'string'===typeof _0x11a75e&&!_[_0x5c6c1e('0xad')](_0x11a75e))return _0x11a75e;return _0x5c6c1e('0x7f');}function loggerCatchQueueSummary(_0x2fe555,_0x5ac5c6){return function(_0x1fd85d){const _0x155e25=a1056_0x337a;freeVariablesPredictive(_0x5ac5c6),emitVoiceQueueSummary(_0x5ac5c6),emitCampaignSummary(_0x5ac5c6),loggerSyncQueueSummary['error'](_0x2fe555,util[_0x155e25('0xda')](_0x1fd85d,{'showHidden':![],'depth':null}));};}function loggerCatchPredictive(_0x1ba57e,_0x59c8a4){return function(_0x534e23){const _0x12c066=a1056_0x337a;loggerPredictive[_0x12c066('0x29')](_0x59c8a4[_0x12c066('0xe')],_0x1ba57e),loggerPredictive[_0x12c066('0x29')](_0x534e23[_0x12c066('0xf0')]),freeVariablesPredictive(_0x59c8a4);};}function loggerCatch(_0xd2f7e5){return function(_0x48c21c){const _0x20b518=a1056_0x337a;logger[_0x20b518('0x29')](_0xd2f7e5,util[_0x20b518('0xda')](_0x48c21c,{'showHidden':![],'depth':null}));};}function checkContactEmpty(_0x3fb766){const _0x2b5c2d=_0x4831e9;return _0x3fb766&&!_[_0x2b5c2d('0x2b')](_0x3fb766)&&_0x3fb766[_0x2b5c2d('0x38')]>0x0;}function decremetOriginate(_0x5ac153){const _0x208a76=_0x4831e9;!_[_0x208a76('0x2b')](_0x5ac153)&&_0x5ac153!==null?typeof _0x5ac153['originated']!==_0x208a76('0x199')&&(_0x5ac153[_0x208a76('0x20e')]>0x0?_0x5ac153[_0x208a76('0x20e')]-=0x1:logger['error']('[decremetOriginate]\x20object\x20originated\x20is\x20negative')):logger[_0x208a76('0x29')](_0x208a76('0x1d6'));}function checkContactLowerLimitOriginate(_0x24654d,_0x3dfac8,_0x136a8c){if(_0x3dfac8>_0x136a8c)for(let _0x56e29f=0x0;_0x56e29f<_0x3dfac8-_0x136a8c;_0x56e29f+=0x1){decremetOriginate(_0x24654d);}}function loggerGetContactDialer(_0x26e9c6,_0x231ff6,_0x337e8e){return function(_0x2b4c85){const _0x41a22c=a1056_0x337a;checkContactLowerLimitOriginate(_0x231ff6,_0x337e8e,0x0),logger[_0x41a22c('0x29')](_0x26e9c6,util[_0x41a22c('0xda')](_0x2b4c85,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x9e97d2){return function(_0x564fbe){const _0x415a58=a1056_0x337a;isNotNull(_0x564fbe)&&isNotNull(_0x564fbe[0x0])&&(_0x564fbe[0x0][_0x415a58('0xd5')]>0x0?(_0x9e97d2[_0x415a58('0x1c9')]='RESCHEDULED_CONTACTS',logger['info'](_0x415a58('0x4a')+_0x9e97d2[_0x415a58('0xe')],_0x564fbe[0x0][_0x415a58('0xd5')],_0x415a58('0x188'))):(_0x9e97d2[_0x415a58('0x1c9')]=_0x415a58('0x19e'),logger[_0x415a58('0x185')](_0x415a58('0x117')+_0x9e97d2[_0x415a58('0xe')])));};}function notSendMessagesQueue(_0x45c4b5){const _0x57486e=_0x4831e9;_0x45c4b5[_0x57486e('0x125')]&&(freeVariablesPredictive(_0x45c4b5),_0x45c4b5[_0x57486e('0x20e')]===0x0&&_0x45c4b5[_0x57486e('0x12f')]===0x0&&_0x45c4b5['waiting']===0x0&&(_0x45c4b5[_0x57486e('0x19')]||0x0)===0x0?(_0x45c4b5[_0x57486e('0x125')]=![],_0x45c4b5[_0x57486e('0x11a')]=0x0,_0x45c4b5[_0x57486e('0x1c9')]=_0x57486e('0x17c'),loggerSyncQueueSummary[_0x57486e('0x29')](_0x57486e('0x109'),_0x45c4b5['name'],_0x57486e('0x139'))):(_0x45c4b5['message']=_0x57486e('0x150'),loggerSyncQueueSummary['error'](_0x57486e('0x109'),_0x45c4b5[_0x57486e('0xe')],_0x57486e('0xf7'))),emitVoiceQueueSummary(_0x45c4b5));}function notSendMessagesCampaign(_0x54d72a){const _0x285b2f=_0x4831e9;_0x54d72a[_0x285b2f('0x125')]&&(_0x54d72a[_0x285b2f('0x20e')]===0x0?(_0x54d72a[_0x285b2f('0x125')]=![],_0x54d72a[_0x285b2f('0x1c9')]=_0x285b2f('0x17c'),loggerSyncQueueSummary[_0x285b2f('0x29')](_0x285b2f('0x1cf'),_0x54d72a[_0x285b2f('0xe')],_0x285b2f('0x139'))):(_0x54d72a['message']=_0x285b2f('0x150'),loggerSyncQueueSummary['error'](_0x285b2f('0x1cf'),_0x54d72a[_0x285b2f('0xe')],_0x285b2f('0xf7'))),emitCampaignSummary(_0x54d72a));}function createObjHistory(_0x520e07,_0x45a65d,_0x3cd797,_0x3b6b4a,_0x4d5ad0){const _0x18d748=_0x4831e9;_0x520e07[_0x18d748('0x1c9')]=_0x3cd797;const _0x530775=new Action(_0x520e07,_0x45a65d),_0x1c4bc5=new History(_0x530775);return _0x1c4bc5['state']=_0x3b6b4a,_0x1c4bc5['statedesc']=_0x4d5ad0,_0x1c4bc5['endtime']=_0x530775[_0x18d748('0x161')],_0x1c4bc5;}Dialer[_0x4831e9('0x83')][_0x4831e9('0x4')]=function(){const _0x60aa57=this;setInterval(function(){const _0x57afc5=a1056_0x337a;_0x60aa57[_0x57afc5('0xe9')](_0x60aa57[_0x57afc5('0x20')],_0x57afc5('0x206')),_0x60aa57['clearZombieChannels'](_0x60aa57[_0x57afc5('0xea')],_0x57afc5('0x136'));},0x32c8);},Dialer[_0x4831e9('0x83')]['clearZombieChannels']=function(_0x3e0aaa,_0x4a0bbc){const _0x4eff8d=_0x4831e9,_0x11d062=this;for(const _0x577bcf in _0x3e0aaa){typeof _0x3e0aaa[_0x577bcf]!==_0x4eff8d('0x199')&&this[_0x4eff8d('0x71')][_0x4eff8d('0x25')](function(){const _0x257010=_0x4eff8d;if(!_[_0x257010('0x128')](_0x3e0aaa[_0x577bcf]))return ami[_0x257010('0x17f')]({'action':_0x257010('0x7a'),'channel':_0x3e0aaa[_0x577bcf][_0x257010('0x9d')]})[_0x257010('0xc6')](function(_0x3cad01){const _0x57b0fc=_0x257010;_0x3cad01[_0x57b0fc('0x1c9')]===_0x57b0fc('0x1e9')&&setTimeout(function(){const _0x462c46=_0x57b0fc;_0x3e0aaa[_0x577bcf]&&_0x3e0aaa[_0x577bcf][_0x462c46('0x1a8')]!==_0x462c46('0xf4')&&(_0x11d062[_0x462c46('0xe0')](_0x11d062[_0x462c46('0x141')][_0x3e0aaa[_0x577bcf]['queue']]),logger['error'](_0x462c46('0x1e5'),_0x4a0bbc,_0x577bcf,_0x3e0aaa[_0x577bcf]['queue']),delete _0x3e0aaa[_0x577bcf]),_0x3e0aaa[_0x577bcf]&&_0x3e0aaa[_0x577bcf][_0x462c46('0x1a8')]===_0x462c46('0xf4')&&(_0x11d062['updateOriginated'](_0x11d062[_0x462c46('0x98')][_0x3e0aaa[_0x577bcf][_0x462c46('0x65')]]),logger[_0x462c46('0x29')](_0x462c46('0x13c'),_0x4a0bbc,_0x577bcf,_0x3e0aaa[_0x577bcf][_0x462c46('0x65')]),delete _0x3e0aaa[_0x577bcf]);},0x2328);});});}},Dialer['prototype']['countReScheduled']=function(_0x4e6c3a){const _0x583e23=_0x4831e9;return Promise[_0x583e23('0xb5')]()[_0x583e23('0xa1')](cmHopper[_0x583e23('0xc5')](_0x4e6c3a))[_0x583e23('0xc6')](loggerCatch(_0x583e23('0x19c')));},Dialer[_0x4831e9('0x83')][_0x4831e9('0x123')]=function(_0x5750f0){const _0x5e6888=_0x4831e9;return Promise[_0x5e6888('0xb5')]()[_0x5e6888('0xa1')](cmHopperBlack[_0x5e6888('0x123')](_0x5750f0))[_0x5e6888('0xc6')](loggerCatch(_0x5e6888('0x1f1')));},Dialer[_0x4831e9('0x83')][_0x4831e9('0xd8')]=function(_0x14217e){const _0x35e6b7=_0x4831e9;return Promise['resolve']()[_0x35e6b7('0xa1')](cmHopperBlack[_0x35e6b7('0xd8')](_0x14217e))[_0x35e6b7('0xc6')](loggerCatch(_0x35e6b7('0x190')));},Dialer[_0x4831e9('0x83')][_0x4831e9('0x196')]=function(_0x7d70af){const _0x32af53=_0x4831e9;return Promise[_0x32af53('0xb5')]()[_0x32af53('0xa1')](cmHopperHistory['avgHandleTime'](_0x7d70af))[_0x32af53('0xc6')](loggerCatch(_0x32af53('0x7')));},Dialer[_0x4831e9('0x83')][_0x4831e9('0xff')]=function(_0x55f452){const _0x13e905=_0x4831e9;return Promise[_0x13e905('0xb5')]()[_0x13e905('0xa1')](cmHopper[_0x13e905('0xff')](_0x55f452))[_0x13e905('0xc6')](loggerCatch(_0x13e905('0x10c')));},Dialer[_0x4831e9('0x83')][_0x4831e9('0x1dd')]=function(_0x45f9bc,_0x3da92b,_0x43bbf1){const _0x3d75dd=_0x4831e9;return Promise[_0x3d75dd('0xb5')]()[_0x3d75dd('0xa1')](cmHopper[_0x3d75dd('0x1dd')](_0x45f9bc,_0x3da92b,_0x43bbf1))[_0x3d75dd('0xc6')](loggerCatch(_0x3d75dd('0x1c7')));},Dialer['prototype'][_0x4831e9('0x1de')]=function(_0x538299,_0x42d86c,_0x1f43c8,_0x4cdee5){const _0x4b3420=_0x4831e9;return Promise[_0x4b3420('0xb5')]()[_0x4b3420('0xa1')](cmHopper[_0x4b3420('0x1de')](_0x538299,_0x42d86c,_0x1f43c8,_0x4cdee5))[_0x4b3420('0xc6')](loggerCatch(_0x4b3420('0x11f')));},Dialer['prototype'][_0x4831e9('0x165')]=function(_0x172bbf,_0x103cd6,_0x4582e4){const _0x57a7dc=_0x4831e9;return Promise['resolve']()[_0x57a7dc('0xa1')](cmHopper[_0x57a7dc('0x165')](_0x172bbf,_0x103cd6,_0x4582e4))[_0x57a7dc('0xc6')](loggerCatch(_0x57a7dc('0x11f')));},Dialer[_0x4831e9('0x83')][_0x4831e9('0x6a')]=function(_0xe62e0f){const _0x23558c=_0x4831e9;return Promise['resolve']()['then'](voiceQueueRt[_0x23558c('0x6a')](_0xe62e0f))[_0x23558c('0xc6')](loggerCatch('[getVoiceQueueRtPauses]\x20'));},Dialer['prototype'][_0x4831e9('0x16a')]=function(_0x22bf3c){const _0x3b4eaf=_0x4831e9;return Promise[_0x3b4eaf('0xb5')]()['then'](cmHopper[_0x3b4eaf('0x16a')](_0x22bf3c))[_0x3b4eaf('0xc6')](loggerCatch(_0x3b4eaf('0x176')));},Dialer['prototype'][_0x4831e9('0x16b')]=function(_0x10ba92){const _0x40de56=_0x4831e9;return Promise[_0x40de56('0xb5')]()['then'](cmHopperHistory['createHistory'](_0x10ba92))[_0x40de56('0xc6')](loggerCatch('[createHistory]\x20'));},Dialer[_0x4831e9('0x83')][_0x4831e9('0xe0')]=function(_0x106dd6){const _0x357bc8=_0x4831e9;!_[_0x357bc8('0x2b')](_0x106dd6)&&_0x106dd6!==null?typeof _0x106dd6[_0x357bc8('0x20e')]!==_0x357bc8('0x199')&&(_0x106dd6[_0x357bc8('0x20e')]>0x0?_0x106dd6['originated']-=0x1:logger[_0x357bc8('0x29')](_0x357bc8('0x58'))):logger[_0x357bc8('0x29')]('[updateOriginated]\x20is\x20null\x20or\x20undefined');},Dialer[_0x4831e9('0x83')][_0x4831e9('0x151')]=function(_0x10821,_0x42db51){const _0x359636=this;return function(_0x1ad70e){const _0x5032d3=a1056_0x337a;_0x359636[_0x5032d3('0xe0')](_0x42db51),logger[_0x5032d3('0x29')](_0x10821,util['inspect'](_0x1ad70e,{'showHidden':![],'depth':null}));};},Dialer[_0x4831e9('0x83')][_0x4831e9('0x1a6')]=function(_0x3a761c,_0x123f08,_0x4cae3d){const _0x1d548c=_0x4831e9,_0x22efd9={'state':0x19,'statedesc':'notFound'};this['updateOriginated'](_0x123f08),this[_0x1d548c('0x44')](_[_0x1d548c('0x17d')](_0x22efd9,_['pick'](_0x4cae3d,[_0x1d548c('0xce'),'ListId',_0x1d548c('0x16d'),_0x1d548c('0x1c6'),_0x1d548c('0x70')])),'[emptyContact][createHistory]',_0x1d548c('0x95')),logger[_0x1d548c('0x29')](_0x3a761c);},Dialer[_0x4831e9('0x83')][_0x4831e9('0xbb')]=function(_0x5983ce){const _0x563246=_0x4831e9;return _0x5983ce===_0x563246('0x1af');},Dialer['prototype'][_0x4831e9('0x205')]=function(_0x3ef265){const _0x2cbb28=_0x4831e9;return!_[_0x2cbb28('0x2b')](_0x3ef265)&&_0x3ef265&&!_[_0x2cbb28('0x2b')](_0x3ef265[_0x2cbb28('0xe')])&&!_[_0x2cbb28('0x2b')](_0x3ef265[_0x2cbb28('0xe3')])&&_0x3ef265[_0x2cbb28('0xe3')]&&(this[_0x2cbb28('0x1e2')][util[_0x2cbb28('0xef')]('SIP/%s',_0x3ef265[_0x2cbb28('0xe')])]['status']==='reachable'||this['trunks'][util[_0x2cbb28('0xef')]('SIP/%s',_0x3ef265['name'])][_0x2cbb28('0x7a')]==='unmonitored');},Dialer[_0x4831e9('0x83')][_0x4831e9('0x44')]=function(_0x1216a1,_0x1bd37f,_0x5e5924){const _0x345ad1=_0x4831e9;this['createHistory'](_0x1216a1)[_0x345ad1('0xc6')](loggerCatch(_0x1bd37f)),this['moveContactManagedDialer'](_0x1216a1)[_0x345ad1('0xc6')](loggerCatch(_0x5e5924));},Dialer[_0x4831e9('0x83')]['syncVarSet']=function(_0x4c393a){const _0x1c3ca=_0x4831e9,_0x7a57ae=this[_0x1c3ca('0x20')][_0x4c393a[_0x1c3ca('0x23')]];let _0xc0ba1b;if(!_['isNil'](_0x4c393a)&&!_['isNil'](_0x4c393a[_0x1c3ca('0x9e')])&&!_[_0x1c3ca('0x128')](_0x4c393a[_0x1c3ca('0x9e')][_0x1c3ca('0x118')])&&_0x4c393a[_0x1c3ca('0x6e')]===_0x1c3ca('0x1cb')&&_0x7a57ae){_0x7a57ae[_0x1c3ca('0x1a8')]!==_0x1c3ca('0xf4')&&this['voiceQueues'][_0x7a57ae['queue']][_0x1c3ca('0x78')]&&_0x4c393a[_0x1c3ca('0x102')]===_0x1c3ca('0x163')&&(delete this[_0x1c3ca('0x20')][_0x4c393a[_0x1c3ca('0x23')]],this['updateOriginated'](this[_0x1c3ca('0x141')][_0x7a57ae[_0x1c3ca('0x65')]]),this['voiceQueues'][_0x7a57ae[_0x1c3ca('0x65')]]['outboundAnswerCallsDay']+=0x1,this[_0x1c3ca('0x141')][_0x7a57ae['queue']][_0x1c3ca('0x1ed')]+=0x1,_0xc0ba1b=new Hangup(_0x7a57ae,_0x4c393a),_0xc0ba1b['state']=0x12,_0xc0ba1b[_0x1c3ca('0x143')]='HangupInAMD',_0xc0ba1b[_0x1c3ca('0x1d8')]=_0x1c3ca('0x122'),this[_0x1c3ca('0x44')](_0xc0ba1b,'[syncHangupInAMD][createHistory]','[syncHangupInAMD]'));if(_0x7a57ae['type']!=='ivr'&&this['voiceQueues'][_0x7a57ae[_0x1c3ca('0x65')]]['dialAMDActive']&&_0x4c393a[_0x1c3ca('0x102')]===_0x1c3ca('0x48')){const _0x1aa50f=this;return new Promise(function(_0x4d5fbf,_0x12ce08){const _0x538d0e=_0x1c3ca;delete _0x1aa50f[_0x538d0e('0x20')][_0x4c393a['uniqueid']],_0x1aa50f[_0x538d0e('0xe0')](_0x1aa50f[_0x538d0e('0x141')][_0x7a57ae['queue']]),_0x1aa50f[_0x538d0e('0x141')][_0x7a57ae['queue']]['outboundAnswerCallsDay']+=0x1,_0x1aa50f[_0x538d0e('0x141')][_0x7a57ae[_0x538d0e('0x65')]]['outboundAnswerAgiCallsDay']+=0x1;const _0x4ece21=_0x1aa50f['voiceQueues'][_0x7a57ae[_0x538d0e('0x65')]],_0x46680d=new Hangup(_0x7a57ae,_0x4c393a);_0x46680d[_0x538d0e('0x1f5')]=0x13,_0x46680d[_0x538d0e('0x143')]=_0x538d0e('0x1d4'),_0x46680d[_0x538d0e('0x1d8')]=_0x538d0e('0x122'),_0x46680d[_0x538d0e('0x116')]+=0x1,_0x46680d[_0x538d0e('0x1a5')]+=0x1,_0x46680d[_0x538d0e('0x169')]=!![],_0x1aa50f[_0x538d0e('0x16b')](_0x46680d)[_0x538d0e('0xc6')](loggerCatch(_0x538d0e('0x1e0'))),_0x46680d[_0x538d0e('0x1d3')]+_0x46680d[_0x538d0e('0xe4')]+_0x46680d[_0x538d0e('0x26')]+_0x46680d['countnosuchnumberretry']+_0x46680d[_0x538d0e('0x119')]+_0x46680d[_0x538d0e('0x57')]+_0x46680d[_0x538d0e('0x116')]+_0x46680d[_0x538d0e('0x82')]>=_0x4ece21[_0x538d0e('0xa0')]?_0x1aa50f['stateGlobal'](_0x46680d,_0x4d5fbf,_0x12ce08,_0x538d0e('0x33')):_0x46680d[_0x538d0e('0x116')]>=_0x4ece21[_0x538d0e('0x15c')]?_0x1aa50f[_0x538d0e('0x34')](_0x46680d,_0x4d5fbf,_0x12ce08,_0x538d0e('0x14a')):(_0x1aa50f['rescheduleContact']({'active':![],'countmachineretry':_0x46680d[_0x538d0e('0x116')],'scheduledat':moment()[_0x538d0e('0x12a')](_0x4ece21[_0x538d0e('0x94')],_0x538d0e('0x0'))[_0x538d0e('0xef')](_0x538d0e('0xba')),'ContactId':_0x46680d[_0x538d0e('0xce')],'ListId':_0x46680d['ListId'],'VoiceQueueId':_0x46680d[_0x538d0e('0x1c6')]||undefined,'CampaignId':_0x46680d[_0x538d0e('0x70')]||undefined})[_0x538d0e('0xc6')](loggerCatch(_0x538d0e('0x126'))),_0x4d5fbf({'reschedule':0x1}));});}_0x7a57ae[_0x1c3ca('0x1a8')]===_0x1c3ca('0xf4')&&this[_0x1c3ca('0x98')][_0x7a57ae[_0x1c3ca('0x65')]][_0x1c3ca('0x78')]&&_0x4c393a[_0x1c3ca('0x102')]==='HANGUP'&&(delete this[_0x1c3ca('0x20')][_0x4c393a[_0x1c3ca('0x23')]],this[_0x1c3ca('0xe0')](this[_0x1c3ca('0x98')][_0x7a57ae[_0x1c3ca('0x65')]]),_0xc0ba1b=new Hangup(_0x7a57ae,_0x4c393a),_0xc0ba1b['state']=0x12,_0xc0ba1b['statedesc']='HangupInAMD',_0xc0ba1b[_0x1c3ca('0x1d8')]=_0x1c3ca('0x122'),this[_0x1c3ca('0x44')](_0xc0ba1b,_0x1c3ca('0x1a0'),_0x1c3ca('0x1d')));if(_0x7a57ae[_0x1c3ca('0x1a8')]===_0x1c3ca('0xf4')&&this[_0x1c3ca('0x98')][_0x7a57ae[_0x1c3ca('0x65')]][_0x1c3ca('0x78')]&&_0x4c393a[_0x1c3ca('0x102')]===_0x1c3ca('0x48')){const _0x13f1d3=this;return new Promise(function(_0x4070f8,_0x3baf8e){const _0x481bb7=_0x1c3ca;delete _0x13f1d3[_0x481bb7('0x20')][_0x4c393a[_0x481bb7('0x23')]],_0x13f1d3[_0x481bb7('0xe0')](_0x13f1d3[_0x481bb7('0x98')][_0x7a57ae[_0x481bb7('0x65')]]),_0x13f1d3[_0x481bb7('0x98')][_0x7a57ae['queue']][_0x481bb7('0x1b6')]+=0x1,_0x13f1d3['campaigns'][_0x7a57ae[_0x481bb7('0x65')]][_0x481bb7('0x1ed')]+=0x1;const _0x4dd7e2=_0x13f1d3[_0x481bb7('0x98')][_0x7a57ae[_0x481bb7('0x65')]],_0x405bd5=new Hangup(_0x7a57ae,_0x4c393a);_0x405bd5[_0x481bb7('0x1f5')]=0x13,_0x405bd5[_0x481bb7('0x143')]=_0x481bb7('0x1d4'),_0x405bd5[_0x481bb7('0x1d8')]=_0x481bb7('0x122'),_0x405bd5[_0x481bb7('0x116')]+=0x1,_0x405bd5[_0x481bb7('0x1a5')]+=0x1,_0x405bd5['amd']=!![],_0x13f1d3[_0x481bb7('0x16b')](_0x405bd5)[_0x481bb7('0xc6')](loggerCatch(_0x481bb7('0x1e0'))),_0x405bd5['countbusyretry']+_0x405bd5['countcongestionretry']+_0x405bd5[_0x481bb7('0x26')]+_0x405bd5['countnosuchnumberretry']+_0x405bd5['countdropretry']+_0x405bd5['countabandonedretry']+_0x405bd5[_0x481bb7('0x116')]+_0x405bd5['countagentrejectretry']>=_0x4dd7e2[_0x481bb7('0xa0')]?_0x13f1d3[_0x481bb7('0x1bb')](_0x405bd5,_0x4070f8,_0x3baf8e,_0x481bb7('0x33')):_0x405bd5[_0x481bb7('0x116')]>=_0x4dd7e2[_0x481bb7('0x15c')]?_0x13f1d3[_0x481bb7('0x34')](_0x405bd5,_0x4070f8,_0x3baf8e,_0x481bb7('0x14a')):(_0x13f1d3[_0x481bb7('0xff')]({'active':![],'countmachineretry':_0x405bd5[_0x481bb7('0x116')],'scheduledat':moment()[_0x481bb7('0x12a')](_0x4dd7e2['dialMachineRetryFrequency'],_0x481bb7('0x0'))[_0x481bb7('0xef')](_0x481bb7('0xba')),'ContactId':_0x405bd5[_0x481bb7('0xce')],'ListId':_0x405bd5[_0x481bb7('0x77')],'VoiceQueueId':_0x405bd5[_0x481bb7('0x1c6')]||undefined,'CampaignId':_0x405bd5[_0x481bb7('0x70')]||undefined})[_0x481bb7('0xc6')](loggerCatch(_0x481bb7('0x126'))),_0x4070f8({'reschedule':0x1}));});}}},Dialer[_0x4831e9('0x83')][_0x4831e9('0xe8')]=function(_0x459193){const _0x9e151a=_0x4831e9,_0x1d31ea=this[_0x9e151a('0x20')][_0x459193[_0x9e151a('0x23')]];let _0x2b6b18;_0x1d31ea&&_0x1d31ea[_0x9e151a('0x1a8')]===_0x9e151a('0xf4')&&(delete this[_0x9e151a('0x20')][_0x459193[_0x9e151a('0x23')]],this[_0x9e151a('0xe0')](this[_0x9e151a('0x98')][_0x1d31ea[_0x9e151a('0x65')]]),this[_0x9e151a('0x98')][_0x1d31ea['queue']][_0x9e151a('0x11')]+=0x1,_0x2b6b18=new Hangup(_0x1d31ea,_0x459193),this[_0x9e151a('0x16b')](_0x2b6b18)['catch'](loggerCatch(_0x9e151a('0x93'))),this[_0x9e151a('0x16a')](_0x2b6b18)['catch'](loggerCatch(_0x9e151a('0xab')))),_0x1d31ea&&_0x1d31ea['type']!==_0x9e151a('0xf4')&&isNotNull(this[_0x9e151a('0x141')][_0x1d31ea[_0x9e151a('0x65')]][_0x9e151a('0x4b')])&&(delete this['uniqueId'][_0x459193[_0x9e151a('0x23')]],this[_0x9e151a('0xe0')](this[_0x9e151a('0x141')][_0x1d31ea[_0x9e151a('0x65')]]),this['voiceQueues'][_0x1d31ea[_0x9e151a('0x65')]][_0x9e151a('0x1b6')]+=0x1,this['voiceQueues'][_0x1d31ea[_0x9e151a('0x65')]][_0x9e151a('0x1ed')]+=0x1,_0x2b6b18=new Hangup(_0x1d31ea,_0x459193),_0x2b6b18[_0x9e151a('0x1f5')]=0x10,_0x2b6b18[_0x9e151a('0x143')]=_0x9e151a('0x127'),_0x2b6b18[_0x9e151a('0x1d8')]=_0x9e151a('0x18e'),this['createHistory'](_0x2b6b18)[_0x9e151a('0xc6')](loggerCatch(_0x9e151a('0x93'))),this[_0x9e151a('0x16a')](_0x2b6b18)['catch'](loggerCatch('[syncHangupIvr]'))),_0x1d31ea&&_0x1d31ea[_0x9e151a('0x1a8')]!==_0x9e151a('0xf4')&&!isNotNull(this[_0x9e151a('0x141')][_0x1d31ea[_0x9e151a('0x65')]][_0x9e151a('0x4b')])&&(delete this['uniqueId'][_0x459193[_0x9e151a('0x23')]],this[_0x9e151a('0xe0')](this[_0x9e151a('0x141')][_0x1d31ea[_0x9e151a('0x65')]]),this[_0x9e151a('0x141')][_0x1d31ea[_0x9e151a('0x65')]]['outboundUnknownCallsDay']+=0x1,_0x2b6b18=new Hangup(_0x1d31ea,_0x459193),_0x2b6b18[_0x9e151a('0x1f5')]=0xc,_0x2b6b18[_0x9e151a('0x143')]=_0x459193[_0x9e151a('0x103')],_0x2b6b18[_0x9e151a('0x1d8')]=_0x9e151a('0x1bc'),this[_0x9e151a('0x16b')](_0x2b6b18)[_0x9e151a('0xc6')](loggerCatch('[syncHangupIvr][createHistory]')),this[_0x9e151a('0x16a')](_0x2b6b18)[_0x9e151a('0xc6')](loggerCatch(_0x9e151a('0xab'))));},Dialer[_0x4831e9('0x83')]['syncAgentComplete']=function(_0x15c2c3){const _0x53c328=_0x4831e9,_0x103e60=this[_0x53c328('0x20')][_0x15c2c3[_0x53c328('0x23')]];if(this[_0x53c328('0x141')][_0x15c2c3[_0x53c328('0x65')]]){if(_0x103e60&&_0x103e60[_0x53c328('0x1a8')]!==_0x53c328('0xf4')){delete this[_0x53c328('0x20')][_0x15c2c3[_0x53c328('0x23')]],this['voiceQueues'][_0x15c2c3[_0x53c328('0x65')]][_0x53c328('0x1b6')]+=0x1;const _0x11eb5f=new AgentComplete(_0x103e60,_0x15c2c3);_0x15c2c3['reason']===_0x53c328('0x1ab')&&(_0x11eb5f[_0x53c328('0x7d')]=this['voiceQueues'][_0x15c2c3[_0x53c328('0x65')]][_0x53c328('0x2')]&&this['voiceQueues'][_0x15c2c3['queue']][_0x53c328('0x14')]?moment()[_0x53c328('0xef')](_0x53c328('0xba')):undefined),this[_0x53c328('0x16b')](_0x11eb5f)['catch'](loggerCatch(_0x53c328('0x18f'))),this[_0x53c328('0x16a')](_0x11eb5f)[_0x53c328('0xc6')](loggerCatch(_0x53c328('0x1bf')));}}},Dialer[_0x4831e9('0x83')][_0x4831e9('0x204')]=function(_0x9d981d){const _0x25e9aa=_0x4831e9;this['voiceQueues'][_0x9d981d[_0x25e9aa('0x65')]]&&(this['uniqueId'][_0x9d981d[_0x25e9aa('0x23')]]&&this['uniqueId'][_0x9d981d[_0x25e9aa('0x23')]][_0x25e9aa('0x1a8')]!==_0x25e9aa('0xf4')&&(this[_0x25e9aa('0xe0')](this['voiceQueues'][_0x9d981d['queue']]),this[_0x25e9aa('0x20')][_0x9d981d[_0x25e9aa('0x23')]]['answertime']=moment()[_0x25e9aa('0xef')](_0x25e9aa('0xba'))));},Dialer[_0x4831e9('0x83')][_0x4831e9('0x1dc')]=function(_0x2019f7){const _0x269c4f=_0x4831e9;this[_0x269c4f('0x16b')](_0x2019f7)['catch'](loggerCatch(_0x269c4f('0x18f'))),this[_0x269c4f('0x16a')](_0x2019f7)[_0x269c4f('0xc6')](loggerCatch(_0x269c4f('0x2a')));},Dialer[_0x4831e9('0x83')][_0x4831e9('0x148')]=function(_0x809e39){const _0x4ac5a3=_0x4831e9,_0x5b59a6=this['uniqueId'][_0x809e39[_0x4ac5a3('0x23')]];if(this[_0x4ac5a3('0x141')][_0x809e39[_0x4ac5a3('0x65')]]){if(_0x5b59a6&&_0x5b59a6['type']!==_0x4ac5a3('0xf4')){delete this['uniqueId'][_0x809e39[_0x4ac5a3('0x23')]],this[_0x4ac5a3('0xe0')](this[_0x4ac5a3('0x141')][_0x809e39['queue']]),_0x5b59a6[_0x4ac5a3('0x73')]=moment()['format'](_0x4ac5a3('0xba'));const _0x494059=new QueueCallerAbandon(_0x5b59a6,_0x809e39);if(getSeconds(_0x5b59a6[_0x4ac5a3('0x73')],_0x5b59a6['responsetime'])>=_0x5b59a6[_0x4ac5a3('0x18a')]){this[_0x4ac5a3('0x141')][_0x809e39[_0x4ac5a3('0x65')]][_0x4ac5a3('0x1b0')]+=0x1,this[_0x4ac5a3('0x141')][_0x809e39[_0x4ac5a3('0x65')]]['outboundDropCallsDayTimeout']+=0x1,this[_0x4ac5a3('0x141')][_0x809e39['queue']][_0x4ac5a3('0xfa')]+=0x1,_0x494059[_0x4ac5a3('0x1f5')]=0xa,_0x494059[_0x4ac5a3('0x143')]=_0x4ac5a3('0xc2'),_0x494059[_0x4ac5a3('0x174')]='TIMEOUT',_0x494059['agiafterat']=this[_0x4ac5a3('0x141')][_0x809e39[_0x4ac5a3('0x65')]]['dialQueueProject2']?moment()['format'](_0x4ac5a3('0xba')):undefined,_0x494059['countdropretry']+=0x1,_0x494059[_0x4ac5a3('0x1a5')]+=0x1;if(_0x494059[_0x4ac5a3('0x119')]>=this[_0x4ac5a3('0x141')][_0x809e39[_0x4ac5a3('0x65')]][_0x4ac5a3('0x42')])this[_0x4ac5a3('0x1dc')](_0x494059);else{this['rescheduleContact']({'active':![],'countdropretry':_0x494059[_0x4ac5a3('0x119')],'scheduledat':moment()[_0x4ac5a3('0x12a')](this[_0x4ac5a3('0x141')][_0x809e39[_0x4ac5a3('0x65')]][_0x4ac5a3('0x6d')],_0x4ac5a3('0x0'))[_0x4ac5a3('0xef')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x5b59a6[_0x4ac5a3('0xce')],'ListId':_0x5b59a6[_0x4ac5a3('0x77')],'VoiceQueueId':_0x5b59a6[_0x4ac5a3('0x1c6')]||undefined,'CampaignId':_0x5b59a6[_0x4ac5a3('0x70')]||undefined})[_0x4ac5a3('0xc6')](loggerCatch(_0x4ac5a3('0xb1')));const _0x62b8c1=new History(_0x494059);_0x62b8c1[_0x4ac5a3('0x1f5')]=0xa,_0x62b8c1[_0x4ac5a3('0x143')]='Drop',_0x62b8c1['starttime']=moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),_0x62b8c1[_0x4ac5a3('0x22')]=_0x62b8c1[_0x4ac5a3('0x161')],_0x62b8c1[_0x4ac5a3('0x62')]=_0x494059['calleridname'],_0x62b8c1[_0x4ac5a3('0x9')]=_0x494059[_0x4ac5a3('0x9')],this[_0x4ac5a3('0x16b')](_0x62b8c1)[_0x4ac5a3('0xc6')](loggerCatch(_0x4ac5a3('0xb3')));}}else{this[_0x4ac5a3('0x141')][_0x809e39[_0x4ac5a3('0x65')]]['predictiveIntervalDroppedCallsCallersExit']+=0x1,this[_0x4ac5a3('0x141')][_0x809e39[_0x4ac5a3('0x65')]][_0x4ac5a3('0x179')]+=0x1,_0x494059[_0x4ac5a3('0x1f5')]=0xb,_0x494059[_0x4ac5a3('0x143')]=_0x4ac5a3('0x87'),_0x494059['dropreason']='CALLEREXIT',_0x494059['countabandonedretry']+=0x1,_0x494059[_0x4ac5a3('0x1a5')]+=0x1;if(_0x494059['countabandonedretry']>=this[_0x4ac5a3('0x141')][_0x809e39[_0x4ac5a3('0x65')]][_0x4ac5a3('0x19b')])this[_0x4ac5a3('0x1dc')](_0x494059);else{this['rescheduleContact']({'active':![],'countabandonedretry':_0x494059['countabandonedretry'],'scheduledat':moment()[_0x4ac5a3('0x12a')](this[_0x4ac5a3('0x141')][_0x809e39[_0x4ac5a3('0x65')]][_0x4ac5a3('0x6f')],'minutes')[_0x4ac5a3('0xef')](_0x4ac5a3('0xba')),'ContactId':_0x5b59a6['ContactId'],'ListId':_0x5b59a6[_0x4ac5a3('0x77')],'VoiceQueueId':_0x5b59a6[_0x4ac5a3('0x1c6')]||undefined,'CampaignId':_0x5b59a6[_0x4ac5a3('0x70')]||undefined})[_0x4ac5a3('0xc6')](loggerCatch(_0x4ac5a3('0x4f')));const _0x6182c7=new History(_0x494059);_0x6182c7[_0x4ac5a3('0x1f5')]=0xb,_0x6182c7[_0x4ac5a3('0x143')]=_0x4ac5a3('0x87'),_0x6182c7[_0x4ac5a3('0x161')]=moment()[_0x4ac5a3('0xef')](_0x4ac5a3('0xba')),_0x6182c7['endtime']=_0x6182c7[_0x4ac5a3('0x161')],_0x6182c7['calleridname']=_0x494059[_0x4ac5a3('0x62')],_0x6182c7[_0x4ac5a3('0x9')]=_0x494059[_0x4ac5a3('0x9')],this['createHistory'](_0x6182c7)[_0x4ac5a3('0xc6')](loggerCatch(_0x4ac5a3('0x99')));}}}}},Dialer[_0x4831e9('0x83')][_0x4831e9('0xf2')]=function(_0x33cf3a){const _0x347723=_0x4831e9;this[_0x347723('0xea')][_0x33cf3a[_0x347723('0x23')]]&&(this[_0x347723('0xea')][_0x33cf3a[_0x347723('0x23')]][_0x347723('0x9d')]=_0x33cf3a[_0x347723('0x9d')]),this[_0x347723('0x20')][_0x33cf3a['uniqueid']]&&(this[_0x347723('0x20')][_0x33cf3a['uniqueid']][_0x347723('0x9d')]=_0x33cf3a[_0x347723('0x9d')]);},Dialer[_0x4831e9('0x83')]['syncQueueMember']=function(_0x2f176a){const _0x2b9a86=_0x4831e9;if(strategy[this['voiceQueues'][this[_0x2b9a86('0xea')][_0x2f176a[_0x2b9a86('0xc0')]][_0x2b9a86('0x65')]]['strategy']]===_0x2b9a86('0x1e1'))this[_0x2b9a86('0xea')][_0x2f176a[_0x2b9a86('0xc0')]]&&_[_0x2b9a86('0x128')](this[_0x2b9a86('0xea')][_0x2f176a[_0x2b9a86('0xc0')]][_0x2b9a86('0x4d')])&&_0x2f176a[_0x2b9a86('0x7a')]==='1'&&_0x2f176a[_0x2b9a86('0xcd')]==='0'&&(this['agents'][_0x2f176a[_0x2b9a86('0x8c')]]&&(!this[_0x2b9a86('0x182')][_0x2f176a[_0x2b9a86('0x8c')]][_0x2b9a86('0x4d')]&&(this[_0x2b9a86('0x182')][_0x2f176a[_0x2b9a86('0x8c')]]['locked']=!![],this['actions'][_0x2f176a[_0x2b9a86('0xc0')]]['locked']=!![],this[_0x2b9a86('0xea')][_0x2f176a[_0x2b9a86('0xc0')]][_0x2b9a86('0x8c')]=_0x2f176a['stateinterface'])));else(strategy[this[_0x2b9a86('0x141')][this[_0x2b9a86('0xea')][_0x2f176a[_0x2b9a86('0xc0')]][_0x2b9a86('0x65')]]['strategy']]||'rrmemory')===_0x2b9a86('0x4e')&&(this[_0x2b9a86('0xea')][_0x2f176a[_0x2b9a86('0xc0')]]&&(this[_0x2b9a86('0x182')][_0x2f176a['stateinterface']]&&(this['actions'][_0x2f176a[_0x2b9a86('0xc0')]][_0x2b9a86('0x8c')]=_0x2f176a[_0x2b9a86('0x8c')],_[_0x2b9a86('0x128')](this[_0x2b9a86('0x39')][this[_0x2b9a86('0xea')][_0x2f176a['actionid']][_0x2b9a86('0x65')]])&&(this[_0x2b9a86('0x39')][this[_0x2b9a86('0xea')][_0x2f176a['actionid']]['queue']]=[]),this[_0x2b9a86('0x39')][this[_0x2b9a86('0xea')][_0x2f176a['actionid']][_0x2b9a86('0x65')]][_0x2b9a86('0x15')](_[_0x2b9a86('0x17d')](_[_0x2b9a86('0x3a')](this[_0x2b9a86('0xea')][_0x2f176a['actionid']],['idHopper',_0x2b9a86('0x8c')]),{'status':_0x2f176a[_0x2b9a86('0x7a')],'paused':_0x2f176a[_0x2b9a86('0xcd')]})))));};function unlockQueueStatus(_0x11baf2,_0x576803){setTimeout(function(){const _0x51e13b=a1056_0x337a;_[_0x51e13b('0x2b')](_0x11baf2[_0x51e13b('0x1e7')])&&loggerBooked['error'](_0x51e13b('0x79'),_0x576803),_0x11baf2[_0x51e13b('0x1e7')]=!![],loggerBooked[_0x51e13b('0x185')]('[booked][unlockQueueStatus]',_0x576803,JSON[_0x51e13b('0x3b')](_[_0x51e13b('0x3a')](_0x11baf2,[_0x51e13b('0xe'),'queueStatusComplete'])));},0x1f3);}Dialer['prototype'][_0x4831e9('0x100')]=function(_0x4597dd){const _0x1c7972=_0x4831e9,_0xf2e7af=this,_0x1fed5c=_0xf2e7af['voiceQueues'][_0xf2e7af['actions'][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0x65')]];if(strategy[this[_0x1c7972('0x141')][this['actions'][_0x4597dd['actionid']][_0x1c7972('0x65')]]['strategy']]===_0x1c7972('0x1e1'))this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]]&&this[_0x1c7972('0xea')][_0x4597dd['actionid']][_0x1c7972('0x8c')]?this[_0x1c7972('0x1f7')]['run'](this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0xa4')],this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]]['stateinterface'])[_0x1c7972('0xc6')](function(_0x4e2660){const _0x2eebe1=_0x1c7972;logger[_0x2eebe1('0x29')](_0x2eebe1('0x1b'),util['inspect'](_0x4e2660,{'showHidden':![],'depth':null}));})['finally'](function(){const _0x37b6cc=_0x1c7972;_0xf2e7af[_0x37b6cc('0xe0')](_0xf2e7af[_0x37b6cc('0x141')][_0xf2e7af[_0x37b6cc('0xea')][_0x4597dd[_0x37b6cc('0xc0')]][_0x37b6cc('0x65')]]),_0xf2e7af['agents'][_0xf2e7af[_0x37b6cc('0xea')][_0x4597dd['actionid']][_0x37b6cc('0x8c')]]['locked']=![],delete _0xf2e7af[_0x37b6cc('0xea')][_0x4597dd[_0x37b6cc('0xc0')]],unlockQueueStatus(_0x1fed5c);}):(this[_0x1c7972('0xe0')](this['voiceQueues'][this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0x65')]]),this[_0x1c7972('0xff')]({'active':![],'ContactId':this['actions'][_0x4597dd[_0x1c7972('0xc0')]]['ContactId'],'ListId':this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0x77')],'VoiceQueueId':this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0x1c6')]||undefined,'CampaignId':this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]]['CampaignId']||undefined})[_0x1c7972('0xc6')](loggerCatch(_0x1c7972('0xb7'))),delete this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]],unlockQueueStatus(_0x1fed5c));else{if((strategy[this['voiceQueues'][this[_0x1c7972('0xea')][_0x4597dd['actionid']][_0x1c7972('0x65')]][_0x1c7972('0x135')]]||_0x1c7972('0x4e'))===_0x1c7972('0x4e')){let _0x48cb18;if(this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]]&&!_['isEmpty'](this[_0x1c7972('0x39')][this[_0x1c7972('0xea')][_0x4597dd['actionid']][_0x1c7972('0x65')]])){this[_0x1c7972('0x14d')][_0xf2e7af[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0x65')]]&&(this[_0x1c7972('0x14d')][_0xf2e7af[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0x65')]]=this['queueBookedRR'][this['actions'][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0x65')]]?this[_0x1c7972('0x14d')][this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0x65')]]:this[_0x1c7972('0x39')][this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]]['queue']]?this[_0x1c7972('0x39')][this['actions'][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0x65')]][_0x1c7972('0x2d')]||0x0:0x0);this[_0x1c7972('0x39')][this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]]['queue']][_0x1c7972('0x2d')]=this[_0x1c7972('0x14d')][this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0x65')]];for(let _0x1b82e7=0x0;_0x1b82e7<this['queueBooked'][this[_0x1c7972('0xea')][_0x4597dd['actionid']]['queue']][_0x1c7972('0x38')];_0x1b82e7+=0x1){_0x48cb18=rr(this['queueBooked'][this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0x65')]]),this[_0x1c7972('0x14d')][_0xf2e7af[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]]['queue']]=this[_0x1c7972('0x39')][this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0x65')]][_0x1c7972('0x2d')];if(_0x48cb18[_0x1c7972('0x7a')]==='1'&&_0x48cb18[_0x1c7972('0xcd')]==='0')break;}!_[_0x1c7972('0x128')](_0x48cb18)&&(this['agents'][_0x48cb18[_0x1c7972('0x8c')]][_0x1c7972('0x104')]=_[_0x1c7972('0x2b')](this[_0x1c7972('0x182')][_0x48cb18[_0x1c7972('0x8c')]][_0x1c7972('0x104')])?!![]:this[_0x1c7972('0x182')][_0x48cb18[_0x1c7972('0x8c')]][_0x1c7972('0x104')]),loggerBooked[_0x1c7972('0x185')](_0x1c7972('0x1fe'),_0x4597dd['actionid'],_0x1c7972('0x178'),JSON['stringify'](_[_0x1c7972('0x3a')](this[_0x1c7972('0x182')][_0x48cb18[_0x1c7972('0x8c')]],['name',_0x1c7972('0x104')])),_0x1c7972('0xc1'),JSON[_0x1c7972('0x3b')](_0x48cb18[_0x1c7972('0xa4')])),!_[_0x1c7972('0x128')](_0x48cb18)&&_0x48cb18[_0x1c7972('0x7a')]==='1'&&_0x48cb18['paused']==='0'&&this[_0x1c7972('0x182')][_0x48cb18[_0x1c7972('0x8c')]][_0x1c7972('0x104')]?(this['agents'][_0x48cb18['stateinterface']][_0x1c7972('0x104')]=![],this['queueBooked'][_0xf2e7af[_0x1c7972('0xea')][_0x4597dd['actionid']][_0x1c7972('0x65')]]=[],this[_0x1c7972('0x1f7')][_0x1c7972('0x2f')](_0x48cb18[_0x1c7972('0xa4')],_0x48cb18[_0x1c7972('0x8c')])['catch'](function(_0x355d3e){const _0x16ea6e=_0x1c7972;logger[_0x16ea6e('0x29')](_0x16ea6e('0x1b'),util[_0x16ea6e('0xda')](_0x355d3e,{'showHidden':![],'depth':null}));})[_0x1c7972('0x18')](function(){const _0x19f645=_0x1c7972;_0xf2e7af[_0x19f645('0xe0')](_0xf2e7af['voiceQueues'][_0xf2e7af['actions'][_0x4597dd[_0x19f645('0xc0')]][_0x19f645('0x65')]]),setTimeout(function(){const _0x3b1953=_0x19f645;_0xf2e7af[_0x3b1953('0x182')][_0x48cb18[_0x3b1953('0x8c')]][_0x3b1953('0x104')]=!![],loggerBooked[_0x3b1953('0x185')](_0x3b1953('0x207'),_0x4597dd[_0x3b1953('0xc0')],'Agent:\x20',JSON[_0x3b1953('0x3b')](_[_0x3b1953('0x3a')](_0xf2e7af['agents'][_0x48cb18[_0x3b1953('0x8c')]],[_0x3b1953('0xe'),_0x3b1953('0x104')])),'contactAgent-idHopper:\x20',JSON['stringify'](_0x48cb18[_0x3b1953('0xa4')]));},0xc7),delete _0xf2e7af[_0x19f645('0xea')][_0x4597dd[_0x19f645('0xc0')]],unlockQueueStatus(_0x1fed5c,_0x4597dd[_0x19f645('0xc0')]);})):(loggerBooked[_0x1c7972('0x185')](_0x1c7972('0x1df')),this[_0x1c7972('0xe0')](this['voiceQueues'][this['actions'][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0x65')]]),this['rescheduleContact']({'active':![],'ContactId':this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0xce')],'ListId':this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0x77')],'VoiceQueueId':this['actions'][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0x1c6')]||undefined,'CampaignId':this[_0x1c7972('0xea')][_0x4597dd['actionid']][_0x1c7972('0x70')]||undefined})[_0x1c7972('0xc6')](loggerCatch(_0x1c7972('0xb7'))),delete this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]],unlockQueueStatus(_0x1fed5c));}else loggerBooked[_0x1c7972('0x185')]('[booked][unlock2]'),this[_0x1c7972('0xe0')](this[_0x1c7972('0x141')][this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0x65')]]),this['rescheduleContact']({'active':![],'ContactId':this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0xce')],'ListId':this['actions'][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0x77')],'VoiceQueueId':this[_0x1c7972('0xea')][_0x4597dd['actionid']][_0x1c7972('0x1c6')]||undefined,'CampaignId':this['actions'][_0x4597dd[_0x1c7972('0xc0')]]['CampaignId']||undefined})['catch'](loggerCatch('[unlock2][syncQueueStatusComplete]')),delete this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]],unlockQueueStatus(_0x1fed5c);}else loggerBooked[_0x1c7972('0x185')](_0x1c7972('0x120')),this[_0x1c7972('0xe0')](this['voiceQueues'][this['actions'][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0x65')]]),this[_0x1c7972('0xff')]({'active':![],'ContactId':this[_0x1c7972('0xea')][_0x4597dd['actionid']][_0x1c7972('0xce')],'ListId':this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]]['ListId'],'VoiceQueueId':this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]][_0x1c7972('0x1c6')]||undefined,'CampaignId':this['actions'][_0x4597dd['actionid']][_0x1c7972('0x70')]||undefined})[_0x1c7972('0xc6')](loggerCatch('[unlock3][syncQueueStatusComplete]')),delete this[_0x1c7972('0xea')][_0x4597dd[_0x1c7972('0xc0')]],unlockQueueStatus(_0x1fed5c);}},Dialer[_0x4831e9('0x83')][_0x4831e9('0x111')]=function(){const _0x42123a=this;setInterval(function(){const _0x388d77=a1056_0x337a;_0x42123a[_0x388d77('0xe2')]();},0x3e8);},Dialer[_0x4831e9('0x83')]['checkIsTrunkReachable']=function(_0x42014f){const _0x4a3ff4=this;return function(){const _0x217f9c=a1056_0x337a;if(!_0x4a3ff4['isTrunkReachable'](_0x42014f[_0x217f9c('0x170')])){if(!_0x4a3ff4[_0x217f9c('0x205')](_0x42014f['TrunkBackup'])){_0x42014f[_0x217f9c('0x1c9')]=_0x217f9c('0x1d9');throw _0x42014f[_0x217f9c('0xe')]+_0x217f9c('0x17b');}}};},Dialer[_0x4831e9('0x83')][_0x4831e9('0x155')]=function(_0x140cfd,_0x2f0aa6,_0x2a583d,_0x45be1a){const _0x214263=this;return function(){const _0x116b73=!![];return _0x214263['ifTime'](_0x140cfd,_0x2f0aa6,_0x2a583d,_0x45be1a,_0x116b73);};},Dialer['prototype'][_0x4831e9('0x171')]=function(_0x6099a9,_0x30e58b,_0x1492e8,_0x203fd4){const _0x242241=this;return function(){const _0x4e9986=a1056_0x337a,_0x244d95=![];return _0x242241[_0x4e9986('0x10d')](_0x6099a9[_0x4e9986('0x41')],_0x30e58b,_0x1492e8,_0x203fd4,_0x244d95);};},Dialer[_0x4831e9('0x83')][_0x4831e9('0x10d')]=function(_0x3d2401,_0x2b0d30,_0x350332,_0x44e997,_0x1d9d7b){const _0x38f4f8=[];return new Promise(function(_0x2496c1,_0x3c45b8){const _0x36b917=a1056_0x337a;if(!isNotNull(_0x3d2401))return _0x44e997[_0x36b917('0x1c9')]=_0x36b917('0xb6'),_0x3c45b8(msgResponse(_0x36b917('0x10d'),_0x36b917('0xb2'),_0x350332+_0x36b917('0x17e')));if(_[_0x36b917('0xad')](_0x3d2401))return _0x44e997[_0x36b917('0x1c9')]=_0x36b917('0xc4'),_0x3c45b8(msgResponse('ifTime',_0x36b917('0xb2'),_0x350332+_0x36b917('0x124')));if(_0x2b0d30&&_[_0x36b917('0x2b')](config[_0x36b917('0x1ca')][_0x2b0d30]))return _0x44e997['message']=_0x36b917('0xf'),_0x3c45b8(msgResponse(_0x36b917('0x10d'),'Failure',_0x350332+_0x36b917('0xc')+_0x2b0d30));if(_[_0x36b917('0x154')](_0x3d2401))for(let _0x5a2724=0x0;_0x5a2724<_0x3d2401[_0x36b917('0x38')];_0x5a2724+=0x1){_0x38f4f8[_0x36b917('0x15')](ami['Action']({'action':_0x36b917('0x13d'),'command':util['format'](_0x36b917('0x1f'),_0x3d2401[_0x5a2724][_0x36b917('0x187')],!_[_0x36b917('0x2b')](config[_0x36b917('0x1ca')][_0x2b0d30])?_0x2b0d30:'')})['then'](function(_0x58bcba){const _0x145a82=_0x36b917;return _0x58bcba[_0x145a82('0x1ac')][_0x145a82('0x203')]('true')>=0x0?!![]:![];})[_0x36b917('0xc6')](myreject(_0x3c45b8)));}else _0x38f4f8[_0x36b917('0x15')](ami['Action']({'action':_0x36b917('0x13d'),'command':util['format'](_0x36b917('0x1f'),_0x3d2401,!_[_0x36b917('0x2b')](config['timezones'][_0x2b0d30])?_0x2b0d30:'')})[_0x36b917('0xa1')](function(_0x2028b5){const _0x33470e=_0x36b917;return _0x2028b5[_0x33470e('0x1ac')]['indexOf'](_0x33470e('0xaf'))>=0x0?!![]:![];})[_0x36b917('0xc6')](myreject(_0x3c45b8)));Promise[_0x36b917('0x3f')](_0x38f4f8)[_0x36b917('0xa1')](function(_0x150520){const _0x4c9f60=_0x36b917,_0x296f8b=_['some'](_0x150520);return _0x296f8b?_0x2496c1(_0x296f8b):(_0x44e997[_0x4c9f60('0x1c9')]=_0x1d9d7b?'GLOBAL_INTERVAL_IS_OVERTIME':_0x4c9f60('0xee'),_0x3c45b8(msgResponse('[ifTime][promiseAll]',_0x4c9f60('0xb2'),_0x4c9f60('0x1c5')+_0x1d9d7b+'\x20'+_0x350332+_0x4c9f60('0xed')+util[_0x4c9f60('0xda')](_0x3d2401,{'showHidden':![],'depth':null})+_0x4c9f60('0xf1')+_0x2b0d30)));})[_0x36b917('0xc6')](function(_0xb7bfc7){const _0x5a930b=_0x36b917;return _0x3c45b8(msgResponse(_0x5a930b('0x10d'),_0x5a930b('0xb2'),JSON[_0x5a930b('0x3b')](_0xb7bfc7)));});});},Dialer[_0x4831e9('0x83')][_0x4831e9('0xd3')]=function(_0x56249d){const _0x514d0a=this;return function(){const _0x6a652e=a1056_0x337a;switch(_0x56249d[_0x6a652e('0x30')]){case'progressive':freeVariablesPredictive(_0x56249d),_0x514d0a[_0x6a652e('0x1')](_0x56249d,0x1);break;case'power':freeVariablesPredictive(_0x56249d),_0x514d0a[_0x6a652e('0x1')](_0x56249d,_0x56249d[_0x6a652e('0x191')]);break;case _0x6a652e('0xc8'):_0x514d0a['predictive'](_0x56249d);break;case _0x6a652e('0x88'):freeVariablesPredictive(_0x56249d),_0x514d0a['handlePower'](_0x56249d,0x1);break;default:freeVariablesPredictive(_0x56249d),logger[_0x6a652e('0x29')]('Queue',_0x56249d[_0x6a652e('0xe')],_0x6a652e('0x1b4'));}};},Dialer[_0x4831e9('0x83')]['launchHandleIvr']=function(_0xed1b3){const _0x51272c=this;return function(){const _0x3df5e=a1056_0x337a;_0x51272c[_0x3df5e('0x147')](_0xed1b3);};},Dialer[_0x4831e9('0x83')][_0x4831e9('0x1ee')]=function(_0x490db0){const _0x3c0612=_0x4831e9,_0xc45d7c=this;isNotPreview(_0x490db0['dialMethod'])?isVoiceQueueOutbound(_0x490db0['type'])&&isActive(_0x490db0[_0x3c0612('0x6')])?(_0x490db0[_0x3c0612('0x125')]=!![],Promise['resolve']()[_0x3c0612('0xa1')](checkIsLoggedIn(_0x490db0,_0x490db0[_0x3c0612('0xa')]))['then'](checkIsActive(_0x490db0,_0x490db0['dialActive']))[_0x3c0612('0xa1')](checkInterval(_0x490db0))[_0x3c0612('0xa1')](_0xc45d7c[_0x3c0612('0x3e')](_0x490db0))['then'](_0xc45d7c[_0x3c0612('0x155')](_0x490db0[_0x3c0612('0xbd')],_0x490db0['dialTimezone'],_0x490db0['name'],_0x490db0))['then'](_0xc45d7c[_0x3c0612('0x171')](_0x490db0[_0x3c0612('0x1c8')],_0x490db0[_0x3c0612('0x1e3')],_0x490db0[_0x3c0612('0xe')],_0x490db0))[_0x3c0612('0xa1')](_0xc45d7c[_0x3c0612('0xd3')](_0x490db0))[_0x3c0612('0xc6')](loggerCatchQueueSummary('[syncQueueSummary]',_0x490db0))):notSendMessagesQueue(_0x490db0):freeVariablesPredictive(_0x490db0);},Dialer[_0x4831e9('0x83')][_0x4831e9('0xe2')]=function(){const _0x59f447=_0x4831e9,_0x165fb5=this;let _0x3685b2;for(const _0x51955b in this[_0x59f447('0x98')]){typeof this[_0x59f447('0x98')][_0x51955b]!==_0x59f447('0x199')&&(_0x3685b2=this[_0x59f447('0x98')][_0x51955b],isCampaignIvr(_0x3685b2[_0x59f447('0x1a8')])&&isActive(_0x3685b2[_0x59f447('0xe3')])?(_0x3685b2[_0x59f447('0x125')]=!![],Promise[_0x59f447('0xb5')]()[_0x59f447('0xa1')](checkIsActive(_0x3685b2,_0x3685b2[_0x59f447('0xe3')]))['then'](checkInterval(_0x3685b2))[_0x59f447('0xa1')](_0x165fb5[_0x59f447('0x3e')](_0x3685b2))[_0x59f447('0xa1')](_0x165fb5[_0x59f447('0x155')](_0x3685b2['dialGlobalInterval'],_0x3685b2[_0x59f447('0x1e3')],_0x3685b2[_0x59f447('0xe')],_0x3685b2))[_0x59f447('0xa1')](_0x165fb5[_0x59f447('0x171')](_0x3685b2[_0x59f447('0x1c8')],_0x3685b2[_0x59f447('0x1e3')],_0x3685b2[_0x59f447('0xe')],_0x3685b2))['then'](_0x165fb5['launchHandleIvr'](_0x3685b2))['catch'](loggerCatchQueueSummary(_0x59f447('0x15b'),_0x3685b2))):notSendMessagesCampaign(_0x3685b2));}};function getCallerIdRandom(_0x7c35c9,_0xf5413a){const _0x27bd6e=_0x4831e9;_0xf5413a<=0x0&&(_0xf5413a=0x1);const _0x9aa6b5=new RegExp(_0x27bd6e('0x51')+_0xf5413a+'}$'),_0xd0bab=Math['pow'](0xa,_0xf5413a-0x1),_0x2b6b74=Math['pow'](0xa,_0xf5413a)-0x1;return util[_0x27bd6e('0xef')]('%s',_[_0x27bd6e('0x54')](_0x7c35c9,_0x9aa6b5,_[_0x27bd6e('0x14f')](_0xd0bab,_0x2b6b74)));}function extractCalleridName(_0x3e8433){const _0x3a866a=_0x4831e9,_0x4c0799=_0x3e8433[_0x3a866a('0x180')](/"(.*?)"/);return _0x4c0799?_0x4c0799[0x1]:_0x3e8433;}function extractCalleridNumber(_0x532873){const _0x119cbd=_0x4831e9,_0x2d6d87=_0x532873[_0x119cbd('0x180')](/<(.*?)>/);return _0x2d6d87?_0x2d6d87[0x1]:_0x532873;}Dialer[_0x4831e9('0x83')][_0x4831e9('0xd')]=function(_0x4ab3ed,_0x4c9a75){const _0x5b04e1=_0x4831e9,_0xe3e62c=getConfigService(),_0x51cae2=this,_0x546a2c=uuid['v4']();return this[_0x5b04e1('0xea')][_0x546a2c]=new Action(_0x4ab3ed,_0x4c9a75,_0x546a2c),new Promise(function(_0x3a23b6,_0xa8bcbe){const _0x2c2762=_0x5b04e1;if(_[_0x2c2762('0x2b')](_0x4ab3ed)&&_0x2c2762('0x8')!==typeof _0x4ab3ed)return _0xa8bcbe(msgResponse(_0x2c2762('0x195'),_0x2c2762('0xb2'),_0x2c2762('0x149')));if(_['isUndefined'](_0x4c9a75['Contact']['phone'])||_0x4c9a75[_0x2c2762('0x37')][_0x2c2762('0xc7')]===null)return _0xa8bcbe(msgResponse('originate',_0x2c2762('0xb2'),'contact\x20is\x20undefine'));const _0x15c196={'XMD-CALLERID':_0x51cae2[_0x2c2762('0xea')][_0x546a2c][_0x2c2762('0x6c')](),'XMD-AGI':_0x4ab3ed[_0x2c2762('0x4b')]?util[_0x2c2762('0xef')]('\x22agi://%s/square,%s\x22',_0xe3e62c['agiIp'],_0x4ab3ed['dialQueueProject']):_0x2c2762('0x27'),'XMD-AGIAFTER':_0x4ab3ed['dialQueueProject2']?util['format'](_0x2c2762('0x197'),_0xe3e62c['agiIp'],_0x4ab3ed['dialQueueProject2']):_0x2c2762('0x27'),'XMD-QUEUE':_0x4ab3ed[_0x2c2762('0x1a8')]===_0x2c2762('0xeb')?util[_0x2c2762('0xef')]('\x22%s,%s%s,,,%s\x22',_0x4ab3ed['name'],_0x4ab3ed[_0x2c2762('0xf8')]||'',_0x4ab3ed[_0x2c2762('0x14')]?'c':'',_0x4ab3ed['dialQueueTimeout']||0x3):_0x2c2762('0x27'),'XMD-CONTACTID':_0x4c9a75[_0x2c2762('0xce')],'XMD-CDRTYPE':_0x2c2762('0x15e'),'CALLERID(all)':_0x51cae2[_0x2c2762('0xea')][_0x546a2c][_0x2c2762('0x6c')](),'XMD-AMD':_0x4ab3ed[_0x2c2762('0x78')]?_0x2c2762('0x50'):_0x2c2762('0x27'),'XMD-DESTINATION':_0x2c2762('0x1cb')};_0x4ab3ed[_0x2c2762('0x78')]&&(_0x15c196[_0x2c2762('0x1ff')]=_0x4ab3ed['dialAMDInitialSilence']||0x9c4,_0x15c196[_0x2c2762('0x1f8')]=_0x4ab3ed[_0x2c2762('0xdb')]||0x5dc,_0x15c196[_0x2c2762('0x1d5')]=_0x4ab3ed[_0x2c2762('0x1b8')]||0x320,_0x15c196[_0x2c2762('0xe1')]=_0x4ab3ed[_0x2c2762('0x97')]||0x1388,_0x15c196[_0x2c2762('0xe5')]=_0x4ab3ed[_0x2c2762('0x1eb')]||0x64,_0x15c196['XMD-AMDBETWEENWORDSSILENCE']=_0x4ab3ed[_0x2c2762('0x1ec')]||0x32,_0x15c196[_0x2c2762('0x105')]=_0x4ab3ed['dialAMDMaximumNumberOfWords']||0x3,_0x15c196[_0x2c2762('0x160')]=_0x4ab3ed['dialAMDSilenceThreshold']||0x100,_0x15c196[_0x2c2762('0x152')]=_0x4ab3ed[_0x2c2762('0x8f')]||0x1388);_0x4ab3ed[_0x2c2762('0x1a8')]===_0x2c2762('0xeb')?_0x15c196[_0x2c2762('0x8b')]=_0x4c9a75[_0x2c2762('0x1c6')]:_0x15c196[_0x2c2762('0x1f9')]=_0x4c9a75['CampaignId'];for(const _0x14207b in _0x4c9a75[_0x2c2762('0x37')]){typeof _0x4c9a75['Contact'][_0x14207b]!==_0x2c2762('0x199')&&(isNotNull(_0x4c9a75[_0x2c2762('0x37')][_0x14207b])&&_0x14207b!=='id'&&_0x14207b!=='tags'&&_0x14207b!==_0x2c2762('0x134')&&_0x14207b!==_0x2c2762('0x28')&&(_0x15c196[util['format'](_0x2c2762('0x19f'),_0x2c2762('0x1b9'),_[_0x2c2762('0x32')](_0x14207b))]=_0x4c9a75['Contact'][_0x14207b]));}const _0x28775d=_0x51cae2[_0x2c2762('0x205')](_0x4ab3ed['Trunk'])?getCallerId(_0x4ab3ed[_0x2c2762('0x170')][_0x2c2762('0x142')],_0x4ab3ed[_0x2c2762('0x1aa')],_0x4ab3ed[_0x2c2762('0x9c')]>0x0?getCallerIdRandom(_0x4ab3ed['dialOriginateCallerIdNumber'],_0x4ab3ed[_0x2c2762('0x9c')]):_0x4ab3ed[_0x2c2762('0x210')]):getCallerId(_[_0x2c2762('0x128')](_0x4ab3ed[_0x2c2762('0x9a')])?_0x4ab3ed[_0x2c2762('0x170')]['callerid']:_0x4ab3ed[_0x2c2762('0x9a')][_0x2c2762('0x142')],_0x4ab3ed[_0x2c2762('0x1aa')],_0x4ab3ed[_0x2c2762('0x9c')]>0x0?getCallerIdRandom(_0x4ab3ed[_0x2c2762('0x210')],_0x4ab3ed[_0x2c2762('0x9c')]):_0x4ab3ed[_0x2c2762('0x210')]);if(_0x28775d){const _0x751e60=extractCalleridName(_0x28775d);_0x15c196['XMD-ORIGINATECALLERIDNAME']=_0x751e60,_0x51cae2[_0x2c2762('0xea')][_0x546a2c][_0x2c2762('0xcf')]=_0x751e60;const _0x2a03dd=extractCalleridNumber(_0x28775d);_0x15c196[_0x2c2762('0x1b3')]==_0x2a03dd,_0x51cae2[_0x2c2762('0xea')][_0x546a2c][_0x2c2762('0x24')]=_0x2a03dd;}return ami[_0x2c2762('0x17f')]({'actionid':_0x546a2c,'action':_0x2c2762('0x195'),'channel':_0x51cae2['isTrunkReachable'](_0x4ab3ed[_0x2c2762('0x170')])?util['format'](_0x2c2762('0x107'),_0x4ab3ed[_0x2c2762('0x170')]['name'],isNotNull(_0x4ab3ed['dialPrefix'])?_0x4ab3ed[_0x2c2762('0x76')][_0x2c2762('0x1db')]()||'':'',_0x4ab3ed['dialCutDigit']>0x0?_0x4c9a75[_0x2c2762('0x37')][_0x2c2762('0xc7')][_0x2c2762('0xcb')](_0x4ab3ed['dialCutDigit']):_0x4c9a75[_0x2c2762('0x37')][_0x2c2762('0xc7')]):util[_0x2c2762('0xef')](_0x2c2762('0x107'),_[_0x2c2762('0x128')](_0x4ab3ed['TrunkBackup'])?_0x4ab3ed[_0x2c2762('0x170')][_0x2c2762('0xe')]:_0x4ab3ed[_0x2c2762('0x9a')]['name'],isNotNull(_0x4ab3ed[_0x2c2762('0x76')])?_0x4ab3ed[_0x2c2762('0x76')][_0x2c2762('0x1db')]()||'':'',_0x4ab3ed[_0x2c2762('0x144')]>0x0?_0x4c9a75['Contact'][_0x2c2762('0xc7')][_0x2c2762('0xcb')](_0x4ab3ed[_0x2c2762('0x144')]):_0x4c9a75['Contact'][_0x2c2762('0xc7')]),'callerid':_0x28775d,'Exten':_0x2c2762('0x1cb'),'Context':_0x2c2762('0x1a4'),'Priority':'1','variable':_0x15c196,'timeout':(_0x4ab3ed[_0x2c2762('0xd2')]||0x1e)*0x3e8,'async':!![],'channelid':_0x546a2c})[_0x2c2762('0xa1')](function(_0x4d8dee){return _0x3a23b6(_0x4d8dee);})['catch'](function(_0x2e1429){const _0x45a3d8=_0x2c2762;_0x4ab3ed[_0x45a3d8('0xc3')]+=0x1;const _0x5b5104=new History(_0x51cae2[_0x45a3d8('0xea')][_0x546a2c]);logger[_0x45a3d8('0x29')](util[_0x45a3d8('0xef')](_0x45a3d8('0x202'),JSON['stringify'](_0x2e1429))),_0x5b5104['state']=0xe,_0x5b5104[_0x45a3d8('0x143')]='OriginateError',_0x5b5104['starttime']=moment()[_0x45a3d8('0xef')]('YYYY-MM-DD\x20HH:mm:ss'),_0x5b5104['endtime']=_0x5b5104[_0x45a3d8('0x161')],_0x51cae2[_0x45a3d8('0x16b')](_0x5b5104)[_0x45a3d8('0xc6')](loggerCatch(_0x45a3d8('0x211'))),_0x51cae2[_0x45a3d8('0x16a')](_0x5b5104)[_0x45a3d8('0xc6')](loggerCatch(_0x45a3d8('0x211')))[_0x45a3d8('0x18')](function(){const _0x314cb4=_0x45a3d8;return delete _0x51cae2['actions'][_0x546a2c],_0xa8bcbe(msgResponse('originate','Error',_0x314cb4('0x17a')));});});});},Dialer[_0x4831e9('0x83')][_0x4831e9('0xbf')]=function(_0x2b8e18){const _0x111440=_0x4831e9,_0x51877e=this['actions'][_0x2b8e18['actionid']];if(_0x51877e){delete this['actions'][_0x2b8e18['actionid']],_0x51877e[_0x111440('0x1be')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');const _0x40b897=_0x51877e['type']===_0x111440('0xf4')?this['campaigns'][_0x51877e[_0x111440('0x65')]]:this[_0x111440('0x141')][_0x51877e[_0x111440('0x7e')]()];if(!this['isSuccess'](_0x2b8e18[_0x111440('0xfd')]))return this[_0x111440('0xe0')](_0x40b897),this['callProgressDetecting'](_0x51877e,_0x40b897,_0x2b8e18)[_0x111440('0xa1')](function(){})[_0x111440('0xc6')](loggerCatch(_0x111440('0x198')));else this['uniqueId'][_0x2b8e18[_0x111440('0x23')]]=_0x51877e;}},Dialer['prototype'][_0x4831e9('0x4c')]=function(_0x483745,_0x1e04b3,_0x153e29){const _0x2f5ed5=_0x4831e9,_0x423ddd=new History(_0x1e04b3);if(_0x423ddd['countbusyretry']+_0x423ddd[_0x2f5ed5('0xe4')]+_0x423ddd[_0x2f5ed5('0x26')]+_0x423ddd[_0x2f5ed5('0x1d2')]+_0x423ddd[_0x2f5ed5('0x119')]+_0x423ddd[_0x2f5ed5('0x57')]+_0x423ddd[_0x2f5ed5('0x116')]+_0x423ddd[_0x2f5ed5('0x82')]>=_0x153e29[_0x2f5ed5('0xa0')]-0x1)return!![];switch(_0x483745){case 0x3:if(_0x423ddd[_0x2f5ed5('0x26')]>=_0x153e29[_0x2f5ed5('0x31')]-0x1)return!![];else this[_0x2f5ed5('0xff')]({'active':![],'countnoanswerretry':_0x423ddd[_0x2f5ed5('0x26')]+=0x1,'scheduledat':moment()[_0x2f5ed5('0x12a')](_0x153e29[_0x2f5ed5('0x61')],_0x2f5ed5('0x0'))[_0x2f5ed5('0xef')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x423ddd[_0x2f5ed5('0xce')],'ListId':_0x423ddd['ListId'],'VoiceQueueId':_0x423ddd[_0x2f5ed5('0x1c6')]||undefined,'CampaignId':_0x423ddd[_0x2f5ed5('0x70')]||undefined})['catch'](loggerCatch(_0x2f5ed5('0x184')));break;case 0x5:if(_0x423ddd['countbusyretry']>=_0x153e29[_0x2f5ed5('0x20d')]-0x1)return!![];else this[_0x2f5ed5('0xff')]({'active':![],'countbusyretry':_0x423ddd['countbusyretry']+=0x1,'scheduledat':moment()[_0x2f5ed5('0x12a')](_0x153e29['dialBusyRetryFrequency'],_0x2f5ed5('0x0'))[_0x2f5ed5('0xef')](_0x2f5ed5('0xba')),'ContactId':_0x423ddd[_0x2f5ed5('0xce')],'ListId':_0x423ddd[_0x2f5ed5('0x77')],'VoiceQueueId':_0x423ddd[_0x2f5ed5('0x1c6')]||undefined,'CampaignId':_0x423ddd['CampaignId']||undefined})['catch'](loggerCatch('[rescheduleContact]\x20[Busy]'));break;case 0x8:if(_0x423ddd[_0x2f5ed5('0xe4')]>=_0x153e29['dialCongestionMaxRetry']-0x1)return!![];else this[_0x2f5ed5('0xff')]({'active':![],'countcongestionretry':_0x423ddd[_0x2f5ed5('0xe4')]+=0x1,'scheduledat':moment()[_0x2f5ed5('0x12a')](_0x153e29[_0x2f5ed5('0x8a')],_0x2f5ed5('0x0'))[_0x2f5ed5('0xef')](_0x2f5ed5('0xba')),'ContactId':_0x423ddd[_0x2f5ed5('0xce')],'ListId':_0x423ddd[_0x2f5ed5('0x77')],'VoiceQueueId':_0x423ddd[_0x2f5ed5('0x1c6')]||undefined,'CampaignId':_0x423ddd[_0x2f5ed5('0x70')]||undefined})[_0x2f5ed5('0xc6')](loggerCatch(_0x2f5ed5('0x18b')));break;case 0x0:if(_0x423ddd['countnosuchnumberretry']>=_0x153e29['dialNoSuchNumberMaxRetry']-0x1)return!![];else this[_0x2f5ed5('0xff')]({'active':![],'countnosuchnumberretry':_0x423ddd[_0x2f5ed5('0x1d2')]+=0x1,'scheduledat':moment()[_0x2f5ed5('0x12a')](_0x153e29[_0x2f5ed5('0x1ce')],_0x2f5ed5('0x0'))[_0x2f5ed5('0xef')](_0x2f5ed5('0xba')),'ContactId':_0x423ddd['ContactId'],'ListId':_0x423ddd['ListId'],'VoiceQueueId':_0x423ddd[_0x2f5ed5('0x1c6')]||undefined,'CampaignId':_0x423ddd[_0x2f5ed5('0x70')]||undefined})['catch'](loggerCatch(_0x2f5ed5('0xdf')));break;case 0xa:if(_0x423ddd[_0x2f5ed5('0x119')]>=_0x153e29[_0x2f5ed5('0x42')]-0x1)return!![];else this['rescheduleContact']({'active':![],'countdropretry':_0x423ddd[_0x2f5ed5('0x119')]+=0x1,'scheduledat':moment()[_0x2f5ed5('0x12a')](_0x153e29[_0x2f5ed5('0x6d')],_0x2f5ed5('0x0'))['format'](_0x2f5ed5('0xba')),'ContactId':_0x423ddd[_0x2f5ed5('0xce')],'ListId':_0x423ddd[_0x2f5ed5('0x77')],'VoiceQueueId':_0x423ddd[_0x2f5ed5('0x1c6')]||undefined,'CampaignId':_0x423ddd[_0x2f5ed5('0x70')]||undefined})[_0x2f5ed5('0xc6')](loggerCatch(_0x2f5ed5('0xb1')));break;case 0xb:if(_0x423ddd[_0x2f5ed5('0x57')]>=_0x153e29[_0x2f5ed5('0x19b')]-0x1)return!![];else this[_0x2f5ed5('0xff')]({'active':![],'countabandonedretry':_0x423ddd[_0x2f5ed5('0x57')]+=0x1,'scheduledat':moment()[_0x2f5ed5('0x12a')](_0x153e29[_0x2f5ed5('0x6f')],_0x2f5ed5('0x0'))['format'](_0x2f5ed5('0xba')),'ContactId':_0x423ddd['ContactId'],'ListId':_0x423ddd[_0x2f5ed5('0x77')],'VoiceQueueId':_0x423ddd['VoiceQueueId']||undefined,'CampaignId':_0x423ddd[_0x2f5ed5('0x70')]||undefined})[_0x2f5ed5('0xc6')](loggerCatch('[rescheduleContact][Abandoned]'));break;case 0x13:if(_0x423ddd[_0x2f5ed5('0x116')]>=_0x153e29['dialMachineMaxRetry']-0x1)return!![];else this[_0x2f5ed5('0xff')]({'active':![],'countmachineretry':_0x423ddd[_0x2f5ed5('0x116')]+=0x1,'scheduledat':moment()['add'](_0x153e29[_0x2f5ed5('0x94')],_0x2f5ed5('0x0'))['format'](_0x2f5ed5('0xba')),'ContactId':_0x423ddd[_0x2f5ed5('0xce')],'ListId':_0x423ddd[_0x2f5ed5('0x77')],'VoiceQueueId':_0x423ddd['VoiceQueueId']||undefined,'CampaignId':_0x423ddd[_0x2f5ed5('0x70')]||undefined})[_0x2f5ed5('0xc6')](loggerCatch(_0x2f5ed5('0x126')));break;case 0x14:if(_0x423ddd[_0x2f5ed5('0x82')]>=_0x153e29[_0x2f5ed5('0x166')]-0x1)return!![];else this['rescheduleContact']({'active':![],'countagentrejectretry':_0x423ddd['countagentrejectretry']+=0x1,'scheduledat':moment()[_0x2f5ed5('0x12a')](_0x153e29[_0x2f5ed5('0x1f6')],_0x2f5ed5('0x0'))['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x423ddd[_0x2f5ed5('0xce')],'ListId':_0x423ddd[_0x2f5ed5('0x77')],'VoiceQueueId':_0x423ddd[_0x2f5ed5('0x1c6')]||undefined,'CampaignId':_0x423ddd['CampaignId']||undefined})['catch'](loggerCatch(_0x2f5ed5('0x12')));break;default:return!![];}},Dialer['prototype']['callProgressDetecting']=function(_0x3a62c5,_0x1611fd,_0xd7485f){const _0x4a956b=this,_0x143869=new History(_0x3a62c5);return new Promise(function(_0x5896fd,_0xa21ae5){const _0x57f2cc=a1056_0x337a;if(_['isUndefined'](_0x1611fd)&&_0x57f2cc('0x8')!==typeof _0x1611fd)return _0xa21ae5(msgResponse('[callProgressDetecting]',_0x57f2cc('0xb2'),'entity\x20is\x20undefine'));if(_[_0x57f2cc('0x2b')](_0xd7485f)&&'object'!==typeof _0xd7485f)return _0xa21ae5(msgResponse(_0x57f2cc('0x1fa'),_0x57f2cc('0xb2'),_0x57f2cc('0x10a')));switch(_0xd7485f[_0x57f2cc('0x1bd')]){case'0':_0x1611fd[_0x57f2cc('0xaa')]+=0x1,_0x143869[_0x57f2cc('0x1f5')]=0x0,_0x143869[_0x57f2cc('0x143')]=_0x57f2cc('0x113'),_0x143869['countnosuchnumberretry']+=0x1,_0x143869['countglobal']+=0x1,ami[_0x57f2cc('0x1c1')](_0x57f2cc('0x164'),ut['buildObj'](_0x3a62c5,_0x57f2cc('0x1e8'))),_0x4a956b[_0x57f2cc('0x16b')](_0x143869)[_0x57f2cc('0xc6')](loggerCatch(_0x57f2cc('0x1e0')));_0x4a956b[_0x57f2cc('0x4c')](0x0,_0x3a62c5,_0x1611fd)&&(_0x143869[_0x57f2cc('0x1d2')]>=_0x1611fd[_0x57f2cc('0x5b')]?_0x4a956b['createStateFinal'](_0x143869,_0x5896fd,_0xa21ae5,_0x57f2cc('0xd7')):_0x4a956b[_0x57f2cc('0x1bb')](_0x143869,_0x5896fd,_0xa21ae5,_0x57f2cc('0xd7')));break;case'3':_0x1611fd['outboundNoAnswerCallsDay']+=0x1,_0x143869[_0x57f2cc('0x1f5')]=0x3,_0x143869[_0x57f2cc('0x143')]='NoAnswer',_0x143869[_0x57f2cc('0x26')]+=0x1,_0x143869[_0x57f2cc('0x1a5')]+=0x1,ami[_0x57f2cc('0x1c1')](_0x57f2cc('0x84'),ut['buildObj'](_0x3a62c5,_0x57f2cc('0x1a3'))),_0x4a956b[_0x57f2cc('0x16b')](_0x143869)[_0x57f2cc('0xc6')](loggerCatch('[syncAgentComplete][createHistory][3]'));_0x4a956b[_0x57f2cc('0x4c')](0x3,_0x3a62c5,_0x1611fd)&&(_0x143869[_0x57f2cc('0x26')]>=_0x1611fd[_0x57f2cc('0x31')]?_0x4a956b[_0x57f2cc('0x34')](_0x143869,_0x5896fd,_0xa21ae5,_0x57f2cc('0x1a9')):_0x4a956b[_0x57f2cc('0x1bb')](_0x143869,_0x5896fd,_0xa21ae5,_0x57f2cc('0x1a9')));break;case'5':_0x1611fd[_0x57f2cc('0x1f0')]+=0x1,_0x143869[_0x57f2cc('0x1f5')]=0x5,_0x143869[_0x57f2cc('0x143')]=_0x57f2cc('0x132'),_0x143869[_0x57f2cc('0x1d3')]+=0x1,_0x143869[_0x57f2cc('0x1a5')]+=0x1,ami[_0x57f2cc('0x1c1')](_0x57f2cc('0x106'),ut[_0x57f2cc('0x1c0')](_0x3a62c5,'busy')),_0x4a956b[_0x57f2cc('0x16b')](_0x143869)[_0x57f2cc('0xc6')](loggerCatch('[syncAgentComplete][createHistory][5]'));_0x4a956b[_0x57f2cc('0x4c')](0x5,_0x3a62c5,_0x1611fd)&&(_0x143869['countbusyretry']>=_0x1611fd[_0x57f2cc('0x20d')]?_0x4a956b[_0x57f2cc('0x34')](_0x143869,_0x5896fd,_0xa21ae5,'reason\x205\x20busy'):_0x4a956b[_0x57f2cc('0x1bb')](_0x143869,_0x5896fd,_0xa21ae5,_0x57f2cc('0x20a')));break;case'8':_0x1611fd[_0x57f2cc('0x115')]+=0x1,_0x143869[_0x57f2cc('0x1f5')]=0x8,_0x143869[_0x57f2cc('0x143')]='Congestion',_0x143869[_0x57f2cc('0xe4')]+=0x1,_0x143869['countglobal']+=0x1,ami[_0x57f2cc('0x1c1')](_0x57f2cc('0xbc'),ut[_0x57f2cc('0x1c0')](_0x3a62c5,_0x57f2cc('0x20f'))),_0x4a956b[_0x57f2cc('0x16b')](_0x143869)[_0x57f2cc('0xc6')](loggerCatch(_0x57f2cc('0x1da')));_0x4a956b['checkRetriveMax'](0x8,_0x3a62c5,_0x1611fd)&&(_0x143869[_0x57f2cc('0xe4')]>=_0x1611fd['dialCongestionMaxRetry']?_0x4a956b[_0x57f2cc('0x34')](_0x143869,_0x5896fd,_0xa21ae5,_0x57f2cc('0x45')):_0x4a956b[_0x57f2cc('0x1bb')](_0x143869,_0x5896fd,_0xa21ae5,'reason\x208\x20congestion'));break;case'11':_0x1611fd['outboundAbandonedCallsDay']+=0x1,_0x143869[_0x57f2cc('0x1f5')]=0xb,_0x143869[_0x57f2cc('0x143')]=_0x57f2cc('0x87'),_0x143869[_0x57f2cc('0x57')]+=0x1,_0x143869[_0x57f2cc('0x1a5')]+=0x1,_0x4a956b['createHistory'](_0x143869)['catch'](loggerCatch(_0x57f2cc('0x99')));_0x4a956b[_0x57f2cc('0x4c')](0xb,_0x3a62c5,_0x1611fd)&&(_0x143869['countabandonedretry']>=_0x1611fd[_0x57f2cc('0x19b')]?_0x4a956b[_0x57f2cc('0x34')](_0x143869,_0x5896fd,_0xa21ae5,_0x57f2cc('0xb4')):_0x4a956b[_0x57f2cc('0x1bb')](_0x143869,_0x5896fd,_0xa21ae5,_0x57f2cc('0xb4')));break;case'20':_0x1611fd[_0x57f2cc('0xd0')]+=0x1,_0x143869[_0x57f2cc('0x1f5')]=0x14,_0x143869['statedesc']=_0x57f2cc('0xca'),_0x143869[_0x57f2cc('0x82')]+=0x1,_0x143869[_0x57f2cc('0x1a5')]+=0x1,ami[_0x57f2cc('0x1c1')]('custom:agentreject',ut['buildObj'](_0x3a62c5,_0x57f2cc('0xa6'))),_0x4a956b[_0x57f2cc('0x16b')](_0x143869)[_0x57f2cc('0xc6')](loggerCatch(_0x57f2cc('0x7c')));_0x4a956b[_0x57f2cc('0x4c')](0x14,_0x3a62c5,_0x1611fd)&&(_0x143869[_0x57f2cc('0x82')]>=_0x1611fd[_0x57f2cc('0x166')]?_0x4a956b[_0x57f2cc('0x34')](_0x143869,_0x5896fd,_0xa21ae5,_0x57f2cc('0x209')):_0x4a956b[_0x57f2cc('0x1bb')](_0x143869,_0x5896fd,_0xa21ae5,'reason\x2020\x20agentreject'));break;default:_0x1611fd[_0x57f2cc('0x177')]+=0x1,_0x143869[_0x57f2cc('0x1f5')]=0xc,_0x143869[_0x57f2cc('0x143')]=_0xd7485f[_0x57f2cc('0x1bd')],_0x4a956b[_0x57f2cc('0x16b')](_0x143869)[_0x57f2cc('0xc6')](loggerCatch(_0x57f2cc('0x1e4')));_0x4a956b[_0x57f2cc('0x4c')](_0xd7485f[_0x57f2cc('0x1bd')],_0x3a62c5,_0x1611fd)&&(_0x143869[_0x57f2cc('0x1d3')]+_0x143869[_0x57f2cc('0xe4')]+_0x143869[_0x57f2cc('0x26')]+_0x143869['countnosuchnumberretry']+_0x143869[_0x57f2cc('0x119')]+_0x143869[_0x57f2cc('0x57')]+_0x143869[_0x57f2cc('0x116')]+_0x143869['countagentrejectretry']>=_0x1611fd['dialGlobalMaxRetry']?_0x4a956b[_0x57f2cc('0x1bb')](_0x143869,_0x5896fd,_0xa21ae5,_0xd7485f['reason']):_0x4a956b[_0x57f2cc('0x34')](_0x143869,_0x5896fd,_0xa21ae5,_0xd7485f[_0x57f2cc('0x1bd')]));}});},Dialer[_0x4831e9('0x83')][_0x4831e9('0x1bb')]=function(_0x3a8a65,_0x3d81ae,_0x22d7fa,_0x345785){const _0x56eb79=_0x4831e9,_0xc5b1d6=new Final(_0x3a8a65);_0xc5b1d6[_0x56eb79('0x1f5')]=0xf,_0xc5b1d6[_0x56eb79('0x143')]='Global',this[_0x56eb79('0x34')](_0xc5b1d6,_0x3d81ae,_0x22d7fa,_0x345785);},Dialer[_0x4831e9('0x83')]['createStateFinal']=function(_0x4df0a7,_0x56b7f9,_0x450c2e,_0x50847f){const _0x4334ea=_0x4831e9;this[_0x4334ea('0x16a')](_0x4df0a7)['then'](function(){const _0x2ed461=_0x4334ea;return _0x56b7f9(msgResponse(_0x2ed461('0x1fa'),_0x2ed461('0x1af'),_0x50847f));})[_0x4334ea('0xc6')](function(){const _0x40a8d1=_0x4334ea;return _0x450c2e(msgResponse('[moveContactManagedDialer][0]','Failure',_0x40a8d1('0x173')));});},Dialer[_0x4831e9('0x83')][_0x4831e9('0xc8')]=function(_0x5c3ac0){const _0x308391=_0x4831e9,_0x12821c=_0x5c3ac0[_0x308391('0x16c')]/0x64,_0x4d2bf5=_0x5c3ac0[_0x308391('0x91')]/(_0x5c3ac0[_0x308391('0x91')]+_0x5c3ac0[_0x308391('0x1b6')]),_0x4bdbc8=Math[_0x308391('0x92')](_0x5c3ac0[_0x308391('0x1c')]*(_0x5c3ac0[_0x308391('0x10f')]/0x64)),_0x1f89ba=Math[_0x308391('0x92')](_0x5c3ac0[_0x308391('0x1c')]*(_0x5c3ac0[_0x308391('0xa9')]/0x64)),_0x588392=_0x5c3ac0[_0x308391('0x11a')]+_0x5c3ac0[_0x308391('0x12f')],_0x5e3794=Math['floor'](_0x5c3ac0[_0x308391('0x114')]*_0x5c3ac0['erlangAbandonmentRate']*_0x5c3ac0['predictiveIntervalHitRate']*_0x5c3ac0[_0x308391('0x1f2')]);if(_[_0x308391('0x2b')](_0x5c3ac0[_0x308391('0xb0')]))!_[_0x308391('0x2b')](_0x5c3ac0[_0x308391('0xcc')])&&(_0x5c3ac0['startPredictive']=undefined,loggerPredictive[_0x308391('0x29')]('[startMethodPredictive][StartProgressive]',_0x308391('0x14c'))),!_[_0x308391('0x2b')](_0x5c3ac0[_0x308391('0x67')])&&(loggerPredictive[_0x308391('0x29')](_0x308391('0x1f3'),'check\x20handlePredictive\x20is\x20not\x20undefine'),clearInterval(_0x5c3ac0[_0x308391('0x67')]),_0x5c3ac0[_0x308391('0x67')]=undefined),_0x5c3ac0[_0x308391('0xb0')]=moment()[_0x308391('0xef')](_0x308391('0xba')),loggerPredictive['info'](_0x5c3ac0[_0x308391('0xe')],_0x308391('0x1c3'),_0x5c3ac0[_0x308391('0xb0')]),this[_0x308391('0x1')](_0x5c3ac0,0x1);else{if(ifInterval(_0x5c3ac0[_0x308391('0x80')],_0x5c3ac0['startProgressive']))this['handlePower'](_0x5c3ac0,0x1),loggerPredictiveCalls[_0x308391('0x185')](_0x308391('0xe6'),_0x5c3ac0[_0x308391('0xb0')],_0x5c3ac0[_0x308391('0xe')]),_0x5c3ac0['erlangCalls']=0x0,_0x5c3ac0['predictiveIntervalErlangCallsDroppedCalls']=0x0;else{if(_0x12821c<_0x4d2bf5&&_0x5c3ac0[_0x308391('0x20c')]==='dropRate')freeVariablesPredictive(_0x5c3ac0),loggerPredictive[_0x308391('0x185')](_0x308391('0xe7'),_0x308391('0x12b'),_0x4d2bf5,_0x308391('0xb0'),_0x5c3ac0[_0x308391('0xe')]);else{if(_0x5e3794<_0x5c3ac0[_0x308391('0xfa')]&&_0x5c3ac0[_0x308391('0x20c')]===_0x308391('0x46'))freeVariablesPredictive(_0x5c3ac0),loggerPredictive['info'](_0x308391('0x72'),_0x308391('0x172'),_0x5e3794,_0x308391('0x59'),_0x5c3ac0[_0x308391('0xfa')],_0x308391('0xb0'),_0x5c3ac0['name']);else{if(!ifInterval(_0x5c3ac0[_0x308391('0x80')],_0x5c3ac0['startProgressive'])&&_[_0x308391('0x2b')](_0x5c3ac0[_0x308391('0xcc')])&&!_[_0x308391('0x2b')](_0x5c3ac0[_0x308391('0xb0')]))_0x5c3ac0[_0x308391('0xcc')]=moment()[_0x308391('0xef')](_0x308391('0xba')),loggerPredictive[_0x308391('0x185')](_0x5c3ac0['name'],_0x308391('0x15d'),_0x5c3ac0['startPredictive']),this[_0x308391('0x196')](_0x5c3ac0[_0x308391('0x80')])['then'](this[_0x308391('0x13f')](_0x5c3ac0))['then'](mergeDataErlangB(_0x5c3ac0))['then'](this['startMethodPredictive'](_0x5c3ac0))['catch'](loggerCatchPredictive('Predictive\x20after\x20first\x20interval',_0x5c3ac0));else{if(!ifInterval(_0x5c3ac0[_0x308391('0x80')],_0x5c3ac0['startPredictive']))_0x5c3ac0[_0x308391('0xfa')]=0x0,_0x5c3ac0['startPredictive']=moment()[_0x308391('0xef')](_0x308391('0xba')),loggerPredictive[_0x308391('0x185')](_0x5c3ac0[_0x308391('0xe')],_0x308391('0x20b'),_0x5c3ac0[_0x308391('0xcc')]),clearInterval(_0x5c3ac0['handlePredictive']),_0x5c3ac0[_0x308391('0x67')]=undefined,this[_0x308391('0x196')](_0x5c3ac0[_0x308391('0x80')])[_0x308391('0xa1')](this[_0x308391('0x13f')](_0x5c3ac0))['then'](mergeDataErlangB(_0x5c3ac0))[_0x308391('0xa1')](this[_0x308391('0x49')](_0x5c3ac0))[_0x308391('0xc6')](loggerCatchPredictive('Predictive\x20for\x20every\x20interval',_0x5c3ac0));else{if(_0x5c3ac0[_0x308391('0x1c')]&&_0x588392<_0x5c3ac0[_0x308391('0x1c')]-_0x1f89ba)freeVariablesPredictive(_0x5c3ac0),loggerPredictive['info'](_0x5c3ac0[_0x308391('0xe')],_0x308391('0x137'),_0x588392,')\x20are\x20less\x20than\x20threshold\x20(',_0x5c3ac0['predictiveIntervalAvailable'],'-',_0x1f89ba,'=',_0x5c3ac0[_0x308391('0x1c')]-_0x1f89ba,')');else _0x5c3ac0[_0x308391('0x1c')]&&_0x588392>_0x5c3ac0[_0x308391('0x1c')]+_0x4bdbc8&&(freeVariablesPredictive(_0x5c3ac0),loggerPredictive[_0x308391('0x185')](_0x5c3ac0[_0x308391('0xe')],'switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',_0x588392,_0x308391('0xa2'),_0x5c3ac0[_0x308391('0x1c')],'+',_0x4bdbc8,'=',_0x5c3ac0[_0x308391('0x1c')]+_0x4bdbc8,')'));}}}}}}},Dialer[_0x4831e9('0x83')][_0x4831e9('0x13f')]=function(_0xf4581c){const _0x5d5cd1=this;return function(_0x16ce62){return new Promise(function(_0x3fd468,_0x567ad8){const _0x250942=a1056_0x337a;_[_0x250942('0x17d')](_0xf4581c,_0x16ce62[0x0]);if(checkGetDataPredictive(_0x16ce62[0x0])){const _0x252b91=_0xf4581c[_0x250942('0x12f')]+_0xf4581c[_0x250942('0x11a')];_0xf4581c[_0x250942('0x1c')]=_0x252b91;const _0x4de7cf=_0x252b91,_0x8effa1=_0xf4581c[_0x250942('0x80')]*0x3c,_0x4af3e9=_0x16ce62[0x0][_0x250942('0x156')]+_0x16ce62[0x0]['predictiveIntervalAvgHoldtime'],_0x4d7ab2=(_0x16ce62[0x0][_0x250942('0x189')]+_0x16ce62[0x0][_0x250942('0x1b0')]+_0x16ce62[0x0]['predictiveIntervalDroppedCallsCallersExit'])/_0x16ce62[0x0][_0x250942('0x16')];_0xf4581c[_0x250942('0x15f')]=_0x4d7ab2>0x0?_0x4d7ab2:0x1;switch(_0xf4581c[_0x250942('0x20c')]){case _0x250942('0x46'):{const _0x44e682=_0xf4581c[_0x250942('0x16c')]/0x64;return _0x5d5cd1['abandonmentRate'](_0x4de7cf,_0x8effa1,_0x4af3e9,_0x4d7ab2,_0x44e682)[_0x250942('0xa1')](function(_0x344988){return _0x3fd468(_0x344988);});}case _0x250942('0x7b'):{const _0x749154=_0xf4581c[_0x250942('0x16c')]/0x64;return _0x5d5cd1[_0x250942('0x55')](_0x4de7cf,_0x8effa1,_0x4af3e9,_0x4d7ab2,_0x749154)[_0x250942('0xa1')](function(_0x5307d2){return _0x3fd468(_0x5307d2);});}default:return _0x567ad8(msgResponse(_0x250942('0x12c'),_0x250942('0xb2'),_0x250942('0x208')));}}else return _0x567ad8(msgResponse(_0x250942('0x12c'),_0x250942('0xb2'),_0x250942('0x18d')));});};},Dialer[_0x4831e9('0x83')]['getDataPredictiveOld']=function(_0x2c5df5){const _0x175049=this;return function(_0x6db7e2){return new Promise(function(_0x4f7e18,_0x38be8b){const _0x42496f=a1056_0x337a;_[_0x42496f('0x17d')](_0x2c5df5,_0x6db7e2[0x0]);if(checkGetDataPredictive(_0x6db7e2[0x0])){loggerPredictive[_0x42496f('0x185')](JSON['stringify'](_0x6db7e2[0x0]));if(_0x2c5df5[_0x42496f('0x20c')]===_0x42496f('0x46'))return _0x175049[_0x42496f('0x6a')](_0x2c5df5['id'])[_0x42496f('0xa1')](function(_0xdd843){const _0x5e848a=_0x42496f,_0x1d5975=_0x2c5df5[_0x5e848a('0xa')]-_0xdd843[0x0][_0x5e848a('0x1a7')],_0x1d4585=_0x2c5df5[_0x5e848a('0x80')]*0x3c,_0x2e4de2=_0x6db7e2[0x0][_0x5e848a('0x156')]+_0x6db7e2[0x0][_0x5e848a('0x1d1')],_0x1c5d1c=(_0x6db7e2[0x0][_0x5e848a('0x189')]+_0x6db7e2[0x0][_0x5e848a('0x1b0')]+_0x6db7e2[0x0][_0x5e848a('0x11b')])/_0x6db7e2[0x0][_0x5e848a('0x16')],_0x25616c=_0x2c5df5[_0x5e848a('0x16c')]/0x64;return _0x2c5df5[_0x5e848a('0xfc')]=_0xdd843[0x0]['outboundQueuePauses']||0x0,_0x2c5df5[_0x5e848a('0x15f')]=_0x1c5d1c>0x0?_0x1c5d1c:0x1,_0x175049['abandonmentRate'](_0x1d5975,_0x1d4585,_0x2e4de2,_0x1c5d1c,_0x25616c);})[_0x42496f('0xa1')](function(_0x864537){return _0x4f7e18(_0x864537);})['catch'](function(_0x558eeb){const _0xba741d=_0x42496f;return _0x38be8b(msgResponse(_0xba741d('0x3'),_0xba741d('0xb2'),JSON[_0xba741d('0x3b')](_0x558eeb)));});if(_0x2c5df5['dialPredictiveOptimization']==='agentBusyFactor')return _0x175049[_0x42496f('0x6a')](_0x2c5df5['id'])[_0x42496f('0xa1')](function(_0x20032f){const _0x516095=_0x42496f,_0x291149=_0x2c5df5[_0x516095('0xa')]-_0x20032f[0x0]['outboundQueuePauses'],_0x5df2f1=_0x2c5df5['dialPredictiveInterval']*0x3c,_0x2a776b=_0x6db7e2[0x0][_0x516095('0x156')]+_0x6db7e2[0x0]['predictiveIntervalAvgHoldtime'],_0x5ccd17=(_0x6db7e2[0x0][_0x516095('0x189')]+_0x6db7e2[0x0][_0x516095('0x1b0')]+_0x6db7e2[0x0][_0x516095('0x11b')])/_0x6db7e2[0x0][_0x516095('0x16')],_0x52f0b2=_0x2c5df5[_0x516095('0x16c')]/0x64;return _0x2c5df5[_0x516095('0xfc')]=_0x20032f[0x0]['outboundQueuePauses']||0x0,_0x2c5df5['predictiveIntervalHitRate']=_0x5ccd17>0x0?_0x5ccd17:0x1,_0x175049[_0x516095('0x55')](_0x291149,_0x5df2f1,_0x2a776b,_0x5ccd17,_0x52f0b2);})[_0x42496f('0xa1')](function(_0x24153b){return _0x4f7e18(_0x24153b);})[_0x42496f('0xc6')](function(_0x57a3f2){const _0x348b5b=_0x42496f;return _0x38be8b(msgResponse(_0x348b5b('0x3'),_0x348b5b('0xb2'),JSON[_0x348b5b('0x3b')](_0x57a3f2)));});}else return _0x38be8b(msgResponse('[getDataPredictive]',_0x42496f('0xb2'),_0x42496f('0x18d')));});};},Dialer[_0x4831e9('0x83')][_0x4831e9('0x49')]=function(_0x3f7ae5){const _0x538159=this;return function(){const _0x4f34e3=a1056_0x337a;let _0x1bae64=0x0,_0x4d6e8d=Math[_0x4f34e3('0x96')](_0x3f7ae5[_0x4f34e3('0x74')]*0x3e8);_0x4d6e8d>0x0?(_0x4d6e8d=_0x4d6e8d<0x64?0x64:_0x4d6e8d,loggerPredictive['info'](_0x3f7ae5[_0x4f34e3('0xe')],_0x4f34e3('0x18c'),_0x4d6e8d,_0x4f34e3('0x47')),_0x3f7ae5[_0x4f34e3('0x67')]=setInterval(function(){const _0x350304=_0x4f34e3;_0x538159[_0x350304('0x67')](_0x3f7ae5),loggerPredictiveCalls['info']('[handlePredictive]',_0x1bae64+=0x1);},_0x4d6e8d)):loggerPredictive[_0x4f34e3('0x185')](_0x3f7ae5[_0x4f34e3('0xe')],'fail\x20to\x20scheduled\x20calls');};},Dialer[_0x4831e9('0x83')][_0x4831e9('0x112')]=function(_0xb045d0,_0x33b7eb){const _0x32b9b5=this;return function(_0x1d0dbe){const _0x229d01=a1056_0x337a;if(_[_0x229d01('0xad')](_0x1d0dbe)){if(_['isNil'](_0x33b7eb['UserId'])||!_0x33b7eb[_0x229d01('0x1b1')]){if(_0xb045d0[_0x229d01('0x30')]===_0x229d01('0x88')){_0xb045d0[_0x229d01('0x1e7')]=_[_0x229d01('0x2b')](_0xb045d0[_0x229d01('0x1e7')])?!![]:_0xb045d0[_0x229d01('0x1e7')];const _0x4ce3a0=uuid['v4']();_0x32b9b5[_0x229d01('0xea')][_0x4ce3a0]=new Action(_0xb045d0,_0x33b7eb,_0x4ce3a0),loggerBooked[_0x229d01('0x185')](_0x229d01('0x9b'),_0x4ce3a0,_0x229d01('0x167'),JSON['stringify'](_0xb045d0[_0x229d01('0x1e7')]),_0x229d01('0x8d'),_0xb045d0[_0x229d01('0xe')]),_0xb045d0['queueStatusComplete']?(_0xb045d0[_0x229d01('0x1e7')]=![],_0x32b9b5[_0x229d01('0x39')][_0x32b9b5['actions'][_0x4ce3a0][_0x229d01('0x65')]]=[],ami[_0x229d01('0x17f')]({'actionid':_0x4ce3a0,'action':_0x229d01('0xa3'),'queue':_0xb045d0['name']})['catch'](function(){const _0x273c90=_0x229d01;_0x32b9b5[_0x273c90('0xe0')](_0xb045d0),_0x32b9b5[_0x273c90('0xff')]({'active':![],'ContactId':_0x32b9b5[_0x273c90('0xea')][_0x4ce3a0][_0x273c90('0xce')],'ListId':_0x32b9b5['actions'][_0x4ce3a0]['ListId'],'VoiceQueueId':_0x32b9b5[_0x273c90('0xea')][_0x4ce3a0][_0x273c90('0x1c6')]||undefined,'CampaignId':_0x32b9b5[_0x273c90('0xea')][_0x4ce3a0][_0x273c90('0x70')]||undefined})['catch'](loggerCatch(_0x273c90('0x168'))),delete _0x32b9b5[_0x273c90('0xea')][_0x4ce3a0];})):(loggerBooked[_0x229d01('0x185')](_0x229d01('0x1e'),JSON[_0x229d01('0x3b')](_0xb045d0[_0x229d01('0x1e7')]),_0x229d01('0x8d'),_0xb045d0[_0x229d01('0xe')]),_0x32b9b5[_0x229d01('0xe0')](_0xb045d0),_0x32b9b5[_0x229d01('0xff')]({'active':![],'ContactId':_0x32b9b5[_0x229d01('0xea')][_0x4ce3a0][_0x229d01('0xce')],'ListId':_0x32b9b5[_0x229d01('0xea')][_0x4ce3a0]['ListId'],'VoiceQueueId':_0x32b9b5['actions'][_0x4ce3a0]['VoiceQueueId']||undefined,'CampaignId':_0x32b9b5[_0x229d01('0xea')][_0x4ce3a0]['CampaignId']||undefined})[_0x229d01('0xc6')](loggerCatch(_0x229d01('0x168'))),delete _0x32b9b5[_0x229d01('0xea')][_0x4ce3a0]);}else return _0x32b9b5[_0x229d01('0xd')](_0xb045d0,_0x33b7eb);}else getDiff(_0x33b7eb['scheduledat'])<_0xb045d0[_0x229d01('0xd1')]*0x3c?_0x33b7eb[_0x229d01('0x175')]&&!_0x33b7eb['Agent'][_0x229d01('0x35')]?_0x32b9b5[_0x229d01('0x1f7')][_0x229d01('0x2f')](_0x33b7eb['id'])[_0x229d01('0x18')](function(){const _0x47715b=_0x229d01;_0x32b9b5[_0x47715b('0xe0')](_0xb045d0);}):_0x32b9b5['unlockContact']({'active':![]},_0x33b7eb['id'],0x1)['finally'](function(){const _0x27fd99=_0x229d01;console[_0x27fd99('0x81')](_0x27fd99('0x5e')),_0x32b9b5[_0x27fd99('0xe0')](_0xb045d0);}):(_0xb045d0[_0x229d01('0x60')]+=0x1,_0x32b9b5[_0x229d01('0xe0')](_0xb045d0),_0xb045d0[_0x229d01('0x9f')]?(_0x32b9b5[_0x229d01('0xff')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x33b7eb[_0x229d01('0xce')],'ListId':_0x33b7eb[_0x229d01('0x77')],'VoiceQueueId':_0x33b7eb['VoiceQueueId']||undefined,'CampaignId':_0x33b7eb[_0x229d01('0x70')]||undefined})['catch'](loggerCatch(_0x229d01('0xf6'))),_0x32b9b5[_0x229d01('0x16b')](createObjHistory(_0xb045d0,_0x33b7eb,_0x229d01('0x145'),0x17,_0x229d01('0x3c')))[_0x229d01('0xc6')](loggerCatch(_0x229d01('0x153')))):_0x32b9b5[_0x229d01('0x44')](createObjHistory(_0xb045d0,_0x33b7eb,_0x229d01('0xa5'),0x16,_0x229d01('0x162')),_0x229d01('0x17'),_0x229d01('0xd4')));}else{_0xb045d0['outboundBlacklistCallsDay']+=0x1,_0x32b9b5[_0x229d01('0x44')](createObjHistory(_0xb045d0,_0x33b7eb,_0x229d01('0x157'),0xd,_0x229d01('0x1c2')),'[Originate][historyBlacklist]',_0x229d01('0x146'));throw'inBlackList';}};},Dialer[_0x4831e9('0x83')][_0x4831e9('0x147')]=function(_0x3eb0bd){const _0x28ba27=_0x4831e9,_0x53bb3b=this;let _0x1f60c2=_0x3eb0bd[_0x28ba27('0xb')]-_0x3eb0bd[_0x28ba27('0x20e')]-_0x3eb0bd[_0x28ba27('0xfb')];emitCampaignSummary(_0x3eb0bd),_0x1f60c2>0x0&&(_0x1f60c2>this[_0x28ba27('0xbe')]&&(_0x1f60c2=this[_0x28ba27('0xbe')]),_0x3eb0bd['temp']+=_0x1f60c2,this[_0x28ba27('0x165')](_0x3eb0bd['id'],_0x1f60c2,_0x3eb0bd[_0x28ba27('0x75')])['then'](function(_0x291a8d){const _0x522790=_0x28ba27;_0x3eb0bd[_0x522790('0xfb')]-=_0x1f60c2,_0x3eb0bd[_0x522790('0xfb')]=_0x3eb0bd[_0x522790('0xfb')]>0x0?_0x3eb0bd[_0x522790('0xfb')]:0x0;if(!checkContactEmpty(_0x291a8d))_0x3eb0bd[_0x522790('0x1c9')]=_0x522790('0x19e'),logger[_0x522790('0x185')](_0x522790('0x16f')+_0x3eb0bd[_0x522790('0xe')]);else{_0x3eb0bd[_0x522790('0x20e')]+=_0x291a8d[_0x522790('0x38')],_0x3eb0bd[_0x522790('0x1c9')]='RUNNING';for(let _0x388914=0x0;_0x388914<_0x291a8d[_0x522790('0x38')];_0x388914+=0x1){_0x3eb0bd[_0x522790('0xdc')]+=0x1,_[_0x522790('0x128')](_0x291a8d[_0x388914])||_[_0x522790('0x128')](_0x291a8d[_0x388914][_0x522790('0x37')])||_[_0x522790('0x128')](_0x291a8d[_0x388914]['Contact'][_0x522790('0xc7')])?_0x53bb3b[_0x522790('0x1a6')](_0x522790('0x11c'),_0x3eb0bd,_0x291a8d[_0x388914]):_0x53bb3b[_0x522790('0xd8')](_[_0x522790('0x3a')](_0x291a8d[_0x388914],[_0x522790('0x70'),_0x522790('0x2c')]))[_0x522790('0xa1')](_0x53bb3b[_0x522790('0x112')](_0x3eb0bd,_0x291a8d[_0x388914]))[_0x522790('0xc6')](_0x53bb3b[_0x522790('0x151')]('[actionOriginateIvr]\x20',_0x3eb0bd));}}})[_0x28ba27('0xc6')](loggerGetContactDialer(_0x28ba27('0x10e'),_0x3eb0bd,_0x1f60c2)));},Dialer[_0x4831e9('0x83')][_0x4831e9('0x1')]=function(_0x20749f,_0x4a4a41){const _0x5c3e1e=_0x4831e9,_0x1ebe8c=this,_0x148e36=[];let _0x14ec4b=_0x4a4a41>=0x1?_0x4a4a41:0x1;_0x20749f['dialMethod']===_0x5c3e1e('0x88')&&(_0x14ec4b=0x1);let _0x3d388f=Math[_0x5c3e1e('0x96')](_0x20749f['available']*_0x14ec4b)-_0x20749f['originated']-_0x20749f[_0x5c3e1e('0xfb')];emitVoiceQueueSummary(_0x20749f);if(_0x20749f[_0x5c3e1e('0xd6')]>0x0){const _0x11bdb6=_0x20749f[_0x5c3e1e('0xd6')]-_0x20749f[_0x5c3e1e('0x20e')]-_0x20749f['talking']-_0x20749f[_0x5c3e1e('0xfb')]-_0x20749f['pTalking'];_0x3d388f>_0x11bdb6&&(_0x3d388f=_0x11bdb6);}if(_0x3d388f>0x0){_0x20749f[_0x5c3e1e('0x30')]==='booked'&&(_0x3d388f=0x1);_0x3d388f>this[_0x5c3e1e('0xbe')]&&(_0x3d388f=this[_0x5c3e1e('0xbe')]);_0x20749f[_0x5c3e1e('0xfb')]+=_0x3d388f;for(const _0x51dd89 in this[_0x5c3e1e('0x182')]){typeof this['agents'][_0x51dd89]!=='undefined'&&(this[_0x5c3e1e('0x182')][_0x51dd89]['state']===_0x5c3e1e('0x15a')&&this[_0x5c3e1e('0x182')][_0x51dd89][_0x5c3e1e('0x7a')]==='reachable'&&_0x148e36[_0x5c3e1e('0x15')](this[_0x5c3e1e('0x182')][_0x51dd89]['id']));}this['getContactDialer'](_0x20749f['id'],_0x148e36,_0x3d388f,_0x20749f[_0x5c3e1e('0x75')])['then'](function(_0x21921d){const _0x2f4667=_0x5c3e1e;_0x20749f[_0x2f4667('0xfb')]-=_0x3d388f,_0x20749f['temp']=_0x20749f[_0x2f4667('0xfb')]>0x0?_0x20749f['temp']:0x0;if(!checkContactEmpty(_0x21921d))_0x1ebe8c[_0x2f4667('0xc5')](_0x20749f)[_0x2f4667('0xa1')](sendMessageReschedule(_0x20749f))['catch'](loggerCatch(_0x2f4667('0x19c')));else{_0x20749f[_0x2f4667('0x20e')]+=_0x21921d[_0x2f4667('0x38')],_0x20749f[_0x2f4667('0x1c9')]=_0x20749f[_0x2f4667('0x30')]===_0x2f4667('0x88')?_0x2f4667('0x50'):_0x2f4667('0x10b');for(let _0x3f5a32=0x0;_0x3f5a32<_0x21921d[_0x2f4667('0x38')];_0x3f5a32+=0x1){_[_0x2f4667('0x128')](_0x21921d[_0x3f5a32])||_[_0x2f4667('0x128')](_0x21921d[_0x3f5a32][_0x2f4667('0x37')])||_[_0x2f4667('0x128')](_0x21921d[_0x3f5a32][_0x2f4667('0x37')][_0x2f4667('0xc7')])?_0x1ebe8c[_0x2f4667('0x1a6')](_0x2f4667('0x11c'),_0x20749f,_0x21921d[_0x3f5a32]):_0x1ebe8c['checkIsBlackList'](_[_0x2f4667('0x3a')](_0x21921d[_0x3f5a32],[_0x2f4667('0x1c6'),_0x2f4667('0x2c')]))['then'](_0x1ebe8c['checkContactBlack'](_0x20749f,_0x21921d[_0x3f5a32]))['catch'](_0x1ebe8c['loggerHandler'](_0x2f4667('0x11c'),_0x20749f));}}})['catch'](loggerGetContactDialer(_0x5c3e1e('0x21'),_0x20749f,_0x3d388f));}},Dialer[_0x4831e9('0x83')]['handlePredictive']=function(_0x1c80cc){const _0x49e5db=_0x4831e9;if(_0x1c80cc[_0x49e5db('0xd6')]>0x0){const _0x5cc8ca=_0x1c80cc[_0x49e5db('0xd6')]-_0x1c80cc[_0x49e5db('0x20e')]-_0x1c80cc[_0x49e5db('0x12f')];_0x5cc8ca>0x0?this[_0x49e5db('0x193')](_0x1c80cc):loggerPredictiveCalls['info'](_0x49e5db('0xb9'));}else this['tryOriginatePredictive'](_0x1c80cc);},Dialer[_0x4831e9('0x83')][_0x4831e9('0x193')]=function(_0x4bbc83){const _0x4f2bec=_0x4831e9,_0x4a6af6=this,_0x26acea=[];_0x4bbc83[_0x4f2bec('0x20e')]+=0x1;for(const _0x238ea9 in this[_0x4f2bec('0x182')]){typeof this[_0x4f2bec('0x182')][_0x238ea9]!==_0x4f2bec('0x199')&&(this[_0x4f2bec('0x182')][_0x238ea9][_0x4f2bec('0x1f5')]===_0x4f2bec('0x15a')&&this[_0x4f2bec('0x182')][_0x238ea9][_0x4f2bec('0x7a')]===_0x4f2bec('0x12d')&&_0x26acea[_0x4f2bec('0x15')](this[_0x4f2bec('0x182')][_0x238ea9]['id']));}this[_0x4f2bec('0x1de')](_0x4bbc83['id'],_0x26acea,0x1,_0x4bbc83[_0x4f2bec('0x75')])[_0x4f2bec('0xa1')](function(_0x567932){const _0x486d94=_0x4f2bec;!checkContactEmpty(_0x567932)?(checkContactLowerLimitOriginate(_0x4bbc83,0x1,0x0),_0x4a6af6[_0x486d94('0xc5')](_0x4bbc83)[_0x486d94('0xa1')](sendMessageReschedule(_0x4bbc83))[_0x486d94('0xc6')](loggerCatch(_0x486d94('0x19c')))):(_0x4bbc83[_0x486d94('0x1c9')]=_0x486d94('0x10b'),_[_0x486d94('0x128')](_0x567932[0x0])||_[_0x486d94('0x128')](_0x567932[0x0][_0x486d94('0x37')])||_[_0x486d94('0x128')](_0x567932[0x0][_0x486d94('0x37')][_0x486d94('0xc7')])?_0x4a6af6['emptyContact'](_0x486d94('0x11c'),_0x4bbc83,_0x567932[0x0]):_0x4a6af6[_0x486d94('0x123')](_[_0x486d94('0x3a')](_0x567932[0x0],[_0x486d94('0x1c6'),_0x486d94('0x2c')]))['then'](_0x4a6af6['checkContactBlack'](_0x4bbc83,_0x567932[0x0]))[_0x486d94('0xc6')](_0x4a6af6[_0x486d94('0x151')]('[actionOriginatePredictive]\x20',_0x4bbc83)));})['catch'](loggerGetContactDialer(_0x4f2bec('0x52'),_0x4bbc83,0x1)),emitVoiceQueueSummary(_0x4bbc83);},Dialer[_0x4831e9('0x83')][_0x4831e9('0xd9')]=function(_0x396a48,_0x5b0d31,_0x3fe96c,_0x5a913e,_0x36a7fb,_0x431f44){const _0x196c33=_0x4831e9;return loggerPredictive[_0x196c33('0x185')](_0x196c33('0xf5')),loggerPredictive[_0x196c33('0x185')](_0x196c33('0x13a'),_0x396a48),loggerPredictive[_0x196c33('0x185')]('Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x5b0d31),loggerPredictive[_0x196c33('0x185')]('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',_0x3fe96c),loggerPredictive[_0x196c33('0x185')](_0x196c33('0x3d'),_0x5a913e),loggerPredictive[_0x196c33('0x185')](_0x196c33('0x13'),_0x36a7fb),loggerPredictive[_0x196c33('0x185')]('---------------------------'),new Promise(function(_0x147e28,_0x435075){const _0x10737a=_0x196c33;if(_0x396a48<=0x0||isNaN(_0x396a48))return _0x435075(msgResponse(_0x10737a('0x5c'),_0x10737a('0x1d0'),_0x10737a('0x213')+_0x396a48));if(_0x3fe96c<=0x0||isNaN(_0x3fe96c))return _0x435075(msgResponse(_0x10737a('0x5c'),'Error',_0x10737a('0x1ef')+_0x3fe96c));if(_0x5a913e<=0x0||isNaN(_0x5a913e))return _0x435075(msgResponse('[abandonmentRate]',_0x10737a('0x1d0'),_0x10737a('0xb8')+_0x5a913e));if(_0x5b0d31<=0x0||isNaN(_0x5b0d31))return _0x435075(msgResponse(_0x10737a('0x5c'),_0x10737a('0x1d0'),'interval\x20=\x20'+_0x5b0d31));if(_0x36a7fb<=0x0||isNaN(_0x36a7fb))return _0x435075(msgResponse(_0x10737a('0x5c'),'Error',_0x10737a('0x5a')+_0x36a7fb));_0x431f44=_0x431f44||0x0;const _0x56e348=0x1/_0x3fe96c;let _0x4e64c4=0x0,_0x85adfc=0x0,_0x505610=0x0,_0x5c9065=0x0,_0xc21052=0x0;for(_0xc21052=0x0;_0x505610<_0x36a7fb;_0xc21052+=0x1){_0x85adfc=_0xc21052/_0x5b0d31,_0x4e64c4=(_0x5a913e*_0x85adfc+_0x431f44)/_0x56e348,_0x505610=erlangb(_0x4e64c4,_0x396a48),_0x5c9065=_0x4e64c4/_0x396a48*(0x1-erlangb(_0x4e64c4,_0x396a48));}return _0x147e28({'erlangCalls':_0xc21052,'erlangCallToSecond':_0x5b0d31/_0xc21052,'erlangAbandonmentRate':_0x505610,'erlangBusyFactor':_0x5c9065});});},Dialer['prototype']['busyFactor']=function(_0x205313,_0x28fd4c,_0x127cb1,_0x2d0c15,_0x49b4f2,_0x50287c){const _0x20e20a=_0x4831e9;return loggerPredictive[_0x20e20a('0x185')](_0x20e20a('0x5')),loggerPredictive[_0x20e20a('0x185')](_0x20e20a('0x13a'),_0x205313),loggerPredictive[_0x20e20a('0x185')]('Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x28fd4c),loggerPredictive[_0x20e20a('0x185')](_0x20e20a('0x140'),_0x127cb1),loggerPredictive[_0x20e20a('0x185')](_0x20e20a('0x3d'),_0x2d0c15),loggerPredictive[_0x20e20a('0x185')]('Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x49b4f2),loggerPredictive[_0x20e20a('0x185')](_0x20e20a('0xc9')),new Promise(function(_0x59ffdf,_0x4f7c83){const _0x241d9=_0x20e20a;if(_0x205313<=0x0||isNaN(_0x205313))return _0x4f7c83(msgResponse(_0x241d9('0x6b'),_0x241d9('0x1d0'),'m\x20=\x20'+_0x205313));if(_0x127cb1<=0x0||isNaN(_0x127cb1))return _0x4f7c83(msgResponse('[busyFactor]',_0x241d9('0x1d0'),'Ts\x20=\x20'+_0x127cb1));if(_0x2d0c15<=0x0||isNaN(_0x2d0c15))return _0x4f7c83(msgResponse(_0x241d9('0x6b'),'Error','p\x20=\x20'+_0x2d0c15));if(_0x28fd4c<=0x0||isNaN(_0x28fd4c))return _0x4f7c83(msgResponse('[busyFactor]','Error',_0x241d9('0xf9')+_0x28fd4c));if(_0x49b4f2<=0x0||isNaN(_0x49b4f2))return _0x4f7c83(msgResponse('[busyFactor]','Error',_0x241d9('0xae')+_0x49b4f2));_0x50287c=_0x50287c||0x0;const _0x21d9f8=0x1/_0x127cb1;let _0x18b12d=0x0,_0xeeede0=0x0,_0x387588=0x0,_0x3d94d4=0x0,_0x3cdb9e=0x0;for(_0x3cdb9e=0x0;_0x3d94d4<_0x49b4f2;_0x3cdb9e+=0x1){_0xeeede0=_0x3cdb9e/_0x28fd4c,_0x18b12d=(_0x2d0c15*_0xeeede0+_0x50287c)/_0x21d9f8,_0x387588=erlangb(_0x18b12d,_0x205313),_0x3d94d4=_0x18b12d/_0x205313*(0x1-erlangb(_0x18b12d,_0x205313));}return _0x59ffdf({'erlangCalls':_0x3cdb9e,'erlangCallToSecond':_0x28fd4c/_0x3cdb9e,'erlangAbandonmentRate':_0x387588,'erlangBusyFactor':_0x3d94d4});});},module[_0x4831e9('0x1d7')]=Dialer;