Built motion from commit (unavailable).|2.5.31
[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 _0x3a25=['merge','push','emitVoiceQueueChannelSave','[%s][voiceQueueReport][queuecallerabandon]','last','queuecallercomplete','queuecallercompleteAt','holdtime','originalposition','queuecallerabandon','queuecallerabandonAt','queuecallerexitreason','ABANDONED','[voiceQueueReport][queuecallerabandon]\x20name:%s\x20type:%s','[%s][voiceQueueReport][queuecallerleave]','queuecallerleaveAt','connectedlinenum','connectedlinename','[voiceQueueReport][queuecallerleave]\x20name:%s\x20type:%s\x20connectedlinenum:%s\x20connectedlinename:%s','[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT','syncAgentComplete','[%s][voiceQueueReport][agentcomplete]','assigned','lastAssignedTo','membername','queuecallerexit','transfer','reason','COMPLETED','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETED','startsWith','toLowerCase','local/','linkedid','queuecallerexitAt','add','FORWARDTRANSFER','transfertype','transferexten','destexten','transferuniqueid','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:FORWARDTRANSFER','COMPLETEDBY','toUpperCase','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:%s','agentcomplete','[%s][voiceQueueReport][varset]','addVariable','keys','value','variable','queuestatus','CONTINUE','TIMEOUT','lastevent','timeout','[%s][voiceQueueReport][varset]\x20sending\x20timeout\x20event:','custom:timeout','queueposition','EXITWITHKEY','[%s][voiceQueueReport][varset]\x20name:%s\x20type:%s\x20variable:%s\x20value:%s','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqosrtt','sipcallid','bridgepeer','bridgepvtcallid','membercalls','memberdynamic','memberinterface','memberlastcall','memberpenalty','memberrealtime','[%s][voiceQueueReport][hangup]','unmanaged','abandoned','diff','seconds','length','sumBillable','milliseconds','[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerunmanaged\x20event:','custom:queuecallerunmanaged','custom:queuecallerabandon','[%s][voiceQueueReport][hangup]\x20name:%s\x20type:%s\x20reason:%s','cause-txt','hangup','[%s][voiceQueueReport][hangup]\x20sending\x20voiceQueueReport\x20event:','custom:voiceQueueReport','[%s][voiceQueueReport][attendedtransfer]','transfereeuniqueid','secondtransfererexten','secondtransfereruniqueid','ATTENDEDTRANSFER','ATTENDED','[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','transfertargetuniqueid','origtransfererexten','origtransfereruniqueid','BLINDTRANSFER','BLIND','[%s][voiceQueueReport][blindTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','BlindTransfer','context','transfererchannel','[%s][voiceQueueReport][musiconholdstart]','mohstarttime','[%s][voiceQueueReport][musiconholdstart]\x20mohstarttime:%s','mohtime','[%s][voiceQueueReport][musiconholdstop]','exports','lodash','moment','util','md5','ioredis','../../../config/environment','../../../config/logger','ami','../ami','../model/queueReport','redis','defaults','localhost','socket.io-emitter','prototype','tail','finally','sequence','queueReports','agents','voiceQueues','variables','queuesummary','syncQueueSummary','bind','queuecallerjoin','syncQueueCallerJoin','syncQueueCallerAbandon','queuecallerleave','syncQueueCallerLeave','agentconnect','syncAgentConnect','varset','syncVarSet','syncHangup','syncFullyBooted','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','loopQueueShow','isEmpty','hasOwnProperty','originated','talking','pTalking','waiting','queueStatusComplete','unlockRR','clearZombieChannels','channels','switch','enqueue','isNil','Action','status','channel','catch','message','No\x20such\x20channel','error','[%s][voiceQueueReport][checkChannel]','inspect','[%s][voiceQueueReport][checkQueueReport]','[%s][voiceQueueReport][checkVariables]','clearQueueReport','campaigns','clearqueuereport','emit','debug','[%s][voiceQueueReport][',']\x20sending\x20voice_queue_channel:save\x20event:','voice:queue:%s','name','emitVoiceQueueChannelRemove','uniqueid','format','voice_queue_channel:remove','voice_queue_presence:remove','emitVoiceQueueSummary','type','inbound','strategy','answered','sumHoldTime','total','Trunk','active','Interval','stringify','[voiceQueueReport][',']\x20sending\x20voice_queue:save\x20event:','voice_queue:save','isNotNull','isUndefined','queues','[voiceQueueReport][queues]','flagQueueSummary','then','[voiceQueueReport][queuesummary]','queue','[voiceQueueReport][queuesummary]\x20event:','info','[voiceQueueReport][queuesummary]\x20name:%s','callers','toNumber','loggedIn','loggedin','available','[voiceQueueReport][queuesummary]\x20sending\x20queuesummary\x20event:','custom:queuesummary','syncQueueSummaryComplete','[voiceQueueReport][queuesummarycomplete]\x20event:','[%s][voiceQueueReport][queuecallerjoin]','queuecallerjoinAt','YYYY-MM-DD\x20HH:mm:ss','position','count','[voiceQueueReport][queuecallerjoin]\x20name:%s\x20type:%s'];(function(_0x252cb3,_0x20b172){var _0x2f4c59=function(_0x3a4cb3){while(--_0x3a4cb3){_0x252cb3['push'](_0x252cb3['shift']());}};_0x2f4c59(++_0x20b172);}(_0x3a25,0x15d));var _0x53a2=function(_0x26921a,_0x2f5719){_0x26921a=_0x26921a-0x0;var _0x27bf99=_0x3a25[_0x26921a];return _0x27bf99;};'use strict';var _=require(_0x53a2('0x0'));var moment=require(_0x53a2('0x1'));var util=require(_0x53a2('0x2'));var md5=require(_0x53a2('0x3'));var Redis=require(_0x53a2('0x4'));var config=require(_0x53a2('0x5'));var logger=require(_0x53a2('0x6'))(_0x53a2('0x7'));var ami=require(_0x53a2('0x8'));var QueueReport=require(_0x53a2('0x9'));config[_0x53a2('0xa')]=_[_0x53a2('0xb')](config[_0x53a2('0xa')],{'host':_0x53a2('0xc'),'port':0x18eb});var io=require(_0x53a2('0xd'))(new Redis(config['redis']));var Sequence=function(){};Sequence[_0x53a2('0xe')]['enqueue']=function(_0x17aa09){this[_0x53a2('0xf')]=this[_0x53a2('0xf')]?this[_0x53a2('0xf')][_0x53a2('0x10')](_0x17aa09):_0x17aa09();};function VoiceQueueReport(_0x45f0c4){this[_0x53a2('0x11')]=new Sequence();this[_0x53a2('0x12')]={};this[_0x53a2('0x13')]=_0x45f0c4[_0x53a2('0x13')];this['channels']=_0x45f0c4['queueChannels'];this[_0x53a2('0x14')]=_0x45f0c4[_0x53a2('0x14')];this['flagQueueSummary']=!![];this['campaigns']=_0x45f0c4['campaigns'];this[_0x53a2('0x15')]={};ami['on'](_0x53a2('0x16'),this[_0x53a2('0x17')]['bind'](this));ami['on']('queuesummarycomplete',this['syncQueueSummaryComplete'][_0x53a2('0x18')](this));ami['on'](_0x53a2('0x19'),this[_0x53a2('0x1a')][_0x53a2('0x18')](this));ami['on']('queuecallerabandon',this[_0x53a2('0x1b')][_0x53a2('0x18')](this));ami['on'](_0x53a2('0x1c'),this[_0x53a2('0x1d')][_0x53a2('0x18')](this));ami['on']('agentcomplete',this['syncAgentComplete'][_0x53a2('0x18')](this));ami['on'](_0x53a2('0x1e'),this[_0x53a2('0x1f')][_0x53a2('0x18')](this));ami['on'](_0x53a2('0x20'),this[_0x53a2('0x21')]['bind'](this));ami['on']('hangup',this[_0x53a2('0x22')][_0x53a2('0x18')](this));ami['on']('fullybooted',this[_0x53a2('0x23')][_0x53a2('0x18')](this));ami['on'](_0x53a2('0x24'),this[_0x53a2('0x25')]['bind'](this));ami['on'](_0x53a2('0x26'),this[_0x53a2('0x27')][_0x53a2('0x18')](this));ami['on'](_0x53a2('0x28'),this[_0x53a2('0x29')][_0x53a2('0x18')](this));ami['on'](_0x53a2('0x2a'),this[_0x53a2('0x2b')]['bind'](this));this['loopQueueSummary']();this[_0x53a2('0x2c')]();}function clearChannels(_0xfe0a61){if(!_[_0x53a2('0x2d')](_0xfe0a61)){for(var _0x2852a1 in _0xfe0a61){if(_0xfe0a61[_0x53a2('0x2e')](_0x2852a1)){delete _0xfe0a61[_0x2852a1];}}}}function clearCampaigns(_0xa39167){if(!_['isEmpty'](_0xa39167)){for(var _0x2dfa00 in _0xa39167){if(_0xa39167[_0x53a2('0x2e')](_0x2dfa00)){_0xa39167[_0x2dfa00][_0x53a2('0x2f')]=0x0;}}}}function clearVoiceQueues(_0x397340){if(!_[_0x53a2('0x2d')](_0x397340)){for(var _0x3e4e69 in _0x397340){if(_0x397340[_0x53a2('0x2e')](_0x3e4e69)){_0x397340[_0x3e4e69][_0x53a2('0x2f')]=0x0;_0x397340[_0x3e4e69][_0x53a2('0x30')]=0x0;_0x397340[_0x3e4e69][_0x53a2('0x31')]=0x0;_0x397340[_0x3e4e69][_0x53a2('0x32')]=0x0;_0x397340[_0x3e4e69][_0x53a2('0x33')]=!![];}}}}function clearAgentBooked(_0x262eba){if(!_[_0x53a2('0x2d')](_0x262eba)){for(var _0x2a6428 in _0x262eba){if(_0x262eba[_0x53a2('0x2e')](_0x2a6428)){_0x262eba[_0x2a6428][_0x53a2('0x34')]=!![];}}}}VoiceQueueReport['prototype'][_0x53a2('0x35')]=function(){var _0x906e56=this;for(var _0x286e70 in this[_0x53a2('0x36')]){if(this[_0x53a2('0x36')][_0x53a2('0x2e')](_0x286e70)&&!this[_0x53a2('0x36')][_0x286e70][_0x53a2('0x37')]){this[_0x53a2('0x11')][_0x53a2('0x38')](function(){if(!_[_0x53a2('0x39')](_0x906e56['channels'][_0x286e70])){return ami[_0x53a2('0x3a')]({'action':_0x53a2('0x3b'),'channel':_0x906e56[_0x53a2('0x36')][_0x286e70][_0x53a2('0x3c')]})[_0x53a2('0x3d')](function(_0x2dcc48){if(_0x2dcc48[_0x53a2('0x3e')]===_0x53a2('0x3f')){setTimeout(function(){if(_0x906e56['channels'][_0x286e70]){delete _0x906e56[_0x53a2('0x36')][_0x286e70];logger[_0x53a2('0x40')](_0x53a2('0x41'),_0x286e70,util[_0x53a2('0x42')](_0x2dcc48,{'showHidden':![],'depth':null}));}if(_0x906e56['queueReports'][_0x286e70]){delete _0x906e56[_0x53a2('0x12')][_0x286e70];logger[_0x53a2('0x40')](_0x53a2('0x43'),_0x286e70,util[_0x53a2('0x42')](_0x2dcc48,{'showHidden':![],'depth':null}));}if(_0x906e56[_0x53a2('0x15')][_0x286e70]){delete _0x906e56[_0x53a2('0x15')][_0x286e70];logger['error'](_0x53a2('0x44'),_0x286e70,util[_0x53a2('0x42')](_0x2dcc48,{'showHidden':![],'depth':null}));}},0x1f40);}});}});}}};VoiceQueueReport[_0x53a2('0xe')]['syncFullyBooted']=function(){logger[_0x53a2('0x40')]('[FullyBooted]\x20clear\x20realtime');clearChannels(this[_0x53a2('0x36')]);this[_0x53a2('0x45')](this[_0x53a2('0x12')]);clearAgentBooked(this['agents']);clearVoiceQueues(this['voiceQueues']);clearCampaigns(this[_0x53a2('0x46')]);};VoiceQueueReport['prototype'][_0x53a2('0x45')]=function(_0x397cfb){var _0x18d5d6=this;if(!_[_0x53a2('0x2d')](_0x397cfb)){for(var _0x2f85db in _0x397cfb){if(_0x397cfb[_0x53a2('0x2e')](_0x2f85db)){_0x18d5d6['emitVoiceQueueChannelRemove'](_0x397cfb[_0x2f85db],_0x53a2('0x47'));delete _0x397cfb[_0x2f85db];}}}};VoiceQueueReport[_0x53a2('0xe')]['emit']=function(_0x536e65,_0x31e0b1,_0x480f35){io['to'](_0x536e65)[_0x53a2('0x48')](_0x31e0b1,_0x480f35);};VoiceQueueReport[_0x53a2('0xe')]['emitVoiceQueueChannelSave']=function(_0x22fede,_0x19d28e){logger[_0x53a2('0x49')](_0x53a2('0x4a')+_0x19d28e+_0x53a2('0x4b'),_0x22fede['uniqueid'],util[_0x53a2('0x42')](_0x22fede,{'showHidden':![],'depth':null}));this[_0x53a2('0x48')](util['format'](_0x53a2('0x4c'),_0x22fede[_0x53a2('0x4d')]),'voice_queue_channel:save',_0x22fede);io[_0x53a2('0x48')]('voice_queue_presence:save',_0x22fede);};VoiceQueueReport[_0x53a2('0xe')][_0x53a2('0x4e')]=function(_0x41689b,_0x15b50b){logger[_0x53a2('0x49')](_0x53a2('0x4a')+_0x15b50b+']\x20sending\x20voice_queue_channel:remove\x20event:',_0x41689b[_0x53a2('0x4f')],util[_0x53a2('0x42')](_0x41689b,{'showHidden':![],'depth':null}));this[_0x53a2('0x48')](util[_0x53a2('0x50')](_0x53a2('0x4c'),_0x41689b[_0x53a2('0x4d')]),_0x53a2('0x51'),_0x41689b);io[_0x53a2('0x48')](_0x53a2('0x52'),_0x41689b);};VoiceQueueReport[_0x53a2('0xe')][_0x53a2('0x53')]=function(_0x43036e,_0x961380){if(_0x43036e[_0x53a2('0x54')]===_0x53a2('0x55')){var _0x1338f2={'id':_0x43036e['id'],'name':_0x43036e['name'],'strategy':_0x43036e[_0x53a2('0x56')],'answered':_0x43036e[_0x53a2('0x57')],'available':_0x43036e['available'],'loggedIn':_0x43036e['loggedIn'],'pTalking':_0x43036e[_0x53a2('0x31')],'sumBillable':_0x43036e['sumBillable'],'sumDuration':_0x43036e['sumDuration'],'sumHoldTime':_0x43036e[_0x53a2('0x58')]||0x0,'talking':_0x43036e[_0x53a2('0x30')],'total':_0x43036e[_0x53a2('0x59')],'type':_0x43036e[_0x53a2('0x54')],'unmanaged':_0x43036e['unmanaged'],'abandoned':_0x43036e['abandoned'],'waiting':_0x43036e['waiting']};if(_0x43036e[_0x53a2('0x5a')]){_0x1338f2['Trunk']={'id':_0x43036e['Trunk']['id'],'name':_0x43036e[_0x53a2('0x5a')][_0x53a2('0x4d')],'active':_0x43036e[_0x53a2('0x5a')][_0x53a2('0x5b')],'callerid':_0x43036e[_0x53a2('0x5a')]['callerid']};}if(_0x43036e[_0x53a2('0x5c')]){_0x1338f2['Interval']={'id':_0x43036e[_0x53a2('0x5c')]['id'],'name':_0x43036e[_0x53a2('0x5c')]['name']};}var _0x35fb2b=md5(JSON[_0x53a2('0x5d')](_0x1338f2));if(_0x43036e[_0x53a2('0x3')]!==_0x35fb2b){_0x43036e[_0x53a2('0x3')]=_0x35fb2b;logger[_0x53a2('0x49')](_0x53a2('0x5e')+_0x961380+_0x53a2('0x5f'),util['inspect'](_0x1338f2,{'showHidden':![],'depth':null}));this[_0x53a2('0x48')](util[_0x53a2('0x50')](_0x53a2('0x4c'),_0x1338f2['name']),_0x53a2('0x60'),_0x1338f2);}}};VoiceQueueReport[_0x53a2('0xe')][_0x53a2('0x61')]=function(_0x20a51b){return _0x20a51b!==null&&!_[_0x53a2('0x62')](_0x20a51b);};VoiceQueueReport['prototype']['loopQueueShow']=function(){var _0x107bd6=this;setInterval(function(){_0x107bd6['clearZombieChannels']();ami[_0x53a2('0x3a')]({'action':_0x53a2('0x63')})['catch'](function(_0x51e6bd){logger[_0x53a2('0x40')](_0x53a2('0x64'),util[_0x53a2('0x42')](_0x51e6bd,{'showHidden':![],'depth':null}));});},0x2710);};VoiceQueueReport['prototype']['loopQueueSummary']=function(){var _0x28cc39=this;setInterval(function(){if(_0x28cc39[_0x53a2('0x65')]){return ami[_0x53a2('0x3a')]({'action':_0x53a2('0x16')})[_0x53a2('0x66')](function(_0x50e667){_0x28cc39[_0x53a2('0x65')]=![];})[_0x53a2('0x3d')](function(_0x157c0f){logger[_0x53a2('0x40')](_0x53a2('0x67'),util[_0x53a2('0x42')](_0x157c0f,{'showHidden':![],'depth':null}));});}},0x3e8);};VoiceQueueReport[_0x53a2('0xe')]['syncQueueSummary']=function(_0x41f025){try{if(this['isNotNull'](_0x41f025)&&this[_0x53a2('0x61')](_0x41f025[_0x53a2('0x68')])){logger[_0x53a2('0x49')](_0x53a2('0x69'),util['inspect'](_0x41f025,{'showHidden':![],'depth':null}));if(this[_0x53a2('0x14')][_0x41f025[_0x53a2('0x68')]]){logger[_0x53a2('0x6a')](_0x53a2('0x6b'),_0x41f025[_0x53a2('0x68')]);var _0x27e2f6=_['countBy'](this[_0x53a2('0x36')],_0x53a2('0x68'))[_0x41f025[_0x53a2('0x68')]]||0x0;var _0x93bbd6=_0x27e2f6-_0x41f025[_0x53a2('0x6c')];if(this[_0x53a2('0x14')][_0x41f025[_0x53a2('0x68')]]['waiting']!==_[_0x53a2('0x6d')](_0x41f025['callers'])||this[_0x53a2('0x14')][_0x41f025[_0x53a2('0x68')]][_0x53a2('0x6e')]!==_['toNumber'](_0x41f025[_0x53a2('0x6f')])||this[_0x53a2('0x14')][_0x41f025['queue']][_0x53a2('0x70')]!==_['toNumber'](_0x41f025[_0x53a2('0x70')])||this[_0x53a2('0x14')][_0x41f025[_0x53a2('0x68')]][_0x53a2('0x30')]!==_0x93bbd6){this['voiceQueues'][_0x41f025[_0x53a2('0x68')]][_0x53a2('0x32')]=_[_0x53a2('0x6d')](_0x41f025[_0x53a2('0x6c')]);this[_0x53a2('0x14')][_0x41f025[_0x53a2('0x68')]][_0x53a2('0x6e')]=_[_0x53a2('0x6d')](_0x41f025[_0x53a2('0x6f')]);this[_0x53a2('0x14')][_0x41f025['queue']][_0x53a2('0x70')]=_['toNumber'](_0x41f025['available']);this[_0x53a2('0x14')][_0x41f025[_0x53a2('0x68')]]['talking']=_0x93bbd6>0x0?_0x93bbd6:0x0;this['voiceQueues'][_0x41f025[_0x53a2('0x68')]][_0x53a2('0x30')]=this[_0x53a2('0x14')][_0x41f025[_0x53a2('0x68')]]['talking']>_[_0x53a2('0x6d')](_0x41f025['loggedin'])?_[_0x53a2('0x6d')](_0x41f025[_0x53a2('0x6f')]):this[_0x53a2('0x14')][_0x41f025['queue']][_0x53a2('0x30')];this[_0x53a2('0x53')](this[_0x53a2('0x14')][_0x41f025[_0x53a2('0x68')]],_0x53a2('0x16'));}logger[_0x53a2('0x49')](_0x53a2('0x71'),util[_0x53a2('0x42')](this[_0x53a2('0x14')][_0x41f025[_0x53a2('0x68')]],{'showHidden':![],'depth':null}));ami[_0x53a2('0x48')](_0x53a2('0x72'),this[_0x53a2('0x14')][_0x41f025[_0x53a2('0x68')]]);}}}catch(_0x36d742){logger[_0x53a2('0x40')]('[voiceQueueReport][queuesummary]',util[_0x53a2('0x42')](_0x36d742,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x53a2('0x73')]=function(_0xdde9d3){logger[_0x53a2('0x49')](_0x53a2('0x74'),util[_0x53a2('0x42')](_0xdde9d3,{'showHidden':![],'depth':null}));this[_0x53a2('0x65')]=!![];};VoiceQueueReport[_0x53a2('0xe')][_0x53a2('0x1a')]=function(_0x29c7b2){try{if(this[_0x53a2('0x61')](_0x29c7b2)){logger['debug'](_0x53a2('0x75'),_0x29c7b2[_0x53a2('0x4f')],util[_0x53a2('0x42')](_0x29c7b2,{'showHidden':![],'depth':null}));if(_['isUndefined'](this[_0x53a2('0x12')][_0x29c7b2[_0x53a2('0x4f')]])){this['queueReports'][_0x29c7b2['uniqueid']]=[];this[_0x53a2('0x36')][_0x29c7b2[_0x53a2('0x4f')]]={};}var _0x1f2553=new QueueReport();_0x1f2553[_0x53a2('0x4d')]=_0x29c7b2[_0x53a2('0x68')];_0x1f2553['type']=this[_0x53a2('0x14')][_0x1f2553[_0x53a2('0x4d')]]&&this[_0x53a2('0x14')][_0x1f2553[_0x53a2('0x4d')]][_0x53a2('0x54')]?this[_0x53a2('0x14')][_0x1f2553[_0x53a2('0x4d')]][_0x53a2('0x54')]||_0x53a2('0x55'):'inbound';_0x1f2553[_0x53a2('0x68')]=_0x29c7b2[_0x53a2('0x68')];_0x1f2553[_0x53a2('0x76')]=moment()[_0x53a2('0x50')](_0x53a2('0x77'));_0x1f2553[_0x53a2('0x78')]=_0x29c7b2[_0x53a2('0x78')];_0x1f2553[_0x53a2('0x79')]=_0x29c7b2[_0x53a2('0x79')];_0x1f2553[_0x53a2('0x4f')]=_0x29c7b2[_0x53a2('0x4f')];logger[_0x53a2('0x6a')](_0x53a2('0x7a'),_0x1f2553[_0x53a2('0x4d')],_0x1f2553[_0x53a2('0x54')]);_[_0x53a2('0x7b')](_0x1f2553,_['pick'](_0x29c7b2,_['keys'](_0x1f2553)));this[_0x53a2('0x12')][_0x29c7b2['uniqueid']][_0x53a2('0x7c')](_0x1f2553);this[_0x53a2('0x36')][_0x29c7b2['uniqueid']]=_0x1f2553;this[_0x53a2('0x7d')](_0x1f2553,_0x53a2('0x19'));}}catch(_0x4757ef){logger[_0x53a2('0x40')]('[%s][voiceQueueReport][queuecallerjoin]',_0x29c7b2['uniqueid'],util['inspect'](_0x4757ef,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x53a2('0xe')][_0x53a2('0x1b')]=function(_0x1212bf){try{if(this[_0x53a2('0x61')](_0x1212bf)){logger[_0x53a2('0x49')](_0x53a2('0x7e'),_0x1212bf[_0x53a2('0x4f')],util[_0x53a2('0x42')](_0x1212bf,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x1212bf[_0x53a2('0x4f')]]){var _0xa8ab39=_[_0x53a2('0x7f')](this[_0x53a2('0x12')][_0x1212bf['uniqueid']]);_0xa8ab39[_0x53a2('0x80')]=![];_0xa8ab39[_0x53a2('0x81')]=null;_0xa8ab39[_0x53a2('0x82')]=_0x1212bf['holdtime'];_0xa8ab39[_0x53a2('0x83')]=_0x1212bf[_0x53a2('0x83')];_0xa8ab39[_0x53a2('0x84')]=!![];_0xa8ab39[_0x53a2('0x85')]=moment()['format'](_0x53a2('0x77'));_0xa8ab39[_0x53a2('0x86')]=_0x53a2('0x87');_0xa8ab39['lastAssignedTo']=null;logger[_0x53a2('0x6a')](_0x53a2('0x88'),_0xa8ab39[_0x53a2('0x4d')],_0xa8ab39[_0x53a2('0x54')]);this['channels'][_0x1212bf[_0x53a2('0x4f')]]=_0xa8ab39;this[_0x53a2('0x4e')](_0xa8ab39,'queuecallerabandon');}}}catch(_0x56b958){logger['error'](_0x53a2('0x7e'),_0x1212bf['uniqueid'],util['inspect'](_0x56b958,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x53a2('0x1d')]=function(_0x68a73c){try{if(this['isNotNull'](_0x68a73c)){logger[_0x53a2('0x49')](_0x53a2('0x89'),_0x68a73c[_0x53a2('0x4f')],util[_0x53a2('0x42')](_0x68a73c,{'showHidden':![],'depth':null}));if(this[_0x53a2('0x12')][_0x68a73c['uniqueid']]){var _0x1ebe6c=_['last'](this[_0x53a2('0x12')][_0x68a73c[_0x53a2('0x4f')]]);_0x1ebe6c[_0x53a2('0x8a')]=moment()[_0x53a2('0x50')]('YYYY-MM-DD\x20HH:mm:ss');_0x1ebe6c[_0x53a2('0x8b')]=_0x68a73c[_0x53a2('0x8b')];_0x1ebe6c[_0x53a2('0x8c')]=_0x68a73c[_0x53a2('0x8c')];logger['info'](_0x53a2('0x8d'),_0x1ebe6c[_0x53a2('0x4d')],_0x1ebe6c['type'],_0x68a73c[_0x53a2('0x8b')],_0x68a73c[_0x53a2('0x8c')]);this[_0x53a2('0x36')][_0x68a73c[_0x53a2('0x4f')]]=_0x1ebe6c;this[_0x53a2('0x7d')](_0x1ebe6c,_0x53a2('0x1c'));}}}catch(_0x55bfc8){logger[_0x53a2('0x40')](_0x53a2('0x89'),_0x68a73c[_0x53a2('0x4f')],util['inspect'](_0x55bfc8,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x53a2('0xe')][_0x53a2('0x1f')]=function(_0x284bd7){try{if(this[_0x53a2('0x61')](_0x284bd7)){logger[_0x53a2('0x49')]('[%s][voiceQueueReport][agentconnect]',_0x284bd7['uniqueid'],util[_0x53a2('0x42')](_0x284bd7,{'showHidden':![],'depth':null}));if(this[_0x53a2('0x12')][_0x284bd7['uniqueid']]){var _0x173871=_[_0x53a2('0x7f')](this[_0x53a2('0x12')][_0x284bd7['uniqueid']]);_0x173871[_0x53a2('0x80')]=!![];_0x173871['queuecallerexitreason']='COMPLETEDBYAGENT';logger[_0x53a2('0x6a')](_0x53a2('0x8e'),_0x173871[_0x53a2('0x4d')],_0x173871['type']);}}}catch(_0x5bb767){logger[_0x53a2('0x40')]('[%s][voiceQueueReport][agentconnect]',_0x284bd7['uniqueid'],util['inspect'](_0x5bb767,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x53a2('0xe')][_0x53a2('0x8f')]=function(_0x28d9bd){try{if(this[_0x53a2('0x61')](_0x28d9bd)){logger[_0x53a2('0x49')](_0x53a2('0x90'),_0x28d9bd[_0x53a2('0x4f')],util['inspect'](_0x28d9bd,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x28d9bd[_0x53a2('0x4f')]]){var _0x58bc5d=_[_0x53a2('0x7f')](this['queueReports'][_0x28d9bd[_0x53a2('0x4f')]]);_0x58bc5d[_0x53a2('0x84')]=![];_0x58bc5d[_0x53a2('0x85')]=null;_0x58bc5d[_0x53a2('0x91')]=!![];_0x58bc5d[_0x53a2('0x92')]=_0x28d9bd[_0x53a2('0x93')];_0x58bc5d[_0x53a2('0x82')]=_0x28d9bd['holdtime'];_0x58bc5d['queuecallercomplete']=!![];_0x58bc5d[_0x53a2('0x94')]=![];_0x58bc5d['queuecallerexitAt']=null;if(!_0x58bc5d[_0x53a2('0x95')]){if(_0x28d9bd[_0x53a2('0x96')]==_0x53a2('0x95')){_0x58bc5d[_0x53a2('0x86')]=_0x53a2('0x97');logger[_0x53a2('0x6a')](_0x53a2('0x98'),_0x58bc5d[_0x53a2('0x4d')],_0x58bc5d[_0x53a2('0x54')]);}else{if(_[_0x53a2('0x99')](_0x28d9bd['channel'][_0x53a2('0x9a')](),_0x53a2('0x9b'))){if(this[_0x53a2('0x12')][_0x28d9bd['linkedid']]){var _0x12366c=_[_0x53a2('0x7f')](this['queueReports'][_0x28d9bd[_0x53a2('0x9c')]]);_0x12366c[_0x53a2('0x80')]=![];_0x12366c['queuecallerexit']=!![];_0x12366c[_0x53a2('0x9d')]=moment(_0x58bc5d[_0x53a2('0x76')])[_0x53a2('0x9e')](_0x28d9bd[_0x53a2('0x82')],'seconds')[_0x53a2('0x50')]('YYYY-MM-DD\x20HH:mm:ss');_0x12366c['queuecallerexitreason']=_0x53a2('0x9f');_0x12366c['transfer']=!![];_0x12366c[_0x53a2('0xa0')]='FORWARD';_0x12366c[_0x53a2('0xa1')]=_0x28d9bd[_0x53a2('0xa2')];_0x12366c[_0x53a2('0xa3')]=_0x28d9bd['uniqueid'];logger[_0x53a2('0x6a')](_0x53a2('0xa4'),_0x12366c['name'],_0x12366c['type']);var _0x1d7b8b=this[_0x53a2('0x12')][_0x28d9bd[_0x53a2('0x9c')]];this['queueReports'][_0x28d9bd['linkedid']]=this[_0x53a2('0x12')][_0x28d9bd[_0x53a2('0x4f')]];this[_0x53a2('0x12')][_0x28d9bd[_0x53a2('0x4f')]]=_0x1d7b8b;}}else{_0x58bc5d[_0x53a2('0x86')]=_0x53a2('0xa5')+_0x28d9bd['reason'][_0x53a2('0xa6')]();logger[_0x53a2('0x6a')](_0x53a2('0xa7'),_0x58bc5d[_0x53a2('0x4d')],_0x58bc5d['type'],_0x58bc5d[_0x53a2('0x86')]);}}}this[_0x53a2('0x36')][_0x28d9bd[_0x53a2('0x4f')]]=_0x58bc5d;this[_0x53a2('0x4e')](_0x58bc5d,_0x53a2('0xa8'));}}}catch(_0x56e8c5){logger[_0x53a2('0x40')](_0x53a2('0x90'),_0x28d9bd[_0x53a2('0x4f')],util[_0x53a2('0x42')](_0x56e8c5,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x53a2('0xe')][_0x53a2('0x21')]=function(_0x5c3d42){try{if(this['isNotNull'](_0x5c3d42)){logger['debug'](_0x53a2('0xa9'),_0x5c3d42['uniqueid'],util[_0x53a2('0x42')](_0x5c3d42,{'showHidden':![],'depth':null}));this[_0x53a2('0xaa')](_0x5c3d42['uniqueid'],_[_0x53a2('0xab')](_0x5c3d42['variable'])[0x0],_0x5c3d42[_0x53a2('0xac')]);if(this[_0x53a2('0x12')][_0x5c3d42['uniqueid']]){var _0x18f70b=_[_0x53a2('0x7f')](this['queueReports'][_0x5c3d42[_0x53a2('0x4f')]]);if(_0x18f70b){if(this[_0x53a2('0x61')](_0x5c3d42[_0x53a2('0xad')])&&this[_0x53a2('0x61')](_0x5c3d42[_0x53a2('0xad')][_0x53a2('0xae')])){switch(_0x5c3d42[_0x53a2('0xac')]){case _0x53a2('0xaf'):_0x18f70b[_0x53a2('0x94')]=![];_0x18f70b[_0x53a2('0x9d')]=null;break;case _0x53a2('0xb0'):_0x18f70b[_0x53a2('0xb1')]=_0x53a2('0xb2');_0x18f70b['queuecallerexit']=!![];_0x18f70b[_0x53a2('0x9d')]=moment()[_0x53a2('0x50')]('YYYY-MM-DD\x20HH:mm:ss');_0x18f70b[_0x53a2('0x8a')]=moment()['format'](_0x53a2('0x77'));logger[_0x53a2('0x49')](_0x53a2('0xb3'),_0x5c3d42[_0x53a2('0x4f')],util['inspect'](_0x18f70b,{'showHidden':![],'depth':null}));ami[_0x53a2('0x48')](_0x53a2('0xb4'),_0x18f70b);break;default:_0x18f70b[_0x53a2('0x94')]=!![];_0x18f70b[_0x53a2('0x9d')]=moment()[_0x53a2('0x50')]('YYYY-MM-DD\x20HH:mm:ss');_0x18f70b[_0x53a2('0x8a')]=moment()[_0x53a2('0x50')](_0x53a2('0x77'));}_0x18f70b[_0x53a2('0x84')]=![];_0x18f70b[_0x53a2('0x85')]=null;_0x18f70b[_0x53a2('0x86')]=_0x5c3d42['value'];this['channels'][_0x5c3d42['uniqueid']]=_0x18f70b;this['emitVoiceQueueChannelRemove'](_0x18f70b,_0x53a2('0x20'));}else if(this['isNotNull'](_0x5c3d42['variable'])&&this[_0x53a2('0x61')](_0x5c3d42[_0x53a2('0xad')][_0x53a2('0xb5')])){if(!_0x18f70b[_0x53a2('0x84')]){_0x18f70b[_0x53a2('0x94')]=!![];_0x18f70b[_0x53a2('0x9d')]=moment()['format'](_0x53a2('0x77'));_0x18f70b[_0x53a2('0x86')]=_0x53a2('0xb6');_0x18f70b[_0x53a2('0x8a')]=moment()[_0x53a2('0x50')](_0x53a2('0x77'));this['channels'][_0x5c3d42[_0x53a2('0x4f')]]=_0x18f70b;}}logger[_0x53a2('0x6a')](_0x53a2('0xb7'),_0x5c3d42['uniqueid'],_0x18f70b['name'],_0x18f70b[_0x53a2('0x54')],_[_0x53a2('0xab')](_0x5c3d42[_0x53a2('0xad')])[0x0],_0x5c3d42[_0x53a2('0xac')]);_0x18f70b['variables']=this['variables'][_0x5c3d42[_0x53a2('0x4f')]];}}}}catch(_0x351888){logger['error'](_0x53a2('0xa9'),_0x5c3d42['uniqueid'],util[_0x53a2('0x42')](_0x351888,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x53a2('0xe')]['addVariable']=function(_0x35ceee,_0x49f0e5,_0x310aaf){var _0x19a65e=[_0x53a2('0xb8'),_0x53a2('0xb9'),'rtpaudioqosjitter',_0x53a2('0xba'),_0x53a2('0xbb'),'rtpaudioqoslossbridged',_0x53a2('0xbc'),'rtpaudioqosrttbridged',_0x53a2('0xbd'),'sipuri',_0x53a2('0xbe'),_0x53a2('0xbf'),_0x53a2('0xc0'),_0x53a2('0xc1'),_0x53a2('0xc2'),_0x53a2('0xc3'),_0x53a2('0x93'),_0x53a2('0xc4'),_0x53a2('0xc5')];if(!_[_0x53a2('0x39')](_0x49f0e5)&&!_['includes'](_0x19a65e,_0x49f0e5)){if(_['isUndefined'](this[_0x53a2('0x15')][_0x35ceee])){this[_0x53a2('0x15')][_0x35ceee]={};}this[_0x53a2('0x15')][_0x35ceee][_0x49f0e5]=_0x310aaf;}};VoiceQueueReport[_0x53a2('0xe')][_0x53a2('0x22')]=function(_0x5c428f){try{if(this[_0x53a2('0x61')](_0x5c428f)){logger[_0x53a2('0x49')](_0x53a2('0xc6'),_0x5c428f['uniqueid'],util['inspect'](_0x5c428f,{'showHidden':![],'depth':null}));if(this[_0x53a2('0x12')][_0x5c428f[_0x53a2('0x4f')]]){for(var _0x3682ea=0x0,_0x5b6782={};_0x3682ea<this['queueReports'][_0x5c428f['uniqueid']]['length'];_0x3682ea+=0x1){_0x5b6782=this[_0x53a2('0x12')][_0x5c428f[_0x53a2('0x4f')]][_0x3682ea];if(this[_0x53a2('0x14')][_0x5b6782['queue']]){if(_0x5b6782[_0x53a2('0x94')]&&_0x5b6782['transfer']!=!![]){this[_0x53a2('0x14')][_0x5b6782[_0x53a2('0x68')]][_0x53a2('0xc7')]+=0x1;}if(_0x5b6782[_0x53a2('0x84')]){this['voiceQueues'][_0x5b6782['queue']][_0x53a2('0xc8')]+=0x1;}this[_0x53a2('0x14')][_0x5b6782[_0x53a2('0x68')]][_0x53a2('0x58')]+=moment(_0x5b6782['queuecallerleaveAt'])[_0x53a2('0xc9')](_0x5b6782[_0x53a2('0x76')],_0x53a2('0xca'))||0x0;if(_0x3682ea===this[_0x53a2('0x12')][_0x5c428f[_0x53a2('0x4f')]][_0x53a2('0xcb')]-0x1){this[_0x53a2('0x14')][_0x5b6782[_0x53a2('0x68')]]['sumDuration']+=moment()['milliseconds'](0x0)[_0x53a2('0xc9')](_0x5b6782['queuecallerjoinAt'],'seconds');this[_0x53a2('0x14')][_0x5b6782[_0x53a2('0x68')]][_0x53a2('0x59')]+=0x1;if(_0x5b6782[_0x53a2('0x80')]){this[_0x53a2('0x14')][_0x5b6782[_0x53a2('0x68')]][_0x53a2('0x57')]+=0x1;this[_0x53a2('0x14')][_0x5b6782[_0x53a2('0x68')]][_0x53a2('0xcc')]+=moment()[_0x53a2('0xcd')](0x0)[_0x53a2('0xc9')](_0x5b6782[_0x53a2('0x8a')],_0x53a2('0xca'));_0x5b6782['queuecallercompleteAt']=moment()[_0x53a2('0x50')](_0x53a2('0x77'));_0x5b6782[_0x53a2('0x94')]=![];_0x5b6782['queuecallerexitAt']=null;}if(_0x5b6782[_0x53a2('0x94')]&&_0x5b6782[_0x53a2('0x95')]!=!![]){_0x5b6782[_0x53a2('0xb1')]=_0x53a2('0xc7');logger[_0x53a2('0x49')](_0x53a2('0xce'),_0x5c428f[_0x53a2('0x4f')],util['inspect'](_0x5b6782,{'showHidden':![],'depth':null}));ami[_0x53a2('0x48')](_0x53a2('0xcf'),_0x5b6782);}if(_0x5b6782[_0x53a2('0x84')]){_0x5b6782[_0x53a2('0xb1')]=_0x53a2('0xc8');logger[_0x53a2('0x49')]('[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerabandon\x20event:',_0x5c428f[_0x53a2('0x4f')],util[_0x53a2('0x42')](_0x5b6782,{'showHidden':![],'depth':null}));ami[_0x53a2('0x48')](_0x53a2('0xd0'),_0x5b6782);}}else{this['voiceQueues'][_0x5b6782[_0x53a2('0x68')]]['sumDuration']+=this[_0x53a2('0x14')][_0x5b6782['queue']][_0x53a2('0x58')];}logger[_0x53a2('0x6a')](_0x53a2('0xd1'),_0x5c428f[_0x53a2('0x4f')],_0x5b6782['name'],_0x5b6782[_0x53a2('0x54')],_0x5c428f[_0x53a2('0xd2')]);this[_0x53a2('0x36')][_0x5c428f['uniqueid']]=_0x5b6782;this['emitVoiceQueueChannelRemove'](_0x5b6782,_0x53a2('0xd3'));this[_0x53a2('0x53')](this['voiceQueues'][_0x5b6782[_0x53a2('0x68')]],'hangup');}}logger['debug'](_0x53a2('0xd4'),_0x5c428f[_0x53a2('0x4f')],util[_0x53a2('0x42')](this[_0x53a2('0x12')][_0x5c428f[_0x53a2('0x4f')]],{'showHidden':![],'depth':null}));ami['emit'](_0x53a2('0xd5'),this[_0x53a2('0x12')][_0x5c428f['uniqueid']]);delete this[_0x53a2('0x12')][_0x5c428f[_0x53a2('0x4f')]];delete this[_0x53a2('0x36')][_0x5c428f[_0x53a2('0x4f')]];}if(this[_0x53a2('0x15')][_0x5c428f['uniqueid']]){delete this[_0x53a2('0x15')][_0x5c428f[_0x53a2('0x4f')]];}}}catch(_0x285cf3){logger[_0x53a2('0x40')](_0x53a2('0xc6'),_0x5c428f[_0x53a2('0x4f')],util[_0x53a2('0x42')](_0x285cf3,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x53a2('0xe')][_0x53a2('0x29')]=function(_0x280458){try{if(this['isNotNull'](_0x280458)){logger[_0x53a2('0x49')](_0x53a2('0xd6'),_0x280458[_0x53a2('0x4f')],util[_0x53a2('0x42')](_0x280458,{'showHidden':![],'depth':null}));var _0x4565fc;if(this['queueReports'][_0x280458[_0x53a2('0xd7')]]){_0x4565fc=_[_0x53a2('0x7f')](this[_0x53a2('0x12')][_0x280458['transfereeuniqueid']]);_0x4565fc[_0x53a2('0xa1')]=_0x280458[_0x53a2('0xd8')];_0x4565fc['transferuniqueid']=_0x280458[_0x53a2('0xd9')];_0x4565fc['queuecallerexitreason']=_0x53a2('0xda');_0x4565fc[_0x53a2('0x95')]=!![];_0x4565fc[_0x53a2('0xa0')]=_0x53a2('0xdb');if(this[_0x53a2('0x12')][_0x280458['secondtransfereruniqueid']]){var _0x4e2141=this[_0x53a2('0x12')][_0x280458[_0x53a2('0xd9')]];this[_0x53a2('0x12')][_0x280458[_0x53a2('0xd9')]]=this[_0x53a2('0x12')][_0x280458['transfereeuniqueid']];this[_0x53a2('0x12')][_0x280458[_0x53a2('0xd7')]]=_0x4e2141;var _0x23c00d=_[_0x53a2('0x7f')](this[_0x53a2('0x12')][_0x280458[_0x53a2('0xd7')]]);_0x23c00d['switch']=!![];}logger['info'](_0x53a2('0xdc'),_0x280458[_0x53a2('0x4f')],_0x4565fc['name'],_0x4565fc[_0x53a2('0x54')],_0x4565fc[_0x53a2('0xa1')],_0x4565fc[_0x53a2('0xa3')]);}else if(this[_0x53a2('0x12')][_0x280458[_0x53a2('0xdd')]]){_0x4565fc=_[_0x53a2('0x7f')](this[_0x53a2('0x12')][_0x280458[_0x53a2('0xdd')]]);_0x4565fc['transferexten']=_0x280458[_0x53a2('0xde')];_0x4565fc[_0x53a2('0xa3')]=_0x280458[_0x53a2('0xdf')];_0x4565fc['queuecallerexitreason']=_0x53a2('0xda');_0x4565fc[_0x53a2('0x95')]=!![];_0x4565fc[_0x53a2('0xa0')]=_0x53a2('0xdb');if(this[_0x53a2('0x12')][_0x280458['origtransfereruniqueid']]){var _0x4e2141=this['queueReports'][_0x280458[_0x53a2('0xdf')]];this[_0x53a2('0x12')][_0x280458['origtransfereruniqueid']]=this['queueReports'][_0x280458[_0x53a2('0xdd')]];this[_0x53a2('0x12')][_0x280458[_0x53a2('0xdd')]]=_0x4e2141;var _0x23c00d=_[_0x53a2('0x7f')](this['queueReports'][_0x280458[_0x53a2('0xdd')]]);_0x23c00d[_0x53a2('0x37')]=!![];}logger[_0x53a2('0x6a')]('[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s',_0x280458[_0x53a2('0x4f')],_0x4565fc[_0x53a2('0x4d')],_0x4565fc[_0x53a2('0x54')],_0x4565fc[_0x53a2('0xa1')],_0x4565fc[_0x53a2('0xa3')]);}}}catch(_0x1afc8b){logger[_0x53a2('0x40')](_0x53a2('0xd6'),_0x280458['uniqueid'],util['inspect'](_0x1afc8b,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x53a2('0xe')][_0x53a2('0x2b')]=function(_0x3ad508){try{if(this[_0x53a2('0x61')](_0x3ad508)){logger[_0x53a2('0x49')]('[%s][voiceQueueReport][blindtransfer]',_0x3ad508[_0x53a2('0x4f')],util[_0x53a2('0x42')](_0x3ad508,{'showHidden':![],'depth':null}));if(this[_0x53a2('0x12')][_0x3ad508[_0x53a2('0xd7')]]){var _0x25160c=_[_0x53a2('0x7f')](this[_0x53a2('0x12')][_0x3ad508[_0x53a2('0xd7')]]);_0x25160c[_0x53a2('0x86')]=_0x53a2('0xe0');_0x25160c[_0x53a2('0x95')]=!![];_0x25160c[_0x53a2('0xa0')]=_0x53a2('0xe1');_0x25160c[_0x53a2('0xa1')]=_0x3ad508['extension'];_0x25160c['transferuniqueid']=_0x3ad508[_0x53a2('0xd7')];logger['info'](_0x53a2('0xe2'),_0x3ad508[_0x53a2('0x4f')],_0x25160c[_0x53a2('0x4d')],_0x25160c[_0x53a2('0x54')],_0x25160c[_0x53a2('0xa1')],_0x25160c[_0x53a2('0xa3')]);this[_0x53a2('0x22')]({'event':_0x53a2('0xe3'),'uniqueid':_0x3ad508[_0x53a2('0xd7')],'context':_0x3ad508[_0x53a2('0xe4')],'channel':_0x3ad508[_0x53a2('0xe5')]});}}}catch(_0x238720){logger[_0x53a2('0x40')]('[%s][voiceQueueReport][blindtransfer]',_0x3ad508[_0x53a2('0x4f')],util[_0x53a2('0x42')](_0x238720,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x53a2('0xe')][_0x53a2('0x25')]=function(_0x3bfa99){try{if(this['isNotNull'](_0x3bfa99)){logger[_0x53a2('0x49')](_0x53a2('0xe6'),_0x3bfa99[_0x53a2('0x4f')],util[_0x53a2('0x42')](_0x3bfa99,{'showHidden':![],'depth':null}));if(this[_0x53a2('0x12')][_0x3bfa99[_0x53a2('0x4f')]]){var _0x3dcdcd=_[_0x53a2('0x7f')](this[_0x53a2('0x12')][_0x3bfa99[_0x53a2('0x4f')]]);if(!_[_0x53a2('0x39')](_0x3dcdcd[_0x53a2('0x8a')])){_0x3dcdcd[_0x53a2('0xe7')]=moment()[_0x53a2('0x50')](_0x53a2('0x77'));logger[_0x53a2('0x6a')](_0x53a2('0xe8'),_0x3bfa99[_0x53a2('0x4f')],_0x3dcdcd[_0x53a2('0xe7')]);}}}}catch(_0x1ad395){logger[_0x53a2('0x40')](_0x53a2('0xe6'),_0x3bfa99[_0x53a2('0x4f')],util[_0x53a2('0x42')](_0x1ad395,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x53a2('0x27')]=function(_0x2e9c80){try{if(this['isNotNull'](_0x2e9c80)){logger[_0x53a2('0x49')]('[%s][voiceQueueReport][musiconholdstop]',_0x2e9c80['uniqueid'],util['inspect'](_0x2e9c80,{'showHidden':![],'depth':null}));if(this[_0x53a2('0x12')][_0x2e9c80['uniqueid']]){var _0x1a4fac=_[_0x53a2('0x7f')](this['queueReports'][_0x2e9c80[_0x53a2('0x4f')]]);if(!_[_0x53a2('0x39')](_0x1a4fac['mohstarttime'])){_0x1a4fac[_0x53a2('0xe9')]+=moment()[_0x53a2('0xcd')](0x0)['diff'](_0x1a4fac[_0x53a2('0xe7')],_0x53a2('0xca'));logger['info']('[%s][voiceQueueReport][musiconholdstop]\x20mohtime:%s',_0x2e9c80[_0x53a2('0x4f')],_0x1a4fac[_0x53a2('0xe9')]);delete _0x1a4fac[_0x53a2('0xe7')];}}}}catch(_0x449732){logger[_0x53a2('0x40')](_0x53a2('0xea'),_0x2e9c80[_0x53a2('0x4f')],util['inspect'](_0x449732,{'showHidden':![],'depth':null}));}};module[_0x53a2('0xeb')]=VoiceQueueReport;