Built motion from commit (unavailable).|2.5.1
[motion2.git] / server / services / ami / dialer / index.js
index 241072a..618a06c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc326=['statedesc','HangupInAMD','AMD','[syncHangupInAMD][createHistory]','MACHINE','outboundAnswerAgiCallsDay','countglobal','[syncAgentComplete][createHistory][0]','countbusyretry','countcongestionretry','countnoanswerretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','stateGlobal','reason19\x20machine....','dialMachineMaxRetry','reason\x2019\x20machine....','add','minutes','YYYY-MM-DD\x20HH:mm:ss','[rescheduleContact][Machine]','membername','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','Machine','amd','countnosuchnumberretry','dialGlobalMaxRetry','createStateFinal','dialMachineRetryFrequency','[syncHangupIvr][createHistory]','dialQueueProject','AGI','[syncHangupIvr]','cause-txt','reason','agent','dialAgiAfterHangupAgent','[syncAgentComplete]','answertime','queueCallerAbandonCreateState','[syncAgentComplete][createHistory]','syncQueueCallerAbandon','droptime','responsetime','dialQueueTimeout','outboundDropCallsDayTimeout','dropreason','TIMEOUT','agiafterat','dialDropMaxRetry','[rescheduleContact][Drop]','Drop','endtime','calleridname','calleridnum','Abandoned','CALLEREXIT','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','[syncAgentComplete][createHistory][11]','actionid','locked','paused','stateinterface','idHopper','queueStatusComplete','[booked][unlockQueueStatus]','run','[Catch][Preview][syncQueueStatusComplete]','_rr','length','unlockRR','[booked][RR]','Agent:\x20','contactAgent-idHopper:\x20','[booked][RR][finaly]','[booked][unlock]','[unlock][syncQueueStatusComplete]','[booked][unlock2]','[unlock2][syncQueueStatusComplete]','checkIsTrunkReachable','TrunkBackup','TRUNK_IS_NOT_REACHABLE','\x20trunk\x20is\x20not\x20reachable','checkIfTime','ifTime','checkIfTimeIntervals','Failure','\x20Intervals\x20is\x20null\x20','INTERVAL_IS_EMPTY','\x20Intervals\x20is\x20empty\x20','TIMEZONE_UNKNOW','\x20Timezone\x20unknow\x20','isArray','push','command','iftime\x20%s,%s','interval','timezones','content','indexOf','true','all','some','GLOBAL_INTERVAL_IS_OVERTIME','[ifTime][promiseAll]','Global:\x20','checkDialMethod','handlePower','power','dialPowerLevel','booked','method\x20not\x20recognized','dialActive','dialGlobalInterval','dialTimezone','syncCampaigns','launchHandleIvr','[syncCampaigns]','\x5cw{0,','pow','replace','random','match','actionOriginate','Contact','phone','originate','contact\x20is\x20undefine','getCaller','\x22agi://%s/square,%s\x22','NONE','dialQueueProject2','\x22%s,%s%s,,,%s\x22','dialQueueOptions','XMD-AMDINITIALSILENCE','XMD-AMDGREETING','dialAMDGreeting','XMD-AMDAFTERGREETINGSILENCE','XMD-AMDTOTALANALYSISTIME','dialAMDTotalAnalysisTime','XMD-AMDMINWORDLENGTH','dialAMDMinWordLength','XMD-AMDBETWEENWORDSSILENCE','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','XMD-AMDSILENCETHRESHOLD','dialAMDSilenceThreshold','XMD-VOICEQUEUEID','XMD-CAMPAIGNID','tags','createdAt','updatedAt','%s%s','XMD-','dialRandomLastDigitCallerIdNumber','XMD-ORIGINATECALLERIDNAME','originatecalleridname','XMD-ORIGINATECALLERIDNUM','originatecalleridnum','SIP/%s/%s%s','substring','dialCutDigit','trim','xcally-motion-dialer','from-sip','[originateError]:\x20%s','OriginateError','[originate][error]','finally','originate\x20action\x20Error','getQueue','callProgressDetecting','checkRetriveMax','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','[rescheduleContact]\x20[Busy]','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','[rescheduleContact][NoSuchNumber]','dialDropRetryFrequency','[rescheduleContact][Abandoned]','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','[rescheduleContact][AgentReject]','object','[callProgressDetecting]','evt\x20is\x20undefine','NoSuchNumber','custom:agentnosuchnumber','buildObj','nosuchnumber','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','NoAnswer','emit','custom:agentnoanswer','[syncAgentComplete][createHistory][3]','custom:agentbusy','busy','[syncAgentComplete][createHistory][5]','dialBusyMaxRetry','reason\x205\x20busy','Congestion','congestion','[syncAgentComplete][createHistory][8]','dialCongestionMaxRetry','reason\x208\x20congestion','reason\x2011\x20abandoned','AgentReject','custom:agentreject','agentreject','[syncAgentComplete][createHistory][20]','reason\x2020\x20agentreject','contact\x20not\x20moved','dialPredictiveOptimizationPercentage','round','predictiveIntervalAvailable','predictiveIntervalMinThreshold','floor','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','check\x20handlePredictive\x20is\x20not\x20undefine','dialPredictiveInterval','[startMethodPredictive][StartProgressive][Loop]','dialPredictiveOptimization','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','Drop\x20in\x20this\x20interval','started\x20in\x20predictive\x20at','getDataPredictive','Predictive\x20after\x20first\x20interval','startMethodPredictive','Predictive\x20for\x20every\x20interval','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20more\x20than\x20threshold\x20(','abandonmentRate','[getDataPredictive]','Unknown\x20Predictive','getDataPredictiveOld','outboundQueuePauses','[CatchErlangB]','agentBusyFactor','busyFactor','check\x20failure','one\x20call\x20every:','[handlePredictive]','fail\x20to\x20scheduled\x20calls','checkContactBlack','[booked][checkContactBlack]','queueStatusComplete:\x20','[unlockOriginate][syncQueueStatusComplete]','Queue:\x20','scheduledat','Agent','voicePause','outboundReCallsDay','dialRecallInQueue','[rescheduleContact][dialRecallInQueue]','RECALLINQUEUE','[Originate][HistoryDialRecallInQueue][historyCatch]','RECALLFAILEDTIMEOUT','RecallFailedTimeout','[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]','BLACKLIST','Blacklist','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','inBlackList','handleIvr','limitCalls','temp','AVAILABLE_CONTACTS_FINISHED','[getContactCampaign2][Empty]','RUNNING','ivrTotalCallsDays','[actionOriginate]\x20','[actionOriginateIvr]\x20','[getContactCampaign2]','not_inuse','reachable','dialOrderByScheduledAt','ACTIVE','Contact.phone','[getContactDialer2]','dialLimitQueue','tryOriginatePredictive','--------\x20Drop\x20Rate\x20--------','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[abandonmentRate]','Ts\x20=\x20','p\x20=\x20','interval\x20=\x20','Amax\x20=\x20','----\x20Agent\x20Busy\x20Factor\x20----','Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[busyFactor]','m\x20=\x20','Umin\x20=\x20','util','lodash','bluebird','moment','md5','ioredis','../preview/util/util','../../../config/logger','dialer','predictive','predictiveCalls','syncQueueSummary','../ami','redis','defaults','localhost','../rpc/cmHopper','../rpc/cmHopperHistory','../rpc/voiceQueueRt','./action','./history','./final','./queueCallerAbandon','rrmemory','roundrobin','tail','sequence','preview','voiceQueues','agents','trunks','maxNumberOriginate','channels','actions','uniqueId','optionPredictive','startPredictive','startProgressive','ivrOriginated','queueBooked','queueBookedRR','syncAgentConnect','bind','originateresponse','agentcomplete','syncAgentComplete','custom:queuesummary','syncHangup','syncNewExten','queuestatuscomplete','syncQueueStatusComplete','loopCampaigns','loopClearZombieChannels','isUndefined','message','name','\x20AGENTS\x20NOT\x20LOGGED','INTERVAL_IS_NULL','\x20INTERVAL_IS_NULL','Interval','isEmpty','Intervals','[ifTime][Action]','Error','stringify','seconds','type','outbound','strategy','answered','available','loggedIn','pTalking','sumBillable','sumDuration','sumHoldTime','talking','total','unmanaged','abandoned','waiting','loggedInDb','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundNoSuchCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalTotalCalls','originated','erlangCallToSecond','erlangBusyFactor','Trunk','active','callerid','format','voice:queue:%s','voice_queue:save','campaign:ivr:%s','campaign:save','info','-----\x20Stats\x20Predictive\x20---','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAnsweredCalls','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgHoldtime','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','---------------------------','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','History\x20information\x20are\x20empty','---------\x20ErlangB\x20---------','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCalls','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangAbandonmentRate','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','merge','milliseconds','diff','clearing\x20variable\x20start\x20predictive','handlePredictive','clearing\x20variable\x20handle\x20predictive','ivr','\x22%s\x22\x20<%s>','string','\x22\x22\x20<>','error','inspect','stack','undefined','[decremetOriginate]\x20object\x20originated\x20is\x20negative','[decremetOriginate]\x20is\x20null\x20or\x20undefined','[getContactDialer2][ReScheduled]','contactsRescheduled','contacts','[getContactDialer2][Empty]','sendMessageOneNotActive','NOT_ACTIVE','[syncQueueSummary]\x20Campaign\x20Queue:\x20','is\x20not\x20active','IS_DISACTIVED','is\x20disactive','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','state','starttime','prototype','clearZombieChannels','[actions]','isNil','Action','status','channel','catch','No\x20such\x20channel','updateOriginated','campaigns','queue','countReScheduled','resolve','then','[countReScheduled]\x20','checkIsBlackList','[checkIsBlackList]\x20','checkIsBlackListIvr','[checkIsBlackListIvr]\x20','averageHandleTime','avgHandleTime','[averageHandleTime]\x20','rescheduleContact','unlockContact','[unlockContact]\x20','getContactDialer','getContactDialerIvr','getVoiceQueueRtPauses','[getVoiceQueueRtPauses]\x20','moveContactManagedDialer','[moveContactManagedDialer]\x20','createHistory','[createHistory]\x20','[updateOriginated]\x20is\x20null\x20or\x20undefined','loggerHandler','emptyContact','pick','ContactId','ListId','UserId','VoiceQueueId','CampaignId','[emptyContact][createHistory]','isSuccess','Success','isTrunkReachable','SIP/%s','unmonitored','saveInDb','syncVarSet','uniqueid','variable','exten','dialAMDActive','value','HANGUP'];(function(_0x1a406a,_0xe1c38b){var _0x5b229a=function(_0x261b7d){while(--_0x261b7d){_0x1a406a['push'](_0x1a406a['shift']());}};_0x5b229a(++_0xe1c38b);}(_0xc326,0x138));var _0x6c32=function(_0x3ff008,_0x2d04a7){_0x3ff008=_0x3ff008-0x0;var _0x18718c=_0xc326[_0x3ff008];return _0x18718c;};'use strict';var util=require(_0x6c32('0x0'));var _=require(_0x6c32('0x1'));var BPromise=require(_0x6c32('0x2'));var uuid=require('uuid');var moment=require(_0x6c32('0x3'));var rr=require('rr');var md5=require(_0x6c32('0x4'));var Redis=require(_0x6c32('0x5'));var ut=require(_0x6c32('0x6'));var config=require('../../../config/environment/');var logger=require(_0x6c32('0x7'))(_0x6c32('0x8'));var loggerBooked=require(_0x6c32('0x7'))('booked');var loggerPredictive=require('../../../config/logger')(_0x6c32('0x9'));var loggerPredictiveCalls=require(_0x6c32('0x7'))(_0x6c32('0xa'));var loggerSyncQueueSummary=require(_0x6c32('0x7'))(_0x6c32('0xb'));var ami=require(_0x6c32('0xc'));config[_0x6c32('0xd')]=_[_0x6c32('0xe')](config[_0x6c32('0xd')],{'host':_0x6c32('0xf'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x6c32('0xd')]));var cmHopper=require(_0x6c32('0x10'));var cmHopperHistory=require(_0x6c32('0x11'));var cmHopperBlack=require('../rpc/cmHopperBlack');var voiceQueueRt=require(_0x6c32('0x12'));var Action=require(_0x6c32('0x13'));var History=require(_0x6c32('0x14'));var Final=require(_0x6c32('0x15'));var AgentComplete=require('./agentComplete');var QueueCallerAbandon=require(_0x6c32('0x16'));var Hangup=require('./hangup');var ipAgi=process['env']['XCALLY_IP_AGI']||'127.0.0.1';var strategy={'rrmemory':_0x6c32('0x17'),'roundrobin':_0x6c32('0x18')};var Sequence=function(){};Sequence['prototype']['enqueue']=function(_0x3d430f){this[_0x6c32('0x19')]=this[_0x6c32('0x19')]?this['tail']['finally'](_0x3d430f):_0x3d430f();};function Dialer(_0x1b3fa9,_0x131b10){this[_0x6c32('0x1a')]=new Sequence();this[_0x6c32('0x1b')]=_0x131b10;this[_0x6c32('0x1c')]=_0x1b3fa9[_0x6c32('0x1c')];this['campaigns']=_0x1b3fa9['campaigns'];this[_0x6c32('0x1d')]=_0x1b3fa9['agents'];this[_0x6c32('0x1e')]=_0x1b3fa9[_0x6c32('0x1e')];this[_0x6c32('0x1f')]=config[_0x6c32('0x1f')]||0x2;this[_0x6c32('0x20')]={};this[_0x6c32('0x21')]={};this['contactsId']={};this[_0x6c32('0x22')]={};this[_0x6c32('0x23')]={};this[_0x6c32('0x24')]={};this[_0x6c32('0x25')]={};this[_0x6c32('0x26')]={};this[_0x6c32('0x27')]={};this[_0x6c32('0x28')]={};ami['on']('agentconnect',this[_0x6c32('0x29')][_0x6c32('0x2a')](this));ami['on']('queuecallerabandon',this['syncQueueCallerAbandon'][_0x6c32('0x2a')](this));ami['on'](_0x6c32('0x2b'),this['syncOriginateResponse']['bind'](this));ami['on'](_0x6c32('0x2c'),this[_0x6c32('0x2d')][_0x6c32('0x2a')](this));ami['on'](_0x6c32('0x2e'),this['syncQueueSummary'][_0x6c32('0x2a')](this));ami['on']('hangup',this[_0x6c32('0x2f')][_0x6c32('0x2a')](this));ami['on']('newexten',this[_0x6c32('0x30')][_0x6c32('0x2a')](this));ami['on']('varset',this['syncVarSet']['bind'](this));ami['on']('queuemember',this['syncQueueMember'][_0x6c32('0x2a')](this));ami['on'](_0x6c32('0x31'),this[_0x6c32('0x32')][_0x6c32('0x2a')](this));this[_0x6c32('0x33')]();this[_0x6c32('0x34')]();}function isNotNull(_0x662994){return _0x662994!==null&&!_[_0x6c32('0x35')](_0x662994);}function checkIsLoggedIn(_0x26340e,_0x538186){return function(){if(_0x538186<=0x0){_0x26340e[_0x6c32('0x36')]='AGENTS_NOT_LOGGED';throw _0x26340e[_0x6c32('0x37')]+_0x6c32('0x38');}};}function isActive(_0x4827c3){return _0x4827c3;}function checkIsActive(_0x135bd0,_0x396dfa){return function(){if(!isActive(_0x396dfa)){_0x135bd0['message']='NOT_ACTIVE';throw _0x135bd0[_0x6c32('0x37')]+'\x20NOT\x20Active';}};}function checkInterval(_0x1c09b3){return function(){if(!isNotNull(_0x1c09b3['Interval'])){_0x1c09b3[_0x6c32('0x36')]=_0x6c32('0x39');throw _0x1c09b3[_0x6c32('0x37')]+_0x6c32('0x3a');}if(!isNotNull(_0x1c09b3[_0x6c32('0x3b')]['Intervals'])){_0x1c09b3[_0x6c32('0x36')]='INTERVAL_IS_NULL';throw _0x1c09b3[_0x6c32('0x37')]+_0x6c32('0x3a');}if(!isNotNull(_[_0x6c32('0x3c')](_0x1c09b3[_0x6c32('0x3b')][_0x6c32('0x3d')]))){_0x1c09b3['message']=_0x6c32('0x39');throw _0x1c09b3[_0x6c32('0x37')]+_0x6c32('0x3a');}};}function msgResponse(_0x52db52,_0x36158f,_0x50c431){return{'action':_0x52db52,'response':_0x36158f,'message':_0x50c431,'stack':_0x50c431};}function myreject(_0x5898be){return function(_0x536faf){return _0x5898be(msgResponse(_0x6c32('0x3e'),_0x6c32('0x3f'),JSON[_0x6c32('0x40')](_0x536faf)));};}function getSeconds(_0x5e1a17,_0x324d0b){var _0x36f66c=moment(_0x5e1a17)['milliseconds'](0x0);var _0x1eb411=moment(_0x324d0b)['milliseconds'](0x0);return _0x36f66c['diff'](_0x1eb411,_0x6c32('0x41'));}function emit(_0x463bfc,_0x29bac2,_0x5290cc){io['to'](_0x463bfc)['emit'](_0x29bac2,_0x5290cc);}function emitVoiceQueueSummary(_0x2c473c){if(_0x2c473c[_0x6c32('0x42')]===_0x6c32('0x43')){var _0x5a2b85={'id':_0x2c473c['id'],'name':_0x2c473c[_0x6c32('0x37')],'strategy':_0x2c473c[_0x6c32('0x44')],'answered':_0x2c473c[_0x6c32('0x45')],'available':_0x2c473c[_0x6c32('0x46')],'loggedIn':_0x2c473c[_0x6c32('0x47')],'pTalking':_0x2c473c[_0x6c32('0x48')],'sumBillable':_0x2c473c[_0x6c32('0x49')],'sumDuration':_0x2c473c[_0x6c32('0x4a')],'sumHoldTime':_0x2c473c[_0x6c32('0x4b')]||0x0,'talking':_0x2c473c[_0x6c32('0x4c')],'total':_0x2c473c[_0x6c32('0x4d')],'type':_0x2c473c[_0x6c32('0x42')],'unmanaged':_0x2c473c[_0x6c32('0x4e')],'abandoned':_0x2c473c[_0x6c32('0x4f')],'waiting':_0x2c473c[_0x6c32('0x50')],'loggedInDb':_0x2c473c[_0x6c32('0x51')],'dialActive':_0x2c473c['dialActive'],'dialMethod':_0x2c473c[_0x6c32('0x52')],'dialOriginateCallerIdName':_0x2c473c[_0x6c32('0x53')],'dialOriginateCallerIdNumber':_0x2c473c[_0x6c32('0x54')],'dialOriginateTimeout':_0x2c473c[_0x6c32('0x55')],'dialPrefix':_0x2c473c[_0x6c32('0x56')],'outboundAnswerAgiCallsDay':_0x2c473c['outboundAnswerAgiCallsDay'],'outboundAnswerCallsDay':_0x2c473c[_0x6c32('0x57')],'outboundBlacklistCallsDay':_0x2c473c[_0x6c32('0x58')],'outboundBusyCallsDay':_0x2c473c[_0x6c32('0x59')],'outboundCongestionCallsDay':_0x2c473c[_0x6c32('0x5a')],'outboundDropCallsDayACS':_0x2c473c[_0x6c32('0x5b')],'outboundDropCallsDayCallersExit':_0x2c473c[_0x6c32('0x5c')],'outboundDropCallsDayTimeout':_0x2c473c['outboundDropCallsDayTimeout'],'outboundNoAnswerCallsDay':_0x2c473c['outboundNoAnswerCallsDay'],'outboundNoSuchCallsDay':_0x2c473c[_0x6c32('0x5d')],'outboundOriginateFailureCallsDay':_0x2c473c['outboundOriginateFailureCallsDay'],'outboundReCallsDay':_0x2c473c['outboundReCallsDay'],'outboundRejectCallsDay':_0x2c473c[_0x6c32('0x5e')],'outboundUnknownCallsDay':_0x2c473c[_0x6c32('0x5f')],'predictiveIntervalAnsweredCalls':_0x2c473c['predictiveIntervalAnsweredCalls'],'predictiveIntervalAvgHoldtime':_0x2c473c['predictiveIntervalAvgHoldtime'],'predictiveIntervalAvgTalktime':_0x2c473c[_0x6c32('0x60')],'predictiveIntervalDroppedCallsCallersExit':_0x2c473c[_0x6c32('0x61')],'predictiveIntervalDroppedCallsTimeout':_0x2c473c[_0x6c32('0x62')],'predictiveIntervalErlangCalls':_0x2c473c[_0x6c32('0x63')],'predictiveIntervalErlangCallsDroppedCalls':_0x2c473c[_0x6c32('0x64')],'predictiveIntervalHitRate':_0x2c473c[_0x6c32('0x65')],'predictiveIntervalMultiplicativeFactor':_0x2c473c[_0x6c32('0x66')],'predictiveIntervalPauses':_0x2c473c[_0x6c32('0x67')],'predictiveIntervalAvailable':_0x2c473c['predictiveIntervalAvailable'],'predictiveIntervalTotalCalls':_0x2c473c[_0x6c32('0x68')],'message':_0x2c473c[_0x6c32('0x36')],'originated':_0x2c473c[_0x6c32('0x69')],'erlangCalls':_0x2c473c['erlangCalls'],'erlangCallToSecond':_0x2c473c[_0x6c32('0x6a')],'erlangAbandonmentRate':_0x2c473c['erlangAbandonmentRate'],'erlangBusyFactor':_0x2c473c[_0x6c32('0x6b')],'startPredictive':_0x2c473c[_0x6c32('0x24')],'startProgressive':_0x2c473c[_0x6c32('0x25')]};if(_0x2c473c['Trunk']){_0x5a2b85[_0x6c32('0x6c')]={'id':_0x2c473c[_0x6c32('0x6c')]['id'],'name':_0x2c473c['Trunk'][_0x6c32('0x37')],'active':_0x2c473c['Trunk'][_0x6c32('0x6d')],'callerid':_0x2c473c[_0x6c32('0x6c')][_0x6c32('0x6e')]};}if(_0x2c473c[_0x6c32('0x3b')]){_0x5a2b85[_0x6c32('0x3b')]={'id':_0x2c473c['Interval']['id'],'name':_0x2c473c[_0x6c32('0x3b')][_0x6c32('0x37')]};}var _0x1023ba=md5(JSON['stringify'](_0x5a2b85));if(_0x2c473c[_0x6c32('0x4')]!==_0x1023ba){_0x2c473c['md5']=_0x1023ba;emit(util[_0x6c32('0x6f')](_0x6c32('0x70'),_0x5a2b85[_0x6c32('0x37')]),_0x6c32('0x71'),_0x5a2b85);}}}function emitCampaignSummary(_0x2426af){if(_0x2426af[_0x6c32('0x42')]==='ivr'){emit(util[_0x6c32('0x6f')](_0x6c32('0x72'),_0x2426af[_0x6c32('0x37')]),_0x6c32('0x73'),_0x2426af);}}function checkGetDataPredictive(_0xb04a45){if(isNotNull(_0xb04a45)&&!_[_0x6c32('0x3c')](_0xb04a45)){loggerPredictive[_0x6c32('0x74')](_0x6c32('0x75'));loggerPredictive['info']('Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0xb04a45[_0x6c32('0x68')]);loggerPredictive[_0x6c32('0x74')](_0x6c32('0x76'),_0xb04a45[_0x6c32('0x77')]);loggerPredictive[_0x6c32('0x74')](_0x6c32('0x78'),_0xb04a45['predictiveIntervalDroppedCallsTimeout']);loggerPredictive[_0x6c32('0x74')](_0x6c32('0x79'),_0xb04a45[_0x6c32('0x61')]);loggerPredictive[_0x6c32('0x74')](_0x6c32('0x7a'),_0xb04a45[_0x6c32('0x7b')]);loggerPredictive['info'](_0x6c32('0x7c'),_0xb04a45[_0x6c32('0x60')]);loggerPredictive[_0x6c32('0x74')](_0x6c32('0x7d'));if(_0xb04a45['predictiveIntervalTotalCalls']>0x0){if(!_[_0x6c32('0x35')](_0xb04a45[_0x6c32('0x60')])&&_0xb04a45[_0x6c32('0x60')]>0x0){return!![];}loggerPredictive['info']('Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive');if(!_[_0x6c32('0x35')](_0xb04a45['predictiveIntervalAvgHoldtime'])&&_0xb04a45[_0x6c32('0x7b')]>0x0){return!![];}loggerPredictive[_0x6c32('0x74')](_0x6c32('0x7e'));}else{loggerPredictive[_0x6c32('0x74')](_0x6c32('0x7f'));}}else{loggerPredictive['info'](_0x6c32('0x80'));}return![];}function mergeDataErlangB(_0x1db864){return function(_0x37554f){loggerPredictive[_0x6c32('0x74')](_0x6c32('0x81'));loggerPredictive[_0x6c32('0x74')](_0x6c32('0x82'),_0x37554f[_0x6c32('0x83')]);loggerPredictive[_0x6c32('0x74')](_0x6c32('0x84'),_0x37554f[_0x6c32('0x6a')]);loggerPredictive[_0x6c32('0x74')](_0x6c32('0x85'),_0x37554f[_0x6c32('0x86')]);loggerPredictive[_0x6c32('0x74')](_0x6c32('0x87'),_0x37554f[_0x6c32('0x6b')]);loggerPredictive[_0x6c32('0x74')](_0x6c32('0x85'),_0x37554f['erlangAbandonmentRate']);loggerPredictive[_0x6c32('0x74')](_0x6c32('0x7d'));_[_0x6c32('0x88')](_0x1db864,_0x37554f);};}function getDiff(_0x272a39){var _0x1bd743=moment()[_0x6c32('0x89')](0x0);var _0x6391e7=moment(_0x272a39)[_0x6c32('0x89')](0x0);return _0x1bd743[_0x6c32('0x8a')](_0x6391e7,_0x6c32('0x41'));}function ifInterval(_0x159ad0,_0x6297a2){if(_['isUndefined'](_0x6297a2)){return![];}return getDiff(_0x6297a2)<_0x159ad0*0x3c;}function freeVariablesPredictive(_0x5b4367){if(isNotNull(_0x5b4367)){if(!_[_0x6c32('0x35')](_0x5b4367[_0x6c32('0x25')])){_0x5b4367[_0x6c32('0x25')]=undefined;loggerPredictive['info'](_0x5b4367[_0x6c32('0x37')],'clearing\x20variable\x20start\x20progressive');}if(!_[_0x6c32('0x35')](_0x5b4367[_0x6c32('0x24')])){_0x5b4367[_0x6c32('0x24')]=undefined;loggerPredictive['info'](_0x5b4367[_0x6c32('0x37')],_0x6c32('0x8b'));}if(!_[_0x6c32('0x35')](_0x5b4367[_0x6c32('0x8c')])){clearInterval(_0x5b4367['handlePredictive']);_0x5b4367[_0x6c32('0x8c')]=undefined;loggerPredictive[_0x6c32('0x74')](_0x5b4367[_0x6c32('0x37')],_0x6c32('0x8d'));}}}function erlangb(_0x5d8cc6,_0x3b22b8){if(_0x3b22b8===0x0){return 0x0;}var _0xacca1c=0x1;for(var _0x2f5109=0x1;_0x2f5109<=_0x3b22b8;_0x2f5109+=0x1){_0xacca1c=0x1+_0xacca1c*_0x2f5109/_0x5d8cc6;}return 0x1/_0xacca1c;}function isVoiceQueueOutbound(_0x457dd9){return _0x457dd9==='outbound';}function isNotPreview(_0x119a48){return _0x119a48!==_0x6c32('0x1b');}function isCampaignIvr(_0x547fc9){return _0x547fc9===_0x6c32('0x8e');}function getCallerId(_0x3b57d7,_0x265125,_0x1bc6d6){if(!_[_0x6c32('0x35')](_0x1bc6d6)&&typeof _0x1bc6d6==='string'&&!_[_0x6c32('0x3c')](_0x1bc6d6)){if(!_[_0x6c32('0x35')](_0x265125)&&typeof _0x265125==='string'&&!_[_0x6c32('0x3c')](_0x265125)){return util[_0x6c32('0x6f')](_0x6c32('0x8f'),_0x265125,_0x1bc6d6);}return util['format'](_0x6c32('0x8f'),_0x1bc6d6,_0x1bc6d6);}if(!_['isUndefined'](_0x3b57d7)&&typeof _0x3b57d7===_0x6c32('0x90')&&!_[_0x6c32('0x3c')](_0x3b57d7)){return _0x3b57d7;}return _0x6c32('0x91');}function loggerCatchQueueSummary(_0x46c5e9,_0x199a5b){return function(_0x9e7c9a){freeVariablesPredictive(_0x199a5b);emitVoiceQueueSummary(_0x199a5b);emitCampaignSummary(_0x199a5b);loggerSyncQueueSummary[_0x6c32('0x92')](_0x46c5e9,util[_0x6c32('0x93')](_0x9e7c9a,{'showHidden':![],'depth':null}));};}function loggerCatchPredictive(_0x3797ce,_0x24a7df){return function(_0x5433a8){loggerPredictive[_0x6c32('0x92')](_0x24a7df[_0x6c32('0x37')],_0x3797ce);loggerPredictive[_0x6c32('0x92')](_0x5433a8[_0x6c32('0x94')]);freeVariablesPredictive(_0x24a7df);};}function loggerCatch(_0x459a2f){return function(_0x1d1d57){logger[_0x6c32('0x92')](_0x459a2f,util['inspect'](_0x1d1d57,{'showHidden':![],'depth':null}));};}function checkContactEmpty(_0x14a383){return _0x14a383&&!_['isUndefined'](_0x14a383)&&_0x14a383['length']>0x0;}function decremetOriginate(_0x318e36){if(!_[_0x6c32('0x35')](_0x318e36)&&_0x318e36!==null){if(typeof _0x318e36[_0x6c32('0x69')]!==_0x6c32('0x95')){if(_0x318e36[_0x6c32('0x69')]>0x0){_0x318e36[_0x6c32('0x69')]-=0x1;}else{logger[_0x6c32('0x92')](_0x6c32('0x96'));}}}else{logger['error'](_0x6c32('0x97'));}}function checkContactLowerLimitOriginate(_0x541cb6,_0x41a7db,_0x1e561e){if(_0x41a7db>_0x1e561e){for(var _0x4165e7=0x0;_0x4165e7<_0x41a7db-_0x1e561e;_0x4165e7+=0x1){decremetOriginate(_0x541cb6);}}}function loggerGetContactDialer(_0x1b63ad,_0x41e7f8,_0x3d813e){return function(_0x1a53e9){checkContactLowerLimitOriginate(_0x41e7f8,_0x3d813e,0x0);logger[_0x6c32('0x92')](_0x1b63ad,util['inspect'](_0x1a53e9,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x36d05e){return function(_0xfa501a){if(isNotNull(_0xfa501a)&&isNotNull(_0xfa501a[0x0])){if(_0xfa501a[0x0]['contactsRescheduled']>0x0){_0x36d05e[_0x6c32('0x36')]='RESCHEDULED_CONTACTS';logger['info'](_0x6c32('0x98')+_0x36d05e[_0x6c32('0x37')],_0xfa501a[0x0][_0x6c32('0x99')],_0x6c32('0x9a'));}else{_0x36d05e[_0x6c32('0x36')]='AVAILABLE_CONTACTS_FINISHED';logger[_0x6c32('0x74')](_0x6c32('0x9b')+_0x36d05e['name']);}}};}function notSendMessagesQueue(_0x4b19e2){if(_0x4b19e2[_0x6c32('0x9c')]){freeVariablesPredictive(_0x4b19e2);if(_0x4b19e2['originated']===0x0&&_0x4b19e2[_0x6c32('0x4c')]===0x0&&_0x4b19e2[_0x6c32('0x50')]===0x0&&(_0x4b19e2[_0x6c32('0x48')]||0x0)===0x0){_0x4b19e2[_0x6c32('0x9c')]=![];_0x4b19e2[_0x6c32('0x46')]=0x0;_0x4b19e2[_0x6c32('0x36')]=_0x6c32('0x9d');loggerSyncQueueSummary['error'](_0x6c32('0x9e'),_0x4b19e2['name'],_0x6c32('0x9f'));}else{_0x4b19e2[_0x6c32('0x36')]=_0x6c32('0xa0');loggerSyncQueueSummary[_0x6c32('0x92')](_0x6c32('0x9e'),_0x4b19e2[_0x6c32('0x37')],_0x6c32('0xa1'));}emitVoiceQueueSummary(_0x4b19e2);}}function notSendMessagesCampaign(_0x1035da){if(_0x1035da[_0x6c32('0x9c')]){if(_0x1035da[_0x6c32('0x69')]===0x0){_0x1035da[_0x6c32('0x9c')]=![];_0x1035da[_0x6c32('0x36')]=_0x6c32('0x9d');loggerSyncQueueSummary[_0x6c32('0x92')](_0x6c32('0xa2'),_0x1035da[_0x6c32('0x37')],'is\x20not\x20active');}else{_0x1035da[_0x6c32('0x36')]='IS_DISACTIVED';loggerSyncQueueSummary[_0x6c32('0x92')]('[syncQueueSummary]\x20Campaign\x20Ivr:\x20',_0x1035da[_0x6c32('0x37')],_0x6c32('0xa1'));}emitCampaignSummary(_0x1035da);}}function createObjHistory(_0x5a05ca,_0x29cc97,_0x5e831c,_0x34850c,_0x17928e){_0x5a05ca[_0x6c32('0x36')]=_0x5e831c;var _0x26ba6f=new Action(_0x5a05ca,_0x29cc97);var _0x1dffcd=new History(_0x26ba6f);_0x1dffcd[_0x6c32('0xa3')]=_0x34850c;_0x1dffcd['statedesc']=_0x17928e;_0x1dffcd['endtime']=_0x26ba6f[_0x6c32('0xa4')];return _0x1dffcd;}Dialer[_0x6c32('0xa5')][_0x6c32('0x34')]=function(){var _0x37ff64=this;setInterval(function(){_0x37ff64[_0x6c32('0xa6')](_0x37ff64[_0x6c32('0x22')],'[uniqueid]');_0x37ff64[_0x6c32('0xa6')](_0x37ff64[_0x6c32('0x21')],_0x6c32('0xa7'));},0x32c8);};Dialer[_0x6c32('0xa5')][_0x6c32('0xa6')]=function(_0x5306c5,_0x119f62){var _0x293565=this;for(var _0x5c51fb in _0x5306c5){if(typeof _0x5306c5[_0x5c51fb]!=='undefined'){this[_0x6c32('0x1a')]['enqueue'](function(){if(!_[_0x6c32('0xa8')](_0x5306c5[_0x5c51fb])){return ami[_0x6c32('0xa9')]({'action':_0x6c32('0xaa'),'channel':_0x5306c5[_0x5c51fb][_0x6c32('0xab')]})[_0x6c32('0xac')](function(_0x1aa9d1){if(_0x1aa9d1[_0x6c32('0x36')]===_0x6c32('0xad')){setTimeout(function(){if(_0x5306c5[_0x5c51fb]&&_0x5306c5[_0x5c51fb][_0x6c32('0x42')]!==_0x6c32('0x8e')){_0x293565[_0x6c32('0xae')](_0x293565[_0x6c32('0x1c')][_0x5306c5[_0x5c51fb]['queue']]);logger[_0x6c32('0x92')]('[Dialer][checkChannel]',_0x119f62,_0x5c51fb,_0x5306c5[_0x5c51fb]['queue']);delete _0x5306c5[_0x5c51fb];}if(_0x5306c5[_0x5c51fb]&&_0x5306c5[_0x5c51fb]['type']===_0x6c32('0x8e')){_0x293565[_0x6c32('0xae')](_0x293565[_0x6c32('0xaf')][_0x5306c5[_0x5c51fb][_0x6c32('0xb0')]]);logger[_0x6c32('0x92')]('[Dialer][checkChannel][ivr]',_0x119f62,_0x5c51fb,_0x5306c5[_0x5c51fb][_0x6c32('0xb0')]);delete _0x5306c5[_0x5c51fb];}},0x2328);}});}});}}};Dialer[_0x6c32('0xa5')][_0x6c32('0xb1')]=function(_0x56071a){return BPromise[_0x6c32('0xb2')]()[_0x6c32('0xb3')](cmHopper[_0x6c32('0xb1')](_0x56071a))[_0x6c32('0xac')](loggerCatch(_0x6c32('0xb4')));};Dialer[_0x6c32('0xa5')][_0x6c32('0xb5')]=function(_0x5864dc){return BPromise[_0x6c32('0xb2')]()[_0x6c32('0xb3')](cmHopperBlack[_0x6c32('0xb5')](_0x5864dc))[_0x6c32('0xac')](loggerCatch(_0x6c32('0xb6')));};Dialer[_0x6c32('0xa5')][_0x6c32('0xb7')]=function(_0x933ef1){return BPromise['resolve']()[_0x6c32('0xb3')](cmHopperBlack[_0x6c32('0xb7')](_0x933ef1))[_0x6c32('0xac')](loggerCatch(_0x6c32('0xb8')));};Dialer[_0x6c32('0xa5')][_0x6c32('0xb9')]=function(_0x14a9c4){return BPromise[_0x6c32('0xb2')]()[_0x6c32('0xb3')](cmHopperHistory[_0x6c32('0xba')](_0x14a9c4))[_0x6c32('0xac')](loggerCatch(_0x6c32('0xbb')));};Dialer[_0x6c32('0xa5')][_0x6c32('0xbc')]=function(_0x5ab88a){return BPromise['resolve']()['then'](cmHopper[_0x6c32('0xbc')](_0x5ab88a))['catch'](loggerCatch('[rescheduleContact]\x20'));};Dialer[_0x6c32('0xa5')][_0x6c32('0xbd')]=function(_0x3c17f1,_0x4d8c89,_0xca86b9){return BPromise['resolve']()[_0x6c32('0xb3')](cmHopper['unlockContact'](_0x3c17f1,_0x4d8c89,_0xca86b9))[_0x6c32('0xac')](loggerCatch(_0x6c32('0xbe')));};Dialer['prototype'][_0x6c32('0xbf')]=function(_0x3bd2f0,_0x2b3c03,_0xafcdfc,_0x2858fc){return BPromise[_0x6c32('0xb2')]()[_0x6c32('0xb3')](cmHopper['getContactDialer'](_0x3bd2f0,_0x2b3c03,_0xafcdfc,_0x2858fc))['catch'](loggerCatch('[getContactDialer]\x20'));};Dialer[_0x6c32('0xa5')][_0x6c32('0xc0')]=function(_0x1b7328,_0x249474,_0x3adcb9){return BPromise['resolve']()[_0x6c32('0xb3')](cmHopper['getContactDialerIvr'](_0x1b7328,_0x249474,_0x3adcb9))[_0x6c32('0xac')](loggerCatch('[getContactDialer]\x20'));};Dialer['prototype']['getVoiceQueueRtPauses']=function(_0x1359a2){return BPromise['resolve']()[_0x6c32('0xb3')](voiceQueueRt[_0x6c32('0xc1')](_0x1359a2))[_0x6c32('0xac')](loggerCatch(_0x6c32('0xc2')));};Dialer[_0x6c32('0xa5')][_0x6c32('0xc3')]=function(_0x1c603b){return BPromise[_0x6c32('0xb2')]()[_0x6c32('0xb3')](cmHopper['moveContactManagedDialer'](_0x1c603b))[_0x6c32('0xac')](loggerCatch(_0x6c32('0xc4')));};Dialer[_0x6c32('0xa5')][_0x6c32('0xc5')]=function(_0x2890d3){return BPromise[_0x6c32('0xb2')]()[_0x6c32('0xb3')](cmHopperHistory[_0x6c32('0xc5')](_0x2890d3))[_0x6c32('0xac')](loggerCatch(_0x6c32('0xc6')));};Dialer[_0x6c32('0xa5')][_0x6c32('0xae')]=function(_0x1a12f0){if(!_[_0x6c32('0x35')](_0x1a12f0)&&_0x1a12f0!==null){if(typeof _0x1a12f0[_0x6c32('0x69')]!==_0x6c32('0x95')){if(_0x1a12f0[_0x6c32('0x69')]>0x0){_0x1a12f0[_0x6c32('0x69')]-=0x1;}else{logger[_0x6c32('0x92')]('[updateOriginated]\x20object\x20originated\x20is\x20negative');}}}else{logger[_0x6c32('0x92')](_0x6c32('0xc7'));}};Dialer[_0x6c32('0xa5')][_0x6c32('0xc8')]=function(_0x4b720a,_0x4b641b){var _0x2a588e=this;return function(_0xd070d8){_0x2a588e['updateOriginated'](_0x4b641b);logger['error'](_0x4b720a,util['inspect'](_0xd070d8,{'showHidden':![],'depth':null}));};};Dialer[_0x6c32('0xa5')][_0x6c32('0xc9')]=function(_0x341323,_0x463bb8,_0x5f3fcf){var _0x4c0f92={'state':0x19,'statedesc':'notFound'};this[_0x6c32('0xae')](_0x463bb8);this['saveInDb'](_['merge'](_0x4c0f92,_[_0x6c32('0xca')](_0x5f3fcf,[_0x6c32('0xcb'),_0x6c32('0xcc'),_0x6c32('0xcd'),_0x6c32('0xce'),_0x6c32('0xcf')])),_0x6c32('0xd0'),'[emptyContact]');logger[_0x6c32('0x92')](_0x341323);};Dialer[_0x6c32('0xa5')][_0x6c32('0xd1')]=function(_0x53cd49){return _0x53cd49===_0x6c32('0xd2');};Dialer[_0x6c32('0xa5')][_0x6c32('0xd3')]=function(_0x5eb3b4){return!_['isUndefined'](_0x5eb3b4)&&_0x5eb3b4&&!_['isUndefined'](_0x5eb3b4['name'])&&!_[_0x6c32('0x35')](_0x5eb3b4[_0x6c32('0x6d')])&&_0x5eb3b4['active']&&(this['trunks'][util[_0x6c32('0x6f')](_0x6c32('0xd4'),_0x5eb3b4[_0x6c32('0x37')])]['status']==='reachable'||this[_0x6c32('0x1e')][util[_0x6c32('0x6f')](_0x6c32('0xd4'),_0x5eb3b4[_0x6c32('0x37')])][_0x6c32('0xaa')]===_0x6c32('0xd5'));};Dialer[_0x6c32('0xa5')][_0x6c32('0xd6')]=function(_0xe04bea,_0x52d4b1,_0x15cc89){this['createHistory'](_0xe04bea)[_0x6c32('0xac')](loggerCatch(_0x52d4b1));this[_0x6c32('0xc3')](_0xe04bea)[_0x6c32('0xac')](loggerCatch(_0x15cc89));};Dialer[_0x6c32('0xa5')][_0x6c32('0xd7')]=function(_0x233a6e){var _0x4543e4=this['uniqueId'][_0x233a6e[_0x6c32('0xd8')]];var _0x9fdd8d;if(!_['isNil'](_0x233a6e)&&!_[_0x6c32('0xa8')](_0x233a6e[_0x6c32('0xd9')])&&!_['isNil'](_0x233a6e[_0x6c32('0xd9')]['amdstatus'])&&_0x233a6e[_0x6c32('0xda')]==='xcally-motion-dialer'&&_0x4543e4){if(_0x4543e4[_0x6c32('0x42')]!==_0x6c32('0x8e')&&this[_0x6c32('0x1c')][_0x4543e4['queue']][_0x6c32('0xdb')]&&_0x233a6e[_0x6c32('0xdc')]===_0x6c32('0xdd')){delete this[_0x6c32('0x22')][_0x233a6e['uniqueid']];this[_0x6c32('0xae')](this[_0x6c32('0x1c')][_0x4543e4[_0x6c32('0xb0')]]);this[_0x6c32('0x1c')][_0x4543e4[_0x6c32('0xb0')]][_0x6c32('0x57')]+=0x1;this[_0x6c32('0x1c')][_0x4543e4[_0x6c32('0xb0')]]['outboundAnswerAgiCallsDay']+=0x1;_0x9fdd8d=new Hangup(_0x4543e4,_0x233a6e);_0x9fdd8d[_0x6c32('0xa3')]=0x12;_0x9fdd8d[_0x6c32('0xde')]=_0x6c32('0xdf');_0x9fdd8d['membername']=_0x6c32('0xe0');this[_0x6c32('0xd6')](_0x9fdd8d,_0x6c32('0xe1'),'[syncHangupInAMD]');}if(_0x4543e4[_0x6c32('0x42')]!==_0x6c32('0x8e')&&this[_0x6c32('0x1c')][_0x4543e4[_0x6c32('0xb0')]][_0x6c32('0xdb')]&&_0x233a6e[_0x6c32('0xdc')]===_0x6c32('0xe2')){var _0x6b2764=this;return new BPromise(function(_0x12085f,_0x153862){delete _0x6b2764[_0x6c32('0x22')][_0x233a6e[_0x6c32('0xd8')]];_0x6b2764[_0x6c32('0xae')](_0x6b2764[_0x6c32('0x1c')][_0x4543e4[_0x6c32('0xb0')]]);_0x6b2764['voiceQueues'][_0x4543e4[_0x6c32('0xb0')]][_0x6c32('0x57')]+=0x1;_0x6b2764[_0x6c32('0x1c')][_0x4543e4[_0x6c32('0xb0')]][_0x6c32('0xe3')]+=0x1;var _0x39df2a=_0x6b2764[_0x6c32('0x1c')][_0x4543e4[_0x6c32('0xb0')]];var _0x5b3f2e=new Hangup(_0x4543e4,_0x233a6e);_0x5b3f2e[_0x6c32('0xa3')]=0x13;_0x5b3f2e[_0x6c32('0xde')]='Machine';_0x5b3f2e['membername']=_0x6c32('0xe0');_0x5b3f2e['countmachineretry']+=0x1;_0x5b3f2e[_0x6c32('0xe4')]+=0x1;_0x5b3f2e['amd']=!![];_0x6b2764['createHistory'](_0x5b3f2e)[_0x6c32('0xac')](loggerCatch(_0x6c32('0xe5')));if(_0x5b3f2e[_0x6c32('0xe6')]+_0x5b3f2e[_0x6c32('0xe7')]+_0x5b3f2e[_0x6c32('0xe8')]+_0x5b3f2e['countnosuchnumberretry']+_0x5b3f2e[_0x6c32('0xe9')]+_0x5b3f2e[_0x6c32('0xea')]+_0x5b3f2e[_0x6c32('0xeb')]+_0x5b3f2e[_0x6c32('0xec')]>=_0x39df2a['dialGlobalMaxRetry']){_0x6b2764[_0x6c32('0xed')](_0x5b3f2e,_0x12085f,_0x153862,_0x6c32('0xee'));}else{if(_0x5b3f2e[_0x6c32('0xeb')]>=_0x39df2a[_0x6c32('0xef')]){_0x6b2764['createStateFinal'](_0x5b3f2e,_0x12085f,_0x153862,_0x6c32('0xf0'));}else{_0x6b2764['rescheduleContact']({'active':![],'countmachineretry':_0x5b3f2e[_0x6c32('0xeb')],'scheduledat':moment()[_0x6c32('0xf1')](_0x39df2a['dialMachineRetryFrequency'],_0x6c32('0xf2'))['format'](_0x6c32('0xf3')),'ContactId':_0x5b3f2e[_0x6c32('0xcb')],'ListId':_0x5b3f2e[_0x6c32('0xcc')],'VoiceQueueId':_0x5b3f2e['VoiceQueueId']||undefined,'CampaignId':_0x5b3f2e[_0x6c32('0xcf')]||undefined})[_0x6c32('0xac')](loggerCatch(_0x6c32('0xf4')));_0x12085f({'reschedule':0x1});}}});}if(_0x4543e4[_0x6c32('0x42')]===_0x6c32('0x8e')&&this[_0x6c32('0xaf')][_0x4543e4[_0x6c32('0xb0')]]['dialAMDActive']&&_0x233a6e['value']===_0x6c32('0xdd')){delete this[_0x6c32('0x22')][_0x233a6e['uniqueid']];this[_0x6c32('0xae')](this[_0x6c32('0xaf')][_0x4543e4[_0x6c32('0xb0')]]);_0x9fdd8d=new Hangup(_0x4543e4,_0x233a6e);_0x9fdd8d[_0x6c32('0xa3')]=0x12;_0x9fdd8d[_0x6c32('0xde')]=_0x6c32('0xdf');_0x9fdd8d[_0x6c32('0xf5')]='AMD';this['saveInDb'](_0x9fdd8d,_0x6c32('0xf6'),_0x6c32('0xf7'));}if(_0x4543e4[_0x6c32('0x42')]===_0x6c32('0x8e')&&this['campaigns'][_0x4543e4[_0x6c32('0xb0')]]['dialAMDActive']&&_0x233a6e[_0x6c32('0xdc')]==='MACHINE'){var _0x6b2764=this;return new BPromise(function(_0x3ffc94,_0x2c24db){delete _0x6b2764[_0x6c32('0x22')][_0x233a6e['uniqueid']];_0x6b2764[_0x6c32('0xae')](_0x6b2764[_0x6c32('0xaf')][_0x4543e4[_0x6c32('0xb0')]]);_0x6b2764[_0x6c32('0xaf')][_0x4543e4[_0x6c32('0xb0')]][_0x6c32('0x57')]+=0x1;_0x6b2764['campaigns'][_0x4543e4[_0x6c32('0xb0')]]['outboundAnswerAgiCallsDay']+=0x1;var _0x2fe2ab=_0x6b2764[_0x6c32('0xaf')][_0x4543e4['queue']];var _0x3ce356=new Hangup(_0x4543e4,_0x233a6e);_0x3ce356[_0x6c32('0xa3')]=0x13;_0x3ce356['statedesc']=_0x6c32('0xf8');_0x3ce356[_0x6c32('0xf5')]=_0x6c32('0xe0');_0x3ce356['countmachineretry']+=0x1;_0x3ce356['countglobal']+=0x1;_0x3ce356[_0x6c32('0xf9')]=!![];_0x6b2764['createHistory'](_0x3ce356)[_0x6c32('0xac')](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x3ce356[_0x6c32('0xe6')]+_0x3ce356[_0x6c32('0xe7')]+_0x3ce356['countnoanswerretry']+_0x3ce356[_0x6c32('0xfa')]+_0x3ce356[_0x6c32('0xe9')]+_0x3ce356[_0x6c32('0xea')]+_0x3ce356[_0x6c32('0xeb')]+_0x3ce356[_0x6c32('0xec')]>=_0x2fe2ab[_0x6c32('0xfb')]){_0x6b2764['stateGlobal'](_0x3ce356,_0x3ffc94,_0x2c24db,_0x6c32('0xee'));}else{if(_0x3ce356['countmachineretry']>=_0x2fe2ab['dialMachineMaxRetry']){_0x6b2764[_0x6c32('0xfc')](_0x3ce356,_0x3ffc94,_0x2c24db,'reason\x2019\x20machine....');}else{_0x6b2764['rescheduleContact']({'active':![],'countmachineretry':_0x3ce356[_0x6c32('0xeb')],'scheduledat':moment()[_0x6c32('0xf1')](_0x2fe2ab[_0x6c32('0xfd')],_0x6c32('0xf2'))[_0x6c32('0x6f')](_0x6c32('0xf3')),'ContactId':_0x3ce356[_0x6c32('0xcb')],'ListId':_0x3ce356[_0x6c32('0xcc')],'VoiceQueueId':_0x3ce356['VoiceQueueId']||undefined,'CampaignId':_0x3ce356['CampaignId']||undefined})['catch'](loggerCatch(_0x6c32('0xf4')));_0x3ffc94({'reschedule':0x1});}}});}}};Dialer[_0x6c32('0xa5')][_0x6c32('0x2f')]=function(_0x53b282){var _0x1f6e78=this[_0x6c32('0x22')][_0x53b282['uniqueid']];var _0x116416=this;var _0x52c17a;if(_0x1f6e78&&_0x1f6e78['type']===_0x6c32('0x8e')){delete this[_0x6c32('0x22')][_0x53b282[_0x6c32('0xd8')]];this[_0x6c32('0xae')](this[_0x6c32('0xaf')][_0x1f6e78[_0x6c32('0xb0')]]);this[_0x6c32('0xaf')][_0x1f6e78['queue']]['ivrAnswerCallsDay']+=0x1;_0x52c17a=new Hangup(_0x1f6e78,_0x53b282);this[_0x6c32('0xc5')](_0x52c17a)['catch'](loggerCatch(_0x6c32('0xfe')));this[_0x6c32('0xc3')](_0x52c17a)[_0x6c32('0xac')](loggerCatch('[syncHangupIvr]'));}if(_0x1f6e78&&_0x1f6e78[_0x6c32('0x42')]!==_0x6c32('0x8e')&&isNotNull(this[_0x6c32('0x1c')][_0x1f6e78['queue']][_0x6c32('0xff')])){delete this[_0x6c32('0x22')][_0x53b282['uniqueid']];this['updateOriginated'](this[_0x6c32('0x1c')][_0x1f6e78[_0x6c32('0xb0')]]);this[_0x6c32('0x1c')][_0x1f6e78[_0x6c32('0xb0')]][_0x6c32('0x57')]+=0x1;this[_0x6c32('0x1c')][_0x1f6e78[_0x6c32('0xb0')]]['outboundAnswerAgiCallsDay']+=0x1;_0x52c17a=new Hangup(_0x1f6e78,_0x53b282);_0x52c17a[_0x6c32('0xa3')]=0x10;_0x52c17a[_0x6c32('0xde')]='AnswerAGI';_0x52c17a[_0x6c32('0xf5')]=_0x6c32('0x100');this[_0x6c32('0xc5')](_0x52c17a)['catch'](loggerCatch('[syncHangupIvr][createHistory]'));this[_0x6c32('0xc3')](_0x52c17a)[_0x6c32('0xac')](loggerCatch(_0x6c32('0x101')));}if(_0x1f6e78&&_0x1f6e78[_0x6c32('0x42')]!==_0x6c32('0x8e')&&!isNotNull(this[_0x6c32('0x1c')][_0x1f6e78[_0x6c32('0xb0')]]['dialQueueProject'])){delete this[_0x6c32('0x22')][_0x53b282[_0x6c32('0xd8')]];this[_0x6c32('0xae')](this[_0x6c32('0x1c')][_0x1f6e78[_0x6c32('0xb0')]]);this[_0x6c32('0x1c')][_0x1f6e78[_0x6c32('0xb0')]][_0x6c32('0x5f')]+=0x1;_0x52c17a=new Hangup(_0x1f6e78,_0x53b282);_0x52c17a[_0x6c32('0xa3')]=0xc;_0x52c17a['statedesc']=_0x53b282[_0x6c32('0x102')];_0x52c17a[_0x6c32('0xf5')]='Unknow';this[_0x6c32('0xc5')](_0x52c17a)[_0x6c32('0xac')](loggerCatch(_0x6c32('0xfe')));this['moveContactManagedDialer'](_0x52c17a)[_0x6c32('0xac')](loggerCatch(_0x6c32('0x101')));}};Dialer[_0x6c32('0xa5')][_0x6c32('0x2d')]=function(_0x4db81f){var _0x5f1b11=this['uniqueId'][_0x4db81f[_0x6c32('0xd8')]];var _0x363c7f=this;if(this['voiceQueues'][_0x4db81f[_0x6c32('0xb0')]]){if(_0x5f1b11&&_0x5f1b11[_0x6c32('0x42')]!==_0x6c32('0x8e')){delete this[_0x6c32('0x22')][_0x4db81f[_0x6c32('0xd8')]];this[_0x6c32('0x1c')][_0x4db81f['queue']][_0x6c32('0x57')]+=0x1;var _0x7713b4=new AgentComplete(_0x5f1b11,_0x4db81f);if(_0x4db81f[_0x6c32('0x103')]===_0x6c32('0x104')){_0x7713b4['agiafterat']=this[_0x6c32('0x1c')][_0x4db81f[_0x6c32('0xb0')]]['dialQueueProject2']&&this[_0x6c32('0x1c')][_0x4db81f[_0x6c32('0xb0')]][_0x6c32('0x105')]?moment()[_0x6c32('0x6f')](_0x6c32('0xf3')):undefined;}this[_0x6c32('0xc5')](_0x7713b4)[_0x6c32('0xac')](loggerCatch('[syncAgentComplete][createHistory]'));this[_0x6c32('0xc3')](_0x7713b4)[_0x6c32('0xac')](loggerCatch(_0x6c32('0x106')));}}};Dialer[_0x6c32('0xa5')][_0x6c32('0x29')]=function(_0x1bbd08){if(this['voiceQueues'][_0x1bbd08[_0x6c32('0xb0')]]){if(this['uniqueId'][_0x1bbd08['uniqueid']]&&this['uniqueId'][_0x1bbd08['uniqueid']][_0x6c32('0x42')]!=='ivr'){this[_0x6c32('0xae')](this[_0x6c32('0x1c')][_0x1bbd08[_0x6c32('0xb0')]]);this['uniqueId'][_0x1bbd08['uniqueid']][_0x6c32('0x107')]=moment()[_0x6c32('0x6f')](_0x6c32('0xf3'));}}};Dialer[_0x6c32('0xa5')][_0x6c32('0x108')]=function(_0x18e10a){this[_0x6c32('0xc5')](_0x18e10a)[_0x6c32('0xac')](loggerCatch(_0x6c32('0x109')));this[_0x6c32('0xc3')](_0x18e10a)[_0x6c32('0xac')](loggerCatch('[syncQueueCallerAbandon]\x20[Drop]'));};Dialer[_0x6c32('0xa5')][_0x6c32('0x10a')]=function(_0x324bae){var _0x20df27=this[_0x6c32('0x22')][_0x324bae['uniqueid']];var _0x4304b1=this;if(this[_0x6c32('0x1c')][_0x324bae[_0x6c32('0xb0')]]){if(_0x20df27&&_0x20df27['type']!=='ivr'){delete this[_0x6c32('0x22')][_0x324bae[_0x6c32('0xd8')]];this[_0x6c32('0xae')](this['voiceQueues'][_0x324bae[_0x6c32('0xb0')]]);_0x20df27[_0x6c32('0x10b')]=moment()[_0x6c32('0x6f')]('YYYY-MM-DD\x20HH:mm:ss');var _0xe8c030=new QueueCallerAbandon(_0x20df27,_0x324bae);if(getSeconds(_0x20df27[_0x6c32('0x10b')],_0x20df27[_0x6c32('0x10c')])>=_0x20df27[_0x6c32('0x10d')]){this[_0x6c32('0x1c')][_0x324bae[_0x6c32('0xb0')]][_0x6c32('0x62')]+=0x1;this[_0x6c32('0x1c')][_0x324bae[_0x6c32('0xb0')]][_0x6c32('0x10e')]+=0x1;this[_0x6c32('0x1c')][_0x324bae['queue']][_0x6c32('0x64')]+=0x1;_0xe8c030['state']=0xa;_0xe8c030[_0x6c32('0xde')]='Drop';_0xe8c030[_0x6c32('0x10f')]=_0x6c32('0x110');_0xe8c030[_0x6c32('0x111')]=this[_0x6c32('0x1c')][_0x324bae[_0x6c32('0xb0')]]['dialQueueProject2']?moment()['format'](_0x6c32('0xf3')):undefined;_0xe8c030[_0x6c32('0xe9')]+=0x1;_0xe8c030['countglobal']+=0x1;if(_0xe8c030['countdropretry']>=this['voiceQueues'][_0x324bae[_0x6c32('0xb0')]][_0x6c32('0x112')]){this[_0x6c32('0x108')](_0xe8c030);}else{this[_0x6c32('0xbc')]({'active':![],'countdropretry':_0xe8c030[_0x6c32('0xe9')],'scheduledat':moment()[_0x6c32('0xf1')](this[_0x6c32('0x1c')][_0x324bae[_0x6c32('0xb0')]]['dialDropRetryFrequency'],'minutes')[_0x6c32('0x6f')](_0x6c32('0xf3')),'ContactId':_0x20df27[_0x6c32('0xcb')],'ListId':_0x20df27[_0x6c32('0xcc')],'VoiceQueueId':_0x20df27['VoiceQueueId']||undefined,'CampaignId':_0x20df27['CampaignId']||undefined})[_0x6c32('0xac')](loggerCatch(_0x6c32('0x113')));var _0x552d3c=new History(_0xe8c030);_0x552d3c['state']=0xa;_0x552d3c[_0x6c32('0xde')]=_0x6c32('0x114');_0x552d3c[_0x6c32('0xa4')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x552d3c[_0x6c32('0x115')]=_0x552d3c[_0x6c32('0xa4')];_0x552d3c[_0x6c32('0x116')]=_0xe8c030['calleridname'];_0x552d3c[_0x6c32('0x117')]=_0xe8c030[_0x6c32('0x117')];this[_0x6c32('0xc5')](_0x552d3c)['catch'](loggerCatch('[syncAgentComplete][createHistory][10]'));}}else{this[_0x6c32('0x1c')][_0x324bae['queue']][_0x6c32('0x61')]+=0x1;this['voiceQueues'][_0x324bae[_0x6c32('0xb0')]][_0x6c32('0x5c')]+=0x1;_0xe8c030[_0x6c32('0xa3')]=0xb;_0xe8c030['statedesc']=_0x6c32('0x118');_0xe8c030['dropreason']=_0x6c32('0x119');_0xe8c030[_0x6c32('0xea')]+=0x1;_0xe8c030[_0x6c32('0xe4')]+=0x1;if(_0xe8c030[_0x6c32('0xea')]>=this['voiceQueues'][_0x324bae['queue']][_0x6c32('0x11a')]){this[_0x6c32('0x108')](_0xe8c030);}else{this[_0x6c32('0xbc')]({'active':![],'countabandonedretry':_0xe8c030[_0x6c32('0xea')],'scheduledat':moment()[_0x6c32('0xf1')](this[_0x6c32('0x1c')][_0x324bae[_0x6c32('0xb0')]][_0x6c32('0x11b')],'minutes')[_0x6c32('0x6f')](_0x6c32('0xf3')),'ContactId':_0x20df27[_0x6c32('0xcb')],'ListId':_0x20df27[_0x6c32('0xcc')],'VoiceQueueId':_0x20df27[_0x6c32('0xce')]||undefined,'CampaignId':_0x20df27['CampaignId']||undefined})['catch'](loggerCatch('[rescheduleContact][Abandoned]'));var _0x552d3c=new History(_0xe8c030);_0x552d3c[_0x6c32('0xa3')]=0xb;_0x552d3c[_0x6c32('0xde')]=_0x6c32('0x118');_0x552d3c[_0x6c32('0xa4')]=moment()[_0x6c32('0x6f')](_0x6c32('0xf3'));_0x552d3c[_0x6c32('0x115')]=_0x552d3c[_0x6c32('0xa4')];_0x552d3c[_0x6c32('0x116')]=_0xe8c030[_0x6c32('0x116')];_0x552d3c[_0x6c32('0x117')]=_0xe8c030['calleridnum'];this[_0x6c32('0xc5')](_0x552d3c)[_0x6c32('0xac')](loggerCatch(_0x6c32('0x11c')));}}}}};Dialer['prototype'][_0x6c32('0x30')]=function(_0x3f1a36){if(this[_0x6c32('0x21')][_0x3f1a36[_0x6c32('0xd8')]]){this[_0x6c32('0x21')][_0x3f1a36['uniqueid']][_0x6c32('0xab')]=_0x3f1a36[_0x6c32('0xab')];}if(this[_0x6c32('0x22')][_0x3f1a36[_0x6c32('0xd8')]]){this[_0x6c32('0x22')][_0x3f1a36[_0x6c32('0xd8')]][_0x6c32('0xab')]=_0x3f1a36[_0x6c32('0xab')];}};Dialer['prototype']['syncQueueMember']=function(_0x4b46b2){if(strategy[this[_0x6c32('0x1c')][this[_0x6c32('0x21')][_0x4b46b2[_0x6c32('0x11d')]][_0x6c32('0xb0')]]['strategy']]===_0x6c32('0x18')){if(this[_0x6c32('0x21')][_0x4b46b2[_0x6c32('0x11d')]]&&_[_0x6c32('0xa8')](this[_0x6c32('0x21')][_0x4b46b2[_0x6c32('0x11d')]][_0x6c32('0x11e')])&&_0x4b46b2['status']==='1'&&_0x4b46b2[_0x6c32('0x11f')]==='0'){if(this[_0x6c32('0x1d')][_0x4b46b2[_0x6c32('0x120')]]){if(!this['agents'][_0x4b46b2[_0x6c32('0x120')]][_0x6c32('0x11e')]){this[_0x6c32('0x1d')][_0x4b46b2['stateinterface']][_0x6c32('0x11e')]=!![];this['actions'][_0x4b46b2[_0x6c32('0x11d')]][_0x6c32('0x11e')]=!![];this[_0x6c32('0x21')][_0x4b46b2['actionid']][_0x6c32('0x120')]=_0x4b46b2['stateinterface'];}}}}else if((strategy[this['voiceQueues'][this[_0x6c32('0x21')][_0x4b46b2[_0x6c32('0x11d')]][_0x6c32('0xb0')]][_0x6c32('0x44')]]||_0x6c32('0x17'))===_0x6c32('0x17')){if(this[_0x6c32('0x21')][_0x4b46b2[_0x6c32('0x11d')]]){if(this[_0x6c32('0x1d')][_0x4b46b2['stateinterface']]){this['actions'][_0x4b46b2[_0x6c32('0x11d')]][_0x6c32('0x120')]=_0x4b46b2[_0x6c32('0x120')];if(_[_0x6c32('0xa8')](this[_0x6c32('0x27')][this[_0x6c32('0x21')][_0x4b46b2[_0x6c32('0x11d')]][_0x6c32('0xb0')]])){this['queueBooked'][this[_0x6c32('0x21')][_0x4b46b2[_0x6c32('0x11d')]][_0x6c32('0xb0')]]=[];}this[_0x6c32('0x27')][this[_0x6c32('0x21')][_0x4b46b2[_0x6c32('0x11d')]][_0x6c32('0xb0')]]['push'](_[_0x6c32('0x88')](_[_0x6c32('0xca')](this[_0x6c32('0x21')][_0x4b46b2[_0x6c32('0x11d')]],[_0x6c32('0x121'),_0x6c32('0x120')]),{'status':_0x4b46b2[_0x6c32('0xaa')],'paused':_0x4b46b2[_0x6c32('0x11f')]}));}}}};function unlockQueueStatus(_0x445067,_0x44e6b4){setTimeout(function(){if(_[_0x6c32('0x35')](_0x445067[_0x6c32('0x122')])){loggerBooked[_0x6c32('0x92')]('[unlockQueueStatus][undefined]',_0x44e6b4);}_0x445067['queueStatusComplete']=!![];loggerBooked['info'](_0x6c32('0x123'),_0x44e6b4,JSON['stringify'](_[_0x6c32('0xca')](_0x445067,[_0x6c32('0x37'),'queueStatusComplete'])));},0x1f3);}Dialer[_0x6c32('0xa5')][_0x6c32('0x32')]=function(_0x541bb8){var _0x3ebb73=this;var _0xc3cd75=_0x3ebb73['voiceQueues'][_0x3ebb73['actions'][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xb0')]];if(strategy[this[_0x6c32('0x1c')][this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xb0')]][_0x6c32('0x44')]]==='roundrobin'){if(this[_0x6c32('0x21')][_0x541bb8['actionid']]&&this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0x120')]){this[_0x6c32('0x1b')][_0x6c32('0x124')](this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0x121')],this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0x120')])[_0x6c32('0xac')](function(_0x420c25){logger['error'](_0x6c32('0x125'),util[_0x6c32('0x93')](_0x420c25,{'showHidden':![],'depth':null}));})['finally'](function(){_0x3ebb73[_0x6c32('0xae')](_0x3ebb73[_0x6c32('0x1c')][_0x3ebb73[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xb0')]]);_0x3ebb73['agents'][_0x3ebb73[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]]['stateinterface']][_0x6c32('0x11e')]=![];delete _0x3ebb73['actions'][_0x541bb8[_0x6c32('0x11d')]];unlockQueueStatus(_0xc3cd75);});}else{this[_0x6c32('0xae')](this['voiceQueues'][this[_0x6c32('0x21')][_0x541bb8['actionid']]['queue']]);this[_0x6c32('0xbc')]({'active':![],'ContactId':this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xcb')],'ListId':this['actions'][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xcc')],'VoiceQueueId':this['actions'][_0x541bb8[_0x6c32('0x11d')]]['VoiceQueueId']||undefined,'CampaignId':this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xcf')]||undefined})['catch'](loggerCatch('[unlock][syncQueueStatusComplete]'));delete this[_0x6c32('0x21')][_0x541bb8['actionid']];unlockQueueStatus(_0xc3cd75);}}else if((strategy[this[_0x6c32('0x1c')][this[_0x6c32('0x21')][_0x541bb8['actionid']][_0x6c32('0xb0')]]['strategy']]||_0x6c32('0x17'))==='rrmemory'){var _0x10b128;if(this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]]&&!_[_0x6c32('0x3c')](this[_0x6c32('0x27')][this['actions'][_0x541bb8[_0x6c32('0x11d')]]['queue']])){if(this[_0x6c32('0x28')][_0x3ebb73[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xb0')]]){this[_0x6c32('0x28')][_0x3ebb73['actions'][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xb0')]]=this[_0x6c32('0x28')][this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xb0')]]?this[_0x6c32('0x28')][this['actions'][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xb0')]]:this[_0x6c32('0x27')][this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xb0')]]?this[_0x6c32('0x27')][this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xb0')]][_0x6c32('0x126')]||0x0:0x0;}this['queueBooked'][this['actions'][_0x541bb8[_0x6c32('0x11d')]]['queue']][_0x6c32('0x126')]=this[_0x6c32('0x28')][this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xb0')]];for(var _0x37abd8=0x0;_0x37abd8<this[_0x6c32('0x27')][this['actions'][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xb0')]][_0x6c32('0x127')];_0x37abd8+=0x1){_0x10b128=rr(this[_0x6c32('0x27')][this[_0x6c32('0x21')][_0x541bb8['actionid']][_0x6c32('0xb0')]]);this[_0x6c32('0x28')][_0x3ebb73[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xb0')]]=this[_0x6c32('0x27')][this['actions'][_0x541bb8['actionid']]['queue']][_0x6c32('0x126')];if(_0x10b128[_0x6c32('0xaa')]==='1'&&_0x10b128[_0x6c32('0x11f')]==='0'){break;}}if(!_[_0x6c32('0xa8')](_0x10b128)){this[_0x6c32('0x1d')][_0x10b128[_0x6c32('0x120')]][_0x6c32('0x128')]=_[_0x6c32('0x35')](this['agents'][_0x10b128[_0x6c32('0x120')]][_0x6c32('0x128')])?!![]:this[_0x6c32('0x1d')][_0x10b128[_0x6c32('0x120')]][_0x6c32('0x128')];}loggerBooked[_0x6c32('0x74')](_0x6c32('0x129'),_0x541bb8[_0x6c32('0x11d')],_0x6c32('0x12a'),JSON[_0x6c32('0x40')](_[_0x6c32('0xca')](this['agents'][_0x10b128['stateinterface']],[_0x6c32('0x37'),_0x6c32('0x128')])),_0x6c32('0x12b'),JSON[_0x6c32('0x40')](_0x10b128[_0x6c32('0x121')]));if(!_['isNil'](_0x10b128)&&_0x10b128[_0x6c32('0xaa')]==='1'&&_0x10b128['paused']==='0'&&this['agents'][_0x10b128['stateinterface']][_0x6c32('0x128')]){this['agents'][_0x10b128[_0x6c32('0x120')]][_0x6c32('0x128')]=![];this[_0x6c32('0x27')][_0x3ebb73['actions'][_0x541bb8[_0x6c32('0x11d')]]['queue']]=[];this[_0x6c32('0x1b')][_0x6c32('0x124')](_0x10b128[_0x6c32('0x121')],_0x10b128['stateinterface'])[_0x6c32('0xac')](function(_0x2c6957){logger[_0x6c32('0x92')](_0x6c32('0x125'),util['inspect'](_0x2c6957,{'showHidden':![],'depth':null}));})['finally'](function(){_0x3ebb73['updateOriginated'](_0x3ebb73[_0x6c32('0x1c')][_0x3ebb73[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]]['queue']]);setTimeout(function(){_0x3ebb73[_0x6c32('0x1d')][_0x10b128[_0x6c32('0x120')]][_0x6c32('0x128')]=!![];loggerBooked[_0x6c32('0x74')](_0x6c32('0x12c'),_0x541bb8[_0x6c32('0x11d')],'Agent:\x20',JSON['stringify'](_[_0x6c32('0xca')](_0x3ebb73['agents'][_0x10b128[_0x6c32('0x120')]],['name',_0x6c32('0x128')])),_0x6c32('0x12b'),JSON[_0x6c32('0x40')](_0x10b128[_0x6c32('0x121')]));},0xc7);delete _0x3ebb73[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]];unlockQueueStatus(_0xc3cd75,_0x541bb8['actionid']);});}else{loggerBooked['info'](_0x6c32('0x12d'));this[_0x6c32('0xae')](this[_0x6c32('0x1c')][this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xb0')]]);this[_0x6c32('0xbc')]({'active':![],'ContactId':this['actions'][_0x541bb8[_0x6c32('0x11d')]]['ContactId'],'ListId':this[_0x6c32('0x21')][_0x541bb8['actionid']][_0x6c32('0xcc')],'VoiceQueueId':this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xce')]||undefined,'CampaignId':this[_0x6c32('0x21')][_0x541bb8['actionid']][_0x6c32('0xcf')]||undefined})[_0x6c32('0xac')](loggerCatch(_0x6c32('0x12e')));delete this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]];unlockQueueStatus(_0xc3cd75);}}else{loggerBooked[_0x6c32('0x74')](_0x6c32('0x12f'));this['updateOriginated'](this['voiceQueues'][this[_0x6c32('0x21')][_0x541bb8['actionid']][_0x6c32('0xb0')]]);this[_0x6c32('0xbc')]({'active':![],'ContactId':this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xcb')],'ListId':this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xcc')],'VoiceQueueId':this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]]['VoiceQueueId']||undefined,'CampaignId':this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xcf')]||undefined})[_0x6c32('0xac')](loggerCatch(_0x6c32('0x130')));delete this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]];unlockQueueStatus(_0xc3cd75);}}else{loggerBooked[_0x6c32('0x74')]('[booked][unlock3]');this[_0x6c32('0xae')](this['voiceQueues'][this['actions'][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xb0')]]);this['rescheduleContact']({'active':![],'ContactId':this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xcb')],'ListId':this['actions'][_0x541bb8['actionid']][_0x6c32('0xcc')],'VoiceQueueId':this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xce')]||undefined,'CampaignId':this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]][_0x6c32('0xcf')]||undefined})[_0x6c32('0xac')](loggerCatch('[unlock3][syncQueueStatusComplete]'));delete this[_0x6c32('0x21')][_0x541bb8[_0x6c32('0x11d')]];unlockQueueStatus(_0xc3cd75);}};Dialer[_0x6c32('0xa5')][_0x6c32('0x33')]=function(){var _0x5a10ce=this;setInterval(function(){_0x5a10ce['syncCampaigns']();},0x3e8);};Dialer['prototype'][_0x6c32('0x131')]=function(_0x3694b2){var _0x552e31=this;return function(){if(!_0x552e31[_0x6c32('0xd3')](_0x3694b2[_0x6c32('0x6c')])){if(!_0x552e31[_0x6c32('0xd3')](_0x3694b2[_0x6c32('0x132')])){_0x3694b2[_0x6c32('0x36')]=_0x6c32('0x133');throw _0x3694b2[_0x6c32('0x37')]+_0x6c32('0x134');}}};};Dialer['prototype'][_0x6c32('0x135')]=function(_0x477e28,_0x1312e5,_0x5b67d4,_0x58f30a){var _0x221555=this;return function(){var _0x13de91=!![];return _0x221555[_0x6c32('0x136')](_0x477e28,_0x1312e5,_0x5b67d4,_0x58f30a,_0x13de91);};};Dialer[_0x6c32('0xa5')][_0x6c32('0x137')]=function(_0x5f3a05,_0x3be4c0,_0x2bef20,_0x2032f2){var _0x542edf=this;return function(){var _0x396c19=![];return _0x542edf['ifTime'](_0x5f3a05[_0x6c32('0x3d')],_0x3be4c0,_0x2bef20,_0x2032f2,_0x396c19);};};Dialer['prototype']['ifTime']=function(_0x12c4b0,_0x128ba8,_0x17b88b,_0x23a132,_0x467087){var _0x195fcc=[];return new BPromise(function(_0x27bf58,_0x3cf689){if(!isNotNull(_0x12c4b0)){_0x23a132[_0x6c32('0x36')]=_0x6c32('0x39');return _0x3cf689(msgResponse('ifTime',_0x6c32('0x138'),_0x17b88b+_0x6c32('0x139')));}if(_['isEmpty'](_0x12c4b0)){_0x23a132[_0x6c32('0x36')]=_0x6c32('0x13a');return _0x3cf689(msgResponse(_0x6c32('0x136'),_0x6c32('0x138'),_0x17b88b+_0x6c32('0x13b')));}if(_0x128ba8&&_['isUndefined'](config['timezones'][_0x128ba8])){_0x23a132[_0x6c32('0x36')]=_0x6c32('0x13c');return _0x3cf689(msgResponse(_0x6c32('0x136'),_0x6c32('0x138'),_0x17b88b+_0x6c32('0x13d')+_0x128ba8));}if(_[_0x6c32('0x13e')](_0x12c4b0)){for(var _0x329c7c=0x0;_0x329c7c<_0x12c4b0[_0x6c32('0x127')];_0x329c7c+=0x1){_0x195fcc[_0x6c32('0x13f')](ami['Action']({'action':_0x6c32('0x140'),'command':util['format'](_0x6c32('0x141'),_0x12c4b0[_0x329c7c][_0x6c32('0x142')],!_['isUndefined'](config[_0x6c32('0x143')][_0x128ba8])?_0x128ba8:'')})[_0x6c32('0xb3')](function(_0x3a1066){return _0x3a1066[_0x6c32('0x144')][_0x6c32('0x145')](_0x6c32('0x146'))>=0x0;})[_0x6c32('0xac')](myreject(_0x3cf689)));}}else{_0x195fcc[_0x6c32('0x13f')](ami[_0x6c32('0xa9')]({'action':_0x6c32('0x140'),'command':util[_0x6c32('0x6f')](_0x6c32('0x141'),_0x12c4b0,!_[_0x6c32('0x35')](config['timezones'][_0x128ba8])?_0x128ba8:'')})[_0x6c32('0xb3')](function(_0x44aba2){return _0x44aba2[_0x6c32('0x144')]['indexOf']('true')>=0x0;})['catch'](myreject(_0x3cf689)));}BPromise[_0x6c32('0x147')](_0x195fcc)[_0x6c32('0xb3')](function(_0x539add){var _0x35d276=_[_0x6c32('0x148')](_0x539add);if(_0x35d276){return _0x27bf58(_0x35d276);}else{_0x23a132[_0x6c32('0x36')]=_0x467087?_0x6c32('0x149'):'INTERVAL_IS_OVERTIME';return _0x3cf689(msgResponse(_0x6c32('0x14a'),_0x6c32('0x138'),_0x6c32('0x14b')+_0x467087+'\x20'+_0x17b88b+'\x20Interval\x20is\x20overtime:\x20'+util[_0x6c32('0x93')](_0x12c4b0,{'showHidden':![],'depth':null})+'Timezone:\x20'+_0x128ba8));}})[_0x6c32('0xac')](function(_0x4c0914){return _0x3cf689(msgResponse('ifTime','Failure',JSON[_0x6c32('0x40')](_0x4c0914)));});});};Dialer[_0x6c32('0xa5')][_0x6c32('0x14c')]=function(_0x5698ff){var _0x49c8c5=this;return function(){switch(_0x5698ff[_0x6c32('0x52')]){case'progressive':freeVariablesPredictive(_0x5698ff);_0x49c8c5[_0x6c32('0x14d')](_0x5698ff,0x1);break;case _0x6c32('0x14e'):freeVariablesPredictive(_0x5698ff);_0x49c8c5[_0x6c32('0x14d')](_0x5698ff,_0x5698ff[_0x6c32('0x14f')]);break;case _0x6c32('0x9'):_0x49c8c5[_0x6c32('0x9')](_0x5698ff);break;case _0x6c32('0x150'):freeVariablesPredictive(_0x5698ff);_0x49c8c5[_0x6c32('0x14d')](_0x5698ff,0x1);break;default:freeVariablesPredictive(_0x5698ff);logger[_0x6c32('0x92')]('Queue',_0x5698ff[_0x6c32('0x37')],_0x6c32('0x151'));}};};Dialer[_0x6c32('0xa5')]['launchHandleIvr']=function(_0x5c7318){var _0x51c596=this;return function(){_0x51c596['handleIvr'](_0x5c7318);};};Dialer['prototype'][_0x6c32('0xb')]=function(_0x3f4b4d){var _0x480e4e=this;if(isNotPreview(_0x3f4b4d[_0x6c32('0x52')])){if(isVoiceQueueOutbound(_0x3f4b4d[_0x6c32('0x42')])&&isActive(_0x3f4b4d[_0x6c32('0x152')])){_0x3f4b4d['sendMessageOneNotActive']=!![];BPromise[_0x6c32('0xb2')]()[_0x6c32('0xb3')](checkIsLoggedIn(_0x3f4b4d,_0x3f4b4d[_0x6c32('0x47')]))[_0x6c32('0xb3')](checkIsActive(_0x3f4b4d,_0x3f4b4d[_0x6c32('0x152')]))[_0x6c32('0xb3')](checkInterval(_0x3f4b4d))['then'](_0x480e4e[_0x6c32('0x131')](_0x3f4b4d))[_0x6c32('0xb3')](_0x480e4e[_0x6c32('0x135')](_0x3f4b4d[_0x6c32('0x153')],_0x3f4b4d['dialTimezone'],_0x3f4b4d[_0x6c32('0x37')],_0x3f4b4d))['then'](_0x480e4e[_0x6c32('0x137')](_0x3f4b4d[_0x6c32('0x3b')],_0x3f4b4d[_0x6c32('0x154')],_0x3f4b4d[_0x6c32('0x37')],_0x3f4b4d))[_0x6c32('0xb3')](_0x480e4e[_0x6c32('0x14c')](_0x3f4b4d))[_0x6c32('0xac')](loggerCatchQueueSummary('[syncQueueSummary]',_0x3f4b4d));}else{notSendMessagesQueue(_0x3f4b4d);}}else{freeVariablesPredictive(_0x3f4b4d);}};Dialer['prototype'][_0x6c32('0x155')]=function(){var _0x4f8a82=this;var _0x2ca0bf;for(var _0x5bcd2b in this[_0x6c32('0xaf')]){if(typeof this['campaigns'][_0x5bcd2b]!==_0x6c32('0x95')){_0x2ca0bf=this[_0x6c32('0xaf')][_0x5bcd2b];if(isCampaignIvr(_0x2ca0bf[_0x6c32('0x42')])&&isActive(_0x2ca0bf[_0x6c32('0x6d')])){_0x2ca0bf[_0x6c32('0x9c')]=!![];BPromise[_0x6c32('0xb2')]()[_0x6c32('0xb3')](checkIsActive(_0x2ca0bf,_0x2ca0bf['active']))[_0x6c32('0xb3')](checkInterval(_0x2ca0bf))[_0x6c32('0xb3')](_0x4f8a82[_0x6c32('0x131')](_0x2ca0bf))[_0x6c32('0xb3')](_0x4f8a82[_0x6c32('0x135')](_0x2ca0bf[_0x6c32('0x153')],_0x2ca0bf[_0x6c32('0x154')],_0x2ca0bf[_0x6c32('0x37')],_0x2ca0bf))[_0x6c32('0xb3')](_0x4f8a82[_0x6c32('0x137')](_0x2ca0bf[_0x6c32('0x3b')],_0x2ca0bf[_0x6c32('0x154')],_0x2ca0bf['name'],_0x2ca0bf))[_0x6c32('0xb3')](_0x4f8a82[_0x6c32('0x156')](_0x2ca0bf))[_0x6c32('0xac')](loggerCatchQueueSummary(_0x6c32('0x157'),_0x2ca0bf));}else{notSendMessagesCampaign(_0x2ca0bf);}}}};function getCallerIdRandom(_0x40a1ae,_0x472041){var _0x1b9c05;var _0x157428;var _0x267e6d;if(_0x472041<=0x0){_0x472041=0x1;}_0x1b9c05=new RegExp(_0x6c32('0x158')+_0x472041+'}$');_0x157428=Math['pow'](0xa,_0x472041-0x1);_0x267e6d=Math[_0x6c32('0x159')](0xa,_0x472041)-0x1;return util[_0x6c32('0x6f')]('%s',_[_0x6c32('0x15a')](_0x40a1ae,_0x1b9c05,_[_0x6c32('0x15b')](_0x157428,_0x267e6d)));}function extractCalleridName(_0x135c9c){var _0xa79865=_0x135c9c[_0x6c32('0x15c')](/"(.*?)"/);return _0xa79865?_0xa79865[0x1]:_0x135c9c;}function extractCalleridNumber(_0x23655e){var _0x1679e0=_0x23655e[_0x6c32('0x15c')](/<(.*?)>/);return _0x1679e0?_0x1679e0[0x1]:_0x23655e;}Dialer['prototype'][_0x6c32('0x15d')]=function(_0x5a3d69,_0x559cbc){var _0x98b33e=this;var _0x1a1908=uuid['v4']();this[_0x6c32('0x21')][_0x1a1908]=new Action(_0x5a3d69,_0x559cbc,_0x1a1908);return new BPromise(function(_0x5b8edf,_0x22e92a){if(_[_0x6c32('0x35')](_0x5a3d69)&&typeof _0x5a3d69!=='object'){return _0x22e92a(msgResponse('originate',_0x6c32('0x138'),'voiceQueue\x20is\x20undefine'));}if(_[_0x6c32('0x35')](_0x559cbc[_0x6c32('0x15e')][_0x6c32('0x15f')])||_0x559cbc[_0x6c32('0x15e')][_0x6c32('0x15f')]===null){return _0x22e92a(msgResponse(_0x6c32('0x160'),_0x6c32('0x138'),_0x6c32('0x161')));}var _0x332d81={'XMD-CALLERID':_0x98b33e[_0x6c32('0x21')][_0x1a1908][_0x6c32('0x162')](),'XMD-AGI':_0x5a3d69[_0x6c32('0xff')]?util[_0x6c32('0x6f')](_0x6c32('0x163'),ipAgi,_0x5a3d69['dialQueueProject']):_0x6c32('0x164'),'XMD-AGIAFTER':_0x5a3d69[_0x6c32('0x165')]?util[_0x6c32('0x6f')](_0x6c32('0x163'),ipAgi,_0x5a3d69[_0x6c32('0x165')]):_0x6c32('0x164'),'XMD-QUEUE':_0x5a3d69['type']===_0x6c32('0x43')?util[_0x6c32('0x6f')](_0x6c32('0x166'),_0x5a3d69[_0x6c32('0x37')],_0x5a3d69[_0x6c32('0x167')]||'',_0x5a3d69[_0x6c32('0x105')]?'c':'',_0x5a3d69[_0x6c32('0x10d')]||0x3):_0x6c32('0x164'),'XMD-CONTACTID':_0x559cbc[_0x6c32('0xcb')],'XMD-CDRTYPE':_0x6c32('0x8'),'CALLERID(all)':_0x98b33e[_0x6c32('0x21')][_0x1a1908]['getCaller'](),'XMD-AMD':_0x5a3d69[_0x6c32('0xdb')]?'ACTIVE':_0x6c32('0x164'),'XMD-DESTINATION':'xcally-motion-dialer'};if(_0x5a3d69[_0x6c32('0xdb')]){_0x332d81[_0x6c32('0x168')]=_0x5a3d69['dialAMDInitialSilence']||0x9c4;_0x332d81[_0x6c32('0x169')]=_0x5a3d69[_0x6c32('0x16a')]||0x5dc;_0x332d81[_0x6c32('0x16b')]=_0x5a3d69['dialAMDAfterGreetingSilence']||0x320;_0x332d81[_0x6c32('0x16c')]=_0x5a3d69[_0x6c32('0x16d')]||0x1388;_0x332d81[_0x6c32('0x16e')]=_0x5a3d69[_0x6c32('0x16f')]||0x64;_0x332d81[_0x6c32('0x170')]=_0x5a3d69[_0x6c32('0x171')]||0x32;_0x332d81['XMD-AMDMAXIMUMNUMBEROFWORDS']=_0x5a3d69[_0x6c32('0x172')]||0x3;_0x332d81[_0x6c32('0x173')]=_0x5a3d69[_0x6c32('0x174')]||0x100;_0x332d81['XMD-AMDMAXIMUMWORDLENGTH']=_0x5a3d69['dialAMDMaximumWordLength']||0x1388;}if(_0x5a3d69[_0x6c32('0x42')]===_0x6c32('0x43')){_0x332d81[_0x6c32('0x175')]=_0x559cbc[_0x6c32('0xce')];}else{_0x332d81[_0x6c32('0x176')]=_0x559cbc[_0x6c32('0xcf')];}for(var _0x254a2b in _0x559cbc[_0x6c32('0x15e')]){if(typeof _0x559cbc[_0x6c32('0x15e')][_0x254a2b]!=='undefined'){if(isNotNull(_0x559cbc['Contact'][_0x254a2b])&&_0x254a2b!=='id'&&_0x254a2b!==_0x6c32('0x177')&&_0x254a2b!==_0x6c32('0x178')&&_0x254a2b!==_0x6c32('0x179')){_0x332d81[util[_0x6c32('0x6f')](_0x6c32('0x17a'),_0x6c32('0x17b'),_['toUpper'](_0x254a2b))]=_0x559cbc[_0x6c32('0x15e')][_0x254a2b];}}}var _0x3c06e9=_0x98b33e['isTrunkReachable'](_0x5a3d69[_0x6c32('0x6c')])?getCallerId(_0x5a3d69[_0x6c32('0x6c')]['callerid'],_0x5a3d69[_0x6c32('0x53')],_0x5a3d69[_0x6c32('0x17c')]>0x0?getCallerIdRandom(_0x5a3d69[_0x6c32('0x54')],_0x5a3d69[_0x6c32('0x17c')]):_0x5a3d69[_0x6c32('0x54')]):getCallerId(_[_0x6c32('0xa8')](_0x5a3d69[_0x6c32('0x132')])?_0x5a3d69[_0x6c32('0x6c')][_0x6c32('0x6e')]:_0x5a3d69[_0x6c32('0x132')][_0x6c32('0x6e')],_0x5a3d69['dialOriginateCallerIdName'],_0x5a3d69[_0x6c32('0x17c')]>0x0?getCallerIdRandom(_0x5a3d69[_0x6c32('0x54')],_0x5a3d69[_0x6c32('0x17c')]):_0x5a3d69[_0x6c32('0x54')]);if(_0x3c06e9){_0x332d81[_0x6c32('0x17d')]=_0x98b33e[_0x6c32('0x21')][_0x1a1908][_0x6c32('0x17e')]=extractCalleridName(_0x3c06e9);_0x332d81[_0x6c32('0x17f')]=_0x98b33e['actions'][_0x1a1908][_0x6c32('0x180')]=extractCalleridNumber(_0x3c06e9);}return ami[_0x6c32('0xa9')]({'actionid':_0x1a1908,'action':_0x6c32('0x160'),'channel':_0x98b33e[_0x6c32('0xd3')](_0x5a3d69['Trunk'])?util[_0x6c32('0x6f')](_0x6c32('0x181'),_0x5a3d69[_0x6c32('0x6c')][_0x6c32('0x37')],isNotNull(_0x5a3d69[_0x6c32('0x56')])?_0x5a3d69['dialPrefix']['trim']()||'':'',_0x5a3d69['dialCutDigit']>0x0?_0x559cbc[_0x6c32('0x15e')][_0x6c32('0x15f')][_0x6c32('0x182')](_0x5a3d69[_0x6c32('0x183')]):_0x559cbc['Contact'][_0x6c32('0x15f')]):util['format'](_0x6c32('0x181'),_['isNil'](_0x5a3d69[_0x6c32('0x132')])?_0x5a3d69[_0x6c32('0x6c')][_0x6c32('0x37')]:_0x5a3d69[_0x6c32('0x132')][_0x6c32('0x37')],isNotNull(_0x5a3d69[_0x6c32('0x56')])?_0x5a3d69['dialPrefix'][_0x6c32('0x184')]()||'':'',_0x5a3d69[_0x6c32('0x183')]>0x0?_0x559cbc[_0x6c32('0x15e')][_0x6c32('0x15f')][_0x6c32('0x182')](_0x5a3d69[_0x6c32('0x183')]):_0x559cbc[_0x6c32('0x15e')]['phone']),'callerid':_0x3c06e9,'Exten':_0x6c32('0x185'),'Context':_0x6c32('0x186'),'Priority':'1','variable':_0x332d81,'timeout':(_0x5a3d69[_0x6c32('0x55')]||0x1e)*0x3e8,'async':!![],'channelid':_0x1a1908})[_0x6c32('0xb3')](function(_0x75e087){return _0x5b8edf(_0x75e087);})[_0x6c32('0xac')](function(_0x12bc83){_0x5a3d69['outboundOriginateFailureCallsDay']+=0x1;var _0x4d58c2=new History(_0x98b33e['actions'][_0x1a1908]);logger[_0x6c32('0x92')](util[_0x6c32('0x6f')](_0x6c32('0x187'),JSON[_0x6c32('0x40')](_0x12bc83)));_0x4d58c2[_0x6c32('0xa3')]=0xe;_0x4d58c2[_0x6c32('0xde')]=_0x6c32('0x188');_0x4d58c2[_0x6c32('0xa4')]=moment()[_0x6c32('0x6f')](_0x6c32('0xf3'));_0x4d58c2[_0x6c32('0x115')]=_0x4d58c2[_0x6c32('0xa4')];_0x98b33e['createHistory'](_0x4d58c2)['catch'](loggerCatch(_0x6c32('0x189')));_0x98b33e[_0x6c32('0xc3')](_0x4d58c2)[_0x6c32('0xac')](loggerCatch(_0x6c32('0x189')))[_0x6c32('0x18a')](function(){delete _0x98b33e[_0x6c32('0x21')][_0x1a1908];return _0x22e92a(msgResponse(_0x6c32('0x160'),_0x6c32('0x3f'),_0x6c32('0x18b')));});});});};Dialer[_0x6c32('0xa5')]['syncOriginateResponse']=function(_0x2abe96){var _0x2f6507=this[_0x6c32('0x21')][_0x2abe96[_0x6c32('0x11d')]];if(_0x2f6507){delete this[_0x6c32('0x21')][_0x2abe96[_0x6c32('0x11d')]];_0x2f6507['responsetime']=moment()[_0x6c32('0x6f')](_0x6c32('0xf3'));var _0x5f59ed=_0x2f6507['type']===_0x6c32('0x8e')?this[_0x6c32('0xaf')][_0x2f6507[_0x6c32('0xb0')]]:this[_0x6c32('0x1c')][_0x2f6507[_0x6c32('0x18c')]()];if(!this[_0x6c32('0xd1')](_0x2abe96['response'])){this['updateOriginated'](_0x5f59ed);return this[_0x6c32('0x18d')](_0x2f6507,_0x5f59ed,_0x2abe96)[_0x6c32('0xac')](loggerCatch('[callProgressDetecting]\x20'));}this['uniqueId'][_0x2abe96['uniqueid']]=_0x2f6507;}};Dialer[_0x6c32('0xa5')][_0x6c32('0x18e')]=function(_0x3ee3bd,_0x2c7351,_0xada7f6){var _0xd7158a=new History(_0x2c7351);if(_0xd7158a[_0x6c32('0xe6')]+_0xd7158a[_0x6c32('0xe7')]+_0xd7158a[_0x6c32('0xe8')]+_0xd7158a[_0x6c32('0xfa')]+_0xd7158a[_0x6c32('0xe9')]+_0xd7158a[_0x6c32('0xea')]+_0xd7158a[_0x6c32('0xeb')]+_0xd7158a['countagentrejectretry']>=_0xada7f6[_0x6c32('0xfb')]-0x1){return!![];}switch(_0x3ee3bd){case 0x3:if(_0xd7158a[_0x6c32('0xe8')]>=_0xada7f6[_0x6c32('0x18f')]-0x1){return!![];}this[_0x6c32('0xbc')]({'active':![],'countnoanswerretry':_0xd7158a[_0x6c32('0xe8')]+=0x1,'scheduledat':moment()[_0x6c32('0xf1')](_0xada7f6[_0x6c32('0x190')],'minutes')[_0x6c32('0x6f')](_0x6c32('0xf3')),'ContactId':_0xd7158a[_0x6c32('0xcb')],'ListId':_0xd7158a['ListId'],'VoiceQueueId':_0xd7158a[_0x6c32('0xce')]||undefined,'CampaignId':_0xd7158a['CampaignId']||undefined})['catch'](loggerCatch('[rescheduleContact][NoAnswer]'));break;case 0x5:if(_0xd7158a[_0x6c32('0xe6')]>=_0xada7f6['dialBusyMaxRetry']-0x1){return!![];}this[_0x6c32('0xbc')]({'active':![],'countbusyretry':_0xd7158a['countbusyretry']+=0x1,'scheduledat':moment()[_0x6c32('0xf1')](_0xada7f6['dialBusyRetryFrequency'],_0x6c32('0xf2'))[_0x6c32('0x6f')](_0x6c32('0xf3')),'ContactId':_0xd7158a[_0x6c32('0xcb')],'ListId':_0xd7158a['ListId'],'VoiceQueueId':_0xd7158a[_0x6c32('0xce')]||undefined,'CampaignId':_0xd7158a[_0x6c32('0xcf')]||undefined})['catch'](loggerCatch(_0x6c32('0x191')));break;case 0x8:if(_0xd7158a[_0x6c32('0xe7')]>=_0xada7f6['dialCongestionMaxRetry']-0x1){return!![];}this[_0x6c32('0xbc')]({'active':![],'countcongestionretry':_0xd7158a[_0x6c32('0xe7')]+=0x1,'scheduledat':moment()['add'](_0xada7f6[_0x6c32('0x192')],_0x6c32('0xf2'))[_0x6c32('0x6f')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0xd7158a[_0x6c32('0xcb')],'ListId':_0xd7158a[_0x6c32('0xcc')],'VoiceQueueId':_0xd7158a[_0x6c32('0xce')]||undefined,'CampaignId':_0xd7158a[_0x6c32('0xcf')]||undefined})[_0x6c32('0xac')](loggerCatch(_0x6c32('0x193')));break;case 0x0:if(_0xd7158a[_0x6c32('0xfa')]>=_0xada7f6[_0x6c32('0x194')]-0x1){return!![];}else{this[_0x6c32('0xbc')]({'active':![],'countnosuchnumberretry':_0xd7158a['countnosuchnumberretry']+=0x1,'scheduledat':moment()[_0x6c32('0xf1')](_0xada7f6[_0x6c32('0x195')],'minutes')[_0x6c32('0x6f')](_0x6c32('0xf3')),'ContactId':_0xd7158a[_0x6c32('0xcb')],'ListId':_0xd7158a[_0x6c32('0xcc')],'VoiceQueueId':_0xd7158a[_0x6c32('0xce')]||undefined,'CampaignId':_0xd7158a[_0x6c32('0xcf')]||undefined})[_0x6c32('0xac')](loggerCatch(_0x6c32('0x196')));}break;case 0xa:if(_0xd7158a['countdropretry']>=_0xada7f6[_0x6c32('0x112')]-0x1){return!![];}this[_0x6c32('0xbc')]({'active':![],'countdropretry':_0xd7158a['countdropretry']+=0x1,'scheduledat':moment()[_0x6c32('0xf1')](_0xada7f6[_0x6c32('0x197')],_0x6c32('0xf2'))[_0x6c32('0x6f')](_0x6c32('0xf3')),'ContactId':_0xd7158a[_0x6c32('0xcb')],'ListId':_0xd7158a[_0x6c32('0xcc')],'VoiceQueueId':_0xd7158a['VoiceQueueId']||undefined,'CampaignId':_0xd7158a[_0x6c32('0xcf')]||undefined})[_0x6c32('0xac')](loggerCatch('[rescheduleContact][Drop]'));break;case 0xb:if(_0xd7158a[_0x6c32('0xea')]>=_0xada7f6[_0x6c32('0x11a')]-0x1){return!![];}this[_0x6c32('0xbc')]({'active':![],'countabandonedretry':_0xd7158a[_0x6c32('0xea')]+=0x1,'scheduledat':moment()[_0x6c32('0xf1')](_0xada7f6[_0x6c32('0x11b')],'minutes')[_0x6c32('0x6f')](_0x6c32('0xf3')),'ContactId':_0xd7158a[_0x6c32('0xcb')],'ListId':_0xd7158a['ListId'],'VoiceQueueId':_0xd7158a[_0x6c32('0xce')]||undefined,'CampaignId':_0xd7158a[_0x6c32('0xcf')]||undefined})[_0x6c32('0xac')](loggerCatch(_0x6c32('0x198')));break;case 0x13:if(_0xd7158a[_0x6c32('0xeb')]>=_0xada7f6[_0x6c32('0xef')]-0x1){return!![];}this['rescheduleContact']({'active':![],'countmachineretry':_0xd7158a[_0x6c32('0xeb')]+=0x1,'scheduledat':moment()[_0x6c32('0xf1')](_0xada7f6['dialMachineRetryFrequency'],_0x6c32('0xf2'))['format'](_0x6c32('0xf3')),'ContactId':_0xd7158a[_0x6c32('0xcb')],'ListId':_0xd7158a[_0x6c32('0xcc')],'VoiceQueueId':_0xd7158a[_0x6c32('0xce')]||undefined,'CampaignId':_0xd7158a[_0x6c32('0xcf')]||undefined})[_0x6c32('0xac')](loggerCatch(_0x6c32('0xf4')));break;case 0x14:if(_0xd7158a[_0x6c32('0xec')]>=_0xada7f6[_0x6c32('0x199')]-0x1){return!![];}this[_0x6c32('0xbc')]({'active':![],'countagentrejectretry':_0xd7158a[_0x6c32('0xec')]+=0x1,'scheduledat':moment()['add'](_0xada7f6[_0x6c32('0x19a')],_0x6c32('0xf2'))[_0x6c32('0x6f')](_0x6c32('0xf3')),'ContactId':_0xd7158a[_0x6c32('0xcb')],'ListId':_0xd7158a[_0x6c32('0xcc')],'VoiceQueueId':_0xd7158a[_0x6c32('0xce')]||undefined,'CampaignId':_0xd7158a[_0x6c32('0xcf')]||undefined})['catch'](loggerCatch(_0x6c32('0x19b')));break;default:return!![];}};Dialer['prototype'][_0x6c32('0x18d')]=function(_0x2bedc6,_0xb94109,_0x69302e){var _0x4e4279=this;var _0x18bef=new History(_0x2bedc6);return new BPromise(function(_0x4e35d9,_0x2c79bd){if(_['isUndefined'](_0xb94109)&&typeof _0xb94109!==_0x6c32('0x19c')){return _0x2c79bd(msgResponse('[callProgressDetecting]',_0x6c32('0x138'),'entity\x20is\x20undefine'));}if(_[_0x6c32('0x35')](_0x69302e)&&typeof _0x69302e!=='object'){return _0x2c79bd(msgResponse(_0x6c32('0x19d'),_0x6c32('0x138'),_0x6c32('0x19e')));}switch(_0x69302e[_0x6c32('0x103')]){case'0':_0xb94109[_0x6c32('0x5d')]+=0x1;_0x18bef['state']=0x0;_0x18bef[_0x6c32('0xde')]=_0x6c32('0x19f');_0x18bef[_0x6c32('0xfa')]+=0x1;_0x18bef['countglobal']+=0x1;ami['emit'](_0x6c32('0x1a0'),ut[_0x6c32('0x1a1')](_0x2bedc6,_0x6c32('0x1a2')));_0x4e4279[_0x6c32('0xc5')](_0x18bef)[_0x6c32('0xac')](loggerCatch(_0x6c32('0xe5')));if(_0x4e4279[_0x6c32('0x18e')](0x0,_0x2bedc6,_0xb94109)){if(_0x18bef['countnosuchnumberretry']>=_0xb94109[_0x6c32('0x194')]){_0x4e4279['createStateFinal'](_0x18bef,_0x4e35d9,_0x2c79bd,_0x6c32('0x1a3'));}else{_0x4e4279['stateGlobal'](_0x18bef,_0x4e35d9,_0x2c79bd,_0x6c32('0x1a3'));}}break;case'3':_0xb94109[_0x6c32('0x1a4')]+=0x1;_0x18bef[_0x6c32('0xa3')]=0x3;_0x18bef['statedesc']=_0x6c32('0x1a5');_0x18bef[_0x6c32('0xe8')]+=0x1;_0x18bef[_0x6c32('0xe4')]+=0x1;ami[_0x6c32('0x1a6')](_0x6c32('0x1a7'),ut[_0x6c32('0x1a1')](_0x2bedc6,'noanswer'));_0x4e4279[_0x6c32('0xc5')](_0x18bef)['catch'](loggerCatch(_0x6c32('0x1a8')));if(_0x4e4279[_0x6c32('0x18e')](0x3,_0x2bedc6,_0xb94109)){if(_0x18bef[_0x6c32('0xe8')]>=_0xb94109[_0x6c32('0x18f')]){_0x4e4279[_0x6c32('0xfc')](_0x18bef,_0x4e35d9,_0x2c79bd,'reason\x203\x20ringing\x20no\x20answer');}else{_0x4e4279[_0x6c32('0xed')](_0x18bef,_0x4e35d9,_0x2c79bd,'reason\x203\x20ringing\x20no\x20answer');}}break;case'5':_0xb94109[_0x6c32('0x59')]+=0x1;_0x18bef['state']=0x5;_0x18bef[_0x6c32('0xde')]='Busy';_0x18bef[_0x6c32('0xe6')]+=0x1;_0x18bef[_0x6c32('0xe4')]+=0x1;ami['emit'](_0x6c32('0x1a9'),ut['buildObj'](_0x2bedc6,_0x6c32('0x1aa')));_0x4e4279['createHistory'](_0x18bef)[_0x6c32('0xac')](loggerCatch(_0x6c32('0x1ab')));if(_0x4e4279['checkRetriveMax'](0x5,_0x2bedc6,_0xb94109)){if(_0x18bef[_0x6c32('0xe6')]>=_0xb94109[_0x6c32('0x1ac')]){_0x4e4279['createStateFinal'](_0x18bef,_0x4e35d9,_0x2c79bd,_0x6c32('0x1ad'));}else{_0x4e4279['stateGlobal'](_0x18bef,_0x4e35d9,_0x2c79bd,_0x6c32('0x1ad'));}}break;case'8':_0xb94109[_0x6c32('0x5a')]+=0x1;_0x18bef[_0x6c32('0xa3')]=0x8;_0x18bef['statedesc']=_0x6c32('0x1ae');_0x18bef[_0x6c32('0xe7')]+=0x1;_0x18bef['countglobal']+=0x1;ami[_0x6c32('0x1a6')]('custom:agentcongestion',ut[_0x6c32('0x1a1')](_0x2bedc6,_0x6c32('0x1af')));_0x4e4279['createHistory'](_0x18bef)['catch'](loggerCatch(_0x6c32('0x1b0')));if(_0x4e4279[_0x6c32('0x18e')](0x8,_0x2bedc6,_0xb94109)){if(_0x18bef[_0x6c32('0xe7')]>=_0xb94109[_0x6c32('0x1b1')]){_0x4e4279[_0x6c32('0xfc')](_0x18bef,_0x4e35d9,_0x2c79bd,'reason\x208\x20congestion');}else{_0x4e4279['stateGlobal'](_0x18bef,_0x4e35d9,_0x2c79bd,_0x6c32('0x1b2'));}}break;case'11':_0xb94109['outboundAbandonedCallsDay']+=0x1;_0x18bef[_0x6c32('0xa3')]=0xb;_0x18bef[_0x6c32('0xde')]=_0x6c32('0x118');_0x18bef['countabandonedretry']+=0x1;_0x18bef[_0x6c32('0xe4')]+=0x1;_0x4e4279[_0x6c32('0xc5')](_0x18bef)[_0x6c32('0xac')](loggerCatch(_0x6c32('0x11c')));if(_0x4e4279['checkRetriveMax'](0xb,_0x2bedc6,_0xb94109)){if(_0x18bef[_0x6c32('0xea')]>=_0xb94109['dialAbandonedMaxRetry']){_0x4e4279[_0x6c32('0xfc')](_0x18bef,_0x4e35d9,_0x2c79bd,_0x6c32('0x1b3'));}else{_0x4e4279[_0x6c32('0xed')](_0x18bef,_0x4e35d9,_0x2c79bd,_0x6c32('0x1b3'));}}break;case'20':_0xb94109[_0x6c32('0x5e')]+=0x1;_0x18bef['state']=0x14;_0x18bef['statedesc']=_0x6c32('0x1b4');_0x18bef[_0x6c32('0xec')]+=0x1;_0x18bef['countglobal']+=0x1;ami['emit'](_0x6c32('0x1b5'),ut[_0x6c32('0x1a1')](_0x2bedc6,_0x6c32('0x1b6')));_0x4e4279['createHistory'](_0x18bef)[_0x6c32('0xac')](loggerCatch(_0x6c32('0x1b7')));if(_0x4e4279[_0x6c32('0x18e')](0x14,_0x2bedc6,_0xb94109)){if(_0x18bef[_0x6c32('0xec')]>=_0xb94109[_0x6c32('0x199')]){_0x4e4279['createStateFinal'](_0x18bef,_0x4e35d9,_0x2c79bd,_0x6c32('0x1b8'));}else{_0x4e4279[_0x6c32('0xed')](_0x18bef,_0x4e35d9,_0x2c79bd,_0x6c32('0x1b8'));}}break;default:_0xb94109['outboundUnknownCallsDay']+=0x1;_0x18bef[_0x6c32('0xa3')]=0xc;_0x18bef[_0x6c32('0xde')]=_0x69302e['reason'];_0x4e4279[_0x6c32('0xc5')](_0x18bef)[_0x6c32('0xac')](loggerCatch('[syncAgentComplete][createHistory][?]'));if(_0x4e4279[_0x6c32('0x18e')](_0x69302e[_0x6c32('0x103')],_0x2bedc6,_0xb94109)){if(_0x18bef[_0x6c32('0xe6')]+_0x18bef[_0x6c32('0xe7')]+_0x18bef[_0x6c32('0xe8')]+_0x18bef[_0x6c32('0xfa')]+_0x18bef[_0x6c32('0xe9')]+_0x18bef['countabandonedretry']+_0x18bef[_0x6c32('0xeb')]+_0x18bef[_0x6c32('0xec')]>=_0xb94109[_0x6c32('0xfb')]){_0x4e4279[_0x6c32('0xed')](_0x18bef,_0x4e35d9,_0x2c79bd,_0x69302e[_0x6c32('0x103')]);}else{_0x4e4279['createStateFinal'](_0x18bef,_0x4e35d9,_0x2c79bd,_0x69302e[_0x6c32('0x103')]);}}}});};Dialer[_0x6c32('0xa5')][_0x6c32('0xed')]=function(_0x126944,_0x4fe058,_0x4d9853,_0x513ae7){var _0xba4c45=new Final(_0x126944);_0xba4c45[_0x6c32('0xa3')]=0xf;_0xba4c45[_0x6c32('0xde')]='Global';this[_0x6c32('0xfc')](_0xba4c45,_0x4fe058,_0x4d9853,_0x513ae7);};Dialer[_0x6c32('0xa5')][_0x6c32('0xfc')]=function(_0x4c7383,_0x4b6533,_0x19d169,_0x3da607){this[_0x6c32('0xc3')](_0x4c7383)['then'](function(){return _0x4b6533(msgResponse(_0x6c32('0x19d'),'Success',_0x3da607));})[_0x6c32('0xac')](function(){return _0x19d169(msgResponse('[moveContactManagedDialer][0]',_0x6c32('0x138'),_0x6c32('0x1b9')));});};Dialer[_0x6c32('0xa5')][_0x6c32('0x9')]=function(_0xf4df75){var _0x154d8=_0xf4df75[_0x6c32('0x1ba')]/0x64;var _0xbcddca=_0xf4df75[_0x6c32('0x10e')]/(_0xf4df75['outboundDropCallsDayTimeout']+_0xf4df75[_0x6c32('0x57')]);var _0x4fae58=Math[_0x6c32('0x1bb')](_0xf4df75[_0x6c32('0x1bc')]*(_0xf4df75['predictiveIntervalMaxThreshold']/0x64));var _0x3aae8c=Math[_0x6c32('0x1bb')](_0xf4df75[_0x6c32('0x1bc')]*(_0xf4df75[_0x6c32('0x1bd')]/0x64));var _0x37e539=_0xf4df75[_0x6c32('0x46')]+_0xf4df75[_0x6c32('0x4c')];var _0x11b777=Math[_0x6c32('0x1be')](_0xf4df75[_0x6c32('0x83')]*_0xf4df75[_0x6c32('0x86')]*_0xf4df75[_0x6c32('0x65')]*_0xf4df75[_0x6c32('0x66')]);if(_[_0x6c32('0x35')](_0xf4df75[_0x6c32('0x25')])){if(!_[_0x6c32('0x35')](_0xf4df75[_0x6c32('0x24')])){_0xf4df75[_0x6c32('0x24')]=undefined;loggerPredictive[_0x6c32('0x92')](_0x6c32('0x1bf'),_0x6c32('0x1c0'));}if(!_['isUndefined'](_0xf4df75['handlePredictive'])){loggerPredictive[_0x6c32('0x92')]('[startMethodPredictive][StartProgressive]',_0x6c32('0x1c1'));clearInterval(_0xf4df75[_0x6c32('0x8c')]);_0xf4df75[_0x6c32('0x8c')]=undefined;}_0xf4df75[_0x6c32('0x25')]=moment()[_0x6c32('0x6f')](_0x6c32('0xf3'));loggerPredictive['info'](_0xf4df75[_0x6c32('0x37')],'collection\x20data\x20in\x20progressive\x20at',_0xf4df75['startProgressive']);this['handlePower'](_0xf4df75,0x1);}else if(ifInterval(_0xf4df75[_0x6c32('0x1c2')],_0xf4df75[_0x6c32('0x25')])){this[_0x6c32('0x14d')](_0xf4df75,0x1);loggerPredictiveCalls['info'](_0x6c32('0x1c3'),_0xf4df75['startProgressive'],_0xf4df75[_0x6c32('0x37')]);_0xf4df75[_0x6c32('0x83')]=0x0;_0xf4df75['predictiveIntervalErlangCallsDroppedCalls']=0x0;}else if(_0x154d8<_0xbcddca&&_0xf4df75[_0x6c32('0x1c4')]===_0x6c32('0x1c5')){freeVariablesPredictive(_0xf4df75);loggerPredictive['info'](_0x6c32('0x1c6'),_0x6c32('0x1c7'),_0xbcddca,_0x6c32('0x25'),_0xf4df75[_0x6c32('0x37')]);}else if(_0x11b777<_0xf4df75['predictiveIntervalErlangCallsDroppedCalls']&&_0xf4df75[_0x6c32('0x1c4')]==='dropRate'){freeVariablesPredictive(_0xf4df75);loggerPredictive[_0x6c32('0x74')](_0x6c32('0x1c8'),_0x6c32('0x1c9'),_0x11b777,_0x6c32('0x1ca'),_0xf4df75['predictiveIntervalErlangCallsDroppedCalls'],_0x6c32('0x25'),_0xf4df75[_0x6c32('0x37')]);}else if(!ifInterval(_0xf4df75[_0x6c32('0x1c2')],_0xf4df75['startProgressive'])&&_['isUndefined'](_0xf4df75['startPredictive'])&&!_[_0x6c32('0x35')](_0xf4df75[_0x6c32('0x25')])){_0xf4df75['startPredictive']=moment()['format'](_0x6c32('0xf3'));loggerPredictive['info'](_0xf4df75[_0x6c32('0x37')],_0x6c32('0x1cb'),_0xf4df75['startPredictive']);this[_0x6c32('0xb9')](_0xf4df75[_0x6c32('0x1c2')])[_0x6c32('0xb3')](this[_0x6c32('0x1cc')](_0xf4df75))['then'](mergeDataErlangB(_0xf4df75))[_0x6c32('0xb3')](this['startMethodPredictive'](_0xf4df75))['catch'](loggerCatchPredictive(_0x6c32('0x1cd'),_0xf4df75));}else if(!ifInterval(_0xf4df75['dialPredictiveInterval'],_0xf4df75['startPredictive'])){_0xf4df75[_0x6c32('0x64')]=0x0;_0xf4df75['startPredictive']=moment()['format'](_0x6c32('0xf3'));loggerPredictive[_0x6c32('0x74')](_0xf4df75[_0x6c32('0x37')],'recalculate\x20predictive\x20at',_0xf4df75[_0x6c32('0x24')]);clearInterval(_0xf4df75['handlePredictive']);_0xf4df75[_0x6c32('0x8c')]=undefined;this['averageHandleTime'](_0xf4df75[_0x6c32('0x1c2')])[_0x6c32('0xb3')](this[_0x6c32('0x1cc')](_0xf4df75))['then'](mergeDataErlangB(_0xf4df75))['then'](this[_0x6c32('0x1ce')](_0xf4df75))['catch'](loggerCatchPredictive(_0x6c32('0x1cf'),_0xf4df75));}else if(_0xf4df75[_0x6c32('0x1bc')]&&_0x37e539<_0xf4df75[_0x6c32('0x1bc')]-_0x3aae8c){freeVariablesPredictive(_0xf4df75);loggerPredictive[_0x6c32('0x74')](_0xf4df75['name'],_0x6c32('0x1d0'),_0x37e539,')\x20are\x20less\x20than\x20threshold\x20(',_0xf4df75['predictiveIntervalAvailable'],'-',_0x3aae8c,'=',_0xf4df75[_0x6c32('0x1bc')]-_0x3aae8c,')');}else if(_0xf4df75[_0x6c32('0x1bc')]&&_0x37e539>_0xf4df75[_0x6c32('0x1bc')]+_0x4fae58){freeVariablesPredictive(_0xf4df75);loggerPredictive[_0x6c32('0x74')](_0xf4df75[_0x6c32('0x37')],_0x6c32('0x1d0'),_0x37e539,_0x6c32('0x1d1'),_0xf4df75[_0x6c32('0x1bc')],'+',_0x4fae58,'=',_0xf4df75[_0x6c32('0x1bc')]+_0x4fae58,')');}};Dialer[_0x6c32('0xa5')][_0x6c32('0x1cc')]=function(_0x1b0c8e){var _0x1f32ba=this;return function(_0x49481e){return new BPromise(function(_0x4ce545,_0x2e914b){_[_0x6c32('0x88')](_0x1b0c8e,_0x49481e[0x0]);if(checkGetDataPredictive(_0x49481e[0x0])){var _0x200972=_0x1b0c8e[_0x6c32('0x1bc')]=_0x1b0c8e[_0x6c32('0x4c')]+_0x1b0c8e[_0x6c32('0x46')];var _0x51b212=_0x1b0c8e[_0x6c32('0x1c2')]*0x3c;var _0x2851c2=_0x49481e[0x0][_0x6c32('0x60')]+_0x49481e[0x0]['predictiveIntervalAvgHoldtime'];var _0x5391e2=(_0x49481e[0x0][_0x6c32('0x77')]+_0x49481e[0x0][_0x6c32('0x62')]+_0x49481e[0x0][_0x6c32('0x61')])/_0x49481e[0x0]['predictiveIntervalTotalCalls'];_0x1b0c8e['predictiveIntervalHitRate']=_0x5391e2>0x0?_0x5391e2:0x1;switch(_0x1b0c8e[_0x6c32('0x1c4')]){case _0x6c32('0x1c5'):var _0x337e79=_0x1b0c8e[_0x6c32('0x1ba')]/0x64;return _0x1f32ba[_0x6c32('0x1d2')](_0x200972,_0x51b212,_0x2851c2,_0x5391e2,_0x337e79)[_0x6c32('0xb3')](function(_0x2a2455){return _0x4ce545(_0x2a2455);});case'agentBusyFactor':var _0x197014=_0x1b0c8e['dialPredictiveOptimizationPercentage']/0x64;return _0x1f32ba['busyFactor'](_0x200972,_0x51b212,_0x2851c2,_0x5391e2,_0x197014)[_0x6c32('0xb3')](function(_0x963c46){return _0x4ce545(_0x963c46);});default:return _0x2e914b(msgResponse(_0x6c32('0x1d3'),_0x6c32('0x138'),_0x6c32('0x1d4')));}}else{return _0x2e914b(msgResponse(_0x6c32('0x1d3'),_0x6c32('0x138'),'check\x20failure'));}});};};Dialer[_0x6c32('0xa5')][_0x6c32('0x1d5')]=function(_0x13db43){var _0x582588=this;return function(_0x325929){return new BPromise(function(_0x565a0,_0x8d2c9e){_['merge'](_0x13db43,_0x325929[0x0]);if(checkGetDataPredictive(_0x325929[0x0])){loggerPredictive['info'](JSON['stringify'](_0x325929[0x0]));if(_0x13db43[_0x6c32('0x1c4')]===_0x6c32('0x1c5')){return _0x582588['getVoiceQueueRtPauses'](_0x13db43['id'])['then'](function(_0x5ca413){var _0x40c065=_0x13db43[_0x6c32('0x47')]-_0x5ca413[0x0]['outboundQueuePauses'];var _0x82e792=_0x13db43[_0x6c32('0x1c2')]*0x3c;var _0x3b5be4=_0x325929[0x0][_0x6c32('0x60')]+_0x325929[0x0][_0x6c32('0x7b')];var _0x5342ad=(_0x325929[0x0][_0x6c32('0x77')]+_0x325929[0x0]['predictiveIntervalDroppedCallsTimeout']+_0x325929[0x0]['predictiveIntervalDroppedCallsCallersExit'])/_0x325929[0x0][_0x6c32('0x68')];var _0x8e818c=_0x13db43['dialPredictiveOptimizationPercentage']/0x64;_0x13db43[_0x6c32('0x67')]=_0x5ca413[0x0][_0x6c32('0x1d6')]||0x0;_0x13db43['predictiveIntervalHitRate']=_0x5342ad>0x0?_0x5342ad:0x1;return _0x582588[_0x6c32('0x1d2')](_0x40c065,_0x82e792,_0x3b5be4,_0x5342ad,_0x8e818c);})['then'](function(_0x2ef2a0){return _0x565a0(_0x2ef2a0);})[_0x6c32('0xac')](function(_0x27ebb7){return _0x8d2c9e(msgResponse(_0x6c32('0x1d7'),_0x6c32('0x138'),JSON[_0x6c32('0x40')](_0x27ebb7)));});}if(_0x13db43[_0x6c32('0x1c4')]===_0x6c32('0x1d8')){return _0x582588[_0x6c32('0xc1')](_0x13db43['id'])[_0x6c32('0xb3')](function(_0x50c4ed){var _0x529829=_0x13db43['loggedIn']-_0x50c4ed[0x0][_0x6c32('0x1d6')];var _0x422413=_0x13db43[_0x6c32('0x1c2')]*0x3c;var _0x2f329b=_0x325929[0x0][_0x6c32('0x60')]+_0x325929[0x0][_0x6c32('0x7b')];var _0x25c158=(_0x325929[0x0][_0x6c32('0x77')]+_0x325929[0x0][_0x6c32('0x62')]+_0x325929[0x0]['predictiveIntervalDroppedCallsCallersExit'])/_0x325929[0x0][_0x6c32('0x68')];var _0x30c21b=_0x13db43[_0x6c32('0x1ba')]/0x64;_0x13db43['predictiveIntervalPauses']=_0x50c4ed[0x0][_0x6c32('0x1d6')]||0x0;_0x13db43['predictiveIntervalHitRate']=_0x25c158>0x0?_0x25c158:0x1;return _0x582588[_0x6c32('0x1d9')](_0x529829,_0x422413,_0x2f329b,_0x25c158,_0x30c21b);})[_0x6c32('0xb3')](function(_0xc37189){return _0x565a0(_0xc37189);})[_0x6c32('0xac')](function(_0x3b9a34){return _0x8d2c9e(msgResponse(_0x6c32('0x1d7'),_0x6c32('0x138'),JSON['stringify'](_0x3b9a34)));});}}else{return _0x8d2c9e(msgResponse(_0x6c32('0x1d3'),_0x6c32('0x138'),_0x6c32('0x1da')));}});};};Dialer[_0x6c32('0xa5')][_0x6c32('0x1ce')]=function(_0x24cae2){var _0x3f6edc=this;return function(){var _0x3faddc=0x0;var _0x5d3d28=Math['floor'](_0x24cae2[_0x6c32('0x6a')]*0x3e8);if(_0x5d3d28>0x0){_0x5d3d28=_0x5d3d28<0x64?0x64:_0x5d3d28;loggerPredictive[_0x6c32('0x74')](_0x24cae2[_0x6c32('0x37')],_0x6c32('0x1db'),_0x5d3d28,_0x6c32('0x89'));_0x24cae2[_0x6c32('0x8c')]=setInterval(function(){_0x3f6edc[_0x6c32('0x8c')](_0x24cae2);loggerPredictiveCalls['info'](_0x6c32('0x1dc'),_0x3faddc+=0x1);},_0x5d3d28);}else{loggerPredictive[_0x6c32('0x74')](_0x24cae2[_0x6c32('0x37')],_0x6c32('0x1dd'));}};};Dialer[_0x6c32('0xa5')][_0x6c32('0x1de')]=function(_0x1a6a67,_0x231993){var _0x379ddb=this;return function(_0xf748e8){if(_[_0x6c32('0x3c')](_0xf748e8)){if(_[_0x6c32('0xa8')](_0x231993[_0x6c32('0xcd')])||!_0x231993['recallme']){if(_0x1a6a67['dialMethod']===_0x6c32('0x150')){_0x1a6a67[_0x6c32('0x122')]=_[_0x6c32('0x35')](_0x1a6a67[_0x6c32('0x122')])?!![]:_0x1a6a67[_0x6c32('0x122')];var _0x4aaf48=uuid['v4']();_0x379ddb[_0x6c32('0x21')][_0x4aaf48]=new Action(_0x1a6a67,_0x231993,_0x4aaf48);loggerBooked[_0x6c32('0x74')](_0x6c32('0x1df'),_0x4aaf48,_0x6c32('0x1e0'),JSON[_0x6c32('0x40')](_0x1a6a67[_0x6c32('0x122')]),'Queue:\x20',_0x1a6a67[_0x6c32('0x37')]);if(_0x1a6a67['queueStatusComplete']){_0x1a6a67[_0x6c32('0x122')]=![];_0x379ddb[_0x6c32('0x27')][_0x379ddb[_0x6c32('0x21')][_0x4aaf48][_0x6c32('0xb0')]]=[];ami[_0x6c32('0xa9')]({'actionid':_0x4aaf48,'action':'queuestatus','queue':_0x1a6a67[_0x6c32('0x37')]})[_0x6c32('0xac')](function(){_0x379ddb[_0x6c32('0xae')](_0x1a6a67);_0x379ddb['rescheduleContact']({'active':![],'ContactId':_0x379ddb[_0x6c32('0x21')][_0x4aaf48][_0x6c32('0xcb')],'ListId':_0x379ddb[_0x6c32('0x21')][_0x4aaf48][_0x6c32('0xcc')],'VoiceQueueId':_0x379ddb[_0x6c32('0x21')][_0x4aaf48][_0x6c32('0xce')]||undefined,'CampaignId':_0x379ddb[_0x6c32('0x21')][_0x4aaf48]['CampaignId']||undefined})[_0x6c32('0xac')](loggerCatch(_0x6c32('0x1e1')));delete _0x379ddb[_0x6c32('0x21')][_0x4aaf48];});}else{loggerBooked['info']('[booked][checkContactBlack][else]',JSON[_0x6c32('0x40')](_0x1a6a67[_0x6c32('0x122')]),_0x6c32('0x1e2'),_0x1a6a67['name']);_0x379ddb[_0x6c32('0xae')](_0x1a6a67);_0x379ddb['rescheduleContact']({'active':![],'ContactId':_0x379ddb[_0x6c32('0x21')][_0x4aaf48][_0x6c32('0xcb')],'ListId':_0x379ddb[_0x6c32('0x21')][_0x4aaf48][_0x6c32('0xcc')],'VoiceQueueId':_0x379ddb['actions'][_0x4aaf48]['VoiceQueueId']||undefined,'CampaignId':_0x379ddb[_0x6c32('0x21')][_0x4aaf48]['CampaignId']||undefined})['catch'](loggerCatch(_0x6c32('0x1e1')));delete _0x379ddb['actions'][_0x4aaf48];}}else{return _0x379ddb[_0x6c32('0x15d')](_0x1a6a67,_0x231993);}}else{if(getDiff(_0x231993[_0x6c32('0x1e3')])<_0x1a6a67['dialRecallMeTimeout']*0x3c){if(_0x231993[_0x6c32('0x1e4')]&&!_0x231993[_0x6c32('0x1e4')][_0x6c32('0x1e5')]){_0x379ddb[_0x6c32('0x1b')]['run'](_0x231993['id'])['finally'](function(){_0x379ddb[_0x6c32('0xae')](_0x1a6a67);});}else{_0x379ddb['unlockContact']({'active':![]},_0x231993['id'],0x1)[_0x6c32('0x18a')](function(){_0x379ddb['updateOriginated'](_0x1a6a67);});}}else{_0x1a6a67[_0x6c32('0x1e6')]+=0x1;_0x379ddb[_0x6c32('0xae')](_0x1a6a67);if(_0x1a6a67[_0x6c32('0x1e7')]){_0x379ddb[_0x6c32('0xbc')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x231993[_0x6c32('0xcb')],'ListId':_0x231993[_0x6c32('0xcc')],'VoiceQueueId':_0x231993[_0x6c32('0xce')]||undefined,'CampaignId':_0x231993[_0x6c32('0xcf')]||undefined})[_0x6c32('0xac')](loggerCatch(_0x6c32('0x1e8')));_0x379ddb[_0x6c32('0xc5')](createObjHistory(_0x1a6a67,_0x231993,_0x6c32('0x1e9'),0x17,'RecallInQueue'))[_0x6c32('0xac')](loggerCatch(_0x6c32('0x1ea')));}else{_0x379ddb[_0x6c32('0xd6')](createObjHistory(_0x1a6a67,_0x231993,_0x6c32('0x1eb'),0x16,_0x6c32('0x1ec')),_0x6c32('0x1ed'),_0x6c32('0x1ee'));}}}}else{_0x1a6a67[_0x6c32('0x58')]+=0x1;_0x379ddb[_0x6c32('0xd6')](createObjHistory(_0x1a6a67,_0x231993,_0x6c32('0x1ef'),0xd,_0x6c32('0x1f0')),_0x6c32('0x1f1'),_0x6c32('0x1f2'));throw _0x6c32('0x1f3');}};};Dialer[_0x6c32('0xa5')][_0x6c32('0x1f4')]=function(_0x437f72){var _0x2489a8=this;var _0x440b5d=_0x437f72[_0x6c32('0x1f5')]-_0x437f72[_0x6c32('0x69')]-_0x437f72[_0x6c32('0x1f6')];emitCampaignSummary(_0x437f72);if(_0x440b5d>0x0){if(_0x440b5d>this[_0x6c32('0x1f')]){_0x440b5d=this['maxNumberOriginate'];}_0x437f72[_0x6c32('0x1f6')]+=_0x440b5d;this[_0x6c32('0xc0')](_0x437f72['id'],_0x440b5d,_0x437f72['dialOrderByScheduledAt'])[_0x6c32('0xb3')](function(_0x22f7fc){_0x437f72[_0x6c32('0x1f6')]-=_0x440b5d;_0x437f72[_0x6c32('0x1f6')]=_0x437f72[_0x6c32('0x1f6')]>0x0?_0x437f72[_0x6c32('0x1f6')]:0x0;if(!checkContactEmpty(_0x22f7fc)){_0x437f72['message']=_0x6c32('0x1f7');logger[_0x6c32('0x74')](_0x6c32('0x1f8')+_0x437f72['name']);}else{_0x437f72[_0x6c32('0x69')]+=_0x22f7fc[_0x6c32('0x127')];_0x437f72[_0x6c32('0x36')]=_0x6c32('0x1f9');for(var _0x201229=0x0;_0x201229<_0x22f7fc['length'];_0x201229+=0x1){_0x437f72[_0x6c32('0x1fa')]+=0x1;if(_[_0x6c32('0xa8')](_0x22f7fc[_0x201229])||_[_0x6c32('0xa8')](_0x22f7fc[_0x201229][_0x6c32('0x15e')])||_['isNil'](_0x22f7fc[_0x201229][_0x6c32('0x15e')][_0x6c32('0x15f')])){_0x2489a8[_0x6c32('0xc9')](_0x6c32('0x1fb'),_0x437f72,_0x22f7fc[_0x201229]);}else{_0x2489a8[_0x6c32('0xb7')](_[_0x6c32('0xca')](_0x22f7fc[_0x201229],[_0x6c32('0xcf'),'Contact.phone']))[_0x6c32('0xb3')](_0x2489a8[_0x6c32('0x1de')](_0x437f72,_0x22f7fc[_0x201229]))['catch'](_0x2489a8['loggerHandler'](_0x6c32('0x1fc'),_0x437f72));}}}})['catch'](loggerGetContactDialer(_0x6c32('0x1fd'),_0x437f72,_0x440b5d));}};Dialer[_0x6c32('0xa5')][_0x6c32('0x14d')]=function(_0x4310bf,_0x702a85){var _0x2a7628=this;var _0x3b16f9=[];var _0xa9dd3a=_0x702a85>=0x1?_0x702a85:0x1;if(_0x4310bf['dialMethod']===_0x6c32('0x150')){_0xa9dd3a=0x1;}var _0x51818c=Math['floor'](_0x4310bf[_0x6c32('0x46')]*_0xa9dd3a)-_0x4310bf[_0x6c32('0x69')]-_0x4310bf[_0x6c32('0x1f6')];emitVoiceQueueSummary(_0x4310bf);if(_0x4310bf['dialLimitQueue']>0x0){var _0x2fe147=_0x4310bf['dialLimitQueue']-_0x4310bf['originated']-_0x4310bf['talking']-_0x4310bf[_0x6c32('0x1f6')]-_0x4310bf['pTalking'];if(_0x51818c>_0x2fe147){_0x51818c=_0x2fe147;}}if(_0x51818c>0x0){if(_0x4310bf[_0x6c32('0x52')]===_0x6c32('0x150')){_0x51818c=0x1;}if(_0x51818c>this[_0x6c32('0x1f')]){_0x51818c=this[_0x6c32('0x1f')];}_0x4310bf[_0x6c32('0x1f6')]+=_0x51818c;for(var _0x489d80 in this[_0x6c32('0x1d')]){if(typeof this[_0x6c32('0x1d')][_0x489d80]!=='undefined'){if(this[_0x6c32('0x1d')][_0x489d80]['state']===_0x6c32('0x1fe')&&this[_0x6c32('0x1d')][_0x489d80][_0x6c32('0xaa')]===_0x6c32('0x1ff')){_0x3b16f9[_0x6c32('0x13f')](this[_0x6c32('0x1d')][_0x489d80]['id']);}}}this[_0x6c32('0xbf')](_0x4310bf['id'],_0x3b16f9,_0x51818c,_0x4310bf[_0x6c32('0x200')])['then'](function(_0xf4fe2b){_0x4310bf[_0x6c32('0x1f6')]-=_0x51818c;_0x4310bf[_0x6c32('0x1f6')]=_0x4310bf['temp']>0x0?_0x4310bf[_0x6c32('0x1f6')]:0x0;if(!checkContactEmpty(_0xf4fe2b)){_0x2a7628[_0x6c32('0xb1')](_0x4310bf)[_0x6c32('0xb3')](sendMessageReschedule(_0x4310bf))[_0x6c32('0xac')](loggerCatch(_0x6c32('0xb4')));}else{_0x4310bf[_0x6c32('0x69')]+=_0xf4fe2b[_0x6c32('0x127')];_0x4310bf[_0x6c32('0x36')]=_0x4310bf[_0x6c32('0x52')]===_0x6c32('0x150')?_0x6c32('0x201'):_0x6c32('0x1f9');for(var _0x1c226e=0x0;_0x1c226e<_0xf4fe2b[_0x6c32('0x127')];_0x1c226e+=0x1){if(_[_0x6c32('0xa8')](_0xf4fe2b[_0x1c226e])||_[_0x6c32('0xa8')](_0xf4fe2b[_0x1c226e][_0x6c32('0x15e')])||_[_0x6c32('0xa8')](_0xf4fe2b[_0x1c226e][_0x6c32('0x15e')]['phone'])){_0x2a7628['emptyContact']('[actionOriginate]\x20',_0x4310bf,_0xf4fe2b[_0x1c226e]);}else{_0x2a7628[_0x6c32('0xb5')](_['pick'](_0xf4fe2b[_0x1c226e],['VoiceQueueId',_0x6c32('0x202')]))[_0x6c32('0xb3')](_0x2a7628[_0x6c32('0x1de')](_0x4310bf,_0xf4fe2b[_0x1c226e]))[_0x6c32('0xac')](_0x2a7628[_0x6c32('0xc8')](_0x6c32('0x1fb'),_0x4310bf));}}}})[_0x6c32('0xac')](loggerGetContactDialer(_0x6c32('0x203'),_0x4310bf,_0x51818c));}};Dialer['prototype'][_0x6c32('0x8c')]=function(_0x4ae0aa){if(_0x4ae0aa[_0x6c32('0x204')]>0x0){var _0x2e2e74=_0x4ae0aa[_0x6c32('0x204')]-_0x4ae0aa[_0x6c32('0x69')]-_0x4ae0aa[_0x6c32('0x4c')];if(_0x2e2e74>0x0){this[_0x6c32('0x205')](_0x4ae0aa);}else{loggerPredictiveCalls[_0x6c32('0x74')]('[handlePredictive][limitChannel]');}}else{this['tryOriginatePredictive'](_0x4ae0aa);}};Dialer[_0x6c32('0xa5')]['tryOriginatePredictive']=function(_0x3a1856){var _0x1f37a3=this;var _0xc85bb9=[];_0x3a1856[_0x6c32('0x69')]+=0x1;for(var _0x339354 in this[_0x6c32('0x1d')]){if(typeof this[_0x6c32('0x1d')][_0x339354]!==_0x6c32('0x95')){if(this[_0x6c32('0x1d')][_0x339354][_0x6c32('0xa3')]===_0x6c32('0x1fe')&&this[_0x6c32('0x1d')][_0x339354]['status']==='reachable'){_0xc85bb9[_0x6c32('0x13f')](this['agents'][_0x339354]['id']);}}}this[_0x6c32('0xbf')](_0x3a1856['id'],_0xc85bb9,0x1,_0x3a1856['dialOrderByScheduledAt'])['then'](function(_0x318307){if(!checkContactEmpty(_0x318307)){checkContactLowerLimitOriginate(_0x3a1856,0x1,0x0);_0x1f37a3[_0x6c32('0xb1')](_0x3a1856)[_0x6c32('0xb3')](sendMessageReschedule(_0x3a1856))[_0x6c32('0xac')](loggerCatch(_0x6c32('0xb4')));}else{_0x3a1856[_0x6c32('0x36')]=_0x6c32('0x1f9');if(_['isNil'](_0x318307[0x0])||_[_0x6c32('0xa8')](_0x318307[0x0][_0x6c32('0x15e')])||_[_0x6c32('0xa8')](_0x318307[0x0][_0x6c32('0x15e')][_0x6c32('0x15f')])){_0x1f37a3[_0x6c32('0xc9')](_0x6c32('0x1fb'),_0x3a1856,_0x318307[0x0]);}else{_0x1f37a3[_0x6c32('0xb5')](_['pick'](_0x318307[0x0],[_0x6c32('0xce'),_0x6c32('0x202')]))[_0x6c32('0xb3')](_0x1f37a3[_0x6c32('0x1de')](_0x3a1856,_0x318307[0x0]))[_0x6c32('0xac')](_0x1f37a3[_0x6c32('0xc8')]('[actionOriginatePredictive]\x20',_0x3a1856));}}})[_0x6c32('0xac')](loggerGetContactDialer('[getContactDialerPredictive]',_0x3a1856,0x1));emitVoiceQueueSummary(_0x3a1856);};Dialer[_0x6c32('0xa5')][_0x6c32('0x1d2')]=function(_0x3d720c,_0x1eefbd,_0x513884,_0x2155eb,_0x2c0d6a,_0x2f8457){loggerPredictive[_0x6c32('0x74')](_0x6c32('0x206'));loggerPredictive[_0x6c32('0x74')](_0x6c32('0x207'),_0x3d720c);loggerPredictive['info'](_0x6c32('0x208'),_0x1eefbd);loggerPredictive[_0x6c32('0x74')](_0x6c32('0x209'),_0x513884);loggerPredictive[_0x6c32('0x74')](_0x6c32('0x20a'),_0x2155eb);loggerPredictive[_0x6c32('0x74')](_0x6c32('0x20b'),_0x2c0d6a);loggerPredictive['info'](_0x6c32('0x7d'));return new BPromise(function(_0x493306,_0x4561ae){if(_0x3d720c<=0x0||isNaN(_0x3d720c)){return _0x4561ae(msgResponse(_0x6c32('0x20c'),_0x6c32('0x3f'),'m\x20=\x20'+_0x3d720c));}if(_0x513884<=0x0||isNaN(_0x513884)){return _0x4561ae(msgResponse(_0x6c32('0x20c'),_0x6c32('0x3f'),_0x6c32('0x20d')+_0x513884));}if(_0x2155eb<=0x0||isNaN(_0x2155eb)){return _0x4561ae(msgResponse('[abandonmentRate]',_0x6c32('0x3f'),_0x6c32('0x20e')+_0x2155eb));}if(_0x1eefbd<=0x0||isNaN(_0x1eefbd)){return _0x4561ae(msgResponse(_0x6c32('0x20c'),'Error',_0x6c32('0x20f')+_0x1eefbd));}if(_0x2c0d6a<=0x0||isNaN(_0x2c0d6a)){return _0x4561ae(msgResponse(_0x6c32('0x20c'),_0x6c32('0x3f'),_0x6c32('0x210')+_0x2c0d6a));}_0x2f8457=_0x2f8457||0x0;var _0x117f46=0x1/_0x513884;var _0x181fc4=0x0;var _0x21c512=0x0;var _0x4bad6a=0x0;var _0x28478a=0x0;for(var _0x2b28dd=0x0;_0x4bad6a<_0x2c0d6a;_0x2b28dd+=0x1){_0x21c512=_0x2b28dd/_0x1eefbd;_0x181fc4=(_0x2155eb*_0x21c512+_0x2f8457)/_0x117f46;_0x4bad6a=erlangb(_0x181fc4,_0x3d720c);_0x28478a=_0x181fc4/_0x3d720c*(0x1-erlangb(_0x181fc4,_0x3d720c));}return _0x493306({'erlangCalls':_0x2b28dd,'erlangCallToSecond':_0x1eefbd/_0x2b28dd,'erlangAbandonmentRate':_0x4bad6a,'erlangBusyFactor':_0x28478a});});};Dialer[_0x6c32('0xa5')]['busyFactor']=function(_0x5ef606,_0x1921e6,_0x1cd068,_0xfbbd0f,_0xf11786,_0x1c8b2a){loggerPredictive[_0x6c32('0x74')](_0x6c32('0x211'));loggerPredictive[_0x6c32('0x74')]('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',_0x5ef606);loggerPredictive[_0x6c32('0x74')](_0x6c32('0x208'),_0x1921e6);loggerPredictive['info'](_0x6c32('0x209'),_0x1cd068);loggerPredictive[_0x6c32('0x74')](_0x6c32('0x20a'),_0xfbbd0f);loggerPredictive[_0x6c32('0x74')](_0x6c32('0x212'),_0xf11786);loggerPredictive[_0x6c32('0x74')]('---------------------------');return new BPromise(function(_0x41fed7,_0x3e28f5){if(_0x5ef606<=0x0||isNaN(_0x5ef606)){return _0x3e28f5(msgResponse(_0x6c32('0x213'),_0x6c32('0x3f'),_0x6c32('0x214')+_0x5ef606));}if(_0x1cd068<=0x0||isNaN(_0x1cd068)){return _0x3e28f5(msgResponse(_0x6c32('0x213'),_0x6c32('0x3f'),_0x6c32('0x20d')+_0x1cd068));}if(_0xfbbd0f<=0x0||isNaN(_0xfbbd0f)){return _0x3e28f5(msgResponse(_0x6c32('0x213'),'Error',_0x6c32('0x20e')+_0xfbbd0f));}if(_0x1921e6<=0x0||isNaN(_0x1921e6)){return _0x3e28f5(msgResponse('[busyFactor]',_0x6c32('0x3f'),'interval\x20=\x20'+_0x1921e6));}if(_0xf11786<=0x0||isNaN(_0xf11786)){return _0x3e28f5(msgResponse(_0x6c32('0x213'),_0x6c32('0x3f'),_0x6c32('0x215')+_0xf11786));}_0x1c8b2a=_0x1c8b2a||0x0;var _0x5b9a2b=0x1/_0x1cd068;var _0x334a27=0x0;var _0x244d1c=0x0;var _0x2d27d4=0x0;var _0x40f267=0x0;for(var _0x35df6e=0x0;_0x40f267<_0xf11786;_0x35df6e+=0x1){_0x244d1c=_0x35df6e/_0x1921e6;_0x334a27=(_0xfbbd0f*_0x244d1c+_0x1c8b2a)/_0x5b9a2b;_0x2d27d4=erlangb(_0x334a27,_0x5ef606);_0x40f267=_0x334a27/_0x5ef606*(0x1-erlangb(_0x334a27,_0x5ef606));}return _0x41fed7({'erlangCalls':_0x35df6e,'erlangCallToSecond':_0x1921e6/_0x35df6e,'erlangAbandonmentRate':_0x2d27d4,'erlangBusyFactor':_0x40f267});});};module['exports']=Dialer;
\ No newline at end of file
+var _0xb9a8=['membername','AMD','MACHINE','Machine','countmachineretry','countglobal','amd','[syncAgentComplete][createHistory][0]','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','dialGlobalMaxRetry','stateGlobal','reason19\x20machine....','dialMachineMaxRetry','createStateFinal','reason\x2019\x20machine....','add','minutes','YYYY-MM-DD\x20HH:mm:ss','ContactId','[rescheduleContact][Machine]','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','countbusyretry','countagentrejectretry','dialMachineRetryFrequency','VoiceQueueId','[syncHangupIvr]','dialQueueProject','AnswerAGI','AGI','cause-txt','agent','agiafterat','dialAgiAfterHangupAgent','[syncAgentComplete][createHistory]','[syncAgentComplete]','queueCallerAbandonCreateState','droptime','responsetime','Drop','TIMEOUT','dialQueueProject2','dialDropRetryFrequency','calleridname','outboundDropCallsDayCallersExit','Abandoned','dropreason','CALLEREXIT','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','calleridnum','[syncAgentComplete][createHistory][11]','channel','actionid','locked','stateinterface','push','paused','queueStatusComplete','[unlockQueueStatus][undefined]','[booked][unlockQueueStatus]','run','idHopper','[Catch][Preview][syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','queueBookedRR','_rr','unlockRR','[booked][RR]','Agent:\x20','contactAgent-idHopper:\x20','[booked][RR][finaly]','[unlock2][syncQueueStatusComplete]','[booked][unlock3]','syncCampaigns','checkIsTrunkReachable','TrunkBackup','TRUNK_IS_NOT_REACHABLE','\x20trunk\x20is\x20not\x20reachable','ifTime','checkIfTimeIntervals','Failure','\x20Intervals\x20is\x20null\x20','\x20Intervals\x20is\x20empty\x20','timezones','\x20Timezone\x20unknow\x20','isArray','command','iftime\x20%s,%s','indexOf','true','all','GLOBAL_INTERVAL_IS_OVERTIME','INTERVAL_IS_OVERTIME','[ifTime][promiseAll]','Global:\x20','\x20Interval\x20is\x20overtime:\x20','Timezone:\x20','checkDialMethod','progressive','handlePower','booked','method\x20not\x20recognized','launchHandleIvr','handleIvr','dialActive','loggedIn','checkIfTime','dialGlobalInterval','dialTimezone','[syncCampaigns]','\x5cw{0,','pow','random','match','actionOriginate','originate','voiceQueue\x20is\x20undefine','Contact','phone','getCaller','\x22agi://%s/square,%s\x22','NONE','\x22%s,%s%s,,,%s\x22','dialQueueOptions','dialQueueTimeout','XMD-AMDINITIALSILENCE','dialAMDGreeting','XMD-AMDAFTERGREETINGSILENCE','XMD-AMDTOTALANALYSISTIME','dialAMDMaximumNumberOfWords','dialAMDMaximumWordLength','XMD-VOICEQUEUEID','XMD-CAMPAIGNID','tags','createdAt','%s%s','toUpper','dialRandomLastDigitCallerIdNumber','originatecalleridname','originatecalleridnum','trim','dialCutDigit','SIP/%s/%s%s','substring','[originateError]:\x20%s','OriginateError','[originate][error]','Error','originate\x20action\x20Error','response','checkRetriveMax','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','[rescheduleContact][NoAnswer]','dialBusyMaxRetry','dialCongestionMaxRetry','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','[rescheduleContact][NoSuchNumber]','dialDropMaxRetry','[rescheduleContact][Drop]','[rescheduleContact][Abandoned]','dialAgentRejectMaxRetry','object','[callProgressDetecting]','entity\x20is\x20undefine','evt\x20is\x20undefine','custom:agentnosuchnumber','buildObj','nosuchnumber','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','NoAnswer','noanswer','reason\x203\x20ringing\x20no\x20answer','Busy','custom:agentbusy','busy','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','outboundCongestionCallsDay','Congestion','congestion','[syncAgentComplete][createHistory][8]','reason\x208\x20congestion','reason\x2011\x20abandoned','AgentReject','custom:agentreject','agentreject','[syncAgentComplete][createHistory][20]','reason\x2020\x20agentreject','reason','[syncAgentComplete][createHistory][?]','Global','[moveContactManagedDialer][0]','dialPredictiveOptimizationPercentage','outboundDropCallsDayTimeout','round','predictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','predictiveIntervalHitRate','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','dialPredictiveInterval','[startMethodPredictive][StartProgressive][Loop]','dialPredictiveOptimization','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','started\x20in\x20predictive\x20at','getDataPredictive','startMethodPredictive','Predictive\x20after\x20first\x20interval','Predictive\x20for\x20every\x20interval','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20more\x20than\x20threshold\x20(','dropRate','agentBusyFactor','busyFactor','[getDataPredictive]','Unknown\x20Predictive','check\x20failure','getDataPredictiveOld','outboundQueuePauses','abandonmentRate','[CatchErlangB]','one\x20call\x20every:','[handlePredictive]','fail\x20to\x20scheduled\x20calls','checkContactBlack','UserId','recallme','[booked][checkContactBlack]','queueStatusComplete:\x20','Queue:\x20','queuestatus','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','scheduledat','dialRecallMeTimeout','dialRecallInQueue','[rescheduleContact][dialRecallInQueue]','RECALLINQUEUE','RecallInQueue','[Originate][HistoryDialRecallInQueue][historyCatch]','[Originate][HistoryRecallClose]','BLACKLIST','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','inBlackList','limitCalls','temp','ivrTotalCallsDays','[actionOriginate]\x20','Contact.phone','[actionOriginateIvr]\x20','[getContactCampaign2]','dialLimitQueue','not_inuse','countReScheduled','[countReScheduled]\x20','ACTIVE','RUNNING','[handlePredictive][limitChannel]','tryOriginatePredictive','dialOrderByScheduledAt','[actionOriginatePredictive]\x20','[getContactDialerPredictive]','--------\x20Drop\x20Rate\x20--------','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','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','[abandonmentRate]','m\x20=\x20','Ts\x20=\x20','p\x20=\x20','interval\x20=\x20','----\x20Agent\x20Busy\x20Factor\x20----','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[busyFactor]','Umin\x20=\x20','exports','util','bluebird','uuid','moment','ioredis','../preview/util/util','../../../config/environment/','../../../config/logger','dialer','predictive','predictiveCalls','syncQueueSummary','redis','defaults','localhost','socket.io-emitter','../rpc/cmHopper','../rpc/cmHopperHistory','../rpc/cmHopperBlack','./history','./final','./agentComplete','./queueCallerAbandon','./hangup','env','XCALLY_IP_AGI','127.0.0.1','rrmemory','roundrobin','prototype','enqueue','tail','finally','sequence','preview','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','channels','uniqueId','optionPredictive','startProgressive','ivrOriginated','queueBooked','syncAgentConnect','bind','queuecallerabandon','syncOriginateResponse','agentcomplete','syncAgentComplete','custom:queuesummary','hangup','syncHangup','syncNewExten','varset','syncVarSet','syncQueueMember','queuestatuscomplete','syncQueueStatusComplete','loopCampaigns','loopClearZombieChannels','AGENTS_NOT_LOGGED','name','message','\x20NOT\x20Active','INTERVAL_IS_NULL','\x20INTERVAL_IS_NULL','Intervals','isEmpty','Interval','[ifTime][Action]','stringify','milliseconds','diff','seconds','emit','type','outbound','strategy','available','pTalking','sumDuration','sumHoldTime','talking','total','waiting','loggedInDb','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','originated','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','startPredictive','Trunk','active','callerid','md5','voice:queue:%s','voice_queue:save','ivr','campaign:save','info','-----\x20Stats\x20Predictive\x20---','Total\x20Calls:\x20\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','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','---------------------------','isUndefined','predictiveIntervalAvgTalktime','Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','History\x20information\x20are\x20empty','---------\x20ErlangB\x20---------','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','merge','clearing\x20variable\x20start\x20progressive','clearing\x20variable\x20start\x20predictive','handlePredictive','clearing\x20variable\x20handle\x20predictive','string','format','\x22%s\x22\x20<%s>','\x22\x22\x20<>','error','stack','inspect','length','undefined','[decremetOriginate]\x20object\x20originated\x20is\x20negative','[decremetOriginate]\x20is\x20null\x20or\x20undefined','contactsRescheduled','RESCHEDULED_CONTACTS','[getContactDialer2][ReScheduled]','contacts','AVAILABLE_CONTACTS_FINISHED','[getContactDialer2][Empty]','sendMessageOneNotActive','NOT_ACTIVE','[syncQueueSummary]\x20Campaign\x20Queue:\x20','is\x20not\x20active','is\x20disactive','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','state','endtime','starttime','clearZombieChannels','[uniqueid]','actions','[actions]','isNil','Action','status','catch','No\x20such\x20channel','updateOriginated','queue','resolve','then','checkIsBlackList','checkIsBlackListIvr','averageHandleTime','avgHandleTime','[averageHandleTime]\x20','rescheduleContact','unlockContact','getContactDialer','[getContactDialer]\x20','getContactDialerIvr','getVoiceQueueRtPauses','moveContactManagedDialer','[moveContactManagedDialer]\x20','createHistory','[createHistory]\x20','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','loggerHandler','emptyContact','notFound','saveInDb','pick','ListId','CampaignId','[emptyContact][createHistory]','[emptyContact]','isSuccess','Success','isTrunkReachable','reachable','unmonitored','uniqueid','variable','amdstatus','exten','xcally-motion-dialer','dialAMDActive','value','HANGUP','statedesc','HangupInAMD'];(function(_0x4a02b8,_0x71bd74){var _0x3aaa9e=function(_0x4670cc){while(--_0x4670cc){_0x4a02b8['push'](_0x4a02b8['shift']());}};_0x3aaa9e(++_0x71bd74);}(_0xb9a8,0x124));var _0x8b9a=function(_0x3178c2,_0x51b329){_0x3178c2=_0x3178c2-0x0;var _0x13bf65=_0xb9a8[_0x3178c2];return _0x13bf65;};'use strict';var util=require(_0x8b9a('0x0'));var _=require('lodash');var BPromise=require(_0x8b9a('0x1'));var uuid=require(_0x8b9a('0x2'));var moment=require(_0x8b9a('0x3'));var rr=require('rr');var md5=require('md5');var Redis=require(_0x8b9a('0x4'));var ut=require(_0x8b9a('0x5'));var config=require(_0x8b9a('0x6'));var logger=require(_0x8b9a('0x7'))(_0x8b9a('0x8'));var loggerBooked=require(_0x8b9a('0x7'))('booked');var loggerPredictive=require(_0x8b9a('0x7'))(_0x8b9a('0x9'));var loggerPredictiveCalls=require(_0x8b9a('0x7'))(_0x8b9a('0xa'));var loggerSyncQueueSummary=require(_0x8b9a('0x7'))(_0x8b9a('0xb'));var ami=require('../ami');config[_0x8b9a('0xc')]=_[_0x8b9a('0xd')](config[_0x8b9a('0xc')],{'host':_0x8b9a('0xe'),'port':0x18eb});var io=require(_0x8b9a('0xf'))(new Redis(config[_0x8b9a('0xc')]));var cmHopper=require(_0x8b9a('0x10'));var cmHopperHistory=require(_0x8b9a('0x11'));var cmHopperBlack=require(_0x8b9a('0x12'));var voiceQueueRt=require('../rpc/voiceQueueRt');var Action=require('./action');var History=require(_0x8b9a('0x13'));var Final=require(_0x8b9a('0x14'));var AgentComplete=require(_0x8b9a('0x15'));var QueueCallerAbandon=require(_0x8b9a('0x16'));var Hangup=require(_0x8b9a('0x17'));var ipAgi=process[_0x8b9a('0x18')][_0x8b9a('0x19')]||_0x8b9a('0x1a');var strategy={'rrmemory':_0x8b9a('0x1b'),'roundrobin':_0x8b9a('0x1c')};var Sequence=function(){};Sequence[_0x8b9a('0x1d')][_0x8b9a('0x1e')]=function(_0x3ed6d6){this['tail']=this[_0x8b9a('0x1f')]?this[_0x8b9a('0x1f')][_0x8b9a('0x20')](_0x3ed6d6):_0x3ed6d6();};function Dialer(_0x458cb2,_0x47cd12){this[_0x8b9a('0x21')]=new Sequence();this[_0x8b9a('0x22')]=_0x47cd12;this[_0x8b9a('0x23')]=_0x458cb2[_0x8b9a('0x23')];this[_0x8b9a('0x24')]=_0x458cb2[_0x8b9a('0x24')];this[_0x8b9a('0x25')]=_0x458cb2[_0x8b9a('0x25')];this[_0x8b9a('0x26')]=_0x458cb2['trunks'];this[_0x8b9a('0x27')]=config[_0x8b9a('0x27')]||0x2;this[_0x8b9a('0x28')]={};this['actions']={};this['contactsId']={};this[_0x8b9a('0x29')]={};this[_0x8b9a('0x2a')]={};this['startPredictive']={};this[_0x8b9a('0x2b')]={};this[_0x8b9a('0x2c')]={};this[_0x8b9a('0x2d')]={};this['queueBookedRR']={};ami['on']('agentconnect',this[_0x8b9a('0x2e')][_0x8b9a('0x2f')](this));ami['on'](_0x8b9a('0x30'),this['syncQueueCallerAbandon']['bind'](this));ami['on']('originateresponse',this[_0x8b9a('0x31')][_0x8b9a('0x2f')](this));ami['on'](_0x8b9a('0x32'),this[_0x8b9a('0x33')][_0x8b9a('0x2f')](this));ami['on'](_0x8b9a('0x34'),this[_0x8b9a('0xb')][_0x8b9a('0x2f')](this));ami['on'](_0x8b9a('0x35'),this[_0x8b9a('0x36')][_0x8b9a('0x2f')](this));ami['on']('newexten',this[_0x8b9a('0x37')][_0x8b9a('0x2f')](this));ami['on'](_0x8b9a('0x38'),this[_0x8b9a('0x39')][_0x8b9a('0x2f')](this));ami['on']('queuemember',this[_0x8b9a('0x3a')][_0x8b9a('0x2f')](this));ami['on'](_0x8b9a('0x3b'),this[_0x8b9a('0x3c')][_0x8b9a('0x2f')](this));this[_0x8b9a('0x3d')]();this[_0x8b9a('0x3e')]();}function isNotNull(_0x4c88cb){return _0x4c88cb!==null&&!_['isUndefined'](_0x4c88cb);}function checkIsLoggedIn(_0xb5b387,_0x389200){return function(){if(_0x389200<=0x0){_0xb5b387['message']=_0x8b9a('0x3f');throw _0xb5b387[_0x8b9a('0x40')]+'\x20AGENTS\x20NOT\x20LOGGED';}};}function isActive(_0x357b1a){return _0x357b1a;}function checkIsActive(_0x328ceb,_0x2edb85){return function(){if(!isActive(_0x2edb85)){_0x328ceb[_0x8b9a('0x41')]='NOT_ACTIVE';throw _0x328ceb[_0x8b9a('0x40')]+_0x8b9a('0x42');}};}function checkInterval(_0x30acad){return function(){if(!isNotNull(_0x30acad['Interval'])){_0x30acad[_0x8b9a('0x41')]=_0x8b9a('0x43');throw _0x30acad[_0x8b9a('0x40')]+_0x8b9a('0x44');}if(!isNotNull(_0x30acad['Interval'][_0x8b9a('0x45')])){_0x30acad['message']=_0x8b9a('0x43');throw _0x30acad['name']+_0x8b9a('0x44');}if(!isNotNull(_[_0x8b9a('0x46')](_0x30acad[_0x8b9a('0x47')][_0x8b9a('0x45')]))){_0x30acad[_0x8b9a('0x41')]='INTERVAL_IS_NULL';throw _0x30acad[_0x8b9a('0x40')]+_0x8b9a('0x44');}};}function msgResponse(_0x217b04,_0x2281d9,_0x4a8b6b){return{'action':_0x217b04,'response':_0x2281d9,'message':_0x4a8b6b,'stack':_0x4a8b6b};}function myreject(_0x1acafc){return function(_0x5bb183){return _0x1acafc(msgResponse(_0x8b9a('0x48'),'Error',JSON[_0x8b9a('0x49')](_0x5bb183)));};}function getSeconds(_0xffb791,_0x8982b9){var _0x222cc2=moment(_0xffb791)[_0x8b9a('0x4a')](0x0);var _0x45967b=moment(_0x8982b9)[_0x8b9a('0x4a')](0x0);return _0x222cc2[_0x8b9a('0x4b')](_0x45967b,_0x8b9a('0x4c'));}function emit(_0x3e2b15,_0x52c296,_0x58a456){io['to'](_0x3e2b15)[_0x8b9a('0x4d')](_0x52c296,_0x58a456);}function emitVoiceQueueSummary(_0x29cfb3){if(_0x29cfb3[_0x8b9a('0x4e')]===_0x8b9a('0x4f')){var _0x142cee={'id':_0x29cfb3['id'],'name':_0x29cfb3[_0x8b9a('0x40')],'strategy':_0x29cfb3[_0x8b9a('0x50')],'answered':_0x29cfb3['answered'],'available':_0x29cfb3[_0x8b9a('0x51')],'loggedIn':_0x29cfb3['loggedIn'],'pTalking':_0x29cfb3[_0x8b9a('0x52')],'sumBillable':_0x29cfb3['sumBillable'],'sumDuration':_0x29cfb3[_0x8b9a('0x53')],'sumHoldTime':_0x29cfb3[_0x8b9a('0x54')]||0x0,'talking':_0x29cfb3[_0x8b9a('0x55')],'total':_0x29cfb3[_0x8b9a('0x56')],'type':_0x29cfb3[_0x8b9a('0x4e')],'unmanaged':_0x29cfb3['unmanaged'],'abandoned':_0x29cfb3['abandoned'],'waiting':_0x29cfb3[_0x8b9a('0x57')],'loggedInDb':_0x29cfb3[_0x8b9a('0x58')],'dialActive':_0x29cfb3['dialActive'],'dialMethod':_0x29cfb3[_0x8b9a('0x59')],'dialOriginateCallerIdName':_0x29cfb3[_0x8b9a('0x5a')],'dialOriginateCallerIdNumber':_0x29cfb3[_0x8b9a('0x5b')],'dialOriginateTimeout':_0x29cfb3[_0x8b9a('0x5c')],'dialPrefix':_0x29cfb3[_0x8b9a('0x5d')],'outboundAnswerAgiCallsDay':_0x29cfb3[_0x8b9a('0x5e')],'outboundAnswerCallsDay':_0x29cfb3[_0x8b9a('0x5f')],'outboundBlacklistCallsDay':_0x29cfb3[_0x8b9a('0x60')],'outboundBusyCallsDay':_0x29cfb3[_0x8b9a('0x61')],'outboundCongestionCallsDay':_0x29cfb3['outboundCongestionCallsDay'],'outboundDropCallsDayACS':_0x29cfb3['outboundDropCallsDayACS'],'outboundDropCallsDayCallersExit':_0x29cfb3['outboundDropCallsDayCallersExit'],'outboundDropCallsDayTimeout':_0x29cfb3['outboundDropCallsDayTimeout'],'outboundNoAnswerCallsDay':_0x29cfb3['outboundNoAnswerCallsDay'],'outboundNoSuchCallsDay':_0x29cfb3[_0x8b9a('0x62')],'outboundOriginateFailureCallsDay':_0x29cfb3[_0x8b9a('0x63')],'outboundReCallsDay':_0x29cfb3[_0x8b9a('0x64')],'outboundRejectCallsDay':_0x29cfb3[_0x8b9a('0x65')],'outboundUnknownCallsDay':_0x29cfb3[_0x8b9a('0x66')],'predictiveIntervalAnsweredCalls':_0x29cfb3[_0x8b9a('0x67')],'predictiveIntervalAvgHoldtime':_0x29cfb3[_0x8b9a('0x68')],'predictiveIntervalAvgTalktime':_0x29cfb3['predictiveIntervalAvgTalktime'],'predictiveIntervalDroppedCallsCallersExit':_0x29cfb3[_0x8b9a('0x69')],'predictiveIntervalDroppedCallsTimeout':_0x29cfb3[_0x8b9a('0x6a')],'predictiveIntervalErlangCalls':_0x29cfb3['predictiveIntervalErlangCalls'],'predictiveIntervalErlangCallsDroppedCalls':_0x29cfb3[_0x8b9a('0x6b')],'predictiveIntervalHitRate':_0x29cfb3['predictiveIntervalHitRate'],'predictiveIntervalMultiplicativeFactor':_0x29cfb3[_0x8b9a('0x6c')],'predictiveIntervalPauses':_0x29cfb3[_0x8b9a('0x6d')],'predictiveIntervalAvailable':_0x29cfb3[_0x8b9a('0x6e')],'predictiveIntervalTotalCalls':_0x29cfb3[_0x8b9a('0x6f')],'message':_0x29cfb3[_0x8b9a('0x41')],'originated':_0x29cfb3[_0x8b9a('0x70')],'erlangCalls':_0x29cfb3[_0x8b9a('0x71')],'erlangCallToSecond':_0x29cfb3[_0x8b9a('0x72')],'erlangAbandonmentRate':_0x29cfb3[_0x8b9a('0x73')],'erlangBusyFactor':_0x29cfb3[_0x8b9a('0x74')],'startPredictive':_0x29cfb3[_0x8b9a('0x75')],'startProgressive':_0x29cfb3[_0x8b9a('0x2b')]};if(_0x29cfb3['Trunk']){_0x142cee[_0x8b9a('0x76')]={'id':_0x29cfb3['Trunk']['id'],'name':_0x29cfb3[_0x8b9a('0x76')]['name'],'active':_0x29cfb3[_0x8b9a('0x76')][_0x8b9a('0x77')],'callerid':_0x29cfb3['Trunk'][_0x8b9a('0x78')]};}if(_0x29cfb3['Interval']){_0x142cee['Interval']={'id':_0x29cfb3[_0x8b9a('0x47')]['id'],'name':_0x29cfb3[_0x8b9a('0x47')][_0x8b9a('0x40')]};}var _0x3bc827=md5(JSON[_0x8b9a('0x49')](_0x142cee));if(_0x29cfb3[_0x8b9a('0x79')]!==_0x3bc827){_0x29cfb3[_0x8b9a('0x79')]=_0x3bc827;emit(util['format'](_0x8b9a('0x7a'),_0x142cee[_0x8b9a('0x40')]),_0x8b9a('0x7b'),_0x142cee);}}}function emitCampaignSummary(_0x5de693){if(_0x5de693[_0x8b9a('0x4e')]===_0x8b9a('0x7c')){emit(util['format']('campaign:ivr:%s',_0x5de693['name']),_0x8b9a('0x7d'),_0x5de693);}}function checkGetDataPredictive(_0x296931){if(isNotNull(_0x296931)&&!_['isEmpty'](_0x296931)){loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x7f'));loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x80'),_0x296931[_0x8b9a('0x6f')]);loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x81'),_0x296931['predictiveIntervalAnsweredCalls']);loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x82'),_0x296931[_0x8b9a('0x6a')]);loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x83'),_0x296931[_0x8b9a('0x69')]);loggerPredictive[_0x8b9a('0x7e')]('AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x296931[_0x8b9a('0x68')]);loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x84'),_0x296931['predictiveIntervalAvgTalktime']);loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x85'));if(_0x296931[_0x8b9a('0x6f')]>0x0){if(!_[_0x8b9a('0x86')](_0x296931[_0x8b9a('0x87')])&&_0x296931[_0x8b9a('0x87')]>0x0){return!![];}loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x88'));if(!_['isUndefined'](_0x296931[_0x8b9a('0x68')])&&_0x296931[_0x8b9a('0x68')]>0x0){return!![];}loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x89'));}else{loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x8a'));}}else{loggerPredictive['info'](_0x8b9a('0x8b'));}return![];}function mergeDataErlangB(_0x3182e4){return function(_0x289a32){loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x8c'));loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x8d'),_0x289a32[_0x8b9a('0x71')]);loggerPredictive[_0x8b9a('0x7e')]('One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x289a32[_0x8b9a('0x72')]);loggerPredictive['info']('Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x289a32[_0x8b9a('0x73')]);loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x8e'),_0x289a32[_0x8b9a('0x74')]);loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x8f'),_0x289a32['erlangAbandonmentRate']);loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x85'));_[_0x8b9a('0x90')](_0x3182e4,_0x289a32);};}function getDiff(_0x59f947){var _0x26d19d=moment()[_0x8b9a('0x4a')](0x0);var _0x3ed6f5=moment(_0x59f947)[_0x8b9a('0x4a')](0x0);return _0x26d19d['diff'](_0x3ed6f5,_0x8b9a('0x4c'));}function ifInterval(_0x212d91,_0x42d387){if(_[_0x8b9a('0x86')](_0x42d387)){return![];}return getDiff(_0x42d387)<_0x212d91*0x3c;}function freeVariablesPredictive(_0xd82098){if(isNotNull(_0xd82098)){if(!_[_0x8b9a('0x86')](_0xd82098['startProgressive'])){_0xd82098[_0x8b9a('0x2b')]=undefined;loggerPredictive['info'](_0xd82098[_0x8b9a('0x40')],_0x8b9a('0x91'));}if(!_[_0x8b9a('0x86')](_0xd82098[_0x8b9a('0x75')])){_0xd82098[_0x8b9a('0x75')]=undefined;loggerPredictive[_0x8b9a('0x7e')](_0xd82098[_0x8b9a('0x40')],_0x8b9a('0x92'));}if(!_[_0x8b9a('0x86')](_0xd82098[_0x8b9a('0x93')])){clearInterval(_0xd82098[_0x8b9a('0x93')]);_0xd82098[_0x8b9a('0x93')]=undefined;loggerPredictive[_0x8b9a('0x7e')](_0xd82098[_0x8b9a('0x40')],_0x8b9a('0x94'));}}}function erlangb(_0x4a9df7,_0x6f01d7){if(_0x6f01d7===0x0){return 0x0;}var _0x3ad549=0x1;for(var _0x7a6d3a=0x1;_0x7a6d3a<=_0x6f01d7;_0x7a6d3a+=0x1){_0x3ad549=0x1+_0x3ad549*_0x7a6d3a/_0x4a9df7;}return 0x1/_0x3ad549;}function isVoiceQueueOutbound(_0xe30409){return _0xe30409===_0x8b9a('0x4f');}function isNotPreview(_0x3d8bc0){return _0x3d8bc0!==_0x8b9a('0x22');}function isCampaignIvr(_0x417dcc){return _0x417dcc===_0x8b9a('0x7c');}function getCallerId(_0x16d900,_0x2396ce,_0x5c0d6f){if(!_[_0x8b9a('0x86')](_0x5c0d6f)&&typeof _0x5c0d6f===_0x8b9a('0x95')&&!_[_0x8b9a('0x46')](_0x5c0d6f)){if(!_[_0x8b9a('0x86')](_0x2396ce)&&typeof _0x2396ce===_0x8b9a('0x95')&&!_[_0x8b9a('0x46')](_0x2396ce)){return util[_0x8b9a('0x96')](_0x8b9a('0x97'),_0x2396ce,_0x5c0d6f);}return util[_0x8b9a('0x96')]('\x22%s\x22\x20<%s>',_0x5c0d6f,_0x5c0d6f);}if(!_[_0x8b9a('0x86')](_0x16d900)&&typeof _0x16d900===_0x8b9a('0x95')&&!_[_0x8b9a('0x46')](_0x16d900)){return _0x16d900;}return _0x8b9a('0x98');}function loggerCatchQueueSummary(_0x4c2d2e,_0x1b9aa9){return function(_0x8bd119){freeVariablesPredictive(_0x1b9aa9);emitVoiceQueueSummary(_0x1b9aa9);emitCampaignSummary(_0x1b9aa9);loggerSyncQueueSummary['error'](_0x4c2d2e,util['inspect'](_0x8bd119,{'showHidden':![],'depth':null}));};}function loggerCatchPredictive(_0xffdd92,_0x2ac522){return function(_0x59cdef){loggerPredictive[_0x8b9a('0x99')](_0x2ac522[_0x8b9a('0x40')],_0xffdd92);loggerPredictive[_0x8b9a('0x99')](_0x59cdef[_0x8b9a('0x9a')]);freeVariablesPredictive(_0x2ac522);};}function loggerCatch(_0x1f59f4){return function(_0x24bd9f){logger[_0x8b9a('0x99')](_0x1f59f4,util[_0x8b9a('0x9b')](_0x24bd9f,{'showHidden':![],'depth':null}));};}function checkContactEmpty(_0x185737){return _0x185737&&!_['isUndefined'](_0x185737)&&_0x185737[_0x8b9a('0x9c')]>0x0;}function decremetOriginate(_0x501de7){if(!_[_0x8b9a('0x86')](_0x501de7)&&_0x501de7!==null){if(typeof _0x501de7[_0x8b9a('0x70')]!==_0x8b9a('0x9d')){if(_0x501de7['originated']>0x0){_0x501de7['originated']-=0x1;}else{logger[_0x8b9a('0x99')](_0x8b9a('0x9e'));}}}else{logger[_0x8b9a('0x99')](_0x8b9a('0x9f'));}}function checkContactLowerLimitOriginate(_0x23016,_0x3b8be6,_0x59af42){if(_0x3b8be6>_0x59af42){for(var _0x11d911=0x0;_0x11d911<_0x3b8be6-_0x59af42;_0x11d911+=0x1){decremetOriginate(_0x23016);}}}function loggerGetContactDialer(_0x44cb25,_0x3b867b,_0x31ca82){return function(_0x24b483){checkContactLowerLimitOriginate(_0x3b867b,_0x31ca82,0x0);logger['error'](_0x44cb25,util[_0x8b9a('0x9b')](_0x24b483,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x2cf51a){return function(_0x442feb){if(isNotNull(_0x442feb)&&isNotNull(_0x442feb[0x0])){if(_0x442feb[0x0][_0x8b9a('0xa0')]>0x0){_0x2cf51a[_0x8b9a('0x41')]=_0x8b9a('0xa1');logger[_0x8b9a('0x7e')](_0x8b9a('0xa2')+_0x2cf51a[_0x8b9a('0x40')],_0x442feb[0x0][_0x8b9a('0xa0')],_0x8b9a('0xa3'));}else{_0x2cf51a[_0x8b9a('0x41')]=_0x8b9a('0xa4');logger[_0x8b9a('0x7e')](_0x8b9a('0xa5')+_0x2cf51a[_0x8b9a('0x40')]);}}};}function notSendMessagesQueue(_0x52e3df){if(_0x52e3df[_0x8b9a('0xa6')]){freeVariablesPredictive(_0x52e3df);if(_0x52e3df[_0x8b9a('0x70')]===0x0&&_0x52e3df[_0x8b9a('0x55')]===0x0&&_0x52e3df[_0x8b9a('0x57')]===0x0&&(_0x52e3df[_0x8b9a('0x52')]||0x0)===0x0){_0x52e3df[_0x8b9a('0xa6')]=![];_0x52e3df['available']=0x0;_0x52e3df['message']=_0x8b9a('0xa7');loggerSyncQueueSummary['error'](_0x8b9a('0xa8'),_0x52e3df[_0x8b9a('0x40')],_0x8b9a('0xa9'));}else{_0x52e3df[_0x8b9a('0x41')]='IS_DISACTIVED';loggerSyncQueueSummary[_0x8b9a('0x99')](_0x8b9a('0xa8'),_0x52e3df['name'],_0x8b9a('0xaa'));}emitVoiceQueueSummary(_0x52e3df);}}function notSendMessagesCampaign(_0x21e77a){if(_0x21e77a[_0x8b9a('0xa6')]){if(_0x21e77a['originated']===0x0){_0x21e77a[_0x8b9a('0xa6')]=![];_0x21e77a['message']='NOT_ACTIVE';loggerSyncQueueSummary[_0x8b9a('0x99')](_0x8b9a('0xab'),_0x21e77a[_0x8b9a('0x40')],_0x8b9a('0xa9'));}else{_0x21e77a[_0x8b9a('0x41')]='IS_DISACTIVED';loggerSyncQueueSummary[_0x8b9a('0x99')](_0x8b9a('0xab'),_0x21e77a[_0x8b9a('0x40')],_0x8b9a('0xaa'));}emitCampaignSummary(_0x21e77a);}}function createObjHistory(_0x212155,_0x142d79,_0x917c0c,_0x4a2de0,_0x81752f){_0x212155[_0x8b9a('0x41')]=_0x917c0c;var _0x5be5de=new Action(_0x212155,_0x142d79);var _0x5c4f35=new History(_0x5be5de);_0x5c4f35[_0x8b9a('0xac')]=_0x4a2de0;_0x5c4f35['statedesc']=_0x81752f;_0x5c4f35[_0x8b9a('0xad')]=_0x5be5de[_0x8b9a('0xae')];return _0x5c4f35;}Dialer[_0x8b9a('0x1d')][_0x8b9a('0x3e')]=function(){var _0x2621b2=this;setInterval(function(){_0x2621b2[_0x8b9a('0xaf')](_0x2621b2[_0x8b9a('0x29')],_0x8b9a('0xb0'));_0x2621b2[_0x8b9a('0xaf')](_0x2621b2[_0x8b9a('0xb1')],_0x8b9a('0xb2'));},0x32c8);};Dialer['prototype'][_0x8b9a('0xaf')]=function(_0x5cd757,_0x511d33){var _0x247b24=this;for(var _0xc7d9cc in _0x5cd757){if(typeof _0x5cd757[_0xc7d9cc]!==_0x8b9a('0x9d')){this[_0x8b9a('0x21')][_0x8b9a('0x1e')](function(){if(!_[_0x8b9a('0xb3')](_0x5cd757[_0xc7d9cc])){return ami[_0x8b9a('0xb4')]({'action':_0x8b9a('0xb5'),'channel':_0x5cd757[_0xc7d9cc]['channel']})[_0x8b9a('0xb6')](function(_0x1f6b0d){if(_0x1f6b0d[_0x8b9a('0x41')]===_0x8b9a('0xb7')){setTimeout(function(){if(_0x5cd757[_0xc7d9cc]&&_0x5cd757[_0xc7d9cc][_0x8b9a('0x4e')]!=='ivr'){_0x247b24[_0x8b9a('0xb8')](_0x247b24['voiceQueues'][_0x5cd757[_0xc7d9cc][_0x8b9a('0xb9')]]);logger['error']('[Dialer][checkChannel]',_0x511d33,_0xc7d9cc,_0x5cd757[_0xc7d9cc][_0x8b9a('0xb9')]);delete _0x5cd757[_0xc7d9cc];}if(_0x5cd757[_0xc7d9cc]&&_0x5cd757[_0xc7d9cc][_0x8b9a('0x4e')]===_0x8b9a('0x7c')){_0x247b24[_0x8b9a('0xb8')](_0x247b24['campaigns'][_0x5cd757[_0xc7d9cc][_0x8b9a('0xb9')]]);logger['error']('[Dialer][checkChannel][ivr]',_0x511d33,_0xc7d9cc,_0x5cd757[_0xc7d9cc][_0x8b9a('0xb9')]);delete _0x5cd757[_0xc7d9cc];}},0x2328);}});}});}}};Dialer[_0x8b9a('0x1d')]['countReScheduled']=function(_0x24b649){return BPromise[_0x8b9a('0xba')]()[_0x8b9a('0xbb')](cmHopper['countReScheduled'](_0x24b649))[_0x8b9a('0xb6')](loggerCatch('[countReScheduled]\x20'));};Dialer['prototype'][_0x8b9a('0xbc')]=function(_0x152c24){return BPromise[_0x8b9a('0xba')]()[_0x8b9a('0xbb')](cmHopperBlack[_0x8b9a('0xbc')](_0x152c24))[_0x8b9a('0xb6')](loggerCatch('[checkIsBlackList]\x20'));};Dialer[_0x8b9a('0x1d')]['checkIsBlackListIvr']=function(_0x5800af){return BPromise[_0x8b9a('0xba')]()[_0x8b9a('0xbb')](cmHopperBlack[_0x8b9a('0xbd')](_0x5800af))[_0x8b9a('0xb6')](loggerCatch('[checkIsBlackListIvr]\x20'));};Dialer['prototype'][_0x8b9a('0xbe')]=function(_0x37f623){return BPromise[_0x8b9a('0xba')]()[_0x8b9a('0xbb')](cmHopperHistory[_0x8b9a('0xbf')](_0x37f623))['catch'](loggerCatch(_0x8b9a('0xc0')));};Dialer['prototype']['rescheduleContact']=function(_0x59cad4){return BPromise['resolve']()[_0x8b9a('0xbb')](cmHopper[_0x8b9a('0xc1')](_0x59cad4))[_0x8b9a('0xb6')](loggerCatch('[rescheduleContact]\x20'));};Dialer['prototype'][_0x8b9a('0xc2')]=function(_0x38893d,_0x1cef87,_0x516d2e){return BPromise['resolve']()[_0x8b9a('0xbb')](cmHopper[_0x8b9a('0xc2')](_0x38893d,_0x1cef87,_0x516d2e))[_0x8b9a('0xb6')](loggerCatch('[unlockContact]\x20'));};Dialer[_0x8b9a('0x1d')][_0x8b9a('0xc3')]=function(_0x2193f2,_0x4a0d4c,_0x2c7c34,_0x117bd0){return BPromise[_0x8b9a('0xba')]()['then'](cmHopper[_0x8b9a('0xc3')](_0x2193f2,_0x4a0d4c,_0x2c7c34,_0x117bd0))[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0xc4')));};Dialer[_0x8b9a('0x1d')]['getContactDialerIvr']=function(_0x30b237,_0x599269,_0x506eae){return BPromise[_0x8b9a('0xba')]()[_0x8b9a('0xbb')](cmHopper[_0x8b9a('0xc5')](_0x30b237,_0x599269,_0x506eae))[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0xc4')));};Dialer['prototype']['getVoiceQueueRtPauses']=function(_0x136f7a){return BPromise[_0x8b9a('0xba')]()[_0x8b9a('0xbb')](voiceQueueRt[_0x8b9a('0xc6')](_0x136f7a))['catch'](loggerCatch('[getVoiceQueueRtPauses]\x20'));};Dialer[_0x8b9a('0x1d')]['moveContactManagedDialer']=function(_0x250b5c){return BPromise[_0x8b9a('0xba')]()[_0x8b9a('0xbb')](cmHopper[_0x8b9a('0xc7')](_0x250b5c))['catch'](loggerCatch(_0x8b9a('0xc8')));};Dialer[_0x8b9a('0x1d')][_0x8b9a('0xc9')]=function(_0x54914c){return BPromise[_0x8b9a('0xba')]()[_0x8b9a('0xbb')](cmHopperHistory[_0x8b9a('0xc9')](_0x54914c))['catch'](loggerCatch(_0x8b9a('0xca')));};Dialer[_0x8b9a('0x1d')][_0x8b9a('0xb8')]=function(_0x51807e){if(!_[_0x8b9a('0x86')](_0x51807e)&&_0x51807e!==null){if(typeof _0x51807e[_0x8b9a('0x70')]!=='undefined'){if(_0x51807e[_0x8b9a('0x70')]>0x0){_0x51807e[_0x8b9a('0x70')]-=0x1;}else{logger[_0x8b9a('0x99')](_0x8b9a('0xcb'));}}}else{logger[_0x8b9a('0x99')](_0x8b9a('0xcc'));}};Dialer['prototype'][_0x8b9a('0xcd')]=function(_0x38f182,_0xe2db90){var _0x4507b2=this;return function(_0x35ce40){_0x4507b2[_0x8b9a('0xb8')](_0xe2db90);logger[_0x8b9a('0x99')](_0x38f182,util[_0x8b9a('0x9b')](_0x35ce40,{'showHidden':![],'depth':null}));};};Dialer[_0x8b9a('0x1d')][_0x8b9a('0xce')]=function(_0x5a2706,_0x3a3021,_0x32c61c){var _0xf8a48={'state':0x19,'statedesc':_0x8b9a('0xcf')};this[_0x8b9a('0xb8')](_0x3a3021);this[_0x8b9a('0xd0')](_[_0x8b9a('0x90')](_0xf8a48,_[_0x8b9a('0xd1')](_0x32c61c,['ContactId',_0x8b9a('0xd2'),'UserId','VoiceQueueId',_0x8b9a('0xd3')])),_0x8b9a('0xd4'),_0x8b9a('0xd5'));logger[_0x8b9a('0x99')](_0x5a2706);};Dialer[_0x8b9a('0x1d')][_0x8b9a('0xd6')]=function(_0x492cfe){return _0x492cfe===_0x8b9a('0xd7');};Dialer[_0x8b9a('0x1d')][_0x8b9a('0xd8')]=function(_0x59be09){return!_[_0x8b9a('0x86')](_0x59be09)&&_0x59be09&&!_['isUndefined'](_0x59be09[_0x8b9a('0x40')])&&!_['isUndefined'](_0x59be09[_0x8b9a('0x77')])&&_0x59be09['active']&&(this[_0x8b9a('0x26')][util['format']('SIP/%s',_0x59be09['name'])][_0x8b9a('0xb5')]===_0x8b9a('0xd9')||this[_0x8b9a('0x26')][util[_0x8b9a('0x96')]('SIP/%s',_0x59be09['name'])][_0x8b9a('0xb5')]===_0x8b9a('0xda'));};Dialer['prototype'][_0x8b9a('0xd0')]=function(_0x57d3b,_0xa7e2ec,_0x4fe326){this[_0x8b9a('0xc9')](_0x57d3b)[_0x8b9a('0xb6')](loggerCatch(_0xa7e2ec));this[_0x8b9a('0xc7')](_0x57d3b)['catch'](loggerCatch(_0x4fe326));};Dialer['prototype'][_0x8b9a('0x39')]=function(_0x2cf8af){var _0x754ce=this[_0x8b9a('0x29')][_0x2cf8af[_0x8b9a('0xdb')]];var _0x3adb01;if(!_[_0x8b9a('0xb3')](_0x2cf8af)&&!_[_0x8b9a('0xb3')](_0x2cf8af[_0x8b9a('0xdc')])&&!_[_0x8b9a('0xb3')](_0x2cf8af[_0x8b9a('0xdc')][_0x8b9a('0xdd')])&&_0x2cf8af[_0x8b9a('0xde')]===_0x8b9a('0xdf')&&_0x754ce){if(_0x754ce['type']!==_0x8b9a('0x7c')&&this[_0x8b9a('0x23')][_0x754ce[_0x8b9a('0xb9')]][_0x8b9a('0xe0')]&&_0x2cf8af[_0x8b9a('0xe1')]===_0x8b9a('0xe2')){delete this[_0x8b9a('0x29')][_0x2cf8af['uniqueid']];this[_0x8b9a('0xb8')](this[_0x8b9a('0x23')][_0x754ce[_0x8b9a('0xb9')]]);this['voiceQueues'][_0x754ce[_0x8b9a('0xb9')]]['outboundAnswerCallsDay']+=0x1;this[_0x8b9a('0x23')][_0x754ce[_0x8b9a('0xb9')]][_0x8b9a('0x5e')]+=0x1;_0x3adb01=new Hangup(_0x754ce,_0x2cf8af);_0x3adb01[_0x8b9a('0xac')]=0x12;_0x3adb01[_0x8b9a('0xe3')]=_0x8b9a('0xe4');_0x3adb01[_0x8b9a('0xe5')]=_0x8b9a('0xe6');this[_0x8b9a('0xd0')](_0x3adb01,'[syncHangupInAMD][createHistory]','[syncHangupInAMD]');}if(_0x754ce[_0x8b9a('0x4e')]!=='ivr'&&this[_0x8b9a('0x23')][_0x754ce[_0x8b9a('0xb9')]][_0x8b9a('0xe0')]&&_0x2cf8af[_0x8b9a('0xe1')]===_0x8b9a('0xe7')){var _0xf66d06=this;return new BPromise(function(_0x3a5d68,_0x2f502d){delete _0xf66d06[_0x8b9a('0x29')][_0x2cf8af[_0x8b9a('0xdb')]];_0xf66d06['updateOriginated'](_0xf66d06['voiceQueues'][_0x754ce[_0x8b9a('0xb9')]]);_0xf66d06[_0x8b9a('0x23')][_0x754ce[_0x8b9a('0xb9')]][_0x8b9a('0x5f')]+=0x1;_0xf66d06['voiceQueues'][_0x754ce[_0x8b9a('0xb9')]]['outboundAnswerAgiCallsDay']+=0x1;var _0x43ce2e=_0xf66d06[_0x8b9a('0x23')][_0x754ce[_0x8b9a('0xb9')]];var _0x31dfc3=new Hangup(_0x754ce,_0x2cf8af);_0x31dfc3[_0x8b9a('0xac')]=0x13;_0x31dfc3['statedesc']=_0x8b9a('0xe8');_0x31dfc3[_0x8b9a('0xe5')]=_0x8b9a('0xe6');_0x31dfc3[_0x8b9a('0xe9')]+=0x1;_0x31dfc3[_0x8b9a('0xea')]+=0x1;_0x31dfc3[_0x8b9a('0xeb')]=!![];_0xf66d06[_0x8b9a('0xc9')](_0x31dfc3)[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0xec')));if(_0x31dfc3['countbusyretry']+_0x31dfc3[_0x8b9a('0xed')]+_0x31dfc3[_0x8b9a('0xee')]+_0x31dfc3[_0x8b9a('0xef')]+_0x31dfc3[_0x8b9a('0xf0')]+_0x31dfc3[_0x8b9a('0xf1')]+_0x31dfc3[_0x8b9a('0xe9')]+_0x31dfc3['countagentrejectretry']>=_0x43ce2e[_0x8b9a('0xf2')]){_0xf66d06[_0x8b9a('0xf3')](_0x31dfc3,_0x3a5d68,_0x2f502d,_0x8b9a('0xf4'));}else{if(_0x31dfc3[_0x8b9a('0xe9')]>=_0x43ce2e[_0x8b9a('0xf5')]){_0xf66d06[_0x8b9a('0xf6')](_0x31dfc3,_0x3a5d68,_0x2f502d,_0x8b9a('0xf7'));}else{_0xf66d06['rescheduleContact']({'active':![],'countmachineretry':_0x31dfc3[_0x8b9a('0xe9')],'scheduledat':moment()[_0x8b9a('0xf8')](_0x43ce2e['dialMachineRetryFrequency'],_0x8b9a('0xf9'))[_0x8b9a('0x96')](_0x8b9a('0xfa')),'ContactId':_0x31dfc3[_0x8b9a('0xfb')],'ListId':_0x31dfc3[_0x8b9a('0xd2')],'VoiceQueueId':_0x31dfc3['VoiceQueueId']||undefined,'CampaignId':_0x31dfc3[_0x8b9a('0xd3')]||undefined})[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0xfc')));_0x3a5d68({'reschedule':0x1});}}});}if(_0x754ce['type']===_0x8b9a('0x7c')&&this[_0x8b9a('0x24')][_0x754ce['queue']][_0x8b9a('0xe0')]&&_0x2cf8af[_0x8b9a('0xe1')]===_0x8b9a('0xe2')){delete this['uniqueId'][_0x2cf8af[_0x8b9a('0xdb')]];this[_0x8b9a('0xb8')](this['campaigns'][_0x754ce[_0x8b9a('0xb9')]]);_0x3adb01=new Hangup(_0x754ce,_0x2cf8af);_0x3adb01[_0x8b9a('0xac')]=0x12;_0x3adb01[_0x8b9a('0xe3')]=_0x8b9a('0xe4');_0x3adb01[_0x8b9a('0xe5')]=_0x8b9a('0xe6');this[_0x8b9a('0xd0')](_0x3adb01,_0x8b9a('0xfd'),_0x8b9a('0xfe'));}if(_0x754ce[_0x8b9a('0x4e')]===_0x8b9a('0x7c')&&this[_0x8b9a('0x24')][_0x754ce[_0x8b9a('0xb9')]][_0x8b9a('0xe0')]&&_0x2cf8af[_0x8b9a('0xe1')]===_0x8b9a('0xe7')){var _0xf66d06=this;return new BPromise(function(_0x1d6acc,_0x3bcd33){delete _0xf66d06[_0x8b9a('0x29')][_0x2cf8af[_0x8b9a('0xdb')]];_0xf66d06['updateOriginated'](_0xf66d06[_0x8b9a('0x24')][_0x754ce['queue']]);_0xf66d06['campaigns'][_0x754ce['queue']]['outboundAnswerCallsDay']+=0x1;_0xf66d06[_0x8b9a('0x24')][_0x754ce[_0x8b9a('0xb9')]][_0x8b9a('0x5e')]+=0x1;var _0x153546=_0xf66d06[_0x8b9a('0x24')][_0x754ce[_0x8b9a('0xb9')]];var _0x43479a=new Hangup(_0x754ce,_0x2cf8af);_0x43479a[_0x8b9a('0xac')]=0x13;_0x43479a[_0x8b9a('0xe3')]='Machine';_0x43479a[_0x8b9a('0xe5')]='AMD';_0x43479a[_0x8b9a('0xe9')]+=0x1;_0x43479a['countglobal']+=0x1;_0x43479a[_0x8b9a('0xeb')]=!![];_0xf66d06[_0x8b9a('0xc9')](_0x43479a)[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0xec')));if(_0x43479a[_0x8b9a('0xff')]+_0x43479a[_0x8b9a('0xed')]+_0x43479a[_0x8b9a('0xee')]+_0x43479a['countnosuchnumberretry']+_0x43479a['countdropretry']+_0x43479a[_0x8b9a('0xf1')]+_0x43479a[_0x8b9a('0xe9')]+_0x43479a[_0x8b9a('0x100')]>=_0x153546[_0x8b9a('0xf2')]){_0xf66d06[_0x8b9a('0xf3')](_0x43479a,_0x1d6acc,_0x3bcd33,_0x8b9a('0xf4'));}else{if(_0x43479a['countmachineretry']>=_0x153546['dialMachineMaxRetry']){_0xf66d06[_0x8b9a('0xf6')](_0x43479a,_0x1d6acc,_0x3bcd33,_0x8b9a('0xf7'));}else{_0xf66d06[_0x8b9a('0xc1')]({'active':![],'countmachineretry':_0x43479a['countmachineretry'],'scheduledat':moment()[_0x8b9a('0xf8')](_0x153546[_0x8b9a('0x101')],_0x8b9a('0xf9'))[_0x8b9a('0x96')](_0x8b9a('0xfa')),'ContactId':_0x43479a[_0x8b9a('0xfb')],'ListId':_0x43479a[_0x8b9a('0xd2')],'VoiceQueueId':_0x43479a[_0x8b9a('0x102')]||undefined,'CampaignId':_0x43479a[_0x8b9a('0xd3')]||undefined})[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0xfc')));_0x1d6acc({'reschedule':0x1});}}});}}};Dialer['prototype'][_0x8b9a('0x36')]=function(_0x14d8fe){var _0x12a755=this['uniqueId'][_0x14d8fe[_0x8b9a('0xdb')]];var _0x248236=this;var _0x22a6cb;if(_0x12a755&&_0x12a755['type']==='ivr'){delete this[_0x8b9a('0x29')][_0x14d8fe[_0x8b9a('0xdb')]];this['updateOriginated'](this[_0x8b9a('0x24')][_0x12a755[_0x8b9a('0xb9')]]);this['campaigns'][_0x12a755[_0x8b9a('0xb9')]]['ivrAnswerCallsDay']+=0x1;_0x22a6cb=new Hangup(_0x12a755,_0x14d8fe);this['createHistory'](_0x22a6cb)[_0x8b9a('0xb6')](loggerCatch('[syncHangupIvr][createHistory]'));this[_0x8b9a('0xc7')](_0x22a6cb)[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x103')));}if(_0x12a755&&_0x12a755[_0x8b9a('0x4e')]!==_0x8b9a('0x7c')&&isNotNull(this[_0x8b9a('0x23')][_0x12a755[_0x8b9a('0xb9')]][_0x8b9a('0x104')])){delete this['uniqueId'][_0x14d8fe[_0x8b9a('0xdb')]];this['updateOriginated'](this['voiceQueues'][_0x12a755['queue']]);this['voiceQueues'][_0x12a755[_0x8b9a('0xb9')]][_0x8b9a('0x5f')]+=0x1;this[_0x8b9a('0x23')][_0x12a755[_0x8b9a('0xb9')]][_0x8b9a('0x5e')]+=0x1;_0x22a6cb=new Hangup(_0x12a755,_0x14d8fe);_0x22a6cb[_0x8b9a('0xac')]=0x10;_0x22a6cb[_0x8b9a('0xe3')]=_0x8b9a('0x105');_0x22a6cb[_0x8b9a('0xe5')]=_0x8b9a('0x106');this[_0x8b9a('0xc9')](_0x22a6cb)[_0x8b9a('0xb6')](loggerCatch('[syncHangupIvr][createHistory]'));this['moveContactManagedDialer'](_0x22a6cb)[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x103')));}if(_0x12a755&&_0x12a755[_0x8b9a('0x4e')]!==_0x8b9a('0x7c')&&!isNotNull(this[_0x8b9a('0x23')][_0x12a755[_0x8b9a('0xb9')]]['dialQueueProject'])){delete this['uniqueId'][_0x14d8fe['uniqueid']];this[_0x8b9a('0xb8')](this['voiceQueues'][_0x12a755[_0x8b9a('0xb9')]]);this['voiceQueues'][_0x12a755[_0x8b9a('0xb9')]]['outboundUnknownCallsDay']+=0x1;_0x22a6cb=new Hangup(_0x12a755,_0x14d8fe);_0x22a6cb[_0x8b9a('0xac')]=0xc;_0x22a6cb[_0x8b9a('0xe3')]=_0x14d8fe[_0x8b9a('0x107')];_0x22a6cb[_0x8b9a('0xe5')]='Unknow';this[_0x8b9a('0xc9')](_0x22a6cb)['catch'](loggerCatch('[syncHangupIvr][createHistory]'));this[_0x8b9a('0xc7')](_0x22a6cb)[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x103')));}};Dialer[_0x8b9a('0x1d')][_0x8b9a('0x33')]=function(_0x3f5fac){var _0x4aa3b3=this[_0x8b9a('0x29')][_0x3f5fac[_0x8b9a('0xdb')]];var _0x5c35b6=this;if(this[_0x8b9a('0x23')][_0x3f5fac['queue']]){if(_0x4aa3b3&&_0x4aa3b3[_0x8b9a('0x4e')]!==_0x8b9a('0x7c')){delete this[_0x8b9a('0x29')][_0x3f5fac[_0x8b9a('0xdb')]];this[_0x8b9a('0x23')][_0x3f5fac[_0x8b9a('0xb9')]][_0x8b9a('0x5f')]+=0x1;var _0x1b88b5=new AgentComplete(_0x4aa3b3,_0x3f5fac);if(_0x3f5fac['reason']===_0x8b9a('0x108')){_0x1b88b5[_0x8b9a('0x109')]=this[_0x8b9a('0x23')][_0x3f5fac[_0x8b9a('0xb9')]]['dialQueueProject2']&&this[_0x8b9a('0x23')][_0x3f5fac[_0x8b9a('0xb9')]][_0x8b9a('0x10a')]?moment()[_0x8b9a('0x96')](_0x8b9a('0xfa')):undefined;}this['createHistory'](_0x1b88b5)[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x10b')));this[_0x8b9a('0xc7')](_0x1b88b5)[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x10c')));}}};Dialer['prototype']['syncAgentConnect']=function(_0x2bac3f){if(this[_0x8b9a('0x23')][_0x2bac3f[_0x8b9a('0xb9')]]){if(this['uniqueId'][_0x2bac3f[_0x8b9a('0xdb')]]&&this[_0x8b9a('0x29')][_0x2bac3f['uniqueid']][_0x8b9a('0x4e')]!==_0x8b9a('0x7c')){this[_0x8b9a('0xb8')](this['voiceQueues'][_0x2bac3f[_0x8b9a('0xb9')]]);this[_0x8b9a('0x29')][_0x2bac3f['uniqueid']]['answertime']=moment()[_0x8b9a('0x96')]('YYYY-MM-DD\x20HH:mm:ss');}}};Dialer[_0x8b9a('0x1d')][_0x8b9a('0x10d')]=function(_0x4aef91){this[_0x8b9a('0xc9')](_0x4aef91)[_0x8b9a('0xb6')](loggerCatch('[syncAgentComplete][createHistory]'));this[_0x8b9a('0xc7')](_0x4aef91)[_0x8b9a('0xb6')](loggerCatch('[syncQueueCallerAbandon]\x20[Drop]'));};Dialer[_0x8b9a('0x1d')]['syncQueueCallerAbandon']=function(_0x6db64c){var _0x382cbd=this[_0x8b9a('0x29')][_0x6db64c[_0x8b9a('0xdb')]];var _0x43d7e8=this;if(this['voiceQueues'][_0x6db64c[_0x8b9a('0xb9')]]){if(_0x382cbd&&_0x382cbd[_0x8b9a('0x4e')]!=='ivr'){delete this[_0x8b9a('0x29')][_0x6db64c[_0x8b9a('0xdb')]];this[_0x8b9a('0xb8')](this['voiceQueues'][_0x6db64c[_0x8b9a('0xb9')]]);_0x382cbd[_0x8b9a('0x10e')]=moment()[_0x8b9a('0x96')](_0x8b9a('0xfa'));var _0x422a81=new QueueCallerAbandon(_0x382cbd,_0x6db64c);if(getSeconds(_0x382cbd[_0x8b9a('0x10e')],_0x382cbd[_0x8b9a('0x10f')])>=_0x382cbd['dialQueueTimeout']){this[_0x8b9a('0x23')][_0x6db64c[_0x8b9a('0xb9')]][_0x8b9a('0x6a')]+=0x1;this[_0x8b9a('0x23')][_0x6db64c[_0x8b9a('0xb9')]]['outboundDropCallsDayTimeout']+=0x1;this['voiceQueues'][_0x6db64c[_0x8b9a('0xb9')]][_0x8b9a('0x6b')]+=0x1;_0x422a81['state']=0xa;_0x422a81[_0x8b9a('0xe3')]=_0x8b9a('0x110');_0x422a81['dropreason']=_0x8b9a('0x111');_0x422a81[_0x8b9a('0x109')]=this[_0x8b9a('0x23')][_0x6db64c[_0x8b9a('0xb9')]][_0x8b9a('0x112')]?moment()[_0x8b9a('0x96')](_0x8b9a('0xfa')):undefined;_0x422a81['countdropretry']+=0x1;_0x422a81['countglobal']+=0x1;if(_0x422a81[_0x8b9a('0xf0')]>=this[_0x8b9a('0x23')][_0x6db64c[_0x8b9a('0xb9')]]['dialDropMaxRetry']){this[_0x8b9a('0x10d')](_0x422a81);}else{this[_0x8b9a('0xc1')]({'active':![],'countdropretry':_0x422a81[_0x8b9a('0xf0')],'scheduledat':moment()[_0x8b9a('0xf8')](this['voiceQueues'][_0x6db64c[_0x8b9a('0xb9')]][_0x8b9a('0x113')],_0x8b9a('0xf9'))[_0x8b9a('0x96')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x382cbd[_0x8b9a('0xfb')],'ListId':_0x382cbd[_0x8b9a('0xd2')],'VoiceQueueId':_0x382cbd['VoiceQueueId']||undefined,'CampaignId':_0x382cbd[_0x8b9a('0xd3')]||undefined})[_0x8b9a('0xb6')](loggerCatch('[rescheduleContact][Drop]'));var _0x34e3ec=new History(_0x422a81);_0x34e3ec[_0x8b9a('0xac')]=0xa;_0x34e3ec['statedesc']=_0x8b9a('0x110');_0x34e3ec[_0x8b9a('0xae')]=moment()[_0x8b9a('0x96')](_0x8b9a('0xfa'));_0x34e3ec[_0x8b9a('0xad')]=_0x34e3ec['starttime'];_0x34e3ec[_0x8b9a('0x114')]=_0x422a81[_0x8b9a('0x114')];_0x34e3ec['calleridnum']=_0x422a81['calleridnum'];this[_0x8b9a('0xc9')](_0x34e3ec)[_0x8b9a('0xb6')](loggerCatch('[syncAgentComplete][createHistory][10]'));}}else{this[_0x8b9a('0x23')][_0x6db64c[_0x8b9a('0xb9')]][_0x8b9a('0x69')]+=0x1;this[_0x8b9a('0x23')][_0x6db64c['queue']][_0x8b9a('0x115')]+=0x1;_0x422a81[_0x8b9a('0xac')]=0xb;_0x422a81[_0x8b9a('0xe3')]=_0x8b9a('0x116');_0x422a81[_0x8b9a('0x117')]=_0x8b9a('0x118');_0x422a81[_0x8b9a('0xf1')]+=0x1;_0x422a81[_0x8b9a('0xea')]+=0x1;if(_0x422a81[_0x8b9a('0xf1')]>=this['voiceQueues'][_0x6db64c[_0x8b9a('0xb9')]][_0x8b9a('0x119')]){this['queueCallerAbandonCreateState'](_0x422a81);}else{this[_0x8b9a('0xc1')]({'active':![],'countabandonedretry':_0x422a81[_0x8b9a('0xf1')],'scheduledat':moment()[_0x8b9a('0xf8')](this['voiceQueues'][_0x6db64c[_0x8b9a('0xb9')]][_0x8b9a('0x11a')],'minutes')[_0x8b9a('0x96')](_0x8b9a('0xfa')),'ContactId':_0x382cbd[_0x8b9a('0xfb')],'ListId':_0x382cbd[_0x8b9a('0xd2')],'VoiceQueueId':_0x382cbd[_0x8b9a('0x102')]||undefined,'CampaignId':_0x382cbd[_0x8b9a('0xd3')]||undefined})['catch'](loggerCatch('[rescheduleContact][Abandoned]'));var _0x34e3ec=new History(_0x422a81);_0x34e3ec[_0x8b9a('0xac')]=0xb;_0x34e3ec['statedesc']='Abandoned';_0x34e3ec[_0x8b9a('0xae')]=moment()['format'](_0x8b9a('0xfa'));_0x34e3ec[_0x8b9a('0xad')]=_0x34e3ec['starttime'];_0x34e3ec['calleridname']=_0x422a81[_0x8b9a('0x114')];_0x34e3ec[_0x8b9a('0x11b')]=_0x422a81[_0x8b9a('0x11b')];this[_0x8b9a('0xc9')](_0x34e3ec)[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x11c')));}}}}};Dialer[_0x8b9a('0x1d')][_0x8b9a('0x37')]=function(_0xe4ec2d){if(this['actions'][_0xe4ec2d[_0x8b9a('0xdb')]]){this['actions'][_0xe4ec2d[_0x8b9a('0xdb')]][_0x8b9a('0x11d')]=_0xe4ec2d[_0x8b9a('0x11d')];}if(this[_0x8b9a('0x29')][_0xe4ec2d[_0x8b9a('0xdb')]]){this[_0x8b9a('0x29')][_0xe4ec2d[_0x8b9a('0xdb')]][_0x8b9a('0x11d')]=_0xe4ec2d['channel'];}};Dialer[_0x8b9a('0x1d')][_0x8b9a('0x3a')]=function(_0x2b79f5){if(strategy[this[_0x8b9a('0x23')][this['actions'][_0x2b79f5[_0x8b9a('0x11e')]][_0x8b9a('0xb9')]][_0x8b9a('0x50')]]==='roundrobin'){if(this[_0x8b9a('0xb1')][_0x2b79f5['actionid']]&&_[_0x8b9a('0xb3')](this[_0x8b9a('0xb1')][_0x2b79f5[_0x8b9a('0x11e')]][_0x8b9a('0x11f')])&&_0x2b79f5[_0x8b9a('0xb5')]==='1'&&_0x2b79f5['paused']==='0'){if(this[_0x8b9a('0x25')][_0x2b79f5[_0x8b9a('0x120')]]){if(!this[_0x8b9a('0x25')][_0x2b79f5[_0x8b9a('0x120')]][_0x8b9a('0x11f')]){this[_0x8b9a('0x25')][_0x2b79f5[_0x8b9a('0x120')]]['locked']=!![];this['actions'][_0x2b79f5[_0x8b9a('0x11e')]][_0x8b9a('0x11f')]=!![];this[_0x8b9a('0xb1')][_0x2b79f5[_0x8b9a('0x11e')]][_0x8b9a('0x120')]=_0x2b79f5['stateinterface'];}}}}else if((strategy[this[_0x8b9a('0x23')][this[_0x8b9a('0xb1')][_0x2b79f5[_0x8b9a('0x11e')]][_0x8b9a('0xb9')]][_0x8b9a('0x50')]]||'rrmemory')===_0x8b9a('0x1b')){if(this['actions'][_0x2b79f5[_0x8b9a('0x11e')]]){if(this['agents'][_0x2b79f5[_0x8b9a('0x120')]]){this[_0x8b9a('0xb1')][_0x2b79f5[_0x8b9a('0x11e')]][_0x8b9a('0x120')]=_0x2b79f5[_0x8b9a('0x120')];if(_[_0x8b9a('0xb3')](this[_0x8b9a('0x2d')][this[_0x8b9a('0xb1')][_0x2b79f5[_0x8b9a('0x11e')]][_0x8b9a('0xb9')]])){this[_0x8b9a('0x2d')][this[_0x8b9a('0xb1')][_0x2b79f5[_0x8b9a('0x11e')]]['queue']]=[];}this[_0x8b9a('0x2d')][this[_0x8b9a('0xb1')][_0x2b79f5['actionid']][_0x8b9a('0xb9')]][_0x8b9a('0x121')](_[_0x8b9a('0x90')](_[_0x8b9a('0xd1')](this[_0x8b9a('0xb1')][_0x2b79f5[_0x8b9a('0x11e')]],['idHopper',_0x8b9a('0x120')]),{'status':_0x2b79f5[_0x8b9a('0xb5')],'paused':_0x2b79f5[_0x8b9a('0x122')]}));}}}};function unlockQueueStatus(_0x743f56,_0x59faa1){setTimeout(function(){if(_[_0x8b9a('0x86')](_0x743f56[_0x8b9a('0x123')])){loggerBooked[_0x8b9a('0x99')](_0x8b9a('0x124'),_0x59faa1);}_0x743f56[_0x8b9a('0x123')]=!![];loggerBooked['info'](_0x8b9a('0x125'),_0x59faa1,JSON['stringify'](_[_0x8b9a('0xd1')](_0x743f56,[_0x8b9a('0x40'),'queueStatusComplete'])));},0x1f3);}Dialer['prototype'][_0x8b9a('0x3c')]=function(_0x20948b){var _0x33494d=this;var _0x51fdf4=_0x33494d[_0x8b9a('0x23')][_0x33494d[_0x8b9a('0xb1')][_0x20948b['actionid']][_0x8b9a('0xb9')]];if(strategy[this[_0x8b9a('0x23')][this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0xb9')]][_0x8b9a('0x50')]]===_0x8b9a('0x1c')){if(this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]]&&this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0x120')]){this[_0x8b9a('0x22')][_0x8b9a('0x126')](this[_0x8b9a('0xb1')][_0x20948b['actionid']][_0x8b9a('0x127')],this[_0x8b9a('0xb1')][_0x20948b['actionid']][_0x8b9a('0x120')])[_0x8b9a('0xb6')](function(_0x4bc79d){logger['error'](_0x8b9a('0x128'),util[_0x8b9a('0x9b')](_0x4bc79d,{'showHidden':![],'depth':null}));})[_0x8b9a('0x20')](function(){_0x33494d[_0x8b9a('0xb8')](_0x33494d[_0x8b9a('0x23')][_0x33494d[_0x8b9a('0xb1')][_0x20948b['actionid']][_0x8b9a('0xb9')]]);_0x33494d[_0x8b9a('0x25')][_0x33494d['actions'][_0x20948b[_0x8b9a('0x11e')]]['stateinterface']][_0x8b9a('0x11f')]=![];delete _0x33494d[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]];unlockQueueStatus(_0x51fdf4);});}else{this[_0x8b9a('0xb8')](this[_0x8b9a('0x23')][this[_0x8b9a('0xb1')][_0x20948b['actionid']][_0x8b9a('0xb9')]]);this[_0x8b9a('0xc1')]({'active':![],'ContactId':this['actions'][_0x20948b['actionid']][_0x8b9a('0xfb')],'ListId':this['actions'][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0xd2')],'VoiceQueueId':this['actions'][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0x102')]||undefined,'CampaignId':this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0xd3')]||undefined})['catch'](loggerCatch(_0x8b9a('0x129')));delete this[_0x8b9a('0xb1')][_0x20948b['actionid']];unlockQueueStatus(_0x51fdf4);}}else if((strategy[this[_0x8b9a('0x23')][this[_0x8b9a('0xb1')][_0x20948b['actionid']][_0x8b9a('0xb9')]][_0x8b9a('0x50')]]||_0x8b9a('0x1b'))===_0x8b9a('0x1b')){var _0x2a3a51;if(this['actions'][_0x20948b['actionid']]&&!_['isEmpty'](this[_0x8b9a('0x2d')][this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0xb9')]])){if(this[_0x8b9a('0x12a')][_0x33494d[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0xb9')]]){this[_0x8b9a('0x12a')][_0x33494d['actions'][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0xb9')]]=this[_0x8b9a('0x12a')][this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0xb9')]]?this['queueBookedRR'][this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]]['queue']]:this['queueBooked'][this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0xb9')]]?this['queueBooked'][this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]]['queue']][_0x8b9a('0x12b')]||0x0:0x0;}this[_0x8b9a('0x2d')][this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0xb9')]][_0x8b9a('0x12b')]=this[_0x8b9a('0x12a')][this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0xb9')]];for(var _0x2ff76e=0x0;_0x2ff76e<this[_0x8b9a('0x2d')][this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0xb9')]]['length'];_0x2ff76e+=0x1){_0x2a3a51=rr(this['queueBooked'][this[_0x8b9a('0xb1')][_0x20948b['actionid']][_0x8b9a('0xb9')]]);this['queueBookedRR'][_0x33494d[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0xb9')]]=this[_0x8b9a('0x2d')][this['actions'][_0x20948b[_0x8b9a('0x11e')]]['queue']][_0x8b9a('0x12b')];if(_0x2a3a51['status']==='1'&&_0x2a3a51['paused']==='0'){break;}}if(!_[_0x8b9a('0xb3')](_0x2a3a51)){this[_0x8b9a('0x25')][_0x2a3a51[_0x8b9a('0x120')]][_0x8b9a('0x12c')]=_[_0x8b9a('0x86')](this[_0x8b9a('0x25')][_0x2a3a51[_0x8b9a('0x120')]][_0x8b9a('0x12c')])?!![]:this[_0x8b9a('0x25')][_0x2a3a51['stateinterface']]['unlockRR'];}loggerBooked[_0x8b9a('0x7e')](_0x8b9a('0x12d'),_0x20948b[_0x8b9a('0x11e')],_0x8b9a('0x12e'),JSON[_0x8b9a('0x49')](_['pick'](this[_0x8b9a('0x25')][_0x2a3a51[_0x8b9a('0x120')]],[_0x8b9a('0x40'),_0x8b9a('0x12c')])),_0x8b9a('0x12f'),JSON[_0x8b9a('0x49')](_0x2a3a51[_0x8b9a('0x127')]));if(!_[_0x8b9a('0xb3')](_0x2a3a51)&&_0x2a3a51[_0x8b9a('0xb5')]==='1'&&_0x2a3a51[_0x8b9a('0x122')]==='0'&&this[_0x8b9a('0x25')][_0x2a3a51['stateinterface']][_0x8b9a('0x12c')]){this[_0x8b9a('0x25')][_0x2a3a51[_0x8b9a('0x120')]]['unlockRR']=![];this[_0x8b9a('0x2d')][_0x33494d[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0xb9')]]=[];this[_0x8b9a('0x22')][_0x8b9a('0x126')](_0x2a3a51[_0x8b9a('0x127')],_0x2a3a51[_0x8b9a('0x120')])[_0x8b9a('0xb6')](function(_0x1b55b9){logger[_0x8b9a('0x99')](_0x8b9a('0x128'),util[_0x8b9a('0x9b')](_0x1b55b9,{'showHidden':![],'depth':null}));})[_0x8b9a('0x20')](function(){_0x33494d[_0x8b9a('0xb8')](_0x33494d[_0x8b9a('0x23')][_0x33494d[_0x8b9a('0xb1')][_0x20948b['actionid']][_0x8b9a('0xb9')]]);setTimeout(function(){_0x33494d[_0x8b9a('0x25')][_0x2a3a51[_0x8b9a('0x120')]][_0x8b9a('0x12c')]=!![];loggerBooked[_0x8b9a('0x7e')](_0x8b9a('0x130'),_0x20948b[_0x8b9a('0x11e')],_0x8b9a('0x12e'),JSON[_0x8b9a('0x49')](_[_0x8b9a('0xd1')](_0x33494d['agents'][_0x2a3a51[_0x8b9a('0x120')]],[_0x8b9a('0x40'),_0x8b9a('0x12c')])),_0x8b9a('0x12f'),JSON[_0x8b9a('0x49')](_0x2a3a51[_0x8b9a('0x127')]));},0xc7);delete _0x33494d[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]];unlockQueueStatus(_0x51fdf4,_0x20948b[_0x8b9a('0x11e')]);});}else{loggerBooked[_0x8b9a('0x7e')]('[booked][unlock]');this[_0x8b9a('0xb8')](this[_0x8b9a('0x23')][this[_0x8b9a('0xb1')][_0x20948b['actionid']][_0x8b9a('0xb9')]]);this[_0x8b9a('0xc1')]({'active':![],'ContactId':this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]]['ContactId'],'ListId':this['actions'][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0xd2')],'VoiceQueueId':this[_0x8b9a('0xb1')][_0x20948b['actionid']][_0x8b9a('0x102')]||undefined,'CampaignId':this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0xd3')]||undefined})[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x129')));delete this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]];unlockQueueStatus(_0x51fdf4);}}else{loggerBooked['info']('[booked][unlock2]');this['updateOriginated'](this[_0x8b9a('0x23')][this['actions'][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0xb9')]]);this['rescheduleContact']({'active':![],'ContactId':this[_0x8b9a('0xb1')][_0x20948b['actionid']][_0x8b9a('0xfb')],'ListId':this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]]['ListId'],'VoiceQueueId':this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0x102')]||undefined,'CampaignId':this[_0x8b9a('0xb1')][_0x20948b['actionid']][_0x8b9a('0xd3')]||undefined})[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x131')));delete this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]];unlockQueueStatus(_0x51fdf4);}}else{loggerBooked[_0x8b9a('0x7e')](_0x8b9a('0x132'));this[_0x8b9a('0xb8')](this[_0x8b9a('0x23')][this['actions'][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0xb9')]]);this[_0x8b9a('0xc1')]({'active':![],'ContactId':this['actions'][_0x20948b['actionid']][_0x8b9a('0xfb')],'ListId':this[_0x8b9a('0xb1')][_0x20948b['actionid']][_0x8b9a('0xd2')],'VoiceQueueId':this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0x102')]||undefined,'CampaignId':this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]][_0x8b9a('0xd3')]||undefined})[_0x8b9a('0xb6')](loggerCatch('[unlock3][syncQueueStatusComplete]'));delete this[_0x8b9a('0xb1')][_0x20948b[_0x8b9a('0x11e')]];unlockQueueStatus(_0x51fdf4);}};Dialer['prototype']['loopCampaigns']=function(){var _0x18a3d8=this;setInterval(function(){_0x18a3d8[_0x8b9a('0x133')]();},0x3e8);};Dialer[_0x8b9a('0x1d')][_0x8b9a('0x134')]=function(_0x1881cb){var _0x54b009=this;return function(){if(!_0x54b009['isTrunkReachable'](_0x1881cb['Trunk'])){if(!_0x54b009[_0x8b9a('0xd8')](_0x1881cb[_0x8b9a('0x135')])){_0x1881cb['message']=_0x8b9a('0x136');throw _0x1881cb['name']+_0x8b9a('0x137');}}};};Dialer[_0x8b9a('0x1d')]['checkIfTime']=function(_0x5a1eec,_0x206046,_0x1a3e7f,_0x62ca7){var _0x15cc37=this;return function(){var _0x2a3ad5=!![];return _0x15cc37[_0x8b9a('0x138')](_0x5a1eec,_0x206046,_0x1a3e7f,_0x62ca7,_0x2a3ad5);};};Dialer[_0x8b9a('0x1d')][_0x8b9a('0x139')]=function(_0xcab47a,_0x2fde2b,_0x1a68c9,_0x586fde){var _0x2c79a0=this;return function(){var _0x145c04=![];return _0x2c79a0['ifTime'](_0xcab47a['Intervals'],_0x2fde2b,_0x1a68c9,_0x586fde,_0x145c04);};};Dialer[_0x8b9a('0x1d')]['ifTime']=function(_0x13521a,_0x481299,_0xda19c,_0x5146c5,_0x59614d){var _0x3c0b7e=[];return new BPromise(function(_0x10d36d,_0x42bb0c){if(!isNotNull(_0x13521a)){_0x5146c5[_0x8b9a('0x41')]=_0x8b9a('0x43');return _0x42bb0c(msgResponse(_0x8b9a('0x138'),_0x8b9a('0x13a'),_0xda19c+_0x8b9a('0x13b')));}if(_[_0x8b9a('0x46')](_0x13521a)){_0x5146c5[_0x8b9a('0x41')]='INTERVAL_IS_EMPTY';return _0x42bb0c(msgResponse(_0x8b9a('0x138'),'Failure',_0xda19c+_0x8b9a('0x13c')));}if(_0x481299&&_[_0x8b9a('0x86')](config[_0x8b9a('0x13d')][_0x481299])){_0x5146c5[_0x8b9a('0x41')]='TIMEZONE_UNKNOW';return _0x42bb0c(msgResponse(_0x8b9a('0x138'),_0x8b9a('0x13a'),_0xda19c+_0x8b9a('0x13e')+_0x481299));}if(_[_0x8b9a('0x13f')](_0x13521a)){for(var _0x420756=0x0;_0x420756<_0x13521a['length'];_0x420756+=0x1){_0x3c0b7e[_0x8b9a('0x121')](ami['Action']({'action':_0x8b9a('0x140'),'command':util[_0x8b9a('0x96')](_0x8b9a('0x141'),_0x13521a[_0x420756]['interval'],!_['isUndefined'](config[_0x8b9a('0x13d')][_0x481299])?_0x481299:'')})[_0x8b9a('0xbb')](function(_0x280c02){return _0x280c02['content'][_0x8b9a('0x142')]('true')>=0x0;})['catch'](myreject(_0x42bb0c)));}}else{_0x3c0b7e[_0x8b9a('0x121')](ami[_0x8b9a('0xb4')]({'action':'command','command':util['format']('iftime\x20%s,%s',_0x13521a,!_[_0x8b9a('0x86')](config['timezones'][_0x481299])?_0x481299:'')})[_0x8b9a('0xbb')](function(_0x3485b1){return _0x3485b1['content']['indexOf'](_0x8b9a('0x143'))>=0x0;})[_0x8b9a('0xb6')](myreject(_0x42bb0c)));}BPromise[_0x8b9a('0x144')](_0x3c0b7e)[_0x8b9a('0xbb')](function(_0x3915bc){var _0x2ccc46=_['some'](_0x3915bc);if(_0x2ccc46){return _0x10d36d(_0x2ccc46);}else{_0x5146c5[_0x8b9a('0x41')]=_0x59614d?_0x8b9a('0x145'):_0x8b9a('0x146');return _0x42bb0c(msgResponse(_0x8b9a('0x147'),_0x8b9a('0x13a'),_0x8b9a('0x148')+_0x59614d+'\x20'+_0xda19c+_0x8b9a('0x149')+util[_0x8b9a('0x9b')](_0x13521a,{'showHidden':![],'depth':null})+_0x8b9a('0x14a')+_0x481299));}})[_0x8b9a('0xb6')](function(_0x4c70b9){return _0x42bb0c(msgResponse(_0x8b9a('0x138'),'Failure',JSON[_0x8b9a('0x49')](_0x4c70b9)));});});};Dialer['prototype'][_0x8b9a('0x14b')]=function(_0x32396d){var _0x1618c2=this;return function(){switch(_0x32396d['dialMethod']){case _0x8b9a('0x14c'):freeVariablesPredictive(_0x32396d);_0x1618c2[_0x8b9a('0x14d')](_0x32396d,0x1);break;case'power':freeVariablesPredictive(_0x32396d);_0x1618c2[_0x8b9a('0x14d')](_0x32396d,_0x32396d['dialPowerLevel']);break;case _0x8b9a('0x9'):_0x1618c2['predictive'](_0x32396d);break;case _0x8b9a('0x14e'):freeVariablesPredictive(_0x32396d);_0x1618c2[_0x8b9a('0x14d')](_0x32396d,0x1);break;default:freeVariablesPredictive(_0x32396d);logger[_0x8b9a('0x99')]('Queue',_0x32396d[_0x8b9a('0x40')],_0x8b9a('0x14f'));}};};Dialer[_0x8b9a('0x1d')][_0x8b9a('0x150')]=function(_0x583156){var _0x453ffc=this;return function(){_0x453ffc[_0x8b9a('0x151')](_0x583156);};};Dialer[_0x8b9a('0x1d')][_0x8b9a('0xb')]=function(_0x4cfa13){var _0x562642=this;if(isNotPreview(_0x4cfa13[_0x8b9a('0x59')])){if(isVoiceQueueOutbound(_0x4cfa13[_0x8b9a('0x4e')])&&isActive(_0x4cfa13[_0x8b9a('0x152')])){_0x4cfa13[_0x8b9a('0xa6')]=!![];BPromise['resolve']()[_0x8b9a('0xbb')](checkIsLoggedIn(_0x4cfa13,_0x4cfa13[_0x8b9a('0x153')]))['then'](checkIsActive(_0x4cfa13,_0x4cfa13[_0x8b9a('0x152')]))[_0x8b9a('0xbb')](checkInterval(_0x4cfa13))[_0x8b9a('0xbb')](_0x562642['checkIsTrunkReachable'](_0x4cfa13))[_0x8b9a('0xbb')](_0x562642[_0x8b9a('0x154')](_0x4cfa13[_0x8b9a('0x155')],_0x4cfa13['dialTimezone'],_0x4cfa13[_0x8b9a('0x40')],_0x4cfa13))[_0x8b9a('0xbb')](_0x562642[_0x8b9a('0x139')](_0x4cfa13[_0x8b9a('0x47')],_0x4cfa13['dialTimezone'],_0x4cfa13[_0x8b9a('0x40')],_0x4cfa13))[_0x8b9a('0xbb')](_0x562642[_0x8b9a('0x14b')](_0x4cfa13))[_0x8b9a('0xb6')](loggerCatchQueueSummary('[syncQueueSummary]',_0x4cfa13));}else{notSendMessagesQueue(_0x4cfa13);}}else{freeVariablesPredictive(_0x4cfa13);}};Dialer[_0x8b9a('0x1d')][_0x8b9a('0x133')]=function(){var _0x384670=this;var _0x29552f;for(var _0x497ca9 in this[_0x8b9a('0x24')]){if(typeof this[_0x8b9a('0x24')][_0x497ca9]!==_0x8b9a('0x9d')){_0x29552f=this[_0x8b9a('0x24')][_0x497ca9];if(isCampaignIvr(_0x29552f[_0x8b9a('0x4e')])&&isActive(_0x29552f[_0x8b9a('0x77')])){_0x29552f[_0x8b9a('0xa6')]=!![];BPromise['resolve']()[_0x8b9a('0xbb')](checkIsActive(_0x29552f,_0x29552f[_0x8b9a('0x77')]))[_0x8b9a('0xbb')](checkInterval(_0x29552f))['then'](_0x384670[_0x8b9a('0x134')](_0x29552f))[_0x8b9a('0xbb')](_0x384670['checkIfTime'](_0x29552f[_0x8b9a('0x155')],_0x29552f['dialTimezone'],_0x29552f[_0x8b9a('0x40')],_0x29552f))[_0x8b9a('0xbb')](_0x384670[_0x8b9a('0x139')](_0x29552f[_0x8b9a('0x47')],_0x29552f[_0x8b9a('0x156')],_0x29552f[_0x8b9a('0x40')],_0x29552f))[_0x8b9a('0xbb')](_0x384670[_0x8b9a('0x150')](_0x29552f))[_0x8b9a('0xb6')](loggerCatchQueueSummary(_0x8b9a('0x157'),_0x29552f));}else{notSendMessagesCampaign(_0x29552f);}}}};function getCallerIdRandom(_0x56452f,_0x3a2cb3){var _0xe004d6;var _0xf8783d;var _0x205372;if(_0x3a2cb3<=0x0){_0x3a2cb3=0x1;}_0xe004d6=new RegExp(_0x8b9a('0x158')+_0x3a2cb3+'}$');_0xf8783d=Math[_0x8b9a('0x159')](0xa,_0x3a2cb3-0x1);_0x205372=Math[_0x8b9a('0x159')](0xa,_0x3a2cb3)-0x1;return util[_0x8b9a('0x96')]('%s',_['replace'](_0x56452f,_0xe004d6,_[_0x8b9a('0x15a')](_0xf8783d,_0x205372)));}function extractCalleridName(_0x2118fa){var _0x10ab31=_0x2118fa[_0x8b9a('0x15b')](/"(.*?)"/);return _0x10ab31?_0x10ab31[0x1]:_0x2118fa;}function extractCalleridNumber(_0x2f6d8b){var _0x504e71=_0x2f6d8b[_0x8b9a('0x15b')](/<(.*?)>/);return _0x504e71?_0x504e71[0x1]:_0x2f6d8b;}Dialer[_0x8b9a('0x1d')][_0x8b9a('0x15c')]=function(_0x2abf72,_0x2d5184){var _0x5774b9=this;var _0x1080cf=uuid['v4']();this['actions'][_0x1080cf]=new Action(_0x2abf72,_0x2d5184,_0x1080cf);return new BPromise(function(_0x518fb3,_0x30c0e6){if(_[_0x8b9a('0x86')](_0x2abf72)&&typeof _0x2abf72!=='object'){return _0x30c0e6(msgResponse(_0x8b9a('0x15d'),_0x8b9a('0x13a'),_0x8b9a('0x15e')));}if(_['isUndefined'](_0x2d5184[_0x8b9a('0x15f')]['phone'])||_0x2d5184['Contact'][_0x8b9a('0x160')]===null){return _0x30c0e6(msgResponse('originate',_0x8b9a('0x13a'),'contact\x20is\x20undefine'));}var _0x57ae6a={'XMD-CALLERID':_0x5774b9[_0x8b9a('0xb1')][_0x1080cf][_0x8b9a('0x161')](),'XMD-AGI':_0x2abf72['dialQueueProject']?util[_0x8b9a('0x96')](_0x8b9a('0x162'),ipAgi,_0x2abf72[_0x8b9a('0x104')]):_0x8b9a('0x163'),'XMD-AGIAFTER':_0x2abf72[_0x8b9a('0x112')]?util['format'](_0x8b9a('0x162'),ipAgi,_0x2abf72['dialQueueProject2']):_0x8b9a('0x163'),'XMD-QUEUE':_0x2abf72[_0x8b9a('0x4e')]===_0x8b9a('0x4f')?util[_0x8b9a('0x96')](_0x8b9a('0x164'),_0x2abf72[_0x8b9a('0x40')],_0x2abf72[_0x8b9a('0x165')]||'',_0x2abf72[_0x8b9a('0x10a')]?'c':'',_0x2abf72[_0x8b9a('0x166')]||0x3):_0x8b9a('0x163'),'XMD-CONTACTID':_0x2d5184[_0x8b9a('0xfb')],'XMD-CDRTYPE':_0x8b9a('0x8'),'CALLERID(all)':_0x5774b9[_0x8b9a('0xb1')][_0x1080cf][_0x8b9a('0x161')](),'XMD-AMD':_0x2abf72['dialAMDActive']?'ACTIVE':'NONE','XMD-DESTINATION':_0x8b9a('0xdf')};if(_0x2abf72['dialAMDActive']){_0x57ae6a[_0x8b9a('0x167')]=_0x2abf72['dialAMDInitialSilence']||0x9c4;_0x57ae6a['XMD-AMDGREETING']=_0x2abf72[_0x8b9a('0x168')]||0x5dc;_0x57ae6a[_0x8b9a('0x169')]=_0x2abf72['dialAMDAfterGreetingSilence']||0x320;_0x57ae6a[_0x8b9a('0x16a')]=_0x2abf72['dialAMDTotalAnalysisTime']||0x1388;_0x57ae6a['XMD-AMDMINWORDLENGTH']=_0x2abf72['dialAMDMinWordLength']||0x64;_0x57ae6a['XMD-AMDBETWEENWORDSSILENCE']=_0x2abf72['dialAMDBetweenWordsSilence']||0x32;_0x57ae6a['XMD-AMDMAXIMUMNUMBEROFWORDS']=_0x2abf72[_0x8b9a('0x16b')]||0x3;_0x57ae6a['XMD-AMDSILENCETHRESHOLD']=_0x2abf72['dialAMDSilenceThreshold']||0x100;_0x57ae6a['XMD-AMDMAXIMUMWORDLENGTH']=_0x2abf72[_0x8b9a('0x16c')]||0x1388;}if(_0x2abf72[_0x8b9a('0x4e')]===_0x8b9a('0x4f')){_0x57ae6a[_0x8b9a('0x16d')]=_0x2d5184[_0x8b9a('0x102')];}else{_0x57ae6a[_0x8b9a('0x16e')]=_0x2d5184[_0x8b9a('0xd3')];}for(var _0x3181af in _0x2d5184[_0x8b9a('0x15f')]){if(typeof _0x2d5184[_0x8b9a('0x15f')][_0x3181af]!==_0x8b9a('0x9d')){if(isNotNull(_0x2d5184[_0x8b9a('0x15f')][_0x3181af])&&_0x3181af!=='id'&&_0x3181af!==_0x8b9a('0x16f')&&_0x3181af!==_0x8b9a('0x170')&&_0x3181af!=='updatedAt'){_0x57ae6a[util[_0x8b9a('0x96')](_0x8b9a('0x171'),'XMD-',_[_0x8b9a('0x172')](_0x3181af))]=_0x2d5184[_0x8b9a('0x15f')][_0x3181af];}}}var _0x765117=_0x5774b9[_0x8b9a('0xd8')](_0x2abf72['Trunk'])?getCallerId(_0x2abf72[_0x8b9a('0x76')]['callerid'],_0x2abf72[_0x8b9a('0x5a')],_0x2abf72[_0x8b9a('0x173')]>0x0?getCallerIdRandom(_0x2abf72[_0x8b9a('0x5b')],_0x2abf72[_0x8b9a('0x173')]):_0x2abf72[_0x8b9a('0x5b')]):getCallerId(_[_0x8b9a('0xb3')](_0x2abf72['TrunkBackup'])?_0x2abf72[_0x8b9a('0x76')][_0x8b9a('0x78')]:_0x2abf72['TrunkBackup'][_0x8b9a('0x78')],_0x2abf72[_0x8b9a('0x5a')],_0x2abf72[_0x8b9a('0x173')]>0x0?getCallerIdRandom(_0x2abf72[_0x8b9a('0x5b')],_0x2abf72['dialRandomLastDigitCallerIdNumber']):_0x2abf72[_0x8b9a('0x5b')]);if(_0x765117){_0x57ae6a['XMD-ORIGINATECALLERIDNAME']=_0x5774b9['actions'][_0x1080cf][_0x8b9a('0x174')]=extractCalleridName(_0x765117);_0x57ae6a['XMD-ORIGINATECALLERIDNUM']=_0x5774b9[_0x8b9a('0xb1')][_0x1080cf][_0x8b9a('0x175')]=extractCalleridNumber(_0x765117);}return ami[_0x8b9a('0xb4')]({'actionid':_0x1080cf,'action':_0x8b9a('0x15d'),'channel':_0x5774b9[_0x8b9a('0xd8')](_0x2abf72[_0x8b9a('0x76')])?util[_0x8b9a('0x96')]('SIP/%s/%s%s',_0x2abf72['Trunk'][_0x8b9a('0x40')],isNotNull(_0x2abf72['dialPrefix'])?_0x2abf72['dialPrefix'][_0x8b9a('0x176')]()||'':'',_0x2abf72[_0x8b9a('0x177')]>0x0?_0x2d5184[_0x8b9a('0x15f')][_0x8b9a('0x160')]['substring'](_0x2abf72[_0x8b9a('0x177')]):_0x2d5184[_0x8b9a('0x15f')][_0x8b9a('0x160')]):util[_0x8b9a('0x96')](_0x8b9a('0x178'),_[_0x8b9a('0xb3')](_0x2abf72[_0x8b9a('0x135')])?_0x2abf72[_0x8b9a('0x76')][_0x8b9a('0x40')]:_0x2abf72['TrunkBackup']['name'],isNotNull(_0x2abf72['dialPrefix'])?_0x2abf72[_0x8b9a('0x5d')][_0x8b9a('0x176')]()||'':'',_0x2abf72['dialCutDigit']>0x0?_0x2d5184['Contact'][_0x8b9a('0x160')][_0x8b9a('0x179')](_0x2abf72[_0x8b9a('0x177')]):_0x2d5184[_0x8b9a('0x15f')]['phone']),'callerid':_0x765117,'Exten':_0x8b9a('0xdf'),'Context':'from-sip','Priority':'1','variable':_0x57ae6a,'timeout':(_0x2abf72['dialOriginateTimeout']||0x1e)*0x3e8,'async':!![],'channelid':_0x1080cf})[_0x8b9a('0xbb')](function(_0x12da83){return _0x518fb3(_0x12da83);})[_0x8b9a('0xb6')](function(_0x566e4c){_0x2abf72[_0x8b9a('0x63')]+=0x1;var _0x12746a=new History(_0x5774b9['actions'][_0x1080cf]);logger[_0x8b9a('0x99')](util[_0x8b9a('0x96')](_0x8b9a('0x17a'),JSON[_0x8b9a('0x49')](_0x566e4c)));_0x12746a[_0x8b9a('0xac')]=0xe;_0x12746a[_0x8b9a('0xe3')]=_0x8b9a('0x17b');_0x12746a['starttime']=moment()[_0x8b9a('0x96')](_0x8b9a('0xfa'));_0x12746a[_0x8b9a('0xad')]=_0x12746a[_0x8b9a('0xae')];_0x5774b9['createHistory'](_0x12746a)[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x17c')));_0x5774b9['moveContactManagedDialer'](_0x12746a)[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x17c')))['finally'](function(){delete _0x5774b9[_0x8b9a('0xb1')][_0x1080cf];return _0x30c0e6(msgResponse(_0x8b9a('0x15d'),_0x8b9a('0x17d'),_0x8b9a('0x17e')));});});});};Dialer[_0x8b9a('0x1d')][_0x8b9a('0x31')]=function(_0x4ef5b8){var _0x3ffb81=this[_0x8b9a('0xb1')][_0x4ef5b8[_0x8b9a('0x11e')]];if(_0x3ffb81){delete this[_0x8b9a('0xb1')][_0x4ef5b8[_0x8b9a('0x11e')]];_0x3ffb81[_0x8b9a('0x10f')]=moment()[_0x8b9a('0x96')](_0x8b9a('0xfa'));var _0x25cebf=_0x3ffb81[_0x8b9a('0x4e')]==='ivr'?this[_0x8b9a('0x24')][_0x3ffb81[_0x8b9a('0xb9')]]:this['voiceQueues'][_0x3ffb81['getQueue']()];if(!this[_0x8b9a('0xd6')](_0x4ef5b8[_0x8b9a('0x17f')])){this['updateOriginated'](_0x25cebf);return this['callProgressDetecting'](_0x3ffb81,_0x25cebf,_0x4ef5b8)['catch'](loggerCatch('[callProgressDetecting]\x20'));}this[_0x8b9a('0x29')][_0x4ef5b8['uniqueid']]=_0x3ffb81;}};Dialer[_0x8b9a('0x1d')][_0x8b9a('0x180')]=function(_0x1baa15,_0x33527d,_0x2c06a8){var _0x33cc5a=new History(_0x33527d);if(_0x33cc5a[_0x8b9a('0xff')]+_0x33cc5a[_0x8b9a('0xed')]+_0x33cc5a[_0x8b9a('0xee')]+_0x33cc5a[_0x8b9a('0xef')]+_0x33cc5a[_0x8b9a('0xf0')]+_0x33cc5a[_0x8b9a('0xf1')]+_0x33cc5a[_0x8b9a('0xe9')]+_0x33cc5a[_0x8b9a('0x100')]>=_0x2c06a8['dialGlobalMaxRetry']-0x1){return!![];}switch(_0x1baa15){case 0x3:if(_0x33cc5a[_0x8b9a('0xee')]>=_0x2c06a8[_0x8b9a('0x181')]-0x1){return!![];}this['rescheduleContact']({'active':![],'countnoanswerretry':_0x33cc5a[_0x8b9a('0xee')]+=0x1,'scheduledat':moment()[_0x8b9a('0xf8')](_0x2c06a8[_0x8b9a('0x182')],_0x8b9a('0xf9'))['format'](_0x8b9a('0xfa')),'ContactId':_0x33cc5a[_0x8b9a('0xfb')],'ListId':_0x33cc5a[_0x8b9a('0xd2')],'VoiceQueueId':_0x33cc5a[_0x8b9a('0x102')]||undefined,'CampaignId':_0x33cc5a['CampaignId']||undefined})['catch'](loggerCatch(_0x8b9a('0x183')));break;case 0x5:if(_0x33cc5a[_0x8b9a('0xff')]>=_0x2c06a8[_0x8b9a('0x184')]-0x1){return!![];}this[_0x8b9a('0xc1')]({'active':![],'countbusyretry':_0x33cc5a[_0x8b9a('0xff')]+=0x1,'scheduledat':moment()['add'](_0x2c06a8['dialBusyRetryFrequency'],_0x8b9a('0xf9'))[_0x8b9a('0x96')](_0x8b9a('0xfa')),'ContactId':_0x33cc5a[_0x8b9a('0xfb')],'ListId':_0x33cc5a[_0x8b9a('0xd2')],'VoiceQueueId':_0x33cc5a[_0x8b9a('0x102')]||undefined,'CampaignId':_0x33cc5a['CampaignId']||undefined})[_0x8b9a('0xb6')](loggerCatch('[rescheduleContact]\x20[Busy]'));break;case 0x8:if(_0x33cc5a[_0x8b9a('0xed')]>=_0x2c06a8[_0x8b9a('0x185')]-0x1){return!![];}this[_0x8b9a('0xc1')]({'active':![],'countcongestionretry':_0x33cc5a['countcongestionretry']+=0x1,'scheduledat':moment()[_0x8b9a('0xf8')](_0x2c06a8[_0x8b9a('0x186')],_0x8b9a('0xf9'))[_0x8b9a('0x96')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x33cc5a[_0x8b9a('0xfb')],'ListId':_0x33cc5a[_0x8b9a('0xd2')],'VoiceQueueId':_0x33cc5a[_0x8b9a('0x102')]||undefined,'CampaignId':_0x33cc5a[_0x8b9a('0xd3')]||undefined})[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x187')));break;case 0x0:if(_0x33cc5a[_0x8b9a('0xef')]>=_0x2c06a8[_0x8b9a('0x188')]-0x1){return!![];}else{this['rescheduleContact']({'active':![],'countnosuchnumberretry':_0x33cc5a['countnosuchnumberretry']+=0x1,'scheduledat':moment()[_0x8b9a('0xf8')](_0x2c06a8[_0x8b9a('0x189')],_0x8b9a('0xf9'))[_0x8b9a('0x96')](_0x8b9a('0xfa')),'ContactId':_0x33cc5a['ContactId'],'ListId':_0x33cc5a[_0x8b9a('0xd2')],'VoiceQueueId':_0x33cc5a['VoiceQueueId']||undefined,'CampaignId':_0x33cc5a[_0x8b9a('0xd3')]||undefined})[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x18a')));}break;case 0xa:if(_0x33cc5a['countdropretry']>=_0x2c06a8[_0x8b9a('0x18b')]-0x1){return!![];}this[_0x8b9a('0xc1')]({'active':![],'countdropretry':_0x33cc5a[_0x8b9a('0xf0')]+=0x1,'scheduledat':moment()['add'](_0x2c06a8[_0x8b9a('0x113')],'minutes')['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x33cc5a['ContactId'],'ListId':_0x33cc5a[_0x8b9a('0xd2')],'VoiceQueueId':_0x33cc5a[_0x8b9a('0x102')]||undefined,'CampaignId':_0x33cc5a[_0x8b9a('0xd3')]||undefined})[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x18c')));break;case 0xb:if(_0x33cc5a['countabandonedretry']>=_0x2c06a8[_0x8b9a('0x119')]-0x1){return!![];}this['rescheduleContact']({'active':![],'countabandonedretry':_0x33cc5a['countabandonedretry']+=0x1,'scheduledat':moment()[_0x8b9a('0xf8')](_0x2c06a8[_0x8b9a('0x11a')],'minutes')[_0x8b9a('0x96')](_0x8b9a('0xfa')),'ContactId':_0x33cc5a[_0x8b9a('0xfb')],'ListId':_0x33cc5a[_0x8b9a('0xd2')],'VoiceQueueId':_0x33cc5a[_0x8b9a('0x102')]||undefined,'CampaignId':_0x33cc5a['CampaignId']||undefined})[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x18d')));break;case 0x13:if(_0x33cc5a[_0x8b9a('0xe9')]>=_0x2c06a8[_0x8b9a('0xf5')]-0x1){return!![];}this[_0x8b9a('0xc1')]({'active':![],'countmachineretry':_0x33cc5a[_0x8b9a('0xe9')]+=0x1,'scheduledat':moment()['add'](_0x2c06a8[_0x8b9a('0x101')],_0x8b9a('0xf9'))[_0x8b9a('0x96')](_0x8b9a('0xfa')),'ContactId':_0x33cc5a[_0x8b9a('0xfb')],'ListId':_0x33cc5a[_0x8b9a('0xd2')],'VoiceQueueId':_0x33cc5a['VoiceQueueId']||undefined,'CampaignId':_0x33cc5a[_0x8b9a('0xd3')]||undefined})[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0xfc')));break;case 0x14:if(_0x33cc5a[_0x8b9a('0x100')]>=_0x2c06a8[_0x8b9a('0x18e')]-0x1){return!![];}this[_0x8b9a('0xc1')]({'active':![],'countagentrejectretry':_0x33cc5a[_0x8b9a('0x100')]+=0x1,'scheduledat':moment()[_0x8b9a('0xf8')](_0x2c06a8['dialAgentRejectRetryFrequency'],_0x8b9a('0xf9'))[_0x8b9a('0x96')](_0x8b9a('0xfa')),'ContactId':_0x33cc5a[_0x8b9a('0xfb')],'ListId':_0x33cc5a[_0x8b9a('0xd2')],'VoiceQueueId':_0x33cc5a[_0x8b9a('0x102')]||undefined,'CampaignId':_0x33cc5a['CampaignId']||undefined})[_0x8b9a('0xb6')](loggerCatch('[rescheduleContact][AgentReject]'));break;default:return!![];}};Dialer[_0x8b9a('0x1d')]['callProgressDetecting']=function(_0x5e319c,_0x45a3e4,_0x458f0c){var _0x58a57e=this;var _0x15a7c2=new History(_0x5e319c);return new BPromise(function(_0x3d125d,_0x4f7d4b){if(_[_0x8b9a('0x86')](_0x45a3e4)&&typeof _0x45a3e4!==_0x8b9a('0x18f')){return _0x4f7d4b(msgResponse(_0x8b9a('0x190'),_0x8b9a('0x13a'),_0x8b9a('0x191')));}if(_[_0x8b9a('0x86')](_0x458f0c)&&typeof _0x458f0c!=='object'){return _0x4f7d4b(msgResponse(_0x8b9a('0x190'),_0x8b9a('0x13a'),_0x8b9a('0x192')));}switch(_0x458f0c['reason']){case'0':_0x45a3e4[_0x8b9a('0x62')]+=0x1;_0x15a7c2[_0x8b9a('0xac')]=0x0;_0x15a7c2[_0x8b9a('0xe3')]='NoSuchNumber';_0x15a7c2[_0x8b9a('0xef')]+=0x1;_0x15a7c2[_0x8b9a('0xea')]+=0x1;ami['emit'](_0x8b9a('0x193'),ut[_0x8b9a('0x194')](_0x5e319c,_0x8b9a('0x195')));_0x58a57e['createHistory'](_0x15a7c2)['catch'](loggerCatch(_0x8b9a('0xec')));if(_0x58a57e[_0x8b9a('0x180')](0x0,_0x5e319c,_0x45a3e4)){if(_0x15a7c2['countnosuchnumberretry']>=_0x45a3e4['dialNoSuchNumberMaxRetry']){_0x58a57e[_0x8b9a('0xf6')](_0x15a7c2,_0x3d125d,_0x4f7d4b,_0x8b9a('0x196'));}else{_0x58a57e[_0x8b9a('0xf3')](_0x15a7c2,_0x3d125d,_0x4f7d4b,'reason\x200\x20no\x20such\x20number....');}}break;case'3':_0x45a3e4[_0x8b9a('0x197')]+=0x1;_0x15a7c2[_0x8b9a('0xac')]=0x3;_0x15a7c2['statedesc']=_0x8b9a('0x198');_0x15a7c2[_0x8b9a('0xee')]+=0x1;_0x15a7c2[_0x8b9a('0xea')]+=0x1;ami[_0x8b9a('0x4d')]('custom:agentnoanswer',ut['buildObj'](_0x5e319c,_0x8b9a('0x199')));_0x58a57e['createHistory'](_0x15a7c2)[_0x8b9a('0xb6')](loggerCatch('[syncAgentComplete][createHistory][3]'));if(_0x58a57e[_0x8b9a('0x180')](0x3,_0x5e319c,_0x45a3e4)){if(_0x15a7c2['countnoanswerretry']>=_0x45a3e4['dialNoAnswerMaxRetry']){_0x58a57e[_0x8b9a('0xf6')](_0x15a7c2,_0x3d125d,_0x4f7d4b,_0x8b9a('0x19a'));}else{_0x58a57e[_0x8b9a('0xf3')](_0x15a7c2,_0x3d125d,_0x4f7d4b,'reason\x203\x20ringing\x20no\x20answer');}}break;case'5':_0x45a3e4['outboundBusyCallsDay']+=0x1;_0x15a7c2['state']=0x5;_0x15a7c2[_0x8b9a('0xe3')]=_0x8b9a('0x19b');_0x15a7c2[_0x8b9a('0xff')]+=0x1;_0x15a7c2[_0x8b9a('0xea')]+=0x1;ami[_0x8b9a('0x4d')](_0x8b9a('0x19c'),ut['buildObj'](_0x5e319c,_0x8b9a('0x19d')));_0x58a57e[_0x8b9a('0xc9')](_0x15a7c2)[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x19e')));if(_0x58a57e[_0x8b9a('0x180')](0x5,_0x5e319c,_0x45a3e4)){if(_0x15a7c2[_0x8b9a('0xff')]>=_0x45a3e4[_0x8b9a('0x184')]){_0x58a57e['createStateFinal'](_0x15a7c2,_0x3d125d,_0x4f7d4b,_0x8b9a('0x19f'));}else{_0x58a57e[_0x8b9a('0xf3')](_0x15a7c2,_0x3d125d,_0x4f7d4b,_0x8b9a('0x19f'));}}break;case'8':_0x45a3e4[_0x8b9a('0x1a0')]+=0x1;_0x15a7c2[_0x8b9a('0xac')]=0x8;_0x15a7c2['statedesc']=_0x8b9a('0x1a1');_0x15a7c2[_0x8b9a('0xed')]+=0x1;_0x15a7c2[_0x8b9a('0xea')]+=0x1;ami['emit']('custom:agentcongestion',ut[_0x8b9a('0x194')](_0x5e319c,_0x8b9a('0x1a2')));_0x58a57e[_0x8b9a('0xc9')](_0x15a7c2)[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x1a3')));if(_0x58a57e[_0x8b9a('0x180')](0x8,_0x5e319c,_0x45a3e4)){if(_0x15a7c2['countcongestionretry']>=_0x45a3e4[_0x8b9a('0x185')]){_0x58a57e[_0x8b9a('0xf6')](_0x15a7c2,_0x3d125d,_0x4f7d4b,_0x8b9a('0x1a4'));}else{_0x58a57e[_0x8b9a('0xf3')](_0x15a7c2,_0x3d125d,_0x4f7d4b,_0x8b9a('0x1a4'));}}break;case'11':_0x45a3e4['outboundAbandonedCallsDay']+=0x1;_0x15a7c2[_0x8b9a('0xac')]=0xb;_0x15a7c2[_0x8b9a('0xe3')]='Abandoned';_0x15a7c2[_0x8b9a('0xf1')]+=0x1;_0x15a7c2[_0x8b9a('0xea')]+=0x1;_0x58a57e[_0x8b9a('0xc9')](_0x15a7c2)[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x11c')));if(_0x58a57e[_0x8b9a('0x180')](0xb,_0x5e319c,_0x45a3e4)){if(_0x15a7c2[_0x8b9a('0xf1')]>=_0x45a3e4[_0x8b9a('0x119')]){_0x58a57e[_0x8b9a('0xf6')](_0x15a7c2,_0x3d125d,_0x4f7d4b,_0x8b9a('0x1a5'));}else{_0x58a57e[_0x8b9a('0xf3')](_0x15a7c2,_0x3d125d,_0x4f7d4b,_0x8b9a('0x1a5'));}}break;case'20':_0x45a3e4[_0x8b9a('0x65')]+=0x1;_0x15a7c2[_0x8b9a('0xac')]=0x14;_0x15a7c2[_0x8b9a('0xe3')]=_0x8b9a('0x1a6');_0x15a7c2[_0x8b9a('0x100')]+=0x1;_0x15a7c2[_0x8b9a('0xea')]+=0x1;ami[_0x8b9a('0x4d')](_0x8b9a('0x1a7'),ut[_0x8b9a('0x194')](_0x5e319c,_0x8b9a('0x1a8')));_0x58a57e[_0x8b9a('0xc9')](_0x15a7c2)['catch'](loggerCatch(_0x8b9a('0x1a9')));if(_0x58a57e[_0x8b9a('0x180')](0x14,_0x5e319c,_0x45a3e4)){if(_0x15a7c2['countagentrejectretry']>=_0x45a3e4[_0x8b9a('0x18e')]){_0x58a57e[_0x8b9a('0xf6')](_0x15a7c2,_0x3d125d,_0x4f7d4b,_0x8b9a('0x1aa'));}else{_0x58a57e[_0x8b9a('0xf3')](_0x15a7c2,_0x3d125d,_0x4f7d4b,_0x8b9a('0x1aa'));}}break;default:_0x45a3e4[_0x8b9a('0x66')]+=0x1;_0x15a7c2[_0x8b9a('0xac')]=0xc;_0x15a7c2['statedesc']=_0x458f0c[_0x8b9a('0x1ab')];_0x58a57e['createHistory'](_0x15a7c2)[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x1ac')));if(_0x58a57e[_0x8b9a('0x180')](_0x458f0c[_0x8b9a('0x1ab')],_0x5e319c,_0x45a3e4)){if(_0x15a7c2['countbusyretry']+_0x15a7c2[_0x8b9a('0xed')]+_0x15a7c2[_0x8b9a('0xee')]+_0x15a7c2['countnosuchnumberretry']+_0x15a7c2[_0x8b9a('0xf0')]+_0x15a7c2[_0x8b9a('0xf1')]+_0x15a7c2['countmachineretry']+_0x15a7c2[_0x8b9a('0x100')]>=_0x45a3e4[_0x8b9a('0xf2')]){_0x58a57e[_0x8b9a('0xf3')](_0x15a7c2,_0x3d125d,_0x4f7d4b,_0x458f0c[_0x8b9a('0x1ab')]);}else{_0x58a57e[_0x8b9a('0xf6')](_0x15a7c2,_0x3d125d,_0x4f7d4b,_0x458f0c[_0x8b9a('0x1ab')]);}}}});};Dialer[_0x8b9a('0x1d')][_0x8b9a('0xf3')]=function(_0x31b12f,_0x462838,_0x282fb4,_0x52bce1){var _0x50cee7=new Final(_0x31b12f);_0x50cee7['state']=0xf;_0x50cee7[_0x8b9a('0xe3')]=_0x8b9a('0x1ad');this[_0x8b9a('0xf6')](_0x50cee7,_0x462838,_0x282fb4,_0x52bce1);};Dialer[_0x8b9a('0x1d')][_0x8b9a('0xf6')]=function(_0x3fdde9,_0x4675fa,_0x2705b2,_0x46e4b0){this[_0x8b9a('0xc7')](_0x3fdde9)[_0x8b9a('0xbb')](function(){return _0x4675fa(msgResponse(_0x8b9a('0x190'),'Success',_0x46e4b0));})['catch'](function(){return _0x2705b2(msgResponse(_0x8b9a('0x1ae'),_0x8b9a('0x13a'),'contact\x20not\x20moved'));});};Dialer['prototype']['predictive']=function(_0x36f74d){var _0x1e26fe=_0x36f74d[_0x8b9a('0x1af')]/0x64;var _0x1e3952=_0x36f74d['outboundDropCallsDayTimeout']/(_0x36f74d[_0x8b9a('0x1b0')]+_0x36f74d[_0x8b9a('0x5f')]);var _0xe94a9d=Math[_0x8b9a('0x1b1')](_0x36f74d[_0x8b9a('0x6e')]*(_0x36f74d[_0x8b9a('0x1b2')]/0x64));var _0x211f27=Math[_0x8b9a('0x1b1')](_0x36f74d['predictiveIntervalAvailable']*(_0x36f74d[_0x8b9a('0x1b3')]/0x64));var _0x2d3e99=_0x36f74d[_0x8b9a('0x51')]+_0x36f74d[_0x8b9a('0x55')];var _0x4e467e=Math['floor'](_0x36f74d[_0x8b9a('0x71')]*_0x36f74d[_0x8b9a('0x73')]*_0x36f74d[_0x8b9a('0x1b4')]*_0x36f74d['predictiveIntervalMultiplicativeFactor']);if(_['isUndefined'](_0x36f74d['startProgressive'])){if(!_[_0x8b9a('0x86')](_0x36f74d[_0x8b9a('0x75')])){_0x36f74d[_0x8b9a('0x75')]=undefined;loggerPredictive[_0x8b9a('0x99')](_0x8b9a('0x1b5'),_0x8b9a('0x1b6'));}if(!_[_0x8b9a('0x86')](_0x36f74d[_0x8b9a('0x93')])){loggerPredictive['error'](_0x8b9a('0x1b5'),_0x8b9a('0x1b7'));clearInterval(_0x36f74d['handlePredictive']);_0x36f74d[_0x8b9a('0x93')]=undefined;}_0x36f74d['startProgressive']=moment()[_0x8b9a('0x96')]('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive[_0x8b9a('0x7e')](_0x36f74d[_0x8b9a('0x40')],_0x8b9a('0x1b8'),_0x36f74d['startProgressive']);this[_0x8b9a('0x14d')](_0x36f74d,0x1);}else if(ifInterval(_0x36f74d[_0x8b9a('0x1b9')],_0x36f74d[_0x8b9a('0x2b')])){this[_0x8b9a('0x14d')](_0x36f74d,0x1);loggerPredictiveCalls[_0x8b9a('0x7e')](_0x8b9a('0x1ba'),_0x36f74d[_0x8b9a('0x2b')],_0x36f74d[_0x8b9a('0x40')]);_0x36f74d[_0x8b9a('0x71')]=0x0;_0x36f74d[_0x8b9a('0x6b')]=0x0;}else if(_0x1e26fe<_0x1e3952&&_0x36f74d[_0x8b9a('0x1bb')]==='dropRate'){freeVariablesPredictive(_0x36f74d);loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x1bc'),'Dropped\x20calls\x20day',_0x1e3952,_0x8b9a('0x2b'),_0x36f74d[_0x8b9a('0x40')]);}else if(_0x4e467e<_0x36f74d[_0x8b9a('0x6b')]&&_0x36f74d[_0x8b9a('0x1bb')]==='dropRate'){freeVariablesPredictive(_0x36f74d);loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x1bd'),_0x8b9a('0x1be'),_0x4e467e,'Drop\x20in\x20this\x20interval',_0x36f74d[_0x8b9a('0x6b')],'startProgressive',_0x36f74d[_0x8b9a('0x40')]);}else if(!ifInterval(_0x36f74d[_0x8b9a('0x1b9')],_0x36f74d[_0x8b9a('0x2b')])&&_[_0x8b9a('0x86')](_0x36f74d['startPredictive'])&&!_['isUndefined'](_0x36f74d[_0x8b9a('0x2b')])){_0x36f74d[_0x8b9a('0x75')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive['info'](_0x36f74d[_0x8b9a('0x40')],_0x8b9a('0x1bf'),_0x36f74d[_0x8b9a('0x75')]);this['averageHandleTime'](_0x36f74d[_0x8b9a('0x1b9')])[_0x8b9a('0xbb')](this[_0x8b9a('0x1c0')](_0x36f74d))[_0x8b9a('0xbb')](mergeDataErlangB(_0x36f74d))[_0x8b9a('0xbb')](this[_0x8b9a('0x1c1')](_0x36f74d))['catch'](loggerCatchPredictive(_0x8b9a('0x1c2'),_0x36f74d));}else if(!ifInterval(_0x36f74d['dialPredictiveInterval'],_0x36f74d['startPredictive'])){_0x36f74d[_0x8b9a('0x6b')]=0x0;_0x36f74d[_0x8b9a('0x75')]=moment()[_0x8b9a('0x96')](_0x8b9a('0xfa'));loggerPredictive['info'](_0x36f74d[_0x8b9a('0x40')],'recalculate\x20predictive\x20at',_0x36f74d[_0x8b9a('0x75')]);clearInterval(_0x36f74d[_0x8b9a('0x93')]);_0x36f74d[_0x8b9a('0x93')]=undefined;this[_0x8b9a('0xbe')](_0x36f74d['dialPredictiveInterval'])[_0x8b9a('0xbb')](this[_0x8b9a('0x1c0')](_0x36f74d))[_0x8b9a('0xbb')](mergeDataErlangB(_0x36f74d))[_0x8b9a('0xbb')](this['startMethodPredictive'](_0x36f74d))[_0x8b9a('0xb6')](loggerCatchPredictive(_0x8b9a('0x1c3'),_0x36f74d));}else if(_0x36f74d[_0x8b9a('0x6e')]&&_0x2d3e99<_0x36f74d['predictiveIntervalAvailable']-_0x211f27){freeVariablesPredictive(_0x36f74d);loggerPredictive['info'](_0x36f74d[_0x8b9a('0x40')],_0x8b9a('0x1c4'),_0x2d3e99,')\x20are\x20less\x20than\x20threshold\x20(',_0x36f74d[_0x8b9a('0x6e')],'-',_0x211f27,'=',_0x36f74d[_0x8b9a('0x6e')]-_0x211f27,')');}else if(_0x36f74d[_0x8b9a('0x6e')]&&_0x2d3e99>_0x36f74d[_0x8b9a('0x6e')]+_0xe94a9d){freeVariablesPredictive(_0x36f74d);loggerPredictive[_0x8b9a('0x7e')](_0x36f74d[_0x8b9a('0x40')],_0x8b9a('0x1c4'),_0x2d3e99,_0x8b9a('0x1c5'),_0x36f74d[_0x8b9a('0x6e')],'+',_0xe94a9d,'=',_0x36f74d[_0x8b9a('0x6e')]+_0xe94a9d,')');}};Dialer[_0x8b9a('0x1d')][_0x8b9a('0x1c0')]=function(_0x103fbc){var _0x5a4777=this;return function(_0x184476){return new BPromise(function(_0x21132d,_0x2dd4e){_['merge'](_0x103fbc,_0x184476[0x0]);if(checkGetDataPredictive(_0x184476[0x0])){var _0x5a7de8=_0x103fbc[_0x8b9a('0x6e')]=_0x103fbc[_0x8b9a('0x55')]+_0x103fbc[_0x8b9a('0x51')];var _0x51e061=_0x103fbc['dialPredictiveInterval']*0x3c;var _0x222090=_0x184476[0x0][_0x8b9a('0x87')]+_0x184476[0x0][_0x8b9a('0x68')];var _0xa300f=(_0x184476[0x0][_0x8b9a('0x67')]+_0x184476[0x0][_0x8b9a('0x6a')]+_0x184476[0x0][_0x8b9a('0x69')])/_0x184476[0x0][_0x8b9a('0x6f')];_0x103fbc['predictiveIntervalHitRate']=_0xa300f>0x0?_0xa300f:0x1;switch(_0x103fbc[_0x8b9a('0x1bb')]){case _0x8b9a('0x1c6'):var _0x236e8d=_0x103fbc[_0x8b9a('0x1af')]/0x64;return _0x5a4777['abandonmentRate'](_0x5a7de8,_0x51e061,_0x222090,_0xa300f,_0x236e8d)[_0x8b9a('0xbb')](function(_0x2ebabb){return _0x21132d(_0x2ebabb);});case _0x8b9a('0x1c7'):var _0xa6f54e=_0x103fbc[_0x8b9a('0x1af')]/0x64;return _0x5a4777[_0x8b9a('0x1c8')](_0x5a7de8,_0x51e061,_0x222090,_0xa300f,_0xa6f54e)[_0x8b9a('0xbb')](function(_0x2091b4){return _0x21132d(_0x2091b4);});default:return _0x2dd4e(msgResponse(_0x8b9a('0x1c9'),_0x8b9a('0x13a'),_0x8b9a('0x1ca')));}}else{return _0x2dd4e(msgResponse(_0x8b9a('0x1c9'),_0x8b9a('0x13a'),_0x8b9a('0x1cb')));}});};};Dialer[_0x8b9a('0x1d')][_0x8b9a('0x1cc')]=function(_0x25b8b9){var _0x34f7dc=this;return function(_0x454e66){return new BPromise(function(_0x9359e9,_0x52eca8){_[_0x8b9a('0x90')](_0x25b8b9,_0x454e66[0x0]);if(checkGetDataPredictive(_0x454e66[0x0])){loggerPredictive[_0x8b9a('0x7e')](JSON['stringify'](_0x454e66[0x0]));if(_0x25b8b9['dialPredictiveOptimization']==='dropRate'){return _0x34f7dc['getVoiceQueueRtPauses'](_0x25b8b9['id'])[_0x8b9a('0xbb')](function(_0x26bddd){var _0x5bd1dc=_0x25b8b9['loggedIn']-_0x26bddd[0x0][_0x8b9a('0x1cd')];var _0x2a3941=_0x25b8b9[_0x8b9a('0x1b9')]*0x3c;var _0x51ef32=_0x454e66[0x0]['predictiveIntervalAvgTalktime']+_0x454e66[0x0][_0x8b9a('0x68')];var _0x2730d1=(_0x454e66[0x0][_0x8b9a('0x67')]+_0x454e66[0x0][_0x8b9a('0x6a')]+_0x454e66[0x0][_0x8b9a('0x69')])/_0x454e66[0x0]['predictiveIntervalTotalCalls'];var _0x11c424=_0x25b8b9[_0x8b9a('0x1af')]/0x64;_0x25b8b9[_0x8b9a('0x6d')]=_0x26bddd[0x0][_0x8b9a('0x1cd')]||0x0;_0x25b8b9[_0x8b9a('0x1b4')]=_0x2730d1>0x0?_0x2730d1:0x1;return _0x34f7dc[_0x8b9a('0x1ce')](_0x5bd1dc,_0x2a3941,_0x51ef32,_0x2730d1,_0x11c424);})[_0x8b9a('0xbb')](function(_0x2b40d2){return _0x9359e9(_0x2b40d2);})[_0x8b9a('0xb6')](function(_0x592f8f){return _0x52eca8(msgResponse(_0x8b9a('0x1cf'),_0x8b9a('0x13a'),JSON[_0x8b9a('0x49')](_0x592f8f)));});}if(_0x25b8b9[_0x8b9a('0x1bb')]==='agentBusyFactor'){return _0x34f7dc[_0x8b9a('0xc6')](_0x25b8b9['id'])[_0x8b9a('0xbb')](function(_0x1f18c7){var _0x15635c=_0x25b8b9[_0x8b9a('0x153')]-_0x1f18c7[0x0]['outboundQueuePauses'];var _0x42ccd7=_0x25b8b9[_0x8b9a('0x1b9')]*0x3c;var _0x420d89=_0x454e66[0x0][_0x8b9a('0x87')]+_0x454e66[0x0][_0x8b9a('0x68')];var _0x52fd82=(_0x454e66[0x0][_0x8b9a('0x67')]+_0x454e66[0x0][_0x8b9a('0x6a')]+_0x454e66[0x0][_0x8b9a('0x69')])/_0x454e66[0x0][_0x8b9a('0x6f')];var _0x46c216=_0x25b8b9[_0x8b9a('0x1af')]/0x64;_0x25b8b9[_0x8b9a('0x6d')]=_0x1f18c7[0x0][_0x8b9a('0x1cd')]||0x0;_0x25b8b9['predictiveIntervalHitRate']=_0x52fd82>0x0?_0x52fd82:0x1;return _0x34f7dc[_0x8b9a('0x1c8')](_0x15635c,_0x42ccd7,_0x420d89,_0x52fd82,_0x46c216);})[_0x8b9a('0xbb')](function(_0xf9511c){return _0x9359e9(_0xf9511c);})[_0x8b9a('0xb6')](function(_0x1fcb29){return _0x52eca8(msgResponse(_0x8b9a('0x1cf'),_0x8b9a('0x13a'),JSON[_0x8b9a('0x49')](_0x1fcb29)));});}}else{return _0x52eca8(msgResponse(_0x8b9a('0x1c9'),_0x8b9a('0x13a'),'check\x20failure'));}});};};Dialer[_0x8b9a('0x1d')][_0x8b9a('0x1c1')]=function(_0x3003dd){var _0xfb53f1=this;return function(){var _0x3dbf38=0x0;var _0x21d363=Math['floor'](_0x3003dd[_0x8b9a('0x72')]*0x3e8);if(_0x21d363>0x0){_0x21d363=_0x21d363<0x64?0x64:_0x21d363;loggerPredictive['info'](_0x3003dd['name'],_0x8b9a('0x1d0'),_0x21d363,'milliseconds');_0x3003dd['handlePredictive']=setInterval(function(){_0xfb53f1[_0x8b9a('0x93')](_0x3003dd);loggerPredictiveCalls[_0x8b9a('0x7e')](_0x8b9a('0x1d1'),_0x3dbf38+=0x1);},_0x21d363);}else{loggerPredictive[_0x8b9a('0x7e')](_0x3003dd[_0x8b9a('0x40')],_0x8b9a('0x1d2'));}};};Dialer[_0x8b9a('0x1d')][_0x8b9a('0x1d3')]=function(_0x2afdc6,_0x12a267){var _0x4d274d=this;return function(_0x167e7d){if(_[_0x8b9a('0x46')](_0x167e7d)){if(_[_0x8b9a('0xb3')](_0x12a267[_0x8b9a('0x1d4')])||!_0x12a267[_0x8b9a('0x1d5')]){if(_0x2afdc6[_0x8b9a('0x59')]===_0x8b9a('0x14e')){_0x2afdc6['queueStatusComplete']=_[_0x8b9a('0x86')](_0x2afdc6[_0x8b9a('0x123')])?!![]:_0x2afdc6[_0x8b9a('0x123')];var _0x40dbbd=uuid['v4']();_0x4d274d['actions'][_0x40dbbd]=new Action(_0x2afdc6,_0x12a267,_0x40dbbd);loggerBooked['info'](_0x8b9a('0x1d6'),_0x40dbbd,_0x8b9a('0x1d7'),JSON['stringify'](_0x2afdc6[_0x8b9a('0x123')]),_0x8b9a('0x1d8'),_0x2afdc6[_0x8b9a('0x40')]);if(_0x2afdc6[_0x8b9a('0x123')]){_0x2afdc6[_0x8b9a('0x123')]=![];_0x4d274d[_0x8b9a('0x2d')][_0x4d274d[_0x8b9a('0xb1')][_0x40dbbd][_0x8b9a('0xb9')]]=[];ami['Action']({'actionid':_0x40dbbd,'action':_0x8b9a('0x1d9'),'queue':_0x2afdc6[_0x8b9a('0x40')]})[_0x8b9a('0xb6')](function(){_0x4d274d[_0x8b9a('0xb8')](_0x2afdc6);_0x4d274d[_0x8b9a('0xc1')]({'active':![],'ContactId':_0x4d274d['actions'][_0x40dbbd][_0x8b9a('0xfb')],'ListId':_0x4d274d[_0x8b9a('0xb1')][_0x40dbbd]['ListId'],'VoiceQueueId':_0x4d274d[_0x8b9a('0xb1')][_0x40dbbd][_0x8b9a('0x102')]||undefined,'CampaignId':_0x4d274d['actions'][_0x40dbbd][_0x8b9a('0xd3')]||undefined})[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x1da')));delete _0x4d274d[_0x8b9a('0xb1')][_0x40dbbd];});}else{loggerBooked[_0x8b9a('0x7e')](_0x8b9a('0x1db'),JSON[_0x8b9a('0x49')](_0x2afdc6[_0x8b9a('0x123')]),'Queue:\x20',_0x2afdc6[_0x8b9a('0x40')]);_0x4d274d[_0x8b9a('0xb8')](_0x2afdc6);_0x4d274d[_0x8b9a('0xc1')]({'active':![],'ContactId':_0x4d274d['actions'][_0x40dbbd][_0x8b9a('0xfb')],'ListId':_0x4d274d[_0x8b9a('0xb1')][_0x40dbbd][_0x8b9a('0xd2')],'VoiceQueueId':_0x4d274d[_0x8b9a('0xb1')][_0x40dbbd][_0x8b9a('0x102')]||undefined,'CampaignId':_0x4d274d[_0x8b9a('0xb1')][_0x40dbbd]['CampaignId']||undefined})[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x1da')));delete _0x4d274d[_0x8b9a('0xb1')][_0x40dbbd];}}else{return _0x4d274d[_0x8b9a('0x15c')](_0x2afdc6,_0x12a267);}}else{if(getDiff(_0x12a267[_0x8b9a('0x1dc')])<_0x2afdc6[_0x8b9a('0x1dd')]*0x3c){if(_0x12a267['Agent']&&!_0x12a267['Agent']['voicePause']){_0x4d274d[_0x8b9a('0x22')][_0x8b9a('0x126')](_0x12a267['id'])['finally'](function(){_0x4d274d['updateOriginated'](_0x2afdc6);});}else{_0x4d274d['unlockContact']({'active':![]},_0x12a267['id'],0x1)[_0x8b9a('0x20')](function(){_0x4d274d[_0x8b9a('0xb8')](_0x2afdc6);});}}else{_0x2afdc6[_0x8b9a('0x64')]+=0x1;_0x4d274d[_0x8b9a('0xb8')](_0x2afdc6);if(_0x2afdc6[_0x8b9a('0x1de')]){_0x4d274d['rescheduleContact']({'active':![],'recallme':![],'UserId':null,'ContactId':_0x12a267[_0x8b9a('0xfb')],'ListId':_0x12a267['ListId'],'VoiceQueueId':_0x12a267[_0x8b9a('0x102')]||undefined,'CampaignId':_0x12a267[_0x8b9a('0xd3')]||undefined})[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x1df')));_0x4d274d[_0x8b9a('0xc9')](createObjHistory(_0x2afdc6,_0x12a267,_0x8b9a('0x1e0'),0x17,_0x8b9a('0x1e1')))[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x1e2')));}else{_0x4d274d[_0x8b9a('0xd0')](createObjHistory(_0x2afdc6,_0x12a267,'RECALLFAILEDTIMEOUT',0x16,'RecallFailedTimeout'),'[Originate][HistoryRecallClose][historyCatch]',_0x8b9a('0x1e3'));}}}}else{_0x2afdc6[_0x8b9a('0x60')]+=0x1;_0x4d274d[_0x8b9a('0xd0')](createObjHistory(_0x2afdc6,_0x12a267,_0x8b9a('0x1e4'),0xd,'Blacklist'),_0x8b9a('0x1e5'),_0x8b9a('0x1e6'));throw _0x8b9a('0x1e7');}};};Dialer['prototype'][_0x8b9a('0x151')]=function(_0x425fd0){var _0x4bff75=this;var _0xaed662=_0x425fd0[_0x8b9a('0x1e8')]-_0x425fd0['originated']-_0x425fd0[_0x8b9a('0x1e9')];emitCampaignSummary(_0x425fd0);if(_0xaed662>0x0){if(_0xaed662>this[_0x8b9a('0x27')]){_0xaed662=this[_0x8b9a('0x27')];}_0x425fd0[_0x8b9a('0x1e9')]+=_0xaed662;this[_0x8b9a('0xc5')](_0x425fd0['id'],_0xaed662,_0x425fd0['dialOrderByScheduledAt'])[_0x8b9a('0xbb')](function(_0x58466e){_0x425fd0[_0x8b9a('0x1e9')]-=_0xaed662;_0x425fd0[_0x8b9a('0x1e9')]=_0x425fd0[_0x8b9a('0x1e9')]>0x0?_0x425fd0[_0x8b9a('0x1e9')]:0x0;if(!checkContactEmpty(_0x58466e)){_0x425fd0[_0x8b9a('0x41')]=_0x8b9a('0xa4');logger['info']('[getContactCampaign2][Empty]'+_0x425fd0[_0x8b9a('0x40')]);}else{_0x425fd0[_0x8b9a('0x70')]+=_0x58466e[_0x8b9a('0x9c')];_0x425fd0['message']='RUNNING';for(var _0x5780f0=0x0;_0x5780f0<_0x58466e[_0x8b9a('0x9c')];_0x5780f0+=0x1){_0x425fd0[_0x8b9a('0x1ea')]+=0x1;if(_[_0x8b9a('0xb3')](_0x58466e[_0x5780f0])||_[_0x8b9a('0xb3')](_0x58466e[_0x5780f0][_0x8b9a('0x15f')])||_[_0x8b9a('0xb3')](_0x58466e[_0x5780f0][_0x8b9a('0x15f')][_0x8b9a('0x160')])){_0x4bff75[_0x8b9a('0xce')](_0x8b9a('0x1eb'),_0x425fd0,_0x58466e[_0x5780f0]);}else{_0x4bff75[_0x8b9a('0xbd')](_[_0x8b9a('0xd1')](_0x58466e[_0x5780f0],[_0x8b9a('0xd3'),_0x8b9a('0x1ec')]))[_0x8b9a('0xbb')](_0x4bff75['checkContactBlack'](_0x425fd0,_0x58466e[_0x5780f0]))[_0x8b9a('0xb6')](_0x4bff75[_0x8b9a('0xcd')](_0x8b9a('0x1ed'),_0x425fd0));}}}})[_0x8b9a('0xb6')](loggerGetContactDialer(_0x8b9a('0x1ee'),_0x425fd0,_0xaed662));}};Dialer[_0x8b9a('0x1d')][_0x8b9a('0x14d')]=function(_0x1f8087,_0x2b9eaa){var _0x49f071=this;var _0x39d484=[];var _0x412cce=_0x2b9eaa>=0x1?_0x2b9eaa:0x1;if(_0x1f8087[_0x8b9a('0x59')]===_0x8b9a('0x14e')){_0x412cce=0x1;}var _0x108a08=Math['floor'](_0x1f8087[_0x8b9a('0x51')]*_0x412cce)-_0x1f8087[_0x8b9a('0x70')]-_0x1f8087['temp'];emitVoiceQueueSummary(_0x1f8087);if(_0x1f8087[_0x8b9a('0x1ef')]>0x0){var _0x589d01=_0x1f8087[_0x8b9a('0x1ef')]-_0x1f8087[_0x8b9a('0x70')]-_0x1f8087[_0x8b9a('0x55')]-_0x1f8087[_0x8b9a('0x1e9')]-_0x1f8087[_0x8b9a('0x52')];if(_0x108a08>_0x589d01){_0x108a08=_0x589d01;}}if(_0x108a08>0x0){if(_0x1f8087[_0x8b9a('0x59')]===_0x8b9a('0x14e')){_0x108a08=0x1;}if(_0x108a08>this[_0x8b9a('0x27')]){_0x108a08=this[_0x8b9a('0x27')];}_0x1f8087[_0x8b9a('0x1e9')]+=_0x108a08;for(var _0xe1855a in this[_0x8b9a('0x25')]){if(typeof this[_0x8b9a('0x25')][_0xe1855a]!==_0x8b9a('0x9d')){if(this[_0x8b9a('0x25')][_0xe1855a]['state']===_0x8b9a('0x1f0')&&this['agents'][_0xe1855a]['status']==='reachable'){_0x39d484['push'](this[_0x8b9a('0x25')][_0xe1855a]['id']);}}}this[_0x8b9a('0xc3')](_0x1f8087['id'],_0x39d484,_0x108a08,_0x1f8087['dialOrderByScheduledAt'])['then'](function(_0x7c11e6){_0x1f8087[_0x8b9a('0x1e9')]-=_0x108a08;_0x1f8087[_0x8b9a('0x1e9')]=_0x1f8087[_0x8b9a('0x1e9')]>0x0?_0x1f8087[_0x8b9a('0x1e9')]:0x0;if(!checkContactEmpty(_0x7c11e6)){_0x49f071[_0x8b9a('0x1f1')](_0x1f8087)[_0x8b9a('0xbb')](sendMessageReschedule(_0x1f8087))['catch'](loggerCatch(_0x8b9a('0x1f2')));}else{_0x1f8087['originated']+=_0x7c11e6[_0x8b9a('0x9c')];_0x1f8087['message']=_0x1f8087['dialMethod']===_0x8b9a('0x14e')?_0x8b9a('0x1f3'):_0x8b9a('0x1f4');for(var _0x19f847=0x0;_0x19f847<_0x7c11e6[_0x8b9a('0x9c')];_0x19f847+=0x1){if(_['isNil'](_0x7c11e6[_0x19f847])||_[_0x8b9a('0xb3')](_0x7c11e6[_0x19f847][_0x8b9a('0x15f')])||_[_0x8b9a('0xb3')](_0x7c11e6[_0x19f847]['Contact']['phone'])){_0x49f071[_0x8b9a('0xce')](_0x8b9a('0x1eb'),_0x1f8087,_0x7c11e6[_0x19f847]);}else{_0x49f071[_0x8b9a('0xbc')](_['pick'](_0x7c11e6[_0x19f847],[_0x8b9a('0x102'),_0x8b9a('0x1ec')]))[_0x8b9a('0xbb')](_0x49f071[_0x8b9a('0x1d3')](_0x1f8087,_0x7c11e6[_0x19f847]))['catch'](_0x49f071[_0x8b9a('0xcd')](_0x8b9a('0x1eb'),_0x1f8087));}}}})[_0x8b9a('0xb6')](loggerGetContactDialer('[getContactDialer2]',_0x1f8087,_0x108a08));}};Dialer['prototype'][_0x8b9a('0x93')]=function(_0x3321f0){if(_0x3321f0[_0x8b9a('0x1ef')]>0x0){var _0x2d4e26=_0x3321f0[_0x8b9a('0x1ef')]-_0x3321f0[_0x8b9a('0x70')]-_0x3321f0[_0x8b9a('0x55')];if(_0x2d4e26>0x0){this['tryOriginatePredictive'](_0x3321f0);}else{loggerPredictiveCalls[_0x8b9a('0x7e')](_0x8b9a('0x1f5'));}}else{this[_0x8b9a('0x1f6')](_0x3321f0);}};Dialer['prototype'][_0x8b9a('0x1f6')]=function(_0x569e3b){var _0x52911e=this;var _0x19c8a1=[];_0x569e3b[_0x8b9a('0x70')]+=0x1;for(var _0x16f731 in this[_0x8b9a('0x25')]){if(typeof this[_0x8b9a('0x25')][_0x16f731]!==_0x8b9a('0x9d')){if(this[_0x8b9a('0x25')][_0x16f731]['state']==='not_inuse'&&this[_0x8b9a('0x25')][_0x16f731][_0x8b9a('0xb5')]===_0x8b9a('0xd9')){_0x19c8a1[_0x8b9a('0x121')](this[_0x8b9a('0x25')][_0x16f731]['id']);}}}this[_0x8b9a('0xc3')](_0x569e3b['id'],_0x19c8a1,0x1,_0x569e3b[_0x8b9a('0x1f7')])[_0x8b9a('0xbb')](function(_0x95afcf){if(!checkContactEmpty(_0x95afcf)){checkContactLowerLimitOriginate(_0x569e3b,0x1,0x0);_0x52911e[_0x8b9a('0x1f1')](_0x569e3b)[_0x8b9a('0xbb')](sendMessageReschedule(_0x569e3b))[_0x8b9a('0xb6')](loggerCatch(_0x8b9a('0x1f2')));}else{_0x569e3b[_0x8b9a('0x41')]=_0x8b9a('0x1f4');if(_[_0x8b9a('0xb3')](_0x95afcf[0x0])||_['isNil'](_0x95afcf[0x0]['Contact'])||_[_0x8b9a('0xb3')](_0x95afcf[0x0][_0x8b9a('0x15f')][_0x8b9a('0x160')])){_0x52911e['emptyContact'](_0x8b9a('0x1eb'),_0x569e3b,_0x95afcf[0x0]);}else{_0x52911e[_0x8b9a('0xbc')](_[_0x8b9a('0xd1')](_0x95afcf[0x0],['VoiceQueueId',_0x8b9a('0x1ec')]))[_0x8b9a('0xbb')](_0x52911e[_0x8b9a('0x1d3')](_0x569e3b,_0x95afcf[0x0]))[_0x8b9a('0xb6')](_0x52911e[_0x8b9a('0xcd')](_0x8b9a('0x1f8'),_0x569e3b));}}})[_0x8b9a('0xb6')](loggerGetContactDialer(_0x8b9a('0x1f9'),_0x569e3b,0x1));emitVoiceQueueSummary(_0x569e3b);};Dialer['prototype'][_0x8b9a('0x1ce')]=function(_0x95d6b6,_0x5ed152,_0x5d8232,_0x4deb90,_0x2cdf3b,_0x49ea18){loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x1fa'));loggerPredictive['info'](_0x8b9a('0x1fb'),_0x95d6b6);loggerPredictive['info']('Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x5ed152);loggerPredictive['info']('Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x5d8232);loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x1fc'),_0x4deb90);loggerPredictive[_0x8b9a('0x7e')]('Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x2cdf3b);loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x85'));return new BPromise(function(_0x701bd7,_0x328fbc){if(_0x95d6b6<=0x0||isNaN(_0x95d6b6)){return _0x328fbc(msgResponse(_0x8b9a('0x1fd'),_0x8b9a('0x17d'),_0x8b9a('0x1fe')+_0x95d6b6));}if(_0x5d8232<=0x0||isNaN(_0x5d8232)){return _0x328fbc(msgResponse(_0x8b9a('0x1fd'),_0x8b9a('0x17d'),_0x8b9a('0x1ff')+_0x5d8232));}if(_0x4deb90<=0x0||isNaN(_0x4deb90)){return _0x328fbc(msgResponse(_0x8b9a('0x1fd'),'Error',_0x8b9a('0x200')+_0x4deb90));}if(_0x5ed152<=0x0||isNaN(_0x5ed152)){return _0x328fbc(msgResponse(_0x8b9a('0x1fd'),_0x8b9a('0x17d'),_0x8b9a('0x201')+_0x5ed152));}if(_0x2cdf3b<=0x0||isNaN(_0x2cdf3b)){return _0x328fbc(msgResponse('[abandonmentRate]',_0x8b9a('0x17d'),'Amax\x20=\x20'+_0x2cdf3b));}_0x49ea18=_0x49ea18||0x0;var _0x501279=0x1/_0x5d8232;var _0x33f075=0x0;var _0x33fef2=0x0;var _0x208405=0x0;var _0x23f972=0x0;for(var _0x272c0a=0x0;_0x208405<_0x2cdf3b;_0x272c0a+=0x1){_0x33fef2=_0x272c0a/_0x5ed152;_0x33f075=(_0x4deb90*_0x33fef2+_0x49ea18)/_0x501279;_0x208405=erlangb(_0x33f075,_0x95d6b6);_0x23f972=_0x33f075/_0x95d6b6*(0x1-erlangb(_0x33f075,_0x95d6b6));}return _0x701bd7({'erlangCalls':_0x272c0a,'erlangCallToSecond':_0x5ed152/_0x272c0a,'erlangAbandonmentRate':_0x208405,'erlangBusyFactor':_0x23f972});});};Dialer[_0x8b9a('0x1d')][_0x8b9a('0x1c8')]=function(_0x1483d2,_0x370135,_0x5355ad,_0x2fe1b2,_0x11874d,_0x39b182){loggerPredictive['info'](_0x8b9a('0x202'));loggerPredictive['info'](_0x8b9a('0x1fb'),_0x1483d2);loggerPredictive['info'](_0x8b9a('0x203'),_0x370135);loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x204'),_0x5355ad);loggerPredictive[_0x8b9a('0x7e')]('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',_0x2fe1b2);loggerPredictive['info'](_0x8b9a('0x205'),_0x11874d);loggerPredictive[_0x8b9a('0x7e')](_0x8b9a('0x85'));return new BPromise(function(_0x4cdc36,_0x5298c8){if(_0x1483d2<=0x0||isNaN(_0x1483d2)){return _0x5298c8(msgResponse('[busyFactor]',_0x8b9a('0x17d'),_0x8b9a('0x1fe')+_0x1483d2));}if(_0x5355ad<=0x0||isNaN(_0x5355ad)){return _0x5298c8(msgResponse(_0x8b9a('0x206'),_0x8b9a('0x17d'),_0x8b9a('0x1ff')+_0x5355ad));}if(_0x2fe1b2<=0x0||isNaN(_0x2fe1b2)){return _0x5298c8(msgResponse(_0x8b9a('0x206'),_0x8b9a('0x17d'),_0x8b9a('0x200')+_0x2fe1b2));}if(_0x370135<=0x0||isNaN(_0x370135)){return _0x5298c8(msgResponse(_0x8b9a('0x206'),_0x8b9a('0x17d'),_0x8b9a('0x201')+_0x370135));}if(_0x11874d<=0x0||isNaN(_0x11874d)){return _0x5298c8(msgResponse(_0x8b9a('0x206'),_0x8b9a('0x17d'),_0x8b9a('0x207')+_0x11874d));}_0x39b182=_0x39b182||0x0;var _0x2e1f9e=0x1/_0x5355ad;var _0x550224=0x0;var _0x379215=0x0;var _0xc3ff9e=0x0;var _0x3fc453=0x0;for(var _0xc50fae=0x0;_0x3fc453<_0x11874d;_0xc50fae+=0x1){_0x379215=_0xc50fae/_0x370135;_0x550224=(_0x2fe1b2*_0x379215+_0x39b182)/_0x2e1f9e;_0xc3ff9e=erlangb(_0x550224,_0x1483d2);_0x3fc453=_0x550224/_0x1483d2*(0x1-erlangb(_0x550224,_0x1483d2));}return _0x4cdc36({'erlangCalls':_0xc50fae,'erlangCallToSecond':_0x370135/_0xc50fae,'erlangAbandonmentRate':_0xc3ff9e,'erlangBusyFactor':_0x3fc453});});};module[_0x8b9a('0x208')]=Dialer;
\ No newline at end of file