Built motion from commit 1ea47bf4.|2.6.34
[motion2.git] / server / services / ami / report / index.js
index a37c391..8b19bd7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xff5c=['disabled','custom:voiceQueueReport','voiceQueueReport','bind','custom:voiceCallReport','voiceCallReport','voiceAgentReport','custom:voiceDialReport','blindtransfer','blindTransfer','attendedtransfer','attendedTransfer','prototype','findAgent','find','name','isNil','interface','format','SIP/%s','length','connectedlinenum','accountcode','assigned','lastAssignedTo','queuecallercomplete','queuecallercompleteAt','queuecallerexit','queuecallerexitAt','YYYY-MM-DD\x20HH:mm:ss','create','match','getAgentByInternal','split','calleridnum','outbound','internal','destination','type','lastapplication','queue','from-voip-provider','callerid','context','from-sip','calleridpreview','channel','destinationchannel','originatecalleridnum','disposition','ANSWERED','calleridname','linkedid','transfers','transfereelinkedid','uniqueid','UserId','membername','monitorFilename','createdAt','monitors','exten','xcally-motion-preview','connectedlinename','forEach','startsWith','Local','substring','indexOf','lastIndexOf','voiceDialReport','transfererlinkedid','lodash','moment','util','../../../config/environment','../ami','../rpc/voiceAgentReport','../rpc/voiceCallReport','../rpc/voiceDialReport','../rpc/memberReport','../rpc/voiceQueueReport','../rpc/voiceRecording','../rpc/voiceTransferReport','./voiceQueueReport','./voiceCallReport','./voiceDialReport','./userReport','realtime','agents','telephones','sync','xdr'];(function(_0x41b846,_0x11cc08){var _0x64d7a2=function(_0x1ba074){while(--_0x1ba074){_0x41b846['push'](_0x41b846['shift']());}};_0x64d7a2(++_0x11cc08);}(_0xff5c,0x15f));var _0xcff5=function(_0x545356,_0x5e3cde){_0x545356=_0x545356-0x0;var _0x58958b=_0xff5c[_0x545356];return _0x58958b;};'use strict';var _=require(_0xcff5('0x0'));var moment=require(_0xcff5('0x1'));var util=require(_0xcff5('0x2'));var config=require(_0xcff5('0x3'));var ami=require(_0xcff5('0x4'));var RpcVoiceAgentReport=require(_0xcff5('0x5'));var RpcVoiceCallReport=require(_0xcff5('0x6'));var RpcVoiceDialReport=require(_0xcff5('0x7'));var RpcMemberReport=require(_0xcff5('0x8'));var RpcVoiceQueueReport=require(_0xcff5('0x9'));var RpcVoiceRecording=require(_0xcff5('0xa'));var RpcVoiceTransferReport=require(_0xcff5('0xb'));var VoiceQueueReport=require(_0xcff5('0xc'));var VoiceCallReport=require(_0xcff5('0xd'));var VoiceAgentReport=require('./voiceAgentReport');var VoiceDialReport=require(_0xcff5('0xe'));var UserReport=require(_0xcff5('0xf'));function Report(_0xaf803c){this[_0xcff5('0x10')]=_0xaf803c;this[_0xcff5('0x11')]=_0xaf803c['agents'];this[_0xcff5('0x12')]=_0xaf803c['telephones'];}Report['prototype'][_0xcff5('0x13')]=function(_0x1fc3a4){var _0x15b916=new VoiceQueueReport(this['realtime']);var _0x5809e4=new VoiceAgentReport(this[_0xcff5('0x10')]);var _0x236754=new VoiceDialReport(this[_0xcff5('0x10')]);var _0x278ed4=new VoiceCallReport(this[_0xcff5('0x10')]);var _0x46ec2d=new UserReport(this['realtime']);if(config[_0xcff5('0x14')]&&config[_0xcff5('0x14')][_0xcff5('0x15')]){ami['on'](_0xcff5('0x16'),this[_0xcff5('0x17')][_0xcff5('0x18')](this));ami['on'](_0xcff5('0x19'),this[_0xcff5('0x1a')][_0xcff5('0x18')](this));ami['on']('custom:voiceAgentReport',this[_0xcff5('0x1b')][_0xcff5('0x18')](this));ami['on'](_0xcff5('0x1c'),this['voiceDialReport'][_0xcff5('0x18')](this));ami['on'](_0xcff5('0x1d'),this[_0xcff5('0x1e')][_0xcff5('0x18')](this));ami['on'](_0xcff5('0x1f'),this[_0xcff5('0x20')][_0xcff5('0x18')](this));}};Report[_0xcff5('0x21')][_0xcff5('0x22')]=function(_0x321cfb){var _0x3a0faa;_0x3a0faa=_[_0xcff5('0x23')](this['agents'],function(_0x50de19){return _0x50de19['accountcode']==_0x321cfb||_0x50de19[_0xcff5('0x24')]==_0x321cfb;});if(_[_0xcff5('0x25')](_0x3a0faa)){var _0x1bb5b9=_['find'](this[_0xcff5('0x12')],function(_0x4795f8){return _0x4795f8['accountcode']==_0x321cfb||_0x4795f8[_0xcff5('0x24')]==_0x321cfb;});if(_0x1bb5b9){_0x3a0faa=_['find'](this[_0xcff5('0x11')],function(_0x1fedfa){return _0x1fedfa[_0xcff5('0x26')]==util[_0xcff5('0x27')](_0xcff5('0x28'),_0x1bb5b9[_0xcff5('0x24')]);});}}return _0x3a0faa;};Report[_0xcff5('0x21')][_0xcff5('0x17')]=function(_0x3de238){for(var _0x463b63=0x0;_0x463b63<_0x3de238[_0xcff5('0x29')];_0x463b63+=0x1){var _0xc96e80=this[_0xcff5('0x22')](_0x3de238[_0x463b63][_0xcff5('0x2a')]);if(_0xc96e80){_0x3de238[_0x463b63]['accountcode']=_0xc96e80[_0xcff5('0x2b')];_0x3de238[_0x463b63][_0xcff5('0x2c')]=!![];_0x3de238[_0x463b63][_0xcff5('0x2d')]=_0xc96e80[_0xcff5('0x24')];_0x3de238[_0x463b63][_0xcff5('0x26')]=_[_0xcff5('0x25')](_0xc96e80['interface'])?util[_0xcff5('0x27')](_0xcff5('0x28'),_0xc96e80[_0xcff5('0x24')]):_0xc96e80[_0xcff5('0x26')];if(_0x3de238[_0x463b63][_0xcff5('0x2e')]){_0x3de238[_0x463b63][_0xcff5('0x2f')]=moment()[_0xcff5('0x27')]('YYYY-MM-DD\x20HH:mm:ss');}if(_0x3de238[_0x463b63][_0xcff5('0x30')]){_0x3de238[_0x463b63][_0xcff5('0x31')]=moment()['format'](_0xcff5('0x32'));}RpcMemberReport['voiceQueueReport'](_0x3de238[_0x463b63]);}RpcVoiceQueueReport[_0xcff5('0x33')](_0x3de238[_0x463b63]);}};function extractCalleridNumber(_0x30986e){var _0x2d146d=_0x30986e[_0xcff5('0x34')](/<(.*?)>/);return _0x2d146d?_0x2d146d[0x1]:_0x30986e;}Report['prototype'][_0xcff5('0x35')]=function(_0x90020a){for(var _0x2e63fd=0x0;_0x2e63fd<Object['keys'](this[_0xcff5('0x11')])['length'];_0x2e63fd++){var _0x3682c0=Object['keys'](this[_0xcff5('0x11')])[_0x2e63fd];var _0xaf0d95=this[_0xcff5('0x11')][_0x3682c0];if(_0xaf0d95[_0xcff5('0x2b')]===Number(_0x90020a))return _0xaf0d95;}return null;};Report[_0xcff5('0x21')]['getCallType']=function(_0x474c73){var _0x5c828c=_0x474c73['channel'][_0xcff5('0x36')]('-')[0x0];var _0x200266=this[_0xcff5('0x11')][_0x5c828c];if(!_0x200266)_0x200266=this[_0xcff5('0x35')](_0x474c73[_0xcff5('0x37')]);return!_0x200266?_0xcff5('0x38'):_0xcff5('0x39');};Report[_0xcff5('0x21')][_0xcff5('0x1a')]=function(_0x247445){_0x247445[_0xcff5('0x3a')]=_0x247445[_0xcff5('0x3a')]||_0x247445['exten'];if(_0x247445[_0xcff5('0x3b')]=='dialer'){_0x247445[_0xcff5('0x3c')]=_0xcff5('0x3d');_0x247445['lastdata']=_0x247445['queue'];if(_0x247445['context']==_0xcff5('0x3e')){_0x247445[_0xcff5('0x2b')]='';_0x247445[_0xcff5('0x3a')]=extractCalleridNumber(_0x247445[_0xcff5('0x3f')]);}else if(_0x247445[_0xcff5('0x40')]==_0xcff5('0x41')){if(_0x247445[_0xcff5('0x3a')]=='xcally-motion-preview'){_0x247445[_0xcff5('0x3a')]=extractCalleridNumber(_0x247445[_0xcff5('0x42')]);_0x247445['calleridnum']=_0x247445['originatecalleridnum'];_0x247445['destinationchannel']=[_0x247445[_0xcff5('0x43')],_0x247445['channel']=_0x247445[_0xcff5('0x44')]][0x0];_0x247445[_0xcff5('0x3f')]=_0x247445[_0xcff5('0x42')];}else{_0x247445[_0xcff5('0x3a')]=_0x247445[_0xcff5('0x37')];_0x247445[_0xcff5('0x37')]=_0x247445[_0xcff5('0x45')];if(_0x247445[_0xcff5('0x46')]==_0xcff5('0x47')){_0x247445[_0xcff5('0x2b')]=_0x247445[_0xcff5('0x2a')];}else{_0x247445[_0xcff5('0x2b')]='';}}}}else{_0x247445[_0xcff5('0x3f')]=util['format']('\x22%s\x22\x20<%s>',_0x247445[_0xcff5('0x48')],_0x247445[_0xcff5('0x37')]);}if(RpcVoiceTransferReport['transfers'][_0x247445[_0xcff5('0x49')]]){var _0xd0454b=RpcVoiceTransferReport[_0xcff5('0x4a')][_0x247445[_0xcff5('0x49')]];_0xd0454b[_0xcff5('0x4b')]=_0x247445[_0xcff5('0x4c')];RpcVoiceTransferReport[_0xcff5('0x1e')](_0xd0454b);delete RpcVoiceTransferReport['transfers'][_0x247445[_0xcff5('0x49')]];}if(_[_0xcff5('0x25')](_0x247445[_0xcff5('0x3b')])){_0x247445[_0xcff5('0x3b')]=this['getCallType'](_0x247445);}if(_[_0xcff5('0x25')](_0x247445['UserId'])){var _0x5f0593=_0x247445[_0xcff5('0x43')][_0xcff5('0x36')]('-')[0x0];var _0x48067a=this['agents'][_0x5f0593];if(!_0x48067a)_0x48067a=this[_0xcff5('0x35')](_0x247445[_0xcff5('0x2b')]);if(_0x48067a){_0x247445[_0xcff5('0x4d')]=_0x48067a['id'];_0x247445[_0xcff5('0x4e')]=_0x48067a[_0xcff5('0x24')];}}RpcVoiceCallReport['create'](_0x247445);if(_0x247445['monitor']){for(var _0x2be482=0x0;_0x2be482<_0x247445['monitors'][_0xcff5('0x29')];_0x2be482+=0x1){_0x247445[_0xcff5('0x4f')]=_0x247445['monitors'][_0x2be482]['filename'];_0x247445[_0xcff5('0x50')]=_0x247445[_0xcff5('0x51')][_0x2be482]['createdAt'];if(_0x247445[_0xcff5('0x52')]==_0xcff5('0x53')){_0x247445[_0xcff5('0x37')]=_0x247445[_0xcff5('0x2a')];_0x247445['calleridname']=_0x247445['connectedlinename'];_0x247445['connectedlinenum']=_0x247445[_0xcff5('0x2b')];_0x247445[_0xcff5('0x54')]=_0x247445[_0xcff5('0x4e')];_0x247445[_0xcff5('0x52')]=_0x247445[_0xcff5('0x45')];}else if(_0x247445[_0xcff5('0x52')]=='xcally-motion-dialer'){_0x247445[_0xcff5('0x37')]=_0x247445['destination'];_0x247445['exten']=_0x247445[_0xcff5('0x45')];}RpcVoiceRecording['create'](_0x247445);}}};Report['prototype'][_0xcff5('0x1b')]=function(_0x12fdcc){if(_['isArray'](_0x12fdcc)){_0x12fdcc[_0xcff5('0x55')](function(_0x21babb){RpcVoiceAgentReport[_0xcff5('0x33')](_0x21babb);});}else{RpcVoiceAgentReport[_0xcff5('0x33')](_0x12fdcc);}};Report[_0xcff5('0x21')]['voiceDialReport']=function(_0x3a17a4){RpcVoiceDialReport[_0xcff5('0x33')](_0x3a17a4);var _0x4dbe6c;var _0x5e67ab;var _0x20dbb8=_0x3a17a4['channel'];if(_[_0xcff5('0x56')](_0x20dbb8,_0xcff5('0x57'))){_0x5e67ab=_0x20dbb8[_0xcff5('0x58')](_0x20dbb8['indexOf']('/')+0x1,_0x20dbb8[_0xcff5('0x59')]('@'));_0x4dbe6c=_['find'](this['agents'],function(_0x4646e8){return _0x4646e8['mobile']==_0x5e67ab||_0x4646e8['phone']==_0x5e67ab||_0x4646e8[_0xcff5('0x2b')]==_0x5e67ab;});}else{_0x5e67ab=_0x20dbb8[_0xcff5('0x58')](_0x20dbb8[_0xcff5('0x59')]('/')+0x1,_0x20dbb8[_0xcff5('0x5a')]('-'));_0x4dbe6c=this[_0xcff5('0x22')](_0x5e67ab);}if(_0x4dbe6c){_0x3a17a4[_0xcff5('0x26')]=_[_0xcff5('0x25')](_0x4dbe6c['interface'])?util['format'](_0xcff5('0x28'),_0x4dbe6c[_0xcff5('0x24')]):_0x4dbe6c['interface'];_0x3a17a4['membername']=_0x4dbe6c[_0xcff5('0x24')];_0x3a17a4[_0xcff5('0x2b')]=_0x4dbe6c[_0xcff5('0x2b')];RpcMemberReport[_0xcff5('0x5b')](_0x3a17a4);}};Report['prototype'][_0xcff5('0x1e')]=function(_0x4175f2){RpcVoiceTransferReport[_0xcff5('0x4a')][_0x4175f2[_0xcff5('0x5c')]]=_0x4175f2;};Report[_0xcff5('0x21')][_0xcff5('0x20')]=function(_0x475026){RpcVoiceTransferReport[_0xcff5('0x20')](_0x475026);};module['exports']=Report;
\ No newline at end of file
+var _0x49a7=['internal','destination','exten','dialer','lastapplication','queue','lastdata','from-voip-provider','callerid','context','originatecalleridnum','destinationchannel','calleridpreview','disposition','ANSWERED','\x22%s\x22\x20<%s>','calleridname','linkedid','transfereelinkedid','uniqueid','transfers','type','UserId','membername','monitor','monitorFilename','monitors','createdAt','xcally-motion-preview','connectedlinename','xcally-motion-dialer','forEach','voiceDialReport','startsWith','Local','substring','indexOf','mobile','lastIndexOf','transfererlinkedid','lodash','moment','util','../ami','../rpc/voiceAgentReport','../rpc/voiceCallReport','../rpc/memberReport','../rpc/voiceQueueReport','../rpc/voiceRecording','./voiceAgentReport','./voiceDialReport','realtime','agents','telephones','prototype','xdr','custom:voiceQueueReport','voiceQueueReport','bind','custom:voiceCallReport','voiceCallReport','custom:voiceAgentReport','voiceAgentReport','custom:voiceDialReport','blindtransfer','blindTransfer','attendedTransfer','findAgent','find','accountcode','name','isNil','interface','format','SIP/%s','length','connectedlinenum','lastAssignedTo','queuecallercompleteAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexitAt','create','match','getAgentByInternal','keys','getCallType','channel','split','calleridnum','outbound'];(function(_0x1ba865,_0x110d26){var _0x35a964=function(_0x221267){while(--_0x221267){_0x1ba865['push'](_0x1ba865['shift']());}};_0x35a964(++_0x110d26);}(_0x49a7,0x82));var _0x749a=function(_0x1354f6,_0x29aee6){_0x1354f6=_0x1354f6-0x0;var _0x5cb683=_0x49a7[_0x1354f6];return _0x5cb683;};'use strict';var _=require(_0x749a('0x0'));var moment=require(_0x749a('0x1'));var util=require(_0x749a('0x2'));var config=require('../../../config/environment');var ami=require(_0x749a('0x3'));var RpcVoiceAgentReport=require(_0x749a('0x4'));var RpcVoiceCallReport=require(_0x749a('0x5'));var RpcVoiceDialReport=require('../rpc/voiceDialReport');var RpcMemberReport=require(_0x749a('0x6'));var RpcVoiceQueueReport=require(_0x749a('0x7'));var RpcVoiceRecording=require(_0x749a('0x8'));var RpcVoiceTransferReport=require('../rpc/voiceTransferReport');var VoiceQueueReport=require('./voiceQueueReport');var VoiceCallReport=require('./voiceCallReport');var VoiceAgentReport=require(_0x749a('0x9'));var VoiceDialReport=require(_0x749a('0xa'));var UserReport=require('./userReport');function Report(_0x6cd4f){this[_0x749a('0xb')]=_0x6cd4f;this[_0x749a('0xc')]=_0x6cd4f[_0x749a('0xc')];this[_0x749a('0xd')]=_0x6cd4f[_0x749a('0xd')];}Report[_0x749a('0xe')]['sync']=function(_0xb3ab8c){var _0x101cc5=new VoiceQueueReport(this[_0x749a('0xb')]);var _0x353a58=new VoiceAgentReport(this['realtime']);var _0x4905d9=new VoiceDialReport(this['realtime']);var _0x205b86=new VoiceCallReport(this[_0x749a('0xb')]);var _0xe1dcda=new UserReport(this[_0x749a('0xb')]);if(config[_0x749a('0xf')]&&config[_0x749a('0xf')]['disabled']){ami['on'](_0x749a('0x10'),this[_0x749a('0x11')][_0x749a('0x12')](this));ami['on'](_0x749a('0x13'),this[_0x749a('0x14')][_0x749a('0x12')](this));ami['on'](_0x749a('0x15'),this[_0x749a('0x16')][_0x749a('0x12')](this));ami['on'](_0x749a('0x17'),this['voiceDialReport']['bind'](this));ami['on'](_0x749a('0x18'),this[_0x749a('0x19')][_0x749a('0x12')](this));ami['on']('attendedtransfer',this[_0x749a('0x1a')][_0x749a('0x12')](this));}};Report[_0x749a('0xe')][_0x749a('0x1b')]=function(_0x49d8c0){var _0x339897;_0x339897=_[_0x749a('0x1c')](this['agents'],function(_0x56fe31){return _0x56fe31[_0x749a('0x1d')]==_0x49d8c0||_0x56fe31[_0x749a('0x1e')]==_0x49d8c0;});if(_[_0x749a('0x1f')](_0x339897)){var _0x4e4349=_[_0x749a('0x1c')](this['telephones'],function(_0x1a415a){return _0x1a415a[_0x749a('0x1d')]==_0x49d8c0||_0x1a415a['name']==_0x49d8c0;});if(_0x4e4349){_0x339897=_['find'](this[_0x749a('0xc')],function(_0x561ad1){return _0x561ad1[_0x749a('0x20')]==util[_0x749a('0x21')](_0x749a('0x22'),_0x4e4349[_0x749a('0x1e')]);});}}return _0x339897;};Report[_0x749a('0xe')][_0x749a('0x11')]=function(_0x4e77d1){for(var _0x6e43a1=0x0;_0x6e43a1<_0x4e77d1[_0x749a('0x23')];_0x6e43a1+=0x1){var _0x1c1ff7=this['findAgent'](_0x4e77d1[_0x6e43a1][_0x749a('0x24')]);if(_0x1c1ff7){_0x4e77d1[_0x6e43a1]['accountcode']=_0x1c1ff7[_0x749a('0x1d')];_0x4e77d1[_0x6e43a1]['assigned']=!![];_0x4e77d1[_0x6e43a1][_0x749a('0x25')]=_0x1c1ff7[_0x749a('0x1e')];_0x4e77d1[_0x6e43a1][_0x749a('0x20')]=_[_0x749a('0x1f')](_0x1c1ff7[_0x749a('0x20')])?util[_0x749a('0x21')]('SIP/%s',_0x1c1ff7[_0x749a('0x1e')]):_0x1c1ff7[_0x749a('0x20')];if(_0x4e77d1[_0x6e43a1]['queuecallercomplete']){_0x4e77d1[_0x6e43a1][_0x749a('0x26')]=moment()[_0x749a('0x21')](_0x749a('0x27'));}if(_0x4e77d1[_0x6e43a1]['queuecallerexit']){_0x4e77d1[_0x6e43a1][_0x749a('0x28')]=moment()[_0x749a('0x21')](_0x749a('0x27'));}RpcMemberReport['voiceQueueReport'](_0x4e77d1[_0x6e43a1]);}RpcVoiceQueueReport[_0x749a('0x29')](_0x4e77d1[_0x6e43a1]);}};function extractCalleridNumber(_0x3f12d4){var _0x5b0f9d=_0x3f12d4[_0x749a('0x2a')](/<(.*?)>/);return _0x5b0f9d?_0x5b0f9d[0x1]:_0x3f12d4;}Report[_0x749a('0xe')][_0x749a('0x2b')]=function(_0x25d84e){for(var _0x5e4a9e=0x0;_0x5e4a9e<Object[_0x749a('0x2c')](this[_0x749a('0xc')])[_0x749a('0x23')];_0x5e4a9e++){var _0x416f79=Object[_0x749a('0x2c')](this[_0x749a('0xc')])[_0x5e4a9e];var _0x237cac=this[_0x749a('0xc')][_0x416f79];if(_0x237cac[_0x749a('0x1d')]===Number(_0x25d84e))return _0x237cac;}return null;};Report[_0x749a('0xe')][_0x749a('0x2d')]=function(_0x57aabf){var _0x42e424=_0x57aabf[_0x749a('0x2e')][_0x749a('0x2f')]('-')[0x0];var _0x5c8838=this[_0x749a('0xc')][_0x42e424];if(!_0x5c8838)_0x5c8838=this['getAgentByInternal'](_0x57aabf[_0x749a('0x30')]);return!_0x5c8838?_0x749a('0x31'):_0x749a('0x32');};Report[_0x749a('0xe')][_0x749a('0x14')]=function(_0x55c488){_0x55c488['destination']=_0x55c488[_0x749a('0x33')]||_0x55c488[_0x749a('0x34')];if(_0x55c488['type']==_0x749a('0x35')){_0x55c488[_0x749a('0x36')]=_0x749a('0x37');_0x55c488[_0x749a('0x38')]=_0x55c488[_0x749a('0x37')];if(_0x55c488['context']==_0x749a('0x39')){_0x55c488[_0x749a('0x1d')]='';_0x55c488[_0x749a('0x33')]=extractCalleridNumber(_0x55c488[_0x749a('0x3a')]);}else if(_0x55c488[_0x749a('0x3b')]=='from-sip'){if(_0x55c488[_0x749a('0x33')]=='xcally-motion-preview'){_0x55c488[_0x749a('0x33')]=extractCalleridNumber(_0x55c488['calleridpreview']);_0x55c488['calleridnum']=_0x55c488[_0x749a('0x3c')];_0x55c488['destinationchannel']=[_0x55c488[_0x749a('0x2e')],_0x55c488[_0x749a('0x2e')]=_0x55c488[_0x749a('0x3d')]][0x0];_0x55c488[_0x749a('0x3a')]=_0x55c488[_0x749a('0x3e')];}else{_0x55c488['destination']=_0x55c488['calleridnum'];_0x55c488[_0x749a('0x30')]=_0x55c488[_0x749a('0x3c')];if(_0x55c488[_0x749a('0x3f')]==_0x749a('0x40')){_0x55c488['accountcode']=_0x55c488[_0x749a('0x24')];}else{_0x55c488['accountcode']='';}}}}else{_0x55c488['callerid']=util[_0x749a('0x21')](_0x749a('0x41'),_0x55c488[_0x749a('0x42')],_0x55c488[_0x749a('0x30')]);}if(RpcVoiceTransferReport['transfers'][_0x55c488[_0x749a('0x43')]]){var _0x4df814=RpcVoiceTransferReport['transfers'][_0x55c488[_0x749a('0x43')]];_0x4df814[_0x749a('0x44')]=_0x55c488[_0x749a('0x45')];RpcVoiceTransferReport[_0x749a('0x19')](_0x4df814);delete RpcVoiceTransferReport[_0x749a('0x46')][_0x55c488[_0x749a('0x43')]];}if(_[_0x749a('0x1f')](_0x55c488[_0x749a('0x47')])){_0x55c488[_0x749a('0x47')]=this[_0x749a('0x2d')](_0x55c488);}if(_['isNil'](_0x55c488['UserId'])){var _0x53fa87=_0x55c488[_0x749a('0x2e')][_0x749a('0x2f')]('-')[0x0];var _0x38eba3=this[_0x749a('0xc')][_0x53fa87];if(!_0x38eba3)_0x38eba3=this['getAgentByInternal'](_0x55c488[_0x749a('0x1d')]);if(_0x38eba3){_0x55c488[_0x749a('0x48')]=_0x38eba3['id'];_0x55c488[_0x749a('0x49')]=_0x38eba3[_0x749a('0x1e')];}}RpcVoiceCallReport[_0x749a('0x29')](_0x55c488);if(_0x55c488[_0x749a('0x4a')]){for(var _0x4ff710=0x0;_0x4ff710<_0x55c488['monitors']['length'];_0x4ff710+=0x1){_0x55c488[_0x749a('0x4b')]=_0x55c488[_0x749a('0x4c')][_0x4ff710]['filename'];_0x55c488[_0x749a('0x4d')]=_0x55c488[_0x749a('0x4c')][_0x4ff710][_0x749a('0x4d')];if(_0x55c488[_0x749a('0x34')]==_0x749a('0x4e')){_0x55c488[_0x749a('0x30')]=_0x55c488[_0x749a('0x24')];_0x55c488[_0x749a('0x42')]=_0x55c488[_0x749a('0x4f')];_0x55c488[_0x749a('0x24')]=_0x55c488[_0x749a('0x1d')];_0x55c488['connectedlinename']=_0x55c488['membername'];_0x55c488[_0x749a('0x34')]=_0x55c488[_0x749a('0x3c')];}else if(_0x55c488[_0x749a('0x34')]==_0x749a('0x50')){_0x55c488['calleridnum']=_0x55c488[_0x749a('0x33')];_0x55c488[_0x749a('0x34')]=_0x55c488[_0x749a('0x3c')];}RpcVoiceRecording[_0x749a('0x29')](_0x55c488);}}};Report[_0x749a('0xe')][_0x749a('0x16')]=function(_0x8d6725){if(_['isArray'](_0x8d6725)){_0x8d6725[_0x749a('0x51')](function(_0x2f625a){RpcVoiceAgentReport[_0x749a('0x29')](_0x2f625a);});}else{RpcVoiceAgentReport[_0x749a('0x29')](_0x8d6725);}};Report[_0x749a('0xe')][_0x749a('0x52')]=function(_0x17f9b3){RpcVoiceDialReport[_0x749a('0x29')](_0x17f9b3);var _0x10e713;var _0x2e0758;var _0x163e88=_0x17f9b3['channel'];if(_[_0x749a('0x53')](_0x163e88,_0x749a('0x54'))){_0x2e0758=_0x163e88[_0x749a('0x55')](_0x163e88[_0x749a('0x56')]('/')+0x1,_0x163e88[_0x749a('0x56')]('@'));_0x10e713=_[_0x749a('0x1c')](this[_0x749a('0xc')],function(_0x194b03){return _0x194b03[_0x749a('0x57')]==_0x2e0758||_0x194b03['phone']==_0x2e0758||_0x194b03['accountcode']==_0x2e0758;});}else{_0x2e0758=_0x163e88[_0x749a('0x55')](_0x163e88[_0x749a('0x56')]('/')+0x1,_0x163e88[_0x749a('0x58')]('-'));_0x10e713=this['findAgent'](_0x2e0758);}if(_0x10e713){_0x17f9b3[_0x749a('0x20')]=_['isNil'](_0x10e713[_0x749a('0x20')])?util[_0x749a('0x21')](_0x749a('0x22'),_0x10e713['name']):_0x10e713[_0x749a('0x20')];_0x17f9b3[_0x749a('0x49')]=_0x10e713[_0x749a('0x1e')];_0x17f9b3['accountcode']=_0x10e713['accountcode'];RpcMemberReport[_0x749a('0x52')](_0x17f9b3);}};Report['prototype']['blindTransfer']=function(_0x367d0e){RpcVoiceTransferReport[_0x749a('0x46')][_0x367d0e[_0x749a('0x59')]]=_0x367d0e;};Report[_0x749a('0xe')]['attendedTransfer']=function(_0x283865){RpcVoiceTransferReport[_0x749a('0x1a')](_0x283865);};module['exports']=Report;
\ No newline at end of file