Built motion from commit f861bcb808219e66da88ba48b61bddb35224a65e. Version 3.0.0...
[motion-next.git] / server / services / ami / report / voiceQueueReport.js
1 'use strict';const a1290_0x15ea=['queuecallerleave','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:%s','sipuri','voice_queue_presence:remove','queuecallerexitreason','syncVarSet','syncFullyBooted','transferexten','[voiceQueueReport][queuesummarycomplete]\x20event:','undefined','873486DzozlV','switch','voice_queue_presence:save','@rediscache','connectedlinenum','[voiceQueueReport][','prototype','[%s][voiceQueueReport][varset]\x20name:%s\x20type:%s\x20variable:%s\x20value:%s',']\x20sending\x20voice_queue_channel:remove\x20event:','waiting','callerid','Trunk','loopQueueShow','voiceQueues','queuecallerabandonAt','voice_queue:save','add','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:FORWARDTRANSFER','pTalking','[%s][voiceQueueReport][blindTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','clearZombieChannels','syncQueueSummary','1884tdBVSz','count','lastevent','enqueue','fullybooted','[%s][voiceQueueReport][varset]','voice_queue_channel:remove','bridgepvtcallid','originalposition','sumDuration','channels','Action','exports','syncQueueCallerAbandon','queuecallercomplete','loggedin','[%s][voiceQueueReport][','clearQueueReport','sumBillable','sumHoldTime','[%s][voiceQueueReport][checkVariables]','clearqueuereport','syncQueueCallerLeave','BlindTransfer','value','[%s][voiceQueueReport][musiconholdstart]\x20mohstarttime:%s','syncHangup','syncBlindTransfer','reason','linkedid','channel','origtransfereruniqueid','format','musiconholdstop','seconds','error','toNumber','queuecallerexit','debug','secondtransfererexten','[%s][voiceQueueReport][checkChannel]','abandoned','position','syncAgentConnect','memberlastcall','inspect','queuestatus','ABANDONED','445HTvNNc','custom:queuesummary','transfertargetuniqueid','queuecallerleaveAt','[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT','agents','isEmpty','addVariable','catch','queuesummary','custom:queuecallerunmanaged','lodash','type','voice:queue:%s','[%s][voiceQueueReport][attendedtransfer]','TIMEOUT','merge','musiconholdstart','@config/logger','[%s][voiceQueueReport][queuecallerjoin]','varset','transfer','moment','[%s][voiceQueueReport][musiconholdstart]','rtpaudioqosbridged','emit','voice_queue_channel:save','queuecallerjoinAt','memberpenalty','push','syncMusicOnHoldStop','agentconnect','transfererchannel','ami','EXITWITHKEY','variables','../ami','tail','[%s][voiceQueueReport][queuecallerabandon]','secondtransfereruniqueid','diff','mohtime','membercalls','[%s][voiceQueueReport][agentcomplete]','uniqueid','custom:timeout','milliseconds','16078QMUQzY','variable','length','[%s][voiceQueueReport][checkQueueReport]','talking','[%s][voiceQueueReport][hangup]','mohstarttime','[voiceQueueReport][queuecallerleave]\x20name:%s\x20type:%s\x20connectedlinenum:%s\x20connectedlinename:%s','blindtransfer','active','answered','toLowerCase','destexten','BLIND','last','rtpaudioqos','timeout','[%s][voiceQueueReport][musiconholdstop]','syncQueueSummaryComplete','../model/queueReport','isNil','custom:queuecallerabandon','queue','loggedIn','emitVoiceQueueChannelSave','queueChannels','queuecallerjoin','holdtime','pick','keys','md5','rtpaudioqosjitterbridged','BLINDTRANSFER','memberrealtime','COMPLETEDBY','bind','[voiceQueueReport][queuesummary]\x20sending\x20queuesummary\x20event:','cause-txt','ATTENDED','message','[FullyBooted]\x20clear\x20realtime','queuecallercompleteAt','[voiceQueueReport][queuesummary]','loopQueueSummary','syncAttendedTransfer','lastAssignedTo','info','emitVoiceQueueSummary','transfertype','[%s][voiceQueueReport][varset]\x20sending\x20timeout\x20event:','COMPLETEDBYAGENT','queuesummarycomplete','[voiceQueueReport][queuecallerabandon]\x20name:%s\x20type:%s','transfereeuniqueid','queuecallerabandon','isNotNull','[%s][voiceQueueReport][agentconnect]','syncMusicOnHoldStart','name','rtpaudioqosloss','458397NAyHsw','273798ITUoeb',']\x20sending\x20voice_queue:save\x20event:','100663YFtkre','assigned','includes','strategy','2017548KzJuGm','CONTINUE','FORWARDTRANSFER','origtransfererexten','sipcallid','hangup','syncAgentComplete','startsWith','YYYY-MM-DD\x20HH:mm:ss','[voiceQueueReport][queuesummary]\x20event:','41huAsMx','[%s][voiceQueueReport][blindtransfer]','queueReports','transferuniqueid','connectedlinename','queuecallerexitAt','unmanaged','available','unlockRR','emitVoiceQueueChannelRemove','[%s][voiceQueueReport][hangup]\x20name:%s\x20type:%s\x20reason:%s','campaigns','agentcomplete','status','syncQueueCallerJoin','[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','originated','callers','Interval','countBy','inbound','COMPLETED','isUndefined','[%s][voiceQueueReport][musiconholdstop]\x20mohtime:%s'];const a1290_0x41f3=function(_0x2ed973,_0x1f5730){_0x2ed973=_0x2ed973-0x13f;let _0x15eadc=a1290_0x15ea[_0x2ed973];return _0x15eadc;};const a1290_0x471fcd=a1290_0x41f3;(function(_0x573656,_0x5d9e65){const _0x4b109b=a1290_0x41f3;while(!![]){try{const _0x2c44bc=-parseInt(_0x4b109b(0x1fa))*-parseInt(_0x4b109b(0x1ca))+-parseInt(_0x4b109b(0x184))+parseInt(_0x4b109b(0x181))+parseInt(_0x4b109b(0x1b4))+-parseInt(_0x4b109b(0x192))*-parseInt(_0x4b109b(0x145))+-parseInt(_0x4b109b(0x182))+-parseInt(_0x4b109b(0x188));if(_0x2c44bc===_0x5d9e65)break;else _0x573656['push'](_0x573656['shift']());}catch(_0x10685a){_0x573656['push'](_0x573656['shift']());}}}(a1290_0x15ea,0x6accc));const _=require(a1290_0x471fcd(0x205)),moment=require(a1290_0x471fcd(0x210)),util=require('util'),md5=require(a1290_0x471fcd(0x163)),logger=require(a1290_0x471fcd(0x20c))(a1290_0x471fcd(0x21b)),{getAmi}=require(a1290_0x471fcd(0x21e)),ami=getAmi(),QueueReport=require(a1290_0x471fcd(0x158)),{getSocket}=require(a1290_0x471fcd(0x1b7)),io=getSocket(),Sequence=function(){};Sequence['prototype'][a1290_0x471fcd(0x1cd)]=function(_0x5005d1){const _0x167e36=a1290_0x471fcd;this[_0x167e36(0x21f)]=this['tail']?this[_0x167e36(0x21f)]['finally'](_0x5005d1):_0x5005d1();};function VoiceQueueReport(_0x3a6b31){const _0xadfb6f=a1290_0x471fcd;this['sequence']=new Sequence(),this['queueReports']={},this[_0xadfb6f(0x1ff)]=_0x3a6b31['agents'],this[_0xadfb6f(0x1d4)]=_0x3a6b31[_0xadfb6f(0x15e)],this[_0xadfb6f(0x1c1)]=_0x3a6b31['voiceQueues'],this[_0xadfb6f(0x19d)]=_0x3a6b31['campaigns'],this['variables']={},ami['on'](_0xadfb6f(0x203),this[_0xadfb6f(0x1c9)][_0xadfb6f(0x168)](this)),ami['on'](_0xadfb6f(0x178),this[_0xadfb6f(0x157)][_0xadfb6f(0x168)](this)),ami['on'](_0xadfb6f(0x15f),this[_0xadfb6f(0x1a0)][_0xadfb6f(0x168)](this)),ami['on'](_0xadfb6f(0x17b),this['syncQueueCallerAbandon'][_0xadfb6f(0x168)](this)),ami['on'](_0xadfb6f(0x1aa),this[_0xadfb6f(0x1e0)]['bind'](this)),ami['on']('agentcomplete',this[_0xadfb6f(0x18e)][_0xadfb6f(0x168)](this)),ami['on'](_0xadfb6f(0x219),this[_0xadfb6f(0x1f5)][_0xadfb6f(0x168)](this)),ami['on'](_0xadfb6f(0x20e),this[_0xadfb6f(0x1af)][_0xadfb6f(0x168)](this)),ami['on'](_0xadfb6f(0x18d),this[_0xadfb6f(0x1e4)][_0xadfb6f(0x168)](this)),ami['on'](_0xadfb6f(0x1ce),this[_0xadfb6f(0x1b0)][_0xadfb6f(0x168)](this)),ami['on'](_0xadfb6f(0x20b),this[_0xadfb6f(0x17e)][_0xadfb6f(0x168)](this)),ami['on'](_0xadfb6f(0x1eb),this[_0xadfb6f(0x218)][_0xadfb6f(0x168)](this)),ami['on']('attendedtransfer',this[_0xadfb6f(0x171)][_0xadfb6f(0x168)](this)),ami['on'](_0xadfb6f(0x14d),this[_0xadfb6f(0x1e5)][_0xadfb6f(0x168)](this)),this[_0xadfb6f(0x170)]=_['debounce'](()=>{const _0x20099a=_0xadfb6f;return ami[_0x20099a(0x1d5)]({'action':'queuesummary'})[_0x20099a(0x202)](function(_0x214ba1){const _0x5eb436=_0x20099a;logger['error'](_0x5eb436(0x16f),util['inspect'](_0x214ba1,{'showHidden':![],'depth':null}));});},0x3e8,{'trailing':!![]}),this[_0xadfb6f(0x170)](),this[_0xadfb6f(0x1c0)]();}function clearChannels(_0x1796f6){const _0x3b1a35=a1290_0x471fcd;if(!_[_0x3b1a35(0x200)](_0x1796f6))for(const _0xd44cfe in _0x1796f6){typeof _0x1796f6[_0xd44cfe]!==_0x3b1a35(0x1b3)&&delete _0x1796f6[_0xd44cfe];}}function clearCampaigns(_0x3aeb8a){const _0x559038=a1290_0x471fcd;if(!_[_0x559038(0x200)](_0x3aeb8a))for(const _0x3d85ad in _0x3aeb8a){typeof _0x3aeb8a[_0x3d85ad]!==_0x559038(0x1b3)&&(_0x3aeb8a[_0x3d85ad][_0x559038(0x1a2)]=0x0);}}function clearVoiceQueues(_0x1e78d8){const _0x3e9e2e=a1290_0x471fcd;if(!_['isEmpty'](_0x1e78d8))for(const _0x46512d in _0x1e78d8){typeof _0x1e78d8[_0x46512d]!==_0x3e9e2e(0x1b3)&&(_0x1e78d8[_0x46512d][_0x3e9e2e(0x1a2)]=0x0,_0x1e78d8[_0x46512d][_0x3e9e2e(0x149)]=0x0,_0x1e78d8[_0x46512d][_0x3e9e2e(0x1c6)]=0x0,_0x1e78d8[_0x46512d][_0x3e9e2e(0x1bd)]=0x0,_0x1e78d8[_0x46512d]['queueStatusComplete']=!![]);}}function clearAgentBooked(_0x410e6b){const _0xf0b3e8=a1290_0x471fcd;if(!_[_0xf0b3e8(0x200)](_0x410e6b))for(const _0x4f47cd in _0x410e6b){typeof _0x410e6b[_0x4f47cd]!==_0xf0b3e8(0x1b3)&&(_0x410e6b[_0x4f47cd][_0xf0b3e8(0x19a)]=!![]);}}VoiceQueueReport[a1290_0x471fcd(0x1ba)][a1290_0x471fcd(0x1c8)]=function(){const _0x540547=a1290_0x471fcd,_0x166208=this;for(const _0x37ca2e in this[_0x540547(0x1d4)]){typeof this['channels'][_0x37ca2e]!==_0x540547(0x1b3)&&!this[_0x540547(0x1d4)][_0x37ca2e][_0x540547(0x1b5)]&&this['sequence'][_0x540547(0x1cd)](function(){const _0x5234f0=_0x540547;if(!_[_0x5234f0(0x159)](_0x166208[_0x5234f0(0x1d4)][_0x37ca2e]))return ami['Action']({'action':_0x5234f0(0x19f),'channel':_0x166208['channels'][_0x37ca2e][_0x5234f0(0x1e8)]})[_0x5234f0(0x202)](function(_0x992e4f){const _0x2f3552=_0x5234f0;_0x992e4f[_0x2f3552(0x16c)]==='No\x20such\x20channel'&&setTimeout(function(){const _0x3e33f4=_0x2f3552;_0x166208[_0x3e33f4(0x1d4)][_0x37ca2e]&&(delete _0x166208[_0x3e33f4(0x1d4)][_0x37ca2e],logger[_0x3e33f4(0x1ed)](_0x3e33f4(0x1f2),_0x37ca2e,util[_0x3e33f4(0x1f7)](_0x992e4f,{'showHidden':![],'depth':null}))),_0x166208[_0x3e33f4(0x194)][_0x37ca2e]&&(delete _0x166208[_0x3e33f4(0x194)][_0x37ca2e],logger[_0x3e33f4(0x1ed)](_0x3e33f4(0x148),_0x37ca2e,util[_0x3e33f4(0x1f7)](_0x992e4f,{'showHidden':![],'depth':null}))),_0x166208[_0x3e33f4(0x21d)][_0x37ca2e]&&(delete _0x166208[_0x3e33f4(0x21d)][_0x37ca2e],logger[_0x3e33f4(0x1ed)](_0x3e33f4(0x1de),_0x37ca2e,util[_0x3e33f4(0x1f7)](_0x992e4f,{'showHidden':![],'depth':null})));},0x1f40);});});}},VoiceQueueReport['prototype'][a1290_0x471fcd(0x1b0)]=function(){const _0x26556d=a1290_0x471fcd;logger['error'](_0x26556d(0x16d)),clearChannels(this[_0x26556d(0x1d4)]),this['clearQueueReport'](this[_0x26556d(0x194)]),clearAgentBooked(this[_0x26556d(0x1ff)]),clearVoiceQueues(this[_0x26556d(0x1c1)]),clearCampaigns(this[_0x26556d(0x19d)]);},VoiceQueueReport[a1290_0x471fcd(0x1ba)][a1290_0x471fcd(0x1db)]=function(_0x52a4ce){const _0x329d9c=a1290_0x471fcd,_0x4209c4=this;if(!_['isEmpty'](_0x52a4ce))for(const _0x134003 in _0x52a4ce){typeof _0x52a4ce[_0x134003]!==_0x329d9c(0x1b3)&&(_0x4209c4[_0x329d9c(0x19b)](_0x52a4ce[_0x134003],_0x329d9c(0x1df)),delete _0x52a4ce[_0x134003]);}},VoiceQueueReport['prototype'][a1290_0x471fcd(0x213)]=function(_0x2e0788,_0x12e39b,_0x382cb7){const _0x2b2201=a1290_0x471fcd;io['to'](_0x2e0788)[_0x2b2201(0x213)](_0x12e39b,_0x382cb7);},VoiceQueueReport[a1290_0x471fcd(0x1ba)][a1290_0x471fcd(0x15d)]=function(_0x5d4ad4,_0x5879c8){const _0x409222=a1290_0x471fcd;logger[_0x409222(0x1f0)](_0x409222(0x1da)+_0x5879c8+']\x20sending\x20voice_queue_channel:save\x20event:',_0x5d4ad4[_0x409222(0x142)],util[_0x409222(0x1f7)](_0x5d4ad4,{'showHidden':![],'depth':null})),this[_0x409222(0x213)](util[_0x409222(0x1ea)](_0x409222(0x207),_0x5d4ad4['name']),_0x409222(0x214),_0x5d4ad4),io[_0x409222(0x213)](_0x409222(0x1b6),_0x5d4ad4);},VoiceQueueReport['prototype'][a1290_0x471fcd(0x19b)]=function(_0x17b761,_0x312483){const _0x3a9749=a1290_0x471fcd;logger[_0x3a9749(0x1f0)](_0x3a9749(0x1da)+_0x312483+_0x3a9749(0x1bc),_0x17b761['uniqueid'],util[_0x3a9749(0x1f7)](_0x17b761,{'showHidden':![],'depth':null})),this['emit'](util[_0x3a9749(0x1ea)](_0x3a9749(0x207),_0x17b761[_0x3a9749(0x17f)]),_0x3a9749(0x1d0),_0x17b761),io['emit'](_0x3a9749(0x1ad),_0x17b761);},VoiceQueueReport['prototype'][a1290_0x471fcd(0x174)]=function(_0x294f80,_0x466d6e){const _0x5146f4=a1290_0x471fcd;if(_0x294f80[_0x5146f4(0x206)]==='inbound'){const _0x445f25={'id':_0x294f80['id'],'name':_0x294f80['name'],'strategy':_0x294f80[_0x5146f4(0x187)],'answered':_0x294f80[_0x5146f4(0x14f)],'available':_0x294f80[_0x5146f4(0x199)],'loggedIn':_0x294f80[_0x5146f4(0x15c)],'pTalking':_0x294f80[_0x5146f4(0x1c6)],'sumBillable':_0x294f80[_0x5146f4(0x1dc)],'sumDuration':_0x294f80[_0x5146f4(0x1d3)],'sumHoldTime':_0x294f80[_0x5146f4(0x1dd)]||0x0,'talking':_0x294f80[_0x5146f4(0x149)],'total':_0x294f80['total'],'type':_0x294f80[_0x5146f4(0x206)],'unmanaged':_0x294f80[_0x5146f4(0x198)],'abandoned':_0x294f80['abandoned'],'waiting':_0x294f80[_0x5146f4(0x1bd)]};_0x294f80['Trunk']&&(_0x445f25['Trunk']={'id':_0x294f80[_0x5146f4(0x1bf)]['id'],'name':_0x294f80['Trunk'][_0x5146f4(0x17f)],'active':_0x294f80['Trunk'][_0x5146f4(0x14e)],'callerid':_0x294f80[_0x5146f4(0x1bf)][_0x5146f4(0x1be)]});_0x294f80[_0x5146f4(0x1a4)]&&(_0x445f25[_0x5146f4(0x1a4)]={'id':_0x294f80['Interval']['id'],'name':_0x294f80[_0x5146f4(0x1a4)][_0x5146f4(0x17f)]});const _0x5c7b15=md5(JSON['stringify'](_0x445f25));_0x294f80[_0x5146f4(0x163)]!==_0x5c7b15&&(_0x294f80[_0x5146f4(0x163)]=_0x5c7b15,logger[_0x5146f4(0x1f0)](_0x5146f4(0x1b9)+_0x466d6e+_0x5146f4(0x183),util['inspect'](_0x445f25,{'showHidden':![],'depth':null})),this[_0x5146f4(0x213)](util[_0x5146f4(0x1ea)]('voice:queue:%s',_0x445f25[_0x5146f4(0x17f)]),_0x5146f4(0x1c3),_0x445f25));}},VoiceQueueReport[a1290_0x471fcd(0x1ba)]['isNotNull']=function(_0x11723b){const _0x4f1c8b=a1290_0x471fcd;return _0x11723b!==null&&!_[_0x4f1c8b(0x1a8)](_0x11723b);},VoiceQueueReport[a1290_0x471fcd(0x1ba)][a1290_0x471fcd(0x1c0)]=function(){const _0x26eb66=this;setInterval(function(){const _0x36c8c9=a1290_0x41f3;_0x26eb66[_0x36c8c9(0x1c8)]();},0x2710);},VoiceQueueReport[a1290_0x471fcd(0x1ba)][a1290_0x471fcd(0x1c9)]=function(_0x5657de){const _0x3b03ec=a1290_0x471fcd;try{if(this[_0x3b03ec(0x17c)](_0x5657de)&&this[_0x3b03ec(0x17c)](_0x5657de[_0x3b03ec(0x15b)])){logger[_0x3b03ec(0x1f0)](_0x3b03ec(0x191),util[_0x3b03ec(0x1f7)](_0x5657de,{'showHidden':![],'depth':null}));if(this['voiceQueues'][_0x5657de['queue']]){logger[_0x3b03ec(0x173)]('[voiceQueueReport][queuesummary]\x20name:%s',_0x5657de[_0x3b03ec(0x15b)]);const _0x109a28=_[_0x3b03ec(0x1a5)](this[_0x3b03ec(0x1d4)],_0x3b03ec(0x15b))[_0x5657de[_0x3b03ec(0x15b)]]||0x0,_0x57f80b=_0x109a28-_0x5657de['callers'];(this[_0x3b03ec(0x1c1)][_0x5657de['queue']][_0x3b03ec(0x1bd)]!==_[_0x3b03ec(0x1ee)](_0x5657de['callers'])||this[_0x3b03ec(0x1c1)][_0x5657de['queue']][_0x3b03ec(0x15c)]!==_[_0x3b03ec(0x1ee)](_0x5657de[_0x3b03ec(0x1d9)])||this[_0x3b03ec(0x1c1)][_0x5657de[_0x3b03ec(0x15b)]][_0x3b03ec(0x199)]!==_['toNumber'](_0x5657de[_0x3b03ec(0x199)])||this[_0x3b03ec(0x1c1)][_0x5657de[_0x3b03ec(0x15b)]][_0x3b03ec(0x149)]!==_0x57f80b)&&(this[_0x3b03ec(0x1c1)][_0x5657de['queue']][_0x3b03ec(0x1bd)]=_[_0x3b03ec(0x1ee)](_0x5657de[_0x3b03ec(0x1a3)]),this['voiceQueues'][_0x5657de[_0x3b03ec(0x15b)]]['loggedIn']=_[_0x3b03ec(0x1ee)](_0x5657de['loggedin']),this['voiceQueues'][_0x5657de[_0x3b03ec(0x15b)]][_0x3b03ec(0x199)]=_[_0x3b03ec(0x1ee)](_0x5657de['available']),this[_0x3b03ec(0x1c1)][_0x5657de[_0x3b03ec(0x15b)]]['talking']=_0x57f80b>0x0?_0x57f80b:0x0,this['voiceQueues'][_0x5657de['queue']][_0x3b03ec(0x149)]=this[_0x3b03ec(0x1c1)][_0x5657de['queue']][_0x3b03ec(0x149)]>_['toNumber'](_0x5657de[_0x3b03ec(0x1d9)])?_[_0x3b03ec(0x1ee)](_0x5657de[_0x3b03ec(0x1d9)]):this[_0x3b03ec(0x1c1)][_0x5657de['queue']][_0x3b03ec(0x149)],this[_0x3b03ec(0x174)](this['voiceQueues'][_0x5657de['queue']],_0x3b03ec(0x203))),logger[_0x3b03ec(0x1f0)](_0x3b03ec(0x169),util['inspect'](this['voiceQueues'][_0x5657de[_0x3b03ec(0x15b)]],{'showHidden':![],'depth':null})),ami[_0x3b03ec(0x213)](_0x3b03ec(0x1fb),this[_0x3b03ec(0x1c1)][_0x5657de[_0x3b03ec(0x15b)]]);}}}catch(_0x452962){logger[_0x3b03ec(0x1ed)]('[voiceQueueReport][queuesummary]',util[_0x3b03ec(0x1f7)](_0x452962,{'showHidden':![],'depth':null}));}},VoiceQueueReport[a1290_0x471fcd(0x1ba)][a1290_0x471fcd(0x157)]=function(_0x366025){const _0x44dfc2=a1290_0x471fcd;logger[_0x44dfc2(0x1f0)](_0x44dfc2(0x1b2),util[_0x44dfc2(0x1f7)](_0x366025,{'showHidden':![],'depth':null})),this[_0x44dfc2(0x170)]();},VoiceQueueReport[a1290_0x471fcd(0x1ba)][a1290_0x471fcd(0x1a0)]=function(_0x51cf05){const _0x5363c8=a1290_0x471fcd;try{if(this[_0x5363c8(0x17c)](_0x51cf05)){logger[_0x5363c8(0x1f0)](_0x5363c8(0x20d),_0x51cf05[_0x5363c8(0x142)],util[_0x5363c8(0x1f7)](_0x51cf05,{'showHidden':![],'depth':null}));_[_0x5363c8(0x1a8)](this[_0x5363c8(0x194)][_0x51cf05[_0x5363c8(0x142)]])&&(this['queueReports'][_0x51cf05[_0x5363c8(0x142)]]=[],this['channels'][_0x51cf05[_0x5363c8(0x142)]]={});const _0x43d5f6=new QueueReport();_0x43d5f6[_0x5363c8(0x17f)]=_0x51cf05[_0x5363c8(0x15b)],_0x43d5f6[_0x5363c8(0x206)]=this['voiceQueues'][_0x43d5f6['name']]&&this[_0x5363c8(0x1c1)][_0x43d5f6['name']]['type']?this[_0x5363c8(0x1c1)][_0x43d5f6[_0x5363c8(0x17f)]][_0x5363c8(0x206)]||'inbound':_0x5363c8(0x1a6),_0x43d5f6[_0x5363c8(0x15b)]=_0x51cf05[_0x5363c8(0x15b)],_0x43d5f6[_0x5363c8(0x215)]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),_0x43d5f6[_0x5363c8(0x1f4)]=_0x51cf05[_0x5363c8(0x1f4)],_0x43d5f6[_0x5363c8(0x1cb)]=_0x51cf05[_0x5363c8(0x1cb)],_0x43d5f6[_0x5363c8(0x142)]=_0x51cf05[_0x5363c8(0x142)],logger[_0x5363c8(0x173)]('[voiceQueueReport][queuecallerjoin]\x20name:%s\x20type:%s',_0x43d5f6['name'],_0x43d5f6['type']),_[_0x5363c8(0x20a)](_0x43d5f6,_[_0x5363c8(0x161)](_0x51cf05,_[_0x5363c8(0x162)](_0x43d5f6))),this[_0x5363c8(0x194)][_0x51cf05[_0x5363c8(0x142)]][_0x5363c8(0x217)](_0x43d5f6),this[_0x5363c8(0x1d4)][_0x51cf05[_0x5363c8(0x142)]]=_0x43d5f6,this[_0x5363c8(0x15d)](_0x43d5f6,_0x5363c8(0x15f));}}catch(_0x5b4743){logger[_0x5363c8(0x1ed)](_0x5363c8(0x20d),_0x51cf05[_0x5363c8(0x142)],util[_0x5363c8(0x1f7)](_0x5b4743,{'showHidden':![],'depth':null}));}},VoiceQueueReport[a1290_0x471fcd(0x1ba)][a1290_0x471fcd(0x1d7)]=function(_0x4d4161){const _0xdbf479=a1290_0x471fcd;try{if(this['isNotNull'](_0x4d4161)){logger[_0xdbf479(0x1f0)](_0xdbf479(0x220),_0x4d4161['uniqueid'],util['inspect'](_0x4d4161,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x4d4161['uniqueid']]){const _0x362949=_[_0xdbf479(0x153)](this[_0xdbf479(0x194)][_0x4d4161['uniqueid']]);_0x362949[_0xdbf479(0x1d8)]=![],_0x362949['queuecallercompleteAt']=null,_0x362949[_0xdbf479(0x160)]=_0x4d4161[_0xdbf479(0x160)],_0x362949[_0xdbf479(0x1d2)]=_0x4d4161[_0xdbf479(0x1d2)],_0x362949[_0xdbf479(0x17b)]=!![],_0x362949['queuecallerabandonAt']=moment()[_0xdbf479(0x1ea)](_0xdbf479(0x190)),_0x362949['queuecallerexitreason']=_0xdbf479(0x1f9),_0x362949[_0xdbf479(0x172)]=null,logger[_0xdbf479(0x173)](_0xdbf479(0x179),_0x362949[_0xdbf479(0x17f)],_0x362949[_0xdbf479(0x206)]),this[_0xdbf479(0x1d4)][_0x4d4161[_0xdbf479(0x142)]]=_0x362949,this[_0xdbf479(0x19b)](_0x362949,_0xdbf479(0x17b));}}}catch(_0xdd2d6b){logger['error'](_0xdbf479(0x220),_0x4d4161[_0xdbf479(0x142)],util['inspect'](_0xdd2d6b,{'showHidden':![],'depth':null}));}},VoiceQueueReport[a1290_0x471fcd(0x1ba)]['syncQueueCallerLeave']=function(_0x2c6f31){const _0x4ac23e=a1290_0x471fcd;try{if(this['isNotNull'](_0x2c6f31)){logger[_0x4ac23e(0x1f0)]('[%s][voiceQueueReport][queuecallerleave]',_0x2c6f31[_0x4ac23e(0x142)],util[_0x4ac23e(0x1f7)](_0x2c6f31,{'showHidden':![],'depth':null}));if(this[_0x4ac23e(0x194)][_0x2c6f31['uniqueid']]){const _0x5b85c8=_['last'](this[_0x4ac23e(0x194)][_0x2c6f31[_0x4ac23e(0x142)]]);_0x5b85c8[_0x4ac23e(0x1fd)]=moment()[_0x4ac23e(0x1ea)](_0x4ac23e(0x190)),_0x5b85c8[_0x4ac23e(0x1b8)]=_0x2c6f31[_0x4ac23e(0x1b8)],_0x5b85c8[_0x4ac23e(0x196)]=_0x2c6f31[_0x4ac23e(0x196)],logger['info'](_0x4ac23e(0x14c),_0x5b85c8[_0x4ac23e(0x17f)],_0x5b85c8['type'],_0x2c6f31['connectedlinenum'],_0x2c6f31['connectedlinename']),this[_0x4ac23e(0x1d4)][_0x2c6f31[_0x4ac23e(0x142)]]=_0x5b85c8,this[_0x4ac23e(0x15d)](_0x5b85c8,_0x4ac23e(0x1aa));}}}catch(_0x2f8cf1){logger[_0x4ac23e(0x1ed)]('[%s][voiceQueueReport][queuecallerleave]',_0x2c6f31[_0x4ac23e(0x142)],util[_0x4ac23e(0x1f7)](_0x2f8cf1,{'showHidden':![],'depth':null}));}},VoiceQueueReport[a1290_0x471fcd(0x1ba)]['syncAgentConnect']=function(_0x4b3b6b){const _0x341c5d=a1290_0x471fcd;try{if(this[_0x341c5d(0x17c)](_0x4b3b6b)){logger[_0x341c5d(0x1f0)]('[%s][voiceQueueReport][agentconnect]',_0x4b3b6b['uniqueid'],util[_0x341c5d(0x1f7)](_0x4b3b6b,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x4b3b6b[_0x341c5d(0x142)]]){const _0x157d75=_[_0x341c5d(0x153)](this[_0x341c5d(0x194)][_0x4b3b6b[_0x341c5d(0x142)]]);_0x157d75[_0x341c5d(0x1d8)]=!![],_0x157d75[_0x341c5d(0x1ae)]=_0x341c5d(0x177),logger['info'](_0x341c5d(0x1fe),_0x157d75[_0x341c5d(0x17f)],_0x157d75[_0x341c5d(0x206)]);}}}catch(_0xeb26f8){logger[_0x341c5d(0x1ed)](_0x341c5d(0x17d),_0x4b3b6b[_0x341c5d(0x142)],util[_0x341c5d(0x1f7)](_0xeb26f8,{'showHidden':![],'depth':null}));}},VoiceQueueReport[a1290_0x471fcd(0x1ba)][a1290_0x471fcd(0x18e)]=function(_0xff7d34){const _0x25d431=a1290_0x471fcd;try{if(this[_0x25d431(0x17c)](_0xff7d34)){logger[_0x25d431(0x1f0)](_0x25d431(0x141),_0xff7d34[_0x25d431(0x142)],util[_0x25d431(0x1f7)](_0xff7d34,{'showHidden':![],'depth':null}));if(this[_0x25d431(0x194)][_0xff7d34[_0x25d431(0x142)]]){const _0x4ea209=_[_0x25d431(0x153)](this[_0x25d431(0x194)][_0xff7d34['uniqueid']]);_0x4ea209[_0x25d431(0x17b)]=![],_0x4ea209[_0x25d431(0x1c2)]=null,_0x4ea209[_0x25d431(0x185)]=!![],_0x4ea209[_0x25d431(0x172)]=_0xff7d34['membername'],_0x4ea209[_0x25d431(0x160)]=_0xff7d34[_0x25d431(0x160)],_0x4ea209[_0x25d431(0x1d8)]=!![],_0x4ea209[_0x25d431(0x1ef)]=![],_0x4ea209['queuecallerexitAt']=null;if(!_0x4ea209['transfer']){if(_0xff7d34[_0x25d431(0x1e6)]===_0x25d431(0x20f))_0x4ea209[_0x25d431(0x1ae)]=_0x25d431(0x1a7),logger[_0x25d431(0x173)]('[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETED',_0x4ea209[_0x25d431(0x17f)],_0x4ea209[_0x25d431(0x206)]);else{if(_[_0x25d431(0x18f)](_0xff7d34[_0x25d431(0x1e8)][_0x25d431(0x150)](),'local/')){if(this[_0x25d431(0x194)][_0xff7d34['linkedid']]){const _0x1eb6e7=_[_0x25d431(0x153)](this[_0x25d431(0x194)][_0xff7d34[_0x25d431(0x1e7)]]);_0x1eb6e7[_0x25d431(0x1d8)]=![],_0x1eb6e7[_0x25d431(0x1ef)]=!![],_0x1eb6e7['queuecallerexitAt']=moment(_0x4ea209['queuecallerjoinAt'])[_0x25d431(0x1c4)](_0xff7d34[_0x25d431(0x160)],_0x25d431(0x1ec))['format'](_0x25d431(0x190)),_0x1eb6e7[_0x25d431(0x1ae)]=_0x25d431(0x18a),_0x1eb6e7[_0x25d431(0x20f)]=!![],_0x1eb6e7[_0x25d431(0x175)]='FORWARD',_0x1eb6e7['transferexten']=_0xff7d34[_0x25d431(0x151)],_0x1eb6e7[_0x25d431(0x195)]=_0xff7d34[_0x25d431(0x142)],logger['info'](_0x25d431(0x1c5),_0x1eb6e7['name'],_0x1eb6e7['type']);const _0x489f90=this[_0x25d431(0x194)][_0xff7d34[_0x25d431(0x1e7)]];this[_0x25d431(0x194)][_0xff7d34[_0x25d431(0x1e7)]]=this['queueReports'][_0xff7d34['uniqueid']],this[_0x25d431(0x194)][_0xff7d34['uniqueid']]=_0x489f90;}}else _0x4ea209[_0x25d431(0x1ae)]=_0x25d431(0x167)+_0xff7d34['reason']['toUpperCase'](),logger['info'](_0x25d431(0x1ab),_0x4ea209[_0x25d431(0x17f)],_0x4ea209[_0x25d431(0x206)],_0x4ea209['queuecallerexitreason']);}}this[_0x25d431(0x1d4)][_0xff7d34[_0x25d431(0x142)]]=_0x4ea209,this['emitVoiceQueueChannelRemove'](_0x4ea209,_0x25d431(0x19e));}}}catch(_0x22bee9){logger[_0x25d431(0x1ed)](_0x25d431(0x141),_0xff7d34['uniqueid'],util['inspect'](_0x22bee9,{'showHidden':![],'depth':null}));}},VoiceQueueReport['prototype'][a1290_0x471fcd(0x1af)]=function(_0x22dd80){const _0x541922=a1290_0x471fcd;try{if(this[_0x541922(0x17c)](_0x22dd80)){logger['debug'](_0x541922(0x1cf),_0x22dd80[_0x541922(0x142)],util[_0x541922(0x1f7)](_0x22dd80,{'showHidden':![],'depth':null})),this[_0x541922(0x201)](_0x22dd80[_0x541922(0x142)],_['keys'](_0x22dd80[_0x541922(0x146)])[0x0],_0x22dd80[_0x541922(0x1e2)]);if(this[_0x541922(0x194)][_0x22dd80[_0x541922(0x142)]]){const _0x5e3c64=_[_0x541922(0x153)](this[_0x541922(0x194)][_0x22dd80['uniqueid']]);if(_0x5e3c64){if(this['isNotNull'](_0x22dd80[_0x541922(0x146)])&&this[_0x541922(0x17c)](_0x22dd80[_0x541922(0x146)][_0x541922(0x1f8)])){switch(_0x22dd80[_0x541922(0x1e2)]){case _0x541922(0x189):_0x5e3c64[_0x541922(0x1ef)]=![],_0x5e3c64[_0x541922(0x197)]=null;break;case _0x541922(0x209):_0x5e3c64[_0x541922(0x1cc)]=_0x541922(0x155),_0x5e3c64[_0x541922(0x1ef)]=!![],_0x5e3c64[_0x541922(0x197)]=moment()['format'](_0x541922(0x190)),_0x5e3c64[_0x541922(0x1fd)]=moment()[_0x541922(0x1ea)]('YYYY-MM-DD\x20HH:mm:ss'),logger[_0x541922(0x1f0)](_0x541922(0x176),_0x22dd80[_0x541922(0x142)],util[_0x541922(0x1f7)](_0x5e3c64,{'showHidden':![],'depth':null})),ami[_0x541922(0x213)](_0x541922(0x143),_0x5e3c64);break;default:_0x5e3c64['queuecallerexit']=!![],_0x5e3c64['queuecallerexitAt']=moment()[_0x541922(0x1ea)](_0x541922(0x190)),_0x5e3c64[_0x541922(0x1fd)]=moment()[_0x541922(0x1ea)](_0x541922(0x190));}_0x5e3c64[_0x541922(0x17b)]=![],_0x5e3c64['queuecallerabandonAt']=null,_0x5e3c64[_0x541922(0x1ae)]=_0x22dd80['value'],this[_0x541922(0x1d4)][_0x22dd80[_0x541922(0x142)]]=_0x5e3c64,this[_0x541922(0x19b)](_0x5e3c64,_0x541922(0x20e));}else this[_0x541922(0x17c)](_0x22dd80[_0x541922(0x146)])&&this['isNotNull'](_0x22dd80[_0x541922(0x146)]['queueposition'])&&(!_0x5e3c64[_0x541922(0x17b)]&&(_0x5e3c64[_0x541922(0x1ef)]=!![],_0x5e3c64[_0x541922(0x197)]=moment()['format'](_0x541922(0x190)),_0x5e3c64[_0x541922(0x1ae)]=_0x541922(0x21c),_0x5e3c64[_0x541922(0x1fd)]=moment()[_0x541922(0x1ea)](_0x541922(0x190)),this[_0x541922(0x1d4)][_0x22dd80[_0x541922(0x142)]]=_0x5e3c64));logger[_0x541922(0x173)](_0x541922(0x1bb),_0x22dd80['uniqueid'],_0x5e3c64[_0x541922(0x17f)],_0x5e3c64[_0x541922(0x206)],_['keys'](_0x22dd80['variable'])[0x0],_0x22dd80[_0x541922(0x1e2)]),_0x5e3c64[_0x541922(0x21d)]=this[_0x541922(0x21d)][_0x22dd80[_0x541922(0x142)]];}}}}catch(_0x5144b7){logger[_0x541922(0x1ed)]('[%s][voiceQueueReport][varset]',_0x22dd80['uniqueid'],util[_0x541922(0x1f7)](_0x5144b7,{'showHidden':![],'depth':null}));}},VoiceQueueReport['prototype'][a1290_0x471fcd(0x201)]=function(_0x368eb2,_0x42c6cf,_0x48afaf){const _0x5427f2=a1290_0x471fcd,_0x12cf8e=[_0x5427f2(0x154),_0x5427f2(0x212),'rtpaudioqosjitter',_0x5427f2(0x164),_0x5427f2(0x180),'rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged',_0x5427f2(0x18c),_0x5427f2(0x1ac),'bridgepeer',_0x5427f2(0x1d1),_0x5427f2(0x140),'memberdynamic','memberinterface',_0x5427f2(0x1f6),'membername',_0x5427f2(0x216),_0x5427f2(0x166)];!_['isNil'](_0x42c6cf)&&!_[_0x5427f2(0x186)](_0x12cf8e,_0x42c6cf)&&(_[_0x5427f2(0x1a8)](this[_0x5427f2(0x21d)][_0x368eb2])&&(this[_0x5427f2(0x21d)][_0x368eb2]={}),this[_0x5427f2(0x21d)][_0x368eb2][_0x42c6cf]=_0x48afaf);},VoiceQueueReport['prototype'][a1290_0x471fcd(0x1e4)]=function(_0x7ed784){const _0x4a2219=a1290_0x471fcd;try{if(this[_0x4a2219(0x17c)](_0x7ed784)){logger[_0x4a2219(0x1f0)]('[%s][voiceQueueReport][hangup]',_0x7ed784[_0x4a2219(0x142)],util[_0x4a2219(0x1f7)](_0x7ed784,{'showHidden':![],'depth':null}));if(this[_0x4a2219(0x194)][_0x7ed784[_0x4a2219(0x142)]]){for(let _0x257c04=0x0,_0x5942e2={};_0x257c04<this[_0x4a2219(0x194)][_0x7ed784['uniqueid']][_0x4a2219(0x147)];_0x257c04+=0x1){_0x5942e2=this[_0x4a2219(0x194)][_0x7ed784[_0x4a2219(0x142)]][_0x257c04],this['voiceQueues'][_0x5942e2[_0x4a2219(0x15b)]]&&(_0x5942e2[_0x4a2219(0x1ef)]&&_0x5942e2[_0x4a2219(0x20f)]!==!![]&&(this[_0x4a2219(0x1c1)][_0x5942e2['queue']][_0x4a2219(0x198)]+=0x1),_0x5942e2['queuecallerabandon']&&(this[_0x4a2219(0x1c1)][_0x5942e2[_0x4a2219(0x15b)]][_0x4a2219(0x1f3)]+=0x1),this[_0x4a2219(0x1c1)][_0x5942e2[_0x4a2219(0x15b)]][_0x4a2219(0x1dd)]+=moment(_0x5942e2[_0x4a2219(0x1fd)])[_0x4a2219(0x222)](_0x5942e2[_0x4a2219(0x215)],'seconds')||0x0,_0x257c04===this[_0x4a2219(0x194)][_0x7ed784[_0x4a2219(0x142)]][_0x4a2219(0x147)]-0x1?(this[_0x4a2219(0x1c1)][_0x5942e2[_0x4a2219(0x15b)]]['sumDuration']+=moment()[_0x4a2219(0x144)](0x0)[_0x4a2219(0x222)](_0x5942e2[_0x4a2219(0x215)],_0x4a2219(0x1ec)),this[_0x4a2219(0x1c1)][_0x5942e2['queue']]['total']+=0x1,_0x5942e2[_0x4a2219(0x1d8)]&&(this[_0x4a2219(0x1c1)][_0x5942e2['queue']][_0x4a2219(0x14f)]+=0x1,this[_0x4a2219(0x1c1)][_0x5942e2[_0x4a2219(0x15b)]][_0x4a2219(0x1dc)]+=moment()[_0x4a2219(0x144)](0x0)[_0x4a2219(0x222)](_0x5942e2[_0x4a2219(0x1fd)],_0x4a2219(0x1ec)),_0x5942e2[_0x4a2219(0x16e)]=moment()[_0x4a2219(0x1ea)]('YYYY-MM-DD\x20HH:mm:ss'),_0x5942e2[_0x4a2219(0x1ef)]=![],_0x5942e2['queuecallerexitAt']=null),_0x5942e2['queuecallerexit']&&_0x5942e2[_0x4a2219(0x20f)]!==!![]&&(_0x5942e2[_0x4a2219(0x1cc)]=_0x4a2219(0x198),logger[_0x4a2219(0x1f0)]('[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerunmanaged\x20event:',_0x7ed784[_0x4a2219(0x142)],util['inspect'](_0x5942e2,{'showHidden':![],'depth':null})),ami['emit'](_0x4a2219(0x204),_0x5942e2)),_0x5942e2[_0x4a2219(0x17b)]&&(_0x5942e2[_0x4a2219(0x1cc)]='abandoned',logger[_0x4a2219(0x1f0)]('[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerabandon\x20event:',_0x7ed784[_0x4a2219(0x142)],util['inspect'](_0x5942e2,{'showHidden':![],'depth':null})),ami[_0x4a2219(0x213)](_0x4a2219(0x15a),_0x5942e2))):this[_0x4a2219(0x1c1)][_0x5942e2['queue']]['sumDuration']+=this[_0x4a2219(0x1c1)][_0x5942e2[_0x4a2219(0x15b)]]['sumHoldTime'],logger['info'](_0x4a2219(0x19c),_0x7ed784['uniqueid'],_0x5942e2['name'],_0x5942e2['type'],_0x7ed784[_0x4a2219(0x16a)]),this[_0x4a2219(0x1d4)][_0x7ed784['uniqueid']]=_0x5942e2,this[_0x4a2219(0x19b)](_0x5942e2,_0x4a2219(0x18d)),this[_0x4a2219(0x174)](this['voiceQueues'][_0x5942e2['queue']],_0x4a2219(0x18d)));}logger[_0x4a2219(0x1f0)]('[%s][voiceQueueReport][hangup]\x20sending\x20voiceQueueReport\x20event:',_0x7ed784['uniqueid'],util['inspect'](this[_0x4a2219(0x194)][_0x7ed784[_0x4a2219(0x142)]],{'showHidden':![],'depth':null})),ami[_0x4a2219(0x213)]('custom:voiceQueueReport',this[_0x4a2219(0x194)][_0x7ed784[_0x4a2219(0x142)]]),delete this[_0x4a2219(0x194)][_0x7ed784[_0x4a2219(0x142)]],delete this['channels'][_0x7ed784['uniqueid']];}this[_0x4a2219(0x21d)][_0x7ed784[_0x4a2219(0x142)]]&&delete this['variables'][_0x7ed784[_0x4a2219(0x142)]];}}catch(_0x3ba34d){logger[_0x4a2219(0x1ed)](_0x4a2219(0x14a),_0x7ed784[_0x4a2219(0x142)],util[_0x4a2219(0x1f7)](_0x3ba34d,{'showHidden':![],'depth':null}));}},VoiceQueueReport[a1290_0x471fcd(0x1ba)][a1290_0x471fcd(0x171)]=function(_0x45ea29){const _0x468548=a1290_0x471fcd;try{if(this['isNotNull'](_0x45ea29)){logger[_0x468548(0x1f0)](_0x468548(0x208),_0x45ea29['uniqueid'],util[_0x468548(0x1f7)](_0x45ea29,{'showHidden':![],'depth':null}));let _0x238154;if(this['queueReports'][_0x45ea29[_0x468548(0x17a)]]){_0x238154=_[_0x468548(0x153)](this[_0x468548(0x194)][_0x45ea29[_0x468548(0x17a)]]),_0x238154[_0x468548(0x1b1)]=_0x45ea29[_0x468548(0x1f1)],_0x238154[_0x468548(0x195)]=_0x45ea29[_0x468548(0x221)],_0x238154[_0x468548(0x1ae)]='ATTENDEDTRANSFER',_0x238154[_0x468548(0x20f)]=!![],_0x238154[_0x468548(0x175)]=_0x468548(0x16b);if(this[_0x468548(0x194)][_0x45ea29['secondtransfereruniqueid']]){const _0x1ff95b=this['queueReports'][_0x45ea29['secondtransfereruniqueid']];this[_0x468548(0x194)][_0x45ea29[_0x468548(0x221)]]=this[_0x468548(0x194)][_0x45ea29[_0x468548(0x17a)]],this[_0x468548(0x194)][_0x45ea29[_0x468548(0x17a)]]=_0x1ff95b;const _0x2f0b86=_['last'](this['queueReports'][_0x45ea29[_0x468548(0x17a)]]);_0x2f0b86[_0x468548(0x1b5)]=!![];}logger[_0x468548(0x173)]('[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s',_0x45ea29[_0x468548(0x142)],_0x238154['name'],_0x238154['type'],_0x238154[_0x468548(0x1b1)],_0x238154[_0x468548(0x195)]);}else{if(this['queueReports'][_0x45ea29[_0x468548(0x1fc)]]){_0x238154=_[_0x468548(0x153)](this[_0x468548(0x194)][_0x45ea29[_0x468548(0x1fc)]]),_0x238154[_0x468548(0x1b1)]=_0x45ea29[_0x468548(0x18b)],_0x238154['transferuniqueid']=_0x45ea29['origtransfereruniqueid'],_0x238154['queuecallerexitreason']='ATTENDEDTRANSFER',_0x238154[_0x468548(0x20f)]=!![],_0x238154[_0x468548(0x175)]=_0x468548(0x16b);if(this[_0x468548(0x194)][_0x45ea29[_0x468548(0x1e9)]]){const _0x127afc=this[_0x468548(0x194)][_0x45ea29[_0x468548(0x1e9)]];this[_0x468548(0x194)][_0x45ea29[_0x468548(0x1e9)]]=this['queueReports'][_0x45ea29['transfertargetuniqueid']],this[_0x468548(0x194)][_0x45ea29[_0x468548(0x1fc)]]=_0x127afc;const _0x4df5b1=_[_0x468548(0x153)](this['queueReports'][_0x45ea29['transfertargetuniqueid']]);_0x4df5b1['switch']=!![];}logger[_0x468548(0x173)](_0x468548(0x1a1),_0x45ea29[_0x468548(0x142)],_0x238154[_0x468548(0x17f)],_0x238154[_0x468548(0x206)],_0x238154[_0x468548(0x1b1)],_0x238154['transferuniqueid']);}}}}catch(_0xc00104){logger[_0x468548(0x1ed)](_0x468548(0x208),_0x45ea29[_0x468548(0x142)],util['inspect'](_0xc00104,{'showHidden':![],'depth':null}));}},VoiceQueueReport[a1290_0x471fcd(0x1ba)]['syncBlindTransfer']=function(_0x5812f8){const _0x2335d7=a1290_0x471fcd;try{if(this[_0x2335d7(0x17c)](_0x5812f8)){logger['debug']('[%s][voiceQueueReport][blindtransfer]',_0x5812f8[_0x2335d7(0x142)],util['inspect'](_0x5812f8,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x5812f8['transfereeuniqueid']]){const _0x3cb1ff=_[_0x2335d7(0x153)](this[_0x2335d7(0x194)][_0x5812f8[_0x2335d7(0x17a)]]);_0x3cb1ff[_0x2335d7(0x1ae)]=_0x2335d7(0x165),_0x3cb1ff[_0x2335d7(0x20f)]=!![],_0x3cb1ff[_0x2335d7(0x175)]=_0x2335d7(0x152),_0x3cb1ff['transferexten']=_0x5812f8['extension'],_0x3cb1ff[_0x2335d7(0x195)]=_0x5812f8[_0x2335d7(0x17a)],logger[_0x2335d7(0x173)](_0x2335d7(0x1c7),_0x5812f8[_0x2335d7(0x142)],_0x3cb1ff[_0x2335d7(0x17f)],_0x3cb1ff[_0x2335d7(0x206)],_0x3cb1ff[_0x2335d7(0x1b1)],_0x3cb1ff[_0x2335d7(0x195)]),this[_0x2335d7(0x1e4)]({'event':_0x2335d7(0x1e1),'uniqueid':_0x5812f8[_0x2335d7(0x17a)],'context':_0x5812f8['context'],'channel':_0x5812f8[_0x2335d7(0x21a)]});}}}catch(_0x59b0d9){logger['error'](_0x2335d7(0x193),_0x5812f8[_0x2335d7(0x142)],util[_0x2335d7(0x1f7)](_0x59b0d9,{'showHidden':![],'depth':null}));}},VoiceQueueReport['prototype'][a1290_0x471fcd(0x17e)]=function(_0x2d4443){const _0x6c1691=a1290_0x471fcd;try{if(this[_0x6c1691(0x17c)](_0x2d4443)){logger['debug'](_0x6c1691(0x211),_0x2d4443[_0x6c1691(0x142)],util[_0x6c1691(0x1f7)](_0x2d4443,{'showHidden':![],'depth':null}));if(this[_0x6c1691(0x194)][_0x2d4443[_0x6c1691(0x142)]]){const _0x46a067=_[_0x6c1691(0x153)](this[_0x6c1691(0x194)][_0x2d4443[_0x6c1691(0x142)]]);!_[_0x6c1691(0x159)](_0x46a067[_0x6c1691(0x1fd)])&&(_0x46a067['mohstarttime']=moment()[_0x6c1691(0x1ea)]('YYYY-MM-DD\x20HH:mm:ss'),logger[_0x6c1691(0x173)](_0x6c1691(0x1e3),_0x2d4443[_0x6c1691(0x142)],_0x46a067[_0x6c1691(0x14b)]));}}}catch(_0xc7d703){logger['error'](_0x6c1691(0x211),_0x2d4443[_0x6c1691(0x142)],util[_0x6c1691(0x1f7)](_0xc7d703,{'showHidden':![],'depth':null}));}},VoiceQueueReport[a1290_0x471fcd(0x1ba)][a1290_0x471fcd(0x218)]=function(_0x31ccce){const _0x46c2d0=a1290_0x471fcd;try{if(this['isNotNull'](_0x31ccce)){logger[_0x46c2d0(0x1f0)]('[%s][voiceQueueReport][musiconholdstop]',_0x31ccce['uniqueid'],util[_0x46c2d0(0x1f7)](_0x31ccce,{'showHidden':![],'depth':null}));if(this[_0x46c2d0(0x194)][_0x31ccce[_0x46c2d0(0x142)]]){const _0x15ebeb=_[_0x46c2d0(0x153)](this[_0x46c2d0(0x194)][_0x31ccce['uniqueid']]);!_[_0x46c2d0(0x159)](_0x15ebeb[_0x46c2d0(0x14b)])&&(_0x15ebeb[_0x46c2d0(0x13f)]+=moment()[_0x46c2d0(0x144)](0x0)[_0x46c2d0(0x222)](_0x15ebeb[_0x46c2d0(0x14b)],_0x46c2d0(0x1ec)),logger[_0x46c2d0(0x173)](_0x46c2d0(0x1a9),_0x31ccce[_0x46c2d0(0x142)],_0x15ebeb[_0x46c2d0(0x13f)]),delete _0x15ebeb[_0x46c2d0(0x14b)]);}}}catch(_0x454368){logger['error'](_0x46c2d0(0x156),_0x31ccce['uniqueid'],util[_0x46c2d0(0x1f7)](_0x454368,{'showHidden':![],'depth':null}));}},module[a1290_0x471fcd(0x1d6)]=VoiceQueueReport;