Built motion from commit (unavailable).|2.5.6
[motion2.git] / server / services / ami / report / voiceAgentReport.js
index fb18ad3..0256357 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4159=['substring','[syncMusicOnHoldStart][VoiceAgentReport]','lastIndexOf','onhold','moment','util','ioredis','../../../config/logger','ami','../ami','redis','socket.io-emitter','channels','voiceQueues','agents','syncAgentCalled','agentconnect','syncAgentConnect','bind','agentringnoanswer','syncAgentRingNoAnswer','syncQueueCallerAbandon','agentcomplete','syncAgentComplete','varset','syncVarSet','hangup','syncHangup','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','attendedtransfer','blindtransfer','syncBlindTransfer','prototype','emit','isNotNull','isUndefined','uniqueid','destuniqueid','format','YYYY-MM-DD\x20HH:mm:ss','called','variables','queue','type','inbound','merge','omit','privilege','custom:agentcalled','user:%s','membername','error','inspect','hasOwnProperty','agentconnectAt','connect','holdtime','connectedlinenum','connectedlinename','destchannelstate','destchannelstatedesc','pick','destconnectedlinenum','user:agentconnect','custom:agentconnect','agentringnoanswerAt','reason','custom:agentansweredelsewhere','[syncAgentConnect][VoiceAgentReport]','rejected','lastevent','custom:agentringnoanswer','abandoned','custom:agentqueuecallerabandon','complete','talktime','agent','acw','agentacw','acwtime','acwTimeout','interface','user:agentcomplete','custom:agentcomplete','addVariable','keys','variable','value','[syncVarSet][VoiceAgentReport]','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrttbridged','sipuri','bridgepeer','membercalls','memberinterface','memberlastcall','memberrealtime','isNil','includes','transfer','agentcompleteAt','custom:voiceAgentReport','values','syncAttendedTransfer','transfereeuniqueid','origtransfereruniqueid','diff','seconds','secondtransfereruniqueid','[syncAttendedTransfer][VoiceAgentReport]','transfereruniqueid','[syncBlindTransfer][VoiceAgentReport]','channel'];(function(_0x15239e,_0x2c8898){var _0x2e6680=function(_0x1ceec8){while(--_0x1ceec8){_0x15239e['push'](_0x15239e['shift']());}};_0x2e6680(++_0x2c8898);}(_0x4159,0x166));var _0x9415=function(_0x32eb2b,_0x4cbb99){_0x32eb2b=_0x32eb2b-0x0;var _0x149304=_0x4159[_0x32eb2b];return _0x149304;};'use strict';var _=require('lodash');var moment=require(_0x9415('0x0'));var util=require(_0x9415('0x1'));var Redis=require(_0x9415('0x2'));var config=require('../../../config/environment');var logger=require(_0x9415('0x3'))(_0x9415('0x4'));var ami=require(_0x9415('0x5'));config['redis']=_['defaults'](config[_0x9415('0x6')],{'host':'localhost','port':0x18eb});var io=require(_0x9415('0x7'))(new Redis(config[_0x9415('0x6')]));function VoiceAgentReport(_0xf02002){this[_0x9415('0x8')]={};this['voiceQueues']=_0xf02002[_0x9415('0x9')];this[_0x9415('0xa')]=_0xf02002['agents'];this['variables']={};ami['on']('agentcalled',this[_0x9415('0xb')]['bind'](this));ami['on'](_0x9415('0xc'),this[_0x9415('0xd')][_0x9415('0xe')](this));ami['on'](_0x9415('0xf'),this[_0x9415('0x10')]['bind'](this));ami['on']('queuecallerabandon',this[_0x9415('0x11')]['bind'](this));ami['on'](_0x9415('0x12'),this[_0x9415('0x13')][_0x9415('0xe')](this));ami['on'](_0x9415('0x14'),this[_0x9415('0x15')][_0x9415('0xe')](this));ami['on'](_0x9415('0x16'),this[_0x9415('0x17')][_0x9415('0xe')](this));ami['on'](_0x9415('0x18'),this[_0x9415('0x19')][_0x9415('0xe')](this));ami['on'](_0x9415('0x1a'),this['syncMusicOnHoldStop'][_0x9415('0xe')](this));ami['on'](_0x9415('0x1b'),this['syncAttendedTransfer'][_0x9415('0xe')](this));ami['on'](_0x9415('0x1c'),this[_0x9415('0x1d')]['bind'](this));}VoiceAgentReport[_0x9415('0x1e')][_0x9415('0x1f')]=function(_0x5d4e5a,_0x1fc7b2,_0x1a2de8){io['to'](_0x5d4e5a)[_0x9415('0x1f')](_0x1fc7b2,_0x1a2de8);};VoiceAgentReport[_0x9415('0x1e')][_0x9415('0x20')]=function(_0x35c2f5){return _0x35c2f5!==null&&!_[_0x9415('0x21')](_0x35c2f5);};VoiceAgentReport['prototype'][_0x9415('0xb')]=function(_0x56643a){try{if(this[_0x9415('0x20')](_0x56643a)){if(_[_0x9415('0x21')](this[_0x9415('0x8')][_0x56643a['uniqueid']])){this[_0x9415('0x8')][_0x56643a[_0x9415('0x22')]]={};}if(_[_0x9415('0x21')](this[_0x9415('0x8')][_0x56643a['uniqueid']][_0x56643a[_0x9415('0x23')]])){this['channels'][_0x56643a[_0x9415('0x22')]][_0x56643a[_0x9415('0x23')]]={'agentcalledAt':moment()[_0x9415('0x24')](_0x9415('0x25')),'lastevent':_0x9415('0x26'),'variables':this[_0x9415('0x27')][_0x56643a[_0x9415('0x22')]],'type':this[_0x9415('0x9')][_0x56643a[_0x9415('0x28')]]?this['voiceQueues'][_0x56643a[_0x9415('0x28')]][_0x9415('0x29')]||_0x9415('0x2a'):'inbound'};}_[_0x9415('0x2b')](this[_0x9415('0x8')][_0x56643a[_0x9415('0x22')]][_0x56643a['destuniqueid']],_[_0x9415('0x2c')](_0x56643a,['event',_0x9415('0x2d')]));ami[_0x9415('0x1f')](_0x9415('0x2e'),this[_0x9415('0x8')][_0x56643a[_0x9415('0x22')]][_0x56643a[_0x9415('0x23')]]);this[_0x9415('0x1f')](util['format'](_0x9415('0x2f'),_0x56643a[_0x9415('0x30')]),'user:called',this['channels'][_0x56643a[_0x9415('0x22')]][_0x56643a[_0x9415('0x23')]]);}}catch(_0x244632){logger[_0x9415('0x31')]('[syncAgentCalled][VoiceAgentReport]',util[_0x9415('0x32')](_0x244632,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0x9415('0xd')]=function(_0x2dfb49){try{if(this[_0x9415('0x20')](_0x2dfb49)){if(this['channels'][_0x2dfb49[_0x9415('0x22')]]){for(var _0x339c3c in this[_0x9415('0x8')][_0x2dfb49[_0x9415('0x22')]]){if(this['channels'][_0x2dfb49['uniqueid']][_0x9415('0x33')](_0x339c3c)){if(_0x2dfb49[_0x9415('0x23')]===_0x339c3c){this[_0x9415('0x8')][_0x2dfb49['uniqueid']][_0x339c3c][_0x9415('0x34')]=moment()['format'](_0x9415('0x25'));this[_0x9415('0x8')][_0x2dfb49[_0x9415('0x22')]][_0x339c3c]['lastevent']=_0x9415('0x35');this[_0x9415('0x8')][_0x2dfb49[_0x9415('0x22')]][_0x339c3c]['holdtime']=_0x2dfb49[_0x9415('0x36')];this[_0x9415('0x8')][_0x2dfb49[_0x9415('0x22')]][_0x339c3c][_0x9415('0x37')]=_0x2dfb49[_0x9415('0x37')];this[_0x9415('0x8')][_0x2dfb49[_0x9415('0x22')]][_0x339c3c]['connectedlinename']=_0x2dfb49[_0x9415('0x38')];this[_0x9415('0x8')][_0x2dfb49[_0x9415('0x22')]][_0x339c3c][_0x9415('0x39')]=_0x2dfb49[_0x9415('0x39')];this[_0x9415('0x8')][_0x2dfb49['uniqueid']][_0x339c3c][_0x9415('0x3a')]=_0x2dfb49[_0x9415('0x3a')];_[_0x9415('0x2b')](this[_0x9415('0xa')][_0x2dfb49['interface']],_[_0x9415('0x3b')](_0x2dfb49,[_0x9415('0x28'),_0x9415('0x3c')]));this[_0x9415('0x1f')](util['format']('user:%s',_0x2dfb49[_0x9415('0x30')]),_0x9415('0x3d'),this[_0x9415('0x8')][_0x2dfb49[_0x9415('0x22')]][_0x2dfb49[_0x9415('0x23')]]);ami[_0x9415('0x1f')](_0x9415('0x3e'),this[_0x9415('0x8')][_0x2dfb49[_0x9415('0x22')]][_0x339c3c]);}else if(!this[_0x9415('0x8')][_0x2dfb49[_0x9415('0x22')]][_0x339c3c]['agentringnoanswer']&&!this['channels'][_0x2dfb49['uniqueid']][_0x339c3c][_0x9415('0x12')]){this[_0x9415('0x8')][_0x2dfb49['uniqueid']][_0x339c3c][_0x9415('0xf')]=!![];this[_0x9415('0x8')][_0x2dfb49[_0x9415('0x22')]][_0x339c3c][_0x9415('0x3f')]=moment()[_0x9415('0x24')]('YYYY-MM-DD\x20HH:mm:ss');this[_0x9415('0x8')][_0x2dfb49[_0x9415('0x22')]][_0x339c3c][_0x9415('0x40')]='answered_elsewhere';this[_0x9415('0x8')][_0x2dfb49[_0x9415('0x22')]][_0x339c3c]['lastevent']='answered_elsewhere';this[_0x9415('0x8')][_0x2dfb49[_0x9415('0x22')]][_0x339c3c]['answeredelsewheredestinationuniqueid']=_0x2dfb49[_0x9415('0x23')];this[_0x9415('0x8')][_0x2dfb49[_0x9415('0x22')]][_0x339c3c]['answeredelsewheremembername']=_0x2dfb49['membername'];ami['emit'](_0x9415('0x41'),this[_0x9415('0x8')][_0x2dfb49[_0x9415('0x22')]][_0x339c3c]);}}}}}}catch(_0x4f6650){logger[_0x9415('0x31')](_0x9415('0x42'),util[_0x9415('0x32')](_0x4f6650,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0x9415('0x10')]=function(_0x27909c){try{if(this[_0x9415('0x20')](_0x27909c)){if(this[_0x9415('0x8')][_0x27909c['uniqueid']]&&this[_0x9415('0x8')][_0x27909c['uniqueid']][_0x27909c[_0x9415('0x23')]]){this[_0x9415('0x8')][_0x27909c['uniqueid']][_0x27909c[_0x9415('0x23')]]['agentringnoanswer']=!![];this[_0x9415('0x8')][_0x27909c[_0x9415('0x22')]][_0x27909c['destuniqueid']][_0x9415('0x3f')]=moment()[_0x9415('0x24')](_0x9415('0x25'));this[_0x9415('0x8')][_0x27909c[_0x9415('0x22')]][_0x27909c[_0x9415('0x23')]][_0x9415('0x40')]=_0x9415('0x43');this['channels'][_0x27909c[_0x9415('0x22')]][_0x27909c[_0x9415('0x23')]][_0x9415('0x44')]=_0x9415('0x43');ami[_0x9415('0x1f')](_0x9415('0x45'),this['channels'][_0x27909c[_0x9415('0x22')]][_0x27909c['destuniqueid']]);}}}catch(_0x4d5879){logger[_0x9415('0x31')]('[syncAgentRingNoAnswer][VoiceAgentReport]',util[_0x9415('0x32')](_0x4d5879,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x9415('0x1e')][_0x9415('0x11')]=function(_0x4054c2){try{if(this['isNotNull'](_0x4054c2)){if(this['channels'][_0x4054c2[_0x9415('0x22')]]){for(var _0x5b5b2b in this[_0x9415('0x8')][_0x4054c2[_0x9415('0x22')]]){if(this[_0x9415('0x8')][_0x4054c2['uniqueid']][_0x9415('0x33')](_0x5b5b2b)&&!this[_0x9415('0x8')][_0x4054c2['uniqueid']][_0x5b5b2b][_0x9415('0xf')]&&!this[_0x9415('0x8')][_0x4054c2['uniqueid']][_0x5b5b2b][_0x9415('0x12')]){this[_0x9415('0x8')][_0x4054c2[_0x9415('0x22')]][_0x5b5b2b][_0x9415('0xf')]=!![];this['channels'][_0x4054c2['uniqueid']][_0x5b5b2b][_0x9415('0x3f')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');this[_0x9415('0x8')][_0x4054c2[_0x9415('0x22')]][_0x5b5b2b][_0x9415('0x40')]=_0x9415('0x46');this[_0x9415('0x8')][_0x4054c2[_0x9415('0x22')]][_0x5b5b2b][_0x9415('0x44')]=_0x9415('0x46');ami['emit'](_0x9415('0x47'),this[_0x9415('0x8')][_0x4054c2[_0x9415('0x22')]][_0x5b5b2b]);}}}}}catch(_0x19488c){logger[_0x9415('0x31')]('[syncQueueCallerAbandon][VoiceAgentReport]',util[_0x9415('0x32')](_0x19488c,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x9415('0x1e')][_0x9415('0x13')]=function(_0x445b72){try{if(this['isNotNull'](_0x445b72)){if(this[_0x9415('0x8')][_0x445b72['uniqueid']]){for(var _0x3ce72d in this[_0x9415('0x8')][_0x445b72[_0x9415('0x22')]]){if(this[_0x9415('0x8')][_0x445b72[_0x9415('0x22')]][_0x9415('0x33')](_0x3ce72d)){if(this[_0x9415('0x8')][_0x445b72[_0x9415('0x22')]][_0x3ce72d]['agentconnectAt']&&!this[_0x9415('0x8')][_0x445b72[_0x9415('0x22')]][_0x3ce72d][_0x9415('0x12')]){this[_0x9415('0x8')][_0x445b72[_0x9415('0x22')]][_0x3ce72d][_0x9415('0x12')]=!![];this[_0x9415('0x8')][_0x445b72[_0x9415('0x22')]][_0x3ce72d]['agentcompleteAt']=moment()[_0x9415('0x24')](_0x9415('0x25'));this[_0x9415('0x8')][_0x445b72[_0x9415('0x22')]][_0x3ce72d][_0x9415('0x44')]=_0x9415('0x48');this[_0x9415('0x8')][_0x445b72['uniqueid']][_0x3ce72d][_0x9415('0x49')]=_0x445b72[_0x9415('0x49')];this[_0x9415('0x8')][_0x445b72['uniqueid']][_0x3ce72d]['reason']=_0x445b72[_0x9415('0x40')]=='transfer'?_0x9415('0x4a'):_0x445b72[_0x9415('0x40')];if(this[_0x9415('0x9')][_0x445b72[_0x9415('0x28')]]&&this[_0x9415('0x9')][_0x445b72[_0x9415('0x28')]][_0x9415('0x4b')]){this[_0x9415('0x8')][_0x445b72[_0x9415('0x22')]][_0x3ce72d][_0x9415('0x4c')]=!![];this['channels'][_0x445b72[_0x9415('0x22')]][_0x3ce72d][_0x9415('0x4d')]=this['voiceQueues'][_0x445b72[_0x9415('0x28')]][_0x9415('0x4e')];}this[_0x9415('0xa')][_0x445b72['interface']]=_[_0x9415('0x2c')](this[_0x9415('0xa')][_0x445b72[_0x9415('0x4f')]],['queue',_0x9415('0x3c')]);this[_0x9415('0x1f')](util['format']('user:%s',_0x445b72[_0x9415('0x30')]),_0x9415('0x50'),this[_0x9415('0x8')][_0x445b72['uniqueid']][_0x3ce72d]);ami[_0x9415('0x1f')](_0x9415('0x51'),this['channels'][_0x445b72[_0x9415('0x22')]][_0x3ce72d]);}}}}}}catch(_0x2e31dd){logger[_0x9415('0x31')]('[syncAgentComplete][VoiceAgentReport]',util[_0x9415('0x32')](_0x2e31dd,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x9415('0x1e')][_0x9415('0x15')]=function(_0x1090ff){try{if(this[_0x9415('0x20')](_0x1090ff)){this[_0x9415('0x52')](_0x1090ff['uniqueid'],_[_0x9415('0x53')](_0x1090ff[_0x9415('0x54')])[0x0],_0x1090ff[_0x9415('0x55')]);if(this[_0x9415('0x8')][_0x1090ff['uniqueid']]){for(var _0xd506bf in this[_0x9415('0x8')][_0x1090ff['uniqueid']]){if(this['channels'][_0x1090ff[_0x9415('0x22')]]['hasOwnProperty'](_0xd506bf)){if(_[_0x9415('0x21')](this['channels'][_0x1090ff[_0x9415('0x22')]][_0xd506bf][_0x9415('0x27')])){this[_0x9415('0x8')][_0x1090ff[_0x9415('0x22')]][_0xd506bf]['variables']={};}this[_0x9415('0x8')][_0x1090ff[_0x9415('0x22')]][_0xd506bf]['variables']=this[_0x9415('0x27')][_0x1090ff[_0x9415('0x22')]];}}}}}catch(_0x1978ea){logger[_0x9415('0x31')](_0x9415('0x56'),util[_0x9415('0x32')](_0x1978ea,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0x9415('0x52')]=function(_0x5dedf4,_0x117c22,_0x503b61){var _0x88c981=['rtpaudioqos','rtpaudioqosbridged',_0x9415('0x57'),_0x9415('0x58'),_0x9415('0x59'),_0x9415('0x5a'),'rtpaudioqosrtt',_0x9415('0x5b'),'sipcallid',_0x9415('0x5c'),_0x9415('0x5d'),'bridgepvtcallid',_0x9415('0x5e'),'memberdynamic',_0x9415('0x5f'),_0x9415('0x60'),_0x9415('0x30'),'memberpenalty',_0x9415('0x61')];if(!_[_0x9415('0x62')](_0x117c22)&&!_[_0x9415('0x63')](_0x88c981,_0x117c22)){if(_['isUndefined'](this[_0x9415('0x27')][_0x5dedf4])){this[_0x9415('0x27')][_0x5dedf4]={};}this[_0x9415('0x27')][_0x5dedf4][_0x117c22]=_0x503b61;}};VoiceAgentReport['prototype'][_0x9415('0x17')]=function(_0x2be34a){try{if(this[_0x9415('0x20')](_0x2be34a)){if(this[_0x9415('0x8')][_0x2be34a[_0x9415('0x22')]]){for(var _0x4fca67 in this[_0x9415('0x8')][_0x2be34a[_0x9415('0x22')]]){if(this[_0x9415('0x8')][_0x2be34a[_0x9415('0x22')]]['hasOwnProperty'](_0x4fca67)){if(this[_0x9415('0x8')][_0x2be34a[_0x9415('0x22')]][_0x4fca67]['reason']==_0x9415('0x64')&&this['channels'][_0x2be34a[_0x9415('0x22')]][_0x4fca67][_0x9415('0x12')]){this[_0x9415('0x8')][_0x2be34a[_0x9415('0x22')]][_0x4fca67][_0x9415('0x65')]=moment()[_0x9415('0x24')](_0x9415('0x25'));}}}ami[_0x9415('0x1f')](_0x9415('0x66'),_[_0x9415('0x67')](this[_0x9415('0x8')][_0x2be34a['uniqueid']]));delete this[_0x9415('0x8')][_0x2be34a[_0x9415('0x22')]];}if(this[_0x9415('0x27')][_0x2be34a[_0x9415('0x22')]]){delete this[_0x9415('0x27')][_0x2be34a[_0x9415('0x22')]];}}}catch(_0x512d5f){logger[_0x9415('0x31')]('[syncHangup][VoiceAgentReport]',util[_0x9415('0x32')](_0x512d5f,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x9415('0x1e')][_0x9415('0x68')]=function(_0x22eb3d){try{if(this[_0x9415('0x20')](_0x22eb3d)){if(this[_0x9415('0x8')][_0x22eb3d[_0x9415('0x69')]]){for(var _0x3989cb in this[_0x9415('0x8')][_0x22eb3d[_0x9415('0x69')]]){if(this[_0x9415('0x8')][_0x22eb3d['transfereeuniqueid']]['hasOwnProperty'](_0x3989cb)){if(_0x22eb3d[_0x9415('0x6a')]===_0x3989cb){var _0x10d581=moment();this[_0x9415('0x8')][_0x22eb3d['transfereeuniqueid']][_0x3989cb]['agentcomplete']=!![];this[_0x9415('0x8')][_0x22eb3d[_0x9415('0x69')]][_0x3989cb]['agentcompleteAt']=moment()[_0x9415('0x24')]('YYYY-MM-DD\x20HH:mm:ss');this[_0x9415('0x8')][_0x22eb3d[_0x9415('0x69')]][_0x3989cb][_0x9415('0x40')]='transfer';this['channels'][_0x22eb3d[_0x9415('0x69')]][_0x3989cb][_0x9415('0x44')]='complete';this[_0x9415('0x8')][_0x22eb3d[_0x9415('0x69')]][_0x3989cb]['talktime']=_0x10d581[_0x9415('0x6b')](this['channels'][_0x22eb3d[_0x9415('0x69')]][_0x3989cb]['agentconnectAt'],_0x9415('0x6c'));}}}}if(this[_0x9415('0x8')][_0x22eb3d[_0x9415('0x6d')]]){var _0x2b8804=this[_0x9415('0x8')][_0x22eb3d[_0x9415('0x6d')]];this[_0x9415('0x8')][_0x22eb3d[_0x9415('0x6d')]]=this['channels'][_0x22eb3d['transfereeuniqueid']];this['channels'][_0x22eb3d['transfereeuniqueid']]=_0x2b8804;}}}catch(_0x118bfe){logger[_0x9415('0x31')](_0x9415('0x6e'),util[_0x9415('0x32')](_0x118bfe,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0x9415('0x1d')]=function(_0x4922d2){try{if(this[_0x9415('0x20')](_0x4922d2)){if(this[_0x9415('0x8')][_0x4922d2['transfereeuniqueid']]){for(var _0x57496d in this[_0x9415('0x8')][_0x4922d2['transfereeuniqueid']]){if(this[_0x9415('0x8')][_0x4922d2[_0x9415('0x69')]][_0x9415('0x33')](_0x57496d)){if(_0x4922d2[_0x9415('0x6f')]===_0x57496d){var _0xafc1b7=moment();this['channels'][_0x4922d2[_0x9415('0x69')]][_0x57496d]['agentcomplete']=!![];this[_0x9415('0x8')][_0x4922d2[_0x9415('0x69')]][_0x57496d][_0x9415('0x65')]=_0xafc1b7;this[_0x9415('0x8')][_0x4922d2['transfereeuniqueid']][_0x57496d][_0x9415('0x40')]=_0x9415('0x64');this[_0x9415('0x8')][_0x4922d2['transfereeuniqueid']][_0x57496d]['lastevent']=_0x9415('0x48');this[_0x9415('0x8')][_0x4922d2[_0x9415('0x69')]][_0x57496d]['talktime']=_0xafc1b7[_0x9415('0x6b')](this[_0x9415('0x8')][_0x4922d2[_0x9415('0x69')]][_0x57496d][_0x9415('0x34')],_0x9415('0x6c'));}}}}}}catch(_0xd52fc0){logger['error'](_0x9415('0x70'),util[_0x9415('0x32')](_0xd52fc0,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0x9415('0x19')]=function(_0x4dc9f6){var _0x3025e2='';try{if(this[_0x9415('0x20')](_0x4dc9f6)){if(_0x4dc9f6[_0x9415('0x71')]){_0x3025e2=_0x4dc9f6[_0x9415('0x71')][_0x9415('0x72')](0x0,_0x4dc9f6['channel']['lastIndexOf']('-'));if(this[_0x9415('0xa')][_0x3025e2]){this[_0x9415('0xa')][_0x3025e2]['onhold']=!![];}}}}catch(_0x56e3fd){logger['error'](_0x9415('0x73'),util[_0x9415('0x32')](_0x56e3fd,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x9415('0x1e')]['syncMusicOnHoldStop']=function(_0x53b3af){var _0x45d263='';try{if(this[_0x9415('0x20')](_0x53b3af)){if(_0x53b3af[_0x9415('0x71')]){_0x45d263=_0x53b3af[_0x9415('0x71')][_0x9415('0x72')](0x0,_0x53b3af['channel'][_0x9415('0x74')]('-'));if(this['agents'][_0x45d263]){this['agents'][_0x45d263][_0x9415('0x75')]=![];}}}}catch(_0x13bb81){logger[_0x9415('0x31')]('[syncMusicOnHoldStop][VoiceAgentReport]',util['inspect'](_0x13bb81,{'showHidden':![],'depth':null}));}};module['exports']=VoiceAgentReport;
\ No newline at end of file
+var _0x737b=['memberdynamic','memberinterface','memberlastcall','memberrealtime','isNil','includes','agentcompleteAt','custom:voiceAgentReport','values','[syncHangup][VoiceAgentReport]','transfereeuniqueid','origtransfereruniqueid','seconds','transfereruniqueid','substring','channel','lastIndexOf','[syncMusicOnHoldStart][VoiceAgentReport]','onhold','[syncMusicOnHoldStop][VoiceAgentReport]','exports','lodash','moment','util','ioredis','../../../config/environment','../../../config/logger','redis','localhost','socket.io-emitter','channels','voiceQueues','agents','agentcalled','syncAgentCalled','bind','agentconnect','syncAgentConnect','agentringnoanswer','syncAgentRingNoAnswer','queuecallerabandon','syncQueueCallerAbandon','hangup','syncHangup','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','prototype','emit','isNotNull','isUndefined','uniqueid','destuniqueid','format','YYYY-MM-DD\x20HH:mm:ss','queue','type','inbound','omit','privilege','custom:agentcalled','error','[syncAgentCalled][VoiceAgentReport]','hasOwnProperty','agentconnectAt','lastevent','holdtime','connectedlinenum','connectedlinename','destchannelstate','destchannelstatedesc','interface','pick','destconnectedlinenum','membername','user:agentconnect','custom:agentconnect','agentringnoanswerAt','answered_elsewhere','answeredelsewheredestinationuniqueid','answeredelsewheremembername','custom:agentansweredelsewhere','[syncAgentConnect][VoiceAgentReport]','inspect','reason','rejected','custom:agentringnoanswer','[syncAgentRingNoAnswer][VoiceAgentReport]','agentcomplete','custom:agentqueuecallerabandon','[syncQueueCallerAbandon][VoiceAgentReport]','complete','talktime','transfer','agent','acw','acwtime','acwTimeout','user:%s','user:agentcomplete','custom:agentcomplete','syncVarSet','addVariable','keys','variable','value','variables','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','sipuri','membercalls'];(function(_0x476422,_0x410e69){var _0x1070b0=function(_0x52e2ed){while(--_0x52e2ed){_0x476422['push'](_0x476422['shift']());}};_0x1070b0(++_0x410e69);}(_0x737b,0x183));var _0xb737=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x737b[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xb737('0x0'));var moment=require(_0xb737('0x1'));var util=require(_0xb737('0x2'));var Redis=require(_0xb737('0x3'));var config=require(_0xb737('0x4'));var logger=require(_0xb737('0x5'))('ami');var ami=require('../ami');config[_0xb737('0x6')]=_['defaults'](config[_0xb737('0x6')],{'host':_0xb737('0x7'),'port':0x18eb});var io=require(_0xb737('0x8'))(new Redis(config[_0xb737('0x6')]));function VoiceAgentReport(_0x499d17){this[_0xb737('0x9')]={};this[_0xb737('0xa')]=_0x499d17['voiceQueues'];this[_0xb737('0xb')]=_0x499d17[_0xb737('0xb')];this['variables']={};ami['on'](_0xb737('0xc'),this[_0xb737('0xd')][_0xb737('0xe')](this));ami['on'](_0xb737('0xf'),this[_0xb737('0x10')]['bind'](this));ami['on'](_0xb737('0x11'),this[_0xb737('0x12')][_0xb737('0xe')](this));ami['on'](_0xb737('0x13'),this[_0xb737('0x14')]['bind'](this));ami['on']('agentcomplete',this['syncAgentComplete'][_0xb737('0xe')](this));ami['on']('varset',this['syncVarSet'][_0xb737('0xe')](this));ami['on'](_0xb737('0x15'),this[_0xb737('0x16')][_0xb737('0xe')](this));ami['on'](_0xb737('0x17'),this[_0xb737('0x18')][_0xb737('0xe')](this));ami['on'](_0xb737('0x19'),this[_0xb737('0x1a')][_0xb737('0xe')](this));ami['on'](_0xb737('0x1b'),this[_0xb737('0x1c')]['bind'](this));ami['on'](_0xb737('0x1d'),this[_0xb737('0x1e')]['bind'](this));}VoiceAgentReport[_0xb737('0x1f')][_0xb737('0x20')]=function(_0x4bf7b2,_0x34add4,_0x3f5765){io['to'](_0x4bf7b2)['emit'](_0x34add4,_0x3f5765);};VoiceAgentReport[_0xb737('0x1f')][_0xb737('0x21')]=function(_0x35658c){return _0x35658c!==null&&!_[_0xb737('0x22')](_0x35658c);};VoiceAgentReport[_0xb737('0x1f')][_0xb737('0xd')]=function(_0x2269df){try{if(this[_0xb737('0x21')](_0x2269df)){if(_['isUndefined'](this[_0xb737('0x9')][_0x2269df['uniqueid']])){this[_0xb737('0x9')][_0x2269df[_0xb737('0x23')]]={};}if(_[_0xb737('0x22')](this[_0xb737('0x9')][_0x2269df[_0xb737('0x23')]][_0x2269df[_0xb737('0x24')]])){this[_0xb737('0x9')][_0x2269df['uniqueid']][_0x2269df[_0xb737('0x24')]]={'agentcalledAt':moment()[_0xb737('0x25')](_0xb737('0x26')),'lastevent':'called','variables':this['variables'][_0x2269df['uniqueid']],'type':this[_0xb737('0xa')][_0x2269df[_0xb737('0x27')]]?this['voiceQueues'][_0x2269df[_0xb737('0x27')]][_0xb737('0x28')]||_0xb737('0x29'):_0xb737('0x29')};}_['merge'](this[_0xb737('0x9')][_0x2269df['uniqueid']][_0x2269df[_0xb737('0x24')]],_[_0xb737('0x2a')](_0x2269df,['event',_0xb737('0x2b')]));ami['emit'](_0xb737('0x2c'),this[_0xb737('0x9')][_0x2269df[_0xb737('0x23')]][_0x2269df['destuniqueid']]);this['emit'](util[_0xb737('0x25')]('user:%s',_0x2269df['membername']),'user:called',this[_0xb737('0x9')][_0x2269df[_0xb737('0x23')]][_0x2269df[_0xb737('0x24')]]);}}catch(_0x4c4b3f){logger[_0xb737('0x2d')](_0xb737('0x2e'),util['inspect'](_0x4c4b3f,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xb737('0x1f')]['syncAgentConnect']=function(_0x313ef6){try{if(this[_0xb737('0x21')](_0x313ef6)){if(this[_0xb737('0x9')][_0x313ef6[_0xb737('0x23')]]){for(var _0x3d62bb in this[_0xb737('0x9')][_0x313ef6[_0xb737('0x23')]]){if(this[_0xb737('0x9')][_0x313ef6[_0xb737('0x23')]][_0xb737('0x2f')](_0x3d62bb)){if(_0x313ef6[_0xb737('0x24')]===_0x3d62bb){this[_0xb737('0x9')][_0x313ef6['uniqueid']][_0x3d62bb][_0xb737('0x30')]=moment()[_0xb737('0x25')](_0xb737('0x26'));this[_0xb737('0x9')][_0x313ef6['uniqueid']][_0x3d62bb][_0xb737('0x31')]='connect';this['channels'][_0x313ef6[_0xb737('0x23')]][_0x3d62bb][_0xb737('0x32')]=_0x313ef6['holdtime'];this[_0xb737('0x9')][_0x313ef6[_0xb737('0x23')]][_0x3d62bb][_0xb737('0x33')]=_0x313ef6[_0xb737('0x33')];this[_0xb737('0x9')][_0x313ef6['uniqueid']][_0x3d62bb][_0xb737('0x34')]=_0x313ef6['connectedlinename'];this[_0xb737('0x9')][_0x313ef6[_0xb737('0x23')]][_0x3d62bb]['destchannelstate']=_0x313ef6[_0xb737('0x35')];this[_0xb737('0x9')][_0x313ef6['uniqueid']][_0x3d62bb][_0xb737('0x36')]=_0x313ef6[_0xb737('0x36')];_['merge'](this['agents'][_0x313ef6[_0xb737('0x37')]],_[_0xb737('0x38')](_0x313ef6,['queue',_0xb737('0x39')]));this[_0xb737('0x20')](util[_0xb737('0x25')]('user:%s',_0x313ef6[_0xb737('0x3a')]),_0xb737('0x3b'),this['channels'][_0x313ef6[_0xb737('0x23')]][_0x313ef6[_0xb737('0x24')]]);ami[_0xb737('0x20')](_0xb737('0x3c'),this['channels'][_0x313ef6[_0xb737('0x23')]][_0x3d62bb]);}else if(!this[_0xb737('0x9')][_0x313ef6[_0xb737('0x23')]][_0x3d62bb][_0xb737('0x11')]&&!this['channels'][_0x313ef6[_0xb737('0x23')]][_0x3d62bb]['agentcomplete']){this[_0xb737('0x9')][_0x313ef6[_0xb737('0x23')]][_0x3d62bb][_0xb737('0x11')]=!![];this['channels'][_0x313ef6[_0xb737('0x23')]][_0x3d62bb][_0xb737('0x3d')]=moment()['format'](_0xb737('0x26'));this[_0xb737('0x9')][_0x313ef6[_0xb737('0x23')]][_0x3d62bb]['reason']='answered_elsewhere';this[_0xb737('0x9')][_0x313ef6[_0xb737('0x23')]][_0x3d62bb][_0xb737('0x31')]=_0xb737('0x3e');this[_0xb737('0x9')][_0x313ef6[_0xb737('0x23')]][_0x3d62bb][_0xb737('0x3f')]=_0x313ef6[_0xb737('0x24')];this[_0xb737('0x9')][_0x313ef6['uniqueid']][_0x3d62bb][_0xb737('0x40')]=_0x313ef6[_0xb737('0x3a')];ami[_0xb737('0x20')](_0xb737('0x41'),this[_0xb737('0x9')][_0x313ef6['uniqueid']][_0x3d62bb]);}}}}}}catch(_0x45c8b5){logger[_0xb737('0x2d')](_0xb737('0x42'),util[_0xb737('0x43')](_0x45c8b5,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xb737('0x1f')][_0xb737('0x12')]=function(_0x5e2844){try{if(this[_0xb737('0x21')](_0x5e2844)){if(this[_0xb737('0x9')][_0x5e2844[_0xb737('0x23')]]&&this['channels'][_0x5e2844['uniqueid']][_0x5e2844[_0xb737('0x24')]]){this[_0xb737('0x9')][_0x5e2844['uniqueid']][_0x5e2844[_0xb737('0x24')]][_0xb737('0x11')]=!![];this['channels'][_0x5e2844[_0xb737('0x23')]][_0x5e2844[_0xb737('0x24')]]['agentringnoanswerAt']=moment()[_0xb737('0x25')](_0xb737('0x26'));this['channels'][_0x5e2844[_0xb737('0x23')]][_0x5e2844[_0xb737('0x24')]][_0xb737('0x44')]=_0xb737('0x45');this[_0xb737('0x9')][_0x5e2844[_0xb737('0x23')]][_0x5e2844['destuniqueid']][_0xb737('0x31')]='rejected';ami['emit'](_0xb737('0x46'),this[_0xb737('0x9')][_0x5e2844[_0xb737('0x23')]][_0x5e2844[_0xb737('0x24')]]);}}}catch(_0x43421c){logger['error'](_0xb737('0x47'),util[_0xb737('0x43')](_0x43421c,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xb737('0x1f')][_0xb737('0x14')]=function(_0x4877b2){try{if(this['isNotNull'](_0x4877b2)){if(this['channels'][_0x4877b2['uniqueid']]){for(var _0x1d5da9 in this[_0xb737('0x9')][_0x4877b2['uniqueid']]){if(this[_0xb737('0x9')][_0x4877b2[_0xb737('0x23')]][_0xb737('0x2f')](_0x1d5da9)&&!this[_0xb737('0x9')][_0x4877b2['uniqueid']][_0x1d5da9][_0xb737('0x11')]&&!this[_0xb737('0x9')][_0x4877b2['uniqueid']][_0x1d5da9][_0xb737('0x48')]){this[_0xb737('0x9')][_0x4877b2['uniqueid']][_0x1d5da9][_0xb737('0x11')]=!![];this['channels'][_0x4877b2[_0xb737('0x23')]][_0x1d5da9][_0xb737('0x3d')]=moment()['format'](_0xb737('0x26'));this['channels'][_0x4877b2[_0xb737('0x23')]][_0x1d5da9][_0xb737('0x44')]='abandoned';this['channels'][_0x4877b2['uniqueid']][_0x1d5da9][_0xb737('0x31')]='abandoned';ami[_0xb737('0x20')](_0xb737('0x49'),this[_0xb737('0x9')][_0x4877b2['uniqueid']][_0x1d5da9]);}}}}}catch(_0x288601){logger[_0xb737('0x2d')](_0xb737('0x4a'),util[_0xb737('0x43')](_0x288601,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xb737('0x1f')]['syncAgentComplete']=function(_0x28c900){try{if(this['isNotNull'](_0x28c900)){if(this[_0xb737('0x9')][_0x28c900[_0xb737('0x23')]]){for(var _0xea4d19 in this[_0xb737('0x9')][_0x28c900['uniqueid']]){if(this[_0xb737('0x9')][_0x28c900['uniqueid']][_0xb737('0x2f')](_0xea4d19)){if(this[_0xb737('0x9')][_0x28c900[_0xb737('0x23')]][_0xea4d19]['agentconnectAt']&&!this[_0xb737('0x9')][_0x28c900[_0xb737('0x23')]][_0xea4d19][_0xb737('0x48')]){this['channels'][_0x28c900[_0xb737('0x23')]][_0xea4d19][_0xb737('0x48')]=!![];this[_0xb737('0x9')][_0x28c900['uniqueid']][_0xea4d19]['agentcompleteAt']=moment()[_0xb737('0x25')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xb737('0x9')][_0x28c900[_0xb737('0x23')]][_0xea4d19][_0xb737('0x31')]=_0xb737('0x4b');this[_0xb737('0x9')][_0x28c900['uniqueid']][_0xea4d19][_0xb737('0x4c')]=_0x28c900[_0xb737('0x4c')];this['channels'][_0x28c900[_0xb737('0x23')]][_0xea4d19]['reason']=_0x28c900[_0xb737('0x44')]==_0xb737('0x4d')?_0xb737('0x4e'):_0x28c900[_0xb737('0x44')];if(this[_0xb737('0xa')][_0x28c900[_0xb737('0x27')]]&&this[_0xb737('0xa')][_0x28c900[_0xb737('0x27')]][_0xb737('0x4f')]){this['channels'][_0x28c900[_0xb737('0x23')]][_0xea4d19]['agentacw']=!![];this['channels'][_0x28c900[_0xb737('0x23')]][_0xea4d19][_0xb737('0x50')]=this['voiceQueues'][_0x28c900[_0xb737('0x27')]][_0xb737('0x51')];}this['agents'][_0x28c900[_0xb737('0x37')]]=_[_0xb737('0x2a')](this['agents'][_0x28c900[_0xb737('0x37')]],[_0xb737('0x27'),_0xb737('0x39')]);this[_0xb737('0x20')](util['format'](_0xb737('0x52'),_0x28c900[_0xb737('0x3a')]),_0xb737('0x53'),this[_0xb737('0x9')][_0x28c900[_0xb737('0x23')]][_0xea4d19]);ami[_0xb737('0x20')](_0xb737('0x54'),this[_0xb737('0x9')][_0x28c900['uniqueid']][_0xea4d19]);}}}}}}catch(_0x266a00){logger['error']('[syncAgentComplete][VoiceAgentReport]',util[_0xb737('0x43')](_0x266a00,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xb737('0x1f')][_0xb737('0x55')]=function(_0x250c46){try{if(this[_0xb737('0x21')](_0x250c46)){this[_0xb737('0x56')](_0x250c46['uniqueid'],_[_0xb737('0x57')](_0x250c46[_0xb737('0x58')])[0x0],_0x250c46[_0xb737('0x59')]);if(this['channels'][_0x250c46[_0xb737('0x23')]]){for(var _0x419a89 in this['channels'][_0x250c46[_0xb737('0x23')]]){if(this[_0xb737('0x9')][_0x250c46[_0xb737('0x23')]][_0xb737('0x2f')](_0x419a89)){if(_[_0xb737('0x22')](this['channels'][_0x250c46['uniqueid']][_0x419a89][_0xb737('0x5a')])){this['channels'][_0x250c46['uniqueid']][_0x419a89][_0xb737('0x5a')]={};}this[_0xb737('0x9')][_0x250c46[_0xb737('0x23')]][_0x419a89][_0xb737('0x5a')]=this[_0xb737('0x5a')][_0x250c46[_0xb737('0x23')]];}}}}}catch(_0x2c0940){logger[_0xb737('0x2d')]('[syncVarSet][VoiceAgentReport]',util['inspect'](_0x2c0940,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xb737('0x1f')][_0xb737('0x56')]=function(_0x9c6b69,_0x5c3a77,_0x530067){var _0x45f507=[_0xb737('0x5b'),_0xb737('0x5c'),_0xb737('0x5d'),_0xb737('0x5e'),'rtpaudioqosloss',_0xb737('0x5f'),_0xb737('0x60'),_0xb737('0x61'),_0xb737('0x62'),_0xb737('0x63'),'bridgepeer','bridgepvtcallid',_0xb737('0x64'),_0xb737('0x65'),_0xb737('0x66'),_0xb737('0x67'),_0xb737('0x3a'),'memberpenalty',_0xb737('0x68')];if(!_[_0xb737('0x69')](_0x5c3a77)&&!_[_0xb737('0x6a')](_0x45f507,_0x5c3a77)){if(_['isUndefined'](this[_0xb737('0x5a')][_0x9c6b69])){this['variables'][_0x9c6b69]={};}this[_0xb737('0x5a')][_0x9c6b69][_0x5c3a77]=_0x530067;}};VoiceAgentReport[_0xb737('0x1f')][_0xb737('0x16')]=function(_0x52e4c9){try{if(this[_0xb737('0x21')](_0x52e4c9)){if(this[_0xb737('0x9')][_0x52e4c9[_0xb737('0x23')]]){for(var _0x177233 in this[_0xb737('0x9')][_0x52e4c9[_0xb737('0x23')]]){if(this[_0xb737('0x9')][_0x52e4c9[_0xb737('0x23')]]['hasOwnProperty'](_0x177233)){if(this[_0xb737('0x9')][_0x52e4c9['uniqueid']][_0x177233]['reason']==_0xb737('0x4d')&&this[_0xb737('0x9')][_0x52e4c9[_0xb737('0x23')]][_0x177233][_0xb737('0x48')]){this[_0xb737('0x9')][_0x52e4c9[_0xb737('0x23')]][_0x177233][_0xb737('0x6b')]=moment()['format'](_0xb737('0x26'));}}}ami['emit'](_0xb737('0x6c'),_[_0xb737('0x6d')](this[_0xb737('0x9')][_0x52e4c9[_0xb737('0x23')]]));delete this[_0xb737('0x9')][_0x52e4c9['uniqueid']];}if(this['variables'][_0x52e4c9['uniqueid']]){delete this[_0xb737('0x5a')][_0x52e4c9[_0xb737('0x23')]];}}}catch(_0xd8b30d){logger[_0xb737('0x2d')](_0xb737('0x6e'),util[_0xb737('0x43')](_0xd8b30d,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0xb737('0x1c')]=function(_0x2debd9){try{if(this[_0xb737('0x21')](_0x2debd9)){if(this[_0xb737('0x9')][_0x2debd9[_0xb737('0x6f')]]){for(var _0xed7fdf in this[_0xb737('0x9')][_0x2debd9[_0xb737('0x6f')]]){if(this[_0xb737('0x9')][_0x2debd9['transfereeuniqueid']][_0xb737('0x2f')](_0xed7fdf)){if(_0x2debd9[_0xb737('0x70')]===_0xed7fdf){var _0x105e74=moment();this[_0xb737('0x9')][_0x2debd9[_0xb737('0x6f')]][_0xed7fdf][_0xb737('0x48')]=!![];this[_0xb737('0x9')][_0x2debd9[_0xb737('0x6f')]][_0xed7fdf][_0xb737('0x6b')]=moment()['format'](_0xb737('0x26'));this[_0xb737('0x9')][_0x2debd9[_0xb737('0x6f')]][_0xed7fdf][_0xb737('0x44')]=_0xb737('0x4d');this['channels'][_0x2debd9['transfereeuniqueid']][_0xed7fdf][_0xb737('0x31')]=_0xb737('0x4b');this[_0xb737('0x9')][_0x2debd9[_0xb737('0x6f')]][_0xed7fdf][_0xb737('0x4c')]=_0x105e74['diff'](this[_0xb737('0x9')][_0x2debd9[_0xb737('0x6f')]][_0xed7fdf][_0xb737('0x30')],_0xb737('0x71'));}}}}if(this[_0xb737('0x9')][_0x2debd9['secondtransfereruniqueid']]){var _0x160a66=this[_0xb737('0x9')][_0x2debd9['secondtransfereruniqueid']];this[_0xb737('0x9')][_0x2debd9['secondtransfereruniqueid']]=this[_0xb737('0x9')][_0x2debd9[_0xb737('0x6f')]];this[_0xb737('0x9')][_0x2debd9[_0xb737('0x6f')]]=_0x160a66;}}}catch(_0x527eb1){logger[_0xb737('0x2d')]('[syncAttendedTransfer][VoiceAgentReport]',util[_0xb737('0x43')](_0x527eb1,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xb737('0x1f')]['syncBlindTransfer']=function(_0x1828db){try{if(this[_0xb737('0x21')](_0x1828db)){if(this[_0xb737('0x9')][_0x1828db[_0xb737('0x6f')]]){for(var _0x519b42 in this[_0xb737('0x9')][_0x1828db[_0xb737('0x6f')]]){if(this[_0xb737('0x9')][_0x1828db[_0xb737('0x6f')]][_0xb737('0x2f')](_0x519b42)){if(_0x1828db[_0xb737('0x72')]===_0x519b42){var _0x4cbeda=moment();this[_0xb737('0x9')][_0x1828db[_0xb737('0x6f')]][_0x519b42]['agentcomplete']=!![];this[_0xb737('0x9')][_0x1828db[_0xb737('0x6f')]][_0x519b42][_0xb737('0x6b')]=_0x4cbeda;this[_0xb737('0x9')][_0x1828db['transfereeuniqueid']][_0x519b42][_0xb737('0x44')]='transfer';this[_0xb737('0x9')][_0x1828db[_0xb737('0x6f')]][_0x519b42][_0xb737('0x31')]='complete';this[_0xb737('0x9')][_0x1828db[_0xb737('0x6f')]][_0x519b42]['talktime']=_0x4cbeda['diff'](this[_0xb737('0x9')][_0x1828db['transfereeuniqueid']][_0x519b42]['agentconnectAt'],_0xb737('0x71'));}}}}}}catch(_0x4a7f62){logger[_0xb737('0x2d')]('[syncBlindTransfer][VoiceAgentReport]',util['inspect'](_0x4a7f62,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype']['syncMusicOnHoldStart']=function(_0x4cc227){var _0x5dae80='';try{if(this[_0xb737('0x21')](_0x4cc227)){if(_0x4cc227['channel']){_0x5dae80=_0x4cc227['channel'][_0xb737('0x73')](0x0,_0x4cc227[_0xb737('0x74')][_0xb737('0x75')]('-'));if(this['agents'][_0x5dae80]){this[_0xb737('0xb')][_0x5dae80]['onhold']=!![];}}}}catch(_0x20d728){logger[_0xb737('0x2d')](_0xb737('0x76'),util[_0xb737('0x43')](_0x20d728,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xb737('0x1f')][_0xb737('0x1a')]=function(_0x52407a){var _0xd10630='';try{if(this['isNotNull'](_0x52407a)){if(_0x52407a[_0xb737('0x74')]){_0xd10630=_0x52407a[_0xb737('0x74')][_0xb737('0x73')](0x0,_0x52407a[_0xb737('0x74')][_0xb737('0x75')]('-'));if(this['agents'][_0xd10630]){this[_0xb737('0xb')][_0xd10630][_0xb737('0x77')]=![];}}}}catch(_0x4e6600){logger[_0xb737('0x2d')](_0xb737('0x78'),util['inspect'](_0x4e6600,{'showHidden':![],'depth':null}));}};module[_0xb737('0x79')]=VoiceAgentReport;
\ No newline at end of file