Built motion from commit (unavailable).|2.5.21
[motion2.git] / server / services / ami / report / voiceQueueReport.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xfc75=['BlindTransfer','context','[%s][voiceQueueReport][musiconholdstart]','mohstarttime','[%s][voiceQueueReport][musiconholdstart]\x20mohstarttime:%s','mohtime','exports','lodash','moment','util','md5','ioredis','ami','../model/queueReport','redis','defaults','localhost','enqueue','tail','finally','sequence','queueReports','agents','channels','queueChannels','voiceQueues','flagQueueSummary','campaigns','variables','syncQueueSummaryComplete','bind','queuecallerjoin','syncQueueCallerJoin','queuecallerabandon','syncQueueCallerAbandon','queuecallerleave','agentcomplete','agentconnect','syncAgentConnect','varset','hangup','syncHangup','fullybooted','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','attendedtransfer','syncAttendedTransfer','blindtransfer','loopQueueSummary','loopQueueShow','isEmpty','hasOwnProperty','originated','pTalking','queueStatusComplete','unlockRR','prototype','clearZombieChannels','switch','isNil','Action','channel','catch','message','No\x20such\x20channel','error','[%s][voiceQueueReport][checkChannel]','inspect','[%s][voiceQueueReport][checkVariables]','syncFullyBooted','clearQueueReport','emitVoiceQueueChannelRemove','clearqueuereport','emitVoiceQueueChannelSave','debug','uniqueid','emit','voice:queue:%s','name','voice_queue_presence:save','format','voice_queue_presence:remove','emitVoiceQueueSummary','strategy','answered','available','loggedIn','sumBillable','sumDuration','sumHoldTime','talking','total','type','unmanaged','waiting','Trunk','active','callerid','Interval','[voiceQueueReport][',']\x20sending\x20voice_queue:save\x20event:','voice_queue:save','isNotNull','isUndefined','queues','[voiceQueueReport][queues]','queuesummary','then','syncQueueSummary','queue','[voiceQueueReport][queuesummary]\x20event:','[voiceQueueReport][queuesummary]\x20name:%s','callers','toNumber','loggedin','[voiceQueueReport][queuesummary]\x20sending\x20queuesummary\x20event:','custom:queuesummary','[voiceQueueReport][queuesummary]','[voiceQueueReport][queuesummarycomplete]\x20event:','inbound','queuecallerjoinAt','YYYY-MM-DD\x20HH:mm:ss','position','count','info','merge','pick','keys','[%s][voiceQueueReport][queuecallerjoin]','last','queuecallercompleteAt','holdtime','originalposition','queuecallerabandonAt','lastAssignedTo','[voiceQueueReport][queuecallerabandon]\x20name:%s\x20type:%s','[%s][voiceQueueReport][queuecallerabandon]','syncQueueCallerLeave','[%s][voiceQueueReport][queuecallerleave]','queuecallerleaveAt','connectedlinenum','connectedlinename','[voiceQueueReport][queuecallerleave]\x20name:%s\x20type:%s\x20connectedlinenum:%s\x20connectedlinename:%s','[%s][voiceQueueReport][agentconnect]','queuecallercomplete','queuecallerexitreason','COMPLETEDBYAGENT','[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT','syncAgentComplete','[%s][voiceQueueReport][agentcomplete]','queuecallerexit','queuecallerexitAt','transfer','reason','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETED','startsWith','toLowerCase','local/','linkedid','add','FORWARDTRANSFER','FORWARD','transferexten','destexten','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:FORWARDTRANSFER','COMPLETEDBY','toUpperCase','[%s][voiceQueueReport][varset]','addVariable','value','variable','CONTINUE','TIMEOUT','lastevent','[%s][voiceQueueReport][varset]\x20sending\x20timeout\x20event:','EXITWITHKEY','[%s][voiceQueueReport][varset]\x20name:%s\x20type:%s\x20variable:%s\x20value:%s','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','sipuri','bridgepeer','memberinterface','memberlastcall','memberpenalty','includes','[%s][voiceQueueReport][hangup]','abandoned','diff','milliseconds','seconds','custom:queuecallerunmanaged','[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerabandon\x20event:','custom:queuecallerabandon','[%s][voiceQueueReport][hangup]\x20name:%s\x20type:%s\x20reason:%s','cause-txt','[%s][voiceQueueReport][hangup]\x20sending\x20voiceQueueReport\x20event:','custom:voiceQueueReport','transfereeuniqueid','secondtransfereruniqueid','ATTENDEDTRANSFER','transfertype','ATTENDED','transferuniqueid','transfertargetuniqueid','origtransfereruniqueid','[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','syncBlindTransfer','[%s][voiceQueueReport][blindtransfer]','BLINDTRANSFER'];(function(_0x2d7f0e,_0x3e6fbd){var _0x110b07=function(_0x557b00){while(--_0x557b00){_0x2d7f0e['push'](_0x2d7f0e['shift']());}};_0x110b07(++_0x3e6fbd);}(_0xfc75,0xe1));var _0x5fc7=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0xfc75[_0x21a9d9];return _0x46adce;};'use strict';var _=require(_0x5fc7('0x0'));var moment=require(_0x5fc7('0x1'));var util=require(_0x5fc7('0x2'));var md5=require(_0x5fc7('0x3'));var Redis=require(_0x5fc7('0x4'));var config=require('../../../config/environment');var logger=require('../../../config/logger')(_0x5fc7('0x5'));var ami=require('../ami');var QueueReport=require(_0x5fc7('0x6'));config[_0x5fc7('0x7')]=_[_0x5fc7('0x8')](config[_0x5fc7('0x7')],{'host':_0x5fc7('0x9'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x5fc7('0x7')]));var Sequence=function(){};Sequence['prototype'][_0x5fc7('0xa')]=function(_0x4828fd){this['tail']=this[_0x5fc7('0xb')]?this['tail'][_0x5fc7('0xc')](_0x4828fd):_0x4828fd();};function VoiceQueueReport(_0x5c8522){this[_0x5fc7('0xd')]=new Sequence();this[_0x5fc7('0xe')]={};this[_0x5fc7('0xf')]=_0x5c8522['agents'];this[_0x5fc7('0x10')]=_0x5c8522[_0x5fc7('0x11')];this[_0x5fc7('0x12')]=_0x5c8522['voiceQueues'];this[_0x5fc7('0x13')]=!![];this[_0x5fc7('0x14')]=_0x5c8522[_0x5fc7('0x14')];this[_0x5fc7('0x15')]={};ami['on']('queuesummary',this['syncQueueSummary']['bind'](this));ami['on']('queuesummarycomplete',this[_0x5fc7('0x16')][_0x5fc7('0x17')](this));ami['on'](_0x5fc7('0x18'),this[_0x5fc7('0x19')]['bind'](this));ami['on'](_0x5fc7('0x1a'),this[_0x5fc7('0x1b')][_0x5fc7('0x17')](this));ami['on'](_0x5fc7('0x1c'),this['syncQueueCallerLeave'][_0x5fc7('0x17')](this));ami['on'](_0x5fc7('0x1d'),this['syncAgentComplete']['bind'](this));ami['on'](_0x5fc7('0x1e'),this[_0x5fc7('0x1f')][_0x5fc7('0x17')](this));ami['on'](_0x5fc7('0x20'),this['syncVarSet'][_0x5fc7('0x17')](this));ami['on'](_0x5fc7('0x21'),this[_0x5fc7('0x22')][_0x5fc7('0x17')](this));ami['on'](_0x5fc7('0x23'),this['syncFullyBooted']['bind'](this));ami['on'](_0x5fc7('0x24'),this[_0x5fc7('0x25')][_0x5fc7('0x17')](this));ami['on'](_0x5fc7('0x26'),this[_0x5fc7('0x27')][_0x5fc7('0x17')](this));ami['on'](_0x5fc7('0x28'),this[_0x5fc7('0x29')]['bind'](this));ami['on'](_0x5fc7('0x2a'),this['syncBlindTransfer'][_0x5fc7('0x17')](this));this[_0x5fc7('0x2b')]();this[_0x5fc7('0x2c')]();}function clearChannels(_0x3b80fe){if(!_[_0x5fc7('0x2d')](_0x3b80fe)){for(var _0x51b0f2 in _0x3b80fe){if(_0x3b80fe[_0x5fc7('0x2e')](_0x51b0f2)){delete _0x3b80fe[_0x51b0f2];}}}}function clearCampaigns(_0x6f28e0){if(!_[_0x5fc7('0x2d')](_0x6f28e0)){for(var _0x1b9deb in _0x6f28e0){if(_0x6f28e0[_0x5fc7('0x2e')](_0x1b9deb)){_0x6f28e0[_0x1b9deb][_0x5fc7('0x2f')]=0x0;}}}}function clearVoiceQueues(_0x9c258c){if(!_[_0x5fc7('0x2d')](_0x9c258c)){for(var _0x4ce63d in _0x9c258c){if(_0x9c258c['hasOwnProperty'](_0x4ce63d)){_0x9c258c[_0x4ce63d][_0x5fc7('0x2f')]=0x0;_0x9c258c[_0x4ce63d]['talking']=0x0;_0x9c258c[_0x4ce63d][_0x5fc7('0x30')]=0x0;_0x9c258c[_0x4ce63d]['waiting']=0x0;_0x9c258c[_0x4ce63d][_0x5fc7('0x31')]=!![];}}}}function clearAgentBooked(_0x1651fb){if(!_[_0x5fc7('0x2d')](_0x1651fb)){for(var _0x3b57e2 in _0x1651fb){if(_0x1651fb[_0x5fc7('0x2e')](_0x3b57e2)){_0x1651fb[_0x3b57e2][_0x5fc7('0x32')]=!![];}}}}VoiceQueueReport[_0x5fc7('0x33')][_0x5fc7('0x34')]=function(){var _0x218c7a=this;for(var _0x52813 in this['channels']){if(this[_0x5fc7('0x10')][_0x5fc7('0x2e')](_0x52813)&&!this[_0x5fc7('0x10')][_0x52813][_0x5fc7('0x35')]){this[_0x5fc7('0xd')][_0x5fc7('0xa')](function(){if(!_[_0x5fc7('0x36')](_0x218c7a[_0x5fc7('0x10')][_0x52813])){return ami[_0x5fc7('0x37')]({'action':'status','channel':_0x218c7a['channels'][_0x52813][_0x5fc7('0x38')]})[_0x5fc7('0x39')](function(_0x29836){if(_0x29836[_0x5fc7('0x3a')]===_0x5fc7('0x3b')){setTimeout(function(){if(_0x218c7a[_0x5fc7('0x10')][_0x52813]){delete _0x218c7a[_0x5fc7('0x10')][_0x52813];logger[_0x5fc7('0x3c')](_0x5fc7('0x3d'),_0x52813,util[_0x5fc7('0x3e')](_0x29836,{'showHidden':![],'depth':null}));}if(_0x218c7a[_0x5fc7('0xe')][_0x52813]){delete _0x218c7a[_0x5fc7('0xe')][_0x52813];logger['error']('[%s][voiceQueueReport][checkQueueReport]',_0x52813,util[_0x5fc7('0x3e')](_0x29836,{'showHidden':![],'depth':null}));}if(_0x218c7a['variables'][_0x52813]){delete _0x218c7a[_0x5fc7('0x15')][_0x52813];logger[_0x5fc7('0x3c')](_0x5fc7('0x3f'),_0x52813,util[_0x5fc7('0x3e')](_0x29836,{'showHidden':![],'depth':null}));}},0x1f40);}});}});}}};VoiceQueueReport[_0x5fc7('0x33')][_0x5fc7('0x40')]=function(){logger['error']('[FullyBooted]\x20clear\x20realtime');clearChannels(this[_0x5fc7('0x10')]);this[_0x5fc7('0x41')](this[_0x5fc7('0xe')]);clearAgentBooked(this[_0x5fc7('0xf')]);clearVoiceQueues(this['voiceQueues']);clearCampaigns(this['campaigns']);};VoiceQueueReport['prototype'][_0x5fc7('0x41')]=function(_0x26578e){var _0x233e56=this;if(!_['isEmpty'](_0x26578e)){for(var _0x5f3b23 in _0x26578e){if(_0x26578e[_0x5fc7('0x2e')](_0x5f3b23)){_0x233e56[_0x5fc7('0x42')](_0x26578e[_0x5f3b23],_0x5fc7('0x43'));delete _0x26578e[_0x5f3b23];}}}};VoiceQueueReport['prototype']['emit']=function(_0x68d836,_0x27a470,_0x537d62){io['to'](_0x68d836)['emit'](_0x27a470,_0x537d62);};VoiceQueueReport[_0x5fc7('0x33')][_0x5fc7('0x44')]=function(_0x4b0c6e,_0x461e11){logger[_0x5fc7('0x45')]('[%s][voiceQueueReport]['+_0x461e11+']\x20sending\x20voice_queue_channel:save\x20event:',_0x4b0c6e[_0x5fc7('0x46')],util['inspect'](_0x4b0c6e,{'showHidden':![],'depth':null}));this[_0x5fc7('0x47')](util['format'](_0x5fc7('0x48'),_0x4b0c6e[_0x5fc7('0x49')]),'voice_queue_channel:save',_0x4b0c6e);io[_0x5fc7('0x47')](_0x5fc7('0x4a'),_0x4b0c6e);};VoiceQueueReport['prototype'][_0x5fc7('0x42')]=function(_0x3866d9,_0x4722fa){logger[_0x5fc7('0x45')]('[%s][voiceQueueReport]['+_0x4722fa+']\x20sending\x20voice_queue_channel:remove\x20event:',_0x3866d9[_0x5fc7('0x46')],util[_0x5fc7('0x3e')](_0x3866d9,{'showHidden':![],'depth':null}));this[_0x5fc7('0x47')](util[_0x5fc7('0x4b')](_0x5fc7('0x48'),_0x3866d9[_0x5fc7('0x49')]),'voice_queue_channel:remove',_0x3866d9);io[_0x5fc7('0x47')](_0x5fc7('0x4c'),_0x3866d9);};VoiceQueueReport[_0x5fc7('0x33')][_0x5fc7('0x4d')]=function(_0x5ea7a1,_0x45fc44){if(_0x5ea7a1['type']==='inbound'){var _0x1f9c2e={'id':_0x5ea7a1['id'],'name':_0x5ea7a1['name'],'strategy':_0x5ea7a1[_0x5fc7('0x4e')],'answered':_0x5ea7a1[_0x5fc7('0x4f')],'available':_0x5ea7a1[_0x5fc7('0x50')],'loggedIn':_0x5ea7a1[_0x5fc7('0x51')],'pTalking':_0x5ea7a1[_0x5fc7('0x30')],'sumBillable':_0x5ea7a1[_0x5fc7('0x52')],'sumDuration':_0x5ea7a1[_0x5fc7('0x53')],'sumHoldTime':_0x5ea7a1[_0x5fc7('0x54')]||0x0,'talking':_0x5ea7a1[_0x5fc7('0x55')],'total':_0x5ea7a1[_0x5fc7('0x56')],'type':_0x5ea7a1[_0x5fc7('0x57')],'unmanaged':_0x5ea7a1[_0x5fc7('0x58')],'abandoned':_0x5ea7a1['abandoned'],'waiting':_0x5ea7a1[_0x5fc7('0x59')]};if(_0x5ea7a1[_0x5fc7('0x5a')]){_0x1f9c2e[_0x5fc7('0x5a')]={'id':_0x5ea7a1[_0x5fc7('0x5a')]['id'],'name':_0x5ea7a1[_0x5fc7('0x5a')]['name'],'active':_0x5ea7a1[_0x5fc7('0x5a')][_0x5fc7('0x5b')],'callerid':_0x5ea7a1[_0x5fc7('0x5a')][_0x5fc7('0x5c')]};}if(_0x5ea7a1['Interval']){_0x1f9c2e[_0x5fc7('0x5d')]={'id':_0x5ea7a1[_0x5fc7('0x5d')]['id'],'name':_0x5ea7a1[_0x5fc7('0x5d')]['name']};}var _0x468d7e=md5(JSON['stringify'](_0x1f9c2e));if(_0x5ea7a1[_0x5fc7('0x3')]!==_0x468d7e){_0x5ea7a1[_0x5fc7('0x3')]=_0x468d7e;logger[_0x5fc7('0x45')](_0x5fc7('0x5e')+_0x45fc44+_0x5fc7('0x5f'),util[_0x5fc7('0x3e')](_0x1f9c2e,{'showHidden':![],'depth':null}));this[_0x5fc7('0x47')](util['format'](_0x5fc7('0x48'),_0x1f9c2e[_0x5fc7('0x49')]),_0x5fc7('0x60'),_0x1f9c2e);}}};VoiceQueueReport[_0x5fc7('0x33')][_0x5fc7('0x61')]=function(_0x400d11){return _0x400d11!==null&&!_[_0x5fc7('0x62')](_0x400d11);};VoiceQueueReport[_0x5fc7('0x33')][_0x5fc7('0x2c')]=function(){var _0x446f4d=this;setInterval(function(){_0x446f4d[_0x5fc7('0x34')]();ami[_0x5fc7('0x37')]({'action':_0x5fc7('0x63')})[_0x5fc7('0x39')](function(_0x16bd90){logger[_0x5fc7('0x3c')](_0x5fc7('0x64'),util[_0x5fc7('0x3e')](_0x16bd90,{'showHidden':![],'depth':null}));});},0x2710);};VoiceQueueReport[_0x5fc7('0x33')][_0x5fc7('0x2b')]=function(){var _0x19dad2=this;setInterval(function(){if(_0x19dad2[_0x5fc7('0x13')]){return ami[_0x5fc7('0x37')]({'action':_0x5fc7('0x65')})[_0x5fc7('0x66')](function(_0x1fdc5f){_0x19dad2[_0x5fc7('0x13')]=![];})[_0x5fc7('0x39')](function(_0x3d1391){logger[_0x5fc7('0x3c')]('[voiceQueueReport][queuesummary]',util[_0x5fc7('0x3e')](_0x3d1391,{'showHidden':![],'depth':null}));});}},0x3e8);};VoiceQueueReport[_0x5fc7('0x33')][_0x5fc7('0x67')]=function(_0x4d626d){try{if(this[_0x5fc7('0x61')](_0x4d626d)&&this[_0x5fc7('0x61')](_0x4d626d[_0x5fc7('0x68')])){logger[_0x5fc7('0x45')](_0x5fc7('0x69'),util[_0x5fc7('0x3e')](_0x4d626d,{'showHidden':![],'depth':null}));if(this['voiceQueues'][_0x4d626d['queue']]){logger['info'](_0x5fc7('0x6a'),_0x4d626d[_0x5fc7('0x68')]);var _0x4601d3=_['countBy'](this['channels'],_0x5fc7('0x68'))[_0x4d626d['queue']]||0x0;var _0x14db72=_0x4601d3-_0x4d626d[_0x5fc7('0x6b')];if(this[_0x5fc7('0x12')][_0x4d626d[_0x5fc7('0x68')]][_0x5fc7('0x59')]!==_[_0x5fc7('0x6c')](_0x4d626d['callers'])||this['voiceQueues'][_0x4d626d['queue']][_0x5fc7('0x51')]!==_[_0x5fc7('0x6c')](_0x4d626d[_0x5fc7('0x6d')])||this[_0x5fc7('0x12')][_0x4d626d[_0x5fc7('0x68')]][_0x5fc7('0x50')]!==_[_0x5fc7('0x6c')](_0x4d626d[_0x5fc7('0x50')])||this[_0x5fc7('0x12')][_0x4d626d['queue']][_0x5fc7('0x55')]!==_0x14db72){this[_0x5fc7('0x12')][_0x4d626d[_0x5fc7('0x68')]][_0x5fc7('0x59')]=_[_0x5fc7('0x6c')](_0x4d626d[_0x5fc7('0x6b')]);this[_0x5fc7('0x12')][_0x4d626d[_0x5fc7('0x68')]]['loggedIn']=_['toNumber'](_0x4d626d[_0x5fc7('0x6d')]);this['voiceQueues'][_0x4d626d[_0x5fc7('0x68')]][_0x5fc7('0x50')]=_['toNumber'](_0x4d626d[_0x5fc7('0x50')]);this['voiceQueues'][_0x4d626d[_0x5fc7('0x68')]][_0x5fc7('0x55')]=_0x14db72>0x0?_0x14db72:0x0;this[_0x5fc7('0x12')][_0x4d626d[_0x5fc7('0x68')]][_0x5fc7('0x55')]=this['voiceQueues'][_0x4d626d[_0x5fc7('0x68')]][_0x5fc7('0x55')]>_['toNumber'](_0x4d626d[_0x5fc7('0x6d')])?_[_0x5fc7('0x6c')](_0x4d626d['loggedin']):this[_0x5fc7('0x12')][_0x4d626d['queue']]['talking'];this['emitVoiceQueueSummary'](this[_0x5fc7('0x12')][_0x4d626d[_0x5fc7('0x68')]],'queuesummary');}logger[_0x5fc7('0x45')](_0x5fc7('0x6e'),util[_0x5fc7('0x3e')](this[_0x5fc7('0x12')][_0x4d626d[_0x5fc7('0x68')]],{'showHidden':![],'depth':null}));ami[_0x5fc7('0x47')](_0x5fc7('0x6f'),this[_0x5fc7('0x12')][_0x4d626d[_0x5fc7('0x68')]]);}}}catch(_0x58c761){logger['error'](_0x5fc7('0x70'),util['inspect'](_0x58c761,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x5fc7('0x33')]['syncQueueSummaryComplete']=function(_0xf5554){logger[_0x5fc7('0x45')](_0x5fc7('0x71'),util[_0x5fc7('0x3e')](_0xf5554,{'showHidden':![],'depth':null}));this[_0x5fc7('0x13')]=!![];};VoiceQueueReport[_0x5fc7('0x33')][_0x5fc7('0x19')]=function(_0x29fab1){try{if(this[_0x5fc7('0x61')](_0x29fab1)){logger[_0x5fc7('0x45')]('[%s][voiceQueueReport][queuecallerjoin]',_0x29fab1[_0x5fc7('0x46')],util[_0x5fc7('0x3e')](_0x29fab1,{'showHidden':![],'depth':null}));if(_[_0x5fc7('0x62')](this['queueReports'][_0x29fab1[_0x5fc7('0x46')]])){this[_0x5fc7('0xe')][_0x29fab1['uniqueid']]=[];this[_0x5fc7('0x10')][_0x29fab1[_0x5fc7('0x46')]]={};}var _0x443599=new QueueReport();_0x443599[_0x5fc7('0x49')]=_0x29fab1['queue'];_0x443599[_0x5fc7('0x57')]=this['voiceQueues'][_0x443599[_0x5fc7('0x49')]]&&this[_0x5fc7('0x12')][_0x443599[_0x5fc7('0x49')]]['type']?this[_0x5fc7('0x12')][_0x443599['name']][_0x5fc7('0x57')]||_0x5fc7('0x72'):_0x5fc7('0x72');_0x443599['queue']=_0x29fab1[_0x5fc7('0x68')];_0x443599[_0x5fc7('0x73')]=moment()[_0x5fc7('0x4b')](_0x5fc7('0x74'));_0x443599[_0x5fc7('0x75')]=_0x29fab1[_0x5fc7('0x75')];_0x443599[_0x5fc7('0x76')]=_0x29fab1[_0x5fc7('0x76')];_0x443599[_0x5fc7('0x46')]=_0x29fab1[_0x5fc7('0x46')];logger[_0x5fc7('0x77')]('[voiceQueueReport][queuecallerjoin]\x20name:%s\x20type:%s',_0x443599[_0x5fc7('0x49')],_0x443599[_0x5fc7('0x57')]);_[_0x5fc7('0x78')](_0x443599,_[_0x5fc7('0x79')](_0x29fab1,_[_0x5fc7('0x7a')](_0x443599)));this['queueReports'][_0x29fab1[_0x5fc7('0x46')]]['push'](_0x443599);this[_0x5fc7('0x10')][_0x29fab1['uniqueid']]=_0x443599;this['emitVoiceQueueChannelSave'](_0x443599,_0x5fc7('0x18'));}}catch(_0x6c4730){logger['error'](_0x5fc7('0x7b'),_0x29fab1[_0x5fc7('0x46')],util['inspect'](_0x6c4730,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x5fc7('0x33')][_0x5fc7('0x1b')]=function(_0x5b59a8){try{if(this['isNotNull'](_0x5b59a8)){logger[_0x5fc7('0x45')]('[%s][voiceQueueReport][queuecallerabandon]',_0x5b59a8[_0x5fc7('0x46')],util[_0x5fc7('0x3e')](_0x5b59a8,{'showHidden':![],'depth':null}));if(this[_0x5fc7('0xe')][_0x5b59a8[_0x5fc7('0x46')]]){var _0x1f337d=_[_0x5fc7('0x7c')](this[_0x5fc7('0xe')][_0x5b59a8[_0x5fc7('0x46')]]);_0x1f337d['queuecallercomplete']=![];_0x1f337d[_0x5fc7('0x7d')]=null;_0x1f337d[_0x5fc7('0x7e')]=_0x5b59a8[_0x5fc7('0x7e')];_0x1f337d[_0x5fc7('0x7f')]=_0x5b59a8[_0x5fc7('0x7f')];_0x1f337d[_0x5fc7('0x1a')]=!![];_0x1f337d[_0x5fc7('0x80')]=moment()[_0x5fc7('0x4b')](_0x5fc7('0x74'));_0x1f337d['queuecallerexitreason']='ABANDONED';_0x1f337d[_0x5fc7('0x81')]=null;logger[_0x5fc7('0x77')](_0x5fc7('0x82'),_0x1f337d[_0x5fc7('0x49')],_0x1f337d[_0x5fc7('0x57')]);this[_0x5fc7('0x10')][_0x5b59a8[_0x5fc7('0x46')]]=_0x1f337d;this[_0x5fc7('0x42')](_0x1f337d,_0x5fc7('0x1a'));}}}catch(_0x3e7db8){logger[_0x5fc7('0x3c')](_0x5fc7('0x83'),_0x5b59a8['uniqueid'],util['inspect'](_0x3e7db8,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x5fc7('0x33')][_0x5fc7('0x84')]=function(_0x2f0937){try{if(this[_0x5fc7('0x61')](_0x2f0937)){logger[_0x5fc7('0x45')](_0x5fc7('0x85'),_0x2f0937[_0x5fc7('0x46')],util[_0x5fc7('0x3e')](_0x2f0937,{'showHidden':![],'depth':null}));if(this[_0x5fc7('0xe')][_0x2f0937['uniqueid']]){var _0x312232=_[_0x5fc7('0x7c')](this['queueReports'][_0x2f0937[_0x5fc7('0x46')]]);_0x312232[_0x5fc7('0x86')]=moment()['format'](_0x5fc7('0x74'));_0x312232[_0x5fc7('0x87')]=_0x2f0937[_0x5fc7('0x87')];_0x312232[_0x5fc7('0x88')]=_0x2f0937[_0x5fc7('0x88')];logger['info'](_0x5fc7('0x89'),_0x312232[_0x5fc7('0x49')],_0x312232[_0x5fc7('0x57')],_0x2f0937['connectedlinenum'],_0x2f0937[_0x5fc7('0x88')]);this[_0x5fc7('0x10')][_0x2f0937[_0x5fc7('0x46')]]=_0x312232;this[_0x5fc7('0x44')](_0x312232,_0x5fc7('0x1c'));}}}catch(_0x8bd1b7){logger['error'](_0x5fc7('0x85'),_0x2f0937[_0x5fc7('0x46')],util[_0x5fc7('0x3e')](_0x8bd1b7,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x5fc7('0x33')][_0x5fc7('0x1f')]=function(_0x2f7d31){try{if(this[_0x5fc7('0x61')](_0x2f7d31)){logger[_0x5fc7('0x45')](_0x5fc7('0x8a'),_0x2f7d31['uniqueid'],util['inspect'](_0x2f7d31,{'showHidden':![],'depth':null}));if(this[_0x5fc7('0xe')][_0x2f7d31[_0x5fc7('0x46')]]){var _0x264ae6=_['last'](this[_0x5fc7('0xe')][_0x2f7d31[_0x5fc7('0x46')]]);_0x264ae6[_0x5fc7('0x8b')]=!![];_0x264ae6[_0x5fc7('0x8c')]=_0x5fc7('0x8d');logger[_0x5fc7('0x77')](_0x5fc7('0x8e'),_0x264ae6[_0x5fc7('0x49')],_0x264ae6['type']);}}}catch(_0x135ead){logger[_0x5fc7('0x3c')]('[%s][voiceQueueReport][agentconnect]',_0x2f7d31[_0x5fc7('0x46')],util[_0x5fc7('0x3e')](_0x135ead,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x5fc7('0x33')][_0x5fc7('0x8f')]=function(_0x3f6da5){try{if(this[_0x5fc7('0x61')](_0x3f6da5)){logger[_0x5fc7('0x45')](_0x5fc7('0x90'),_0x3f6da5['uniqueid'],util[_0x5fc7('0x3e')](_0x3f6da5,{'showHidden':![],'depth':null}));if(this[_0x5fc7('0xe')][_0x3f6da5[_0x5fc7('0x46')]]){var _0x389b33=_[_0x5fc7('0x7c')](this[_0x5fc7('0xe')][_0x3f6da5[_0x5fc7('0x46')]]);_0x389b33[_0x5fc7('0x1a')]=![];_0x389b33[_0x5fc7('0x80')]=null;_0x389b33['assigned']=!![];_0x389b33['lastAssignedTo']=_0x3f6da5['membername'];_0x389b33[_0x5fc7('0x7e')]=_0x3f6da5[_0x5fc7('0x7e')];_0x389b33[_0x5fc7('0x8b')]=!![];_0x389b33[_0x5fc7('0x91')]=![];_0x389b33[_0x5fc7('0x92')]=null;if(!_0x389b33[_0x5fc7('0x93')]){if(_0x3f6da5[_0x5fc7('0x94')]==_0x5fc7('0x93')){_0x389b33[_0x5fc7('0x8c')]='COMPLETED';logger[_0x5fc7('0x77')](_0x5fc7('0x95'),_0x389b33[_0x5fc7('0x49')],_0x389b33[_0x5fc7('0x57')]);}else{if(_[_0x5fc7('0x96')](_0x3f6da5[_0x5fc7('0x38')][_0x5fc7('0x97')](),_0x5fc7('0x98'))){if(this[_0x5fc7('0xe')][_0x3f6da5[_0x5fc7('0x99')]]){var _0xed276b=_[_0x5fc7('0x7c')](this[_0x5fc7('0xe')][_0x3f6da5[_0x5fc7('0x99')]]);_0xed276b[_0x5fc7('0x8b')]=![];_0xed276b[_0x5fc7('0x91')]=!![];_0xed276b['queuecallerexitAt']=moment(_0x389b33[_0x5fc7('0x73')])[_0x5fc7('0x9a')](_0x3f6da5[_0x5fc7('0x7e')],'seconds')[_0x5fc7('0x4b')](_0x5fc7('0x74'));_0xed276b[_0x5fc7('0x8c')]=_0x5fc7('0x9b');_0xed276b[_0x5fc7('0x93')]=!![];_0xed276b['transfertype']=_0x5fc7('0x9c');_0xed276b[_0x5fc7('0x9d')]=_0x3f6da5[_0x5fc7('0x9e')];_0xed276b['transferuniqueid']=_0x3f6da5[_0x5fc7('0x46')];logger['info'](_0x5fc7('0x9f'),_0xed276b[_0x5fc7('0x49')],_0xed276b[_0x5fc7('0x57')]);var _0x9706a5=this[_0x5fc7('0xe')][_0x3f6da5[_0x5fc7('0x99')]];this['queueReports'][_0x3f6da5['linkedid']]=this[_0x5fc7('0xe')][_0x3f6da5['uniqueid']];this['queueReports'][_0x3f6da5[_0x5fc7('0x46')]]=_0x9706a5;}}else{_0x389b33[_0x5fc7('0x8c')]=_0x5fc7('0xa0')+_0x3f6da5[_0x5fc7('0x94')][_0x5fc7('0xa1')]();logger['info']('[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:%s',_0x389b33[_0x5fc7('0x49')],_0x389b33[_0x5fc7('0x57')],_0x389b33[_0x5fc7('0x8c')]);}}}this[_0x5fc7('0x10')][_0x3f6da5[_0x5fc7('0x46')]]=_0x389b33;this[_0x5fc7('0x42')](_0x389b33,_0x5fc7('0x1d'));}}}catch(_0x531258){logger['error'](_0x5fc7('0x90'),_0x3f6da5[_0x5fc7('0x46')],util[_0x5fc7('0x3e')](_0x531258,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x5fc7('0x33')]['syncVarSet']=function(_0x2e0d2e){try{if(this[_0x5fc7('0x61')](_0x2e0d2e)){logger[_0x5fc7('0x45')](_0x5fc7('0xa2'),_0x2e0d2e[_0x5fc7('0x46')],util[_0x5fc7('0x3e')](_0x2e0d2e,{'showHidden':![],'depth':null}));this[_0x5fc7('0xa3')](_0x2e0d2e['uniqueid'],_['keys'](_0x2e0d2e['variable'])[0x0],_0x2e0d2e[_0x5fc7('0xa4')]);if(this[_0x5fc7('0xe')][_0x2e0d2e[_0x5fc7('0x46')]]){var _0x13d17b=_[_0x5fc7('0x7c')](this[_0x5fc7('0xe')][_0x2e0d2e[_0x5fc7('0x46')]]);if(_0x13d17b){if(this[_0x5fc7('0x61')](_0x2e0d2e[_0x5fc7('0xa5')])&&this['isNotNull'](_0x2e0d2e[_0x5fc7('0xa5')]['queuestatus'])){switch(_0x2e0d2e[_0x5fc7('0xa4')]){case _0x5fc7('0xa6'):_0x13d17b[_0x5fc7('0x91')]=![];_0x13d17b[_0x5fc7('0x92')]=null;break;case _0x5fc7('0xa7'):_0x13d17b[_0x5fc7('0xa8')]='timeout';_0x13d17b[_0x5fc7('0x91')]=!![];_0x13d17b['queuecallerexitAt']=moment()[_0x5fc7('0x4b')](_0x5fc7('0x74'));_0x13d17b['queuecallerleaveAt']=moment()[_0x5fc7('0x4b')](_0x5fc7('0x74'));logger[_0x5fc7('0x45')](_0x5fc7('0xa9'),_0x2e0d2e['uniqueid'],util[_0x5fc7('0x3e')](_0x13d17b,{'showHidden':![],'depth':null}));ami[_0x5fc7('0x47')]('custom:timeout',_0x13d17b);break;default:_0x13d17b[_0x5fc7('0x91')]=!![];_0x13d17b['queuecallerexitAt']=moment()[_0x5fc7('0x4b')]('YYYY-MM-DD\x20HH:mm:ss');_0x13d17b[_0x5fc7('0x86')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}_0x13d17b[_0x5fc7('0x1a')]=![];_0x13d17b['queuecallerabandonAt']=null;_0x13d17b['queuecallerexitreason']=_0x2e0d2e[_0x5fc7('0xa4')];this[_0x5fc7('0x10')][_0x2e0d2e['uniqueid']]=_0x13d17b;this[_0x5fc7('0x42')](_0x13d17b,_0x5fc7('0x20'));}else if(this[_0x5fc7('0x61')](_0x2e0d2e['variable'])&&this[_0x5fc7('0x61')](_0x2e0d2e[_0x5fc7('0xa5')]['queueposition'])){if(!_0x13d17b[_0x5fc7('0x1a')]){_0x13d17b[_0x5fc7('0x91')]=!![];_0x13d17b[_0x5fc7('0x92')]=moment()['format'](_0x5fc7('0x74'));_0x13d17b['queuecallerexitreason']=_0x5fc7('0xaa');_0x13d17b['queuecallerleaveAt']=moment()[_0x5fc7('0x4b')](_0x5fc7('0x74'));this[_0x5fc7('0x10')][_0x2e0d2e[_0x5fc7('0x46')]]=_0x13d17b;}}logger[_0x5fc7('0x77')](_0x5fc7('0xab'),_0x2e0d2e[_0x5fc7('0x46')],_0x13d17b[_0x5fc7('0x49')],_0x13d17b[_0x5fc7('0x57')],_[_0x5fc7('0x7a')](_0x2e0d2e['variable'])[0x0],_0x2e0d2e['value']);_0x13d17b[_0x5fc7('0x15')]=this[_0x5fc7('0x15')][_0x2e0d2e[_0x5fc7('0x46')]];}}}}catch(_0x4cb072){logger['error']('[%s][voiceQueueReport][varset]',_0x2e0d2e[_0x5fc7('0x46')],util[_0x5fc7('0x3e')](_0x4cb072,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x5fc7('0x33')][_0x5fc7('0xa3')]=function(_0x4e9dbd,_0x5bc9cc,_0x3d98b2){var _0x4f16fc=[_0x5fc7('0xac'),_0x5fc7('0xad'),_0x5fc7('0xae'),_0x5fc7('0xaf'),_0x5fc7('0xb0'),_0x5fc7('0xb1'),_0x5fc7('0xb2'),_0x5fc7('0xb3'),_0x5fc7('0xb4'),_0x5fc7('0xb5'),_0x5fc7('0xb6'),'bridgepvtcallid','membercalls','memberdynamic',_0x5fc7('0xb7'),_0x5fc7('0xb8'),'membername',_0x5fc7('0xb9'),'memberrealtime'];if(!_[_0x5fc7('0x36')](_0x5bc9cc)&&!_[_0x5fc7('0xba')](_0x4f16fc,_0x5bc9cc)){if(_['isUndefined'](this['variables'][_0x4e9dbd])){this[_0x5fc7('0x15')][_0x4e9dbd]={};}this[_0x5fc7('0x15')][_0x4e9dbd][_0x5bc9cc]=_0x3d98b2;}};VoiceQueueReport[_0x5fc7('0x33')]['syncHangup']=function(_0x4833e4){try{if(this[_0x5fc7('0x61')](_0x4833e4)){logger[_0x5fc7('0x45')](_0x5fc7('0xbb'),_0x4833e4['uniqueid'],util[_0x5fc7('0x3e')](_0x4833e4,{'showHidden':![],'depth':null}));if(this[_0x5fc7('0xe')][_0x4833e4[_0x5fc7('0x46')]]){for(var _0x470a86=0x0,_0x9d95f3={};_0x470a86<this[_0x5fc7('0xe')][_0x4833e4['uniqueid']]['length'];_0x470a86+=0x1){_0x9d95f3=this[_0x5fc7('0xe')][_0x4833e4[_0x5fc7('0x46')]][_0x470a86];if(this[_0x5fc7('0x12')][_0x9d95f3[_0x5fc7('0x68')]]){if(_0x9d95f3[_0x5fc7('0x91')]&&_0x9d95f3['transfer']!=!![]){this['voiceQueues'][_0x9d95f3[_0x5fc7('0x68')]][_0x5fc7('0x58')]+=0x1;}if(_0x9d95f3[_0x5fc7('0x1a')]){this[_0x5fc7('0x12')][_0x9d95f3[_0x5fc7('0x68')]][_0x5fc7('0xbc')]+=0x1;}this[_0x5fc7('0x12')][_0x9d95f3['queue']][_0x5fc7('0x54')]+=moment(_0x9d95f3[_0x5fc7('0x86')])[_0x5fc7('0xbd')](_0x9d95f3[_0x5fc7('0x73')],'seconds')||0x0;if(_0x470a86===this['queueReports'][_0x4833e4[_0x5fc7('0x46')]]['length']-0x1){this['voiceQueues'][_0x9d95f3[_0x5fc7('0x68')]][_0x5fc7('0x53')]+=moment()[_0x5fc7('0xbe')](0x0)[_0x5fc7('0xbd')](_0x9d95f3[_0x5fc7('0x73')],_0x5fc7('0xbf'));this[_0x5fc7('0x12')][_0x9d95f3[_0x5fc7('0x68')]]['total']+=0x1;if(_0x9d95f3[_0x5fc7('0x8b')]){this['voiceQueues'][_0x9d95f3[_0x5fc7('0x68')]][_0x5fc7('0x4f')]+=0x1;this[_0x5fc7('0x12')][_0x9d95f3['queue']][_0x5fc7('0x52')]+=moment()['milliseconds'](0x0)[_0x5fc7('0xbd')](_0x9d95f3[_0x5fc7('0x86')],_0x5fc7('0xbf'));_0x9d95f3[_0x5fc7('0x7d')]=moment()['format'](_0x5fc7('0x74'));_0x9d95f3[_0x5fc7('0x91')]=![];_0x9d95f3[_0x5fc7('0x92')]=null;}if(_0x9d95f3[_0x5fc7('0x91')]&&_0x9d95f3['transfer']!=!![]){_0x9d95f3[_0x5fc7('0xa8')]=_0x5fc7('0x58');logger[_0x5fc7('0x45')]('[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerunmanaged\x20event:',_0x4833e4[_0x5fc7('0x46')],util[_0x5fc7('0x3e')](_0x9d95f3,{'showHidden':![],'depth':null}));ami['emit'](_0x5fc7('0xc0'),_0x9d95f3);}if(_0x9d95f3[_0x5fc7('0x1a')]){_0x9d95f3[_0x5fc7('0xa8')]=_0x5fc7('0xbc');logger[_0x5fc7('0x45')](_0x5fc7('0xc1'),_0x4833e4[_0x5fc7('0x46')],util[_0x5fc7('0x3e')](_0x9d95f3,{'showHidden':![],'depth':null}));ami[_0x5fc7('0x47')](_0x5fc7('0xc2'),_0x9d95f3);}}else{this[_0x5fc7('0x12')][_0x9d95f3[_0x5fc7('0x68')]][_0x5fc7('0x53')]+=this[_0x5fc7('0x12')][_0x9d95f3[_0x5fc7('0x68')]][_0x5fc7('0x54')];}logger[_0x5fc7('0x77')](_0x5fc7('0xc3'),_0x4833e4[_0x5fc7('0x46')],_0x9d95f3[_0x5fc7('0x49')],_0x9d95f3[_0x5fc7('0x57')],_0x4833e4[_0x5fc7('0xc4')]);this[_0x5fc7('0x10')][_0x4833e4[_0x5fc7('0x46')]]=_0x9d95f3;this[_0x5fc7('0x42')](_0x9d95f3,_0x5fc7('0x21'));this[_0x5fc7('0x4d')](this[_0x5fc7('0x12')][_0x9d95f3['queue']],_0x5fc7('0x21'));}}logger[_0x5fc7('0x45')](_0x5fc7('0xc5'),_0x4833e4[_0x5fc7('0x46')],util[_0x5fc7('0x3e')](this['queueReports'][_0x4833e4[_0x5fc7('0x46')]],{'showHidden':![],'depth':null}));ami['emit'](_0x5fc7('0xc6'),this[_0x5fc7('0xe')][_0x4833e4[_0x5fc7('0x46')]]);delete this[_0x5fc7('0xe')][_0x4833e4[_0x5fc7('0x46')]];delete this[_0x5fc7('0x10')][_0x4833e4['uniqueid']];}if(this[_0x5fc7('0x15')][_0x4833e4['uniqueid']]){delete this[_0x5fc7('0x15')][_0x4833e4[_0x5fc7('0x46')]];}}}catch(_0xed5bc4){logger[_0x5fc7('0x3c')](_0x5fc7('0xbb'),_0x4833e4[_0x5fc7('0x46')],util[_0x5fc7('0x3e')](_0xed5bc4,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x5fc7('0x29')]=function(_0x250e0b){try{if(this[_0x5fc7('0x61')](_0x250e0b)){logger['debug']('[%s][voiceQueueReport][attendedtransfer]',_0x250e0b[_0x5fc7('0x46')],util['inspect'](_0x250e0b,{'showHidden':![],'depth':null}));var _0x14785a;if(this[_0x5fc7('0xe')][_0x250e0b[_0x5fc7('0xc7')]]){_0x14785a=_[_0x5fc7('0x7c')](this[_0x5fc7('0xe')][_0x250e0b[_0x5fc7('0xc7')]]);_0x14785a[_0x5fc7('0x9d')]=_0x250e0b['secondtransfererexten'];_0x14785a['transferuniqueid']=_0x250e0b[_0x5fc7('0xc8')];_0x14785a['queuecallerexitreason']=_0x5fc7('0xc9');_0x14785a[_0x5fc7('0x93')]=!![];_0x14785a[_0x5fc7('0xca')]=_0x5fc7('0xcb');if(this['queueReports'][_0x250e0b[_0x5fc7('0xc8')]]){var _0x574cb0=this[_0x5fc7('0xe')][_0x250e0b[_0x5fc7('0xc8')]];this[_0x5fc7('0xe')][_0x250e0b['secondtransfereruniqueid']]=this[_0x5fc7('0xe')][_0x250e0b['transfereeuniqueid']];this['queueReports'][_0x250e0b['transfereeuniqueid']]=_0x574cb0;var _0x5df665=_[_0x5fc7('0x7c')](this[_0x5fc7('0xe')][_0x250e0b[_0x5fc7('0xc7')]]);_0x5df665[_0x5fc7('0x35')]=!![];}logger['info']('[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s',_0x250e0b[_0x5fc7('0x46')],_0x14785a[_0x5fc7('0x49')],_0x14785a[_0x5fc7('0x57')],_0x14785a[_0x5fc7('0x9d')],_0x14785a[_0x5fc7('0xcc')]);}else if(this['queueReports'][_0x250e0b[_0x5fc7('0xcd')]]){_0x14785a=_[_0x5fc7('0x7c')](this['queueReports'][_0x250e0b[_0x5fc7('0xcd')]]);_0x14785a[_0x5fc7('0x9d')]=_0x250e0b['origtransfererexten'];_0x14785a[_0x5fc7('0xcc')]=_0x250e0b[_0x5fc7('0xce')];_0x14785a['queuecallerexitreason']=_0x5fc7('0xc9');_0x14785a['transfer']=!![];_0x14785a['transfertype']=_0x5fc7('0xcb');if(this[_0x5fc7('0xe')][_0x250e0b[_0x5fc7('0xce')]]){var _0x574cb0=this[_0x5fc7('0xe')][_0x250e0b[_0x5fc7('0xce')]];this['queueReports'][_0x250e0b[_0x5fc7('0xce')]]=this[_0x5fc7('0xe')][_0x250e0b['transfertargetuniqueid']];this[_0x5fc7('0xe')][_0x250e0b['transfertargetuniqueid']]=_0x574cb0;var _0x5df665=_[_0x5fc7('0x7c')](this['queueReports'][_0x250e0b[_0x5fc7('0xcd')]]);_0x5df665[_0x5fc7('0x35')]=!![];}logger[_0x5fc7('0x77')](_0x5fc7('0xcf'),_0x250e0b[_0x5fc7('0x46')],_0x14785a[_0x5fc7('0x49')],_0x14785a[_0x5fc7('0x57')],_0x14785a[_0x5fc7('0x9d')],_0x14785a[_0x5fc7('0xcc')]);}}}catch(_0x103a3e){logger[_0x5fc7('0x3c')]('[%s][voiceQueueReport][attendedtransfer]',_0x250e0b[_0x5fc7('0x46')],util[_0x5fc7('0x3e')](_0x103a3e,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x5fc7('0x33')][_0x5fc7('0xd0')]=function(_0xa08b0c){try{if(this[_0x5fc7('0x61')](_0xa08b0c)){logger[_0x5fc7('0x45')](_0x5fc7('0xd1'),_0xa08b0c[_0x5fc7('0x46')],util[_0x5fc7('0x3e')](_0xa08b0c,{'showHidden':![],'depth':null}));if(this[_0x5fc7('0xe')][_0xa08b0c[_0x5fc7('0xc7')]]){var _0x1c4f8d=_[_0x5fc7('0x7c')](this[_0x5fc7('0xe')][_0xa08b0c[_0x5fc7('0xc7')]]);_0x1c4f8d[_0x5fc7('0x8c')]=_0x5fc7('0xd2');_0x1c4f8d[_0x5fc7('0x93')]=!![];_0x1c4f8d[_0x5fc7('0xca')]='BLIND';_0x1c4f8d[_0x5fc7('0x9d')]=_0xa08b0c['extension'];_0x1c4f8d[_0x5fc7('0xcc')]=_0xa08b0c[_0x5fc7('0xc7')];logger[_0x5fc7('0x77')]('[%s][voiceQueueReport][blindTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s',_0xa08b0c[_0x5fc7('0x46')],_0x1c4f8d[_0x5fc7('0x49')],_0x1c4f8d[_0x5fc7('0x57')],_0x1c4f8d[_0x5fc7('0x9d')],_0x1c4f8d[_0x5fc7('0xcc')]);this[_0x5fc7('0x22')]({'event':_0x5fc7('0xd3'),'uniqueid':_0xa08b0c['transfereeuniqueid'],'context':_0xa08b0c[_0x5fc7('0xd4')],'channel':_0xa08b0c['transfererchannel']});}}}catch(_0x43246a){logger['error'](_0x5fc7('0xd1'),_0xa08b0c['uniqueid'],util[_0x5fc7('0x3e')](_0x43246a,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x5fc7('0x33')]['syncMusicOnHoldStart']=function(_0x4dc7da){try{if(this[_0x5fc7('0x61')](_0x4dc7da)){logger[_0x5fc7('0x45')](_0x5fc7('0xd5'),_0x4dc7da['uniqueid'],util[_0x5fc7('0x3e')](_0x4dc7da,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x4dc7da[_0x5fc7('0x46')]]){var _0x394742=_[_0x5fc7('0x7c')](this[_0x5fc7('0xe')][_0x4dc7da[_0x5fc7('0x46')]]);if(!_[_0x5fc7('0x36')](_0x394742[_0x5fc7('0x86')])){_0x394742[_0x5fc7('0xd6')]=moment()[_0x5fc7('0x4b')](_0x5fc7('0x74'));logger[_0x5fc7('0x77')](_0x5fc7('0xd7'),_0x4dc7da[_0x5fc7('0x46')],_0x394742[_0x5fc7('0xd6')]);}}}}catch(_0x5a725f){logger[_0x5fc7('0x3c')](_0x5fc7('0xd5'),_0x4dc7da[_0x5fc7('0x46')],util[_0x5fc7('0x3e')](_0x5a725f,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x5fc7('0x33')][_0x5fc7('0x27')]=function(_0x17a457){try{if(this[_0x5fc7('0x61')](_0x17a457)){logger[_0x5fc7('0x45')]('[%s][voiceQueueReport][musiconholdstop]',_0x17a457['uniqueid'],util[_0x5fc7('0x3e')](_0x17a457,{'showHidden':![],'depth':null}));if(this[_0x5fc7('0xe')][_0x17a457[_0x5fc7('0x46')]]){var _0x35678a=_[_0x5fc7('0x7c')](this[_0x5fc7('0xe')][_0x17a457['uniqueid']]);if(!_[_0x5fc7('0x36')](_0x35678a[_0x5fc7('0xd6')])){_0x35678a[_0x5fc7('0xd8')]+=moment()['milliseconds'](0x0)[_0x5fc7('0xbd')](_0x35678a[_0x5fc7('0xd6')],_0x5fc7('0xbf'));logger['info']('[%s][voiceQueueReport][musiconholdstop]\x20mohtime:%s',_0x17a457[_0x5fc7('0x46')],_0x35678a[_0x5fc7('0xd8')]);delete _0x35678a[_0x5fc7('0xd6')];}}}}catch(_0x1be34a){logger['error']('[%s][voiceQueueReport][musiconholdstop]',_0x17a457[_0x5fc7('0x46')],util[_0x5fc7('0x3e')](_0x1be34a,{'showHidden':![],'depth':null}));}};module[_0x5fc7('0xd9')]=VoiceQueueReport;