Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / services / ami / report / voiceAgentReport.js
index 7f35f78..5738737 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x97c6=['attendedtransfer','syncBlindTransfer','prototype','emit','isNotNull','isUndefined','info','uniqueid','membername','debug','channels','destuniqueid','format','YYYY-MM-DD\x20HH:mm:ss','called','queue','mandatoryDisposition','type','inbound','variables','voice','merge','omit','privilege','[%s][voiceAgentReport][agentcalled]\x20sending\x20agentcalled\x20event:','inspect','custom:agentcalled','interface','[%s][voiceAgentReport][agentcalled]\x20sending\x20user:called\x20event:','user:%s','user:called','error','[%s][voiceAgentReport][agentcalled]','[%s][voiceAgentReport][agentconnect]\x20event:','hasOwnProperty','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect','agentconnectAt','connectedlinename','connectedlinenum','destchannelstate','destchannelstatedesc','holdtime','lastevent','connect','routealias','pick','destconnectedlinenum','user:agentconnect','agentcomplete','agentringnoanswerAt','answeredelsewheredestinationuniqueid','answeredelsewheremembername','answered_elsewhere','custom:agentansweredelsewhere','[%s][voiceAgentReport][agentringnoanswer]\x20event:','rejected','reason','[%s][voiceAgentReport][agentringnoanswer]\x20sending\x20agentringnoanswer\x20event:','custom:agentringnoanswer','[%s][voiceAgentReport][queuecallerabandon]\x20event:','abandoned','[%s][voiceAgentReport][queuecallerabandon]\x20sending\x20agentqueuecallerabandon\x20event:','[%s][voiceAgentReport][queuecallerabandon]','agentcompleteAt','complete','transfer','agent','talktime','acwtime','agentacw','[%s][voiceAgentReport][agentcomplete]\x20sending\x20agentcomplete\x20event:','custom:agentcomplete','destaccountcode','user:agentcomplete','[%s][voiceAgentReport][agentcomplete]','[%s][voiceAgentReport][varset]\x20event:','addVariable','value','[%s][voiceAgentReport][varset]\x20destuniqueid:%s\x20variable:%s\x20value:%s','keys','variable','[%s][voiceAgentReport][varset]','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqoslossbridged','rtpaudioqosrttbridged','sipuri','bridgepeer','membercalls','memberinterface','memberlastcall','memberpenalty','memberrealtime','includes','[%s][voiceAgentReport][hangup]\x20destuniqueid:%s','[%s][voiceAgentReport][hangup]\x20sending\x20voiceAgentReport\x20event:','values','custom:voiceAgentReport','[%s][voiceAgentReport][hangup]','syncAttendedTransfer','[%s][voiceAgentReport][attendedtransfer]\x20event:','transfereeuniqueid','origtransfereruniqueid','[%s][voiceAgentReport][attendedtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','diff','secondtransfereruniqueid','[%s][voiceAgentReport][attendedtransfer]','[%s][voiceAgentReport][blindtransfer]\x20event:','transfereruniqueid','[%s][voiceAgentReport][blindtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','seconds','[%s][voiceAgentReport][blindtransfer]','syncMusicOnHoldStart','[%s][voiceAgentReport][musiconholdstart]\x20event:','channel','substring','onhold','[%s][voiceAgentReport][musiconholdstart]','syncMusicOnHoldStop','[%s][voiceAgentReport][musiconholdstop]\x20interface:%s','exports','lodash','util','ioredis','../../../config/environment','ami','../ami','redis','defaults','localhost','socket.io-emitter','voiceChannels','voiceQueues','agents','syncAgentCalled','bind','syncAgentConnect','agentringnoanswer','syncAgentRingNoAnswer','queuecallerabandon','syncQueueCallerAbandon','syncAgentComplete','varset','syncVarSet','hangup','musiconholdstart','musiconholdstop'];(function(_0x124298,_0x542004){var _0x35ac24=function(_0x49afe8){while(--_0x49afe8){_0x124298['push'](_0x124298['shift']());}};_0x35ac24(++_0x542004);}(_0x97c6,0x7a));var _0x697c=function(_0x3a94e1,_0x22e4fd){_0x3a94e1=_0x3a94e1-0x0;var _0x6a09d5=_0x97c6[_0x3a94e1];return _0x6a09d5;};'use strict';var _=require(_0x697c('0x0'));var moment=require('moment');var util=require(_0x697c('0x1'));var Redis=require(_0x697c('0x2'));var config=require(_0x697c('0x3'));var logger=require('../../../config/logger')(_0x697c('0x4'));var ami=require(_0x697c('0x5'));config[_0x697c('0x6')]=_[_0x697c('0x7')](config[_0x697c('0x6')],{'host':_0x697c('0x8'),'port':0x18eb});var io=require(_0x697c('0x9'))(new Redis(config[_0x697c('0x6')]));function VoiceAgentReport(_0x1bb83a){this['channels']={};this[_0x697c('0xa')]=_0x1bb83a['channels'];this[_0x697c('0xb')]=_0x1bb83a[_0x697c('0xb')];this[_0x697c('0xc')]=_0x1bb83a[_0x697c('0xc')];this['variables']={};ami['on']('agentcalled',this[_0x697c('0xd')][_0x697c('0xe')](this));ami['on']('agentconnect',this[_0x697c('0xf')][_0x697c('0xe')](this));ami['on'](_0x697c('0x10'),this[_0x697c('0x11')][_0x697c('0xe')](this));ami['on'](_0x697c('0x12'),this[_0x697c('0x13')][_0x697c('0xe')](this));ami['on']('agentcomplete',this[_0x697c('0x14')]['bind'](this));ami['on'](_0x697c('0x15'),this[_0x697c('0x16')][_0x697c('0xe')](this));ami['on'](_0x697c('0x17'),this['syncHangup'][_0x697c('0xe')](this));ami['on'](_0x697c('0x18'),this['syncMusicOnHoldStart'][_0x697c('0xe')](this));ami['on'](_0x697c('0x19'),this['syncMusicOnHoldStop'][_0x697c('0xe')](this));ami['on'](_0x697c('0x1a'),this['syncAttendedTransfer'][_0x697c('0xe')](this));ami['on']('blindtransfer',this[_0x697c('0x1b')][_0x697c('0xe')](this));}VoiceAgentReport[_0x697c('0x1c')][_0x697c('0x1d')]=function(_0x3e2ef9,_0x377542,_0x356dc3){io['to'](_0x3e2ef9)[_0x697c('0x1d')](_0x377542,_0x356dc3);};VoiceAgentReport[_0x697c('0x1c')][_0x697c('0x1e')]=function(_0x43766f){return _0x43766f!==null&&!_[_0x697c('0x1f')](_0x43766f);};VoiceAgentReport[_0x697c('0x1c')][_0x697c('0xd')]=function(_0x138575){try{if(this[_0x697c('0x1e')](_0x138575)){logger[_0x697c('0x20')]('[%s][voiceAgentReport][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called',_0x138575[_0x697c('0x21')],_0x138575[_0x697c('0x22')],_0x138575['destuniqueid']);logger[_0x697c('0x23')]('[%s][voiceAgentReport][agentcalled]\x20event:',_0x138575['uniqueid'],util['inspect'](_0x138575,{'showHidden':![],'depth':null}));if(_[_0x697c('0x1f')](this[_0x697c('0x24')][_0x138575[_0x697c('0x21')]])){this['channels'][_0x138575[_0x697c('0x21')]]={};}if(_['isUndefined'](this[_0x697c('0x24')][_0x138575[_0x697c('0x21')]][_0x138575[_0x697c('0x25')]])){this[_0x697c('0x24')][_0x138575['uniqueid']][_0x138575[_0x697c('0x25')]]={'agentcalledAt':moment()[_0x697c('0x26')](_0x697c('0x27')),'lastevent':_0x697c('0x28'),'mandatoryDisposition':this[_0x697c('0xb')][_0x138575['queue']]?this[_0x697c('0xb')][_0x138575[_0x697c('0x29')]][_0x697c('0x2a')]||![]:![],'type':this[_0x697c('0xb')][_0x138575[_0x697c('0x29')]]?this[_0x697c('0xb')][_0x138575['queue']][_0x697c('0x2b')]||_0x697c('0x2c'):_0x697c('0x2c'),'variables':this[_0x697c('0x2d')][_0x138575['uniqueid']],'motionChannel':_0x697c('0x2e')};}_[_0x697c('0x2f')](this[_0x697c('0x24')][_0x138575[_0x697c('0x21')]][_0x138575[_0x697c('0x25')]],_[_0x697c('0x30')](_0x138575,['event',_0x697c('0x31')]));logger['debug'](_0x697c('0x32'),_0x138575[_0x697c('0x21')],util[_0x697c('0x33')](this[_0x697c('0x24')][_0x138575[_0x697c('0x21')]][_0x138575['destuniqueid']],{'showHidden':![],'depth':null}));ami[_0x697c('0x1d')](_0x697c('0x34'),this[_0x697c('0x24')][_0x138575[_0x697c('0x21')]][_0x138575[_0x697c('0x25')]]);var _0x308b47={'id':this[_0x697c('0xc')][_0x138575[_0x697c('0x35')]]['id'],'calleridnum':this[_0x697c('0x24')][_0x138575[_0x697c('0x21')]][_0x138575[_0x697c('0x25')]]['calleridnum'],'queue':this['channels'][_0x138575['uniqueid']][_0x138575[_0x697c('0x25')]][_0x697c('0x29')],'variables':this[_0x697c('0x24')][_0x138575['uniqueid']][_0x138575[_0x697c('0x25')]]['variables']};logger[_0x697c('0x23')](_0x697c('0x36'),_0x138575[_0x697c('0x21')],util['inspect'](_0x308b47,{'showHidden':![],'depth':null}));this[_0x697c('0x1d')](util['format'](_0x697c('0x37'),_0x138575[_0x697c('0x22')]),_0x697c('0x38'),_0x308b47);}}catch(_0x17f695){logger[_0x697c('0x39')](_0x697c('0x3a'),_0x138575[_0x697c('0x21')],util[_0x697c('0x33')](_0x17f695,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x697c('0x1c')][_0x697c('0xf')]=function(_0x5302ec){try{if(this['isNotNull'](_0x5302ec)){if(this[_0x697c('0x24')][_0x5302ec['uniqueid']]){logger[_0x697c('0x23')](_0x697c('0x3b'),_0x5302ec[_0x697c('0x21')],util[_0x697c('0x33')](_0x5302ec,{'showHidden':![],'depth':null}));for(var _0x69536b in this[_0x697c('0x24')][_0x5302ec[_0x697c('0x21')]]){if(this[_0x697c('0x24')][_0x5302ec[_0x697c('0x21')]][_0x697c('0x3c')](_0x69536b)){if(_0x5302ec[_0x697c('0x25')]===_0x69536b){logger[_0x697c('0x20')](_0x697c('0x3d'),_0x5302ec[_0x697c('0x21')],_0x5302ec[_0x697c('0x22')],_0x5302ec['destuniqueid']);this[_0x697c('0x24')][_0x5302ec['uniqueid']][_0x69536b][_0x697c('0x3e')]=moment()[_0x697c('0x26')](_0x697c('0x27'));this[_0x697c('0x24')][_0x5302ec[_0x697c('0x21')]][_0x69536b]['connectedlinename']=_0x5302ec[_0x697c('0x3f')];this[_0x697c('0x24')][_0x5302ec[_0x697c('0x21')]][_0x69536b][_0x697c('0x40')]=_0x5302ec['connectedlinenum'];this[_0x697c('0x24')][_0x5302ec[_0x697c('0x21')]][_0x69536b][_0x697c('0x41')]=_0x5302ec[_0x697c('0x41')];this[_0x697c('0x24')][_0x5302ec['uniqueid']][_0x69536b][_0x697c('0x42')]=_0x5302ec['destchannelstatedesc'];this[_0x697c('0x24')][_0x5302ec[_0x697c('0x21')]][_0x69536b][_0x697c('0x43')]=_0x5302ec[_0x697c('0x43')];this['channels'][_0x5302ec[_0x697c('0x21')]][_0x69536b][_0x697c('0x44')]=_0x697c('0x45');if(this[_0x697c('0xa')][this[_0x697c('0x24')][_0x5302ec['uniqueid']][_0x69536b][_0x697c('0x21')]]){var _0x56fa80=this[_0x697c('0xa')][this['channels'][_0x5302ec[_0x697c('0x21')]][_0x69536b][_0x697c('0x21')]][_0x697c('0x46')];this[_0x697c('0x24')][_0x5302ec[_0x697c('0x21')]][_0x69536b]['routealias']=_0x56fa80;_0x5302ec[_0x697c('0x46')]=_0x56fa80;}_[_0x697c('0x2f')](this[_0x697c('0xc')][_0x5302ec[_0x697c('0x35')]],_[_0x697c('0x47')](_0x5302ec,[_0x697c('0x29'),_0x697c('0x48'),_0x697c('0x46')]));logger[_0x697c('0x23')]('[%s][voiceAgentReport][agentconnect]\x20sending\x20agentconnect\x20event:',_0x5302ec[_0x697c('0x21')],util[_0x697c('0x33')](this[_0x697c('0x24')][_0x5302ec[_0x697c('0x21')]][_0x5302ec[_0x697c('0x25')]],{'showHidden':![],'depth':null}));ami[_0x697c('0x1d')]('custom:agentconnect',this['channels'][_0x5302ec[_0x697c('0x21')]][_0x5302ec[_0x697c('0x25')]]);logger[_0x697c('0x23')]('[%s][voiceAgentReport][agentcalled]\x20sending\x20user:agentconnect\x20event:',_0x5302ec[_0x697c('0x21')],util[_0x697c('0x33')](this['channels'][_0x5302ec[_0x697c('0x21')]][_0x5302ec[_0x697c('0x25')]],{'showHidden':![],'depth':null}));this[_0x697c('0x1d')](util[_0x697c('0x26')](_0x697c('0x37'),_0x5302ec[_0x697c('0x22')]),_0x697c('0x49'),this[_0x697c('0x24')][_0x5302ec[_0x697c('0x21')]][_0x5302ec[_0x697c('0x25')]]);}else if(!this[_0x697c('0x24')][_0x5302ec['uniqueid']][_0x69536b][_0x697c('0x10')]&&!this['channels'][_0x5302ec[_0x697c('0x21')]][_0x69536b][_0x697c('0x4a')]){logger[_0x697c('0x20')]('[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:answered_elsewhere',_0x5302ec[_0x697c('0x21')],this[_0x697c('0x24')][_0x5302ec[_0x697c('0x21')]][_0x69536b][_0x697c('0x22')],_0x69536b);this[_0x697c('0x24')][_0x5302ec['uniqueid']][_0x69536b]['agentringnoanswer']=!![];this[_0x697c('0x24')][_0x5302ec['uniqueid']][_0x69536b][_0x697c('0x4b')]=moment()[_0x697c('0x26')]('YYYY-MM-DD\x20HH:mm:ss');this[_0x697c('0x24')][_0x5302ec[_0x697c('0x21')]][_0x69536b][_0x697c('0x4c')]=_0x5302ec['destuniqueid'];this['channels'][_0x5302ec[_0x697c('0x21')]][_0x69536b][_0x697c('0x4d')]=_0x5302ec[_0x697c('0x22')];this[_0x697c('0x24')][_0x5302ec['uniqueid']][_0x69536b]['lastevent']=_0x697c('0x4e');this[_0x697c('0x24')][_0x5302ec[_0x697c('0x21')]][_0x69536b]['reason']=_0x697c('0x4e');logger[_0x697c('0x23')]('[%s][voiceAgentReport][agentconnect]\x20sending\x20agentansweredelsewhere\x20event:',_0x5302ec[_0x697c('0x21')],util['inspect'](this[_0x697c('0x24')][_0x5302ec[_0x697c('0x21')]][_0x69536b],{'showHidden':![],'depth':null}));ami[_0x697c('0x1d')](_0x697c('0x4f'),this[_0x697c('0x24')][_0x5302ec[_0x697c('0x21')]][_0x69536b]);}}}}}}catch(_0x2ed1ab){logger[_0x697c('0x39')]('[%s][voiceAgentReport][agentconnect]',_0x5302ec['uniqueid'],util[_0x697c('0x33')](_0x2ed1ab,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x697c('0x1c')][_0x697c('0x11')]=function(_0x313181){try{if(this[_0x697c('0x1e')](_0x313181)){logger[_0x697c('0x23')](_0x697c('0x50'),_0x313181[_0x697c('0x21')],util[_0x697c('0x33')](_0x313181,{'showHidden':![],'depth':null}));if(this[_0x697c('0x24')][_0x313181['uniqueid']]&&this[_0x697c('0x24')][_0x313181[_0x697c('0x21')]][_0x313181[_0x697c('0x25')]]){logger[_0x697c('0x20')]('[%s][voiceAgentReport][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:rejected',_0x313181['uniqueid'],_0x313181[_0x697c('0x22')],_0x313181[_0x697c('0x25')]);this[_0x697c('0x24')][_0x313181[_0x697c('0x21')]][_0x313181[_0x697c('0x25')]][_0x697c('0x10')]=!![];this[_0x697c('0x24')][_0x313181['uniqueid']][_0x313181['destuniqueid']][_0x697c('0x4b')]=moment()['format'](_0x697c('0x27'));this[_0x697c('0x24')][_0x313181[_0x697c('0x21')]][_0x313181[_0x697c('0x25')]]['lastevent']=_0x697c('0x51');this[_0x697c('0x24')][_0x313181[_0x697c('0x21')]][_0x313181['destuniqueid']][_0x697c('0x52')]=_0x697c('0x51');logger['debug'](_0x697c('0x53'),_0x313181[_0x697c('0x21')],util[_0x697c('0x33')](this[_0x697c('0x24')][_0x313181[_0x697c('0x21')]][_0x313181[_0x697c('0x25')]],{'showHidden':![],'depth':null}));ami[_0x697c('0x1d')](_0x697c('0x54'),this[_0x697c('0x24')][_0x313181[_0x697c('0x21')]][_0x313181[_0x697c('0x25')]]);}}}catch(_0x5a8e49){logger[_0x697c('0x39')]('[%s][voiceAgentReport][agentringnoanswer]',_0x313181[_0x697c('0x21')],util[_0x697c('0x33')](_0x5a8e49,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x697c('0x1c')]['syncQueueCallerAbandon']=function(_0x5590a6){try{if(this['isNotNull'](_0x5590a6)){logger[_0x697c('0x23')](_0x697c('0x55'),_0x5590a6[_0x697c('0x21')],util[_0x697c('0x33')](_0x5590a6,{'showHidden':![],'depth':null}));if(this[_0x697c('0x24')][_0x5590a6[_0x697c('0x21')]]){for(var _0x4f0652 in this[_0x697c('0x24')][_0x5590a6[_0x697c('0x21')]]){if(this['channels'][_0x5590a6[_0x697c('0x21')]][_0x697c('0x3c')](_0x4f0652)&&!this[_0x697c('0x24')][_0x5590a6[_0x697c('0x21')]][_0x4f0652][_0x697c('0x10')]&&!this[_0x697c('0x24')][_0x5590a6[_0x697c('0x21')]][_0x4f0652][_0x697c('0x4a')]){logger[_0x697c('0x20')]('[%s][voiceAgentReport][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned',_0x5590a6['uniqueid'],this[_0x697c('0x24')][_0x5590a6[_0x697c('0x21')]][_0x4f0652][_0x697c('0x22')],_0x4f0652);this[_0x697c('0x24')][_0x5590a6[_0x697c('0x21')]][_0x4f0652][_0x697c('0x10')]=!![];this[_0x697c('0x24')][_0x5590a6['uniqueid']][_0x4f0652][_0x697c('0x4b')]=moment()[_0x697c('0x26')](_0x697c('0x27'));this[_0x697c('0x24')][_0x5590a6[_0x697c('0x21')]][_0x4f0652]['lastevent']=_0x697c('0x56');this[_0x697c('0x24')][_0x5590a6['uniqueid']][_0x4f0652][_0x697c('0x52')]=_0x697c('0x56');logger['debug'](_0x697c('0x57'),_0x5590a6['uniqueid'],util['inspect'](this[_0x697c('0x24')][_0x5590a6[_0x697c('0x21')]][_0x4f0652],{'showHidden':![],'depth':null}));ami['emit']('custom:agentqueuecallerabandon',this['channels'][_0x5590a6[_0x697c('0x21')]][_0x4f0652]);}}}}}catch(_0x13763c){logger[_0x697c('0x39')](_0x697c('0x58'),_0x5590a6[_0x697c('0x21')],util[_0x697c('0x33')](_0x13763c,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x697c('0x1c')]['syncAgentComplete']=function(_0x3f10c1){try{if(this['isNotNull'](_0x3f10c1)){logger[_0x697c('0x23')]('[%s][voiceAgentReport][agentcomplete]\x20event:',_0x3f10c1[_0x697c('0x21')],util[_0x697c('0x33')](_0x3f10c1,{'showHidden':![],'depth':null}));if(this[_0x697c('0x24')][_0x3f10c1[_0x697c('0x21')]]){for(var _0x5aa370 in this[_0x697c('0x24')][_0x3f10c1[_0x697c('0x21')]]){if(this['channels'][_0x3f10c1['uniqueid']]['hasOwnProperty'](_0x5aa370)){if(this[_0x697c('0x24')][_0x3f10c1[_0x697c('0x21')]][_0x5aa370][_0x697c('0x3e')]&&!this[_0x697c('0x24')][_0x3f10c1[_0x697c('0x21')]][_0x5aa370]['agentcomplete']){logger[_0x697c('0x20')]('[%s][voiceAgentReport][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete',_0x3f10c1[_0x697c('0x21')],this[_0x697c('0x24')][_0x3f10c1[_0x697c('0x21')]][_0x5aa370]['membername'],_0x5aa370);this[_0x697c('0x24')][_0x3f10c1[_0x697c('0x21')]][_0x5aa370][_0x697c('0x4a')]=!![];this['channels'][_0x3f10c1[_0x697c('0x21')]][_0x5aa370][_0x697c('0x59')]=moment()['format'](_0x697c('0x27'));this[_0x697c('0x24')][_0x3f10c1['uniqueid']][_0x5aa370][_0x697c('0x44')]=_0x697c('0x5a');this['channels'][_0x3f10c1[_0x697c('0x21')]][_0x5aa370]['reason']=_0x3f10c1[_0x697c('0x52')]==_0x697c('0x5b')?_0x697c('0x5c'):_0x3f10c1[_0x697c('0x52')];this[_0x697c('0x24')][_0x3f10c1[_0x697c('0x21')]][_0x5aa370][_0x697c('0x5d')]=_0x3f10c1[_0x697c('0x5d')];if(this['voiceQueues'][_0x3f10c1[_0x697c('0x29')]]&&this[_0x697c('0xb')][_0x3f10c1[_0x697c('0x29')]]['acw']){this[_0x697c('0x24')][_0x3f10c1['uniqueid']][_0x5aa370][_0x697c('0x5e')]=this['voiceQueues'][_0x3f10c1[_0x697c('0x29')]]['acwTimeout'];this[_0x697c('0x24')][_0x3f10c1['uniqueid']][_0x5aa370][_0x697c('0x5f')]=!![];}this[_0x697c('0xc')][_0x3f10c1[_0x697c('0x35')]]=_['omit'](this[_0x697c('0xc')][_0x3f10c1[_0x697c('0x35')]],[_0x697c('0x29'),_0x697c('0x48')]);logger[_0x697c('0x23')](_0x697c('0x60'),_0x3f10c1[_0x697c('0x21')],util[_0x697c('0x33')](this[_0x697c('0x24')][_0x3f10c1[_0x697c('0x21')]][_0x5aa370],{'showHidden':![],'depth':null}));ami['emit'](_0x697c('0x61'),this[_0x697c('0x24')][_0x3f10c1['uniqueid']][_0x5aa370]);logger[_0x697c('0x23')]('[%s][voiceAgentReport][agentcomplete]\x20sending\x20user:agentcomplete\x20event:',_0x3f10c1['uniqueid'],util['inspect']({'id':this[_0x697c('0xc')][_0x3f10c1['interface']]['id'],'destaccountcode':_0x3f10c1[_0x697c('0x62')]},{'showHidden':![],'depth':null}));this[_0x697c('0x1d')](util[_0x697c('0x26')](_0x697c('0x37'),_0x3f10c1[_0x697c('0x22')]),_0x697c('0x63'),{'id':this[_0x697c('0xc')][_0x3f10c1[_0x697c('0x35')]]['id'],'destaccountcode':_0x3f10c1[_0x697c('0x62')]});}}}}}}catch(_0x16d3cc){logger[_0x697c('0x39')](_0x697c('0x64'),_0x3f10c1['uniqueid'],util[_0x697c('0x33')](_0x16d3cc,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x697c('0x1c')]['syncVarSet']=function(_0x3e258a){try{if(this[_0x697c('0x1e')](_0x3e258a)){logger[_0x697c('0x23')](_0x697c('0x65'),_0x3e258a[_0x697c('0x21')],util[_0x697c('0x33')](_0x3e258a,{'showHidden':![],'depth':null}));this[_0x697c('0x66')](_0x3e258a[_0x697c('0x21')],_['keys'](_0x3e258a['variable'])[0x0],_0x3e258a[_0x697c('0x67')]);if(this[_0x697c('0x24')][_0x3e258a[_0x697c('0x21')]]){for(var _0x529ae9 in this[_0x697c('0x24')][_0x3e258a['uniqueid']]){if(this['channels'][_0x3e258a[_0x697c('0x21')]][_0x697c('0x3c')](_0x529ae9)){logger['info'](_0x697c('0x68'),_0x3e258a[_0x697c('0x21')],_0x529ae9,_[_0x697c('0x69')](_0x3e258a[_0x697c('0x6a')])[0x0],_0x3e258a['value']);if(_['isUndefined'](this['channels'][_0x3e258a['uniqueid']][_0x529ae9][_0x697c('0x2d')])){this['channels'][_0x3e258a[_0x697c('0x21')]][_0x529ae9][_0x697c('0x2d')]={};}this[_0x697c('0x24')][_0x3e258a['uniqueid']][_0x529ae9][_0x697c('0x2d')]=this['variables'][_0x3e258a[_0x697c('0x21')]];}}}}}catch(_0x4172c8){logger[_0x697c('0x39')](_0x697c('0x6b'),_0x3e258a[_0x697c('0x21')],util['inspect'](_0x4172c8,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x697c('0x1c')][_0x697c('0x66')]=function(_0x1bab0c,_0x5f0f0c,_0x2c2e07){var _0x40f95b=['rtpaudioqos',_0x697c('0x6c'),_0x697c('0x6d'),_0x697c('0x6e'),'rtpaudioqosloss',_0x697c('0x6f'),'rtpaudioqosrtt',_0x697c('0x70'),'sipcallid',_0x697c('0x71'),_0x697c('0x72'),'bridgepvtcallid',_0x697c('0x73'),'memberdynamic',_0x697c('0x74'),_0x697c('0x75'),_0x697c('0x22'),_0x697c('0x76'),_0x697c('0x77')];if(!_['isNil'](_0x5f0f0c)&&!_[_0x697c('0x78')](_0x40f95b,_0x5f0f0c)){if(_[_0x697c('0x1f')](this[_0x697c('0x2d')][_0x1bab0c])){this[_0x697c('0x2d')][_0x1bab0c]={};}this['variables'][_0x1bab0c][_0x5f0f0c]=_0x2c2e07;}};VoiceAgentReport[_0x697c('0x1c')]['syncHangup']=function(_0x4a8024){try{if(this['isNotNull'](_0x4a8024)){logger['debug']('[%s][voiceAgentReport][hangup]\x20event:',_0x4a8024['uniqueid'],util['inspect'](_0x4a8024,{'showHidden':![],'depth':null}));if(this[_0x697c('0x24')][_0x4a8024[_0x697c('0x21')]]){for(var _0x3e7b74 in this['channels'][_0x4a8024[_0x697c('0x21')]]){if(this[_0x697c('0x24')][_0x4a8024['uniqueid']][_0x697c('0x3c')](_0x3e7b74)){if(this[_0x697c('0x24')][_0x4a8024[_0x697c('0x21')]][_0x3e7b74][_0x697c('0x52')]==_0x697c('0x5b')&&this[_0x697c('0x24')][_0x4a8024['uniqueid']][_0x3e7b74][_0x697c('0x4a')]){logger[_0x697c('0x20')](_0x697c('0x79'),_0x4a8024[_0x697c('0x21')],_0x3e7b74);this[_0x697c('0x24')][_0x4a8024['uniqueid']][_0x3e7b74][_0x697c('0x59')]=moment()[_0x697c('0x26')]('YYYY-MM-DD\x20HH:mm:ss');}}}logger[_0x697c('0x23')](_0x697c('0x7a'),_0x4a8024[_0x697c('0x21')],util['inspect'](_[_0x697c('0x7b')](this[_0x697c('0x24')][_0x4a8024[_0x697c('0x21')]]),{'showHidden':![],'depth':null}));ami['emit'](_0x697c('0x7c'),_[_0x697c('0x7b')](this[_0x697c('0x24')][_0x4a8024[_0x697c('0x21')]]));delete this['channels'][_0x4a8024[_0x697c('0x21')]];}if(this['variables'][_0x4a8024['uniqueid']]){delete this[_0x697c('0x2d')][_0x4a8024['uniqueid']];}}}catch(_0x419026){logger['error'](_0x697c('0x7d'),_0x4a8024[_0x697c('0x21')],util[_0x697c('0x33')](_0x419026,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x697c('0x1c')][_0x697c('0x7e')]=function(_0x6c6b8e){try{if(this['isNotNull'](_0x6c6b8e)){logger['debug'](_0x697c('0x7f'),_0x6c6b8e[_0x697c('0x21')],util[_0x697c('0x33')](_0x6c6b8e,{'showHidden':![],'depth':null}));if(this[_0x697c('0x24')][_0x6c6b8e[_0x697c('0x80')]]){for(var _0x38c2a9 in this[_0x697c('0x24')][_0x6c6b8e[_0x697c('0x80')]]){if(this['channels'][_0x6c6b8e[_0x697c('0x80')]][_0x697c('0x3c')](_0x38c2a9)){if(_0x6c6b8e[_0x697c('0x81')]===_0x38c2a9){logger[_0x697c('0x20')](_0x697c('0x82'),_0x6c6b8e[_0x697c('0x21')],this[_0x697c('0x24')][_0x6c6b8e[_0x697c('0x80')]][_0x38c2a9][_0x697c('0x22')],_0x38c2a9);var _0x541d89=moment();this[_0x697c('0x24')][_0x6c6b8e[_0x697c('0x80')]][_0x38c2a9]['agentcomplete']=!![];this[_0x697c('0x24')][_0x6c6b8e['transfereeuniqueid']][_0x38c2a9]['agentcompleteAt']=moment()[_0x697c('0x26')](_0x697c('0x27'));this[_0x697c('0x24')][_0x6c6b8e[_0x697c('0x80')]][_0x38c2a9][_0x697c('0x44')]=_0x697c('0x5a');this[_0x697c('0x24')][_0x6c6b8e[_0x697c('0x80')]][_0x38c2a9][_0x697c('0x52')]=_0x697c('0x5b');this[_0x697c('0x24')][_0x6c6b8e['transfereeuniqueid']][_0x38c2a9]['talktime']=_0x541d89[_0x697c('0x83')](this[_0x697c('0x24')][_0x6c6b8e['transfereeuniqueid']][_0x38c2a9][_0x697c('0x3e')],'seconds');}}}}if(this[_0x697c('0x24')][_0x6c6b8e[_0x697c('0x84')]]){var _0x84d1e8=this[_0x697c('0x24')][_0x6c6b8e[_0x697c('0x84')]];this[_0x697c('0x24')][_0x6c6b8e['secondtransfereruniqueid']]=this[_0x697c('0x24')][_0x6c6b8e[_0x697c('0x80')]];this['channels'][_0x6c6b8e[_0x697c('0x80')]]=_0x84d1e8;}}}catch(_0x2e8e23){logger[_0x697c('0x39')](_0x697c('0x85'),_0x6c6b8e[_0x697c('0x21')],util[_0x697c('0x33')](_0x2e8e23,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype']['syncBlindTransfer']=function(_0x49fb5a){try{if(this['isNotNull'](_0x49fb5a)){logger[_0x697c('0x23')](_0x697c('0x86'),_0x49fb5a[_0x697c('0x21')],util['inspect'](_0x49fb5a,{'showHidden':![],'depth':null}));if(this['channels'][_0x49fb5a['transfereeuniqueid']]){for(var _0x37924a in this[_0x697c('0x24')][_0x49fb5a['transfereeuniqueid']]){if(this[_0x697c('0x24')][_0x49fb5a[_0x697c('0x80')]][_0x697c('0x3c')](_0x37924a)){if(_0x49fb5a[_0x697c('0x87')]===_0x37924a){logger[_0x697c('0x20')](_0x697c('0x88'),_0x49fb5a[_0x697c('0x21')],this[_0x697c('0x24')][_0x49fb5a[_0x697c('0x80')]][_0x37924a][_0x697c('0x22')],_0x37924a);var _0x41ebf6=moment();this[_0x697c('0x24')][_0x49fb5a[_0x697c('0x80')]][_0x37924a][_0x697c('0x4a')]=!![];this[_0x697c('0x24')][_0x49fb5a[_0x697c('0x80')]][_0x37924a][_0x697c('0x59')]=_0x41ebf6;this[_0x697c('0x24')][_0x49fb5a['transfereeuniqueid']][_0x37924a][_0x697c('0x44')]=_0x697c('0x5a');this[_0x697c('0x24')][_0x49fb5a[_0x697c('0x80')]][_0x37924a][_0x697c('0x52')]=_0x697c('0x5b');this['channels'][_0x49fb5a[_0x697c('0x80')]][_0x37924a][_0x697c('0x5d')]=_0x41ebf6[_0x697c('0x83')](this[_0x697c('0x24')][_0x49fb5a[_0x697c('0x80')]][_0x37924a][_0x697c('0x3e')],_0x697c('0x89'));}}}}}}catch(_0x39f867){logger['error'](_0x697c('0x8a'),_0x49fb5a['uniqueid'],util[_0x697c('0x33')](_0x39f867,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x697c('0x1c')][_0x697c('0x8b')]=function(_0x345ec8){var _0x5e72e4='';try{if(this['isNotNull'](_0x345ec8)){logger[_0x697c('0x23')](_0x697c('0x8c'),_0x345ec8[_0x697c('0x21')],util[_0x697c('0x33')](_0x345ec8,{'showHidden':![],'depth':null}));if(_0x345ec8['channel']){_0x5e72e4=_0x345ec8[_0x697c('0x8d')][_0x697c('0x8e')](0x0,_0x345ec8[_0x697c('0x8d')]['lastIndexOf']('-'));if(this['agents'][_0x5e72e4]){logger[_0x697c('0x20')]('[%s][voiceAgentReport][musiconholdstart]\x20interface:%s',_0x345ec8['uniqueid'],_0x5e72e4);this['agents'][_0x5e72e4][_0x697c('0x8f')]=!![];}}}}catch(_0x43a1c0){logger['error'](_0x697c('0x90'),_0x345ec8[_0x697c('0x21')],util[_0x697c('0x33')](_0x43a1c0,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x697c('0x1c')][_0x697c('0x91')]=function(_0x1f786d){var _0x2230b6='';try{if(this[_0x697c('0x1e')](_0x1f786d)){logger[_0x697c('0x23')]('[%s][voiceAgentReport][musiconholdstop]\x20event:',_0x1f786d[_0x697c('0x21')],util[_0x697c('0x33')](_0x1f786d,{'showHidden':![],'depth':null}));if(_0x1f786d[_0x697c('0x8d')]){_0x2230b6=_0x1f786d['channel'][_0x697c('0x8e')](0x0,_0x1f786d[_0x697c('0x8d')]['lastIndexOf']('-'));if(this[_0x697c('0xc')][_0x2230b6]){logger[_0x697c('0x20')](_0x697c('0x92'),_0x1f786d['uniqueid'],_0x2230b6);this[_0x697c('0xc')][_0x2230b6]['onhold']=![];}}}}catch(_0x26d556){logger[_0x697c('0x39')]('[%s][voiceAgentReport][musiconholdstop]',_0x1f786d[_0x697c('0x21')],util['inspect'](_0x26d556,{'showHidden':![],'depth':null}));}};module[_0x697c('0x93')]=VoiceAgentReport;
\ No newline at end of file
+var _0xa9f1=['values','custom:voiceAgentReport','[%s][voiceAgentReport][hangup]','[%s][voiceAgentReport][attendedtransfer]\x20event:','transfereeuniqueid','origtransfereruniqueid','[%s][voiceAgentReport][attendedtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','talktime','diff','seconds','secondtransfereruniqueid','[%s][voiceAgentReport][attendedtransfer]','[%s][voiceAgentReport][blindtransfer]\x20event:','transfereruniqueid','[%s][voiceAgentReport][musiconholdstart]\x20event:','channel','substring','lastIndexOf','[%s][voiceAgentReport][musiconholdstart]','[%s][voiceAgentReport][musiconholdstop]\x20event:','[%s][voiceAgentReport][musiconholdstop]\x20interface:%s','onhold','exports','moment','util','ioredis','../../../config/environment','../../../config/logger','ami','../ami','defaults','redis','localhost','channels','voiceChannels','voiceQueues','agents','variables','syncAgentCalled','bind','agentconnect','syncAgentConnect','agentringnoanswer','syncAgentRingNoAnswer','queuecallerabandon','syncQueueCallerAbandon','agentcomplete','syncAgentComplete','varset','syncVarSet','hangup','syncHangup','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','attendedtransfer','syncAttendedTransfer','syncBlindTransfer','prototype','emit','isNotNull','isUndefined','[%s][voiceAgentReport][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','uniqueid','membername','destuniqueid','debug','[%s][voiceAgentReport][agentcalled]\x20event:','inspect','queue','YYYY-MM-DD\x20HH:mm:ss','called','mandatoryDisposition','type','inbound','assign','[%s][voiceAgentReport][agentcalled]\x20sending\x20agentcalled\x20event:','calleridnum','[%s][voiceAgentReport][agentcalled]\x20sending\x20user:called\x20event:','format','user:%s','user:called','error','info','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect','agentconnectAt','connectedlinename','connectedlinenum','destchannelstate','destchannelstatedesc','holdtime','lastevent','connect','routealias','merge','pick','destconnectedlinenum','accountcode','exten','custom:agentconnect','user:agentconnect','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:answered_elsewhere','agentringnoanswerAt','answeredelsewheredestinationuniqueid','answeredelsewheremembername','answered_elsewhere','reason','[%s][voiceAgentReport][agentconnect]\x20sending\x20agentansweredelsewhere\x20event:','[%s][voiceAgentReport][agentringnoanswer]\x20event:','[%s][voiceAgentReport][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:rejected','interface','rejected','[%s][voiceAgentReport][agentringnoanswer]\x20sending\x20agentringnoanswer\x20event:','name','user:agentringnoanswer','custom:agentringnoanswer','[%s][voiceAgentReport][queuecallerabandon]\x20event:','abandoned','[%s][voiceAgentReport][queuecallerabandon]\x20sending\x20agentqueuecallerabandon\x20event:','custom:agentqueuecallerabandon','[%s][voiceAgentReport][queuecallerabandon]','[%s][voiceAgentReport][agentcomplete]\x20event:','hasOwnProperty','[%s][voiceAgentReport][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','complete','transfer','agent','acwtime','acwTimeout','agentacw','[%s][voiceAgentReport][agentcomplete]\x20sending\x20agentcomplete\x20event:','custom:agentcomplete','[%s][voiceAgentReport][agentcomplete]\x20sending\x20user:agentcomplete\x20event:','destaccountcode','user:agentcomplete','[%s][voiceAgentReport][agentcomplete]','[%s][voiceAgentReport][varset]\x20event:','addVariable','keys','value','[%s][voiceAgentReport][varset]\x20destuniqueid:%s\x20variable:%s\x20value:%s','variable','[%s][voiceAgentReport][varset]','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','membercalls','memberlastcall','memberpenalty','memberrealtime','includes','agentcompleteAt'];(function(_0x79dc51,_0x2ada04){var _0x108bc9=function(_0x17f11a){while(--_0x17f11a){_0x79dc51['push'](_0x79dc51['shift']());}};_0x108bc9(++_0x2ada04);}(_0xa9f1,0xb4));var _0x1a9f=function(_0x64ea63,_0x4c32d3){_0x64ea63=_0x64ea63-0x0;var _0x45d9a1=_0xa9f1[_0x64ea63];return _0x45d9a1;};'use strict';var _=require('lodash');var moment=require(_0x1a9f('0x0'));var util=require(_0x1a9f('0x1'));var Redis=require(_0x1a9f('0x2'));var config=require(_0x1a9f('0x3'));var logger=require(_0x1a9f('0x4'))(_0x1a9f('0x5'));var ami=require(_0x1a9f('0x6'));config['redis']=_[_0x1a9f('0x7')](config[_0x1a9f('0x8')],{'host':_0x1a9f('0x9'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x1a9f('0x8')]));function VoiceAgentReport(_0x220a51){this[_0x1a9f('0xa')]={};this[_0x1a9f('0xb')]=_0x220a51[_0x1a9f('0xa')];this[_0x1a9f('0xc')]=_0x220a51[_0x1a9f('0xc')];this[_0x1a9f('0xd')]=_0x220a51[_0x1a9f('0xd')];this[_0x1a9f('0xe')]={};ami['on']('agentcalled',this[_0x1a9f('0xf')][_0x1a9f('0x10')](this));ami['on'](_0x1a9f('0x11'),this[_0x1a9f('0x12')][_0x1a9f('0x10')](this));ami['on'](_0x1a9f('0x13'),this[_0x1a9f('0x14')][_0x1a9f('0x10')](this));ami['on'](_0x1a9f('0x15'),this[_0x1a9f('0x16')][_0x1a9f('0x10')](this));ami['on'](_0x1a9f('0x17'),this[_0x1a9f('0x18')][_0x1a9f('0x10')](this));ami['on'](_0x1a9f('0x19'),this[_0x1a9f('0x1a')][_0x1a9f('0x10')](this));ami['on'](_0x1a9f('0x1b'),this[_0x1a9f('0x1c')]['bind'](this));ami['on'](_0x1a9f('0x1d'),this[_0x1a9f('0x1e')][_0x1a9f('0x10')](this));ami['on'](_0x1a9f('0x1f'),this[_0x1a9f('0x20')][_0x1a9f('0x10')](this));ami['on'](_0x1a9f('0x21'),this[_0x1a9f('0x22')][_0x1a9f('0x10')](this));ami['on']('blindtransfer',this[_0x1a9f('0x23')][_0x1a9f('0x10')](this));}VoiceAgentReport[_0x1a9f('0x24')][_0x1a9f('0x25')]=function(_0x573d2d,_0x580a1e,_0x241629){io['to'](_0x573d2d)[_0x1a9f('0x25')](_0x580a1e,_0x241629);};VoiceAgentReport[_0x1a9f('0x24')][_0x1a9f('0x26')]=function(_0x1a8789){return _0x1a8789!==null&&!_[_0x1a9f('0x27')](_0x1a8789);};VoiceAgentReport[_0x1a9f('0x24')]['syncAgentCalled']=function(_0x1a9b48){try{if(this[_0x1a9f('0x26')](_0x1a9b48)){logger['info'](_0x1a9f('0x28'),_0x1a9b48[_0x1a9f('0x29')],_0x1a9b48[_0x1a9f('0x2a')],_0x1a9b48[_0x1a9f('0x2b')]);logger[_0x1a9f('0x2c')](_0x1a9f('0x2d'),_0x1a9b48[_0x1a9f('0x29')],util[_0x1a9f('0x2e')](_0x1a9b48,{'showHidden':![],'depth':null}));if(_['isUndefined'](this[_0x1a9f('0xa')][_0x1a9b48[_0x1a9f('0x29')]])){this[_0x1a9f('0xa')][_0x1a9b48['uniqueid']]={};}var _0x58873b=this[_0x1a9f('0xd')][_0x1a9b48['interface']];var _0x1c5151=this[_0x1a9f('0xa')][_0x1a9b48[_0x1a9f('0x29')]][_0x1a9b48[_0x1a9f('0x2b')]];var _0x4751ff=this[_0x1a9f('0xc')][_0x1a9b48[_0x1a9f('0x2f')]];var _0x97a123=this[_0x1a9f('0xe')][_0x1a9b48['uniqueid']];if(_['isUndefined'](_0x1c5151)){_0x1c5151={'agentcalledAt':moment()['format'](_0x1a9f('0x30')),'lastevent':_0x1a9f('0x31'),'mandatoryDisposition':_0x4751ff&&_0x4751ff[_0x1a9f('0x32')]?_0x4751ff[_0x1a9f('0x32')]:![],'type':_0x4751ff&&_0x4751ff[_0x1a9f('0x33')]?_0x4751ff['type']:_0x1a9f('0x34'),'variables':_0x97a123,'motionChannel':'voice'};}Object[_0x1a9f('0x35')](_0x1c5151,_['omit'](_0x1a9b48,['event','privilege']));this[_0x1a9f('0xa')][_0x1a9b48['uniqueid']][_0x1a9b48[_0x1a9f('0x2b')]]=_0x1c5151;logger['debug'](_0x1a9f('0x36'),_0x1a9b48['uniqueid'],util['inspect'](_0x1c5151,{'showHidden':![],'depth':null}));ami[_0x1a9f('0x25')]('custom:agentcalled',_0x1c5151);var _0x311c5a={'id':_0x58873b['id'],'calleridnum':_0x1c5151[_0x1a9f('0x37')],'queue':_0x1c5151[_0x1a9f('0x2f')],'variables':_0x1c5151[_0x1a9f('0xe')],'uniqueid':_0x1a9b48[_0x1a9f('0x29')]};logger[_0x1a9f('0x2c')](_0x1a9f('0x38'),_0x1a9b48[_0x1a9f('0x29')],util[_0x1a9f('0x2e')](_0x311c5a,{'showHidden':![],'depth':null}));this[_0x1a9f('0x25')](util[_0x1a9f('0x39')](_0x1a9f('0x3a'),_0x1a9b48[_0x1a9f('0x2a')]),_0x1a9f('0x3b'),_0x311c5a);}}catch(_0x105678){logger[_0x1a9f('0x3c')]('[%s][voiceAgentReport][agentcalled]',_0x1a9b48[_0x1a9f('0x29')],util[_0x1a9f('0x2e')](_0x105678,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0x1a9f('0x12')]=function(_0x4a0bd5){try{if(this[_0x1a9f('0x26')](_0x4a0bd5)){if(this[_0x1a9f('0xa')][_0x4a0bd5[_0x1a9f('0x29')]]){for(var _0x2fd629 in this[_0x1a9f('0xa')][_0x4a0bd5['uniqueid']]){if(this[_0x1a9f('0xa')][_0x4a0bd5[_0x1a9f('0x29')]]['hasOwnProperty'](_0x2fd629)){if(_0x4a0bd5[_0x1a9f('0x2b')]===_0x2fd629){logger[_0x1a9f('0x3d')](_0x1a9f('0x3e'),_0x4a0bd5['uniqueid'],_0x4a0bd5[_0x1a9f('0x2a')],_0x4a0bd5[_0x1a9f('0x2b')]);this[_0x1a9f('0xa')][_0x4a0bd5[_0x1a9f('0x29')]][_0x2fd629][_0x1a9f('0x3f')]=moment()[_0x1a9f('0x39')](_0x1a9f('0x30'));this[_0x1a9f('0xa')][_0x4a0bd5['uniqueid']][_0x2fd629][_0x1a9f('0x40')]=_0x4a0bd5[_0x1a9f('0x40')];this[_0x1a9f('0xa')][_0x4a0bd5['uniqueid']][_0x2fd629][_0x1a9f('0x41')]=_0x4a0bd5[_0x1a9f('0x41')];this[_0x1a9f('0xa')][_0x4a0bd5['uniqueid']][_0x2fd629]['destchannelstate']=_0x4a0bd5[_0x1a9f('0x42')];this[_0x1a9f('0xa')][_0x4a0bd5[_0x1a9f('0x29')]][_0x2fd629][_0x1a9f('0x43')]=_0x4a0bd5[_0x1a9f('0x43')];this[_0x1a9f('0xa')][_0x4a0bd5[_0x1a9f('0x29')]][_0x2fd629][_0x1a9f('0x44')]=_0x4a0bd5[_0x1a9f('0x44')];this[_0x1a9f('0xa')][_0x4a0bd5[_0x1a9f('0x29')]][_0x2fd629][_0x1a9f('0x45')]=_0x1a9f('0x46');if(this[_0x1a9f('0xb')][this[_0x1a9f('0xa')][_0x4a0bd5['uniqueid']][_0x2fd629][_0x1a9f('0x29')]]){var _0x1a5605=this[_0x1a9f('0xb')][this[_0x1a9f('0xa')][_0x4a0bd5[_0x1a9f('0x29')]][_0x2fd629][_0x1a9f('0x29')]][_0x1a9f('0x47')];this[_0x1a9f('0xa')][_0x4a0bd5[_0x1a9f('0x29')]][_0x2fd629][_0x1a9f('0x47')]=_0x1a5605;_0x4a0bd5[_0x1a9f('0x47')]=_0x1a5605;}_[_0x1a9f('0x48')](this[_0x1a9f('0xd')][_0x4a0bd5['interface']],_[_0x1a9f('0x49')](_0x4a0bd5,['queue',_0x1a9f('0x4a'),_0x1a9f('0x47')]));var _0x3aa27c=this[_0x1a9f('0xd')][_0x4a0bd5['interface']];var _0x4f6852={'id':_0x3aa27c['id'],'name':_0x3aa27c['name'],'agentconnected':!![],'destaccountcode':_0x3aa27c[_0x1a9f('0x4b')],'destconnectedlinenum':this['channels'][_0x4a0bd5[_0x1a9f('0x29')]][_0x4a0bd5[_0x1a9f('0x2b')]][_0x1a9f('0x4c')],'queue':this[_0x1a9f('0xa')][_0x4a0bd5[_0x1a9f('0x29')]][_0x4a0bd5[_0x1a9f('0x2b')]][_0x1a9f('0x2f')],'routealias':this[_0x1a9f('0xa')][_0x4a0bd5['uniqueid']][_0x4a0bd5[_0x1a9f('0x2b')]][_0x1a9f('0x47')],'uniqueid':this[_0x1a9f('0xa')][_0x4a0bd5['uniqueid']][_0x4a0bd5[_0x1a9f('0x2b')]][_0x1a9f('0x29')]};ami[_0x1a9f('0x25')](_0x1a9f('0x4d'),this[_0x1a9f('0xa')][_0x4a0bd5['uniqueid']][_0x4a0bd5['destuniqueid']]);this[_0x1a9f('0x25')](util[_0x1a9f('0x39')](_0x1a9f('0x3a'),_0x4a0bd5['membername']),_0x1a9f('0x4e'),_0x4f6852);}else if(!this[_0x1a9f('0xa')][_0x4a0bd5[_0x1a9f('0x29')]][_0x2fd629][_0x1a9f('0x13')]&&!this[_0x1a9f('0xa')][_0x4a0bd5['uniqueid']][_0x2fd629][_0x1a9f('0x17')]){logger[_0x1a9f('0x3d')](_0x1a9f('0x4f'),_0x4a0bd5['uniqueid'],this[_0x1a9f('0xa')][_0x4a0bd5[_0x1a9f('0x29')]][_0x2fd629]['membername'],_0x2fd629);this['channels'][_0x4a0bd5[_0x1a9f('0x29')]][_0x2fd629][_0x1a9f('0x13')]=!![];this[_0x1a9f('0xa')][_0x4a0bd5[_0x1a9f('0x29')]][_0x2fd629][_0x1a9f('0x50')]=moment()[_0x1a9f('0x39')](_0x1a9f('0x30'));this[_0x1a9f('0xa')][_0x4a0bd5[_0x1a9f('0x29')]][_0x2fd629][_0x1a9f('0x51')]=_0x4a0bd5['destuniqueid'];this[_0x1a9f('0xa')][_0x4a0bd5[_0x1a9f('0x29')]][_0x2fd629][_0x1a9f('0x52')]=_0x4a0bd5[_0x1a9f('0x2a')];this[_0x1a9f('0xa')][_0x4a0bd5[_0x1a9f('0x29')]][_0x2fd629][_0x1a9f('0x45')]=_0x1a9f('0x53');this[_0x1a9f('0xa')][_0x4a0bd5[_0x1a9f('0x29')]][_0x2fd629][_0x1a9f('0x54')]=_0x1a9f('0x53');logger['debug'](_0x1a9f('0x55'),_0x4a0bd5[_0x1a9f('0x29')],util['inspect'](this[_0x1a9f('0xa')][_0x4a0bd5[_0x1a9f('0x29')]][_0x2fd629],{'showHidden':![],'depth':null}));ami[_0x1a9f('0x25')]('custom:agentansweredelsewhere',this[_0x1a9f('0xa')][_0x4a0bd5[_0x1a9f('0x29')]][_0x2fd629]);}else{logger[_0x1a9f('0x2c')]('[%s][voiceAgentReport][agentconnect]\x20Else\x20path\x20should\x20never\x20be\x20taken',_0x4a0bd5['uniqueid']);}}}}}}catch(_0x58c2a4){logger['error']('[%s][voiceAgentReport][agentconnect]',_0x4a0bd5[_0x1a9f('0x29')],util[_0x1a9f('0x2e')](_0x58c2a4,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x1a9f('0x24')][_0x1a9f('0x14')]=function(_0x288937){try{if(this[_0x1a9f('0x26')](_0x288937)){logger['debug'](_0x1a9f('0x56'),_0x288937[_0x1a9f('0x29')],util[_0x1a9f('0x2e')](_0x288937,{'showHidden':![],'depth':null}));if(this[_0x1a9f('0xa')][_0x288937['uniqueid']]&&this[_0x1a9f('0xa')][_0x288937[_0x1a9f('0x29')]][_0x288937[_0x1a9f('0x2b')]]){logger[_0x1a9f('0x3d')](_0x1a9f('0x57'),_0x288937[_0x1a9f('0x29')],_0x288937[_0x1a9f('0x2a')],_0x288937[_0x1a9f('0x2b')]);var _0x4f49f6=this[_0x1a9f('0xd')][_0x288937[_0x1a9f('0x58')]];var _0x11f1b6=this[_0x1a9f('0xa')][_0x288937['uniqueid']][_0x288937[_0x1a9f('0x2b')]];_0x11f1b6[_0x1a9f('0x13')]=!![];_0x11f1b6[_0x1a9f('0x50')]=moment()[_0x1a9f('0x39')]('YYYY-MM-DD\x20HH:mm:ss');_0x11f1b6[_0x1a9f('0x45')]=_0x1a9f('0x59');_0x11f1b6['reason']='rejected';var _0x4d912f={'id':_0x4f49f6['id'],'name':_0x4f49f6['name'],'queue':_0x11f1b6['queue'],'uniqueid':_0x11f1b6['uniqueid']};logger[_0x1a9f('0x2c')](_0x1a9f('0x5a'),_0x288937[_0x1a9f('0x29')],util[_0x1a9f('0x2e')](_0x4d912f,{'showHidden':![],'depth':null}));this[_0x1a9f('0x25')](util[_0x1a9f('0x39')](_0x1a9f('0x3a'),_0x4f49f6[_0x1a9f('0x5b')]),_0x1a9f('0x5c'),_0x4d912f);ami['emit'](_0x1a9f('0x5d'),_0x11f1b6);this[_0x1a9f('0xa')][_0x288937[_0x1a9f('0x29')]][_0x288937[_0x1a9f('0x2b')]]=Object[_0x1a9f('0x35')]({},_0x11f1b6);}}}catch(_0x4fe0a0){logger[_0x1a9f('0x3c')]('[%s][voiceAgentReport][agentringnoanswer]',_0x288937[_0x1a9f('0x29')],util[_0x1a9f('0x2e')](_0x4fe0a0,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x1a9f('0x24')][_0x1a9f('0x16')]=function(_0x494502){try{if(this[_0x1a9f('0x26')](_0x494502)){logger['debug'](_0x1a9f('0x5e'),_0x494502['uniqueid'],util['inspect'](_0x494502,{'showHidden':![],'depth':null}));if(this['channels'][_0x494502[_0x1a9f('0x29')]]){for(var _0x233aee in this[_0x1a9f('0xa')][_0x494502[_0x1a9f('0x29')]]){if(this[_0x1a9f('0xa')][_0x494502[_0x1a9f('0x29')]]['hasOwnProperty'](_0x233aee)&&!this[_0x1a9f('0xa')][_0x494502[_0x1a9f('0x29')]][_0x233aee]['agentringnoanswer']&&!this['channels'][_0x494502[_0x1a9f('0x29')]][_0x233aee]['agentcomplete']){logger[_0x1a9f('0x3d')]('[%s][voiceAgentReport][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned',_0x494502['uniqueid'],this[_0x1a9f('0xa')][_0x494502[_0x1a9f('0x29')]][_0x233aee]['membername'],_0x233aee);this[_0x1a9f('0xa')][_0x494502['uniqueid']][_0x233aee][_0x1a9f('0x13')]=!![];this[_0x1a9f('0xa')][_0x494502[_0x1a9f('0x29')]][_0x233aee][_0x1a9f('0x50')]=moment()[_0x1a9f('0x39')](_0x1a9f('0x30'));this[_0x1a9f('0xa')][_0x494502['uniqueid']][_0x233aee][_0x1a9f('0x45')]=_0x1a9f('0x5f');this[_0x1a9f('0xa')][_0x494502['uniqueid']][_0x233aee][_0x1a9f('0x54')]=_0x1a9f('0x5f');logger['debug'](_0x1a9f('0x60'),_0x494502[_0x1a9f('0x29')],util['inspect'](this[_0x1a9f('0xa')][_0x494502['uniqueid']][_0x233aee],{'showHidden':![],'depth':null}));ami[_0x1a9f('0x25')](_0x1a9f('0x61'),this['channels'][_0x494502['uniqueid']][_0x233aee]);}}}}}catch(_0x144dcc){logger[_0x1a9f('0x3c')](_0x1a9f('0x62'),_0x494502[_0x1a9f('0x29')],util[_0x1a9f('0x2e')](_0x144dcc,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x1a9f('0x24')]['syncAgentComplete']=function(_0x17e697){try{if(this[_0x1a9f('0x26')](_0x17e697)){logger[_0x1a9f('0x2c')](_0x1a9f('0x63'),_0x17e697[_0x1a9f('0x29')],util['inspect'](_0x17e697,{'showHidden':![],'depth':null}));if(this[_0x1a9f('0xa')][_0x17e697[_0x1a9f('0x29')]]){for(var _0x3af8c3 in this[_0x1a9f('0xa')][_0x17e697[_0x1a9f('0x29')]]){if(this['channels'][_0x17e697[_0x1a9f('0x29')]][_0x1a9f('0x64')](_0x3af8c3)){if(this[_0x1a9f('0xa')][_0x17e697['uniqueid']][_0x3af8c3][_0x1a9f('0x3f')]&&!this[_0x1a9f('0xa')][_0x17e697[_0x1a9f('0x29')]][_0x3af8c3][_0x1a9f('0x17')]){logger[_0x1a9f('0x3d')](_0x1a9f('0x65'),_0x17e697[_0x1a9f('0x29')],this[_0x1a9f('0xa')][_0x17e697[_0x1a9f('0x29')]][_0x3af8c3][_0x1a9f('0x2a')],_0x3af8c3);this[_0x1a9f('0xa')][_0x17e697[_0x1a9f('0x29')]][_0x3af8c3]['agentcomplete']=!![];this[_0x1a9f('0xa')][_0x17e697[_0x1a9f('0x29')]][_0x3af8c3]['agentcompleteAt']=moment()[_0x1a9f('0x39')](_0x1a9f('0x30'));this['channels'][_0x17e697[_0x1a9f('0x29')]][_0x3af8c3][_0x1a9f('0x45')]=_0x1a9f('0x66');this['channels'][_0x17e697[_0x1a9f('0x29')]][_0x3af8c3][_0x1a9f('0x54')]=_0x17e697[_0x1a9f('0x54')]==_0x1a9f('0x67')?_0x1a9f('0x68'):_0x17e697['reason'];this['channels'][_0x17e697[_0x1a9f('0x29')]][_0x3af8c3]['talktime']=_0x17e697['talktime'];if(this[_0x1a9f('0xc')][_0x17e697[_0x1a9f('0x2f')]]&&this['voiceQueues'][_0x17e697['queue']]['acw']){this[_0x1a9f('0xa')][_0x17e697['uniqueid']][_0x3af8c3][_0x1a9f('0x69')]=this['voiceQueues'][_0x17e697['queue']][_0x1a9f('0x6a')];this[_0x1a9f('0xa')][_0x17e697[_0x1a9f('0x29')]][_0x3af8c3][_0x1a9f('0x6b')]=!![];}this[_0x1a9f('0xd')][_0x17e697[_0x1a9f('0x58')]]=_['omit'](this['agents'][_0x17e697[_0x1a9f('0x58')]],[_0x1a9f('0x2f'),_0x1a9f('0x4a')]);logger[_0x1a9f('0x2c')](_0x1a9f('0x6c'),_0x17e697[_0x1a9f('0x29')],util['inspect'](this[_0x1a9f('0xa')][_0x17e697[_0x1a9f('0x29')]][_0x3af8c3],{'showHidden':![],'depth':null}));ami[_0x1a9f('0x25')](_0x1a9f('0x6d'),this[_0x1a9f('0xa')][_0x17e697[_0x1a9f('0x29')]][_0x3af8c3]);logger[_0x1a9f('0x2c')](_0x1a9f('0x6e'),_0x17e697[_0x1a9f('0x29')],util[_0x1a9f('0x2e')]({'id':this[_0x1a9f('0xd')][_0x17e697[_0x1a9f('0x58')]]['id'],'destaccountcode':_0x17e697[_0x1a9f('0x6f')]},{'showHidden':![],'depth':null}));this['emit'](util['format'](_0x1a9f('0x3a'),_0x17e697[_0x1a9f('0x2a')]),_0x1a9f('0x70'),{'id':this['agents'][_0x17e697[_0x1a9f('0x58')]]['id'],'destaccountcode':Number(_0x17e697[_0x1a9f('0x6f')])});}}}}}}catch(_0x26acbf){logger[_0x1a9f('0x3c')](_0x1a9f('0x71'),_0x17e697[_0x1a9f('0x29')],util[_0x1a9f('0x2e')](_0x26acbf,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x1a9f('0x24')]['syncVarSet']=function(_0x1a3654){try{if(this[_0x1a9f('0x26')](_0x1a3654)){logger[_0x1a9f('0x2c')](_0x1a9f('0x72'),_0x1a3654[_0x1a9f('0x29')],util['inspect'](_0x1a3654,{'showHidden':![],'depth':null}));this[_0x1a9f('0x73')](_0x1a3654[_0x1a9f('0x29')],_[_0x1a9f('0x74')](_0x1a3654['variable'])[0x0],_0x1a3654[_0x1a9f('0x75')]);if(this[_0x1a9f('0xa')][_0x1a3654['uniqueid']]){for(var _0x458d32 in this[_0x1a9f('0xa')][_0x1a3654[_0x1a9f('0x29')]]){if(this[_0x1a9f('0xa')][_0x1a3654['uniqueid']][_0x1a9f('0x64')](_0x458d32)){logger[_0x1a9f('0x3d')](_0x1a9f('0x76'),_0x1a3654['uniqueid'],_0x458d32,_[_0x1a9f('0x74')](_0x1a3654[_0x1a9f('0x77')])[0x0],_0x1a3654[_0x1a9f('0x75')]);if(_[_0x1a9f('0x27')](this[_0x1a9f('0xa')][_0x1a3654[_0x1a9f('0x29')]][_0x458d32][_0x1a9f('0xe')])){this[_0x1a9f('0xa')][_0x1a3654[_0x1a9f('0x29')]][_0x458d32][_0x1a9f('0xe')]={};}this[_0x1a9f('0xa')][_0x1a3654[_0x1a9f('0x29')]][_0x458d32][_0x1a9f('0xe')]=this['variables'][_0x1a3654[_0x1a9f('0x29')]];}}}}}catch(_0x2e5312){logger[_0x1a9f('0x3c')](_0x1a9f('0x78'),_0x1a3654[_0x1a9f('0x29')],util[_0x1a9f('0x2e')](_0x2e5312,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype']['addVariable']=function(_0x3ba7b2,_0x35a38a,_0x2c2712){var _0x559a66=['rtpaudioqos',_0x1a9f('0x79'),_0x1a9f('0x7a'),_0x1a9f('0x7b'),_0x1a9f('0x7c'),_0x1a9f('0x7d'),_0x1a9f('0x7e'),_0x1a9f('0x7f'),'sipcallid','sipuri','bridgepeer','bridgepvtcallid',_0x1a9f('0x80'),'memberdynamic','memberinterface',_0x1a9f('0x81'),_0x1a9f('0x2a'),_0x1a9f('0x82'),_0x1a9f('0x83')];if(!_['isNil'](_0x35a38a)&&!_[_0x1a9f('0x84')](_0x559a66,_0x35a38a)){if(_[_0x1a9f('0x27')](this[_0x1a9f('0xe')][_0x3ba7b2])){this['variables'][_0x3ba7b2]={};}this['variables'][_0x3ba7b2][_0x35a38a]=_0x2c2712;}};VoiceAgentReport[_0x1a9f('0x24')][_0x1a9f('0x1c')]=function(_0x38523a){try{if(this['isNotNull'](_0x38523a)){logger[_0x1a9f('0x2c')]('[%s][voiceAgentReport][hangup]\x20event:',_0x38523a[_0x1a9f('0x29')],util[_0x1a9f('0x2e')](_0x38523a,{'showHidden':![],'depth':null}));if(this['channels'][_0x38523a['uniqueid']]){for(var _0x318c97 in this[_0x1a9f('0xa')][_0x38523a[_0x1a9f('0x29')]]){if(this[_0x1a9f('0xa')][_0x38523a[_0x1a9f('0x29')]]['hasOwnProperty'](_0x318c97)){if(this[_0x1a9f('0xa')][_0x38523a['uniqueid']][_0x318c97]['reason']==_0x1a9f('0x67')&&this[_0x1a9f('0xa')][_0x38523a['uniqueid']][_0x318c97][_0x1a9f('0x17')]){logger[_0x1a9f('0x3d')]('[%s][voiceAgentReport][hangup]\x20destuniqueid:%s',_0x38523a[_0x1a9f('0x29')],_0x318c97);this[_0x1a9f('0xa')][_0x38523a[_0x1a9f('0x29')]][_0x318c97][_0x1a9f('0x85')]=moment()[_0x1a9f('0x39')](_0x1a9f('0x30'));}}}logger[_0x1a9f('0x2c')]('[%s][voiceAgentReport][hangup]\x20sending\x20voiceAgentReport\x20event:',_0x38523a[_0x1a9f('0x29')],util[_0x1a9f('0x2e')](_[_0x1a9f('0x86')](this[_0x1a9f('0xa')][_0x38523a[_0x1a9f('0x29')]]),{'showHidden':![],'depth':null}));ami[_0x1a9f('0x25')](_0x1a9f('0x87'),_[_0x1a9f('0x86')](this[_0x1a9f('0xa')][_0x38523a[_0x1a9f('0x29')]]));delete this[_0x1a9f('0xa')][_0x38523a['uniqueid']];}if(this[_0x1a9f('0xe')][_0x38523a[_0x1a9f('0x29')]]){delete this[_0x1a9f('0xe')][_0x38523a[_0x1a9f('0x29')]];}}}catch(_0x9683b2){logger['error'](_0x1a9f('0x88'),_0x38523a['uniqueid'],util['inspect'](_0x9683b2,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x1a9f('0x24')][_0x1a9f('0x22')]=function(_0x172f1d){try{if(this['isNotNull'](_0x172f1d)){logger[_0x1a9f('0x2c')](_0x1a9f('0x89'),_0x172f1d[_0x1a9f('0x29')],util[_0x1a9f('0x2e')](_0x172f1d,{'showHidden':![],'depth':null}));if(this[_0x1a9f('0xa')][_0x172f1d[_0x1a9f('0x8a')]]){for(var _0x4e7d29 in this[_0x1a9f('0xa')][_0x172f1d[_0x1a9f('0x8a')]]){if(this[_0x1a9f('0xa')][_0x172f1d[_0x1a9f('0x8a')]][_0x1a9f('0x64')](_0x4e7d29)){if(_0x172f1d[_0x1a9f('0x8b')]===_0x4e7d29){logger[_0x1a9f('0x3d')](_0x1a9f('0x8c'),_0x172f1d[_0x1a9f('0x29')],this['channels'][_0x172f1d['transfereeuniqueid']][_0x4e7d29][_0x1a9f('0x2a')],_0x4e7d29);var _0x3ffcdd=moment();this[_0x1a9f('0xa')][_0x172f1d[_0x1a9f('0x8a')]][_0x4e7d29]['agentcomplete']=!![];this[_0x1a9f('0xa')][_0x172f1d['transfereeuniqueid']][_0x4e7d29][_0x1a9f('0x85')]=moment()[_0x1a9f('0x39')](_0x1a9f('0x30'));this['channels'][_0x172f1d['transfereeuniqueid']][_0x4e7d29]['lastevent']=_0x1a9f('0x66');this['channels'][_0x172f1d[_0x1a9f('0x8a')]][_0x4e7d29][_0x1a9f('0x54')]=_0x1a9f('0x67');this[_0x1a9f('0xa')][_0x172f1d['transfereeuniqueid']][_0x4e7d29][_0x1a9f('0x8d')]=_0x3ffcdd[_0x1a9f('0x8e')](this['channels'][_0x172f1d[_0x1a9f('0x8a')]][_0x4e7d29][_0x1a9f('0x3f')],_0x1a9f('0x8f'));}}}}if(this[_0x1a9f('0xa')][_0x172f1d[_0x1a9f('0x90')]]){var _0x265c15=this[_0x1a9f('0xa')][_0x172f1d[_0x1a9f('0x90')]];this[_0x1a9f('0xa')][_0x172f1d[_0x1a9f('0x90')]]=this[_0x1a9f('0xa')][_0x172f1d[_0x1a9f('0x8a')]];this['channels'][_0x172f1d[_0x1a9f('0x8a')]]=_0x265c15;}}}catch(_0x488117){logger[_0x1a9f('0x3c')](_0x1a9f('0x91'),_0x172f1d[_0x1a9f('0x29')],util['inspect'](_0x488117,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x1a9f('0x24')][_0x1a9f('0x23')]=function(_0x55c25d){try{if(this[_0x1a9f('0x26')](_0x55c25d)){logger['debug'](_0x1a9f('0x92'),_0x55c25d['uniqueid'],util[_0x1a9f('0x2e')](_0x55c25d,{'showHidden':![],'depth':null}));if(this[_0x1a9f('0xa')][_0x55c25d[_0x1a9f('0x8a')]]){for(var _0xee7619 in this[_0x1a9f('0xa')][_0x55c25d['transfereeuniqueid']]){if(this['channels'][_0x55c25d['transfereeuniqueid']]['hasOwnProperty'](_0xee7619)){if(_0x55c25d[_0x1a9f('0x93')]===_0xee7619){logger[_0x1a9f('0x3d')]('[%s][voiceAgentReport][blindtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete',_0x55c25d[_0x1a9f('0x29')],this[_0x1a9f('0xa')][_0x55c25d['transfereeuniqueid']][_0xee7619][_0x1a9f('0x2a')],_0xee7619);var _0x4f92b5=moment();this['channels'][_0x55c25d[_0x1a9f('0x8a')]][_0xee7619][_0x1a9f('0x17')]=!![];this[_0x1a9f('0xa')][_0x55c25d['transfereeuniqueid']][_0xee7619][_0x1a9f('0x85')]=_0x4f92b5;this['channels'][_0x55c25d[_0x1a9f('0x8a')]][_0xee7619]['lastevent']=_0x1a9f('0x66');this[_0x1a9f('0xa')][_0x55c25d[_0x1a9f('0x8a')]][_0xee7619][_0x1a9f('0x54')]=_0x1a9f('0x67');this[_0x1a9f('0xa')][_0x55c25d[_0x1a9f('0x8a')]][_0xee7619]['talktime']=_0x4f92b5[_0x1a9f('0x8e')](this['channels'][_0x55c25d['transfereeuniqueid']][_0xee7619]['agentconnectAt'],_0x1a9f('0x8f'));}}}}}}catch(_0x45e06e){logger['error']('[%s][voiceAgentReport][blindtransfer]',_0x55c25d[_0x1a9f('0x29')],util[_0x1a9f('0x2e')](_0x45e06e,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x1a9f('0x24')][_0x1a9f('0x1e')]=function(_0xcf7ce7){var _0x1e6c48='';try{if(this['isNotNull'](_0xcf7ce7)){logger[_0x1a9f('0x2c')](_0x1a9f('0x94'),_0xcf7ce7[_0x1a9f('0x29')],util[_0x1a9f('0x2e')](_0xcf7ce7,{'showHidden':![],'depth':null}));if(_0xcf7ce7[_0x1a9f('0x95')]){_0x1e6c48=_0xcf7ce7[_0x1a9f('0x95')][_0x1a9f('0x96')](0x0,_0xcf7ce7[_0x1a9f('0x95')][_0x1a9f('0x97')]('-'));if(this['agents'][_0x1e6c48]){logger[_0x1a9f('0x3d')]('[%s][voiceAgentReport][musiconholdstart]\x20interface:%s',_0xcf7ce7[_0x1a9f('0x29')],_0x1e6c48);this['agents'][_0x1e6c48]['onhold']=!![];}}}}catch(_0x56624b){logger[_0x1a9f('0x3c')](_0x1a9f('0x98'),_0xcf7ce7[_0x1a9f('0x29')],util[_0x1a9f('0x2e')](_0x56624b,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x1a9f('0x24')][_0x1a9f('0x20')]=function(_0x4429e9){var _0x472307='';try{if(this[_0x1a9f('0x26')](_0x4429e9)){logger[_0x1a9f('0x2c')](_0x1a9f('0x99'),_0x4429e9[_0x1a9f('0x29')],util[_0x1a9f('0x2e')](_0x4429e9,{'showHidden':![],'depth':null}));if(_0x4429e9[_0x1a9f('0x95')]){_0x472307=_0x4429e9[_0x1a9f('0x95')][_0x1a9f('0x96')](0x0,_0x4429e9['channel'][_0x1a9f('0x97')]('-'));if(this['agents'][_0x472307]){logger[_0x1a9f('0x3d')](_0x1a9f('0x9a'),_0x4429e9[_0x1a9f('0x29')],_0x472307);this[_0x1a9f('0xd')][_0x472307][_0x1a9f('0x9b')]=![];}}}}catch(_0x357f36){logger[_0x1a9f('0x3c')]('[%s][voiceAgentReport][musiconholdstop]',_0x4429e9['uniqueid'],util[_0x1a9f('0x2e')](_0x357f36,{'showHidden':![],'depth':null}));}};module[_0x1a9f('0x9c')]=VoiceAgentReport;
\ No newline at end of file