X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fservices%2Fami%2Freport%2FvoiceQueueReport.js;h=d42a50988a26f5181386c2de2aabf90c26955555;hb=3b6ec49862a5197d06e7453a43d40dcd68709ea0;hp=a2d2223c9fc70bd8aa42dbd03c12736de55c09bf;hpb=ed368fdfe923471c0749d5720e7df57649e4ed09;p=motion2.git diff --git a/server/services/ami/report/voiceQueueReport.js b/server/services/ami/report/voiceQueueReport.js index a2d2223..d42a509 100644 --- a/server/services/ami/report/voiceQueueReport.js +++ b/server/services/ami/report/voiceQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4e34=['channels','switch','isNil','Action','status','channel','catch','No\x20such\x20channel','error','inspect','[%s][voiceQueueReport][checkQueueReport]','[%s][voiceQueueReport][checkVariables]','[FullyBooted]\x20clear\x20realtime','clearQueueReport','emitVoiceQueueChannelRemove','emit','emitVoiceQueueChannelSave','debug','[%s][voiceQueueReport][',']\x20sending\x20voice_queue_channel:save\x20event:','uniqueid','voice:queue:%s','name','voice_queue_channel:save','voice_queue_channel:remove','type','inbound','strategy','answered','available','loggedIn','sumDuration','sumHoldTime','unmanaged','abandoned','Trunk','active','callerid','Interval','stringify','[voiceQueueReport][',']\x20sending\x20voice_queue:save\x20event:','format','voice_queue:save','isNotNull','isUndefined','queues','[voiceQueueReport][queues]','then','[voiceQueueReport][queuesummary]','queue','[voiceQueueReport][queuesummary]\x20event:','[voiceQueueReport][queuesummary]\x20name:%s','toNumber','talking','loggedin','[voiceQueueReport][queuesummarycomplete]\x20event:','[%s][voiceQueueReport][queuecallerjoin]','position','count','routealias','info','[voiceQueueReport][queuecallerjoin]\x20name:%s\x20type:%s','merge','pick','keys','queuecallerjoin','last','queuecallercomplete','queuecallercompleteAt','holdtime','originalposition','queuecallerabandonAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexitreason','ABANDONED','lastAssignedTo','[%s][voiceQueueReport][queuecallerabandon]','queuecallerleaveAt','connectedlinenum','connectedlinename','[voiceQueueReport][queuecallerleave]\x20name:%s\x20type:%s\x20connectedlinenum:%s\x20connectedlinename:%s','[%s][voiceQueueReport][queuecallerleave]','COMPLETEDBYAGENT','[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT','[%s][voiceQueueReport][agentconnect]','assigned','membername','queuecallerexit','queuecallerexitAt','transfer','reason','COMPLETED','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETED','startsWith','toLowerCase','linkedid','queuecallerjoinAt','add','seconds','FORWARDTRANSFER','transfertype','FORWARD','transferexten','transferuniqueid','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:FORWARDTRANSFER','COMPLETEDBY','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:%s','[%s][voiceQueueReport][agentcomplete]','[%s][voiceQueueReport][varset]','addVariable','variable','value','queuestatus','CONTINUE','TIMEOUT','lastevent','timeout','varset','queueposition','EXITWITHKEY','[%s][voiceQueueReport][varset]\x20name:%s\x20type:%s\x20variable:%s\x20value:%s','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','bridgepeer','bridgepvtcallid','membercalls','memberlastcall','memberrealtime','syncHangup','diff','milliseconds','[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerunmanaged\x20event:','[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerabandon\x20event:','custom:queuecallerabandon','[%s][voiceQueueReport][hangup]\x20name:%s\x20type:%s\x20reason:%s','cause-txt','[%s][voiceQueueReport][hangup]\x20sending\x20voiceQueueReport\x20event:','custom:voiceQueueReport','[%s][voiceQueueReport][hangup]','syncAttendedTransfer','[%s][voiceQueueReport][attendedtransfer]','transfereeuniqueid','secondtransfererexten','secondtransfereruniqueid','ATTENDED','[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','transfertargetuniqueid','origtransfererexten','origtransfereruniqueid','ATTENDEDTRANSFER','syncBlindTransfer','[%s][voiceQueueReport][blindtransfer]','BLIND','[%s][voiceQueueReport][blindTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','context','transfererchannel','[%s][voiceQueueReport][musiconholdstart]','mohstarttime','[%s][voiceQueueReport][musiconholdstart]\x20mohstarttime:%s','[%s][voiceQueueReport][musiconholdstop]','mohtime','[%s][voiceQueueReport][musiconholdstop]\x20mohtime:%s','[%s][voiceQueueReport][newexten]\x20event:','application','set','applicationdata','appdata','CDR(routeAlias)','cdr(','[%s][voiceQueueReport][newexten]\x20application:%s\x20appdata:%s','split','match','[%s][voiceQueueReport][newexten]','exports','util','md5','../../../config/logger','../ami','../model/queueReport','redis','localhost','socket.io-emitter','prototype','enqueue','tail','finally','queueReports','agents','queueChannels','voiceQueues','flagQueueSummary','campaigns','variables','queuesummary','syncQueueSummary','bind','queuesummarycomplete','syncQueueSummaryComplete','syncQueueCallerJoin','queuecallerabandon','syncQueueCallerAbandon','queuecallerleave','syncQueueCallerLeave','agentcomplete','syncAgentComplete','agentconnect','syncAgentConnect','syncVarSet','hangup','fullybooted','syncFullyBooted','newexten','syncNewExten','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','attendedtransfer','blindtransfer','loopQueueSummary','loopQueueShow','hasOwnProperty','isEmpty','originated','pTalking','waiting','queueStatusComplete','unlockRR','clearZombieChannels'];(function(_0x1dd41d,_0x159aa3){var _0x566752=function(_0xfd530f){while(--_0xfd530f){_0x1dd41d['push'](_0x1dd41d['shift']());}};_0x566752(++_0x159aa3);}(_0x4e34,0x19e));var _0x44e3=function(_0x5dfed6,_0x15bbc3){_0x5dfed6=_0x5dfed6-0x0;var _0x1d5f31=_0x4e34[_0x5dfed6];return _0x1d5f31;};'use strict';var _=require('lodash');var moment=require('moment');var util=require(_0x44e3('0x0'));var md5=require(_0x44e3('0x1'));var Redis=require('ioredis');var config=require('../../../config/environment');var logger=require(_0x44e3('0x2'))('ami');var ami=require(_0x44e3('0x3'));var QueueReport=require(_0x44e3('0x4'));config[_0x44e3('0x5')]=_['defaults'](config['redis'],{'host':_0x44e3('0x6'),'port':0x18eb});var io=require(_0x44e3('0x7'))(new Redis(config[_0x44e3('0x5')]));var Sequence=function(){};Sequence[_0x44e3('0x8')][_0x44e3('0x9')]=function(_0x196941){this[_0x44e3('0xa')]=this['tail']?this[_0x44e3('0xa')][_0x44e3('0xb')](_0x196941):_0x196941();};function VoiceQueueReport(_0x4eb230){this['sequence']=new Sequence();this[_0x44e3('0xc')]={};this[_0x44e3('0xd')]=_0x4eb230['agents'];this['channels']=_0x4eb230[_0x44e3('0xe')];this[_0x44e3('0xf')]=_0x4eb230[_0x44e3('0xf')];this[_0x44e3('0x10')]=!![];this['campaigns']=_0x4eb230[_0x44e3('0x11')];this[_0x44e3('0x12')]={};ami['on'](_0x44e3('0x13'),this[_0x44e3('0x14')][_0x44e3('0x15')](this));ami['on'](_0x44e3('0x16'),this[_0x44e3('0x17')][_0x44e3('0x15')](this));ami['on']('queuecallerjoin',this[_0x44e3('0x18')]['bind'](this));ami['on'](_0x44e3('0x19'),this[_0x44e3('0x1a')]['bind'](this));ami['on'](_0x44e3('0x1b'),this[_0x44e3('0x1c')][_0x44e3('0x15')](this));ami['on'](_0x44e3('0x1d'),this[_0x44e3('0x1e')][_0x44e3('0x15')](this));ami['on'](_0x44e3('0x1f'),this[_0x44e3('0x20')][_0x44e3('0x15')](this));ami['on']('varset',this[_0x44e3('0x21')]['bind'](this));ami['on'](_0x44e3('0x22'),this['syncHangup'][_0x44e3('0x15')](this));ami['on'](_0x44e3('0x23'),this[_0x44e3('0x24')][_0x44e3('0x15')](this));ami['on'](_0x44e3('0x25'),this[_0x44e3('0x26')][_0x44e3('0x15')](this));ami['on'](_0x44e3('0x27'),this[_0x44e3('0x28')][_0x44e3('0x15')](this));ami['on'](_0x44e3('0x29'),this['syncMusicOnHoldStop']['bind'](this));ami['on'](_0x44e3('0x2a'),this['syncAttendedTransfer'][_0x44e3('0x15')](this));ami['on'](_0x44e3('0x2b'),this['syncBlindTransfer'][_0x44e3('0x15')](this));this[_0x44e3('0x2c')]();this[_0x44e3('0x2d')]();}function clearChannels(_0x3f620a){if(!_['isEmpty'](_0x3f620a)){for(var _0x3787c8 in _0x3f620a){if(_0x3f620a[_0x44e3('0x2e')](_0x3787c8)){delete _0x3f620a[_0x3787c8];}}}}function clearCampaigns(_0x574e04){if(!_[_0x44e3('0x2f')](_0x574e04)){for(var _0x22b788 in _0x574e04){if(_0x574e04[_0x44e3('0x2e')](_0x22b788)){_0x574e04[_0x22b788][_0x44e3('0x30')]=0x0;}}}}function clearVoiceQueues(_0x5f361e){if(!_['isEmpty'](_0x5f361e)){for(var _0xe9043f in _0x5f361e){if(_0x5f361e[_0x44e3('0x2e')](_0xe9043f)){_0x5f361e[_0xe9043f][_0x44e3('0x30')]=0x0;_0x5f361e[_0xe9043f]['talking']=0x0;_0x5f361e[_0xe9043f][_0x44e3('0x31')]=0x0;_0x5f361e[_0xe9043f][_0x44e3('0x32')]=0x0;_0x5f361e[_0xe9043f][_0x44e3('0x33')]=!![];}}}}function clearAgentBooked(_0x3659af){if(!_[_0x44e3('0x2f')](_0x3659af)){for(var _0x36ed4d in _0x3659af){if(_0x3659af[_0x44e3('0x2e')](_0x36ed4d)){_0x3659af[_0x36ed4d][_0x44e3('0x34')]=!![];}}}}VoiceQueueReport[_0x44e3('0x8')][_0x44e3('0x35')]=function(){var _0x4b1bd8=this;for(var _0x44dee2 in this[_0x44e3('0x36')]){if(this[_0x44e3('0x36')][_0x44e3('0x2e')](_0x44dee2)&&!this[_0x44e3('0x36')][_0x44dee2][_0x44e3('0x37')]){this['sequence'][_0x44e3('0x9')](function(){if(!_[_0x44e3('0x38')](_0x4b1bd8['channels'][_0x44dee2])){return ami[_0x44e3('0x39')]({'action':_0x44e3('0x3a'),'channel':_0x4b1bd8['channels'][_0x44dee2][_0x44e3('0x3b')]})[_0x44e3('0x3c')](function(_0x38eb34){if(_0x38eb34['message']===_0x44e3('0x3d')){setTimeout(function(){if(_0x4b1bd8[_0x44e3('0x36')][_0x44dee2]){delete _0x4b1bd8[_0x44e3('0x36')][_0x44dee2];logger[_0x44e3('0x3e')]('[%s][voiceQueueReport][checkChannel]',_0x44dee2,util[_0x44e3('0x3f')](_0x38eb34,{'showHidden':![],'depth':null}));}if(_0x4b1bd8['queueReports'][_0x44dee2]){delete _0x4b1bd8[_0x44e3('0xc')][_0x44dee2];logger[_0x44e3('0x3e')](_0x44e3('0x40'),_0x44dee2,util[_0x44e3('0x3f')](_0x38eb34,{'showHidden':![],'depth':null}));}if(_0x4b1bd8[_0x44e3('0x12')][_0x44dee2]){delete _0x4b1bd8['variables'][_0x44dee2];logger[_0x44e3('0x3e')](_0x44e3('0x41'),_0x44dee2,util[_0x44e3('0x3f')](_0x38eb34,{'showHidden':![],'depth':null}));}},0x1f40);}});}});}}};VoiceQueueReport[_0x44e3('0x8')][_0x44e3('0x24')]=function(){logger[_0x44e3('0x3e')](_0x44e3('0x42'));clearChannels(this[_0x44e3('0x36')]);this['clearQueueReport'](this[_0x44e3('0xc')]);clearAgentBooked(this['agents']);clearVoiceQueues(this[_0x44e3('0xf')]);clearCampaigns(this[_0x44e3('0x11')]);};VoiceQueueReport[_0x44e3('0x8')][_0x44e3('0x43')]=function(_0x5c3b4f){var _0x6d78f8=this;if(!_[_0x44e3('0x2f')](_0x5c3b4f)){for(var _0x4bd7ac in _0x5c3b4f){if(_0x5c3b4f[_0x44e3('0x2e')](_0x4bd7ac)){_0x6d78f8[_0x44e3('0x44')](_0x5c3b4f[_0x4bd7ac],'clearqueuereport');delete _0x5c3b4f[_0x4bd7ac];}}}};VoiceQueueReport[_0x44e3('0x8')]['emit']=function(_0x28b628,_0x29d0fb,_0x5ee394){io['to'](_0x28b628)[_0x44e3('0x45')](_0x29d0fb,_0x5ee394);};VoiceQueueReport[_0x44e3('0x8')][_0x44e3('0x46')]=function(_0x4ce979,_0xb75e47){logger[_0x44e3('0x47')](_0x44e3('0x48')+_0xb75e47+_0x44e3('0x49'),_0x4ce979[_0x44e3('0x4a')],util['inspect'](_0x4ce979,{'showHidden':![],'depth':null}));this['emit'](util['format'](_0x44e3('0x4b'),_0x4ce979[_0x44e3('0x4c')]),_0x44e3('0x4d'),_0x4ce979);io[_0x44e3('0x45')]('voice_queue_presence:save',_0x4ce979);};VoiceQueueReport[_0x44e3('0x8')][_0x44e3('0x44')]=function(_0x3b5615,_0x4df091){logger[_0x44e3('0x47')](_0x44e3('0x48')+_0x4df091+']\x20sending\x20voice_queue_channel:remove\x20event:',_0x3b5615['uniqueid'],util[_0x44e3('0x3f')](_0x3b5615,{'showHidden':![],'depth':null}));this['emit'](util['format'](_0x44e3('0x4b'),_0x3b5615[_0x44e3('0x4c')]),_0x44e3('0x4e'),_0x3b5615);io[_0x44e3('0x45')]('voice_queue_presence:remove',_0x3b5615);};VoiceQueueReport['prototype']['emitVoiceQueueSummary']=function(_0x44dbae,_0x26484e){if(_0x44dbae[_0x44e3('0x4f')]===_0x44e3('0x50')){var _0x1288de={'id':_0x44dbae['id'],'name':_0x44dbae[_0x44e3('0x4c')],'strategy':_0x44dbae[_0x44e3('0x51')],'answered':_0x44dbae[_0x44e3('0x52')],'available':_0x44dbae[_0x44e3('0x53')],'loggedIn':_0x44dbae[_0x44e3('0x54')],'pTalking':_0x44dbae[_0x44e3('0x31')],'sumBillable':_0x44dbae['sumBillable'],'sumDuration':_0x44dbae[_0x44e3('0x55')],'sumHoldTime':_0x44dbae[_0x44e3('0x56')]||0x0,'talking':_0x44dbae['talking'],'total':_0x44dbae['total'],'type':_0x44dbae[_0x44e3('0x4f')],'unmanaged':_0x44dbae[_0x44e3('0x57')],'abandoned':_0x44dbae[_0x44e3('0x58')],'waiting':_0x44dbae['waiting']};if(_0x44dbae[_0x44e3('0x59')]){_0x1288de[_0x44e3('0x59')]={'id':_0x44dbae[_0x44e3('0x59')]['id'],'name':_0x44dbae[_0x44e3('0x59')][_0x44e3('0x4c')],'active':_0x44dbae[_0x44e3('0x59')][_0x44e3('0x5a')],'callerid':_0x44dbae['Trunk'][_0x44e3('0x5b')]};}if(_0x44dbae[_0x44e3('0x5c')]){_0x1288de['Interval']={'id':_0x44dbae['Interval']['id'],'name':_0x44dbae[_0x44e3('0x5c')][_0x44e3('0x4c')]};}var _0x4af225=md5(JSON[_0x44e3('0x5d')](_0x1288de));if(_0x44dbae[_0x44e3('0x1')]!==_0x4af225){_0x44dbae[_0x44e3('0x1')]=_0x4af225;logger[_0x44e3('0x47')](_0x44e3('0x5e')+_0x26484e+_0x44e3('0x5f'),util['inspect'](_0x1288de,{'showHidden':![],'depth':null}));this[_0x44e3('0x45')](util[_0x44e3('0x60')](_0x44e3('0x4b'),_0x1288de[_0x44e3('0x4c')]),_0x44e3('0x61'),_0x1288de);}}};VoiceQueueReport[_0x44e3('0x8')][_0x44e3('0x62')]=function(_0x49994b){return _0x49994b!==null&&!_[_0x44e3('0x63')](_0x49994b);};VoiceQueueReport['prototype'][_0x44e3('0x2d')]=function(){var _0x2ac352=this;setInterval(function(){_0x2ac352[_0x44e3('0x35')]();ami[_0x44e3('0x39')]({'action':_0x44e3('0x64')})[_0x44e3('0x3c')](function(_0x42ef05){logger['error'](_0x44e3('0x65'),util[_0x44e3('0x3f')](_0x42ef05,{'showHidden':![],'depth':null}));});},0x2710);};VoiceQueueReport[_0x44e3('0x8')][_0x44e3('0x2c')]=function(){var _0xb63748=this;setInterval(function(){if(_0xb63748['flagQueueSummary']){return ami['Action']({'action':_0x44e3('0x13')})[_0x44e3('0x66')](function(_0x224d85){_0xb63748[_0x44e3('0x10')]=![];})['catch'](function(_0x124f3e){logger['error'](_0x44e3('0x67'),util[_0x44e3('0x3f')](_0x124f3e,{'showHidden':![],'depth':null}));});}},0x3e8);};VoiceQueueReport[_0x44e3('0x8')][_0x44e3('0x14')]=function(_0x2fcaec){try{if(this['isNotNull'](_0x2fcaec)&&this[_0x44e3('0x62')](_0x2fcaec[_0x44e3('0x68')])){logger[_0x44e3('0x47')](_0x44e3('0x69'),util[_0x44e3('0x3f')](_0x2fcaec,{'showHidden':![],'depth':null}));if(this[_0x44e3('0xf')][_0x2fcaec[_0x44e3('0x68')]]){logger['info'](_0x44e3('0x6a'),_0x2fcaec[_0x44e3('0x68')]);var _0xaa0d74=_['countBy'](this['channels'],'queue')[_0x2fcaec['queue']]||0x0;var _0x3a2e2d=_0xaa0d74-_0x2fcaec['callers'];if(this['voiceQueues'][_0x2fcaec[_0x44e3('0x68')]][_0x44e3('0x32')]!==_[_0x44e3('0x6b')](_0x2fcaec['callers'])||this[_0x44e3('0xf')][_0x2fcaec[_0x44e3('0x68')]][_0x44e3('0x54')]!==_[_0x44e3('0x6b')](_0x2fcaec['loggedin'])||this[_0x44e3('0xf')][_0x2fcaec[_0x44e3('0x68')]][_0x44e3('0x53')]!==_['toNumber'](_0x2fcaec[_0x44e3('0x53')])||this[_0x44e3('0xf')][_0x2fcaec[_0x44e3('0x68')]][_0x44e3('0x6c')]!==_0x3a2e2d){this[_0x44e3('0xf')][_0x2fcaec['queue']][_0x44e3('0x32')]=_[_0x44e3('0x6b')](_0x2fcaec['callers']);this['voiceQueues'][_0x2fcaec[_0x44e3('0x68')]]['loggedIn']=_[_0x44e3('0x6b')](_0x2fcaec[_0x44e3('0x6d')]);this[_0x44e3('0xf')][_0x2fcaec[_0x44e3('0x68')]][_0x44e3('0x53')]=_[_0x44e3('0x6b')](_0x2fcaec[_0x44e3('0x53')]);this[_0x44e3('0xf')][_0x2fcaec[_0x44e3('0x68')]][_0x44e3('0x6c')]=_0x3a2e2d>0x0?_0x3a2e2d:0x0;this[_0x44e3('0xf')][_0x2fcaec[_0x44e3('0x68')]]['talking']=this[_0x44e3('0xf')][_0x2fcaec['queue']][_0x44e3('0x6c')]>_[_0x44e3('0x6b')](_0x2fcaec[_0x44e3('0x6d')])?_[_0x44e3('0x6b')](_0x2fcaec[_0x44e3('0x6d')]):this[_0x44e3('0xf')][_0x2fcaec[_0x44e3('0x68')]]['talking'];this['emitVoiceQueueSummary'](this[_0x44e3('0xf')][_0x2fcaec[_0x44e3('0x68')]],_0x44e3('0x13'));}logger[_0x44e3('0x47')]('[voiceQueueReport][queuesummary]\x20sending\x20queuesummary\x20event:',util[_0x44e3('0x3f')](this['voiceQueues'][_0x2fcaec[_0x44e3('0x68')]],{'showHidden':![],'depth':null}));ami[_0x44e3('0x45')]('custom:queuesummary',this['voiceQueues'][_0x2fcaec[_0x44e3('0x68')]]);}}}catch(_0x5c463d){logger[_0x44e3('0x3e')](_0x44e3('0x67'),util[_0x44e3('0x3f')](_0x5c463d,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype']['syncQueueSummaryComplete']=function(_0x22772d){logger[_0x44e3('0x47')](_0x44e3('0x6e'),util[_0x44e3('0x3f')](_0x22772d,{'showHidden':![],'depth':null}));this[_0x44e3('0x10')]=!![];};VoiceQueueReport['prototype'][_0x44e3('0x18')]=function(_0x20eae4){try{if(this[_0x44e3('0x62')](_0x20eae4)){logger[_0x44e3('0x47')](_0x44e3('0x6f'),_0x20eae4[_0x44e3('0x4a')],util['inspect'](_0x20eae4,{'showHidden':![],'depth':null}));if(_[_0x44e3('0x63')](this[_0x44e3('0xc')][_0x20eae4[_0x44e3('0x4a')]]))this[_0x44e3('0xc')][_0x20eae4['uniqueid']]=[];if(_[_0x44e3('0x63')](this[_0x44e3('0x36')][_0x20eae4[_0x44e3('0x4a')]]))this[_0x44e3('0x36')][_0x20eae4[_0x44e3('0x4a')]]={};var _0x4ddc00=new QueueReport();_0x4ddc00[_0x44e3('0x4c')]=_0x20eae4['queue'];_0x4ddc00[_0x44e3('0x4f')]=this[_0x44e3('0xf')][_0x4ddc00[_0x44e3('0x4c')]]&&this[_0x44e3('0xf')][_0x4ddc00['name']][_0x44e3('0x4f')]?this[_0x44e3('0xf')][_0x4ddc00[_0x44e3('0x4c')]]['type']||_0x44e3('0x50'):_0x44e3('0x50');_0x4ddc00[_0x44e3('0x68')]=_0x20eae4[_0x44e3('0x68')];_0x4ddc00['queuecallerjoinAt']=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x4ddc00[_0x44e3('0x70')]=_0x20eae4[_0x44e3('0x70')];_0x4ddc00[_0x44e3('0x71')]=_0x20eae4[_0x44e3('0x71')];_0x4ddc00['uniqueid']=_0x20eae4[_0x44e3('0x4a')];_0x4ddc00[_0x44e3('0x72')]=this['channels'][_0x20eae4[_0x44e3('0x4a')]]['routealias'];logger[_0x44e3('0x73')](_0x44e3('0x74'),_0x4ddc00[_0x44e3('0x4c')],_0x4ddc00[_0x44e3('0x4f')]);_[_0x44e3('0x75')](_0x4ddc00,_[_0x44e3('0x76')](_0x20eae4,_[_0x44e3('0x77')](_0x4ddc00)));this['queueReports'][_0x20eae4[_0x44e3('0x4a')]]['push'](_0x4ddc00);this[_0x44e3('0x36')][_0x20eae4[_0x44e3('0x4a')]]=_0x4ddc00;this[_0x44e3('0x46')](_0x4ddc00,_0x44e3('0x78'));}}catch(_0x5a2553){logger[_0x44e3('0x3e')]('[%s][voiceQueueReport][queuecallerjoin]',_0x20eae4['uniqueid'],util[_0x44e3('0x3f')](_0x5a2553,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x44e3('0x8')][_0x44e3('0x1a')]=function(_0x1a3af4){try{if(this[_0x44e3('0x62')](_0x1a3af4)){logger[_0x44e3('0x47')]('[%s][voiceQueueReport][queuecallerabandon]',_0x1a3af4[_0x44e3('0x4a')],util[_0x44e3('0x3f')](_0x1a3af4,{'showHidden':![],'depth':null}));if(this[_0x44e3('0xc')][_0x1a3af4[_0x44e3('0x4a')]]){var _0x467c08=_[_0x44e3('0x79')](this[_0x44e3('0xc')][_0x1a3af4[_0x44e3('0x4a')]]);_0x467c08[_0x44e3('0x7a')]=![];_0x467c08[_0x44e3('0x7b')]=null;_0x467c08[_0x44e3('0x7c')]=_0x1a3af4['holdtime'];_0x467c08[_0x44e3('0x7d')]=_0x1a3af4[_0x44e3('0x7d')];_0x467c08[_0x44e3('0x19')]=!![];_0x467c08[_0x44e3('0x7e')]=moment()[_0x44e3('0x60')](_0x44e3('0x7f'));_0x467c08[_0x44e3('0x80')]=_0x44e3('0x81');_0x467c08[_0x44e3('0x82')]=null;logger['info']('[voiceQueueReport][queuecallerabandon]\x20name:%s\x20type:%s',_0x467c08[_0x44e3('0x4c')],_0x467c08[_0x44e3('0x4f')]);this[_0x44e3('0x36')][_0x1a3af4[_0x44e3('0x4a')]]=_0x467c08;this[_0x44e3('0x44')](_0x467c08,_0x44e3('0x19'));}}}catch(_0x188183){logger[_0x44e3('0x3e')](_0x44e3('0x83'),_0x1a3af4[_0x44e3('0x4a')],util[_0x44e3('0x3f')](_0x188183,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x44e3('0x1c')]=function(_0x512f40){try{if(this[_0x44e3('0x62')](_0x512f40)){logger[_0x44e3('0x47')]('[%s][voiceQueueReport][queuecallerleave]',_0x512f40[_0x44e3('0x4a')],util[_0x44e3('0x3f')](_0x512f40,{'showHidden':![],'depth':null}));if(this[_0x44e3('0xc')][_0x512f40[_0x44e3('0x4a')]]){var _0x28ab10=_[_0x44e3('0x79')](this[_0x44e3('0xc')][_0x512f40[_0x44e3('0x4a')]]);_0x28ab10[_0x44e3('0x84')]=moment()[_0x44e3('0x60')]('YYYY-MM-DD\x20HH:mm:ss');_0x28ab10['connectedlinenum']=_0x512f40[_0x44e3('0x85')];_0x28ab10[_0x44e3('0x86')]=_0x512f40[_0x44e3('0x86')];logger['info'](_0x44e3('0x87'),_0x28ab10[_0x44e3('0x4c')],_0x28ab10[_0x44e3('0x4f')],_0x512f40[_0x44e3('0x85')],_0x512f40[_0x44e3('0x86')]);this[_0x44e3('0x36')][_0x512f40['uniqueid']]=_0x28ab10;this[_0x44e3('0x46')](_0x28ab10,_0x44e3('0x1b'));}}}catch(_0x5be7e0){logger[_0x44e3('0x3e')](_0x44e3('0x88'),_0x512f40['uniqueid'],util['inspect'](_0x5be7e0,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x44e3('0x8')][_0x44e3('0x20')]=function(_0x31d88f){try{if(this[_0x44e3('0x62')](_0x31d88f)){logger[_0x44e3('0x47')]('[%s][voiceQueueReport][agentconnect]',_0x31d88f['uniqueid'],util[_0x44e3('0x3f')](_0x31d88f,{'showHidden':![],'depth':null}));if(this[_0x44e3('0xc')][_0x31d88f['uniqueid']]){var _0x46cece=_[_0x44e3('0x79')](this['queueReports'][_0x31d88f[_0x44e3('0x4a')]]);_0x46cece[_0x44e3('0x7a')]=!![];_0x46cece[_0x44e3('0x80')]=_0x44e3('0x89');logger[_0x44e3('0x73')](_0x44e3('0x8a'),_0x46cece[_0x44e3('0x4c')],_0x46cece[_0x44e3('0x4f')]);}}}catch(_0x5c032c){logger[_0x44e3('0x3e')](_0x44e3('0x8b'),_0x31d88f[_0x44e3('0x4a')],util[_0x44e3('0x3f')](_0x5c032c,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x44e3('0x8')][_0x44e3('0x1e')]=function(_0x218c3b){try{if(this['isNotNull'](_0x218c3b)){logger[_0x44e3('0x47')]('[%s][voiceQueueReport][agentcomplete]',_0x218c3b['uniqueid'],util['inspect'](_0x218c3b,{'showHidden':![],'depth':null}));if(this[_0x44e3('0xc')][_0x218c3b['uniqueid']]){var _0x694e24=_[_0x44e3('0x79')](this['queueReports'][_0x218c3b['uniqueid']]);_0x694e24[_0x44e3('0x19')]=![];_0x694e24['queuecallerabandonAt']=null;_0x694e24[_0x44e3('0x8c')]=!![];_0x694e24[_0x44e3('0x82')]=_0x218c3b[_0x44e3('0x8d')];_0x694e24['holdtime']=_0x218c3b[_0x44e3('0x7c')];_0x694e24['queuecallercomplete']=!![];_0x694e24[_0x44e3('0x8e')]=![];_0x694e24[_0x44e3('0x8f')]=null;if(!_0x694e24[_0x44e3('0x90')]){if(_0x218c3b[_0x44e3('0x91')]==_0x44e3('0x90')){_0x694e24['queuecallerexitreason']=_0x44e3('0x92');logger[_0x44e3('0x73')](_0x44e3('0x93'),_0x694e24[_0x44e3('0x4c')],_0x694e24[_0x44e3('0x4f')]);}else{if(_[_0x44e3('0x94')](_0x218c3b[_0x44e3('0x3b')][_0x44e3('0x95')](),'local/')){if(this['queueReports'][_0x218c3b[_0x44e3('0x96')]]){var _0xc92166=_[_0x44e3('0x79')](this[_0x44e3('0xc')][_0x218c3b[_0x44e3('0x96')]]);_0xc92166[_0x44e3('0x7a')]=![];_0xc92166[_0x44e3('0x8e')]=!![];_0xc92166[_0x44e3('0x8f')]=moment(_0x694e24[_0x44e3('0x97')])[_0x44e3('0x98')](_0x218c3b[_0x44e3('0x7c')],_0x44e3('0x99'))[_0x44e3('0x60')](_0x44e3('0x7f'));_0xc92166[_0x44e3('0x80')]=_0x44e3('0x9a');_0xc92166[_0x44e3('0x90')]=!![];_0xc92166[_0x44e3('0x9b')]=_0x44e3('0x9c');_0xc92166[_0x44e3('0x9d')]=_0x218c3b['destexten'];_0xc92166[_0x44e3('0x9e')]=_0x218c3b[_0x44e3('0x4a')];logger['info'](_0x44e3('0x9f'),_0xc92166['name'],_0xc92166[_0x44e3('0x4f')]);var _0x1a7d73=this[_0x44e3('0xc')][_0x218c3b[_0x44e3('0x96')]];this['queueReports'][_0x218c3b[_0x44e3('0x96')]]=this[_0x44e3('0xc')][_0x218c3b[_0x44e3('0x4a')]];this[_0x44e3('0xc')][_0x218c3b['uniqueid']]=_0x1a7d73;}}else{_0x694e24[_0x44e3('0x80')]=_0x44e3('0xa0')+_0x218c3b[_0x44e3('0x91')]['toUpperCase']();logger[_0x44e3('0x73')](_0x44e3('0xa1'),_0x694e24[_0x44e3('0x4c')],_0x694e24['type'],_0x694e24[_0x44e3('0x80')]);}}}this[_0x44e3('0x36')][_0x218c3b[_0x44e3('0x4a')]]=_0x694e24;this[_0x44e3('0x44')](_0x694e24,_0x44e3('0x1d'));}}}catch(_0x3bd60e){logger[_0x44e3('0x3e')](_0x44e3('0xa2'),_0x218c3b[_0x44e3('0x4a')],util[_0x44e3('0x3f')](_0x3bd60e,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x44e3('0x21')]=function(_0x21bf46){try{if(this['isNotNull'](_0x21bf46)){logger['debug'](_0x44e3('0xa3'),_0x21bf46[_0x44e3('0x4a')],util[_0x44e3('0x3f')](_0x21bf46,{'showHidden':![],'depth':null}));this[_0x44e3('0xa4')](_0x21bf46[_0x44e3('0x4a')],_[_0x44e3('0x77')](_0x21bf46[_0x44e3('0xa5')])[0x0],_0x21bf46[_0x44e3('0xa6')]);if(this[_0x44e3('0xc')][_0x21bf46['uniqueid']]){var _0x96a913=_['last'](this[_0x44e3('0xc')][_0x21bf46[_0x44e3('0x4a')]]);if(_0x96a913){if(this[_0x44e3('0x62')](_0x21bf46['variable'])&&this['isNotNull'](_0x21bf46[_0x44e3('0xa5')][_0x44e3('0xa7')])){switch(_0x21bf46['value']){case _0x44e3('0xa8'):_0x96a913['queuecallerexit']=![];_0x96a913[_0x44e3('0x8f')]=null;break;case _0x44e3('0xa9'):_0x96a913[_0x44e3('0xaa')]=_0x44e3('0xab');_0x96a913[_0x44e3('0x8e')]=!![];_0x96a913[_0x44e3('0x8f')]=moment()[_0x44e3('0x60')](_0x44e3('0x7f'));_0x96a913[_0x44e3('0x84')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');logger[_0x44e3('0x47')]('[%s][voiceQueueReport][varset]\x20sending\x20timeout\x20event:',_0x21bf46['uniqueid'],util[_0x44e3('0x3f')](_0x96a913,{'showHidden':![],'depth':null}));ami[_0x44e3('0x45')]('custom:timeout',_0x96a913);break;default:_0x96a913['queuecallerexit']=!![];_0x96a913['queuecallerexitAt']=moment()[_0x44e3('0x60')](_0x44e3('0x7f'));_0x96a913[_0x44e3('0x84')]=moment()[_0x44e3('0x60')](_0x44e3('0x7f'));}_0x96a913[_0x44e3('0x19')]=![];_0x96a913[_0x44e3('0x7e')]=null;_0x96a913['queuecallerexitreason']=_0x21bf46[_0x44e3('0xa6')];this[_0x44e3('0x36')][_0x21bf46[_0x44e3('0x4a')]]=_0x96a913;this[_0x44e3('0x44')](_0x96a913,_0x44e3('0xac'));}else if(this['isNotNull'](_0x21bf46[_0x44e3('0xa5')])&&this[_0x44e3('0x62')](_0x21bf46[_0x44e3('0xa5')][_0x44e3('0xad')])){if(!_0x96a913[_0x44e3('0x19')]){_0x96a913[_0x44e3('0x8e')]=!![];_0x96a913[_0x44e3('0x8f')]=moment()[_0x44e3('0x60')](_0x44e3('0x7f'));_0x96a913[_0x44e3('0x80')]=_0x44e3('0xae');_0x96a913[_0x44e3('0x84')]=moment()[_0x44e3('0x60')](_0x44e3('0x7f'));this[_0x44e3('0x36')][_0x21bf46[_0x44e3('0x4a')]]=_0x96a913;}}logger[_0x44e3('0x73')](_0x44e3('0xaf'),_0x21bf46[_0x44e3('0x4a')],_0x96a913[_0x44e3('0x4c')],_0x96a913[_0x44e3('0x4f')],_[_0x44e3('0x77')](_0x21bf46[_0x44e3('0xa5')])[0x0],_0x21bf46[_0x44e3('0xa6')]);_0x96a913[_0x44e3('0x12')]=this[_0x44e3('0x12')][_0x21bf46['uniqueid']];}}}}catch(_0x264f6e){logger[_0x44e3('0x3e')](_0x44e3('0xa3'),_0x21bf46[_0x44e3('0x4a')],util[_0x44e3('0x3f')](_0x264f6e,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x44e3('0x8')][_0x44e3('0xa4')]=function(_0x3d2543,_0x258230,_0x163fa8){var _0x579541=[_0x44e3('0xb0'),_0x44e3('0xb1'),'rtpaudioqosjitter',_0x44e3('0xb2'),_0x44e3('0xb3'),_0x44e3('0xb4'),_0x44e3('0xb5'),_0x44e3('0xb6'),'sipcallid','sipuri',_0x44e3('0xb7'),_0x44e3('0xb8'),_0x44e3('0xb9'),'memberdynamic','memberinterface',_0x44e3('0xba'),_0x44e3('0x8d'),'memberpenalty',_0x44e3('0xbb')];if(!_['isNil'](_0x258230)&&!_['includes'](_0x579541,_0x258230)){if(_[_0x44e3('0x63')](this['variables'][_0x3d2543])){this[_0x44e3('0x12')][_0x3d2543]={};}this[_0x44e3('0x12')][_0x3d2543][_0x258230]=_0x163fa8;}};VoiceQueueReport[_0x44e3('0x8')][_0x44e3('0xbc')]=function(_0x7511e5){try{if(this[_0x44e3('0x62')](_0x7511e5)){logger[_0x44e3('0x47')]('[%s][voiceQueueReport][hangup]',_0x7511e5[_0x44e3('0x4a')],util[_0x44e3('0x3f')](_0x7511e5,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x7511e5[_0x44e3('0x4a')]]){for(var _0x2d69e9=0x0,_0x883fbc={};_0x2d69e90x0?_0x47a9e2:0x0;this[_0x53e0('0xf')][_0x161568[_0x53e0('0x6c')]][_0x53e0('0x5b')]=this['voiceQueues'][_0x161568['queue']]['talking']>_[_0x53e0('0x71')](_0x161568[_0x53e0('0x73')])?_[_0x53e0('0x71')](_0x161568[_0x53e0('0x73')]):this[_0x53e0('0xf')][_0x161568[_0x53e0('0x6c')]][_0x53e0('0x5b')];this['emitVoiceQueueSummary'](this[_0x53e0('0xf')][_0x161568[_0x53e0('0x6c')]],_0x53e0('0x13'));}logger['debug'](_0x53e0('0x74'),util[_0x53e0('0x42')](this[_0x53e0('0xf')][_0x161568[_0x53e0('0x6c')]],{'showHidden':![],'depth':null}));ami[_0x53e0('0x49')](_0x53e0('0x75'),this[_0x53e0('0xf')][_0x161568[_0x53e0('0x6c')]]);}}}catch(_0x18e565){logger[_0x53e0('0x40')]('[voiceQueueReport][queuesummary]',util[_0x53e0('0x42')](_0x18e565,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x53e0('0x34')][_0x53e0('0x16')]=function(_0x51ac3a){logger[_0x53e0('0x4f')](_0x53e0('0x76'),util[_0x53e0('0x42')](_0x51ac3a,{'showHidden':![],'depth':null}));this[_0x53e0('0x10')]=!![];};VoiceQueueReport[_0x53e0('0x34')][_0x53e0('0x18')]=function(_0x576d9f){try{if(this[_0x53e0('0x67')](_0x576d9f)){logger['debug']('[%s][voiceQueueReport][queuecallerjoin]',_0x576d9f[_0x53e0('0x52')],util[_0x53e0('0x42')](_0x576d9f,{'showHidden':![],'depth':null}));if(_[_0x53e0('0x68')](this['queueReports'][_0x576d9f[_0x53e0('0x52')]]))this[_0x53e0('0x46')][_0x576d9f[_0x53e0('0x52')]]=[];if(_[_0x53e0('0x68')](this[_0x53e0('0x36')][_0x576d9f[_0x53e0('0x52')]]))this[_0x53e0('0x36')][_0x576d9f[_0x53e0('0x52')]]={};var _0x10e42a=new QueueReport();_0x10e42a['name']=_0x576d9f['queue'];_0x10e42a[_0x53e0('0x55')]=this[_0x53e0('0xf')][_0x10e42a['name']]&&this[_0x53e0('0xf')][_0x10e42a['name']][_0x53e0('0x55')]?this[_0x53e0('0xf')][_0x10e42a['name']][_0x53e0('0x55')]||_0x53e0('0x56'):_0x53e0('0x56');_0x10e42a[_0x53e0('0x6c')]=_0x576d9f[_0x53e0('0x6c')];_0x10e42a['queuecallerjoinAt']=moment()['format'](_0x53e0('0x77'));_0x10e42a[_0x53e0('0x78')]=_0x576d9f[_0x53e0('0x78')];_0x10e42a[_0x53e0('0x79')]=_0x576d9f[_0x53e0('0x79')];_0x10e42a[_0x53e0('0x52')]=_0x576d9f[_0x53e0('0x52')];_0x10e42a[_0x53e0('0x7a')]=this[_0x53e0('0x36')][_0x576d9f[_0x53e0('0x52')]][_0x53e0('0x7a')];logger['info'](_0x53e0('0x7b'),_0x10e42a[_0x53e0('0x4d')],_0x10e42a[_0x53e0('0x55')]);_[_0x53e0('0x7c')](_0x10e42a,_[_0x53e0('0x7d')](_0x576d9f,_['keys'](_0x10e42a)));this[_0x53e0('0x46')][_0x576d9f[_0x53e0('0x52')]][_0x53e0('0x7e')](_0x10e42a);this[_0x53e0('0x36')][_0x576d9f[_0x53e0('0x52')]]=_0x10e42a;this['emitVoiceQueueChannelSave'](_0x10e42a,_0x53e0('0x7f'));}}catch(_0x8b7386){logger[_0x53e0('0x40')]('[%s][voiceQueueReport][queuecallerjoin]',_0x576d9f[_0x53e0('0x52')],util[_0x53e0('0x42')](_0x8b7386,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x53e0('0x34')][_0x53e0('0x1a')]=function(_0xdacf65){try{if(this[_0x53e0('0x67')](_0xdacf65)){logger[_0x53e0('0x4f')](_0x53e0('0x80'),_0xdacf65['uniqueid'],util['inspect'](_0xdacf65,{'showHidden':![],'depth':null}));if(this[_0x53e0('0x46')][_0xdacf65[_0x53e0('0x52')]]){var _0x113a77=_[_0x53e0('0x81')](this['queueReports'][_0xdacf65[_0x53e0('0x52')]]);_0x113a77[_0x53e0('0x82')]=![];_0x113a77['queuecallercompleteAt']=null;_0x113a77['holdtime']=_0xdacf65[_0x53e0('0x83')];_0x113a77[_0x53e0('0x84')]=_0xdacf65[_0x53e0('0x84')];_0x113a77[_0x53e0('0x19')]=!![];_0x113a77[_0x53e0('0x85')]=moment()[_0x53e0('0x65')](_0x53e0('0x77'));_0x113a77['queuecallerexitreason']='ABANDONED';_0x113a77[_0x53e0('0x86')]=null;logger['info'](_0x53e0('0x87'),_0x113a77[_0x53e0('0x4d')],_0x113a77['type']);this[_0x53e0('0x36')][_0xdacf65['uniqueid']]=_0x113a77;this[_0x53e0('0x47')](_0x113a77,_0x53e0('0x19'));}}}catch(_0x37ad92){logger[_0x53e0('0x40')](_0x53e0('0x80'),_0xdacf65[_0x53e0('0x52')],util[_0x53e0('0x42')](_0x37ad92,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x53e0('0x34')]['syncQueueCallerLeave']=function(_0x459ac9){try{if(this[_0x53e0('0x67')](_0x459ac9)){logger[_0x53e0('0x4f')](_0x53e0('0x88'),_0x459ac9[_0x53e0('0x52')],util['inspect'](_0x459ac9,{'showHidden':![],'depth':null}));if(this[_0x53e0('0x46')][_0x459ac9[_0x53e0('0x52')]]){var _0x1dc429=_[_0x53e0('0x81')](this[_0x53e0('0x46')][_0x459ac9[_0x53e0('0x52')]]);_0x1dc429[_0x53e0('0x89')]=moment()[_0x53e0('0x65')](_0x53e0('0x77'));_0x1dc429[_0x53e0('0x8a')]=_0x459ac9['connectedlinenum'];_0x1dc429[_0x53e0('0x8b')]=_0x459ac9['connectedlinename'];logger[_0x53e0('0x6d')]('[voiceQueueReport][queuecallerleave]\x20name:%s\x20type:%s\x20connectedlinenum:%s\x20connectedlinename:%s',_0x1dc429[_0x53e0('0x4d')],_0x1dc429['type'],_0x459ac9[_0x53e0('0x8a')],_0x459ac9[_0x53e0('0x8b')]);this['channels'][_0x459ac9[_0x53e0('0x52')]]=_0x1dc429;this[_0x53e0('0x4a')](_0x1dc429,'queuecallerleave');}}}catch(_0x388223){logger['error'](_0x53e0('0x88'),_0x459ac9[_0x53e0('0x52')],util[_0x53e0('0x42')](_0x388223,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x53e0('0x34')][_0x53e0('0x1e')]=function(_0x3deb02){try{if(this[_0x53e0('0x67')](_0x3deb02)){logger[_0x53e0('0x4f')]('[%s][voiceQueueReport][agentconnect]',_0x3deb02[_0x53e0('0x52')],util[_0x53e0('0x42')](_0x3deb02,{'showHidden':![],'depth':null}));if(this[_0x53e0('0x46')][_0x3deb02[_0x53e0('0x52')]]){var _0x34d920=_[_0x53e0('0x81')](this[_0x53e0('0x46')][_0x3deb02['uniqueid']]);_0x34d920[_0x53e0('0x82')]=!![];_0x34d920[_0x53e0('0x8c')]=_0x53e0('0x8d');logger[_0x53e0('0x6d')]('[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT',_0x34d920[_0x53e0('0x4d')],_0x34d920[_0x53e0('0x55')]);}}}catch(_0x3fb246){logger[_0x53e0('0x40')](_0x53e0('0x8e'),_0x3deb02[_0x53e0('0x52')],util[_0x53e0('0x42')](_0x3fb246,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x53e0('0x8f')]=function(_0x4c831c){try{if(this[_0x53e0('0x67')](_0x4c831c)){logger[_0x53e0('0x4f')](_0x53e0('0x90'),_0x4c831c[_0x53e0('0x52')],util[_0x53e0('0x42')](_0x4c831c,{'showHidden':![],'depth':null}));if(this[_0x53e0('0x46')][_0x4c831c[_0x53e0('0x52')]]){var _0x44637e=_[_0x53e0('0x81')](this['queueReports'][_0x4c831c['uniqueid']]);_0x44637e['queuecallerabandon']=![];_0x44637e[_0x53e0('0x85')]=null;_0x44637e[_0x53e0('0x91')]=!![];_0x44637e['lastAssignedTo']=_0x4c831c[_0x53e0('0x92')];_0x44637e[_0x53e0('0x83')]=_0x4c831c['holdtime'];_0x44637e[_0x53e0('0x82')]=!![];_0x44637e[_0x53e0('0x93')]=![];_0x44637e['queuecallerexitAt']=null;if(!_0x44637e[_0x53e0('0x94')]){if(_0x4c831c[_0x53e0('0x95')]==_0x53e0('0x94')){_0x44637e[_0x53e0('0x8c')]=_0x53e0('0x96');logger['info'](_0x53e0('0x97'),_0x44637e['name'],_0x44637e[_0x53e0('0x55')]);}else{if(_['startsWith'](_0x4c831c['channel'][_0x53e0('0x98')](),_0x53e0('0x99'))){if(this[_0x53e0('0x46')][_0x4c831c[_0x53e0('0x9a')]]){var _0x2b570c=_[_0x53e0('0x81')](this[_0x53e0('0x46')][_0x4c831c[_0x53e0('0x9a')]]);_0x2b570c[_0x53e0('0x82')]=![];_0x2b570c['queuecallerexit']=!![];_0x2b570c['queuecallerexitAt']=moment(_0x44637e[_0x53e0('0x9b')])[_0x53e0('0x9c')](_0x4c831c['holdtime'],_0x53e0('0x9d'))[_0x53e0('0x65')](_0x53e0('0x77'));_0x2b570c[_0x53e0('0x8c')]=_0x53e0('0x9e');_0x2b570c[_0x53e0('0x94')]=!![];_0x2b570c['transfertype']=_0x53e0('0x9f');_0x2b570c['transferexten']=_0x4c831c['destexten'];_0x2b570c['transferuniqueid']=_0x4c831c[_0x53e0('0x52')];logger['info']('[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:FORWARDTRANSFER',_0x2b570c['name'],_0x2b570c[_0x53e0('0x55')]);var _0x33b178=this[_0x53e0('0x46')][_0x4c831c[_0x53e0('0x9a')]];this['queueReports'][_0x4c831c[_0x53e0('0x9a')]]=this[_0x53e0('0x46')][_0x4c831c[_0x53e0('0x52')]];this[_0x53e0('0x46')][_0x4c831c[_0x53e0('0x52')]]=_0x33b178;}}else{_0x44637e['queuecallerexitreason']='COMPLETEDBY'+_0x4c831c[_0x53e0('0x95')][_0x53e0('0xa0')]();logger['info']('[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:%s',_0x44637e[_0x53e0('0x4d')],_0x44637e[_0x53e0('0x55')],_0x44637e[_0x53e0('0x8c')]);}}}this[_0x53e0('0x36')][_0x4c831c[_0x53e0('0x52')]]=_0x44637e;this[_0x53e0('0x47')](_0x44637e,_0x53e0('0x1d'));}}}catch(_0x39dff1){logger[_0x53e0('0x40')]('[%s][voiceQueueReport][agentcomplete]',_0x4c831c[_0x53e0('0x52')],util['inspect'](_0x39dff1,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x53e0('0x34')][_0x53e0('0x20')]=function(_0x34a213){try{if(this[_0x53e0('0x67')](_0x34a213)){logger[_0x53e0('0x4f')](_0x53e0('0xa1'),_0x34a213[_0x53e0('0x52')],util['inspect'](_0x34a213,{'showHidden':![],'depth':null}));this[_0x53e0('0xa2')](_0x34a213[_0x53e0('0x52')],_[_0x53e0('0xa3')](_0x34a213[_0x53e0('0xa4')])[0x0],_0x34a213[_0x53e0('0xa5')]);if(this[_0x53e0('0x46')][_0x34a213['uniqueid']]){var _0x3c3a6f=_[_0x53e0('0x81')](this[_0x53e0('0x46')][_0x34a213['uniqueid']]);if(_0x3c3a6f){if(this['isNotNull'](_0x34a213['variable'])&&this[_0x53e0('0x67')](_0x34a213[_0x53e0('0xa4')][_0x53e0('0xa6')])){switch(_0x34a213[_0x53e0('0xa5')]){case _0x53e0('0xa7'):_0x3c3a6f['queuecallerexit']=![];_0x3c3a6f[_0x53e0('0xa8')]=null;break;case _0x53e0('0xa9'):_0x3c3a6f[_0x53e0('0xaa')]=_0x53e0('0xab');_0x3c3a6f[_0x53e0('0x93')]=!![];_0x3c3a6f[_0x53e0('0xa8')]=moment()[_0x53e0('0x65')]('YYYY-MM-DD\x20HH:mm:ss');_0x3c3a6f[_0x53e0('0x89')]=moment()['format'](_0x53e0('0x77'));logger[_0x53e0('0x4f')]('[%s][voiceQueueReport][varset]\x20sending\x20timeout\x20event:',_0x34a213[_0x53e0('0x52')],util[_0x53e0('0x42')](_0x3c3a6f,{'showHidden':![],'depth':null}));ami[_0x53e0('0x49')](_0x53e0('0xac'),_0x3c3a6f);break;default:_0x3c3a6f[_0x53e0('0x93')]=!![];_0x3c3a6f[_0x53e0('0xa8')]=moment()[_0x53e0('0x65')]('YYYY-MM-DD\x20HH:mm:ss');_0x3c3a6f[_0x53e0('0x89')]=moment()[_0x53e0('0x65')]('YYYY-MM-DD\x20HH:mm:ss');}_0x3c3a6f[_0x53e0('0x19')]=![];_0x3c3a6f[_0x53e0('0x85')]=null;_0x3c3a6f[_0x53e0('0x8c')]=_0x34a213[_0x53e0('0xa5')];this[_0x53e0('0x36')][_0x34a213[_0x53e0('0x52')]]=_0x3c3a6f;this[_0x53e0('0x47')](_0x3c3a6f,_0x53e0('0x1f'));}else if(this[_0x53e0('0x67')](_0x34a213[_0x53e0('0xa4')])&&this[_0x53e0('0x67')](_0x34a213[_0x53e0('0xa4')][_0x53e0('0xad')])){if(!_0x3c3a6f['queuecallerabandon']){_0x3c3a6f['queuecallerexit']=!![];_0x3c3a6f[_0x53e0('0xa8')]=moment()[_0x53e0('0x65')](_0x53e0('0x77'));_0x3c3a6f[_0x53e0('0x8c')]='EXITWITHKEY';_0x3c3a6f['queuecallerleaveAt']=moment()[_0x53e0('0x65')](_0x53e0('0x77'));this[_0x53e0('0x36')][_0x34a213[_0x53e0('0x52')]]=_0x3c3a6f;}}logger[_0x53e0('0x6d')](_0x53e0('0xae'),_0x34a213[_0x53e0('0x52')],_0x3c3a6f[_0x53e0('0x4d')],_0x3c3a6f[_0x53e0('0x55')],_[_0x53e0('0xa3')](_0x34a213['variable'])[0x0],_0x34a213[_0x53e0('0xa5')]);_0x3c3a6f[_0x53e0('0x12')]=this[_0x53e0('0x12')][_0x34a213[_0x53e0('0x52')]];}}}}catch(_0x54cc81){logger['error'](_0x53e0('0xa1'),_0x34a213[_0x53e0('0x52')],util[_0x53e0('0x42')](_0x54cc81,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x53e0('0x34')]['addVariable']=function(_0x1d1f89,_0x9888bb,_0x37e4ae){var _0x10efb1=[_0x53e0('0xaf'),_0x53e0('0xb0'),_0x53e0('0xb1'),_0x53e0('0xb2'),_0x53e0('0xb3'),_0x53e0('0xb4'),_0x53e0('0xb5'),_0x53e0('0xb6'),_0x53e0('0xb7'),_0x53e0('0xb8'),_0x53e0('0xb9'),_0x53e0('0xba'),_0x53e0('0xbb'),'memberdynamic',_0x53e0('0xbc'),_0x53e0('0xbd'),_0x53e0('0x92'),_0x53e0('0xbe'),_0x53e0('0xbf')];if(!_[_0x53e0('0x39')](_0x9888bb)&&!_[_0x53e0('0xc0')](_0x10efb1,_0x9888bb)){if(_[_0x53e0('0x68')](this[_0x53e0('0x12')][_0x1d1f89])){this[_0x53e0('0x12')][_0x1d1f89]={};}this['variables'][_0x1d1f89][_0x9888bb]=_0x37e4ae;}};VoiceQueueReport[_0x53e0('0x34')][_0x53e0('0x22')]=function(_0x238740){try{if(this['isNotNull'](_0x238740)){logger['debug']('[%s][voiceQueueReport][hangup]',_0x238740[_0x53e0('0x52')],util[_0x53e0('0x42')](_0x238740,{'showHidden':![],'depth':null}));if(this[_0x53e0('0x46')][_0x238740[_0x53e0('0x52')]]){for(var _0x101e72=0x0,_0xcd5e4b={};_0x101e72