Built motion from commit (unavailable).|2.5.14
[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 _0x659c=['agentconnect','syncAgentConnect','varset','syncVarSet','fullybooted','musiconholdstop','syncMusicOnHoldStop','attendedtransfer','syncAttendedTransfer','loopQueueSummary','loopQueueShow','isEmpty','hasOwnProperty','originated','talking','waiting','queueStatusComplete','unlockRR','prototype','enqueue','Action','channel','catch','No\x20such\x20channel','error','inspect','[%s][voiceQueueReport][checkQueueReport]','variables','[%s][voiceQueueReport][checkVariables]','syncFullyBooted','clearQueueReport','emitVoiceQueueChannelRemove','clearqueuereport','emit','emitVoiceQueueChannelSave','debug',']\x20sending\x20voice_queue_channel:save\x20event:','uniqueid','format','name','voice_queue_channel:save',']\x20sending\x20voice_queue_channel:remove\x20event:','type','inbound','answered','available','loggedIn','sumBillable','sumDuration','sumHoldTime','total','unmanaged','abandoned','Trunk','active','callerid','Interval','stringify','[voiceQueueReport][',']\x20sending\x20voice_queue:save\x20event:','voice:queue:%s','voice_queue:save','isNotNull','isUndefined','clearZombieChannels','queues','[voiceQueueReport][queues]','then','[voiceQueueReport][queuesummary]','[voiceQueueReport][queuesummary]\x20event:','queue','info','[voiceQueueReport][queuesummary]\x20name:%s','countBy','callers','toNumber','loggedin','emitVoiceQueueSummary','[voiceQueueReport][queuesummary]\x20sending\x20queuesummary\x20event:','custom:queuesummary','[voiceQueueReport][queuesummarycomplete]\x20event:','[%s][voiceQueueReport][queuecallerjoin]','queuecallerjoinAt','YYYY-MM-DD\x20HH:mm:ss','position','count','[voiceQueueReport][queuecallerjoin]\x20name:%s\x20type:%s','merge','pick','[%s][voiceQueueReport][queuecallerabandon]','last','queuecallercomplete','queuecallercompleteAt','holdtime','originalposition','lastAssignedTo','[voiceQueueReport][queuecallerabandon]\x20name:%s\x20type:%s','[%s][voiceQueueReport][queuecallerleave]','queuecallerleaveAt','connectedlinenum','connectedlinename','[voiceQueueReport][queuecallerleave]\x20name:%s\x20type:%s\x20connectedlinenum:%s\x20connectedlinename:%s','[%s][voiceQueueReport][agentconnect]','queuecallerexitreason','COMPLETEDBYAGENT','[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT','[%s][voiceQueueReport][agentcomplete]','queuecallerabandonAt','assigned','membername','queuecallerexit','queuecallerexitAt','transfer','COMPLETED','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETED','toLowerCase','local/','linkedid','add','seconds','FORWARDTRANSFER','transfertype','FORWARD','destexten','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:FORWARDTRANSFER','COMPLETEDBY','reason','toUpperCase','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:%s','[%s][voiceQueueReport][varset]','value','variable','CONTINUE','TIMEOUT','[%s][voiceQueueReport][varset]\x20sending\x20timeout\x20event:','custom:timeout','queueposition','EXITWITHKEY','[%s][voiceQueueReport][varset]\x20name:%s\x20type:%s\x20variable:%s\x20value:%s','keys','addVariable','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqosrtt','rtpaudioqosrttbridged','sipuri','bridgepeer','bridgepvtcallid','membercalls','memberdynamic','memberinterface','memberpenalty','memberrealtime','isNil','includes','syncHangup','[%s][voiceQueueReport][hangup]','length','milliseconds','diff','[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerunmanaged\x20event:','custom:queuecallerunmanaged','lastevent','[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerabandon\x20event:','[%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','transferexten','transferuniqueid','transfertargetuniqueid','origtransfererexten','origtransfereruniqueid','switch','[%s][voiceQueueReport][blindtransfer]','BLINDTRANSFER','BLIND','extension','[%s][voiceQueueReport][blindTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','BlindTransfer','context','syncMusicOnHoldStart','[%s][voiceQueueReport][musiconholdstart]','[%s][voiceQueueReport][musiconholdstart]\x20mohstarttime:%s','mohstarttime','mohtime','[%s][voiceQueueReport][musiconholdstop]\x20mohtime:%s','lodash','md5','ioredis','../../../config/logger','ami','redis','defaults','localhost','socket.io-emitter','finally','sequence','queueReports','agents','channels','queueChannels','voiceQueues','flagQueueSummary','campaigns','queuesummary','syncQueueSummary','queuesummarycomplete','syncQueueSummaryComplete','bind','queuecallerjoin','syncQueueCallerJoin','queuecallerabandon','syncQueueCallerAbandon','queuecallerleave','agentcomplete','syncAgentComplete'];(function(_0x73eba4,_0x1686c2){var _0x40f4fe=function(_0x1093b1){while(--_0x1093b1){_0x73eba4['push'](_0x73eba4['shift']());}};_0x40f4fe(++_0x1686c2);}(_0x659c,0x1aa));var _0xc659=function(_0x549555,_0x5c2217){_0x549555=_0x549555-0x0;var _0x259593=_0x659c[_0x549555];return _0x259593;};'use strict';var _=require(_0xc659('0x0'));var moment=require('moment');var util=require('util');var md5=require(_0xc659('0x1'));var Redis=require(_0xc659('0x2'));var config=require('../../../config/environment');var logger=require(_0xc659('0x3'))(_0xc659('0x4'));var ami=require('../ami');var QueueReport=require('../model/queueReport');config[_0xc659('0x5')]=_[_0xc659('0x6')](config[_0xc659('0x5')],{'host':_0xc659('0x7'),'port':0x18eb});var io=require(_0xc659('0x8'))(new Redis(config[_0xc659('0x5')]));var Sequence=function(){};Sequence['prototype']['enqueue']=function(_0x2cc93d){this['tail']=this['tail']?this['tail'][_0xc659('0x9')](_0x2cc93d):_0x2cc93d();};function VoiceQueueReport(_0x2ea975){this[_0xc659('0xa')]=new Sequence();this[_0xc659('0xb')]={};this[_0xc659('0xc')]=_0x2ea975[_0xc659('0xc')];this[_0xc659('0xd')]=_0x2ea975[_0xc659('0xe')];this['voiceQueues']=_0x2ea975[_0xc659('0xf')];this[_0xc659('0x10')]=!![];this[_0xc659('0x11')]=_0x2ea975['campaigns'];this['variables']={};ami['on'](_0xc659('0x12'),this[_0xc659('0x13')]['bind'](this));ami['on'](_0xc659('0x14'),this[_0xc659('0x15')][_0xc659('0x16')](this));ami['on'](_0xc659('0x17'),this[_0xc659('0x18')][_0xc659('0x16')](this));ami['on'](_0xc659('0x19'),this[_0xc659('0x1a')][_0xc659('0x16')](this));ami['on'](_0xc659('0x1b'),this['syncQueueCallerLeave'][_0xc659('0x16')](this));ami['on'](_0xc659('0x1c'),this[_0xc659('0x1d')][_0xc659('0x16')](this));ami['on'](_0xc659('0x1e'),this[_0xc659('0x1f')]['bind'](this));ami['on'](_0xc659('0x20'),this[_0xc659('0x21')][_0xc659('0x16')](this));ami['on']('hangup',this['syncHangup'][_0xc659('0x16')](this));ami['on'](_0xc659('0x22'),this['syncFullyBooted'][_0xc659('0x16')](this));ami['on']('musiconholdstart',this['syncMusicOnHoldStart']['bind'](this));ami['on'](_0xc659('0x23'),this[_0xc659('0x24')][_0xc659('0x16')](this));ami['on'](_0xc659('0x25'),this[_0xc659('0x26')][_0xc659('0x16')](this));ami['on']('blindtransfer',this['syncBlindTransfer']['bind'](this));this[_0xc659('0x27')]();this[_0xc659('0x28')]();}function clearChannels(_0x4c0fb7){if(!_[_0xc659('0x29')](_0x4c0fb7)){for(var _0x5db7cf in _0x4c0fb7){if(_0x4c0fb7[_0xc659('0x2a')](_0x5db7cf)){delete _0x4c0fb7[_0x5db7cf];}}}}function clearCampaigns(_0x2794b2){if(!_[_0xc659('0x29')](_0x2794b2)){for(var _0x36e194 in _0x2794b2){if(_0x2794b2[_0xc659('0x2a')](_0x36e194)){_0x2794b2[_0x36e194][_0xc659('0x2b')]=0x0;}}}}function clearVoiceQueues(_0x3a35e4){if(!_[_0xc659('0x29')](_0x3a35e4)){for(var _0x288b02 in _0x3a35e4){if(_0x3a35e4[_0xc659('0x2a')](_0x288b02)){_0x3a35e4[_0x288b02][_0xc659('0x2b')]=0x0;_0x3a35e4[_0x288b02][_0xc659('0x2c')]=0x0;_0x3a35e4[_0x288b02]['pTalking']=0x0;_0x3a35e4[_0x288b02][_0xc659('0x2d')]=0x0;_0x3a35e4[_0x288b02][_0xc659('0x2e')]=!![];}}}}function clearAgentBooked(_0x5deee1){if(!_['isEmpty'](_0x5deee1)){for(var _0x1dc3b7 in _0x5deee1){if(_0x5deee1[_0xc659('0x2a')](_0x1dc3b7)){_0x5deee1[_0x1dc3b7][_0xc659('0x2f')]=!![];}}}}VoiceQueueReport[_0xc659('0x30')]['clearZombieChannels']=function(){var _0x475bd3=this;for(var _0xd5c464 in this[_0xc659('0xd')]){if(this['channels'][_0xc659('0x2a')](_0xd5c464)&&!this[_0xc659('0xd')][_0xd5c464]['switch']){this['sequence'][_0xc659('0x31')](function(){if(!_['isNil'](_0x475bd3[_0xc659('0xd')][_0xd5c464])){return ami[_0xc659('0x32')]({'action':'status','channel':_0x475bd3[_0xc659('0xd')][_0xd5c464][_0xc659('0x33')]})[_0xc659('0x34')](function(_0x3eb7c3){if(_0x3eb7c3['message']===_0xc659('0x35')){setTimeout(function(){if(_0x475bd3[_0xc659('0xd')][_0xd5c464]){delete _0x475bd3['channels'][_0xd5c464];logger[_0xc659('0x36')]('[%s][voiceQueueReport][checkChannel]',_0xd5c464,util[_0xc659('0x37')](_0x3eb7c3,{'showHidden':![],'depth':null}));}if(_0x475bd3['queueReports'][_0xd5c464]){delete _0x475bd3[_0xc659('0xb')][_0xd5c464];logger['error'](_0xc659('0x38'),_0xd5c464,util[_0xc659('0x37')](_0x3eb7c3,{'showHidden':![],'depth':null}));}if(_0x475bd3[_0xc659('0x39')][_0xd5c464]){delete _0x475bd3[_0xc659('0x39')][_0xd5c464];logger[_0xc659('0x36')](_0xc659('0x3a'),_0xd5c464,util[_0xc659('0x37')](_0x3eb7c3,{'showHidden':![],'depth':null}));}},0x1f40);}});}});}}};VoiceQueueReport[_0xc659('0x30')][_0xc659('0x3b')]=function(){logger[_0xc659('0x36')]('[FullyBooted]\x20clear\x20realtime');clearChannels(this[_0xc659('0xd')]);this[_0xc659('0x3c')](this[_0xc659('0xb')]);clearAgentBooked(this[_0xc659('0xc')]);clearVoiceQueues(this['voiceQueues']);clearCampaigns(this[_0xc659('0x11')]);};VoiceQueueReport[_0xc659('0x30')][_0xc659('0x3c')]=function(_0x143e5a){var _0x408637=this;if(!_[_0xc659('0x29')](_0x143e5a)){for(var _0x5ce879 in _0x143e5a){if(_0x143e5a['hasOwnProperty'](_0x5ce879)){_0x408637[_0xc659('0x3d')](_0x143e5a[_0x5ce879],_0xc659('0x3e'));delete _0x143e5a[_0x5ce879];}}}};VoiceQueueReport[_0xc659('0x30')]['emit']=function(_0x286843,_0x583f91,_0x47d9e3){io['to'](_0x286843)[_0xc659('0x3f')](_0x583f91,_0x47d9e3);};VoiceQueueReport[_0xc659('0x30')][_0xc659('0x40')]=function(_0x199ba1,_0xbc35d2){logger[_0xc659('0x41')]('[%s][voiceQueueReport]['+_0xbc35d2+_0xc659('0x42'),_0x199ba1[_0xc659('0x43')],util[_0xc659('0x37')](_0x199ba1,{'showHidden':![],'depth':null}));this[_0xc659('0x3f')](util[_0xc659('0x44')]('voice:queue:%s',_0x199ba1[_0xc659('0x45')]),_0xc659('0x46'),_0x199ba1);};VoiceQueueReport['prototype'][_0xc659('0x3d')]=function(_0x4b71c3,_0x5a97e6){logger[_0xc659('0x41')]('[%s][voiceQueueReport]['+_0x5a97e6+_0xc659('0x47'),_0x4b71c3[_0xc659('0x43')],util[_0xc659('0x37')](_0x4b71c3,{'showHidden':![],'depth':null}));this[_0xc659('0x3f')](util[_0xc659('0x44')]('voice:queue:%s',_0x4b71c3[_0xc659('0x45')]),'voice_queue_channel:remove',_0x4b71c3);};VoiceQueueReport['prototype']['emitVoiceQueueSummary']=function(_0x39f2b8,_0x268194){if(_0x39f2b8[_0xc659('0x48')]===_0xc659('0x49')){var _0x105197={'id':_0x39f2b8['id'],'name':_0x39f2b8[_0xc659('0x45')],'strategy':_0x39f2b8['strategy'],'answered':_0x39f2b8[_0xc659('0x4a')],'available':_0x39f2b8[_0xc659('0x4b')],'loggedIn':_0x39f2b8[_0xc659('0x4c')],'pTalking':_0x39f2b8['pTalking'],'sumBillable':_0x39f2b8[_0xc659('0x4d')],'sumDuration':_0x39f2b8[_0xc659('0x4e')],'sumHoldTime':_0x39f2b8[_0xc659('0x4f')]||0x0,'talking':_0x39f2b8['talking'],'total':_0x39f2b8[_0xc659('0x50')],'type':_0x39f2b8[_0xc659('0x48')],'unmanaged':_0x39f2b8[_0xc659('0x51')],'abandoned':_0x39f2b8[_0xc659('0x52')],'waiting':_0x39f2b8['waiting']};if(_0x39f2b8[_0xc659('0x53')]){_0x105197[_0xc659('0x53')]={'id':_0x39f2b8[_0xc659('0x53')]['id'],'name':_0x39f2b8[_0xc659('0x53')][_0xc659('0x45')],'active':_0x39f2b8[_0xc659('0x53')][_0xc659('0x54')],'callerid':_0x39f2b8[_0xc659('0x53')][_0xc659('0x55')]};}if(_0x39f2b8[_0xc659('0x56')]){_0x105197['Interval']={'id':_0x39f2b8['Interval']['id'],'name':_0x39f2b8[_0xc659('0x56')][_0xc659('0x45')]};}var _0x1e1ad7=md5(JSON[_0xc659('0x57')](_0x105197));if(_0x39f2b8[_0xc659('0x1')]!==_0x1e1ad7){_0x39f2b8[_0xc659('0x1')]=_0x1e1ad7;logger['debug'](_0xc659('0x58')+_0x268194+_0xc659('0x59'),util[_0xc659('0x37')](_0x105197,{'showHidden':![],'depth':null}));this[_0xc659('0x3f')](util['format'](_0xc659('0x5a'),_0x105197['name']),_0xc659('0x5b'),_0x105197);}}};VoiceQueueReport[_0xc659('0x30')][_0xc659('0x5c')]=function(_0x108fd2){return _0x108fd2!==null&&!_[_0xc659('0x5d')](_0x108fd2);};VoiceQueueReport[_0xc659('0x30')][_0xc659('0x28')]=function(){var _0x1c66fd=this;setInterval(function(){_0x1c66fd[_0xc659('0x5e')]();ami['Action']({'action':_0xc659('0x5f')})[_0xc659('0x34')](function(_0x46fea9){logger['error'](_0xc659('0x60'),util[_0xc659('0x37')](_0x46fea9,{'showHidden':![],'depth':null}));});},0x2710);};VoiceQueueReport[_0xc659('0x30')][_0xc659('0x27')]=function(){var _0x31df71=this;setInterval(function(){if(_0x31df71[_0xc659('0x10')]){return ami[_0xc659('0x32')]({'action':_0xc659('0x12')})[_0xc659('0x61')](function(_0x4e2692){_0x31df71[_0xc659('0x10')]=![];})['catch'](function(_0x370aa5){logger[_0xc659('0x36')](_0xc659('0x62'),util[_0xc659('0x37')](_0x370aa5,{'showHidden':![],'depth':null}));});}},0x3e8);};VoiceQueueReport[_0xc659('0x30')][_0xc659('0x13')]=function(_0x3cbb6c){try{if(this[_0xc659('0x5c')](_0x3cbb6c)&&this[_0xc659('0x5c')](_0x3cbb6c['queue'])){logger[_0xc659('0x41')](_0xc659('0x63'),util[_0xc659('0x37')](_0x3cbb6c,{'showHidden':![],'depth':null}));if(this[_0xc659('0xf')][_0x3cbb6c[_0xc659('0x64')]]){logger[_0xc659('0x65')](_0xc659('0x66'),_0x3cbb6c[_0xc659('0x64')]);var _0x3e3d4d=_[_0xc659('0x67')](this[_0xc659('0xd')],_0xc659('0x64'))[_0x3cbb6c['queue']]||0x0;var _0x9fa40e=_0x3e3d4d-_0x3cbb6c[_0xc659('0x68')];if(this['voiceQueues'][_0x3cbb6c[_0xc659('0x64')]][_0xc659('0x2d')]!==_[_0xc659('0x69')](_0x3cbb6c[_0xc659('0x68')])||this[_0xc659('0xf')][_0x3cbb6c[_0xc659('0x64')]][_0xc659('0x4c')]!==_[_0xc659('0x69')](_0x3cbb6c[_0xc659('0x6a')])||this['voiceQueues'][_0x3cbb6c[_0xc659('0x64')]][_0xc659('0x4b')]!==_[_0xc659('0x69')](_0x3cbb6c['available'])||this[_0xc659('0xf')][_0x3cbb6c[_0xc659('0x64')]][_0xc659('0x2c')]!==_0x9fa40e){this[_0xc659('0xf')][_0x3cbb6c[_0xc659('0x64')]][_0xc659('0x2d')]=_[_0xc659('0x69')](_0x3cbb6c['callers']);this[_0xc659('0xf')][_0x3cbb6c[_0xc659('0x64')]][_0xc659('0x4c')]=_['toNumber'](_0x3cbb6c[_0xc659('0x6a')]);this[_0xc659('0xf')][_0x3cbb6c[_0xc659('0x64')]][_0xc659('0x4b')]=_[_0xc659('0x69')](_0x3cbb6c['available']);this[_0xc659('0xf')][_0x3cbb6c['queue']][_0xc659('0x2c')]=_0x9fa40e>0x0?_0x9fa40e:0x0;this[_0xc659('0xf')][_0x3cbb6c[_0xc659('0x64')]][_0xc659('0x2c')]=this[_0xc659('0xf')][_0x3cbb6c[_0xc659('0x64')]][_0xc659('0x2c')]>_[_0xc659('0x69')](_0x3cbb6c[_0xc659('0x6a')])?_[_0xc659('0x69')](_0x3cbb6c[_0xc659('0x6a')]):this[_0xc659('0xf')][_0x3cbb6c[_0xc659('0x64')]][_0xc659('0x2c')];this[_0xc659('0x6b')](this[_0xc659('0xf')][_0x3cbb6c['queue']],_0xc659('0x12'));}logger['debug'](_0xc659('0x6c'),util[_0xc659('0x37')](this[_0xc659('0xf')][_0x3cbb6c[_0xc659('0x64')]],{'showHidden':![],'depth':null}));ami[_0xc659('0x3f')](_0xc659('0x6d'),this['voiceQueues'][_0x3cbb6c[_0xc659('0x64')]]);}}}catch(_0x1b4e6b){logger[_0xc659('0x36')](_0xc659('0x62'),util[_0xc659('0x37')](_0x1b4e6b,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xc659('0x30')]['syncQueueSummaryComplete']=function(_0x1b3504){logger[_0xc659('0x41')](_0xc659('0x6e'),util['inspect'](_0x1b3504,{'showHidden':![],'depth':null}));this[_0xc659('0x10')]=!![];};VoiceQueueReport[_0xc659('0x30')]['syncQueueCallerJoin']=function(_0x3b58f7){try{if(this[_0xc659('0x5c')](_0x3b58f7)){logger[_0xc659('0x41')](_0xc659('0x6f'),_0x3b58f7[_0xc659('0x43')],util[_0xc659('0x37')](_0x3b58f7,{'showHidden':![],'depth':null}));if(_[_0xc659('0x5d')](this['queueReports'][_0x3b58f7[_0xc659('0x43')]])){this[_0xc659('0xb')][_0x3b58f7['uniqueid']]=[];this[_0xc659('0xd')][_0x3b58f7['uniqueid']]={};}var _0x7fbb8e=new QueueReport();_0x7fbb8e[_0xc659('0x45')]=_0x3b58f7['queue'];_0x7fbb8e[_0xc659('0x48')]=this[_0xc659('0xf')][_0x7fbb8e['name']]&&this['voiceQueues'][_0x7fbb8e[_0xc659('0x45')]][_0xc659('0x48')]?this[_0xc659('0xf')][_0x7fbb8e[_0xc659('0x45')]][_0xc659('0x48')]||_0xc659('0x49'):'inbound';_0x7fbb8e['queue']=_0x3b58f7['queue'];_0x7fbb8e[_0xc659('0x70')]=moment()[_0xc659('0x44')](_0xc659('0x71'));_0x7fbb8e[_0xc659('0x72')]=_0x3b58f7[_0xc659('0x72')];_0x7fbb8e['count']=_0x3b58f7[_0xc659('0x73')];_0x7fbb8e['uniqueid']=_0x3b58f7[_0xc659('0x43')];logger[_0xc659('0x65')](_0xc659('0x74'),_0x7fbb8e[_0xc659('0x45')],_0x7fbb8e[_0xc659('0x48')]);_[_0xc659('0x75')](_0x7fbb8e,_[_0xc659('0x76')](_0x3b58f7,_['keys'](_0x7fbb8e)));this['queueReports'][_0x3b58f7[_0xc659('0x43')]]['push'](_0x7fbb8e);this['channels'][_0x3b58f7[_0xc659('0x43')]]=_0x7fbb8e;this[_0xc659('0x40')](_0x7fbb8e,_0xc659('0x17'));}}catch(_0x1938a7){logger[_0xc659('0x36')](_0xc659('0x6f'),_0x3b58f7[_0xc659('0x43')],util['inspect'](_0x1938a7,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xc659('0x30')]['syncQueueCallerAbandon']=function(_0x43e7c3){try{if(this[_0xc659('0x5c')](_0x43e7c3)){logger[_0xc659('0x41')](_0xc659('0x77'),_0x43e7c3[_0xc659('0x43')],util['inspect'](_0x43e7c3,{'showHidden':![],'depth':null}));if(this[_0xc659('0xb')][_0x43e7c3[_0xc659('0x43')]]){var _0x44dc3b=_[_0xc659('0x78')](this[_0xc659('0xb')][_0x43e7c3[_0xc659('0x43')]]);_0x44dc3b[_0xc659('0x79')]=![];_0x44dc3b[_0xc659('0x7a')]=null;_0x44dc3b[_0xc659('0x7b')]=_0x43e7c3[_0xc659('0x7b')];_0x44dc3b[_0xc659('0x7c')]=_0x43e7c3[_0xc659('0x7c')];_0x44dc3b[_0xc659('0x19')]=!![];_0x44dc3b['queuecallerabandonAt']=moment()[_0xc659('0x44')]('YYYY-MM-DD\x20HH:mm:ss');_0x44dc3b['queuecallerexitreason']='ABANDONED';_0x44dc3b[_0xc659('0x7d')]=null;logger[_0xc659('0x65')](_0xc659('0x7e'),_0x44dc3b[_0xc659('0x45')],_0x44dc3b[_0xc659('0x48')]);this[_0xc659('0xd')][_0x43e7c3[_0xc659('0x43')]]=_0x44dc3b;this[_0xc659('0x3d')](_0x44dc3b,_0xc659('0x19'));}}}catch(_0x382041){logger[_0xc659('0x36')](_0xc659('0x77'),_0x43e7c3[_0xc659('0x43')],util[_0xc659('0x37')](_0x382041,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xc659('0x30')]['syncQueueCallerLeave']=function(_0x4781a6){try{if(this['isNotNull'](_0x4781a6)){logger[_0xc659('0x41')](_0xc659('0x7f'),_0x4781a6[_0xc659('0x43')],util['inspect'](_0x4781a6,{'showHidden':![],'depth':null}));if(this[_0xc659('0xb')][_0x4781a6[_0xc659('0x43')]]){var _0x29b3ad=_['last'](this[_0xc659('0xb')][_0x4781a6[_0xc659('0x43')]]);_0x29b3ad[_0xc659('0x80')]=moment()[_0xc659('0x44')]('YYYY-MM-DD\x20HH:mm:ss');_0x29b3ad[_0xc659('0x81')]=_0x4781a6[_0xc659('0x81')];_0x29b3ad[_0xc659('0x82')]=_0x4781a6[_0xc659('0x82')];logger[_0xc659('0x65')](_0xc659('0x83'),_0x29b3ad[_0xc659('0x45')],_0x29b3ad[_0xc659('0x48')],_0x4781a6['connectedlinenum'],_0x4781a6['connectedlinename']);this['channels'][_0x4781a6[_0xc659('0x43')]]=_0x29b3ad;this[_0xc659('0x40')](_0x29b3ad,'queuecallerleave');}}}catch(_0x138daa){logger[_0xc659('0x36')]('[%s][voiceQueueReport][queuecallerleave]',_0x4781a6[_0xc659('0x43')],util[_0xc659('0x37')](_0x138daa,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0xc659('0x1f')]=function(_0x6e82f3){try{if(this[_0xc659('0x5c')](_0x6e82f3)){logger['debug'](_0xc659('0x84'),_0x6e82f3['uniqueid'],util[_0xc659('0x37')](_0x6e82f3,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x6e82f3[_0xc659('0x43')]]){var _0x19eeb0=_['last'](this[_0xc659('0xb')][_0x6e82f3['uniqueid']]);_0x19eeb0[_0xc659('0x79')]=!![];_0x19eeb0[_0xc659('0x85')]=_0xc659('0x86');logger['info'](_0xc659('0x87'),_0x19eeb0[_0xc659('0x45')],_0x19eeb0[_0xc659('0x48')]);}}}catch(_0x37638c){logger['error'](_0xc659('0x84'),_0x6e82f3['uniqueid'],util[_0xc659('0x37')](_0x37638c,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xc659('0x30')][_0xc659('0x1d')]=function(_0xe66d63){try{if(this[_0xc659('0x5c')](_0xe66d63)){logger[_0xc659('0x41')](_0xc659('0x88'),_0xe66d63[_0xc659('0x43')],util['inspect'](_0xe66d63,{'showHidden':![],'depth':null}));if(this[_0xc659('0xb')][_0xe66d63[_0xc659('0x43')]]){var _0x38dd10=_[_0xc659('0x78')](this[_0xc659('0xb')][_0xe66d63[_0xc659('0x43')]]);_0x38dd10['queuecallerabandon']=![];_0x38dd10[_0xc659('0x89')]=null;_0x38dd10[_0xc659('0x8a')]=!![];_0x38dd10['lastAssignedTo']=_0xe66d63[_0xc659('0x8b')];_0x38dd10[_0xc659('0x7b')]=_0xe66d63[_0xc659('0x7b')];_0x38dd10[_0xc659('0x79')]=!![];_0x38dd10[_0xc659('0x8c')]=![];_0x38dd10[_0xc659('0x8d')]=null;if(!_0x38dd10[_0xc659('0x8e')]){if(_0xe66d63['reason']==_0xc659('0x8e')){_0x38dd10[_0xc659('0x85')]=_0xc659('0x8f');logger['info'](_0xc659('0x90'),_0x38dd10[_0xc659('0x45')],_0x38dd10[_0xc659('0x48')]);}else{if(_['startsWith'](_0xe66d63['channel'][_0xc659('0x91')](),_0xc659('0x92'))){if(this[_0xc659('0xb')][_0xe66d63[_0xc659('0x93')]]){var _0x2e82c3=_[_0xc659('0x78')](this['queueReports'][_0xe66d63['linkedid']]);_0x2e82c3[_0xc659('0x79')]=![];_0x2e82c3[_0xc659('0x8c')]=!![];_0x2e82c3[_0xc659('0x8d')]=moment(_0x38dd10['queuecallerjoinAt'])[_0xc659('0x94')](_0xe66d63[_0xc659('0x7b')],_0xc659('0x95'))[_0xc659('0x44')](_0xc659('0x71'));_0x2e82c3[_0xc659('0x85')]=_0xc659('0x96');_0x2e82c3[_0xc659('0x8e')]=!![];_0x2e82c3[_0xc659('0x97')]=_0xc659('0x98');_0x2e82c3['transferexten']=_0xe66d63[_0xc659('0x99')];_0x2e82c3['transferuniqueid']=_0xe66d63['uniqueid'];logger[_0xc659('0x65')](_0xc659('0x9a'),_0x2e82c3[_0xc659('0x45')],_0x2e82c3['type']);var _0x19c44a=this['queueReports'][_0xe66d63[_0xc659('0x93')]];this[_0xc659('0xb')][_0xe66d63[_0xc659('0x93')]]=this['queueReports'][_0xe66d63[_0xc659('0x43')]];this[_0xc659('0xb')][_0xe66d63[_0xc659('0x43')]]=_0x19c44a;}}else{_0x38dd10[_0xc659('0x85')]=_0xc659('0x9b')+_0xe66d63[_0xc659('0x9c')][_0xc659('0x9d')]();logger[_0xc659('0x65')](_0xc659('0x9e'),_0x38dd10[_0xc659('0x45')],_0x38dd10['type'],_0x38dd10[_0xc659('0x85')]);}}}this['channels'][_0xe66d63['uniqueid']]=_0x38dd10;this[_0xc659('0x3d')](_0x38dd10,_0xc659('0x1c'));}}}catch(_0x3726cd){logger[_0xc659('0x36')](_0xc659('0x88'),_0xe66d63['uniqueid'],util['inspect'](_0x3726cd,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype']['syncVarSet']=function(_0x3d7545){try{if(this[_0xc659('0x5c')](_0x3d7545)){logger[_0xc659('0x41')](_0xc659('0x9f'),_0x3d7545['uniqueid'],util[_0xc659('0x37')](_0x3d7545,{'showHidden':![],'depth':null}));this['addVariable'](_0x3d7545[_0xc659('0x43')],_['keys'](_0x3d7545['variable'])[0x0],_0x3d7545[_0xc659('0xa0')]);if(this['queueReports'][_0x3d7545[_0xc659('0x43')]]){var _0x57709e=_['last'](this[_0xc659('0xb')][_0x3d7545[_0xc659('0x43')]]);if(_0x57709e){if(this[_0xc659('0x5c')](_0x3d7545[_0xc659('0xa1')])&&this[_0xc659('0x5c')](_0x3d7545['variable']['queuestatus'])){switch(_0x3d7545[_0xc659('0xa0')]){case _0xc659('0xa2'):_0x57709e['queuecallerexit']=![];_0x57709e['queuecallerexitAt']=null;break;case _0xc659('0xa3'):_0x57709e['lastevent']='timeout';_0x57709e['queuecallerexit']=!![];_0x57709e['queuecallerexitAt']=moment()[_0xc659('0x44')](_0xc659('0x71'));_0x57709e['queuecallerleaveAt']=moment()[_0xc659('0x44')](_0xc659('0x71'));logger['debug'](_0xc659('0xa4'),_0x3d7545[_0xc659('0x43')],util[_0xc659('0x37')](_0x57709e,{'showHidden':![],'depth':null}));ami[_0xc659('0x3f')](_0xc659('0xa5'),_0x57709e);break;default:_0x57709e['queuecallerexit']=!![];_0x57709e[_0xc659('0x8d')]=moment()['format'](_0xc659('0x71'));_0x57709e[_0xc659('0x80')]=moment()[_0xc659('0x44')](_0xc659('0x71'));}_0x57709e[_0xc659('0x19')]=![];_0x57709e[_0xc659('0x89')]=null;_0x57709e[_0xc659('0x85')]=_0x3d7545[_0xc659('0xa0')];this[_0xc659('0xd')][_0x3d7545[_0xc659('0x43')]]=_0x57709e;this[_0xc659('0x3d')](_0x57709e,_0xc659('0x20'));}else if(this[_0xc659('0x5c')](_0x3d7545[_0xc659('0xa1')])&&this[_0xc659('0x5c')](_0x3d7545[_0xc659('0xa1')][_0xc659('0xa6')])){if(!_0x57709e[_0xc659('0x19')]){_0x57709e['queuecallerexit']=!![];_0x57709e[_0xc659('0x8d')]=moment()['format'](_0xc659('0x71'));_0x57709e['queuecallerexitreason']=_0xc659('0xa7');_0x57709e[_0xc659('0x80')]=moment()['format'](_0xc659('0x71'));this[_0xc659('0xd')][_0x3d7545[_0xc659('0x43')]]=_0x57709e;}}logger[_0xc659('0x65')](_0xc659('0xa8'),_0x3d7545[_0xc659('0x43')],_0x57709e[_0xc659('0x45')],_0x57709e[_0xc659('0x48')],_[_0xc659('0xa9')](_0x3d7545[_0xc659('0xa1')])[0x0],_0x3d7545[_0xc659('0xa0')]);_0x57709e['variables']=this[_0xc659('0x39')][_0x3d7545[_0xc659('0x43')]];}}}}catch(_0x2b99bd){logger[_0xc659('0x36')](_0xc659('0x9f'),_0x3d7545[_0xc659('0x43')],util['inspect'](_0x2b99bd,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xc659('0x30')][_0xc659('0xaa')]=function(_0x254e28,_0x27a7fc,_0x114cbd){var _0x358a36=[_0xc659('0xab'),_0xc659('0xac'),_0xc659('0xad'),_0xc659('0xae'),_0xc659('0xaf'),'rtpaudioqoslossbridged',_0xc659('0xb0'),_0xc659('0xb1'),'sipcallid',_0xc659('0xb2'),_0xc659('0xb3'),_0xc659('0xb4'),_0xc659('0xb5'),_0xc659('0xb6'),_0xc659('0xb7'),'memberlastcall','membername',_0xc659('0xb8'),_0xc659('0xb9')];if(!_[_0xc659('0xba')](_0x27a7fc)&&!_[_0xc659('0xbb')](_0x358a36,_0x27a7fc)){if(_[_0xc659('0x5d')](this[_0xc659('0x39')][_0x254e28])){this[_0xc659('0x39')][_0x254e28]={};}this[_0xc659('0x39')][_0x254e28][_0x27a7fc]=_0x114cbd;}};VoiceQueueReport['prototype'][_0xc659('0xbc')]=function(_0x171750){try{if(this[_0xc659('0x5c')](_0x171750)){logger[_0xc659('0x41')](_0xc659('0xbd'),_0x171750['uniqueid'],util['inspect'](_0x171750,{'showHidden':![],'depth':null}));if(this[_0xc659('0xb')][_0x171750[_0xc659('0x43')]]){for(var _0x22dbf2=0x0,_0x24b6b0={};_0x22dbf2<this[_0xc659('0xb')][_0x171750[_0xc659('0x43')]][_0xc659('0xbe')];_0x22dbf2+=0x1){_0x24b6b0=this[_0xc659('0xb')][_0x171750[_0xc659('0x43')]][_0x22dbf2];if(this['voiceQueues'][_0x24b6b0['queue']]){if(_0x24b6b0['queuecallerexit']){this[_0xc659('0xf')][_0x24b6b0[_0xc659('0x64')]]['unmanaged']+=0x1;}if(_0x24b6b0[_0xc659('0x19')]){this['voiceQueues'][_0x24b6b0[_0xc659('0x64')]]['abandoned']+=0x1;}this['voiceQueues'][_0x24b6b0['queue']]['sumHoldTime']+=moment(_0x24b6b0[_0xc659('0x80')])['diff'](_0x24b6b0[_0xc659('0x70')],_0xc659('0x95'))||0x0;if(_0x22dbf2===this['queueReports'][_0x171750[_0xc659('0x43')]][_0xc659('0xbe')]-0x1){this[_0xc659('0xf')][_0x24b6b0[_0xc659('0x64')]]['sumDuration']+=moment()[_0xc659('0xbf')](0x0)[_0xc659('0xc0')](_0x24b6b0['queuecallerjoinAt'],_0xc659('0x95'));this[_0xc659('0xf')][_0x24b6b0[_0xc659('0x64')]]['total']+=0x1;if(_0x24b6b0[_0xc659('0x79')]){this[_0xc659('0xf')][_0x24b6b0[_0xc659('0x64')]][_0xc659('0x4a')]+=0x1;this[_0xc659('0xf')][_0x24b6b0['queue']][_0xc659('0x4d')]+=moment()[_0xc659('0xbf')](0x0)['diff'](_0x24b6b0[_0xc659('0x80')],_0xc659('0x95'));_0x24b6b0[_0xc659('0x7a')]=moment()[_0xc659('0x44')](_0xc659('0x71'));_0x24b6b0[_0xc659('0x8c')]=![];_0x24b6b0['queuecallerexitAt']=null;}if(_0x24b6b0[_0xc659('0x8c')]){_0x24b6b0['lastevent']=_0xc659('0x51');logger[_0xc659('0x41')](_0xc659('0xc1'),_0x171750[_0xc659('0x43')],util['inspect'](_0x24b6b0,{'showHidden':![],'depth':null}));ami[_0xc659('0x3f')](_0xc659('0xc2'),_0x24b6b0);}if(_0x24b6b0[_0xc659('0x19')]){_0x24b6b0[_0xc659('0xc3')]=_0xc659('0x52');logger[_0xc659('0x41')](_0xc659('0xc4'),_0x171750['uniqueid'],util[_0xc659('0x37')](_0x24b6b0,{'showHidden':![],'depth':null}));ami[_0xc659('0x3f')]('custom:queuecallerabandon',_0x24b6b0);}}else{this[_0xc659('0xf')][_0x24b6b0[_0xc659('0x64')]][_0xc659('0x4e')]+=this[_0xc659('0xf')][_0x24b6b0[_0xc659('0x64')]]['sumHoldTime'];}logger['info'](_0xc659('0xc5'),_0x171750[_0xc659('0x43')],_0x24b6b0[_0xc659('0x45')],_0x24b6b0['type'],_0x171750[_0xc659('0xc6')]);this[_0xc659('0xd')][_0x171750[_0xc659('0x43')]]=_0x24b6b0;this[_0xc659('0x3d')](_0x24b6b0,_0xc659('0xc7'));this['emitVoiceQueueSummary'](this[_0xc659('0xf')][_0x24b6b0['queue']],_0xc659('0xc7'));}}logger['debug'](_0xc659('0xc8'),_0x171750[_0xc659('0x43')],util['inspect'](this['queueReports'][_0x171750[_0xc659('0x43')]],{'showHidden':![],'depth':null}));ami[_0xc659('0x3f')](_0xc659('0xc9'),this[_0xc659('0xb')][_0x171750[_0xc659('0x43')]]);delete this['queueReports'][_0x171750[_0xc659('0x43')]];delete this['channels'][_0x171750[_0xc659('0x43')]];}if(this[_0xc659('0x39')][_0x171750[_0xc659('0x43')]]){delete this[_0xc659('0x39')][_0x171750[_0xc659('0x43')]];}}}catch(_0x38c775){logger[_0xc659('0x36')](_0xc659('0xbd'),_0x171750[_0xc659('0x43')],util[_0xc659('0x37')](_0x38c775,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xc659('0x30')][_0xc659('0x26')]=function(_0x224fae){try{if(this[_0xc659('0x5c')](_0x224fae)){logger['debug'](_0xc659('0xca'),_0x224fae[_0xc659('0x43')],util['inspect'](_0x224fae,{'showHidden':![],'depth':null}));var _0x5145f2;if(this[_0xc659('0xb')][_0x224fae[_0xc659('0xcb')]]){_0x5145f2=_[_0xc659('0x78')](this[_0xc659('0xb')][_0x224fae[_0xc659('0xcb')]]);_0x5145f2['transferexten']=_0x224fae[_0xc659('0xcc')];_0x5145f2['transferuniqueid']=_0x224fae[_0xc659('0xcd')];_0x5145f2['queuecallerexitreason']=_0xc659('0xce');_0x5145f2[_0xc659('0x8e')]=!![];_0x5145f2[_0xc659('0x97')]=_0xc659('0xcf');if(this[_0xc659('0xb')][_0x224fae['secondtransfereruniqueid']]){var _0x1b0af8=this[_0xc659('0xb')][_0x224fae[_0xc659('0xcd')]];this[_0xc659('0xb')][_0x224fae[_0xc659('0xcd')]]=this[_0xc659('0xb')][_0x224fae[_0xc659('0xcb')]];this[_0xc659('0xb')][_0x224fae['transfereeuniqueid']]=_0x1b0af8;var _0x35e010=_['last'](this['queueReports'][_0x224fae['transfereeuniqueid']]);_0x35e010['switch']=!![];}logger[_0xc659('0x65')](_0xc659('0xd0'),_0x224fae[_0xc659('0x43')],_0x5145f2[_0xc659('0x45')],_0x5145f2['type'],_0x5145f2[_0xc659('0xd1')],_0x5145f2[_0xc659('0xd2')]);}else if(this[_0xc659('0xb')][_0x224fae[_0xc659('0xd3')]]){_0x5145f2=_[_0xc659('0x78')](this['queueReports'][_0x224fae[_0xc659('0xd3')]]);_0x5145f2['transferexten']=_0x224fae[_0xc659('0xd4')];_0x5145f2[_0xc659('0xd2')]=_0x224fae[_0xc659('0xd5')];_0x5145f2[_0xc659('0x85')]=_0xc659('0xce');_0x5145f2[_0xc659('0x8e')]=!![];_0x5145f2[_0xc659('0x97')]=_0xc659('0xcf');if(this[_0xc659('0xb')][_0x224fae[_0xc659('0xd5')]]){var _0x1b0af8=this[_0xc659('0xb')][_0x224fae[_0xc659('0xd5')]];this[_0xc659('0xb')][_0x224fae[_0xc659('0xd5')]]=this[_0xc659('0xb')][_0x224fae[_0xc659('0xd3')]];this[_0xc659('0xb')][_0x224fae['transfertargetuniqueid']]=_0x1b0af8;var _0x35e010=_[_0xc659('0x78')](this[_0xc659('0xb')][_0x224fae[_0xc659('0xd3')]]);_0x35e010[_0xc659('0xd6')]=!![];}logger[_0xc659('0x65')]('[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s',_0x224fae['uniqueid'],_0x5145f2['name'],_0x5145f2[_0xc659('0x48')],_0x5145f2[_0xc659('0xd1')],_0x5145f2[_0xc659('0xd2')]);}}}catch(_0x3721a3){logger[_0xc659('0x36')](_0xc659('0xca'),_0x224fae[_0xc659('0x43')],util[_0xc659('0x37')](_0x3721a3,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xc659('0x30')]['syncBlindTransfer']=function(_0x2599d4){try{if(this[_0xc659('0x5c')](_0x2599d4)){logger['debug'](_0xc659('0xd7'),_0x2599d4[_0xc659('0x43')],util[_0xc659('0x37')](_0x2599d4,{'showHidden':![],'depth':null}));if(this[_0xc659('0xb')][_0x2599d4['transfereeuniqueid']]){var _0x262871=_['last'](this[_0xc659('0xb')][_0x2599d4[_0xc659('0xcb')]]);_0x262871[_0xc659('0x85')]=_0xc659('0xd8');_0x262871[_0xc659('0x8e')]=!![];_0x262871[_0xc659('0x97')]=_0xc659('0xd9');_0x262871[_0xc659('0xd1')]=_0x2599d4[_0xc659('0xda')];_0x262871[_0xc659('0xd2')]=_0x2599d4[_0xc659('0xcb')];logger['info'](_0xc659('0xdb'),_0x2599d4['uniqueid'],_0x262871[_0xc659('0x45')],_0x262871['type'],_0x262871[_0xc659('0xd1')],_0x262871[_0xc659('0xd2')]);this['syncHangup']({'event':_0xc659('0xdc'),'uniqueid':_0x2599d4[_0xc659('0xcb')],'context':_0x2599d4[_0xc659('0xdd')],'channel':_0x2599d4['transfererchannel']});}}}catch(_0x340435){logger[_0xc659('0x36')](_0xc659('0xd7'),_0x2599d4[_0xc659('0x43')],util['inspect'](_0x340435,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xc659('0x30')][_0xc659('0xde')]=function(_0x4cbd69){try{if(this[_0xc659('0x5c')](_0x4cbd69)){logger[_0xc659('0x41')](_0xc659('0xdf'),_0x4cbd69[_0xc659('0x43')],util[_0xc659('0x37')](_0x4cbd69,{'showHidden':![],'depth':null}));if(this[_0xc659('0xb')][_0x4cbd69[_0xc659('0x43')]]){var _0x3daf8d=_['last'](this[_0xc659('0xb')][_0x4cbd69[_0xc659('0x43')]]);if(!_[_0xc659('0xba')](_0x3daf8d['queuecallerleaveAt'])){_0x3daf8d['mohstarttime']=moment()[_0xc659('0x44')](_0xc659('0x71'));logger[_0xc659('0x65')](_0xc659('0xe0'),_0x4cbd69[_0xc659('0x43')],_0x3daf8d[_0xc659('0xe1')]);}}}}catch(_0x6558de){logger['error'](_0xc659('0xdf'),_0x4cbd69[_0xc659('0x43')],util['inspect'](_0x6558de,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xc659('0x30')][_0xc659('0x24')]=function(_0x24a2ca){try{if(this[_0xc659('0x5c')](_0x24a2ca)){logger[_0xc659('0x41')]('[%s][voiceQueueReport][musiconholdstop]',_0x24a2ca[_0xc659('0x43')],util[_0xc659('0x37')](_0x24a2ca,{'showHidden':![],'depth':null}));if(this[_0xc659('0xb')][_0x24a2ca['uniqueid']]){var _0x105f1e=_[_0xc659('0x78')](this[_0xc659('0xb')][_0x24a2ca[_0xc659('0x43')]]);if(!_[_0xc659('0xba')](_0x105f1e[_0xc659('0xe1')])){_0x105f1e[_0xc659('0xe2')]+=moment()['milliseconds'](0x0)[_0xc659('0xc0')](_0x105f1e[_0xc659('0xe1')],_0xc659('0x95'));logger['info'](_0xc659('0xe3'),_0x24a2ca[_0xc659('0x43')],_0x105f1e[_0xc659('0xe2')]);delete _0x105f1e['mohstarttime'];}}}}catch(_0x38e03e){logger[_0xc659('0x36')]('[%s][voiceQueueReport][musiconholdstop]',_0x24a2ca[_0xc659('0x43')],util['inspect'](_0x38e03e,{'showHidden':![],'depth':null}));}};module['exports']=VoiceQueueReport;