Built motion from commit (unavailable).|2.5.30
[motion2.git] / server / services / ami / report / voiceQueueReport.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x720c=['[voiceQueueReport][queuesummary]\x20event:','[voiceQueueReport][queuesummary]\x20name:%s','countBy','callers','toNumber','loggedin','emitVoiceQueueSummary','[voiceQueueReport][queuesummary]\x20sending\x20queuesummary\x20event:','custom:queuesummary','[voiceQueueReport][queuesummarycomplete]\x20event:','[%s][voiceQueueReport][queuecallerjoin]','inbound','queuecallerjoinAt','position','count','info','[voiceQueueReport][queuecallerjoin]\x20name:%s\x20type:%s','merge','pick','keys','push','[%s][voiceQueueReport][queuecallerabandon]','queuecallercompleteAt','holdtime','originalposition','queuecallerabandonAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexitreason','ABANDONED','lastAssignedTo','[voiceQueueReport][queuecallerabandon]\x20name:%s\x20type:%s','[%s][voiceQueueReport][queuecallerleave]','last','queuecallerleaveAt','connectedlinenum','connectedlinename','[voiceQueueReport][queuecallerleave]\x20name:%s\x20type:%s\x20connectedlinenum:%s\x20connectedlinename:%s','queuecallerleave','[%s][voiceQueueReport][agentconnect]','queuecallercomplete','[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT','[%s][voiceQueueReport][agentcomplete]','assigned','membername','queuecallerexit','transfer','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETED','startsWith','toLowerCase','local/','linkedid','queuecallerexitAt','seconds','transfertype','FORWARD','transferexten','destexten','transferuniqueid','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:FORWARDTRANSFER','COMPLETEDBY','reason','toUpperCase','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:%s','addVariable','variable','value','CONTINUE','TIMEOUT','timeout','[%s][voiceQueueReport][varset]\x20sending\x20timeout\x20event:','custom:timeout','EXITWITHKEY','[%s][voiceQueueReport][varset]\x20name:%s\x20type:%s\x20variable:%s\x20value:%s','[%s][voiceQueueReport][varset]','rtpaudioqosjitter','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','sipuri','bridgepvtcallid','membercalls','memberdynamic','memberpenalty','memberrealtime','includes','[%s][voiceQueueReport][hangup]','length','diff','sumDuration','milliseconds','lastevent','custom:queuecallerunmanaged','[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerabandon\x20event:','[%s][voiceQueueReport][hangup]\x20name:%s\x20type:%s\x20reason:%s','[%s][voiceQueueReport][hangup]\x20sending\x20voiceQueueReport\x20event:','custom:voiceQueueReport','syncAttendedTransfer','[%s][voiceQueueReport][attendedtransfer]','transfereeuniqueid','secondtransfereruniqueid','ATTENDEDTRANSFER','ATTENDED','switch','[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','transfertargetuniqueid','origtransfereruniqueid','[%s][voiceQueueReport][blindtransfer]','BLINDTRANSFER','[%s][voiceQueueReport][blindTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','context','[%s][voiceQueueReport][musiconholdstart]','mohstarttime','[%s][voiceQueueReport][musiconholdstart]\x20mohstarttime:%s','[%s][voiceQueueReport][musiconholdstop]','mohtime','[%s][voiceQueueReport][musiconholdstop]\x20mohtime:%s','exports','lodash','util','md5','ioredis','../../../config/environment','ami','../ami','../model/queueReport','redis','defaults','localhost','prototype','enqueue','tail','finally','sequence','queueReports','agents','channels','queueChannels','voiceQueues','campaigns','variables','queuesummary','bind','queuesummarycomplete','syncQueueSummaryComplete','queuecallerjoin','syncQueueCallerJoin','queuecallerabandon','syncQueueCallerAbandon','syncQueueCallerLeave','agentcomplete','syncAgentComplete','agentconnect','syncAgentConnect','varset','syncVarSet','hangup','syncHangup','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','attendedtransfer','syncBlindTransfer','loopQueueShow','isEmpty','hasOwnProperty','originated','pTalking','waiting','queueStatusComplete','clearZombieChannels','isNil','Action','status','channel','catch','No\x20such\x20channel','inspect','error','[%s][voiceQueueReport][checkVariables]','[FullyBooted]\x20clear\x20realtime','clearQueueReport','emitVoiceQueueChannelRemove','emit','emitVoiceQueueChannelSave','[%s][voiceQueueReport][',']\x20sending\x20voice_queue_channel:save\x20event:','format','voice:queue:%s','name','voice_queue_channel:save','debug',']\x20sending\x20voice_queue_channel:remove\x20event:','uniqueid','voice_queue_presence:remove','type','strategy','answered','available','loggedIn','sumBillable','sumHoldTime','talking','total','unmanaged','abandoned','Trunk','callerid','Interval','stringify','[voiceQueueReport][','isNotNull','isUndefined','[voiceQueueReport][queues]','then','flagQueueSummary','[voiceQueueReport][queuesummary]','syncQueueSummary','queue'];(function(_0x1e9eb6,_0x190d4a){var _0x2c89e5=function(_0xfd31e1){while(--_0xfd31e1){_0x1e9eb6['push'](_0x1e9eb6['shift']());}};_0x2c89e5(++_0x190d4a);}(_0x720c,0x154));var _0xc720=function(_0x525511,_0x3b9d9b){_0x525511=_0x525511-0x0;var _0x1ab032=_0x720c[_0x525511];return _0x1ab032;};'use strict';var _=require(_0xc720('0x0'));var moment=require('moment');var util=require(_0xc720('0x1'));var md5=require(_0xc720('0x2'));var Redis=require(_0xc720('0x3'));var config=require(_0xc720('0x4'));var logger=require('../../../config/logger')(_0xc720('0x5'));var ami=require(_0xc720('0x6'));var QueueReport=require(_0xc720('0x7'));config[_0xc720('0x8')]=_[_0xc720('0x9')](config[_0xc720('0x8')],{'host':_0xc720('0xa'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xc720('0x8')]));var Sequence=function(){};Sequence[_0xc720('0xb')][_0xc720('0xc')]=function(_0x1a2a00){this[_0xc720('0xd')]=this['tail']?this['tail'][_0xc720('0xe')](_0x1a2a00):_0x1a2a00();};function VoiceQueueReport(_0x4bea5d){this[_0xc720('0xf')]=new Sequence();this[_0xc720('0x10')]={};this['agents']=_0x4bea5d[_0xc720('0x11')];this[_0xc720('0x12')]=_0x4bea5d[_0xc720('0x13')];this[_0xc720('0x14')]=_0x4bea5d[_0xc720('0x14')];this['flagQueueSummary']=!![];this[_0xc720('0x15')]=_0x4bea5d[_0xc720('0x15')];this[_0xc720('0x16')]={};ami['on'](_0xc720('0x17'),this['syncQueueSummary'][_0xc720('0x18')](this));ami['on'](_0xc720('0x19'),this[_0xc720('0x1a')]['bind'](this));ami['on'](_0xc720('0x1b'),this[_0xc720('0x1c')][_0xc720('0x18')](this));ami['on'](_0xc720('0x1d'),this[_0xc720('0x1e')]['bind'](this));ami['on']('queuecallerleave',this[_0xc720('0x1f')]['bind'](this));ami['on'](_0xc720('0x20'),this[_0xc720('0x21')]['bind'](this));ami['on'](_0xc720('0x22'),this[_0xc720('0x23')][_0xc720('0x18')](this));ami['on'](_0xc720('0x24'),this[_0xc720('0x25')][_0xc720('0x18')](this));ami['on'](_0xc720('0x26'),this[_0xc720('0x27')][_0xc720('0x18')](this));ami['on']('fullybooted',this['syncFullyBooted']['bind'](this));ami['on'](_0xc720('0x28'),this[_0xc720('0x29')][_0xc720('0x18')](this));ami['on'](_0xc720('0x2a'),this[_0xc720('0x2b')][_0xc720('0x18')](this));ami['on'](_0xc720('0x2c'),this['syncAttendedTransfer'][_0xc720('0x18')](this));ami['on']('blindtransfer',this[_0xc720('0x2d')][_0xc720('0x18')](this));this['loopQueueSummary']();this[_0xc720('0x2e')]();}function clearChannels(_0x2d6b3f){if(!_[_0xc720('0x2f')](_0x2d6b3f)){for(var _0x232cb1 in _0x2d6b3f){if(_0x2d6b3f[_0xc720('0x30')](_0x232cb1)){delete _0x2d6b3f[_0x232cb1];}}}}function clearCampaigns(_0x141cb5){if(!_[_0xc720('0x2f')](_0x141cb5)){for(var _0x5a8b03 in _0x141cb5){if(_0x141cb5[_0xc720('0x30')](_0x5a8b03)){_0x141cb5[_0x5a8b03][_0xc720('0x31')]=0x0;}}}}function clearVoiceQueues(_0x522428){if(!_[_0xc720('0x2f')](_0x522428)){for(var _0x2c7e75 in _0x522428){if(_0x522428['hasOwnProperty'](_0x2c7e75)){_0x522428[_0x2c7e75][_0xc720('0x31')]=0x0;_0x522428[_0x2c7e75]['talking']=0x0;_0x522428[_0x2c7e75][_0xc720('0x32')]=0x0;_0x522428[_0x2c7e75][_0xc720('0x33')]=0x0;_0x522428[_0x2c7e75][_0xc720('0x34')]=!![];}}}}function clearAgentBooked(_0x84d71e){if(!_[_0xc720('0x2f')](_0x84d71e)){for(var _0x4760a0 in _0x84d71e){if(_0x84d71e[_0xc720('0x30')](_0x4760a0)){_0x84d71e[_0x4760a0]['unlockRR']=!![];}}}}VoiceQueueReport['prototype'][_0xc720('0x35')]=function(){var _0x34e19d=this;for(var _0x531cee in this[_0xc720('0x12')]){if(this['channels'][_0xc720('0x30')](_0x531cee)&&!this[_0xc720('0x12')][_0x531cee]['switch']){this[_0xc720('0xf')][_0xc720('0xc')](function(){if(!_[_0xc720('0x36')](_0x34e19d[_0xc720('0x12')][_0x531cee])){return ami[_0xc720('0x37')]({'action':_0xc720('0x38'),'channel':_0x34e19d[_0xc720('0x12')][_0x531cee][_0xc720('0x39')]})[_0xc720('0x3a')](function(_0x422e01){if(_0x422e01['message']===_0xc720('0x3b')){setTimeout(function(){if(_0x34e19d['channels'][_0x531cee]){delete _0x34e19d[_0xc720('0x12')][_0x531cee];logger['error']('[%s][voiceQueueReport][checkChannel]',_0x531cee,util[_0xc720('0x3c')](_0x422e01,{'showHidden':![],'depth':null}));}if(_0x34e19d[_0xc720('0x10')][_0x531cee]){delete _0x34e19d[_0xc720('0x10')][_0x531cee];logger[_0xc720('0x3d')]('[%s][voiceQueueReport][checkQueueReport]',_0x531cee,util[_0xc720('0x3c')](_0x422e01,{'showHidden':![],'depth':null}));}if(_0x34e19d[_0xc720('0x16')][_0x531cee]){delete _0x34e19d['variables'][_0x531cee];logger[_0xc720('0x3d')](_0xc720('0x3e'),_0x531cee,util[_0xc720('0x3c')](_0x422e01,{'showHidden':![],'depth':null}));}},0x1f40);}});}});}}};VoiceQueueReport[_0xc720('0xb')]['syncFullyBooted']=function(){logger[_0xc720('0x3d')](_0xc720('0x3f'));clearChannels(this['channels']);this['clearQueueReport'](this[_0xc720('0x10')]);clearAgentBooked(this[_0xc720('0x11')]);clearVoiceQueues(this['voiceQueues']);clearCampaigns(this[_0xc720('0x15')]);};VoiceQueueReport['prototype'][_0xc720('0x40')]=function(_0x1bb558){var _0x25408e=this;if(!_[_0xc720('0x2f')](_0x1bb558)){for(var _0x4740db in _0x1bb558){if(_0x1bb558['hasOwnProperty'](_0x4740db)){_0x25408e[_0xc720('0x41')](_0x1bb558[_0x4740db],'clearqueuereport');delete _0x1bb558[_0x4740db];}}}};VoiceQueueReport[_0xc720('0xb')]['emit']=function(_0x57fa43,_0x407c47,_0x2b86e1){io['to'](_0x57fa43)[_0xc720('0x42')](_0x407c47,_0x2b86e1);};VoiceQueueReport[_0xc720('0xb')][_0xc720('0x43')]=function(_0x517536,_0x1d71f7){logger['debug'](_0xc720('0x44')+_0x1d71f7+_0xc720('0x45'),_0x517536['uniqueid'],util[_0xc720('0x3c')](_0x517536,{'showHidden':![],'depth':null}));this[_0xc720('0x42')](util[_0xc720('0x46')](_0xc720('0x47'),_0x517536[_0xc720('0x48')]),_0xc720('0x49'),_0x517536);io[_0xc720('0x42')]('voice_queue_presence:save',_0x517536);};VoiceQueueReport[_0xc720('0xb')][_0xc720('0x41')]=function(_0x20a18d,_0x5b1f21){logger[_0xc720('0x4a')](_0xc720('0x44')+_0x5b1f21+_0xc720('0x4b'),_0x20a18d[_0xc720('0x4c')],util[_0xc720('0x3c')](_0x20a18d,{'showHidden':![],'depth':null}));this[_0xc720('0x42')](util[_0xc720('0x46')](_0xc720('0x47'),_0x20a18d[_0xc720('0x48')]),'voice_queue_channel:remove',_0x20a18d);io[_0xc720('0x42')](_0xc720('0x4d'),_0x20a18d);};VoiceQueueReport[_0xc720('0xb')]['emitVoiceQueueSummary']=function(_0xfc9eac,_0x3e53f8){if(_0xfc9eac[_0xc720('0x4e')]==='inbound'){var _0x1b76ff={'id':_0xfc9eac['id'],'name':_0xfc9eac[_0xc720('0x48')],'strategy':_0xfc9eac[_0xc720('0x4f')],'answered':_0xfc9eac[_0xc720('0x50')],'available':_0xfc9eac[_0xc720('0x51')],'loggedIn':_0xfc9eac[_0xc720('0x52')],'pTalking':_0xfc9eac[_0xc720('0x32')],'sumBillable':_0xfc9eac[_0xc720('0x53')],'sumDuration':_0xfc9eac['sumDuration'],'sumHoldTime':_0xfc9eac[_0xc720('0x54')]||0x0,'talking':_0xfc9eac[_0xc720('0x55')],'total':_0xfc9eac[_0xc720('0x56')],'type':_0xfc9eac[_0xc720('0x4e')],'unmanaged':_0xfc9eac[_0xc720('0x57')],'abandoned':_0xfc9eac[_0xc720('0x58')],'waiting':_0xfc9eac['waiting']};if(_0xfc9eac[_0xc720('0x59')]){_0x1b76ff['Trunk']={'id':_0xfc9eac[_0xc720('0x59')]['id'],'name':_0xfc9eac[_0xc720('0x59')][_0xc720('0x48')],'active':_0xfc9eac[_0xc720('0x59')]['active'],'callerid':_0xfc9eac[_0xc720('0x59')][_0xc720('0x5a')]};}if(_0xfc9eac[_0xc720('0x5b')]){_0x1b76ff['Interval']={'id':_0xfc9eac['Interval']['id'],'name':_0xfc9eac['Interval']['name']};}var _0x4f152c=md5(JSON[_0xc720('0x5c')](_0x1b76ff));if(_0xfc9eac['md5']!==_0x4f152c){_0xfc9eac[_0xc720('0x2')]=_0x4f152c;logger['debug'](_0xc720('0x5d')+_0x3e53f8+']\x20sending\x20voice_queue:save\x20event:',util[_0xc720('0x3c')](_0x1b76ff,{'showHidden':![],'depth':null}));this[_0xc720('0x42')](util['format'](_0xc720('0x47'),_0x1b76ff[_0xc720('0x48')]),'voice_queue:save',_0x1b76ff);}}};VoiceQueueReport[_0xc720('0xb')][_0xc720('0x5e')]=function(_0x5dbed4){return _0x5dbed4!==null&&!_[_0xc720('0x5f')](_0x5dbed4);};VoiceQueueReport[_0xc720('0xb')][_0xc720('0x2e')]=function(){var _0x2980fb=this;setInterval(function(){_0x2980fb[_0xc720('0x35')]();ami[_0xc720('0x37')]({'action':'queues'})['catch'](function(_0x2d3c41){logger[_0xc720('0x3d')](_0xc720('0x60'),util[_0xc720('0x3c')](_0x2d3c41,{'showHidden':![],'depth':null}));});},0x2710);};VoiceQueueReport[_0xc720('0xb')]['loopQueueSummary']=function(){var _0x3ed89b=this;setInterval(function(){if(_0x3ed89b['flagQueueSummary']){return ami[_0xc720('0x37')]({'action':_0xc720('0x17')})[_0xc720('0x61')](function(_0x3e9609){_0x3ed89b[_0xc720('0x62')]=![];})[_0xc720('0x3a')](function(_0x4200e1){logger[_0xc720('0x3d')](_0xc720('0x63'),util[_0xc720('0x3c')](_0x4200e1,{'showHidden':![],'depth':null}));});}},0x3e8);};VoiceQueueReport[_0xc720('0xb')][_0xc720('0x64')]=function(_0x379edd){try{if(this[_0xc720('0x5e')](_0x379edd)&&this[_0xc720('0x5e')](_0x379edd[_0xc720('0x65')])){logger[_0xc720('0x4a')](_0xc720('0x66'),util[_0xc720('0x3c')](_0x379edd,{'showHidden':![],'depth':null}));if(this[_0xc720('0x14')][_0x379edd[_0xc720('0x65')]]){logger['info'](_0xc720('0x67'),_0x379edd[_0xc720('0x65')]);var _0x5b1751=_[_0xc720('0x68')](this[_0xc720('0x12')],_0xc720('0x65'))[_0x379edd['queue']]||0x0;var _0x47e7c5=_0x5b1751-_0x379edd['callers'];if(this[_0xc720('0x14')][_0x379edd[_0xc720('0x65')]]['waiting']!==_['toNumber'](_0x379edd[_0xc720('0x69')])||this[_0xc720('0x14')][_0x379edd['queue']]['loggedIn']!==_[_0xc720('0x6a')](_0x379edd[_0xc720('0x6b')])||this['voiceQueues'][_0x379edd[_0xc720('0x65')]][_0xc720('0x51')]!==_[_0xc720('0x6a')](_0x379edd[_0xc720('0x51')])||this[_0xc720('0x14')][_0x379edd[_0xc720('0x65')]][_0xc720('0x55')]!==_0x47e7c5){this['voiceQueues'][_0x379edd[_0xc720('0x65')]][_0xc720('0x33')]=_[_0xc720('0x6a')](_0x379edd[_0xc720('0x69')]);this[_0xc720('0x14')][_0x379edd[_0xc720('0x65')]]['loggedIn']=_[_0xc720('0x6a')](_0x379edd[_0xc720('0x6b')]);this[_0xc720('0x14')][_0x379edd[_0xc720('0x65')]][_0xc720('0x51')]=_[_0xc720('0x6a')](_0x379edd[_0xc720('0x51')]);this['voiceQueues'][_0x379edd[_0xc720('0x65')]][_0xc720('0x55')]=_0x47e7c5>0x0?_0x47e7c5:0x0;this['voiceQueues'][_0x379edd[_0xc720('0x65')]][_0xc720('0x55')]=this[_0xc720('0x14')][_0x379edd[_0xc720('0x65')]][_0xc720('0x55')]>_[_0xc720('0x6a')](_0x379edd['loggedin'])?_['toNumber'](_0x379edd[_0xc720('0x6b')]):this[_0xc720('0x14')][_0x379edd[_0xc720('0x65')]]['talking'];this[_0xc720('0x6c')](this['voiceQueues'][_0x379edd[_0xc720('0x65')]],_0xc720('0x17'));}logger[_0xc720('0x4a')](_0xc720('0x6d'),util[_0xc720('0x3c')](this[_0xc720('0x14')][_0x379edd['queue']],{'showHidden':![],'depth':null}));ami[_0xc720('0x42')](_0xc720('0x6e'),this['voiceQueues'][_0x379edd[_0xc720('0x65')]]);}}}catch(_0x4040e9){logger[_0xc720('0x3d')](_0xc720('0x63'),util[_0xc720('0x3c')](_0x4040e9,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0xc720('0x1a')]=function(_0x35f916){logger[_0xc720('0x4a')](_0xc720('0x6f'),util[_0xc720('0x3c')](_0x35f916,{'showHidden':![],'depth':null}));this[_0xc720('0x62')]=!![];};VoiceQueueReport[_0xc720('0xb')][_0xc720('0x1c')]=function(_0x46e301){try{if(this[_0xc720('0x5e')](_0x46e301)){logger['debug'](_0xc720('0x70'),_0x46e301[_0xc720('0x4c')],util[_0xc720('0x3c')](_0x46e301,{'showHidden':![],'depth':null}));if(_[_0xc720('0x5f')](this[_0xc720('0x10')][_0x46e301[_0xc720('0x4c')]])){this[_0xc720('0x10')][_0x46e301[_0xc720('0x4c')]]=[];this[_0xc720('0x12')][_0x46e301[_0xc720('0x4c')]]={};}var _0xc29c71=new QueueReport();_0xc29c71[_0xc720('0x48')]=_0x46e301[_0xc720('0x65')];_0xc29c71['type']=this['voiceQueues'][_0xc29c71['name']]&&this[_0xc720('0x14')][_0xc29c71[_0xc720('0x48')]][_0xc720('0x4e')]?this['voiceQueues'][_0xc29c71['name']]['type']||_0xc720('0x71'):_0xc720('0x71');_0xc29c71['queue']=_0x46e301[_0xc720('0x65')];_0xc29c71[_0xc720('0x72')]=moment()[_0xc720('0x46')]('YYYY-MM-DD\x20HH:mm:ss');_0xc29c71[_0xc720('0x73')]=_0x46e301[_0xc720('0x73')];_0xc29c71[_0xc720('0x74')]=_0x46e301[_0xc720('0x74')];_0xc29c71[_0xc720('0x4c')]=_0x46e301['uniqueid'];logger[_0xc720('0x75')](_0xc720('0x76'),_0xc29c71[_0xc720('0x48')],_0xc29c71[_0xc720('0x4e')]);_[_0xc720('0x77')](_0xc29c71,_[_0xc720('0x78')](_0x46e301,_[_0xc720('0x79')](_0xc29c71)));this[_0xc720('0x10')][_0x46e301[_0xc720('0x4c')]][_0xc720('0x7a')](_0xc29c71);this['channels'][_0x46e301[_0xc720('0x4c')]]=_0xc29c71;this[_0xc720('0x43')](_0xc29c71,_0xc720('0x1b'));}}catch(_0x5b56b2){logger[_0xc720('0x3d')](_0xc720('0x70'),_0x46e301[_0xc720('0x4c')],util[_0xc720('0x3c')](_0x5b56b2,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xc720('0xb')][_0xc720('0x1e')]=function(_0x5bec36){try{if(this['isNotNull'](_0x5bec36)){logger[_0xc720('0x4a')](_0xc720('0x7b'),_0x5bec36[_0xc720('0x4c')],util[_0xc720('0x3c')](_0x5bec36,{'showHidden':![],'depth':null}));if(this[_0xc720('0x10')][_0x5bec36['uniqueid']]){var _0x240440=_['last'](this[_0xc720('0x10')][_0x5bec36[_0xc720('0x4c')]]);_0x240440['queuecallercomplete']=![];_0x240440[_0xc720('0x7c')]=null;_0x240440['holdtime']=_0x5bec36[_0xc720('0x7d')];_0x240440[_0xc720('0x7e')]=_0x5bec36['originalposition'];_0x240440['queuecallerabandon']=!![];_0x240440[_0xc720('0x7f')]=moment()[_0xc720('0x46')](_0xc720('0x80'));_0x240440[_0xc720('0x81')]=_0xc720('0x82');_0x240440[_0xc720('0x83')]=null;logger[_0xc720('0x75')](_0xc720('0x84'),_0x240440[_0xc720('0x48')],_0x240440[_0xc720('0x4e')]);this[_0xc720('0x12')][_0x5bec36['uniqueid']]=_0x240440;this['emitVoiceQueueChannelRemove'](_0x240440,_0xc720('0x1d'));}}}catch(_0x4e36aa){logger['error'](_0xc720('0x7b'),_0x5bec36[_0xc720('0x4c')],util[_0xc720('0x3c')](_0x4e36aa,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xc720('0xb')][_0xc720('0x1f')]=function(_0x3d2996){try{if(this[_0xc720('0x5e')](_0x3d2996)){logger['debug'](_0xc720('0x85'),_0x3d2996[_0xc720('0x4c')],util[_0xc720('0x3c')](_0x3d2996,{'showHidden':![],'depth':null}));if(this[_0xc720('0x10')][_0x3d2996['uniqueid']]){var _0x308806=_[_0xc720('0x86')](this[_0xc720('0x10')][_0x3d2996[_0xc720('0x4c')]]);_0x308806[_0xc720('0x87')]=moment()[_0xc720('0x46')](_0xc720('0x80'));_0x308806[_0xc720('0x88')]=_0x3d2996[_0xc720('0x88')];_0x308806[_0xc720('0x89')]=_0x3d2996[_0xc720('0x89')];logger[_0xc720('0x75')](_0xc720('0x8a'),_0x308806[_0xc720('0x48')],_0x308806[_0xc720('0x4e')],_0x3d2996[_0xc720('0x88')],_0x3d2996['connectedlinename']);this[_0xc720('0x12')][_0x3d2996['uniqueid']]=_0x308806;this[_0xc720('0x43')](_0x308806,_0xc720('0x8b'));}}}catch(_0xb57e5f){logger[_0xc720('0x3d')](_0xc720('0x85'),_0x3d2996['uniqueid'],util[_0xc720('0x3c')](_0xb57e5f,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype']['syncAgentConnect']=function(_0x202891){try{if(this[_0xc720('0x5e')](_0x202891)){logger[_0xc720('0x4a')](_0xc720('0x8c'),_0x202891[_0xc720('0x4c')],util[_0xc720('0x3c')](_0x202891,{'showHidden':![],'depth':null}));if(this[_0xc720('0x10')][_0x202891[_0xc720('0x4c')]]){var _0xb3a698=_[_0xc720('0x86')](this[_0xc720('0x10')][_0x202891['uniqueid']]);_0xb3a698[_0xc720('0x8d')]=!![];_0xb3a698[_0xc720('0x81')]='COMPLETEDBYAGENT';logger['info'](_0xc720('0x8e'),_0xb3a698[_0xc720('0x48')],_0xb3a698['type']);}}}catch(_0x4118fe){logger[_0xc720('0x3d')](_0xc720('0x8c'),_0x202891[_0xc720('0x4c')],util['inspect'](_0x4118fe,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xc720('0xb')][_0xc720('0x21')]=function(_0x5ad6e5){try{if(this[_0xc720('0x5e')](_0x5ad6e5)){logger[_0xc720('0x4a')](_0xc720('0x8f'),_0x5ad6e5['uniqueid'],util[_0xc720('0x3c')](_0x5ad6e5,{'showHidden':![],'depth':null}));if(this[_0xc720('0x10')][_0x5ad6e5[_0xc720('0x4c')]]){var _0x2091dc=_[_0xc720('0x86')](this[_0xc720('0x10')][_0x5ad6e5[_0xc720('0x4c')]]);_0x2091dc[_0xc720('0x1d')]=![];_0x2091dc[_0xc720('0x7f')]=null;_0x2091dc[_0xc720('0x90')]=!![];_0x2091dc[_0xc720('0x83')]=_0x5ad6e5[_0xc720('0x91')];_0x2091dc['holdtime']=_0x5ad6e5[_0xc720('0x7d')];_0x2091dc[_0xc720('0x8d')]=!![];_0x2091dc[_0xc720('0x92')]=![];_0x2091dc['queuecallerexitAt']=null;if(!_0x2091dc[_0xc720('0x93')]){if(_0x5ad6e5['reason']==_0xc720('0x93')){_0x2091dc['queuecallerexitreason']='COMPLETED';logger['info'](_0xc720('0x94'),_0x2091dc[_0xc720('0x48')],_0x2091dc[_0xc720('0x4e')]);}else{if(_[_0xc720('0x95')](_0x5ad6e5['channel'][_0xc720('0x96')](),_0xc720('0x97'))){if(this[_0xc720('0x10')][_0x5ad6e5['linkedid']]){var _0x506112=_[_0xc720('0x86')](this[_0xc720('0x10')][_0x5ad6e5[_0xc720('0x98')]]);_0x506112['queuecallercomplete']=![];_0x506112['queuecallerexit']=!![];_0x506112[_0xc720('0x99')]=moment(_0x2091dc[_0xc720('0x72')])['add'](_0x5ad6e5[_0xc720('0x7d')],_0xc720('0x9a'))[_0xc720('0x46')](_0xc720('0x80'));_0x506112[_0xc720('0x81')]='FORWARDTRANSFER';_0x506112[_0xc720('0x93')]=!![];_0x506112[_0xc720('0x9b')]=_0xc720('0x9c');_0x506112[_0xc720('0x9d')]=_0x5ad6e5[_0xc720('0x9e')];_0x506112[_0xc720('0x9f')]=_0x5ad6e5[_0xc720('0x4c')];logger[_0xc720('0x75')](_0xc720('0xa0'),_0x506112[_0xc720('0x48')],_0x506112[_0xc720('0x4e')]);var _0xf54775=this[_0xc720('0x10')][_0x5ad6e5['linkedid']];this['queueReports'][_0x5ad6e5['linkedid']]=this[_0xc720('0x10')][_0x5ad6e5[_0xc720('0x4c')]];this[_0xc720('0x10')][_0x5ad6e5['uniqueid']]=_0xf54775;}}else{_0x2091dc[_0xc720('0x81')]=_0xc720('0xa1')+_0x5ad6e5[_0xc720('0xa2')][_0xc720('0xa3')]();logger[_0xc720('0x75')](_0xc720('0xa4'),_0x2091dc['name'],_0x2091dc[_0xc720('0x4e')],_0x2091dc[_0xc720('0x81')]);}}}this[_0xc720('0x12')][_0x5ad6e5[_0xc720('0x4c')]]=_0x2091dc;this[_0xc720('0x41')](_0x2091dc,_0xc720('0x20'));}}}catch(_0x4a24a4){logger[_0xc720('0x3d')]('[%s][voiceQueueReport][agentcomplete]',_0x5ad6e5[_0xc720('0x4c')],util['inspect'](_0x4a24a4,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xc720('0xb')][_0xc720('0x25')]=function(_0x5d0e45){try{if(this[_0xc720('0x5e')](_0x5d0e45)){logger[_0xc720('0x4a')]('[%s][voiceQueueReport][varset]',_0x5d0e45[_0xc720('0x4c')],util['inspect'](_0x5d0e45,{'showHidden':![],'depth':null}));this[_0xc720('0xa5')](_0x5d0e45[_0xc720('0x4c')],_['keys'](_0x5d0e45['variable'])[0x0],_0x5d0e45['value']);if(this['queueReports'][_0x5d0e45['uniqueid']]){var _0x4ba3a0=_[_0xc720('0x86')](this[_0xc720('0x10')][_0x5d0e45[_0xc720('0x4c')]]);if(_0x4ba3a0){if(this['isNotNull'](_0x5d0e45[_0xc720('0xa6')])&&this[_0xc720('0x5e')](_0x5d0e45['variable']['queuestatus'])){switch(_0x5d0e45[_0xc720('0xa7')]){case _0xc720('0xa8'):_0x4ba3a0['queuecallerexit']=![];_0x4ba3a0['queuecallerexitAt']=null;break;case _0xc720('0xa9'):_0x4ba3a0['lastevent']=_0xc720('0xaa');_0x4ba3a0[_0xc720('0x92')]=!![];_0x4ba3a0['queuecallerexitAt']=moment()[_0xc720('0x46')](_0xc720('0x80'));_0x4ba3a0[_0xc720('0x87')]=moment()[_0xc720('0x46')](_0xc720('0x80'));logger['debug'](_0xc720('0xab'),_0x5d0e45['uniqueid'],util[_0xc720('0x3c')](_0x4ba3a0,{'showHidden':![],'depth':null}));ami[_0xc720('0x42')](_0xc720('0xac'),_0x4ba3a0);break;default:_0x4ba3a0['queuecallerexit']=!![];_0x4ba3a0['queuecallerexitAt']=moment()[_0xc720('0x46')](_0xc720('0x80'));_0x4ba3a0[_0xc720('0x87')]=moment()['format'](_0xc720('0x80'));}_0x4ba3a0[_0xc720('0x1d')]=![];_0x4ba3a0[_0xc720('0x7f')]=null;_0x4ba3a0[_0xc720('0x81')]=_0x5d0e45[_0xc720('0xa7')];this[_0xc720('0x12')][_0x5d0e45[_0xc720('0x4c')]]=_0x4ba3a0;this[_0xc720('0x41')](_0x4ba3a0,'varset');}else if(this[_0xc720('0x5e')](_0x5d0e45['variable'])&&this[_0xc720('0x5e')](_0x5d0e45[_0xc720('0xa6')]['queueposition'])){if(!_0x4ba3a0[_0xc720('0x1d')]){_0x4ba3a0[_0xc720('0x92')]=!![];_0x4ba3a0['queuecallerexitAt']=moment()[_0xc720('0x46')](_0xc720('0x80'));_0x4ba3a0[_0xc720('0x81')]=_0xc720('0xad');_0x4ba3a0[_0xc720('0x87')]=moment()[_0xc720('0x46')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xc720('0x12')][_0x5d0e45['uniqueid']]=_0x4ba3a0;}}logger['info'](_0xc720('0xae'),_0x5d0e45[_0xc720('0x4c')],_0x4ba3a0['name'],_0x4ba3a0[_0xc720('0x4e')],_['keys'](_0x5d0e45[_0xc720('0xa6')])[0x0],_0x5d0e45['value']);_0x4ba3a0[_0xc720('0x16')]=this[_0xc720('0x16')][_0x5d0e45[_0xc720('0x4c')]];}}}}catch(_0x4f68d3){logger['error'](_0xc720('0xaf'),_0x5d0e45[_0xc720('0x4c')],util[_0xc720('0x3c')](_0x4f68d3,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xc720('0xb')][_0xc720('0xa5')]=function(_0x150369,_0x1b926a,_0x3dffa7){var _0x293a48=['rtpaudioqos','rtpaudioqosbridged',_0xc720('0xb0'),'rtpaudioqosjitterbridged',_0xc720('0xb1'),_0xc720('0xb2'),_0xc720('0xb3'),_0xc720('0xb4'),_0xc720('0xb5'),_0xc720('0xb6'),'bridgepeer',_0xc720('0xb7'),_0xc720('0xb8'),_0xc720('0xb9'),'memberinterface','memberlastcall',_0xc720('0x91'),_0xc720('0xba'),_0xc720('0xbb')];if(!_[_0xc720('0x36')](_0x1b926a)&&!_[_0xc720('0xbc')](_0x293a48,_0x1b926a)){if(_['isUndefined'](this[_0xc720('0x16')][_0x150369])){this[_0xc720('0x16')][_0x150369]={};}this[_0xc720('0x16')][_0x150369][_0x1b926a]=_0x3dffa7;}};VoiceQueueReport[_0xc720('0xb')][_0xc720('0x27')]=function(_0x37f8b7){try{if(this[_0xc720('0x5e')](_0x37f8b7)){logger[_0xc720('0x4a')](_0xc720('0xbd'),_0x37f8b7[_0xc720('0x4c')],util[_0xc720('0x3c')](_0x37f8b7,{'showHidden':![],'depth':null}));if(this[_0xc720('0x10')][_0x37f8b7[_0xc720('0x4c')]]){for(var _0x45bbd3=0x0,_0x5f3c1c={};_0x45bbd3<this['queueReports'][_0x37f8b7[_0xc720('0x4c')]][_0xc720('0xbe')];_0x45bbd3+=0x1){_0x5f3c1c=this[_0xc720('0x10')][_0x37f8b7[_0xc720('0x4c')]][_0x45bbd3];if(this[_0xc720('0x14')][_0x5f3c1c[_0xc720('0x65')]]){if(_0x5f3c1c[_0xc720('0x92')]&&_0x5f3c1c[_0xc720('0x93')]!=!![]){this[_0xc720('0x14')][_0x5f3c1c[_0xc720('0x65')]][_0xc720('0x57')]+=0x1;}if(_0x5f3c1c[_0xc720('0x1d')]){this[_0xc720('0x14')][_0x5f3c1c[_0xc720('0x65')]][_0xc720('0x58')]+=0x1;}this[_0xc720('0x14')][_0x5f3c1c[_0xc720('0x65')]][_0xc720('0x54')]+=moment(_0x5f3c1c[_0xc720('0x87')])[_0xc720('0xbf')](_0x5f3c1c['queuecallerjoinAt'],_0xc720('0x9a'))||0x0;if(_0x45bbd3===this[_0xc720('0x10')][_0x37f8b7[_0xc720('0x4c')]][_0xc720('0xbe')]-0x1){this['voiceQueues'][_0x5f3c1c[_0xc720('0x65')]][_0xc720('0xc0')]+=moment()[_0xc720('0xc1')](0x0)[_0xc720('0xbf')](_0x5f3c1c[_0xc720('0x72')],_0xc720('0x9a'));this[_0xc720('0x14')][_0x5f3c1c[_0xc720('0x65')]]['total']+=0x1;if(_0x5f3c1c['queuecallercomplete']){this['voiceQueues'][_0x5f3c1c[_0xc720('0x65')]][_0xc720('0x50')]+=0x1;this[_0xc720('0x14')][_0x5f3c1c[_0xc720('0x65')]]['sumBillable']+=moment()[_0xc720('0xc1')](0x0)['diff'](_0x5f3c1c[_0xc720('0x87')],_0xc720('0x9a'));_0x5f3c1c[_0xc720('0x7c')]=moment()[_0xc720('0x46')](_0xc720('0x80'));_0x5f3c1c['queuecallerexit']=![];_0x5f3c1c[_0xc720('0x99')]=null;}if(_0x5f3c1c[_0xc720('0x92')]&&_0x5f3c1c[_0xc720('0x93')]!=!![]){_0x5f3c1c[_0xc720('0xc2')]=_0xc720('0x57');logger[_0xc720('0x4a')]('[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerunmanaged\x20event:',_0x37f8b7[_0xc720('0x4c')],util['inspect'](_0x5f3c1c,{'showHidden':![],'depth':null}));ami[_0xc720('0x42')](_0xc720('0xc3'),_0x5f3c1c);}if(_0x5f3c1c[_0xc720('0x1d')]){_0x5f3c1c[_0xc720('0xc2')]=_0xc720('0x58');logger[_0xc720('0x4a')](_0xc720('0xc4'),_0x37f8b7[_0xc720('0x4c')],util[_0xc720('0x3c')](_0x5f3c1c,{'showHidden':![],'depth':null}));ami[_0xc720('0x42')]('custom:queuecallerabandon',_0x5f3c1c);}}else{this['voiceQueues'][_0x5f3c1c['queue']][_0xc720('0xc0')]+=this[_0xc720('0x14')][_0x5f3c1c[_0xc720('0x65')]][_0xc720('0x54')];}logger[_0xc720('0x75')](_0xc720('0xc5'),_0x37f8b7[_0xc720('0x4c')],_0x5f3c1c['name'],_0x5f3c1c['type'],_0x37f8b7['cause-txt']);this['channels'][_0x37f8b7[_0xc720('0x4c')]]=_0x5f3c1c;this['emitVoiceQueueChannelRemove'](_0x5f3c1c,_0xc720('0x26'));this[_0xc720('0x6c')](this[_0xc720('0x14')][_0x5f3c1c[_0xc720('0x65')]],_0xc720('0x26'));}}logger['debug'](_0xc720('0xc6'),_0x37f8b7[_0xc720('0x4c')],util[_0xc720('0x3c')](this[_0xc720('0x10')][_0x37f8b7['uniqueid']],{'showHidden':![],'depth':null}));ami[_0xc720('0x42')](_0xc720('0xc7'),this[_0xc720('0x10')][_0x37f8b7[_0xc720('0x4c')]]);delete this[_0xc720('0x10')][_0x37f8b7[_0xc720('0x4c')]];delete this['channels'][_0x37f8b7[_0xc720('0x4c')]];}if(this[_0xc720('0x16')][_0x37f8b7[_0xc720('0x4c')]]){delete this[_0xc720('0x16')][_0x37f8b7[_0xc720('0x4c')]];}}}catch(_0x329817){logger[_0xc720('0x3d')]('[%s][voiceQueueReport][hangup]',_0x37f8b7['uniqueid'],util[_0xc720('0x3c')](_0x329817,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0xc720('0xc8')]=function(_0x256ed0){try{if(this[_0xc720('0x5e')](_0x256ed0)){logger[_0xc720('0x4a')](_0xc720('0xc9'),_0x256ed0[_0xc720('0x4c')],util[_0xc720('0x3c')](_0x256ed0,{'showHidden':![],'depth':null}));var _0x2b43c1;if(this[_0xc720('0x10')][_0x256ed0[_0xc720('0xca')]]){_0x2b43c1=_['last'](this[_0xc720('0x10')][_0x256ed0[_0xc720('0xca')]]);_0x2b43c1[_0xc720('0x9d')]=_0x256ed0['secondtransfererexten'];_0x2b43c1['transferuniqueid']=_0x256ed0[_0xc720('0xcb')];_0x2b43c1[_0xc720('0x81')]=_0xc720('0xcc');_0x2b43c1[_0xc720('0x93')]=!![];_0x2b43c1['transfertype']=_0xc720('0xcd');if(this[_0xc720('0x10')][_0x256ed0[_0xc720('0xcb')]]){var _0x584c48=this['queueReports'][_0x256ed0[_0xc720('0xcb')]];this['queueReports'][_0x256ed0[_0xc720('0xcb')]]=this['queueReports'][_0x256ed0[_0xc720('0xca')]];this['queueReports'][_0x256ed0[_0xc720('0xca')]]=_0x584c48;var _0x5d3483=_[_0xc720('0x86')](this[_0xc720('0x10')][_0x256ed0[_0xc720('0xca')]]);_0x5d3483[_0xc720('0xce')]=!![];}logger[_0xc720('0x75')](_0xc720('0xcf'),_0x256ed0['uniqueid'],_0x2b43c1[_0xc720('0x48')],_0x2b43c1[_0xc720('0x4e')],_0x2b43c1['transferexten'],_0x2b43c1['transferuniqueid']);}else if(this[_0xc720('0x10')][_0x256ed0[_0xc720('0xd0')]]){_0x2b43c1=_[_0xc720('0x86')](this['queueReports'][_0x256ed0[_0xc720('0xd0')]]);_0x2b43c1[_0xc720('0x9d')]=_0x256ed0['origtransfererexten'];_0x2b43c1[_0xc720('0x9f')]=_0x256ed0['origtransfereruniqueid'];_0x2b43c1['queuecallerexitreason']='ATTENDEDTRANSFER';_0x2b43c1[_0xc720('0x93')]=!![];_0x2b43c1[_0xc720('0x9b')]=_0xc720('0xcd');if(this[_0xc720('0x10')][_0x256ed0[_0xc720('0xd1')]]){var _0x584c48=this[_0xc720('0x10')][_0x256ed0[_0xc720('0xd1')]];this[_0xc720('0x10')][_0x256ed0[_0xc720('0xd1')]]=this[_0xc720('0x10')][_0x256ed0[_0xc720('0xd0')]];this['queueReports'][_0x256ed0[_0xc720('0xd0')]]=_0x584c48;var _0x5d3483=_['last'](this[_0xc720('0x10')][_0x256ed0[_0xc720('0xd0')]]);_0x5d3483[_0xc720('0xce')]=!![];}logger[_0xc720('0x75')]('[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s',_0x256ed0[_0xc720('0x4c')],_0x2b43c1['name'],_0x2b43c1[_0xc720('0x4e')],_0x2b43c1[_0xc720('0x9d')],_0x2b43c1[_0xc720('0x9f')]);}}}catch(_0x65a4bc){logger[_0xc720('0x3d')](_0xc720('0xc9'),_0x256ed0['uniqueid'],util[_0xc720('0x3c')](_0x65a4bc,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xc720('0xb')][_0xc720('0x2d')]=function(_0x29a1b1){try{if(this[_0xc720('0x5e')](_0x29a1b1)){logger[_0xc720('0x4a')](_0xc720('0xd2'),_0x29a1b1['uniqueid'],util[_0xc720('0x3c')](_0x29a1b1,{'showHidden':![],'depth':null}));if(this[_0xc720('0x10')][_0x29a1b1['transfereeuniqueid']]){var _0x297f7d=_[_0xc720('0x86')](this[_0xc720('0x10')][_0x29a1b1[_0xc720('0xca')]]);_0x297f7d[_0xc720('0x81')]=_0xc720('0xd3');_0x297f7d[_0xc720('0x93')]=!![];_0x297f7d['transfertype']='BLIND';_0x297f7d[_0xc720('0x9d')]=_0x29a1b1['extension'];_0x297f7d[_0xc720('0x9f')]=_0x29a1b1[_0xc720('0xca')];logger[_0xc720('0x75')](_0xc720('0xd4'),_0x29a1b1['uniqueid'],_0x297f7d[_0xc720('0x48')],_0x297f7d[_0xc720('0x4e')],_0x297f7d[_0xc720('0x9d')],_0x297f7d['transferuniqueid']);this['syncHangup']({'event':'BlindTransfer','uniqueid':_0x29a1b1[_0xc720('0xca')],'context':_0x29a1b1[_0xc720('0xd5')],'channel':_0x29a1b1['transfererchannel']});}}}catch(_0x3509eb){logger[_0xc720('0x3d')](_0xc720('0xd2'),_0x29a1b1['uniqueid'],util[_0xc720('0x3c')](_0x3509eb,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0xc720('0x29')]=function(_0xe9e24){try{if(this[_0xc720('0x5e')](_0xe9e24)){logger['debug'](_0xc720('0xd6'),_0xe9e24[_0xc720('0x4c')],util[_0xc720('0x3c')](_0xe9e24,{'showHidden':![],'depth':null}));if(this['queueReports'][_0xe9e24[_0xc720('0x4c')]]){var _0x418d64=_[_0xc720('0x86')](this['queueReports'][_0xe9e24[_0xc720('0x4c')]]);if(!_['isNil'](_0x418d64[_0xc720('0x87')])){_0x418d64[_0xc720('0xd7')]=moment()[_0xc720('0x46')](_0xc720('0x80'));logger[_0xc720('0x75')](_0xc720('0xd8'),_0xe9e24[_0xc720('0x4c')],_0x418d64[_0xc720('0xd7')]);}}}}catch(_0x1b5b2d){logger[_0xc720('0x3d')](_0xc720('0xd6'),_0xe9e24[_0xc720('0x4c')],util['inspect'](_0x1b5b2d,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0xc720('0x2b')]=function(_0x181c2f){try{if(this['isNotNull'](_0x181c2f)){logger[_0xc720('0x4a')](_0xc720('0xd9'),_0x181c2f[_0xc720('0x4c')],util[_0xc720('0x3c')](_0x181c2f,{'showHidden':![],'depth':null}));if(this[_0xc720('0x10')][_0x181c2f['uniqueid']]){var _0x42649f=_[_0xc720('0x86')](this[_0xc720('0x10')][_0x181c2f[_0xc720('0x4c')]]);if(!_['isNil'](_0x42649f[_0xc720('0xd7')])){_0x42649f[_0xc720('0xda')]+=moment()[_0xc720('0xc1')](0x0)[_0xc720('0xbf')](_0x42649f[_0xc720('0xd7')],_0xc720('0x9a'));logger[_0xc720('0x75')](_0xc720('0xdb'),_0x181c2f[_0xc720('0x4c')],_0x42649f['mohtime']);delete _0x42649f[_0xc720('0xd7')];}}}}catch(_0x3139b2){logger[_0xc720('0x3d')](_0xc720('0xd9'),_0x181c2f[_0xc720('0x4c')],util['inspect'](_0x3139b2,{'showHidden':![],'depth':null}));}};module[_0xc720('0xdc')]=VoiceQueueReport;