Built motion from commit (unavailable).|2.5.29
[motion2.git] / server / services / ami / report / voiceQueueReport.js
index d36a3ce..7804494 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfb3f=['redis','defaults','localhost','socket.io-emitter','enqueue','tail','sequence','queueReports','agents','channels','queueChannels','voiceQueues','flagQueueSummary','campaigns','variables','queuesummary','syncQueueSummary','bind','queuesummarycomplete','syncQueueSummaryComplete','queuecallerjoin','syncQueueCallerJoin','queuecallerabandon','syncQueueCallerAbandon','queuecallerleave','syncQueueCallerLeave','agentconnect','varset','syncVarSet','hangup','syncHangup','fullybooted','syncFullyBooted','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','attendedtransfer','loopQueueSummary','loopQueueShow','isEmpty','hasOwnProperty','originated','talking','unlockRR','prototype','clearZombieChannels','switch','isNil','status','catch','message','No\x20such\x20channel','error','[%s][voiceQueueReport][checkChannel]','inspect','[%s][voiceQueueReport][checkVariables]','[FullyBooted]\x20clear\x20realtime','clearQueueReport','emitVoiceQueueChannelRemove','clearqueuereport','emit','emitVoiceQueueChannelSave','debug','[%s][voiceQueueReport][',']\x20sending\x20voice_queue_channel:save\x20event:','format','voice:queue:%s','voice_queue_channel:save',']\x20sending\x20voice_queue_channel:remove\x20event:','uniqueid','name','voice_queue_channel:remove','emitVoiceQueueSummary','type','inbound','available','loggedIn','pTalking','sumBillable','sumDuration','sumHoldTime','total','unmanaged','abandoned','waiting','Trunk','active','Interval','stringify','[voiceQueueReport][',']\x20sending\x20voice_queue:save\x20event:','voice_queue:save','Action','queues','[voiceQueueReport][queues]','queue','info','countBy','callers','toNumber','loggedin','[voiceQueueReport][queuesummary]\x20sending\x20queuesummary\x20event:','[voiceQueueReport][queuesummary]','[voiceQueueReport][queuesummarycomplete]\x20event:','isNotNull','[%s][voiceQueueReport][queuecallerjoin]','isUndefined','queuecallerjoinAt','YYYY-MM-DD\x20HH:mm:ss','position','count','[voiceQueueReport][queuecallerjoin]\x20name:%s\x20type:%s','pick','keys','push','last','queuecallercomplete','holdtime','originalposition','queuecallerabandonAt','queuecallerexitreason','ABANDONED','[voiceQueueReport][queuecallerabandon]\x20name:%s\x20type:%s','[%s][voiceQueueReport][queuecallerabandon]','[%s][voiceQueueReport][queuecallerleave]','queuecallerleaveAt','connectedlinenum','connectedlinename','[voiceQueueReport][queuecallerleave]\x20name:%s\x20type:%s\x20connectedlinenum:%s\x20connectedlinename:%s','[%s][voiceQueueReport][agentconnect]','[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT','syncAgentComplete','[%s][voiceQueueReport][agentcomplete]','assigned','membername','queuecallerexit','queuecallerexitAt','transfer','COMPLETED','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETED','startsWith','channel','toLowerCase','local/','add','seconds','FORWARDTRANSFER','transferexten','destexten','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:FORWARDTRANSFER','linkedid','reason','toUpperCase','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:%s','[%s][voiceQueueReport][varset]','addVariable','variable','value','queuestatus','CONTINUE','TIMEOUT','timeout','[%s][voiceQueueReport][varset]\x20sending\x20timeout\x20event:','queueposition','[%s][voiceQueueReport][varset]\x20name:%s\x20type:%s\x20variable:%s\x20value:%s','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrttbridged','sipcallid','sipuri','bridgepeer','membercalls','memberdynamic','memberinterface','memberpenalty','memberrealtime','includes','[%s][voiceQueueReport][hangup]','length','diff','milliseconds','answered','queuecallercompleteAt','lastevent','[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerunmanaged\x20event:','[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerabandon\x20event:','custom:queuecallerabandon','[%s][voiceQueueReport][hangup]\x20name:%s\x20type:%s\x20reason:%s','custom:voiceQueueReport','[%s][voiceQueueReport][attendedtransfer]','transfereeuniqueid','secondtransfererexten','secondtransfereruniqueid','ATTENDEDTRANSFER','ATTENDED','[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','transferuniqueid','transfertargetuniqueid','origtransfererexten','origtransfereruniqueid','transfertype','syncBlindTransfer','[%s][voiceQueueReport][blindtransfer]','BLINDTRANSFER','BLIND','[%s][voiceQueueReport][blindTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','context','transfererchannel','[%s][voiceQueueReport][musiconholdstart]','mohstarttime','[%s][voiceQueueReport][musiconholdstart]\x20mohstarttime:%s','[%s][voiceQueueReport][musiconholdstop]','mohtime','[%s][voiceQueueReport][musiconholdstop]\x20mohtime:%s','lodash','moment','md5','../../../config/logger','../ami','../model/queueReport'];(function(_0x5a7fbc,_0xa081de){var _0xcba0fc=function(_0x4f083b){while(--_0x4f083b){_0x5a7fbc['push'](_0x5a7fbc['shift']());}};_0xcba0fc(++_0xa081de);}(_0xfb3f,0xd9));var _0xffb3=function(_0x4e6c48,_0x3bb63d){_0x4e6c48=_0x4e6c48-0x0;var _0x5401a3=_0xfb3f[_0x4e6c48];return _0x5401a3;};'use strict';var _=require(_0xffb3('0x0'));var moment=require(_0xffb3('0x1'));var util=require('util');var md5=require(_0xffb3('0x2'));var Redis=require('ioredis');var config=require('../../../config/environment');var logger=require(_0xffb3('0x3'))('ami');var ami=require(_0xffb3('0x4'));var QueueReport=require(_0xffb3('0x5'));config[_0xffb3('0x6')]=_[_0xffb3('0x7')](config[_0xffb3('0x6')],{'host':_0xffb3('0x8'),'port':0x18eb});var io=require(_0xffb3('0x9'))(new Redis(config[_0xffb3('0x6')]));var Sequence=function(){};Sequence['prototype'][_0xffb3('0xa')]=function(_0x250f0f){this[_0xffb3('0xb')]=this[_0xffb3('0xb')]?this[_0xffb3('0xb')]['finally'](_0x250f0f):_0x250f0f();};function VoiceQueueReport(_0x35b664){this[_0xffb3('0xc')]=new Sequence();this[_0xffb3('0xd')]={};this[_0xffb3('0xe')]=_0x35b664[_0xffb3('0xe')];this[_0xffb3('0xf')]=_0x35b664[_0xffb3('0x10')];this[_0xffb3('0x11')]=_0x35b664['voiceQueues'];this[_0xffb3('0x12')]=!![];this[_0xffb3('0x13')]=_0x35b664['campaigns'];this[_0xffb3('0x14')]={};ami['on'](_0xffb3('0x15'),this[_0xffb3('0x16')][_0xffb3('0x17')](this));ami['on'](_0xffb3('0x18'),this[_0xffb3('0x19')][_0xffb3('0x17')](this));ami['on'](_0xffb3('0x1a'),this[_0xffb3('0x1b')][_0xffb3('0x17')](this));ami['on'](_0xffb3('0x1c'),this[_0xffb3('0x1d')]['bind'](this));ami['on'](_0xffb3('0x1e'),this[_0xffb3('0x1f')][_0xffb3('0x17')](this));ami['on']('agentcomplete',this['syncAgentComplete'][_0xffb3('0x17')](this));ami['on'](_0xffb3('0x20'),this['syncAgentConnect'][_0xffb3('0x17')](this));ami['on'](_0xffb3('0x21'),this[_0xffb3('0x22')]['bind'](this));ami['on'](_0xffb3('0x23'),this[_0xffb3('0x24')]['bind'](this));ami['on'](_0xffb3('0x25'),this[_0xffb3('0x26')][_0xffb3('0x17')](this));ami['on'](_0xffb3('0x27'),this[_0xffb3('0x28')][_0xffb3('0x17')](this));ami['on'](_0xffb3('0x29'),this['syncMusicOnHoldStop'][_0xffb3('0x17')](this));ami['on'](_0xffb3('0x2a'),this['syncAttendedTransfer'][_0xffb3('0x17')](this));ami['on']('blindtransfer',this['syncBlindTransfer'][_0xffb3('0x17')](this));this[_0xffb3('0x2b')]();this[_0xffb3('0x2c')]();}function clearChannels(_0x3bc410){if(!_[_0xffb3('0x2d')](_0x3bc410)){for(var _0x146708 in _0x3bc410){if(_0x3bc410['hasOwnProperty'](_0x146708)){delete _0x3bc410[_0x146708];}}}}function clearCampaigns(_0x796b8e){if(!_['isEmpty'](_0x796b8e)){for(var _0x1390c6 in _0x796b8e){if(_0x796b8e[_0xffb3('0x2e')](_0x1390c6)){_0x796b8e[_0x1390c6]['originated']=0x0;}}}}function clearVoiceQueues(_0x32e047){if(!_['isEmpty'](_0x32e047)){for(var _0x1eee6b in _0x32e047){if(_0x32e047[_0xffb3('0x2e')](_0x1eee6b)){_0x32e047[_0x1eee6b][_0xffb3('0x2f')]=0x0;_0x32e047[_0x1eee6b][_0xffb3('0x30')]=0x0;_0x32e047[_0x1eee6b]['pTalking']=0x0;_0x32e047[_0x1eee6b]['waiting']=0x0;_0x32e047[_0x1eee6b]['queueStatusComplete']=!![];}}}}function clearAgentBooked(_0x52fc8c){if(!_[_0xffb3('0x2d')](_0x52fc8c)){for(var _0x5d1630 in _0x52fc8c){if(_0x52fc8c[_0xffb3('0x2e')](_0x5d1630)){_0x52fc8c[_0x5d1630][_0xffb3('0x31')]=!![];}}}}VoiceQueueReport[_0xffb3('0x32')][_0xffb3('0x33')]=function(){var _0x5a30b5=this;for(var _0x282f46 in this[_0xffb3('0xf')]){if(this['channels'][_0xffb3('0x2e')](_0x282f46)&&!this[_0xffb3('0xf')][_0x282f46][_0xffb3('0x34')]){this['sequence'][_0xffb3('0xa')](function(){if(!_[_0xffb3('0x35')](_0x5a30b5[_0xffb3('0xf')][_0x282f46])){return ami['Action']({'action':_0xffb3('0x36'),'channel':_0x5a30b5[_0xffb3('0xf')][_0x282f46]['channel']})[_0xffb3('0x37')](function(_0x241882){if(_0x241882[_0xffb3('0x38')]===_0xffb3('0x39')){setTimeout(function(){if(_0x5a30b5[_0xffb3('0xf')][_0x282f46]){delete _0x5a30b5['channels'][_0x282f46];logger[_0xffb3('0x3a')](_0xffb3('0x3b'),_0x282f46,util[_0xffb3('0x3c')](_0x241882,{'showHidden':![],'depth':null}));}if(_0x5a30b5['queueReports'][_0x282f46]){delete _0x5a30b5[_0xffb3('0xd')][_0x282f46];logger[_0xffb3('0x3a')]('[%s][voiceQueueReport][checkQueueReport]',_0x282f46,util[_0xffb3('0x3c')](_0x241882,{'showHidden':![],'depth':null}));}if(_0x5a30b5[_0xffb3('0x14')][_0x282f46]){delete _0x5a30b5['variables'][_0x282f46];logger[_0xffb3('0x3a')](_0xffb3('0x3d'),_0x282f46,util['inspect'](_0x241882,{'showHidden':![],'depth':null}));}},0x1f40);}});}});}}};VoiceQueueReport['prototype']['syncFullyBooted']=function(){logger[_0xffb3('0x3a')](_0xffb3('0x3e'));clearChannels(this['channels']);this[_0xffb3('0x3f')](this['queueReports']);clearAgentBooked(this[_0xffb3('0xe')]);clearVoiceQueues(this[_0xffb3('0x11')]);clearCampaigns(this['campaigns']);};VoiceQueueReport[_0xffb3('0x32')]['clearQueueReport']=function(_0x20a558){var _0x45220a=this;if(!_['isEmpty'](_0x20a558)){for(var _0x80e2ec in _0x20a558){if(_0x20a558[_0xffb3('0x2e')](_0x80e2ec)){_0x45220a[_0xffb3('0x40')](_0x20a558[_0x80e2ec],_0xffb3('0x41'));delete _0x20a558[_0x80e2ec];}}}};VoiceQueueReport[_0xffb3('0x32')][_0xffb3('0x42')]=function(_0x19013d,_0x1a9492,_0x183968){io['to'](_0x19013d)[_0xffb3('0x42')](_0x1a9492,_0x183968);};VoiceQueueReport[_0xffb3('0x32')][_0xffb3('0x43')]=function(_0x2f8bc0,_0x568bc5){logger[_0xffb3('0x44')](_0xffb3('0x45')+_0x568bc5+_0xffb3('0x46'),_0x2f8bc0['uniqueid'],util[_0xffb3('0x3c')](_0x2f8bc0,{'showHidden':![],'depth':null}));this['emit'](util[_0xffb3('0x47')](_0xffb3('0x48'),_0x2f8bc0['name']),_0xffb3('0x49'),_0x2f8bc0);io[_0xffb3('0x42')]('voice_queue_presence:save',_0x2f8bc0);};VoiceQueueReport['prototype'][_0xffb3('0x40')]=function(_0x341f1d,_0x599f08){logger[_0xffb3('0x44')](_0xffb3('0x45')+_0x599f08+_0xffb3('0x4a'),_0x341f1d[_0xffb3('0x4b')],util[_0xffb3('0x3c')](_0x341f1d,{'showHidden':![],'depth':null}));this['emit'](util[_0xffb3('0x47')](_0xffb3('0x48'),_0x341f1d[_0xffb3('0x4c')]),_0xffb3('0x4d'),_0x341f1d);io[_0xffb3('0x42')]('voice_queue_presence:remove',_0x341f1d);};VoiceQueueReport['prototype'][_0xffb3('0x4e')]=function(_0x11a630,_0x55307b){if(_0x11a630[_0xffb3('0x4f')]===_0xffb3('0x50')){var _0x3c23d3={'id':_0x11a630['id'],'name':_0x11a630[_0xffb3('0x4c')],'strategy':_0x11a630['strategy'],'answered':_0x11a630['answered'],'available':_0x11a630[_0xffb3('0x51')],'loggedIn':_0x11a630[_0xffb3('0x52')],'pTalking':_0x11a630[_0xffb3('0x53')],'sumBillable':_0x11a630[_0xffb3('0x54')],'sumDuration':_0x11a630[_0xffb3('0x55')],'sumHoldTime':_0x11a630[_0xffb3('0x56')]||0x0,'talking':_0x11a630['talking'],'total':_0x11a630[_0xffb3('0x57')],'type':_0x11a630['type'],'unmanaged':_0x11a630[_0xffb3('0x58')],'abandoned':_0x11a630[_0xffb3('0x59')],'waiting':_0x11a630[_0xffb3('0x5a')]};if(_0x11a630[_0xffb3('0x5b')]){_0x3c23d3['Trunk']={'id':_0x11a630['Trunk']['id'],'name':_0x11a630[_0xffb3('0x5b')]['name'],'active':_0x11a630[_0xffb3('0x5b')][_0xffb3('0x5c')],'callerid':_0x11a630[_0xffb3('0x5b')]['callerid']};}if(_0x11a630[_0xffb3('0x5d')]){_0x3c23d3[_0xffb3('0x5d')]={'id':_0x11a630[_0xffb3('0x5d')]['id'],'name':_0x11a630[_0xffb3('0x5d')][_0xffb3('0x4c')]};}var _0x4b0fd3=md5(JSON[_0xffb3('0x5e')](_0x3c23d3));if(_0x11a630[_0xffb3('0x2')]!==_0x4b0fd3){_0x11a630[_0xffb3('0x2')]=_0x4b0fd3;logger['debug'](_0xffb3('0x5f')+_0x55307b+_0xffb3('0x60'),util[_0xffb3('0x3c')](_0x3c23d3,{'showHidden':![],'depth':null}));this['emit'](util[_0xffb3('0x47')](_0xffb3('0x48'),_0x3c23d3[_0xffb3('0x4c')]),_0xffb3('0x61'),_0x3c23d3);}}};VoiceQueueReport['prototype']['isNotNull']=function(_0x4cde82){return _0x4cde82!==null&&!_['isUndefined'](_0x4cde82);};VoiceQueueReport[_0xffb3('0x32')]['loopQueueShow']=function(){var _0x59e9e5=this;setInterval(function(){_0x59e9e5[_0xffb3('0x33')]();ami[_0xffb3('0x62')]({'action':_0xffb3('0x63')})[_0xffb3('0x37')](function(_0x9030ae){logger[_0xffb3('0x3a')](_0xffb3('0x64'),util['inspect'](_0x9030ae,{'showHidden':![],'depth':null}));});},0x2710);};VoiceQueueReport[_0xffb3('0x32')][_0xffb3('0x2b')]=function(){var _0x1f74bb=this;setInterval(function(){if(_0x1f74bb[_0xffb3('0x12')]){return ami[_0xffb3('0x62')]({'action':_0xffb3('0x15')})['then'](function(_0x99ff99){_0x1f74bb[_0xffb3('0x12')]=![];})['catch'](function(_0x5e38ac){logger[_0xffb3('0x3a')]('[voiceQueueReport][queuesummary]',util[_0xffb3('0x3c')](_0x5e38ac,{'showHidden':![],'depth':null}));});}},0x3e8);};VoiceQueueReport[_0xffb3('0x32')][_0xffb3('0x16')]=function(_0x5d3148){try{if(this['isNotNull'](_0x5d3148)&&this['isNotNull'](_0x5d3148[_0xffb3('0x65')])){logger['debug']('[voiceQueueReport][queuesummary]\x20event:',util['inspect'](_0x5d3148,{'showHidden':![],'depth':null}));if(this[_0xffb3('0x11')][_0x5d3148[_0xffb3('0x65')]]){logger[_0xffb3('0x66')]('[voiceQueueReport][queuesummary]\x20name:%s',_0x5d3148[_0xffb3('0x65')]);var _0x5847ae=_[_0xffb3('0x67')](this[_0xffb3('0xf')],'queue')[_0x5d3148[_0xffb3('0x65')]]||0x0;var _0x2c138d=_0x5847ae-_0x5d3148[_0xffb3('0x68')];if(this[_0xffb3('0x11')][_0x5d3148['queue']][_0xffb3('0x5a')]!==_[_0xffb3('0x69')](_0x5d3148[_0xffb3('0x68')])||this['voiceQueues'][_0x5d3148['queue']]['loggedIn']!==_[_0xffb3('0x69')](_0x5d3148[_0xffb3('0x6a')])||this['voiceQueues'][_0x5d3148[_0xffb3('0x65')]][_0xffb3('0x51')]!==_['toNumber'](_0x5d3148[_0xffb3('0x51')])||this[_0xffb3('0x11')][_0x5d3148[_0xffb3('0x65')]][_0xffb3('0x30')]!==_0x2c138d){this[_0xffb3('0x11')][_0x5d3148['queue']][_0xffb3('0x5a')]=_[_0xffb3('0x69')](_0x5d3148[_0xffb3('0x68')]);this['voiceQueues'][_0x5d3148[_0xffb3('0x65')]][_0xffb3('0x52')]=_['toNumber'](_0x5d3148[_0xffb3('0x6a')]);this[_0xffb3('0x11')][_0x5d3148['queue']]['available']=_[_0xffb3('0x69')](_0x5d3148['available']);this[_0xffb3('0x11')][_0x5d3148[_0xffb3('0x65')]][_0xffb3('0x30')]=_0x2c138d>0x0?_0x2c138d:0x0;this[_0xffb3('0x11')][_0x5d3148[_0xffb3('0x65')]][_0xffb3('0x30')]=this[_0xffb3('0x11')][_0x5d3148[_0xffb3('0x65')]]['talking']>_[_0xffb3('0x69')](_0x5d3148[_0xffb3('0x6a')])?_['toNumber'](_0x5d3148['loggedin']):this[_0xffb3('0x11')][_0x5d3148[_0xffb3('0x65')]][_0xffb3('0x30')];this[_0xffb3('0x4e')](this['voiceQueues'][_0x5d3148[_0xffb3('0x65')]],'queuesummary');}logger['debug'](_0xffb3('0x6b'),util['inspect'](this[_0xffb3('0x11')][_0x5d3148[_0xffb3('0x65')]],{'showHidden':![],'depth':null}));ami[_0xffb3('0x42')]('custom:queuesummary',this[_0xffb3('0x11')][_0x5d3148['queue']]);}}}catch(_0x338afe){logger[_0xffb3('0x3a')](_0xffb3('0x6c'),util[_0xffb3('0x3c')](_0x338afe,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xffb3('0x32')][_0xffb3('0x19')]=function(_0x1928f9){logger[_0xffb3('0x44')](_0xffb3('0x6d'),util[_0xffb3('0x3c')](_0x1928f9,{'showHidden':![],'depth':null}));this[_0xffb3('0x12')]=!![];};VoiceQueueReport['prototype'][_0xffb3('0x1b')]=function(_0x17a45c){try{if(this[_0xffb3('0x6e')](_0x17a45c)){logger['debug'](_0xffb3('0x6f'),_0x17a45c[_0xffb3('0x4b')],util[_0xffb3('0x3c')](_0x17a45c,{'showHidden':![],'depth':null}));if(_[_0xffb3('0x70')](this[_0xffb3('0xd')][_0x17a45c[_0xffb3('0x4b')]])){this['queueReports'][_0x17a45c['uniqueid']]=[];this[_0xffb3('0xf')][_0x17a45c[_0xffb3('0x4b')]]={};}var _0x1b7665=new QueueReport();_0x1b7665[_0xffb3('0x4c')]=_0x17a45c[_0xffb3('0x65')];_0x1b7665[_0xffb3('0x4f')]=this[_0xffb3('0x11')][_0x1b7665[_0xffb3('0x4c')]]&&this[_0xffb3('0x11')][_0x1b7665[_0xffb3('0x4c')]][_0xffb3('0x4f')]?this[_0xffb3('0x11')][_0x1b7665[_0xffb3('0x4c')]][_0xffb3('0x4f')]||_0xffb3('0x50'):_0xffb3('0x50');_0x1b7665[_0xffb3('0x65')]=_0x17a45c[_0xffb3('0x65')];_0x1b7665[_0xffb3('0x71')]=moment()[_0xffb3('0x47')](_0xffb3('0x72'));_0x1b7665[_0xffb3('0x73')]=_0x17a45c[_0xffb3('0x73')];_0x1b7665[_0xffb3('0x74')]=_0x17a45c[_0xffb3('0x74')];_0x1b7665[_0xffb3('0x4b')]=_0x17a45c['uniqueid'];logger['info'](_0xffb3('0x75'),_0x1b7665[_0xffb3('0x4c')],_0x1b7665['type']);_['merge'](_0x1b7665,_[_0xffb3('0x76')](_0x17a45c,_[_0xffb3('0x77')](_0x1b7665)));this['queueReports'][_0x17a45c[_0xffb3('0x4b')]][_0xffb3('0x78')](_0x1b7665);this['channels'][_0x17a45c[_0xffb3('0x4b')]]=_0x1b7665;this[_0xffb3('0x43')](_0x1b7665,_0xffb3('0x1a'));}}catch(_0x29b846){logger[_0xffb3('0x3a')](_0xffb3('0x6f'),_0x17a45c[_0xffb3('0x4b')],util['inspect'](_0x29b846,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0xffb3('0x1d')]=function(_0x14b3b1){try{if(this[_0xffb3('0x6e')](_0x14b3b1)){logger[_0xffb3('0x44')]('[%s][voiceQueueReport][queuecallerabandon]',_0x14b3b1[_0xffb3('0x4b')],util[_0xffb3('0x3c')](_0x14b3b1,{'showHidden':![],'depth':null}));if(this[_0xffb3('0xd')][_0x14b3b1[_0xffb3('0x4b')]]){var _0x531d46=_[_0xffb3('0x79')](this[_0xffb3('0xd')][_0x14b3b1[_0xffb3('0x4b')]]);_0x531d46[_0xffb3('0x7a')]=![];_0x531d46['queuecallercompleteAt']=null;_0x531d46[_0xffb3('0x7b')]=_0x14b3b1[_0xffb3('0x7b')];_0x531d46[_0xffb3('0x7c')]=_0x14b3b1[_0xffb3('0x7c')];_0x531d46['queuecallerabandon']=!![];_0x531d46[_0xffb3('0x7d')]=moment()[_0xffb3('0x47')](_0xffb3('0x72'));_0x531d46[_0xffb3('0x7e')]=_0xffb3('0x7f');_0x531d46['lastAssignedTo']=null;logger[_0xffb3('0x66')](_0xffb3('0x80'),_0x531d46[_0xffb3('0x4c')],_0x531d46['type']);this[_0xffb3('0xf')][_0x14b3b1[_0xffb3('0x4b')]]=_0x531d46;this[_0xffb3('0x40')](_0x531d46,_0xffb3('0x1c'));}}}catch(_0x462f87){logger[_0xffb3('0x3a')](_0xffb3('0x81'),_0x14b3b1[_0xffb3('0x4b')],util[_0xffb3('0x3c')](_0x462f87,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xffb3('0x32')][_0xffb3('0x1f')]=function(_0x1f2677){try{if(this[_0xffb3('0x6e')](_0x1f2677)){logger['debug'](_0xffb3('0x82'),_0x1f2677[_0xffb3('0x4b')],util[_0xffb3('0x3c')](_0x1f2677,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x1f2677['uniqueid']]){var _0x19638e=_[_0xffb3('0x79')](this[_0xffb3('0xd')][_0x1f2677[_0xffb3('0x4b')]]);_0x19638e[_0xffb3('0x83')]=moment()[_0xffb3('0x47')]('YYYY-MM-DD\x20HH:mm:ss');_0x19638e[_0xffb3('0x84')]=_0x1f2677[_0xffb3('0x84')];_0x19638e[_0xffb3('0x85')]=_0x1f2677[_0xffb3('0x85')];logger[_0xffb3('0x66')](_0xffb3('0x86'),_0x19638e['name'],_0x19638e[_0xffb3('0x4f')],_0x1f2677[_0xffb3('0x84')],_0x1f2677['connectedlinename']);this[_0xffb3('0xf')][_0x1f2677['uniqueid']]=_0x19638e;this['emitVoiceQueueChannelSave'](_0x19638e,'queuecallerleave');}}}catch(_0x30d06e){logger[_0xffb3('0x3a')](_0xffb3('0x82'),_0x1f2677['uniqueid'],util[_0xffb3('0x3c')](_0x30d06e,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xffb3('0x32')]['syncAgentConnect']=function(_0x28ade2){try{if(this['isNotNull'](_0x28ade2)){logger['debug'](_0xffb3('0x87'),_0x28ade2[_0xffb3('0x4b')],util['inspect'](_0x28ade2,{'showHidden':![],'depth':null}));if(this[_0xffb3('0xd')][_0x28ade2[_0xffb3('0x4b')]]){var _0x59ad73=_[_0xffb3('0x79')](this[_0xffb3('0xd')][_0x28ade2[_0xffb3('0x4b')]]);_0x59ad73[_0xffb3('0x7a')]=!![];_0x59ad73['queuecallerexitreason']='COMPLETEDBYAGENT';logger['info'](_0xffb3('0x88'),_0x59ad73[_0xffb3('0x4c')],_0x59ad73[_0xffb3('0x4f')]);}}}catch(_0x311b51){logger[_0xffb3('0x3a')](_0xffb3('0x87'),_0x28ade2[_0xffb3('0x4b')],util[_0xffb3('0x3c')](_0x311b51,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xffb3('0x32')][_0xffb3('0x89')]=function(_0x580729){try{if(this[_0xffb3('0x6e')](_0x580729)){logger['debug'](_0xffb3('0x8a'),_0x580729[_0xffb3('0x4b')],util[_0xffb3('0x3c')](_0x580729,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x580729[_0xffb3('0x4b')]]){var _0x3ea5ec=_['last'](this['queueReports'][_0x580729[_0xffb3('0x4b')]]);_0x3ea5ec[_0xffb3('0x1c')]=![];_0x3ea5ec[_0xffb3('0x7d')]=null;_0x3ea5ec[_0xffb3('0x8b')]=!![];_0x3ea5ec['lastAssignedTo']=_0x580729[_0xffb3('0x8c')];_0x3ea5ec[_0xffb3('0x7b')]=_0x580729[_0xffb3('0x7b')];_0x3ea5ec['queuecallercomplete']=!![];_0x3ea5ec[_0xffb3('0x8d')]=![];_0x3ea5ec[_0xffb3('0x8e')]=null;if(!_0x3ea5ec['transfer']){if(_0x580729['reason']==_0xffb3('0x8f')){_0x3ea5ec['queuecallerexitreason']=_0xffb3('0x90');logger[_0xffb3('0x66')](_0xffb3('0x91'),_0x3ea5ec[_0xffb3('0x4c')],_0x3ea5ec[_0xffb3('0x4f')]);}else{if(_[_0xffb3('0x92')](_0x580729[_0xffb3('0x93')][_0xffb3('0x94')](),_0xffb3('0x95'))){if(this['queueReports'][_0x580729['linkedid']]){var _0x4d549d=_[_0xffb3('0x79')](this['queueReports'][_0x580729['linkedid']]);_0x4d549d['queuecallercomplete']=![];_0x4d549d[_0xffb3('0x8d')]=!![];_0x4d549d[_0xffb3('0x8e')]=moment(_0x3ea5ec[_0xffb3('0x71')])[_0xffb3('0x96')](_0x580729[_0xffb3('0x7b')],_0xffb3('0x97'))[_0xffb3('0x47')](_0xffb3('0x72'));_0x4d549d[_0xffb3('0x7e')]=_0xffb3('0x98');_0x4d549d[_0xffb3('0x8f')]=!![];_0x4d549d['transfertype']='FORWARD';_0x4d549d[_0xffb3('0x99')]=_0x580729[_0xffb3('0x9a')];_0x4d549d['transferuniqueid']=_0x580729[_0xffb3('0x4b')];logger[_0xffb3('0x66')](_0xffb3('0x9b'),_0x4d549d[_0xffb3('0x4c')],_0x4d549d[_0xffb3('0x4f')]);var _0x4083e2=this[_0xffb3('0xd')][_0x580729[_0xffb3('0x9c')]];this[_0xffb3('0xd')][_0x580729[_0xffb3('0x9c')]]=this['queueReports'][_0x580729[_0xffb3('0x4b')]];this[_0xffb3('0xd')][_0x580729[_0xffb3('0x4b')]]=_0x4083e2;}}else{_0x3ea5ec[_0xffb3('0x7e')]='COMPLETEDBY'+_0x580729[_0xffb3('0x9d')][_0xffb3('0x9e')]();logger[_0xffb3('0x66')](_0xffb3('0x9f'),_0x3ea5ec[_0xffb3('0x4c')],_0x3ea5ec[_0xffb3('0x4f')],_0x3ea5ec[_0xffb3('0x7e')]);}}}this['channels'][_0x580729[_0xffb3('0x4b')]]=_0x3ea5ec;this['emitVoiceQueueChannelRemove'](_0x3ea5ec,'agentcomplete');}}}catch(_0x1583c1){logger[_0xffb3('0x3a')](_0xffb3('0x8a'),_0x580729[_0xffb3('0x4b')],util[_0xffb3('0x3c')](_0x1583c1,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0xffb3('0x22')]=function(_0x41af0e){try{if(this[_0xffb3('0x6e')](_0x41af0e)){logger[_0xffb3('0x44')](_0xffb3('0xa0'),_0x41af0e['uniqueid'],util['inspect'](_0x41af0e,{'showHidden':![],'depth':null}));this[_0xffb3('0xa1')](_0x41af0e['uniqueid'],_['keys'](_0x41af0e[_0xffb3('0xa2')])[0x0],_0x41af0e[_0xffb3('0xa3')]);if(this[_0xffb3('0xd')][_0x41af0e[_0xffb3('0x4b')]]){var _0x2c8dbe=_[_0xffb3('0x79')](this['queueReports'][_0x41af0e['uniqueid']]);if(_0x2c8dbe){if(this[_0xffb3('0x6e')](_0x41af0e[_0xffb3('0xa2')])&&this[_0xffb3('0x6e')](_0x41af0e[_0xffb3('0xa2')][_0xffb3('0xa4')])){switch(_0x41af0e[_0xffb3('0xa3')]){case _0xffb3('0xa5'):_0x2c8dbe['queuecallerexit']=![];_0x2c8dbe[_0xffb3('0x8e')]=null;break;case _0xffb3('0xa6'):_0x2c8dbe['lastevent']=_0xffb3('0xa7');_0x2c8dbe[_0xffb3('0x8d')]=!![];_0x2c8dbe[_0xffb3('0x8e')]=moment()[_0xffb3('0x47')](_0xffb3('0x72'));_0x2c8dbe[_0xffb3('0x83')]=moment()[_0xffb3('0x47')](_0xffb3('0x72'));logger['debug'](_0xffb3('0xa8'),_0x41af0e[_0xffb3('0x4b')],util[_0xffb3('0x3c')](_0x2c8dbe,{'showHidden':![],'depth':null}));ami[_0xffb3('0x42')]('custom:timeout',_0x2c8dbe);break;default:_0x2c8dbe[_0xffb3('0x8d')]=!![];_0x2c8dbe[_0xffb3('0x8e')]=moment()[_0xffb3('0x47')](_0xffb3('0x72'));_0x2c8dbe['queuecallerleaveAt']=moment()[_0xffb3('0x47')](_0xffb3('0x72'));}_0x2c8dbe[_0xffb3('0x1c')]=![];_0x2c8dbe['queuecallerabandonAt']=null;_0x2c8dbe[_0xffb3('0x7e')]=_0x41af0e[_0xffb3('0xa3')];this[_0xffb3('0xf')][_0x41af0e[_0xffb3('0x4b')]]=_0x2c8dbe;this[_0xffb3('0x40')](_0x2c8dbe,_0xffb3('0x21'));}else if(this[_0xffb3('0x6e')](_0x41af0e[_0xffb3('0xa2')])&&this['isNotNull'](_0x41af0e[_0xffb3('0xa2')][_0xffb3('0xa9')])){if(!_0x2c8dbe['queuecallerabandon']){_0x2c8dbe[_0xffb3('0x8d')]=!![];_0x2c8dbe[_0xffb3('0x8e')]=moment()[_0xffb3('0x47')]('YYYY-MM-DD\x20HH:mm:ss');_0x2c8dbe['queuecallerexitreason']='EXITWITHKEY';_0x2c8dbe[_0xffb3('0x83')]=moment()[_0xffb3('0x47')](_0xffb3('0x72'));this[_0xffb3('0xf')][_0x41af0e[_0xffb3('0x4b')]]=_0x2c8dbe;}}logger[_0xffb3('0x66')](_0xffb3('0xaa'),_0x41af0e[_0xffb3('0x4b')],_0x2c8dbe[_0xffb3('0x4c')],_0x2c8dbe[_0xffb3('0x4f')],_[_0xffb3('0x77')](_0x41af0e[_0xffb3('0xa2')])[0x0],_0x41af0e[_0xffb3('0xa3')]);_0x2c8dbe[_0xffb3('0x14')]=this[_0xffb3('0x14')][_0x41af0e[_0xffb3('0x4b')]];}}}}catch(_0x1b0539){logger[_0xffb3('0x3a')](_0xffb3('0xa0'),_0x41af0e['uniqueid'],util[_0xffb3('0x3c')](_0x1b0539,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype']['addVariable']=function(_0x5e8b1d,_0x4a3913,_0x5b93b8){var _0x178054=['rtpaudioqos',_0xffb3('0xab'),_0xffb3('0xac'),_0xffb3('0xad'),_0xffb3('0xae'),_0xffb3('0xaf'),'rtpaudioqosrtt',_0xffb3('0xb0'),_0xffb3('0xb1'),_0xffb3('0xb2'),_0xffb3('0xb3'),'bridgepvtcallid',_0xffb3('0xb4'),_0xffb3('0xb5'),_0xffb3('0xb6'),'memberlastcall',_0xffb3('0x8c'),_0xffb3('0xb7'),_0xffb3('0xb8')];if(!_[_0xffb3('0x35')](_0x4a3913)&&!_[_0xffb3('0xb9')](_0x178054,_0x4a3913)){if(_[_0xffb3('0x70')](this[_0xffb3('0x14')][_0x5e8b1d])){this[_0xffb3('0x14')][_0x5e8b1d]={};}this[_0xffb3('0x14')][_0x5e8b1d][_0x4a3913]=_0x5b93b8;}};VoiceQueueReport[_0xffb3('0x32')][_0xffb3('0x24')]=function(_0x36d011){try{if(this['isNotNull'](_0x36d011)){logger['debug'](_0xffb3('0xba'),_0x36d011[_0xffb3('0x4b')],util[_0xffb3('0x3c')](_0x36d011,{'showHidden':![],'depth':null}));if(this[_0xffb3('0xd')][_0x36d011['uniqueid']]){for(var _0xfbd7b=0x0,_0x52c7d9={};_0xfbd7b<this[_0xffb3('0xd')][_0x36d011[_0xffb3('0x4b')]][_0xffb3('0xbb')];_0xfbd7b+=0x1){_0x52c7d9=this[_0xffb3('0xd')][_0x36d011[_0xffb3('0x4b')]][_0xfbd7b];if(this['voiceQueues'][_0x52c7d9[_0xffb3('0x65')]]){if(_0x52c7d9[_0xffb3('0x8d')]&&_0x52c7d9['transfer']!=!![]){this['voiceQueues'][_0x52c7d9[_0xffb3('0x65')]][_0xffb3('0x58')]+=0x1;}if(_0x52c7d9[_0xffb3('0x1c')]){this[_0xffb3('0x11')][_0x52c7d9[_0xffb3('0x65')]][_0xffb3('0x59')]+=0x1;}this['voiceQueues'][_0x52c7d9[_0xffb3('0x65')]]['sumHoldTime']+=moment(_0x52c7d9[_0xffb3('0x83')])[_0xffb3('0xbc')](_0x52c7d9[_0xffb3('0x71')],'seconds')||0x0;if(_0xfbd7b===this[_0xffb3('0xd')][_0x36d011[_0xffb3('0x4b')]][_0xffb3('0xbb')]-0x1){this[_0xffb3('0x11')][_0x52c7d9[_0xffb3('0x65')]]['sumDuration']+=moment()[_0xffb3('0xbd')](0x0)[_0xffb3('0xbc')](_0x52c7d9['queuecallerjoinAt'],_0xffb3('0x97'));this[_0xffb3('0x11')][_0x52c7d9['queue']]['total']+=0x1;if(_0x52c7d9[_0xffb3('0x7a')]){this[_0xffb3('0x11')][_0x52c7d9[_0xffb3('0x65')]][_0xffb3('0xbe')]+=0x1;this[_0xffb3('0x11')][_0x52c7d9[_0xffb3('0x65')]][_0xffb3('0x54')]+=moment()[_0xffb3('0xbd')](0x0)[_0xffb3('0xbc')](_0x52c7d9[_0xffb3('0x83')],'seconds');_0x52c7d9[_0xffb3('0xbf')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x52c7d9[_0xffb3('0x8d')]=![];_0x52c7d9[_0xffb3('0x8e')]=null;}if(_0x52c7d9[_0xffb3('0x8d')]&&_0x52c7d9[_0xffb3('0x8f')]!=!![]){_0x52c7d9[_0xffb3('0xc0')]=_0xffb3('0x58');logger[_0xffb3('0x44')](_0xffb3('0xc1'),_0x36d011['uniqueid'],util['inspect'](_0x52c7d9,{'showHidden':![],'depth':null}));ami[_0xffb3('0x42')]('custom:queuecallerunmanaged',_0x52c7d9);}if(_0x52c7d9[_0xffb3('0x1c')]){_0x52c7d9[_0xffb3('0xc0')]=_0xffb3('0x59');logger[_0xffb3('0x44')](_0xffb3('0xc2'),_0x36d011['uniqueid'],util['inspect'](_0x52c7d9,{'showHidden':![],'depth':null}));ami['emit'](_0xffb3('0xc3'),_0x52c7d9);}}else{this['voiceQueues'][_0x52c7d9['queue']]['sumDuration']+=this[_0xffb3('0x11')][_0x52c7d9[_0xffb3('0x65')]][_0xffb3('0x56')];}logger[_0xffb3('0x66')](_0xffb3('0xc4'),_0x36d011[_0xffb3('0x4b')],_0x52c7d9['name'],_0x52c7d9['type'],_0x36d011['cause-txt']);this['channels'][_0x36d011['uniqueid']]=_0x52c7d9;this[_0xffb3('0x40')](_0x52c7d9,_0xffb3('0x23'));this[_0xffb3('0x4e')](this[_0xffb3('0x11')][_0x52c7d9[_0xffb3('0x65')]],_0xffb3('0x23'));}}logger[_0xffb3('0x44')]('[%s][voiceQueueReport][hangup]\x20sending\x20voiceQueueReport\x20event:',_0x36d011[_0xffb3('0x4b')],util[_0xffb3('0x3c')](this[_0xffb3('0xd')][_0x36d011[_0xffb3('0x4b')]],{'showHidden':![],'depth':null}));ami[_0xffb3('0x42')](_0xffb3('0xc5'),this[_0xffb3('0xd')][_0x36d011[_0xffb3('0x4b')]]);delete this[_0xffb3('0xd')][_0x36d011['uniqueid']];delete this['channels'][_0x36d011[_0xffb3('0x4b')]];}if(this[_0xffb3('0x14')][_0x36d011['uniqueid']]){delete this[_0xffb3('0x14')][_0x36d011[_0xffb3('0x4b')]];}}}catch(_0x1f9ceb){logger[_0xffb3('0x3a')](_0xffb3('0xba'),_0x36d011[_0xffb3('0x4b')],util[_0xffb3('0x3c')](_0x1f9ceb,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xffb3('0x32')]['syncAttendedTransfer']=function(_0x511d61){try{if(this[_0xffb3('0x6e')](_0x511d61)){logger[_0xffb3('0x44')](_0xffb3('0xc6'),_0x511d61['uniqueid'],util['inspect'](_0x511d61,{'showHidden':![],'depth':null}));var _0x57e67e;if(this[_0xffb3('0xd')][_0x511d61[_0xffb3('0xc7')]]){_0x57e67e=_[_0xffb3('0x79')](this[_0xffb3('0xd')][_0x511d61['transfereeuniqueid']]);_0x57e67e[_0xffb3('0x99')]=_0x511d61[_0xffb3('0xc8')];_0x57e67e['transferuniqueid']=_0x511d61[_0xffb3('0xc9')];_0x57e67e[_0xffb3('0x7e')]=_0xffb3('0xca');_0x57e67e[_0xffb3('0x8f')]=!![];_0x57e67e['transfertype']=_0xffb3('0xcb');if(this[_0xffb3('0xd')][_0x511d61['secondtransfereruniqueid']]){var _0x578dc6=this[_0xffb3('0xd')][_0x511d61[_0xffb3('0xc9')]];this['queueReports'][_0x511d61[_0xffb3('0xc9')]]=this['queueReports'][_0x511d61[_0xffb3('0xc7')]];this[_0xffb3('0xd')][_0x511d61['transfereeuniqueid']]=_0x578dc6;var _0x19c55=_[_0xffb3('0x79')](this[_0xffb3('0xd')][_0x511d61[_0xffb3('0xc7')]]);_0x19c55[_0xffb3('0x34')]=!![];}logger[_0xffb3('0x66')](_0xffb3('0xcc'),_0x511d61[_0xffb3('0x4b')],_0x57e67e['name'],_0x57e67e[_0xffb3('0x4f')],_0x57e67e[_0xffb3('0x99')],_0x57e67e[_0xffb3('0xcd')]);}else if(this['queueReports'][_0x511d61[_0xffb3('0xce')]]){_0x57e67e=_[_0xffb3('0x79')](this[_0xffb3('0xd')][_0x511d61['transfertargetuniqueid']]);_0x57e67e['transferexten']=_0x511d61[_0xffb3('0xcf')];_0x57e67e[_0xffb3('0xcd')]=_0x511d61[_0xffb3('0xd0')];_0x57e67e[_0xffb3('0x7e')]=_0xffb3('0xca');_0x57e67e[_0xffb3('0x8f')]=!![];_0x57e67e[_0xffb3('0xd1')]=_0xffb3('0xcb');if(this[_0xffb3('0xd')][_0x511d61[_0xffb3('0xd0')]]){var _0x578dc6=this[_0xffb3('0xd')][_0x511d61[_0xffb3('0xd0')]];this[_0xffb3('0xd')][_0x511d61['origtransfereruniqueid']]=this['queueReports'][_0x511d61[_0xffb3('0xce')]];this[_0xffb3('0xd')][_0x511d61['transfertargetuniqueid']]=_0x578dc6;var _0x19c55=_[_0xffb3('0x79')](this[_0xffb3('0xd')][_0x511d61[_0xffb3('0xce')]]);_0x19c55[_0xffb3('0x34')]=!![];}logger[_0xffb3('0x66')]('[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s',_0x511d61[_0xffb3('0x4b')],_0x57e67e[_0xffb3('0x4c')],_0x57e67e[_0xffb3('0x4f')],_0x57e67e[_0xffb3('0x99')],_0x57e67e[_0xffb3('0xcd')]);}}}catch(_0x444435){logger['error']('[%s][voiceQueueReport][attendedtransfer]',_0x511d61[_0xffb3('0x4b')],util['inspect'](_0x444435,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xffb3('0x32')][_0xffb3('0xd2')]=function(_0x49ee5a){try{if(this[_0xffb3('0x6e')](_0x49ee5a)){logger[_0xffb3('0x44')](_0xffb3('0xd3'),_0x49ee5a[_0xffb3('0x4b')],util[_0xffb3('0x3c')](_0x49ee5a,{'showHidden':![],'depth':null}));if(this[_0xffb3('0xd')][_0x49ee5a[_0xffb3('0xc7')]]){var _0x5394d8=_[_0xffb3('0x79')](this[_0xffb3('0xd')][_0x49ee5a[_0xffb3('0xc7')]]);_0x5394d8[_0xffb3('0x7e')]=_0xffb3('0xd4');_0x5394d8['transfer']=!![];_0x5394d8[_0xffb3('0xd1')]=_0xffb3('0xd5');_0x5394d8[_0xffb3('0x99')]=_0x49ee5a['extension'];_0x5394d8[_0xffb3('0xcd')]=_0x49ee5a[_0xffb3('0xc7')];logger[_0xffb3('0x66')](_0xffb3('0xd6'),_0x49ee5a['uniqueid'],_0x5394d8[_0xffb3('0x4c')],_0x5394d8['type'],_0x5394d8[_0xffb3('0x99')],_0x5394d8['transferuniqueid']);this[_0xffb3('0x24')]({'event':'BlindTransfer','uniqueid':_0x49ee5a['transfereeuniqueid'],'context':_0x49ee5a[_0xffb3('0xd7')],'channel':_0x49ee5a[_0xffb3('0xd8')]});}}}catch(_0x5d8493){logger[_0xffb3('0x3a')]('[%s][voiceQueueReport][blindtransfer]',_0x49ee5a['uniqueid'],util[_0xffb3('0x3c')](_0x5d8493,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xffb3('0x32')][_0xffb3('0x28')]=function(_0x1af160){try{if(this[_0xffb3('0x6e')](_0x1af160)){logger[_0xffb3('0x44')](_0xffb3('0xd9'),_0x1af160[_0xffb3('0x4b')],util[_0xffb3('0x3c')](_0x1af160,{'showHidden':![],'depth':null}));if(this[_0xffb3('0xd')][_0x1af160[_0xffb3('0x4b')]]){var _0x4e2e94=_[_0xffb3('0x79')](this[_0xffb3('0xd')][_0x1af160[_0xffb3('0x4b')]]);if(!_[_0xffb3('0x35')](_0x4e2e94[_0xffb3('0x83')])){_0x4e2e94[_0xffb3('0xda')]=moment()[_0xffb3('0x47')](_0xffb3('0x72'));logger['info'](_0xffb3('0xdb'),_0x1af160[_0xffb3('0x4b')],_0x4e2e94[_0xffb3('0xda')]);}}}}catch(_0x159128){logger[_0xffb3('0x3a')](_0xffb3('0xd9'),_0x1af160[_0xffb3('0x4b')],util['inspect'](_0x159128,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype']['syncMusicOnHoldStop']=function(_0x115777){try{if(this['isNotNull'](_0x115777)){logger['debug'](_0xffb3('0xdc'),_0x115777['uniqueid'],util['inspect'](_0x115777,{'showHidden':![],'depth':null}));if(this[_0xffb3('0xd')][_0x115777[_0xffb3('0x4b')]]){var _0x3c8d2b=_['last'](this[_0xffb3('0xd')][_0x115777[_0xffb3('0x4b')]]);if(!_[_0xffb3('0x35')](_0x3c8d2b[_0xffb3('0xda')])){_0x3c8d2b[_0xffb3('0xdd')]+=moment()['milliseconds'](0x0)[_0xffb3('0xbc')](_0x3c8d2b[_0xffb3('0xda')],_0xffb3('0x97'));logger['info'](_0xffb3('0xde'),_0x115777[_0xffb3('0x4b')],_0x3c8d2b[_0xffb3('0xdd')]);delete _0x3c8d2b[_0xffb3('0xda')];}}}}catch(_0xd360d8){logger['error'](_0xffb3('0xdc'),_0x115777['uniqueid'],util['inspect'](_0xd360d8,{'showHidden':![],'depth':null}));}};module['exports']=VoiceQueueReport;
\ No newline at end of file
+var _0x1752=['voiceQueues','emitVoiceQueueChannelRemove','clearqueuereport','emit','[%s][voiceQueueReport][',']\x20sending\x20voice_queue_channel:save\x20event:','uniqueid','format','voice:queue:%s','voice_queue_presence:save','debug','emitVoiceQueueSummary','type','inbound','name','strategy','available','loggedIn','sumBillable','sumDuration','sumHoldTime','total','unmanaged','Trunk','active','callerid','Interval','stringify','[voiceQueueReport][',']\x20sending\x20voice_queue:save\x20event:','isUndefined','queues','[voiceQueueReport][queues]','queuesummary','then','catch','[voiceQueueReport][queuesummary]','isNotNull','queue','[voiceQueueReport][queuesummary]\x20event:','[voiceQueueReport][queuesummary]\x20name:%s','countBy','callers','toNumber','loggedin','[voiceQueueReport][queuesummary]\x20sending\x20queuesummary\x20event:','position','count','info','[voiceQueueReport][queuecallerjoin]\x20name:%s\x20type:%s','pick','keys','push','emitVoiceQueueChannelSave','syncQueueCallerAbandon','[%s][voiceQueueReport][queuecallerabandon]','queuecallercomplete','queuecallercompleteAt','holdtime','originalposition','queuecallerabandon','queuecallerexitreason','ABANDONED','lastAssignedTo','[voiceQueueReport][queuecallerabandon]\x20name:%s\x20type:%s','[%s][voiceQueueReport][queuecallerleave]','queuecallerleaveAt','YYYY-MM-DD\x20HH:mm:ss','connectedlinenum','connectedlinename','[%s][voiceQueueReport][agentconnect]','last','COMPLETEDBYAGENT','[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT','queuecallerabandonAt','assigned','membername','queuecallerexit','queuecallerexitAt','transfer','reason','COMPLETED','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETED','startsWith','toLowerCase','local/','linkedid','queuecallerjoinAt','add','FORWARD','transferexten','destexten','transferuniqueid','COMPLETEDBY','toUpperCase','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:%s','[%s][voiceQueueReport][agentcomplete]','[%s][voiceQueueReport][varset]','addVariable','variable','value','queuestatus','CONTINUE','TIMEOUT','lastevent','timeout','[%s][voiceQueueReport][varset]\x20sending\x20timeout\x20event:','custom:timeout','[%s][voiceQueueReport][varset]\x20name:%s\x20type:%s\x20variable:%s\x20value:%s','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','sipcallid','bridgepeer','bridgepvtcallid','membercalls','memberdynamic','memberinterface','memberlastcall','memberpenalty','memberrealtime','includes','abandoned','length','milliseconds','diff','answered','[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerunmanaged\x20event:','[%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][hangup]','[%s][voiceQueueReport][attendedtransfer]','transfereeuniqueid','secondtransfererexten','ATTENDEDTRANSFER','transfertype','ATTENDED','secondtransfereruniqueid','transfertargetuniqueid','origtransfererexten','origtransfereruniqueid','switch','[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','[%s][voiceQueueReport][blindtransfer]','BLINDTRANSFER','BLIND','extension','[%s][voiceQueueReport][blindTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','BlindTransfer','context','syncMusicOnHoldStart','[%s][voiceQueueReport][musiconholdstart]','mohstarttime','[%s][voiceQueueReport][musiconholdstart]\x20mohstarttime:%s','syncMusicOnHoldStop','[%s][voiceQueueReport][musiconholdstop]','mohtime','seconds','exports','moment','util','md5','ioredis','../../../config/environment','../../../config/logger','../ami','../model/queueReport','redis','defaults','localhost','socket.io-emitter','prototype','enqueue','tail','finally','agents','flagQueueSummary','campaigns','variables','syncQueueSummary','bind','queuesummarycomplete','syncQueueSummaryComplete','queuecallerjoin','syncQueueCallerJoin','queuecallerleave','syncQueueCallerLeave','agentconnect','varset','syncVarSet','syncHangup','fullybooted','musiconholdstop','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','loopQueueSummary','loopQueueShow','isEmpty','originated','hasOwnProperty','talking','pTalking','waiting','queueStatusComplete','clearZombieChannels','channels','isNil','Action','channel','message','[%s][voiceQueueReport][checkChannel]','inspect','queueReports','error','[%s][voiceQueueReport][checkQueueReport]','syncFullyBooted','clearQueueReport'];(function(_0x14ab25,_0x57e411){var _0x36f5ad=function(_0x34f363){while(--_0x34f363){_0x14ab25['push'](_0x14ab25['shift']());}};_0x36f5ad(++_0x57e411);}(_0x1752,0xa5));var _0x2175=function(_0x71d6ad,_0x2d5b0d){_0x71d6ad=_0x71d6ad-0x0;var _0x58111f=_0x1752[_0x71d6ad];return _0x58111f;};'use strict';var _=require('lodash');var moment=require(_0x2175('0x0'));var util=require(_0x2175('0x1'));var md5=require(_0x2175('0x2'));var Redis=require(_0x2175('0x3'));var config=require(_0x2175('0x4'));var logger=require(_0x2175('0x5'))('ami');var ami=require(_0x2175('0x6'));var QueueReport=require(_0x2175('0x7'));config[_0x2175('0x8')]=_[_0x2175('0x9')](config[_0x2175('0x8')],{'host':_0x2175('0xa'),'port':0x18eb});var io=require(_0x2175('0xb'))(new Redis(config[_0x2175('0x8')]));var Sequence=function(){};Sequence[_0x2175('0xc')][_0x2175('0xd')]=function(_0x516ccc){this[_0x2175('0xe')]=this[_0x2175('0xe')]?this[_0x2175('0xe')][_0x2175('0xf')](_0x516ccc):_0x516ccc();};function VoiceQueueReport(_0x77e3fa){this['sequence']=new Sequence();this['queueReports']={};this['agents']=_0x77e3fa[_0x2175('0x10')];this['channels']=_0x77e3fa['queueChannels'];this['voiceQueues']=_0x77e3fa['voiceQueues'];this[_0x2175('0x11')]=!![];this['campaigns']=_0x77e3fa[_0x2175('0x12')];this[_0x2175('0x13')]={};ami['on']('queuesummary',this[_0x2175('0x14')][_0x2175('0x15')](this));ami['on'](_0x2175('0x16'),this[_0x2175('0x17')][_0x2175('0x15')](this));ami['on'](_0x2175('0x18'),this[_0x2175('0x19')][_0x2175('0x15')](this));ami['on']('queuecallerabandon',this['syncQueueCallerAbandon'][_0x2175('0x15')](this));ami['on'](_0x2175('0x1a'),this[_0x2175('0x1b')]['bind'](this));ami['on']('agentcomplete',this['syncAgentComplete'][_0x2175('0x15')](this));ami['on'](_0x2175('0x1c'),this['syncAgentConnect']['bind'](this));ami['on'](_0x2175('0x1d'),this[_0x2175('0x1e')][_0x2175('0x15')](this));ami['on']('hangup',this[_0x2175('0x1f')]['bind'](this));ami['on'](_0x2175('0x20'),this['syncFullyBooted'][_0x2175('0x15')](this));ami['on']('musiconholdstart',this['syncMusicOnHoldStart']['bind'](this));ami['on'](_0x2175('0x21'),this['syncMusicOnHoldStop'][_0x2175('0x15')](this));ami['on'](_0x2175('0x22'),this[_0x2175('0x23')][_0x2175('0x15')](this));ami['on'](_0x2175('0x24'),this[_0x2175('0x25')]['bind'](this));this[_0x2175('0x26')]();this[_0x2175('0x27')]();}function clearChannels(_0xa6ef48){if(!_[_0x2175('0x28')](_0xa6ef48)){for(var _0x495887 in _0xa6ef48){if(_0xa6ef48['hasOwnProperty'](_0x495887)){delete _0xa6ef48[_0x495887];}}}}function clearCampaigns(_0x9c6374){if(!_[_0x2175('0x28')](_0x9c6374)){for(var _0x2204cd in _0x9c6374){if(_0x9c6374['hasOwnProperty'](_0x2204cd)){_0x9c6374[_0x2204cd][_0x2175('0x29')]=0x0;}}}}function clearVoiceQueues(_0x4d2120){if(!_['isEmpty'](_0x4d2120)){for(var _0x3f0230 in _0x4d2120){if(_0x4d2120[_0x2175('0x2a')](_0x3f0230)){_0x4d2120[_0x3f0230][_0x2175('0x29')]=0x0;_0x4d2120[_0x3f0230][_0x2175('0x2b')]=0x0;_0x4d2120[_0x3f0230][_0x2175('0x2c')]=0x0;_0x4d2120[_0x3f0230][_0x2175('0x2d')]=0x0;_0x4d2120[_0x3f0230][_0x2175('0x2e')]=!![];}}}}function clearAgentBooked(_0x40d8c8){if(!_[_0x2175('0x28')](_0x40d8c8)){for(var _0x1c721d in _0x40d8c8){if(_0x40d8c8[_0x2175('0x2a')](_0x1c721d)){_0x40d8c8[_0x1c721d]['unlockRR']=!![];}}}}VoiceQueueReport[_0x2175('0xc')][_0x2175('0x2f')]=function(){var _0x4a41f1=this;for(var _0x4ae1a9 in this[_0x2175('0x30')]){if(this['channels'][_0x2175('0x2a')](_0x4ae1a9)&&!this['channels'][_0x4ae1a9]['switch']){this['sequence'][_0x2175('0xd')](function(){if(!_[_0x2175('0x31')](_0x4a41f1[_0x2175('0x30')][_0x4ae1a9])){return ami[_0x2175('0x32')]({'action':'status','channel':_0x4a41f1[_0x2175('0x30')][_0x4ae1a9][_0x2175('0x33')]})['catch'](function(_0xb39341){if(_0xb39341[_0x2175('0x34')]==='No\x20such\x20channel'){setTimeout(function(){if(_0x4a41f1['channels'][_0x4ae1a9]){delete _0x4a41f1['channels'][_0x4ae1a9];logger['error'](_0x2175('0x35'),_0x4ae1a9,util[_0x2175('0x36')](_0xb39341,{'showHidden':![],'depth':null}));}if(_0x4a41f1[_0x2175('0x37')][_0x4ae1a9]){delete _0x4a41f1[_0x2175('0x37')][_0x4ae1a9];logger[_0x2175('0x38')](_0x2175('0x39'),_0x4ae1a9,util[_0x2175('0x36')](_0xb39341,{'showHidden':![],'depth':null}));}if(_0x4a41f1[_0x2175('0x13')][_0x4ae1a9]){delete _0x4a41f1['variables'][_0x4ae1a9];logger['error']('[%s][voiceQueueReport][checkVariables]',_0x4ae1a9,util['inspect'](_0xb39341,{'showHidden':![],'depth':null}));}},0x1f40);}});}});}}};VoiceQueueReport['prototype'][_0x2175('0x3a')]=function(){logger[_0x2175('0x38')]('[FullyBooted]\x20clear\x20realtime');clearChannels(this[_0x2175('0x30')]);this[_0x2175('0x3b')](this[_0x2175('0x37')]);clearAgentBooked(this[_0x2175('0x10')]);clearVoiceQueues(this[_0x2175('0x3c')]);clearCampaigns(this[_0x2175('0x12')]);};VoiceQueueReport['prototype'][_0x2175('0x3b')]=function(_0x465ed5){var _0x304e18=this;if(!_[_0x2175('0x28')](_0x465ed5)){for(var _0x146b14 in _0x465ed5){if(_0x465ed5[_0x2175('0x2a')](_0x146b14)){_0x304e18[_0x2175('0x3d')](_0x465ed5[_0x146b14],_0x2175('0x3e'));delete _0x465ed5[_0x146b14];}}}};VoiceQueueReport[_0x2175('0xc')][_0x2175('0x3f')]=function(_0xd05e6a,_0x4be65c,_0x398015){io['to'](_0xd05e6a)[_0x2175('0x3f')](_0x4be65c,_0x398015);};VoiceQueueReport[_0x2175('0xc')]['emitVoiceQueueChannelSave']=function(_0x4aacf0,_0x932bb6){logger['debug'](_0x2175('0x40')+_0x932bb6+_0x2175('0x41'),_0x4aacf0[_0x2175('0x42')],util['inspect'](_0x4aacf0,{'showHidden':![],'depth':null}));this['emit'](util[_0x2175('0x43')](_0x2175('0x44'),_0x4aacf0['name']),'voice_queue_channel:save',_0x4aacf0);io[_0x2175('0x3f')](_0x2175('0x45'),_0x4aacf0);};VoiceQueueReport[_0x2175('0xc')]['emitVoiceQueueChannelRemove']=function(_0x2b2f32,_0x4343f9){logger[_0x2175('0x46')]('[%s][voiceQueueReport]['+_0x4343f9+']\x20sending\x20voice_queue_channel:remove\x20event:',_0x2b2f32[_0x2175('0x42')],util['inspect'](_0x2b2f32,{'showHidden':![],'depth':null}));this[_0x2175('0x3f')](util[_0x2175('0x43')]('voice:queue:%s',_0x2b2f32['name']),'voice_queue_channel:remove',_0x2b2f32);io[_0x2175('0x3f')]('voice_queue_presence:remove',_0x2b2f32);};VoiceQueueReport['prototype'][_0x2175('0x47')]=function(_0x5c29df,_0x341171){if(_0x5c29df[_0x2175('0x48')]===_0x2175('0x49')){var _0x3827a5={'id':_0x5c29df['id'],'name':_0x5c29df[_0x2175('0x4a')],'strategy':_0x5c29df[_0x2175('0x4b')],'answered':_0x5c29df['answered'],'available':_0x5c29df[_0x2175('0x4c')],'loggedIn':_0x5c29df[_0x2175('0x4d')],'pTalking':_0x5c29df[_0x2175('0x2c')],'sumBillable':_0x5c29df[_0x2175('0x4e')],'sumDuration':_0x5c29df[_0x2175('0x4f')],'sumHoldTime':_0x5c29df[_0x2175('0x50')]||0x0,'talking':_0x5c29df['talking'],'total':_0x5c29df[_0x2175('0x51')],'type':_0x5c29df[_0x2175('0x48')],'unmanaged':_0x5c29df[_0x2175('0x52')],'abandoned':_0x5c29df['abandoned'],'waiting':_0x5c29df[_0x2175('0x2d')]};if(_0x5c29df['Trunk']){_0x3827a5['Trunk']={'id':_0x5c29df[_0x2175('0x53')]['id'],'name':_0x5c29df[_0x2175('0x53')][_0x2175('0x4a')],'active':_0x5c29df['Trunk'][_0x2175('0x54')],'callerid':_0x5c29df[_0x2175('0x53')][_0x2175('0x55')]};}if(_0x5c29df[_0x2175('0x56')]){_0x3827a5[_0x2175('0x56')]={'id':_0x5c29df['Interval']['id'],'name':_0x5c29df['Interval'][_0x2175('0x4a')]};}var _0xeaabe3=md5(JSON[_0x2175('0x57')](_0x3827a5));if(_0x5c29df[_0x2175('0x2')]!==_0xeaabe3){_0x5c29df[_0x2175('0x2')]=_0xeaabe3;logger['debug'](_0x2175('0x58')+_0x341171+_0x2175('0x59'),util[_0x2175('0x36')](_0x3827a5,{'showHidden':![],'depth':null}));this['emit'](util['format'](_0x2175('0x44'),_0x3827a5['name']),'voice_queue:save',_0x3827a5);}}};VoiceQueueReport['prototype']['isNotNull']=function(_0x449e34){return _0x449e34!==null&&!_[_0x2175('0x5a')](_0x449e34);};VoiceQueueReport['prototype']['loopQueueShow']=function(){var _0x5c9241=this;setInterval(function(){_0x5c9241['clearZombieChannels']();ami[_0x2175('0x32')]({'action':_0x2175('0x5b')})['catch'](function(_0x5834b9){logger[_0x2175('0x38')](_0x2175('0x5c'),util[_0x2175('0x36')](_0x5834b9,{'showHidden':![],'depth':null}));});},0x2710);};VoiceQueueReport[_0x2175('0xc')][_0x2175('0x26')]=function(){var _0x4cd703=this;setInterval(function(){if(_0x4cd703[_0x2175('0x11')]){return ami['Action']({'action':_0x2175('0x5d')})[_0x2175('0x5e')](function(_0x265dc7){_0x4cd703[_0x2175('0x11')]=![];})[_0x2175('0x5f')](function(_0xa26c5f){logger[_0x2175('0x38')](_0x2175('0x60'),util[_0x2175('0x36')](_0xa26c5f,{'showHidden':![],'depth':null}));});}},0x3e8);};VoiceQueueReport[_0x2175('0xc')][_0x2175('0x14')]=function(_0x172844){try{if(this[_0x2175('0x61')](_0x172844)&&this[_0x2175('0x61')](_0x172844[_0x2175('0x62')])){logger['debug'](_0x2175('0x63'),util[_0x2175('0x36')](_0x172844,{'showHidden':![],'depth':null}));if(this[_0x2175('0x3c')][_0x172844[_0x2175('0x62')]]){logger['info'](_0x2175('0x64'),_0x172844['queue']);var _0xeab00=_[_0x2175('0x65')](this[_0x2175('0x30')],_0x2175('0x62'))[_0x172844[_0x2175('0x62')]]||0x0;var _0x39bf58=_0xeab00-_0x172844[_0x2175('0x66')];if(this[_0x2175('0x3c')][_0x172844['queue']]['waiting']!==_[_0x2175('0x67')](_0x172844[_0x2175('0x66')])||this['voiceQueues'][_0x172844['queue']][_0x2175('0x4d')]!==_[_0x2175('0x67')](_0x172844[_0x2175('0x68')])||this[_0x2175('0x3c')][_0x172844['queue']][_0x2175('0x4c')]!==_['toNumber'](_0x172844[_0x2175('0x4c')])||this[_0x2175('0x3c')][_0x172844['queue']][_0x2175('0x2b')]!==_0x39bf58){this[_0x2175('0x3c')][_0x172844[_0x2175('0x62')]][_0x2175('0x2d')]=_[_0x2175('0x67')](_0x172844['callers']);this[_0x2175('0x3c')][_0x172844[_0x2175('0x62')]]['loggedIn']=_[_0x2175('0x67')](_0x172844['loggedin']);this[_0x2175('0x3c')][_0x172844['queue']][_0x2175('0x4c')]=_[_0x2175('0x67')](_0x172844[_0x2175('0x4c')]);this[_0x2175('0x3c')][_0x172844[_0x2175('0x62')]]['talking']=_0x39bf58>0x0?_0x39bf58:0x0;this[_0x2175('0x3c')][_0x172844[_0x2175('0x62')]][_0x2175('0x2b')]=this[_0x2175('0x3c')][_0x172844[_0x2175('0x62')]][_0x2175('0x2b')]>_['toNumber'](_0x172844['loggedin'])?_[_0x2175('0x67')](_0x172844[_0x2175('0x68')]):this[_0x2175('0x3c')][_0x172844[_0x2175('0x62')]][_0x2175('0x2b')];this[_0x2175('0x47')](this[_0x2175('0x3c')][_0x172844[_0x2175('0x62')]],'queuesummary');}logger[_0x2175('0x46')](_0x2175('0x69'),util[_0x2175('0x36')](this['voiceQueues'][_0x172844[_0x2175('0x62')]],{'showHidden':![],'depth':null}));ami['emit']('custom:queuesummary',this[_0x2175('0x3c')][_0x172844[_0x2175('0x62')]]);}}}catch(_0x1b818d){logger[_0x2175('0x38')](_0x2175('0x60'),util[_0x2175('0x36')](_0x1b818d,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x2175('0xc')][_0x2175('0x17')]=function(_0x16af84){logger['debug']('[voiceQueueReport][queuesummarycomplete]\x20event:',util[_0x2175('0x36')](_0x16af84,{'showHidden':![],'depth':null}));this[_0x2175('0x11')]=!![];};VoiceQueueReport['prototype'][_0x2175('0x19')]=function(_0x13babb){try{if(this[_0x2175('0x61')](_0x13babb)){logger['debug']('[%s][voiceQueueReport][queuecallerjoin]',_0x13babb[_0x2175('0x42')],util['inspect'](_0x13babb,{'showHidden':![],'depth':null}));if(_['isUndefined'](this[_0x2175('0x37')][_0x13babb[_0x2175('0x42')]])){this['queueReports'][_0x13babb['uniqueid']]=[];this[_0x2175('0x30')][_0x13babb[_0x2175('0x42')]]={};}var _0x1c01a3=new QueueReport();_0x1c01a3['name']=_0x13babb['queue'];_0x1c01a3['type']=this[_0x2175('0x3c')][_0x1c01a3['name']]&&this[_0x2175('0x3c')][_0x1c01a3['name']][_0x2175('0x48')]?this['voiceQueues'][_0x1c01a3['name']][_0x2175('0x48')]||_0x2175('0x49'):_0x2175('0x49');_0x1c01a3['queue']=_0x13babb[_0x2175('0x62')];_0x1c01a3['queuecallerjoinAt']=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x1c01a3[_0x2175('0x6a')]=_0x13babb[_0x2175('0x6a')];_0x1c01a3['count']=_0x13babb[_0x2175('0x6b')];_0x1c01a3[_0x2175('0x42')]=_0x13babb['uniqueid'];logger[_0x2175('0x6c')](_0x2175('0x6d'),_0x1c01a3['name'],_0x1c01a3[_0x2175('0x48')]);_['merge'](_0x1c01a3,_[_0x2175('0x6e')](_0x13babb,_[_0x2175('0x6f')](_0x1c01a3)));this['queueReports'][_0x13babb[_0x2175('0x42')]][_0x2175('0x70')](_0x1c01a3);this[_0x2175('0x30')][_0x13babb['uniqueid']]=_0x1c01a3;this[_0x2175('0x71')](_0x1c01a3,_0x2175('0x18'));}}catch(_0x5119c6){logger['error']('[%s][voiceQueueReport][queuecallerjoin]',_0x13babb[_0x2175('0x42')],util[_0x2175('0x36')](_0x5119c6,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x2175('0xc')][_0x2175('0x72')]=function(_0x5de120){try{if(this[_0x2175('0x61')](_0x5de120)){logger[_0x2175('0x46')](_0x2175('0x73'),_0x5de120[_0x2175('0x42')],util[_0x2175('0x36')](_0x5de120,{'showHidden':![],'depth':null}));if(this[_0x2175('0x37')][_0x5de120['uniqueid']]){var _0x56b398=_['last'](this[_0x2175('0x37')][_0x5de120['uniqueid']]);_0x56b398[_0x2175('0x74')]=![];_0x56b398[_0x2175('0x75')]=null;_0x56b398[_0x2175('0x76')]=_0x5de120[_0x2175('0x76')];_0x56b398['originalposition']=_0x5de120[_0x2175('0x77')];_0x56b398[_0x2175('0x78')]=!![];_0x56b398['queuecallerabandonAt']=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x56b398[_0x2175('0x79')]=_0x2175('0x7a');_0x56b398[_0x2175('0x7b')]=null;logger['info'](_0x2175('0x7c'),_0x56b398[_0x2175('0x4a')],_0x56b398[_0x2175('0x48')]);this[_0x2175('0x30')][_0x5de120[_0x2175('0x42')]]=_0x56b398;this[_0x2175('0x3d')](_0x56b398,_0x2175('0x78'));}}}catch(_0x3c1e98){logger['error'](_0x2175('0x73'),_0x5de120['uniqueid'],util[_0x2175('0x36')](_0x3c1e98,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x2175('0xc')]['syncQueueCallerLeave']=function(_0x2b5f81){try{if(this['isNotNull'](_0x2b5f81)){logger[_0x2175('0x46')](_0x2175('0x7d'),_0x2b5f81[_0x2175('0x42')],util['inspect'](_0x2b5f81,{'showHidden':![],'depth':null}));if(this[_0x2175('0x37')][_0x2b5f81[_0x2175('0x42')]]){var _0x52dcc6=_['last'](this[_0x2175('0x37')][_0x2b5f81[_0x2175('0x42')]]);_0x52dcc6[_0x2175('0x7e')]=moment()[_0x2175('0x43')](_0x2175('0x7f'));_0x52dcc6[_0x2175('0x80')]=_0x2b5f81[_0x2175('0x80')];_0x52dcc6[_0x2175('0x81')]=_0x2b5f81[_0x2175('0x81')];logger[_0x2175('0x6c')]('[voiceQueueReport][queuecallerleave]\x20name:%s\x20type:%s\x20connectedlinenum:%s\x20connectedlinename:%s',_0x52dcc6['name'],_0x52dcc6[_0x2175('0x48')],_0x2b5f81[_0x2175('0x80')],_0x2b5f81[_0x2175('0x81')]);this[_0x2175('0x30')][_0x2b5f81[_0x2175('0x42')]]=_0x52dcc6;this['emitVoiceQueueChannelSave'](_0x52dcc6,_0x2175('0x1a'));}}}catch(_0x3b83a9){logger[_0x2175('0x38')](_0x2175('0x7d'),_0x2b5f81['uniqueid'],util[_0x2175('0x36')](_0x3b83a9,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x2175('0xc')]['syncAgentConnect']=function(_0x261293){try{if(this[_0x2175('0x61')](_0x261293)){logger[_0x2175('0x46')](_0x2175('0x82'),_0x261293[_0x2175('0x42')],util[_0x2175('0x36')](_0x261293,{'showHidden':![],'depth':null}));if(this[_0x2175('0x37')][_0x261293['uniqueid']]){var _0x2dd36f=_[_0x2175('0x83')](this[_0x2175('0x37')][_0x261293[_0x2175('0x42')]]);_0x2dd36f[_0x2175('0x74')]=!![];_0x2dd36f[_0x2175('0x79')]=_0x2175('0x84');logger[_0x2175('0x6c')](_0x2175('0x85'),_0x2dd36f[_0x2175('0x4a')],_0x2dd36f[_0x2175('0x48')]);}}}catch(_0xa4a5a9){logger[_0x2175('0x38')]('[%s][voiceQueueReport][agentconnect]',_0x261293[_0x2175('0x42')],util[_0x2175('0x36')](_0xa4a5a9,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x2175('0xc')]['syncAgentComplete']=function(_0x3239ce){try{if(this[_0x2175('0x61')](_0x3239ce)){logger[_0x2175('0x46')]('[%s][voiceQueueReport][agentcomplete]',_0x3239ce[_0x2175('0x42')],util['inspect'](_0x3239ce,{'showHidden':![],'depth':null}));if(this[_0x2175('0x37')][_0x3239ce[_0x2175('0x42')]]){var _0x339887=_[_0x2175('0x83')](this[_0x2175('0x37')][_0x3239ce['uniqueid']]);_0x339887[_0x2175('0x78')]=![];_0x339887[_0x2175('0x86')]=null;_0x339887[_0x2175('0x87')]=!![];_0x339887[_0x2175('0x7b')]=_0x3239ce[_0x2175('0x88')];_0x339887[_0x2175('0x76')]=_0x3239ce[_0x2175('0x76')];_0x339887[_0x2175('0x74')]=!![];_0x339887[_0x2175('0x89')]=![];_0x339887[_0x2175('0x8a')]=null;if(!_0x339887[_0x2175('0x8b')]){if(_0x3239ce[_0x2175('0x8c')]==_0x2175('0x8b')){_0x339887[_0x2175('0x79')]=_0x2175('0x8d');logger[_0x2175('0x6c')](_0x2175('0x8e'),_0x339887[_0x2175('0x4a')],_0x339887[_0x2175('0x48')]);}else{if(_[_0x2175('0x8f')](_0x3239ce[_0x2175('0x33')][_0x2175('0x90')](),_0x2175('0x91'))){if(this['queueReports'][_0x3239ce[_0x2175('0x92')]]){var _0x15b1bc=_[_0x2175('0x83')](this[_0x2175('0x37')][_0x3239ce[_0x2175('0x92')]]);_0x15b1bc['queuecallercomplete']=![];_0x15b1bc[_0x2175('0x89')]=!![];_0x15b1bc[_0x2175('0x8a')]=moment(_0x339887[_0x2175('0x93')])[_0x2175('0x94')](_0x3239ce[_0x2175('0x76')],'seconds')[_0x2175('0x43')](_0x2175('0x7f'));_0x15b1bc[_0x2175('0x79')]='FORWARDTRANSFER';_0x15b1bc[_0x2175('0x8b')]=!![];_0x15b1bc['transfertype']=_0x2175('0x95');_0x15b1bc[_0x2175('0x96')]=_0x3239ce[_0x2175('0x97')];_0x15b1bc[_0x2175('0x98')]=_0x3239ce[_0x2175('0x42')];logger[_0x2175('0x6c')]('[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:FORWARDTRANSFER',_0x15b1bc['name'],_0x15b1bc[_0x2175('0x48')]);var _0x3473eb=this[_0x2175('0x37')][_0x3239ce[_0x2175('0x92')]];this[_0x2175('0x37')][_0x3239ce['linkedid']]=this[_0x2175('0x37')][_0x3239ce['uniqueid']];this[_0x2175('0x37')][_0x3239ce[_0x2175('0x42')]]=_0x3473eb;}}else{_0x339887[_0x2175('0x79')]=_0x2175('0x99')+_0x3239ce[_0x2175('0x8c')][_0x2175('0x9a')]();logger[_0x2175('0x6c')](_0x2175('0x9b'),_0x339887[_0x2175('0x4a')],_0x339887[_0x2175('0x48')],_0x339887[_0x2175('0x79')]);}}}this['channels'][_0x3239ce[_0x2175('0x42')]]=_0x339887;this[_0x2175('0x3d')](_0x339887,'agentcomplete');}}}catch(_0x3d537d){logger['error'](_0x2175('0x9c'),_0x3239ce['uniqueid'],util[_0x2175('0x36')](_0x3d537d,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x2175('0xc')][_0x2175('0x1e')]=function(_0x5b6792){try{if(this['isNotNull'](_0x5b6792)){logger[_0x2175('0x46')](_0x2175('0x9d'),_0x5b6792['uniqueid'],util[_0x2175('0x36')](_0x5b6792,{'showHidden':![],'depth':null}));this[_0x2175('0x9e')](_0x5b6792[_0x2175('0x42')],_['keys'](_0x5b6792[_0x2175('0x9f')])[0x0],_0x5b6792[_0x2175('0xa0')]);if(this[_0x2175('0x37')][_0x5b6792['uniqueid']]){var _0x342454=_['last'](this[_0x2175('0x37')][_0x5b6792[_0x2175('0x42')]]);if(_0x342454){if(this[_0x2175('0x61')](_0x5b6792['variable'])&&this['isNotNull'](_0x5b6792[_0x2175('0x9f')][_0x2175('0xa1')])){switch(_0x5b6792[_0x2175('0xa0')]){case _0x2175('0xa2'):_0x342454[_0x2175('0x89')]=![];_0x342454[_0x2175('0x8a')]=null;break;case _0x2175('0xa3'):_0x342454[_0x2175('0xa4')]=_0x2175('0xa5');_0x342454[_0x2175('0x89')]=!![];_0x342454[_0x2175('0x8a')]=moment()[_0x2175('0x43')](_0x2175('0x7f'));_0x342454[_0x2175('0x7e')]=moment()[_0x2175('0x43')]('YYYY-MM-DD\x20HH:mm:ss');logger['debug'](_0x2175('0xa6'),_0x5b6792[_0x2175('0x42')],util[_0x2175('0x36')](_0x342454,{'showHidden':![],'depth':null}));ami[_0x2175('0x3f')](_0x2175('0xa7'),_0x342454);break;default:_0x342454[_0x2175('0x89')]=!![];_0x342454[_0x2175('0x8a')]=moment()['format'](_0x2175('0x7f'));_0x342454[_0x2175('0x7e')]=moment()[_0x2175('0x43')](_0x2175('0x7f'));}_0x342454[_0x2175('0x78')]=![];_0x342454[_0x2175('0x86')]=null;_0x342454[_0x2175('0x79')]=_0x5b6792[_0x2175('0xa0')];this[_0x2175('0x30')][_0x5b6792[_0x2175('0x42')]]=_0x342454;this[_0x2175('0x3d')](_0x342454,'varset');}else if(this[_0x2175('0x61')](_0x5b6792[_0x2175('0x9f')])&&this[_0x2175('0x61')](_0x5b6792['variable']['queueposition'])){if(!_0x342454['queuecallerabandon']){_0x342454[_0x2175('0x89')]=!![];_0x342454['queuecallerexitAt']=moment()[_0x2175('0x43')](_0x2175('0x7f'));_0x342454[_0x2175('0x79')]='EXITWITHKEY';_0x342454[_0x2175('0x7e')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');this[_0x2175('0x30')][_0x5b6792[_0x2175('0x42')]]=_0x342454;}}logger[_0x2175('0x6c')](_0x2175('0xa8'),_0x5b6792[_0x2175('0x42')],_0x342454['name'],_0x342454['type'],_[_0x2175('0x6f')](_0x5b6792[_0x2175('0x9f')])[0x0],_0x5b6792[_0x2175('0xa0')]);_0x342454['variables']=this['variables'][_0x5b6792[_0x2175('0x42')]];}}}}catch(_0x3c0816){logger[_0x2175('0x38')](_0x2175('0x9d'),_0x5b6792['uniqueid'],util[_0x2175('0x36')](_0x3c0816,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x2175('0xc')][_0x2175('0x9e')]=function(_0x58b930,_0x493b1b,_0x543537){var _0x12a5df=[_0x2175('0xa9'),_0x2175('0xaa'),'rtpaudioqosjitter',_0x2175('0xab'),_0x2175('0xac'),_0x2175('0xad'),'rtpaudioqosrtt','rtpaudioqosrttbridged',_0x2175('0xae'),'sipuri',_0x2175('0xaf'),_0x2175('0xb0'),_0x2175('0xb1'),_0x2175('0xb2'),_0x2175('0xb3'),_0x2175('0xb4'),_0x2175('0x88'),_0x2175('0xb5'),_0x2175('0xb6')];if(!_[_0x2175('0x31')](_0x493b1b)&&!_[_0x2175('0xb7')](_0x12a5df,_0x493b1b)){if(_[_0x2175('0x5a')](this[_0x2175('0x13')][_0x58b930])){this['variables'][_0x58b930]={};}this['variables'][_0x58b930][_0x493b1b]=_0x543537;}};VoiceQueueReport[_0x2175('0xc')][_0x2175('0x1f')]=function(_0x389bd5){try{if(this[_0x2175('0x61')](_0x389bd5)){logger[_0x2175('0x46')]('[%s][voiceQueueReport][hangup]',_0x389bd5[_0x2175('0x42')],util['inspect'](_0x389bd5,{'showHidden':![],'depth':null}));if(this[_0x2175('0x37')][_0x389bd5[_0x2175('0x42')]]){for(var _0x3e0b6d=0x0,_0x1be5aa={};_0x3e0b6d<this[_0x2175('0x37')][_0x389bd5[_0x2175('0x42')]]['length'];_0x3e0b6d+=0x1){_0x1be5aa=this[_0x2175('0x37')][_0x389bd5[_0x2175('0x42')]][_0x3e0b6d];if(this['voiceQueues'][_0x1be5aa[_0x2175('0x62')]]){if(_0x1be5aa[_0x2175('0x89')]&&_0x1be5aa[_0x2175('0x8b')]!=!![]){this['voiceQueues'][_0x1be5aa[_0x2175('0x62')]][_0x2175('0x52')]+=0x1;}if(_0x1be5aa[_0x2175('0x78')]){this[_0x2175('0x3c')][_0x1be5aa[_0x2175('0x62')]][_0x2175('0xb8')]+=0x1;}this[_0x2175('0x3c')][_0x1be5aa[_0x2175('0x62')]][_0x2175('0x50')]+=moment(_0x1be5aa[_0x2175('0x7e')])['diff'](_0x1be5aa[_0x2175('0x93')],'seconds')||0x0;if(_0x3e0b6d===this[_0x2175('0x37')][_0x389bd5['uniqueid']][_0x2175('0xb9')]-0x1){this[_0x2175('0x3c')][_0x1be5aa[_0x2175('0x62')]][_0x2175('0x4f')]+=moment()[_0x2175('0xba')](0x0)[_0x2175('0xbb')](_0x1be5aa[_0x2175('0x93')],'seconds');this[_0x2175('0x3c')][_0x1be5aa[_0x2175('0x62')]][_0x2175('0x51')]+=0x1;if(_0x1be5aa['queuecallercomplete']){this[_0x2175('0x3c')][_0x1be5aa[_0x2175('0x62')]][_0x2175('0xbc')]+=0x1;this[_0x2175('0x3c')][_0x1be5aa[_0x2175('0x62')]][_0x2175('0x4e')]+=moment()[_0x2175('0xba')](0x0)[_0x2175('0xbb')](_0x1be5aa[_0x2175('0x7e')],'seconds');_0x1be5aa[_0x2175('0x75')]=moment()[_0x2175('0x43')]('YYYY-MM-DD\x20HH:mm:ss');_0x1be5aa[_0x2175('0x89')]=![];_0x1be5aa[_0x2175('0x8a')]=null;}if(_0x1be5aa[_0x2175('0x89')]&&_0x1be5aa[_0x2175('0x8b')]!=!![]){_0x1be5aa[_0x2175('0xa4')]=_0x2175('0x52');logger[_0x2175('0x46')](_0x2175('0xbd'),_0x389bd5['uniqueid'],util[_0x2175('0x36')](_0x1be5aa,{'showHidden':![],'depth':null}));ami[_0x2175('0x3f')]('custom:queuecallerunmanaged',_0x1be5aa);}if(_0x1be5aa[_0x2175('0x78')]){_0x1be5aa[_0x2175('0xa4')]=_0x2175('0xb8');logger[_0x2175('0x46')](_0x2175('0xbe'),_0x389bd5[_0x2175('0x42')],util[_0x2175('0x36')](_0x1be5aa,{'showHidden':![],'depth':null}));ami[_0x2175('0x3f')]('custom:queuecallerabandon',_0x1be5aa);}}else{this[_0x2175('0x3c')][_0x1be5aa['queue']]['sumDuration']+=this[_0x2175('0x3c')][_0x1be5aa[_0x2175('0x62')]][_0x2175('0x50')];}logger['info'](_0x2175('0xbf'),_0x389bd5[_0x2175('0x42')],_0x1be5aa['name'],_0x1be5aa[_0x2175('0x48')],_0x389bd5[_0x2175('0xc0')]);this[_0x2175('0x30')][_0x389bd5[_0x2175('0x42')]]=_0x1be5aa;this[_0x2175('0x3d')](_0x1be5aa,_0x2175('0xc1'));this[_0x2175('0x47')](this['voiceQueues'][_0x1be5aa[_0x2175('0x62')]],_0x2175('0xc1'));}}logger['debug'](_0x2175('0xc2'),_0x389bd5[_0x2175('0x42')],util[_0x2175('0x36')](this[_0x2175('0x37')][_0x389bd5[_0x2175('0x42')]],{'showHidden':![],'depth':null}));ami[_0x2175('0x3f')](_0x2175('0xc3'),this[_0x2175('0x37')][_0x389bd5['uniqueid']]);delete this[_0x2175('0x37')][_0x389bd5[_0x2175('0x42')]];delete this[_0x2175('0x30')][_0x389bd5[_0x2175('0x42')]];}if(this[_0x2175('0x13')][_0x389bd5['uniqueid']]){delete this[_0x2175('0x13')][_0x389bd5[_0x2175('0x42')]];}}}catch(_0x311765){logger['error'](_0x2175('0xc4'),_0x389bd5[_0x2175('0x42')],util['inspect'](_0x311765,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x2175('0xc')][_0x2175('0x23')]=function(_0x18fbc0){try{if(this[_0x2175('0x61')](_0x18fbc0)){logger[_0x2175('0x46')](_0x2175('0xc5'),_0x18fbc0[_0x2175('0x42')],util[_0x2175('0x36')](_0x18fbc0,{'showHidden':![],'depth':null}));var _0x1aa105;if(this[_0x2175('0x37')][_0x18fbc0[_0x2175('0xc6')]]){_0x1aa105=_[_0x2175('0x83')](this['queueReports'][_0x18fbc0[_0x2175('0xc6')]]);_0x1aa105[_0x2175('0x96')]=_0x18fbc0[_0x2175('0xc7')];_0x1aa105[_0x2175('0x98')]=_0x18fbc0['secondtransfereruniqueid'];_0x1aa105['queuecallerexitreason']=_0x2175('0xc8');_0x1aa105[_0x2175('0x8b')]=!![];_0x1aa105[_0x2175('0xc9')]=_0x2175('0xca');if(this[_0x2175('0x37')][_0x18fbc0[_0x2175('0xcb')]]){var _0x128cf6=this[_0x2175('0x37')][_0x18fbc0[_0x2175('0xcb')]];this[_0x2175('0x37')][_0x18fbc0[_0x2175('0xcb')]]=this[_0x2175('0x37')][_0x18fbc0[_0x2175('0xc6')]];this[_0x2175('0x37')][_0x18fbc0[_0x2175('0xc6')]]=_0x128cf6;var _0x4cfa6b=_[_0x2175('0x83')](this[_0x2175('0x37')][_0x18fbc0[_0x2175('0xc6')]]);_0x4cfa6b['switch']=!![];}logger[_0x2175('0x6c')]('[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s',_0x18fbc0[_0x2175('0x42')],_0x1aa105['name'],_0x1aa105[_0x2175('0x48')],_0x1aa105[_0x2175('0x96')],_0x1aa105['transferuniqueid']);}else if(this[_0x2175('0x37')][_0x18fbc0[_0x2175('0xcc')]]){_0x1aa105=_[_0x2175('0x83')](this[_0x2175('0x37')][_0x18fbc0[_0x2175('0xcc')]]);_0x1aa105[_0x2175('0x96')]=_0x18fbc0[_0x2175('0xcd')];_0x1aa105[_0x2175('0x98')]=_0x18fbc0[_0x2175('0xce')];_0x1aa105[_0x2175('0x79')]='ATTENDEDTRANSFER';_0x1aa105[_0x2175('0x8b')]=!![];_0x1aa105[_0x2175('0xc9')]=_0x2175('0xca');if(this[_0x2175('0x37')][_0x18fbc0['origtransfereruniqueid']]){var _0x128cf6=this[_0x2175('0x37')][_0x18fbc0[_0x2175('0xce')]];this[_0x2175('0x37')][_0x18fbc0['origtransfereruniqueid']]=this['queueReports'][_0x18fbc0[_0x2175('0xcc')]];this[_0x2175('0x37')][_0x18fbc0['transfertargetuniqueid']]=_0x128cf6;var _0x4cfa6b=_[_0x2175('0x83')](this['queueReports'][_0x18fbc0['transfertargetuniqueid']]);_0x4cfa6b[_0x2175('0xcf')]=!![];}logger[_0x2175('0x6c')](_0x2175('0xd0'),_0x18fbc0[_0x2175('0x42')],_0x1aa105[_0x2175('0x4a')],_0x1aa105[_0x2175('0x48')],_0x1aa105['transferexten'],_0x1aa105[_0x2175('0x98')]);}}}catch(_0x56244e){logger[_0x2175('0x38')](_0x2175('0xc5'),_0x18fbc0['uniqueid'],util[_0x2175('0x36')](_0x56244e,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x2175('0xc')][_0x2175('0x25')]=function(_0x4eae1c){try{if(this[_0x2175('0x61')](_0x4eae1c)){logger[_0x2175('0x46')](_0x2175('0xd1'),_0x4eae1c['uniqueid'],util['inspect'](_0x4eae1c,{'showHidden':![],'depth':null}));if(this[_0x2175('0x37')][_0x4eae1c[_0x2175('0xc6')]]){var _0x5b9830=_['last'](this[_0x2175('0x37')][_0x4eae1c[_0x2175('0xc6')]]);_0x5b9830[_0x2175('0x79')]=_0x2175('0xd2');_0x5b9830[_0x2175('0x8b')]=!![];_0x5b9830[_0x2175('0xc9')]=_0x2175('0xd3');_0x5b9830[_0x2175('0x96')]=_0x4eae1c[_0x2175('0xd4')];_0x5b9830[_0x2175('0x98')]=_0x4eae1c['transfereeuniqueid'];logger[_0x2175('0x6c')](_0x2175('0xd5'),_0x4eae1c[_0x2175('0x42')],_0x5b9830[_0x2175('0x4a')],_0x5b9830[_0x2175('0x48')],_0x5b9830['transferexten'],_0x5b9830[_0x2175('0x98')]);this[_0x2175('0x1f')]({'event':_0x2175('0xd6'),'uniqueid':_0x4eae1c[_0x2175('0xc6')],'context':_0x4eae1c[_0x2175('0xd7')],'channel':_0x4eae1c['transfererchannel']});}}}catch(_0x281e3f){logger[_0x2175('0x38')](_0x2175('0xd1'),_0x4eae1c['uniqueid'],util[_0x2175('0x36')](_0x281e3f,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x2175('0xc')][_0x2175('0xd8')]=function(_0x1a9599){try{if(this['isNotNull'](_0x1a9599)){logger[_0x2175('0x46')](_0x2175('0xd9'),_0x1a9599['uniqueid'],util[_0x2175('0x36')](_0x1a9599,{'showHidden':![],'depth':null}));if(this[_0x2175('0x37')][_0x1a9599[_0x2175('0x42')]]){var _0x11b7c5=_[_0x2175('0x83')](this[_0x2175('0x37')][_0x1a9599[_0x2175('0x42')]]);if(!_['isNil'](_0x11b7c5[_0x2175('0x7e')])){_0x11b7c5[_0x2175('0xda')]=moment()[_0x2175('0x43')](_0x2175('0x7f'));logger[_0x2175('0x6c')](_0x2175('0xdb'),_0x1a9599[_0x2175('0x42')],_0x11b7c5[_0x2175('0xda')]);}}}}catch(_0x492919){logger[_0x2175('0x38')](_0x2175('0xd9'),_0x1a9599[_0x2175('0x42')],util[_0x2175('0x36')](_0x492919,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x2175('0xdc')]=function(_0x14bd41){try{if(this[_0x2175('0x61')](_0x14bd41)){logger[_0x2175('0x46')](_0x2175('0xdd'),_0x14bd41['uniqueid'],util[_0x2175('0x36')](_0x14bd41,{'showHidden':![],'depth':null}));if(this[_0x2175('0x37')][_0x14bd41[_0x2175('0x42')]]){var _0x3efd90=_[_0x2175('0x83')](this['queueReports'][_0x14bd41[_0x2175('0x42')]]);if(!_['isNil'](_0x3efd90['mohstarttime'])){_0x3efd90[_0x2175('0xde')]+=moment()[_0x2175('0xba')](0x0)[_0x2175('0xbb')](_0x3efd90[_0x2175('0xda')],_0x2175('0xdf'));logger['info']('[%s][voiceQueueReport][musiconholdstop]\x20mohtime:%s',_0x14bd41[_0x2175('0x42')],_0x3efd90['mohtime']);delete _0x3efd90[_0x2175('0xda')];}}}}catch(_0x4788e6){logger[_0x2175('0x38')](_0x2175('0xdd'),_0x14bd41[_0x2175('0x42')],util[_0x2175('0x36')](_0x4788e6,{'showHidden':![],'depth':null}));}};module[_0x2175('0xe0')]=VoiceQueueReport;
\ No newline at end of file