Built motion from commit (unavailable).|2.5.26
[motion2.git] / server / services / ami / report / voiceQueueReport.js
index d36a3ce..cb16af7 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 _0x693f=['uniqueid','format','name','voice_queue_presence:save','emitVoiceQueueChannelRemove','voice_queue_channel:remove','voice_queue_presence:remove','emitVoiceQueueSummary','inbound','strategy','answered','loggedIn','sumDuration','sumHoldTime','talking','total','unmanaged','abandoned','Trunk','active','callerid','Interval','debug','[voiceQueueReport][',']\x20sending\x20voice_queue:save\x20event:','voice_queue:save','isUndefined','[voiceQueueReport][queues]','loopQueueSummary','flagQueueSummary','[voiceQueueReport][queuesummary]','isNotNull','queue','[voiceQueueReport][queuesummary]\x20event:','info','[voiceQueueReport][queuesummary]\x20name:%s','countBy','callers','toNumber','loggedin','available','[voiceQueueReport][queuesummary]\x20sending\x20queuesummary\x20event:','custom:queuesummary','syncQueueSummaryComplete','[voiceQueueReport][queuesummarycomplete]\x20event:','type','queuecallerjoinAt','YYYY-MM-DD\x20HH:mm:ss','position','count','merge','pick','keys','push','[%s][voiceQueueReport][queuecallerjoin]','syncQueueCallerAbandon','[%s][voiceQueueReport][queuecallerabandon]','last','queuecallercomplete','holdtime','originalposition','queuecallerabandonAt','queuecallerexitreason','ABANDONED','lastAssignedTo','[voiceQueueReport][queuecallerabandon]\x20name:%s\x20type:%s','[%s][voiceQueueReport][queuecallerleave]','connectedlinenum','connectedlinename','[voiceQueueReport][queuecallerleave]\x20name:%s\x20type:%s\x20connectedlinenum:%s\x20connectedlinename:%s','syncAgentConnect','COMPLETEDBYAGENT','[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT','[%s][voiceQueueReport][agentcomplete]','queuecallerexit','queuecallerexitAt','transfer','reason','COMPLETED','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETED','startsWith','toLowerCase','local/','linkedid','FORWARDTRANSFER','transfertype','FORWARD','transferexten','destexten','transferuniqueid','COMPLETEDBY','toUpperCase','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:%s','[%s][voiceQueueReport][varset]','addVariable','value','variable','queuestatus','CONTINUE','TIMEOUT','timeout','queuecallerleaveAt','custom:timeout','queueposition','EXITWITHKEY','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','bridgepeer','bridgepvtcallid','memberdynamic','memberinterface','memberlastcall','memberpenalty','memberrealtime','includes','syncHangup','[%s][voiceQueueReport][hangup]','length','seconds','milliseconds','diff','queuecallercompleteAt','lastevent','custom:queuecallerunmanaged','[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerabandon\x20event:','custom:queuecallerabandon','[%s][voiceQueueReport][hangup]\x20name:%s\x20type:%s\x20reason:%s','cause-txt','custom:voiceQueueReport','[%s][voiceQueueReport][attendedtransfer]','secondtransfereruniqueid','ATTENDED','transfereeuniqueid','[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','transfertargetuniqueid','origtransfererexten','origtransfereruniqueid','ATTENDEDTRANSFER','[%s][voiceQueueReport][blindtransfer]','extension','[%s][voiceQueueReport][blindTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','BlindTransfer','context','[%s][voiceQueueReport][musiconholdstart]','mohstarttime','[%s][voiceQueueReport][musiconholdstart]\x20mohstarttime:%s','syncMusicOnHoldStop','mohtime','[%s][voiceQueueReport][musiconholdstop]','exports','lodash','moment','util','md5','../../../config/environment','../../../config/logger','ami','../ami','../model/queueReport','redis','defaults','localhost','socket.io-emitter','prototype','tail','queueReports','agents','channels','queueChannels','voiceQueues','campaigns','variables','syncQueueSummary','bind','queuecallerjoin','syncQueueCallerJoin','queuecallerabandon','queuecallerleave','syncQueueCallerLeave','agentcomplete','syncAgentComplete','varset','syncVarSet','hangup','fullybooted','syncFullyBooted','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','loopQueueShow','isEmpty','hasOwnProperty','originated','pTalking','waiting','queueStatusComplete','unlockRR','clearZombieChannels','switch','enqueue','isNil','Action','channel','catch','message','No\x20such\x20channel','[%s][voiceQueueReport][checkChannel]','inspect','error','[%s][voiceQueueReport][checkQueueReport]','[%s][voiceQueueReport][checkVariables]','[FullyBooted]\x20clear\x20realtime','clearqueuereport','emit','emitVoiceQueueChannelSave',']\x20sending\x20voice_queue_channel:save\x20event:'];(function(_0x1ce52,_0x23f160){var _0x12f287=function(_0x3c6ebe){while(--_0x3c6ebe){_0x1ce52['push'](_0x1ce52['shift']());}};_0x12f287(++_0x23f160);}(_0x693f,0x9d));var _0xf693=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x693f[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0xf693('0x0'));var moment=require(_0xf693('0x1'));var util=require(_0xf693('0x2'));var md5=require(_0xf693('0x3'));var Redis=require('ioredis');var config=require(_0xf693('0x4'));var logger=require(_0xf693('0x5'))(_0xf693('0x6'));var ami=require(_0xf693('0x7'));var QueueReport=require(_0xf693('0x8'));config[_0xf693('0x9')]=_[_0xf693('0xa')](config['redis'],{'host':_0xf693('0xb'),'port':0x18eb});var io=require(_0xf693('0xc'))(new Redis(config['redis']));var Sequence=function(){};Sequence[_0xf693('0xd')]['enqueue']=function(_0x38e78a){this['tail']=this[_0xf693('0xe')]?this[_0xf693('0xe')]['finally'](_0x38e78a):_0x38e78a();};function VoiceQueueReport(_0x4b09d6){this['sequence']=new Sequence();this[_0xf693('0xf')]={};this['agents']=_0x4b09d6[_0xf693('0x10')];this[_0xf693('0x11')]=_0x4b09d6[_0xf693('0x12')];this[_0xf693('0x13')]=_0x4b09d6[_0xf693('0x13')];this['flagQueueSummary']=!![];this['campaigns']=_0x4b09d6[_0xf693('0x14')];this[_0xf693('0x15')]={};ami['on']('queuesummary',this[_0xf693('0x16')][_0xf693('0x17')](this));ami['on']('queuesummarycomplete',this['syncQueueSummaryComplete'][_0xf693('0x17')](this));ami['on'](_0xf693('0x18'),this[_0xf693('0x19')][_0xf693('0x17')](this));ami['on'](_0xf693('0x1a'),this['syncQueueCallerAbandon'][_0xf693('0x17')](this));ami['on'](_0xf693('0x1b'),this[_0xf693('0x1c')][_0xf693('0x17')](this));ami['on'](_0xf693('0x1d'),this[_0xf693('0x1e')]['bind'](this));ami['on']('agentconnect',this['syncAgentConnect'][_0xf693('0x17')](this));ami['on'](_0xf693('0x1f'),this[_0xf693('0x20')][_0xf693('0x17')](this));ami['on'](_0xf693('0x21'),this['syncHangup'][_0xf693('0x17')](this));ami['on'](_0xf693('0x22'),this[_0xf693('0x23')][_0xf693('0x17')](this));ami['on'](_0xf693('0x24'),this[_0xf693('0x25')][_0xf693('0x17')](this));ami['on'](_0xf693('0x26'),this['syncMusicOnHoldStop'][_0xf693('0x17')](this));ami['on'](_0xf693('0x27'),this[_0xf693('0x28')][_0xf693('0x17')](this));ami['on'](_0xf693('0x29'),this[_0xf693('0x2a')][_0xf693('0x17')](this));this['loopQueueSummary']();this[_0xf693('0x2b')]();}function clearChannels(_0x11ff68){if(!_[_0xf693('0x2c')](_0x11ff68)){for(var _0x414a3f in _0x11ff68){if(_0x11ff68['hasOwnProperty'](_0x414a3f)){delete _0x11ff68[_0x414a3f];}}}}function clearCampaigns(_0x950632){if(!_[_0xf693('0x2c')](_0x950632)){for(var _0xe7a396 in _0x950632){if(_0x950632[_0xf693('0x2d')](_0xe7a396)){_0x950632[_0xe7a396][_0xf693('0x2e')]=0x0;}}}}function clearVoiceQueues(_0xbbbf29){if(!_[_0xf693('0x2c')](_0xbbbf29)){for(var _0x423cda in _0xbbbf29){if(_0xbbbf29[_0xf693('0x2d')](_0x423cda)){_0xbbbf29[_0x423cda][_0xf693('0x2e')]=0x0;_0xbbbf29[_0x423cda]['talking']=0x0;_0xbbbf29[_0x423cda][_0xf693('0x2f')]=0x0;_0xbbbf29[_0x423cda][_0xf693('0x30')]=0x0;_0xbbbf29[_0x423cda][_0xf693('0x31')]=!![];}}}}function clearAgentBooked(_0x405f94){if(!_[_0xf693('0x2c')](_0x405f94)){for(var _0x7fdc22 in _0x405f94){if(_0x405f94[_0xf693('0x2d')](_0x7fdc22)){_0x405f94[_0x7fdc22][_0xf693('0x32')]=!![];}}}}VoiceQueueReport['prototype'][_0xf693('0x33')]=function(){var _0x3e6570=this;for(var _0x3580c5 in this[_0xf693('0x11')]){if(this['channels']['hasOwnProperty'](_0x3580c5)&&!this[_0xf693('0x11')][_0x3580c5][_0xf693('0x34')]){this['sequence'][_0xf693('0x35')](function(){if(!_[_0xf693('0x36')](_0x3e6570[_0xf693('0x11')][_0x3580c5])){return ami[_0xf693('0x37')]({'action':'status','channel':_0x3e6570[_0xf693('0x11')][_0x3580c5][_0xf693('0x38')]})[_0xf693('0x39')](function(_0x3a2ced){if(_0x3a2ced[_0xf693('0x3a')]===_0xf693('0x3b')){setTimeout(function(){if(_0x3e6570[_0xf693('0x11')][_0x3580c5]){delete _0x3e6570[_0xf693('0x11')][_0x3580c5];logger['error'](_0xf693('0x3c'),_0x3580c5,util[_0xf693('0x3d')](_0x3a2ced,{'showHidden':![],'depth':null}));}if(_0x3e6570[_0xf693('0xf')][_0x3580c5]){delete _0x3e6570[_0xf693('0xf')][_0x3580c5];logger[_0xf693('0x3e')](_0xf693('0x3f'),_0x3580c5,util['inspect'](_0x3a2ced,{'showHidden':![],'depth':null}));}if(_0x3e6570['variables'][_0x3580c5]){delete _0x3e6570[_0xf693('0x15')][_0x3580c5];logger[_0xf693('0x3e')](_0xf693('0x40'),_0x3580c5,util['inspect'](_0x3a2ced,{'showHidden':![],'depth':null}));}},0x1f40);}});}});}}};VoiceQueueReport[_0xf693('0xd')][_0xf693('0x23')]=function(){logger[_0xf693('0x3e')](_0xf693('0x41'));clearChannels(this[_0xf693('0x11')]);this['clearQueueReport'](this[_0xf693('0xf')]);clearAgentBooked(this[_0xf693('0x10')]);clearVoiceQueues(this[_0xf693('0x13')]);clearCampaigns(this['campaigns']);};VoiceQueueReport[_0xf693('0xd')]['clearQueueReport']=function(_0x424b00){var _0x500df0=this;if(!_[_0xf693('0x2c')](_0x424b00)){for(var _0x111ab6 in _0x424b00){if(_0x424b00[_0xf693('0x2d')](_0x111ab6)){_0x500df0['emitVoiceQueueChannelRemove'](_0x424b00[_0x111ab6],_0xf693('0x42'));delete _0x424b00[_0x111ab6];}}}};VoiceQueueReport[_0xf693('0xd')][_0xf693('0x43')]=function(_0x4033ae,_0x3ef95a,_0x24c5d4){io['to'](_0x4033ae)[_0xf693('0x43')](_0x3ef95a,_0x24c5d4);};VoiceQueueReport[_0xf693('0xd')][_0xf693('0x44')]=function(_0x4b9234,_0x244b29){logger['debug']('[%s][voiceQueueReport]['+_0x244b29+_0xf693('0x45'),_0x4b9234[_0xf693('0x46')],util[_0xf693('0x3d')](_0x4b9234,{'showHidden':![],'depth':null}));this['emit'](util[_0xf693('0x47')]('voice:queue:%s',_0x4b9234[_0xf693('0x48')]),'voice_queue_channel:save',_0x4b9234);io[_0xf693('0x43')](_0xf693('0x49'),_0x4b9234);};VoiceQueueReport[_0xf693('0xd')][_0xf693('0x4a')]=function(_0x307bdf,_0x47bc1b){logger['debug']('[%s][voiceQueueReport]['+_0x47bc1b+']\x20sending\x20voice_queue_channel:remove\x20event:',_0x307bdf[_0xf693('0x46')],util[_0xf693('0x3d')](_0x307bdf,{'showHidden':![],'depth':null}));this['emit'](util['format']('voice:queue:%s',_0x307bdf[_0xf693('0x48')]),_0xf693('0x4b'),_0x307bdf);io[_0xf693('0x43')](_0xf693('0x4c'),_0x307bdf);};VoiceQueueReport['prototype'][_0xf693('0x4d')]=function(_0x20323a,_0x24c08c){if(_0x20323a['type']===_0xf693('0x4e')){var _0x41d60a={'id':_0x20323a['id'],'name':_0x20323a['name'],'strategy':_0x20323a[_0xf693('0x4f')],'answered':_0x20323a[_0xf693('0x50')],'available':_0x20323a['available'],'loggedIn':_0x20323a[_0xf693('0x51')],'pTalking':_0x20323a[_0xf693('0x2f')],'sumBillable':_0x20323a['sumBillable'],'sumDuration':_0x20323a[_0xf693('0x52')],'sumHoldTime':_0x20323a[_0xf693('0x53')]||0x0,'talking':_0x20323a[_0xf693('0x54')],'total':_0x20323a[_0xf693('0x55')],'type':_0x20323a['type'],'unmanaged':_0x20323a[_0xf693('0x56')],'abandoned':_0x20323a[_0xf693('0x57')],'waiting':_0x20323a[_0xf693('0x30')]};if(_0x20323a[_0xf693('0x58')]){_0x41d60a[_0xf693('0x58')]={'id':_0x20323a[_0xf693('0x58')]['id'],'name':_0x20323a['Trunk'][_0xf693('0x48')],'active':_0x20323a[_0xf693('0x58')][_0xf693('0x59')],'callerid':_0x20323a[_0xf693('0x58')][_0xf693('0x5a')]};}if(_0x20323a['Interval']){_0x41d60a[_0xf693('0x5b')]={'id':_0x20323a[_0xf693('0x5b')]['id'],'name':_0x20323a['Interval'][_0xf693('0x48')]};}var _0x48189a=md5(JSON['stringify'](_0x41d60a));if(_0x20323a['md5']!==_0x48189a){_0x20323a[_0xf693('0x3')]=_0x48189a;logger[_0xf693('0x5c')](_0xf693('0x5d')+_0x24c08c+_0xf693('0x5e'),util['inspect'](_0x41d60a,{'showHidden':![],'depth':null}));this['emit'](util[_0xf693('0x47')]('voice:queue:%s',_0x41d60a[_0xf693('0x48')]),_0xf693('0x5f'),_0x41d60a);}}};VoiceQueueReport[_0xf693('0xd')]['isNotNull']=function(_0x39bb51){return _0x39bb51!==null&&!_[_0xf693('0x60')](_0x39bb51);};VoiceQueueReport[_0xf693('0xd')][_0xf693('0x2b')]=function(){var _0x150edb=this;setInterval(function(){_0x150edb[_0xf693('0x33')]();ami['Action']({'action':'queues'})[_0xf693('0x39')](function(_0x4c257c){logger['error'](_0xf693('0x61'),util[_0xf693('0x3d')](_0x4c257c,{'showHidden':![],'depth':null}));});},0x2710);};VoiceQueueReport['prototype'][_0xf693('0x62')]=function(){var _0x283918=this;setInterval(function(){if(_0x283918[_0xf693('0x63')]){return ami[_0xf693('0x37')]({'action':'queuesummary'})['then'](function(_0x3717a1){_0x283918[_0xf693('0x63')]=![];})[_0xf693('0x39')](function(_0x3c26a9){logger['error'](_0xf693('0x64'),util[_0xf693('0x3d')](_0x3c26a9,{'showHidden':![],'depth':null}));});}},0x3e8);};VoiceQueueReport['prototype'][_0xf693('0x16')]=function(_0xa59522){try{if(this[_0xf693('0x65')](_0xa59522)&&this[_0xf693('0x65')](_0xa59522[_0xf693('0x66')])){logger[_0xf693('0x5c')](_0xf693('0x67'),util[_0xf693('0x3d')](_0xa59522,{'showHidden':![],'depth':null}));if(this[_0xf693('0x13')][_0xa59522[_0xf693('0x66')]]){logger[_0xf693('0x68')](_0xf693('0x69'),_0xa59522['queue']);var _0x46af17=_[_0xf693('0x6a')](this[_0xf693('0x11')],_0xf693('0x66'))[_0xa59522[_0xf693('0x66')]]||0x0;var _0x266161=_0x46af17-_0xa59522[_0xf693('0x6b')];if(this[_0xf693('0x13')][_0xa59522[_0xf693('0x66')]][_0xf693('0x30')]!==_[_0xf693('0x6c')](_0xa59522[_0xf693('0x6b')])||this['voiceQueues'][_0xa59522[_0xf693('0x66')]][_0xf693('0x51')]!==_[_0xf693('0x6c')](_0xa59522[_0xf693('0x6d')])||this[_0xf693('0x13')][_0xa59522[_0xf693('0x66')]][_0xf693('0x6e')]!==_[_0xf693('0x6c')](_0xa59522[_0xf693('0x6e')])||this[_0xf693('0x13')][_0xa59522[_0xf693('0x66')]][_0xf693('0x54')]!==_0x266161){this['voiceQueues'][_0xa59522[_0xf693('0x66')]][_0xf693('0x30')]=_[_0xf693('0x6c')](_0xa59522[_0xf693('0x6b')]);this[_0xf693('0x13')][_0xa59522[_0xf693('0x66')]]['loggedIn']=_[_0xf693('0x6c')](_0xa59522[_0xf693('0x6d')]);this[_0xf693('0x13')][_0xa59522[_0xf693('0x66')]][_0xf693('0x6e')]=_[_0xf693('0x6c')](_0xa59522[_0xf693('0x6e')]);this['voiceQueues'][_0xa59522['queue']][_0xf693('0x54')]=_0x266161>0x0?_0x266161:0x0;this[_0xf693('0x13')][_0xa59522[_0xf693('0x66')]][_0xf693('0x54')]=this[_0xf693('0x13')][_0xa59522[_0xf693('0x66')]][_0xf693('0x54')]>_['toNumber'](_0xa59522['loggedin'])?_[_0xf693('0x6c')](_0xa59522['loggedin']):this['voiceQueues'][_0xa59522['queue']][_0xf693('0x54')];this[_0xf693('0x4d')](this[_0xf693('0x13')][_0xa59522[_0xf693('0x66')]],'queuesummary');}logger[_0xf693('0x5c')](_0xf693('0x6f'),util[_0xf693('0x3d')](this[_0xf693('0x13')][_0xa59522['queue']],{'showHidden':![],'depth':null}));ami[_0xf693('0x43')](_0xf693('0x70'),this[_0xf693('0x13')][_0xa59522['queue']]);}}}catch(_0x53b9d3){logger[_0xf693('0x3e')](_0xf693('0x64'),util[_0xf693('0x3d')](_0x53b9d3,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0xf693('0x71')]=function(_0x25874d){logger['debug'](_0xf693('0x72'),util[_0xf693('0x3d')](_0x25874d,{'showHidden':![],'depth':null}));this['flagQueueSummary']=!![];};VoiceQueueReport[_0xf693('0xd')][_0xf693('0x19')]=function(_0x347fa4){try{if(this['isNotNull'](_0x347fa4)){logger['debug']('[%s][voiceQueueReport][queuecallerjoin]',_0x347fa4[_0xf693('0x46')],util['inspect'](_0x347fa4,{'showHidden':![],'depth':null}));if(_[_0xf693('0x60')](this[_0xf693('0xf')][_0x347fa4[_0xf693('0x46')]])){this[_0xf693('0xf')][_0x347fa4[_0xf693('0x46')]]=[];this[_0xf693('0x11')][_0x347fa4[_0xf693('0x46')]]={};}var _0x1dcf87=new QueueReport();_0x1dcf87[_0xf693('0x48')]=_0x347fa4[_0xf693('0x66')];_0x1dcf87[_0xf693('0x73')]=this[_0xf693('0x13')][_0x1dcf87[_0xf693('0x48')]]&&this[_0xf693('0x13')][_0x1dcf87[_0xf693('0x48')]][_0xf693('0x73')]?this[_0xf693('0x13')][_0x1dcf87[_0xf693('0x48')]][_0xf693('0x73')]||_0xf693('0x4e'):_0xf693('0x4e');_0x1dcf87[_0xf693('0x66')]=_0x347fa4[_0xf693('0x66')];_0x1dcf87[_0xf693('0x74')]=moment()[_0xf693('0x47')](_0xf693('0x75'));_0x1dcf87[_0xf693('0x76')]=_0x347fa4[_0xf693('0x76')];_0x1dcf87['count']=_0x347fa4[_0xf693('0x77')];_0x1dcf87['uniqueid']=_0x347fa4[_0xf693('0x46')];logger[_0xf693('0x68')]('[voiceQueueReport][queuecallerjoin]\x20name:%s\x20type:%s',_0x1dcf87['name'],_0x1dcf87[_0xf693('0x73')]);_[_0xf693('0x78')](_0x1dcf87,_[_0xf693('0x79')](_0x347fa4,_[_0xf693('0x7a')](_0x1dcf87)));this[_0xf693('0xf')][_0x347fa4[_0xf693('0x46')]][_0xf693('0x7b')](_0x1dcf87);this['channels'][_0x347fa4['uniqueid']]=_0x1dcf87;this[_0xf693('0x44')](_0x1dcf87,_0xf693('0x18'));}}catch(_0x2e5711){logger[_0xf693('0x3e')](_0xf693('0x7c'),_0x347fa4[_0xf693('0x46')],util[_0xf693('0x3d')](_0x2e5711,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xf693('0xd')][_0xf693('0x7d')]=function(_0x7c960d){try{if(this[_0xf693('0x65')](_0x7c960d)){logger['debug'](_0xf693('0x7e'),_0x7c960d[_0xf693('0x46')],util['inspect'](_0x7c960d,{'showHidden':![],'depth':null}));if(this[_0xf693('0xf')][_0x7c960d[_0xf693('0x46')]]){var _0x1050a3=_[_0xf693('0x7f')](this['queueReports'][_0x7c960d[_0xf693('0x46')]]);_0x1050a3[_0xf693('0x80')]=![];_0x1050a3['queuecallercompleteAt']=null;_0x1050a3['holdtime']=_0x7c960d[_0xf693('0x81')];_0x1050a3[_0xf693('0x82')]=_0x7c960d[_0xf693('0x82')];_0x1050a3[_0xf693('0x1a')]=!![];_0x1050a3[_0xf693('0x83')]=moment()[_0xf693('0x47')](_0xf693('0x75'));_0x1050a3[_0xf693('0x84')]=_0xf693('0x85');_0x1050a3[_0xf693('0x86')]=null;logger[_0xf693('0x68')](_0xf693('0x87'),_0x1050a3[_0xf693('0x48')],_0x1050a3[_0xf693('0x73')]);this[_0xf693('0x11')][_0x7c960d[_0xf693('0x46')]]=_0x1050a3;this[_0xf693('0x4a')](_0x1050a3,_0xf693('0x1a'));}}}catch(_0x5b5d04){logger['error']('[%s][voiceQueueReport][queuecallerabandon]',_0x7c960d[_0xf693('0x46')],util[_0xf693('0x3d')](_0x5b5d04,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0xf693('0x1c')]=function(_0x5c6cd7){try{if(this[_0xf693('0x65')](_0x5c6cd7)){logger[_0xf693('0x5c')](_0xf693('0x88'),_0x5c6cd7[_0xf693('0x46')],util[_0xf693('0x3d')](_0x5c6cd7,{'showHidden':![],'depth':null}));if(this[_0xf693('0xf')][_0x5c6cd7[_0xf693('0x46')]]){var _0x2f316c=_[_0xf693('0x7f')](this['queueReports'][_0x5c6cd7['uniqueid']]);_0x2f316c['queuecallerleaveAt']=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x2f316c[_0xf693('0x89')]=_0x5c6cd7[_0xf693('0x89')];_0x2f316c['connectedlinename']=_0x5c6cd7[_0xf693('0x8a')];logger[_0xf693('0x68')](_0xf693('0x8b'),_0x2f316c[_0xf693('0x48')],_0x2f316c[_0xf693('0x73')],_0x5c6cd7[_0xf693('0x89')],_0x5c6cd7[_0xf693('0x8a')]);this['channels'][_0x5c6cd7[_0xf693('0x46')]]=_0x2f316c;this[_0xf693('0x44')](_0x2f316c,_0xf693('0x1b'));}}}catch(_0x39c642){logger[_0xf693('0x3e')](_0xf693('0x88'),_0x5c6cd7[_0xf693('0x46')],util[_0xf693('0x3d')](_0x39c642,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0xf693('0x8c')]=function(_0x4e584d){try{if(this['isNotNull'](_0x4e584d)){logger[_0xf693('0x5c')]('[%s][voiceQueueReport][agentconnect]',_0x4e584d[_0xf693('0x46')],util[_0xf693('0x3d')](_0x4e584d,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x4e584d[_0xf693('0x46')]]){var _0x34ecdc=_['last'](this['queueReports'][_0x4e584d[_0xf693('0x46')]]);_0x34ecdc[_0xf693('0x80')]=!![];_0x34ecdc['queuecallerexitreason']=_0xf693('0x8d');logger['info'](_0xf693('0x8e'),_0x34ecdc[_0xf693('0x48')],_0x34ecdc[_0xf693('0x73')]);}}}catch(_0x18870b){logger[_0xf693('0x3e')]('[%s][voiceQueueReport][agentconnect]',_0x4e584d['uniqueid'],util['inspect'](_0x18870b,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xf693('0xd')][_0xf693('0x1e')]=function(_0x2c14c2){try{if(this[_0xf693('0x65')](_0x2c14c2)){logger[_0xf693('0x5c')](_0xf693('0x8f'),_0x2c14c2[_0xf693('0x46')],util[_0xf693('0x3d')](_0x2c14c2,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x2c14c2['uniqueid']]){var _0x4a3919=_[_0xf693('0x7f')](this[_0xf693('0xf')][_0x2c14c2[_0xf693('0x46')]]);_0x4a3919['queuecallerabandon']=![];_0x4a3919['queuecallerabandonAt']=null;_0x4a3919['assigned']=!![];_0x4a3919['lastAssignedTo']=_0x2c14c2['membername'];_0x4a3919[_0xf693('0x81')]=_0x2c14c2[_0xf693('0x81')];_0x4a3919['queuecallercomplete']=!![];_0x4a3919[_0xf693('0x90')]=![];_0x4a3919[_0xf693('0x91')]=null;if(!_0x4a3919[_0xf693('0x92')]){if(_0x2c14c2[_0xf693('0x93')]==_0xf693('0x92')){_0x4a3919[_0xf693('0x84')]=_0xf693('0x94');logger[_0xf693('0x68')](_0xf693('0x95'),_0x4a3919[_0xf693('0x48')],_0x4a3919[_0xf693('0x73')]);}else{if(_[_0xf693('0x96')](_0x2c14c2[_0xf693('0x38')][_0xf693('0x97')](),_0xf693('0x98'))){if(this[_0xf693('0xf')][_0x2c14c2[_0xf693('0x99')]]){var _0x1256b8=_['last'](this[_0xf693('0xf')][_0x2c14c2[_0xf693('0x99')]]);_0x1256b8[_0xf693('0x80')]=![];_0x1256b8[_0xf693('0x90')]=!![];_0x1256b8['queuecallerexitAt']=moment(_0x4a3919[_0xf693('0x74')])['add'](_0x2c14c2[_0xf693('0x81')],'seconds')[_0xf693('0x47')](_0xf693('0x75'));_0x1256b8[_0xf693('0x84')]=_0xf693('0x9a');_0x1256b8['transfer']=!![];_0x1256b8[_0xf693('0x9b')]=_0xf693('0x9c');_0x1256b8[_0xf693('0x9d')]=_0x2c14c2[_0xf693('0x9e')];_0x1256b8[_0xf693('0x9f')]=_0x2c14c2['uniqueid'];logger[_0xf693('0x68')]('[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:FORWARDTRANSFER',_0x1256b8['name'],_0x1256b8['type']);var _0x48561b=this['queueReports'][_0x2c14c2[_0xf693('0x99')]];this[_0xf693('0xf')][_0x2c14c2[_0xf693('0x99')]]=this[_0xf693('0xf')][_0x2c14c2['uniqueid']];this['queueReports'][_0x2c14c2['uniqueid']]=_0x48561b;}}else{_0x4a3919[_0xf693('0x84')]=_0xf693('0xa0')+_0x2c14c2[_0xf693('0x93')][_0xf693('0xa1')]();logger[_0xf693('0x68')](_0xf693('0xa2'),_0x4a3919['name'],_0x4a3919[_0xf693('0x73')],_0x4a3919[_0xf693('0x84')]);}}}this[_0xf693('0x11')][_0x2c14c2[_0xf693('0x46')]]=_0x4a3919;this[_0xf693('0x4a')](_0x4a3919,'agentcomplete');}}}catch(_0x20b687){logger[_0xf693('0x3e')](_0xf693('0x8f'),_0x2c14c2[_0xf693('0x46')],util[_0xf693('0x3d')](_0x20b687,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xf693('0xd')][_0xf693('0x20')]=function(_0x23489d){try{if(this[_0xf693('0x65')](_0x23489d)){logger['debug'](_0xf693('0xa3'),_0x23489d['uniqueid'],util[_0xf693('0x3d')](_0x23489d,{'showHidden':![],'depth':null}));this[_0xf693('0xa4')](_0x23489d[_0xf693('0x46')],_['keys'](_0x23489d['variable'])[0x0],_0x23489d[_0xf693('0xa5')]);if(this[_0xf693('0xf')][_0x23489d['uniqueid']]){var _0x1b5981=_[_0xf693('0x7f')](this[_0xf693('0xf')][_0x23489d['uniqueid']]);if(_0x1b5981){if(this[_0xf693('0x65')](_0x23489d[_0xf693('0xa6')])&&this[_0xf693('0x65')](_0x23489d['variable'][_0xf693('0xa7')])){switch(_0x23489d[_0xf693('0xa5')]){case _0xf693('0xa8'):_0x1b5981['queuecallerexit']=![];_0x1b5981['queuecallerexitAt']=null;break;case _0xf693('0xa9'):_0x1b5981['lastevent']=_0xf693('0xaa');_0x1b5981[_0xf693('0x90')]=!![];_0x1b5981['queuecallerexitAt']=moment()[_0xf693('0x47')](_0xf693('0x75'));_0x1b5981[_0xf693('0xab')]=moment()[_0xf693('0x47')](_0xf693('0x75'));logger['debug']('[%s][voiceQueueReport][varset]\x20sending\x20timeout\x20event:',_0x23489d[_0xf693('0x46')],util['inspect'](_0x1b5981,{'showHidden':![],'depth':null}));ami[_0xf693('0x43')](_0xf693('0xac'),_0x1b5981);break;default:_0x1b5981['queuecallerexit']=!![];_0x1b5981[_0xf693('0x91')]=moment()[_0xf693('0x47')](_0xf693('0x75'));_0x1b5981[_0xf693('0xab')]=moment()[_0xf693('0x47')](_0xf693('0x75'));}_0x1b5981['queuecallerabandon']=![];_0x1b5981['queuecallerabandonAt']=null;_0x1b5981['queuecallerexitreason']=_0x23489d[_0xf693('0xa5')];this[_0xf693('0x11')][_0x23489d[_0xf693('0x46')]]=_0x1b5981;this[_0xf693('0x4a')](_0x1b5981,_0xf693('0x1f'));}else if(this[_0xf693('0x65')](_0x23489d[_0xf693('0xa6')])&&this[_0xf693('0x65')](_0x23489d[_0xf693('0xa6')][_0xf693('0xad')])){if(!_0x1b5981['queuecallerabandon']){_0x1b5981['queuecallerexit']=!![];_0x1b5981['queuecallerexitAt']=moment()['format'](_0xf693('0x75'));_0x1b5981[_0xf693('0x84')]=_0xf693('0xae');_0x1b5981[_0xf693('0xab')]=moment()[_0xf693('0x47')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xf693('0x11')][_0x23489d[_0xf693('0x46')]]=_0x1b5981;}}logger[_0xf693('0x68')]('[%s][voiceQueueReport][varset]\x20name:%s\x20type:%s\x20variable:%s\x20value:%s',_0x23489d[_0xf693('0x46')],_0x1b5981['name'],_0x1b5981['type'],_['keys'](_0x23489d[_0xf693('0xa6')])[0x0],_0x23489d[_0xf693('0xa5')]);_0x1b5981[_0xf693('0x15')]=this[_0xf693('0x15')][_0x23489d[_0xf693('0x46')]];}}}}catch(_0x4a61e){logger[_0xf693('0x3e')](_0xf693('0xa3'),_0x23489d[_0xf693('0x46')],util['inspect'](_0x4a61e,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0xf693('0xa4')]=function(_0x2e4088,_0x27ce3d,_0xe84196){var _0x18784b=[_0xf693('0xaf'),_0xf693('0xb0'),_0xf693('0xb1'),_0xf693('0xb2'),_0xf693('0xb3'),_0xf693('0xb4'),_0xf693('0xb5'),_0xf693('0xb6'),_0xf693('0xb7'),'sipuri',_0xf693('0xb8'),_0xf693('0xb9'),'membercalls',_0xf693('0xba'),_0xf693('0xbb'),_0xf693('0xbc'),'membername',_0xf693('0xbd'),_0xf693('0xbe')];if(!_[_0xf693('0x36')](_0x27ce3d)&&!_[_0xf693('0xbf')](_0x18784b,_0x27ce3d)){if(_[_0xf693('0x60')](this[_0xf693('0x15')][_0x2e4088])){this[_0xf693('0x15')][_0x2e4088]={};}this[_0xf693('0x15')][_0x2e4088][_0x27ce3d]=_0xe84196;}};VoiceQueueReport[_0xf693('0xd')][_0xf693('0xc0')]=function(_0xf09d5){try{if(this['isNotNull'](_0xf09d5)){logger[_0xf693('0x5c')](_0xf693('0xc1'),_0xf09d5['uniqueid'],util[_0xf693('0x3d')](_0xf09d5,{'showHidden':![],'depth':null}));if(this['queueReports'][_0xf09d5[_0xf693('0x46')]]){for(var _0x2d1287=0x0,_0x1fcfdf={};_0x2d1287<this[_0xf693('0xf')][_0xf09d5['uniqueid']][_0xf693('0xc2')];_0x2d1287+=0x1){_0x1fcfdf=this['queueReports'][_0xf09d5[_0xf693('0x46')]][_0x2d1287];if(this['voiceQueues'][_0x1fcfdf[_0xf693('0x66')]]){if(_0x1fcfdf[_0xf693('0x90')]&&_0x1fcfdf[_0xf693('0x92')]!=!![]){this[_0xf693('0x13')][_0x1fcfdf[_0xf693('0x66')]][_0xf693('0x56')]+=0x1;}if(_0x1fcfdf['queuecallerabandon']){this['voiceQueues'][_0x1fcfdf[_0xf693('0x66')]][_0xf693('0x57')]+=0x1;}this[_0xf693('0x13')][_0x1fcfdf[_0xf693('0x66')]][_0xf693('0x53')]+=moment(_0x1fcfdf[_0xf693('0xab')])['diff'](_0x1fcfdf[_0xf693('0x74')],_0xf693('0xc3'))||0x0;if(_0x2d1287===this[_0xf693('0xf')][_0xf09d5[_0xf693('0x46')]][_0xf693('0xc2')]-0x1){this[_0xf693('0x13')][_0x1fcfdf[_0xf693('0x66')]][_0xf693('0x52')]+=moment()[_0xf693('0xc4')](0x0)[_0xf693('0xc5')](_0x1fcfdf[_0xf693('0x74')],'seconds');this[_0xf693('0x13')][_0x1fcfdf[_0xf693('0x66')]][_0xf693('0x55')]+=0x1;if(_0x1fcfdf[_0xf693('0x80')]){this[_0xf693('0x13')][_0x1fcfdf[_0xf693('0x66')]]['answered']+=0x1;this[_0xf693('0x13')][_0x1fcfdf['queue']]['sumBillable']+=moment()[_0xf693('0xc4')](0x0)['diff'](_0x1fcfdf['queuecallerleaveAt'],_0xf693('0xc3'));_0x1fcfdf[_0xf693('0xc6')]=moment()[_0xf693('0x47')]('YYYY-MM-DD\x20HH:mm:ss');_0x1fcfdf[_0xf693('0x90')]=![];_0x1fcfdf[_0xf693('0x91')]=null;}if(_0x1fcfdf['queuecallerexit']&&_0x1fcfdf['transfer']!=!![]){_0x1fcfdf[_0xf693('0xc7')]=_0xf693('0x56');logger[_0xf693('0x5c')]('[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerunmanaged\x20event:',_0xf09d5[_0xf693('0x46')],util[_0xf693('0x3d')](_0x1fcfdf,{'showHidden':![],'depth':null}));ami[_0xf693('0x43')](_0xf693('0xc8'),_0x1fcfdf);}if(_0x1fcfdf['queuecallerabandon']){_0x1fcfdf[_0xf693('0xc7')]=_0xf693('0x57');logger[_0xf693('0x5c')](_0xf693('0xc9'),_0xf09d5['uniqueid'],util[_0xf693('0x3d')](_0x1fcfdf,{'showHidden':![],'depth':null}));ami['emit'](_0xf693('0xca'),_0x1fcfdf);}}else{this[_0xf693('0x13')][_0x1fcfdf[_0xf693('0x66')]][_0xf693('0x52')]+=this[_0xf693('0x13')][_0x1fcfdf[_0xf693('0x66')]][_0xf693('0x53')];}logger[_0xf693('0x68')](_0xf693('0xcb'),_0xf09d5[_0xf693('0x46')],_0x1fcfdf[_0xf693('0x48')],_0x1fcfdf[_0xf693('0x73')],_0xf09d5[_0xf693('0xcc')]);this[_0xf693('0x11')][_0xf09d5[_0xf693('0x46')]]=_0x1fcfdf;this['emitVoiceQueueChannelRemove'](_0x1fcfdf,'hangup');this[_0xf693('0x4d')](this[_0xf693('0x13')][_0x1fcfdf['queue']],_0xf693('0x21'));}}logger['debug']('[%s][voiceQueueReport][hangup]\x20sending\x20voiceQueueReport\x20event:',_0xf09d5[_0xf693('0x46')],util[_0xf693('0x3d')](this[_0xf693('0xf')][_0xf09d5[_0xf693('0x46')]],{'showHidden':![],'depth':null}));ami[_0xf693('0x43')](_0xf693('0xcd'),this[_0xf693('0xf')][_0xf09d5[_0xf693('0x46')]]);delete this['queueReports'][_0xf09d5[_0xf693('0x46')]];delete this[_0xf693('0x11')][_0xf09d5['uniqueid']];}if(this[_0xf693('0x15')][_0xf09d5[_0xf693('0x46')]]){delete this['variables'][_0xf09d5['uniqueid']];}}}catch(_0x4d00cc){logger[_0xf693('0x3e')](_0xf693('0xc1'),_0xf09d5[_0xf693('0x46')],util[_0xf693('0x3d')](_0x4d00cc,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xf693('0xd')][_0xf693('0x28')]=function(_0x2c03a7){try{if(this['isNotNull'](_0x2c03a7)){logger[_0xf693('0x5c')](_0xf693('0xce'),_0x2c03a7['uniqueid'],util[_0xf693('0x3d')](_0x2c03a7,{'showHidden':![],'depth':null}));var _0x48d7ee;if(this[_0xf693('0xf')][_0x2c03a7['transfereeuniqueid']]){_0x48d7ee=_[_0xf693('0x7f')](this[_0xf693('0xf')][_0x2c03a7['transfereeuniqueid']]);_0x48d7ee['transferexten']=_0x2c03a7['secondtransfererexten'];_0x48d7ee[_0xf693('0x9f')]=_0x2c03a7[_0xf693('0xcf')];_0x48d7ee[_0xf693('0x84')]='ATTENDEDTRANSFER';_0x48d7ee['transfer']=!![];_0x48d7ee[_0xf693('0x9b')]=_0xf693('0xd0');if(this['queueReports'][_0x2c03a7[_0xf693('0xcf')]]){var _0x34d9a7=this[_0xf693('0xf')][_0x2c03a7[_0xf693('0xcf')]];this[_0xf693('0xf')][_0x2c03a7['secondtransfereruniqueid']]=this[_0xf693('0xf')][_0x2c03a7[_0xf693('0xd1')]];this[_0xf693('0xf')][_0x2c03a7[_0xf693('0xd1')]]=_0x34d9a7;var _0x136132=_[_0xf693('0x7f')](this['queueReports'][_0x2c03a7['transfereeuniqueid']]);_0x136132['switch']=!![];}logger[_0xf693('0x68')](_0xf693('0xd2'),_0x2c03a7[_0xf693('0x46')],_0x48d7ee[_0xf693('0x48')],_0x48d7ee[_0xf693('0x73')],_0x48d7ee['transferexten'],_0x48d7ee['transferuniqueid']);}else if(this[_0xf693('0xf')][_0x2c03a7[_0xf693('0xd3')]]){_0x48d7ee=_[_0xf693('0x7f')](this[_0xf693('0xf')][_0x2c03a7[_0xf693('0xd3')]]);_0x48d7ee[_0xf693('0x9d')]=_0x2c03a7[_0xf693('0xd4')];_0x48d7ee[_0xf693('0x9f')]=_0x2c03a7[_0xf693('0xd5')];_0x48d7ee['queuecallerexitreason']=_0xf693('0xd6');_0x48d7ee[_0xf693('0x92')]=!![];_0x48d7ee[_0xf693('0x9b')]=_0xf693('0xd0');if(this[_0xf693('0xf')][_0x2c03a7['origtransfereruniqueid']]){var _0x34d9a7=this[_0xf693('0xf')][_0x2c03a7[_0xf693('0xd5')]];this[_0xf693('0xf')][_0x2c03a7['origtransfereruniqueid']]=this[_0xf693('0xf')][_0x2c03a7['transfertargetuniqueid']];this[_0xf693('0xf')][_0x2c03a7[_0xf693('0xd3')]]=_0x34d9a7;var _0x136132=_['last'](this['queueReports'][_0x2c03a7[_0xf693('0xd3')]]);_0x136132[_0xf693('0x34')]=!![];}logger['info']('[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s',_0x2c03a7[_0xf693('0x46')],_0x48d7ee[_0xf693('0x48')],_0x48d7ee[_0xf693('0x73')],_0x48d7ee['transferexten'],_0x48d7ee[_0xf693('0x9f')]);}}}catch(_0x1bfad5){logger[_0xf693('0x3e')](_0xf693('0xce'),_0x2c03a7[_0xf693('0x46')],util[_0xf693('0x3d')](_0x1bfad5,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xf693('0xd')][_0xf693('0x2a')]=function(_0x1a2aa2){try{if(this['isNotNull'](_0x1a2aa2)){logger[_0xf693('0x5c')](_0xf693('0xd7'),_0x1a2aa2[_0xf693('0x46')],util[_0xf693('0x3d')](_0x1a2aa2,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x1a2aa2[_0xf693('0xd1')]]){var _0x30e573=_[_0xf693('0x7f')](this['queueReports'][_0x1a2aa2[_0xf693('0xd1')]]);_0x30e573[_0xf693('0x84')]='BLINDTRANSFER';_0x30e573[_0xf693('0x92')]=!![];_0x30e573['transfertype']='BLIND';_0x30e573[_0xf693('0x9d')]=_0x1a2aa2[_0xf693('0xd8')];_0x30e573['transferuniqueid']=_0x1a2aa2[_0xf693('0xd1')];logger[_0xf693('0x68')](_0xf693('0xd9'),_0x1a2aa2['uniqueid'],_0x30e573[_0xf693('0x48')],_0x30e573[_0xf693('0x73')],_0x30e573[_0xf693('0x9d')],_0x30e573[_0xf693('0x9f')]);this[_0xf693('0xc0')]({'event':_0xf693('0xda'),'uniqueid':_0x1a2aa2[_0xf693('0xd1')],'context':_0x1a2aa2[_0xf693('0xdb')],'channel':_0x1a2aa2['transfererchannel']});}}}catch(_0x1e70b1){logger[_0xf693('0x3e')](_0xf693('0xd7'),_0x1a2aa2[_0xf693('0x46')],util['inspect'](_0x1e70b1,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xf693('0xd')]['syncMusicOnHoldStart']=function(_0x345116){try{if(this[_0xf693('0x65')](_0x345116)){logger['debug'](_0xf693('0xdc'),_0x345116[_0xf693('0x46')],util['inspect'](_0x345116,{'showHidden':![],'depth':null}));if(this[_0xf693('0xf')][_0x345116['uniqueid']]){var _0x212290=_[_0xf693('0x7f')](this[_0xf693('0xf')][_0x345116['uniqueid']]);if(!_['isNil'](_0x212290[_0xf693('0xab')])){_0x212290[_0xf693('0xdd')]=moment()[_0xf693('0x47')](_0xf693('0x75'));logger[_0xf693('0x68')](_0xf693('0xde'),_0x345116['uniqueid'],_0x212290[_0xf693('0xdd')]);}}}}catch(_0x4096ec){logger[_0xf693('0x3e')](_0xf693('0xdc'),_0x345116[_0xf693('0x46')],util['inspect'](_0x4096ec,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0xf693('0xdf')]=function(_0x44f352){try{if(this[_0xf693('0x65')](_0x44f352)){logger[_0xf693('0x5c')]('[%s][voiceQueueReport][musiconholdstop]',_0x44f352[_0xf693('0x46')],util[_0xf693('0x3d')](_0x44f352,{'showHidden':![],'depth':null}));if(this[_0xf693('0xf')][_0x44f352[_0xf693('0x46')]]){var _0x2d9bf6=_[_0xf693('0x7f')](this[_0xf693('0xf')][_0x44f352[_0xf693('0x46')]]);if(!_['isNil'](_0x2d9bf6['mohstarttime'])){_0x2d9bf6[_0xf693('0xe0')]+=moment()[_0xf693('0xc4')](0x0)[_0xf693('0xc5')](_0x2d9bf6[_0xf693('0xdd')],'seconds');logger['info']('[%s][voiceQueueReport][musiconholdstop]\x20mohtime:%s',_0x44f352[_0xf693('0x46')],_0x2d9bf6['mohtime']);delete _0x2d9bf6[_0xf693('0xdd')];}}}}catch(_0x4947f4){logger['error'](_0xf693('0xe1'),_0x44f352[_0xf693('0x46')],util[_0xf693('0x3d')](_0x4947f4,{'showHidden':![],'depth':null}));}};module[_0xf693('0xe2')]=VoiceQueueReport;
\ No newline at end of file