Built motion from commit 355702c8.|2.5.41
[motion2.git] / server / services / ami / report / index.js
index babfb87..9ab9c01 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3181=['startsWith','Local','substring','indexOf','mobile','phone','lastIndexOf','exports','moment','../../../config/environment','../ami','../rpc/voiceAgentReport','../rpc/voiceCallReport','../rpc/voiceDialReport','../rpc/memberReport','../rpc/voiceQueueReport','../rpc/voiceRecording','../rpc/voiceTransferReport','./voiceAgentReport','./voiceDialReport','./userReport','agents','telephones','sync','realtime','xdr','disabled','voiceQueueReport','bind','custom:voiceCallReport','voiceCallReport','custom:voiceAgentReport','voiceDialReport','blindtransfer','blindTransfer','attendedTransfer','prototype','findAgent','find','isNil','name','interface','SIP/%s','length','connectedlinenum','accountcode','lastAssignedTo','format','queuecallercomplete','queuecallercompleteAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexit','queuecallerexitAt','create','getAgentByInternal','keys','getCallType','split','calleridnum','internal','destination','exten','queue','lastdata','from-sip','xcally-motion-preview','calleridpreview','originatecalleridnum','destinationchannel','channel','callerid','ANSWERED','\x22%s\x22\x20<%s>','calleridname','transfers','linkedid','transfereelinkedid','type','UserId','membername','monitor','createdAt','monitors','connectedlinename','xcally-motion-dialer','voiceAgentReport','isArray'];(function(_0x4c8a31,_0x2797a0){var _0x392a6f=function(_0x325faf){while(--_0x325faf){_0x4c8a31['push'](_0x4c8a31['shift']());}};_0x392a6f(++_0x2797a0);}(_0x3181,0xb6));var _0x1318=function(_0x33ca22,_0xbcc94){_0x33ca22=_0x33ca22-0x0;var _0x1790c3=_0x3181[_0x33ca22];return _0x1790c3;};'use strict';var _=require('lodash');var moment=require(_0x1318('0x0'));var util=require('util');var config=require(_0x1318('0x1'));var ami=require(_0x1318('0x2'));var RpcVoiceAgentReport=require(_0x1318('0x3'));var RpcVoiceCallReport=require(_0x1318('0x4'));var RpcVoiceDialReport=require(_0x1318('0x5'));var RpcMemberReport=require(_0x1318('0x6'));var RpcVoiceQueueReport=require(_0x1318('0x7'));var RpcVoiceRecording=require(_0x1318('0x8'));var RpcVoiceTransferReport=require(_0x1318('0x9'));var VoiceQueueReport=require('./voiceQueueReport');var VoiceCallReport=require('./voiceCallReport');var VoiceAgentReport=require(_0x1318('0xa'));var VoiceDialReport=require(_0x1318('0xb'));var UserReport=require(_0x1318('0xc'));function Report(_0x2357d7){this['realtime']=_0x2357d7;this[_0x1318('0xd')]=_0x2357d7[_0x1318('0xd')];this['telephones']=_0x2357d7[_0x1318('0xe')];}Report['prototype'][_0x1318('0xf')]=function(_0x2be793){var _0x1ae20a=new VoiceQueueReport(this[_0x1318('0x10')]);var _0x3aff8d=new VoiceAgentReport(this[_0x1318('0x10')]);var _0x1339e6=new VoiceDialReport(this[_0x1318('0x10')]);var _0x422f5b=new VoiceCallReport(this[_0x1318('0x10')]);var _0x1aff46=new UserReport(this[_0x1318('0x10')]);if(config[_0x1318('0x11')]&&config[_0x1318('0x11')][_0x1318('0x12')]){ami['on']('custom:voiceQueueReport',this[_0x1318('0x13')][_0x1318('0x14')](this));ami['on'](_0x1318('0x15'),this[_0x1318('0x16')][_0x1318('0x14')](this));ami['on'](_0x1318('0x17'),this['voiceAgentReport'][_0x1318('0x14')](this));ami['on']('custom:voiceDialReport',this[_0x1318('0x18')][_0x1318('0x14')](this));ami['on'](_0x1318('0x19'),this[_0x1318('0x1a')]['bind'](this));ami['on']('attendedtransfer',this[_0x1318('0x1b')]['bind'](this));}};Report[_0x1318('0x1c')][_0x1318('0x1d')]=function(_0x44574a){var _0x4d3448;_0x4d3448=_[_0x1318('0x1e')](this['agents'],function(_0x3e130b){return _0x3e130b['accountcode']==_0x44574a||_0x3e130b['name']==_0x44574a;});if(_[_0x1318('0x1f')](_0x4d3448)){var _0x588322=_[_0x1318('0x1e')](this[_0x1318('0xe')],function(_0x6a1095){return _0x6a1095['accountcode']==_0x44574a||_0x6a1095[_0x1318('0x20')]==_0x44574a;});if(_0x588322){_0x4d3448=_[_0x1318('0x1e')](this[_0x1318('0xd')],function(_0x4a5dfa){return _0x4a5dfa[_0x1318('0x21')]==util['format'](_0x1318('0x22'),_0x588322[_0x1318('0x20')]);});}}return _0x4d3448;};Report[_0x1318('0x1c')]['voiceQueueReport']=function(_0x5781a1){for(var _0xa87fe0=0x0;_0xa87fe0<_0x5781a1[_0x1318('0x23')];_0xa87fe0+=0x1){var _0x25be0d=this[_0x1318('0x1d')](_0x5781a1[_0xa87fe0][_0x1318('0x24')]);if(_0x25be0d){_0x5781a1[_0xa87fe0][_0x1318('0x25')]=_0x25be0d['accountcode'];_0x5781a1[_0xa87fe0]['assigned']=!![];_0x5781a1[_0xa87fe0][_0x1318('0x26')]=_0x25be0d['name'];_0x5781a1[_0xa87fe0][_0x1318('0x21')]=_[_0x1318('0x1f')](_0x25be0d[_0x1318('0x21')])?util[_0x1318('0x27')](_0x1318('0x22'),_0x25be0d['name']):_0x25be0d['interface'];if(_0x5781a1[_0xa87fe0][_0x1318('0x28')]){_0x5781a1[_0xa87fe0][_0x1318('0x29')]=moment()[_0x1318('0x27')](_0x1318('0x2a'));}if(_0x5781a1[_0xa87fe0][_0x1318('0x2b')]){_0x5781a1[_0xa87fe0][_0x1318('0x2c')]=moment()[_0x1318('0x27')](_0x1318('0x2a'));}RpcMemberReport[_0x1318('0x13')](_0x5781a1[_0xa87fe0]);}RpcVoiceQueueReport[_0x1318('0x2d')](_0x5781a1[_0xa87fe0]);}};function extractCalleridNumber(_0x33e640){var _0x506a5a=_0x33e640['match'](/<(.*?)>/);return _0x506a5a?_0x506a5a[0x1]:_0x33e640;}Report[_0x1318('0x1c')][_0x1318('0x2e')]=function(_0x4ac00d){for(var _0x3cd0a0=0x0;_0x3cd0a0<Object[_0x1318('0x2f')](this[_0x1318('0xd')])[_0x1318('0x23')];_0x3cd0a0++){var _0x3d9ed0=Object[_0x1318('0x2f')](this[_0x1318('0xd')])[_0x3cd0a0];var _0x5abfa3=this['agents'][_0x3d9ed0];if(_0x5abfa3[_0x1318('0x25')]===Number(_0x4ac00d))return _0x5abfa3;}return null;};Report['prototype'][_0x1318('0x30')]=function(_0x1c2c29){var _0x7a34e2=_0x1c2c29['channel'][_0x1318('0x31')]('-')[0x0];var _0xf0b705=this[_0x1318('0xd')][_0x7a34e2];if(!_0xf0b705)_0xf0b705=this[_0x1318('0x2e')](_0x1c2c29[_0x1318('0x32')]);return!_0xf0b705?'outbound':_0x1318('0x33');};Report[_0x1318('0x1c')]['voiceCallReport']=function(_0x1e7688){_0x1e7688['destination']=_0x1e7688[_0x1318('0x34')]||_0x1e7688[_0x1318('0x35')];if(_0x1e7688['type']=='dialer'){_0x1e7688['lastapplication']=_0x1318('0x36');_0x1e7688[_0x1318('0x37')]=_0x1e7688[_0x1318('0x36')];if(_0x1e7688['context']=='from-voip-provider'){_0x1e7688[_0x1318('0x25')]='';_0x1e7688[_0x1318('0x34')]=extractCalleridNumber(_0x1e7688['callerid']);}else if(_0x1e7688['context']==_0x1318('0x38')){if(_0x1e7688[_0x1318('0x34')]==_0x1318('0x39')){_0x1e7688[_0x1318('0x34')]=extractCalleridNumber(_0x1e7688[_0x1318('0x3a')]);_0x1e7688[_0x1318('0x32')]=_0x1e7688[_0x1318('0x3b')];_0x1e7688[_0x1318('0x3c')]=[_0x1e7688[_0x1318('0x3d')],_0x1e7688[_0x1318('0x3d')]=_0x1e7688[_0x1318('0x3c')]][0x0];_0x1e7688[_0x1318('0x3e')]=_0x1e7688[_0x1318('0x3a')];}else{_0x1e7688[_0x1318('0x34')]=_0x1e7688[_0x1318('0x32')];_0x1e7688[_0x1318('0x32')]=_0x1e7688[_0x1318('0x3b')];if(_0x1e7688['disposition']==_0x1318('0x3f')){_0x1e7688[_0x1318('0x25')]=_0x1e7688[_0x1318('0x24')];}else{_0x1e7688[_0x1318('0x25')]='';}}}}else{_0x1e7688[_0x1318('0x3e')]=util[_0x1318('0x27')](_0x1318('0x40'),_0x1e7688[_0x1318('0x41')],_0x1e7688['calleridnum']);}if(RpcVoiceTransferReport[_0x1318('0x42')][_0x1e7688['linkedid']]){var _0x271981=RpcVoiceTransferReport[_0x1318('0x42')][_0x1e7688[_0x1318('0x43')]];_0x271981[_0x1318('0x44')]=_0x1e7688['uniqueid'];RpcVoiceTransferReport[_0x1318('0x1a')](_0x271981);delete RpcVoiceTransferReport['transfers'][_0x1e7688[_0x1318('0x43')]];}if(_[_0x1318('0x1f')](_0x1e7688[_0x1318('0x45')])){_0x1e7688[_0x1318('0x45')]=this[_0x1318('0x30')](_0x1e7688);}if(_['isNil'](_0x1e7688[_0x1318('0x46')])){var _0x1316ae=_0x1e7688[_0x1318('0x3d')][_0x1318('0x31')]('-')[0x0];var _0x44100a=this[_0x1318('0xd')][_0x1316ae];if(!_0x44100a)_0x44100a=this[_0x1318('0x2e')](_0x1e7688[_0x1318('0x25')]);if(_0x44100a){_0x1e7688[_0x1318('0x46')]=_0x44100a['id'];_0x1e7688[_0x1318('0x47')]=_0x44100a[_0x1318('0x20')];}}RpcVoiceCallReport[_0x1318('0x2d')](_0x1e7688);if(_0x1e7688[_0x1318('0x48')]){for(var _0x19593e=0x0;_0x19593e<_0x1e7688['monitors'][_0x1318('0x23')];_0x19593e+=0x1){_0x1e7688['monitorFilename']=_0x1e7688['monitors'][_0x19593e]['filename'];_0x1e7688[_0x1318('0x49')]=_0x1e7688[_0x1318('0x4a')][_0x19593e][_0x1318('0x49')];if(_0x1e7688['exten']==_0x1318('0x39')){_0x1e7688['calleridnum']=_0x1e7688[_0x1318('0x24')];_0x1e7688[_0x1318('0x41')]=_0x1e7688[_0x1318('0x4b')];_0x1e7688[_0x1318('0x24')]=_0x1e7688[_0x1318('0x25')];_0x1e7688[_0x1318('0x4b')]=_0x1e7688['membername'];_0x1e7688['exten']=_0x1e7688[_0x1318('0x3b')];}else if(_0x1e7688[_0x1318('0x35')]==_0x1318('0x4c')){_0x1e7688['calleridnum']=_0x1e7688[_0x1318('0x34')];_0x1e7688['exten']=_0x1e7688[_0x1318('0x3b')];}RpcVoiceRecording[_0x1318('0x2d')](_0x1e7688);}}};Report[_0x1318('0x1c')][_0x1318('0x4d')]=function(_0x1d11b6){if(_[_0x1318('0x4e')](_0x1d11b6)){_0x1d11b6['forEach'](function(_0x40241d){RpcVoiceAgentReport[_0x1318('0x2d')](_0x40241d);});}else{RpcVoiceAgentReport[_0x1318('0x2d')](_0x1d11b6);}};Report[_0x1318('0x1c')][_0x1318('0x18')]=function(_0x275301){RpcVoiceDialReport['create'](_0x275301);var _0x4d83e0;var _0x27447f;var _0x5c449a=_0x275301[_0x1318('0x3d')];if(_[_0x1318('0x4f')](_0x5c449a,_0x1318('0x50'))){_0x27447f=_0x5c449a[_0x1318('0x51')](_0x5c449a['indexOf']('/')+0x1,_0x5c449a[_0x1318('0x52')]('@'));_0x4d83e0=_[_0x1318('0x1e')](this['agents'],function(_0x6f7f73){return _0x6f7f73[_0x1318('0x53')]==_0x27447f||_0x6f7f73[_0x1318('0x54')]==_0x27447f||_0x6f7f73[_0x1318('0x25')]==_0x27447f;});}else{_0x27447f=_0x5c449a[_0x1318('0x51')](_0x5c449a[_0x1318('0x52')]('/')+0x1,_0x5c449a[_0x1318('0x55')]('-'));_0x4d83e0=this[_0x1318('0x1d')](_0x27447f);}if(_0x4d83e0){_0x275301[_0x1318('0x21')]=_[_0x1318('0x1f')](_0x4d83e0[_0x1318('0x21')])?util[_0x1318('0x27')](_0x1318('0x22'),_0x4d83e0[_0x1318('0x20')]):_0x4d83e0[_0x1318('0x21')];_0x275301[_0x1318('0x47')]=_0x4d83e0[_0x1318('0x20')];_0x275301[_0x1318('0x25')]=_0x4d83e0['accountcode'];RpcMemberReport[_0x1318('0x18')](_0x275301);}};Report['prototype'][_0x1318('0x1a')]=function(_0x2d601a){RpcVoiceTransferReport['transfers'][_0x2d601a['transfererlinkedid']]=_0x2d601a;};Report[_0x1318('0x1c')][_0x1318('0x1b')]=function(_0x5e4917){RpcVoiceTransferReport[_0x1318('0x1b')](_0x5e4917);};module[_0x1318('0x56')]=Report;
\ No newline at end of file
+var _0xdfde=['./voiceCallReport','./voiceAgentReport','./voiceDialReport','realtime','agents','telephones','prototype','sync','xdr','custom:voiceQueueReport','voiceQueueReport','bind','voiceCallReport','custom:voiceAgentReport','voiceAgentReport','custom:voiceDialReport','blindtransfer','blindTransfer','attendedtransfer','attendedTransfer','findAgent','find','accountcode','name','interface','SIP/%s','connectedlinenum','assigned','lastAssignedTo','queuecallercomplete','queuecallercompleteAt','format','YYYY-MM-DD\x20HH:mm:ss','queuecallerexit','queuecallerexitAt','create','match','getAgentByInternal','keys','length','getCallType','channel','outbound','internal','destination','exten','type','lastapplication','queue','lastdata','context','from-voip-provider','callerid','from-sip','xcally-motion-preview','calleridpreview','calleridnum','originatecalleridnum','destinationchannel','ANSWERED','\x22%s\x22\x20<%s>','transfers','linkedid','transfereelinkedid','uniqueid','isNil','UserId','monitor','monitors','monitorFilename','filename','createdAt','calleridname','membername','xcally-motion-dialer','isArray','forEach','startsWith','Local','substring','indexOf','mobile','phone','lastIndexOf','voiceDialReport','transfererlinkedid','../../../config/environment','../ami','../rpc/voiceAgentReport','../rpc/voiceCallReport','../rpc/voiceDialReport','../rpc/memberReport','../rpc/voiceQueueReport','../rpc/voiceRecording','../rpc/voiceTransferReport','./voiceQueueReport'];(function(_0x3d34fc,_0x19448a){var _0x35a98c=function(_0x34b179){while(--_0x34b179){_0x3d34fc['push'](_0x3d34fc['shift']());}};_0x35a98c(++_0x19448a);}(_0xdfde,0x116));var _0xedfd=function(_0x388b47,_0x5cdac5){_0x388b47=_0x388b47-0x0;var _0x4859df=_0xdfde[_0x388b47];return _0x4859df;};'use strict';var _=require('lodash');var moment=require('moment');var util=require('util');var config=require(_0xedfd('0x0'));var ami=require(_0xedfd('0x1'));var RpcVoiceAgentReport=require(_0xedfd('0x2'));var RpcVoiceCallReport=require(_0xedfd('0x3'));var RpcVoiceDialReport=require(_0xedfd('0x4'));var RpcMemberReport=require(_0xedfd('0x5'));var RpcVoiceQueueReport=require(_0xedfd('0x6'));var RpcVoiceRecording=require(_0xedfd('0x7'));var RpcVoiceTransferReport=require(_0xedfd('0x8'));var VoiceQueueReport=require(_0xedfd('0x9'));var VoiceCallReport=require(_0xedfd('0xa'));var VoiceAgentReport=require(_0xedfd('0xb'));var VoiceDialReport=require(_0xedfd('0xc'));var UserReport=require('./userReport');function Report(_0xdd98bb){this[_0xedfd('0xd')]=_0xdd98bb;this[_0xedfd('0xe')]=_0xdd98bb['agents'];this['telephones']=_0xdd98bb[_0xedfd('0xf')];}Report[_0xedfd('0x10')][_0xedfd('0x11')]=function(_0x6148f9){var _0x528085=new VoiceQueueReport(this[_0xedfd('0xd')]);var _0x1a73e6=new VoiceAgentReport(this[_0xedfd('0xd')]);var _0x40eec4=new VoiceDialReport(this[_0xedfd('0xd')]);var _0x3beab2=new VoiceCallReport(this['realtime']);var _0x480588=new UserReport(this[_0xedfd('0xd')]);if(config[_0xedfd('0x12')]&&config[_0xedfd('0x12')]['disabled']){ami['on'](_0xedfd('0x13'),this[_0xedfd('0x14')][_0xedfd('0x15')](this));ami['on']('custom:voiceCallReport',this[_0xedfd('0x16')][_0xedfd('0x15')](this));ami['on'](_0xedfd('0x17'),this[_0xedfd('0x18')][_0xedfd('0x15')](this));ami['on'](_0xedfd('0x19'),this['voiceDialReport']['bind'](this));ami['on'](_0xedfd('0x1a'),this[_0xedfd('0x1b')][_0xedfd('0x15')](this));ami['on'](_0xedfd('0x1c'),this[_0xedfd('0x1d')][_0xedfd('0x15')](this));}};Report[_0xedfd('0x10')][_0xedfd('0x1e')]=function(_0x14a899){var _0x5a6da5;_0x5a6da5=_[_0xedfd('0x1f')](this[_0xedfd('0xe')],function(_0x2aa9df){return _0x2aa9df[_0xedfd('0x20')]==_0x14a899||_0x2aa9df[_0xedfd('0x21')]==_0x14a899;});if(_['isNil'](_0x5a6da5)){var _0x25ac9c=_[_0xedfd('0x1f')](this[_0xedfd('0xf')],function(_0x49e33e){return _0x49e33e[_0xedfd('0x20')]==_0x14a899||_0x49e33e['name']==_0x14a899;});if(_0x25ac9c){_0x5a6da5=_[_0xedfd('0x1f')](this[_0xedfd('0xe')],function(_0x480019){return _0x480019[_0xedfd('0x22')]==util['format'](_0xedfd('0x23'),_0x25ac9c[_0xedfd('0x21')]);});}}return _0x5a6da5;};Report[_0xedfd('0x10')]['voiceQueueReport']=function(_0x812fa){for(var _0x168033=0x0;_0x168033<_0x812fa['length'];_0x168033+=0x1){var _0x2ad3bd=this[_0xedfd('0x1e')](_0x812fa[_0x168033][_0xedfd('0x24')]);if(_0x2ad3bd){_0x812fa[_0x168033]['accountcode']=_0x2ad3bd[_0xedfd('0x20')];_0x812fa[_0x168033][_0xedfd('0x25')]=!![];_0x812fa[_0x168033][_0xedfd('0x26')]=_0x2ad3bd[_0xedfd('0x21')];_0x812fa[_0x168033]['interface']=_['isNil'](_0x2ad3bd[_0xedfd('0x22')])?util['format'](_0xedfd('0x23'),_0x2ad3bd[_0xedfd('0x21')]):_0x2ad3bd['interface'];if(_0x812fa[_0x168033][_0xedfd('0x27')]){_0x812fa[_0x168033][_0xedfd('0x28')]=moment()[_0xedfd('0x29')](_0xedfd('0x2a'));}if(_0x812fa[_0x168033][_0xedfd('0x2b')]){_0x812fa[_0x168033][_0xedfd('0x2c')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}RpcMemberReport['voiceQueueReport'](_0x812fa[_0x168033]);}RpcVoiceQueueReport[_0xedfd('0x2d')](_0x812fa[_0x168033]);}};function extractCalleridNumber(_0x36aa9d){var _0x339fd8=_0x36aa9d[_0xedfd('0x2e')](/<(.*?)>/);return _0x339fd8?_0x339fd8[0x1]:_0x36aa9d;}Report[_0xedfd('0x10')][_0xedfd('0x2f')]=function(_0x27f8ca){for(var _0x23869f=0x0;_0x23869f<Object[_0xedfd('0x30')](this[_0xedfd('0xe')])[_0xedfd('0x31')];_0x23869f++){var _0x10f1bf=Object[_0xedfd('0x30')](this[_0xedfd('0xe')])[_0x23869f];var _0xab3474=this[_0xedfd('0xe')][_0x10f1bf];if(_0xab3474[_0xedfd('0x20')]===Number(_0x27f8ca))return _0xab3474;}return null;};Report[_0xedfd('0x10')][_0xedfd('0x32')]=function(_0x250d70){var _0x2cf138=_0x250d70[_0xedfd('0x33')]['split']('-')[0x0];var _0x2db93f=this[_0xedfd('0xe')][_0x2cf138];if(!_0x2db93f)_0x2db93f=this['getAgentByInternal'](_0x250d70['calleridnum']);return!_0x2db93f?_0xedfd('0x34'):_0xedfd('0x35');};Report[_0xedfd('0x10')][_0xedfd('0x16')]=function(_0x59e78b){_0x59e78b[_0xedfd('0x36')]=_0x59e78b[_0xedfd('0x36')]||_0x59e78b[_0xedfd('0x37')];if(_0x59e78b[_0xedfd('0x38')]=='dialer'){_0x59e78b[_0xedfd('0x39')]=_0xedfd('0x3a');_0x59e78b[_0xedfd('0x3b')]=_0x59e78b[_0xedfd('0x3a')];if(_0x59e78b[_0xedfd('0x3c')]==_0xedfd('0x3d')){_0x59e78b[_0xedfd('0x20')]='';_0x59e78b[_0xedfd('0x36')]=extractCalleridNumber(_0x59e78b[_0xedfd('0x3e')]);}else if(_0x59e78b[_0xedfd('0x3c')]==_0xedfd('0x3f')){if(_0x59e78b[_0xedfd('0x36')]==_0xedfd('0x40')){_0x59e78b[_0xedfd('0x36')]=extractCalleridNumber(_0x59e78b[_0xedfd('0x41')]);_0x59e78b[_0xedfd('0x42')]=_0x59e78b[_0xedfd('0x43')];_0x59e78b[_0xedfd('0x44')]=[_0x59e78b[_0xedfd('0x33')],_0x59e78b[_0xedfd('0x33')]=_0x59e78b[_0xedfd('0x44')]][0x0];_0x59e78b[_0xedfd('0x3e')]=_0x59e78b[_0xedfd('0x41')];}else{_0x59e78b[_0xedfd('0x36')]=_0x59e78b[_0xedfd('0x42')];_0x59e78b['calleridnum']=_0x59e78b[_0xedfd('0x43')];if(_0x59e78b['disposition']==_0xedfd('0x45')){_0x59e78b[_0xedfd('0x20')]=_0x59e78b['connectedlinenum'];}else{_0x59e78b['accountcode']='';}}}}else{_0x59e78b[_0xedfd('0x3e')]=util[_0xedfd('0x29')](_0xedfd('0x46'),_0x59e78b['calleridname'],_0x59e78b[_0xedfd('0x42')]);}if(RpcVoiceTransferReport[_0xedfd('0x47')][_0x59e78b['linkedid']]){var _0x219f7a=RpcVoiceTransferReport[_0xedfd('0x47')][_0x59e78b[_0xedfd('0x48')]];_0x219f7a[_0xedfd('0x49')]=_0x59e78b[_0xedfd('0x4a')];RpcVoiceTransferReport[_0xedfd('0x1b')](_0x219f7a);delete RpcVoiceTransferReport['transfers'][_0x59e78b[_0xedfd('0x48')]];}if(_[_0xedfd('0x4b')](_0x59e78b[_0xedfd('0x38')])){_0x59e78b[_0xedfd('0x38')]=this[_0xedfd('0x32')](_0x59e78b);}if(_[_0xedfd('0x4b')](_0x59e78b[_0xedfd('0x4c')])){var _0x257ea4=_0x59e78b[_0xedfd('0x33')]['split']('-')[0x0];var _0x18f5b0=this[_0xedfd('0xe')][_0x257ea4];if(!_0x18f5b0)_0x18f5b0=this[_0xedfd('0x2f')](_0x59e78b['accountcode']);if(_0x18f5b0){_0x59e78b[_0xedfd('0x4c')]=_0x18f5b0['id'];_0x59e78b['membername']=_0x18f5b0[_0xedfd('0x21')];}}RpcVoiceCallReport['create'](_0x59e78b);if(_0x59e78b[_0xedfd('0x4d')]){for(var _0x5b4462=0x0;_0x5b4462<_0x59e78b[_0xedfd('0x4e')][_0xedfd('0x31')];_0x5b4462+=0x1){_0x59e78b[_0xedfd('0x4f')]=_0x59e78b[_0xedfd('0x4e')][_0x5b4462][_0xedfd('0x50')];_0x59e78b['createdAt']=_0x59e78b[_0xedfd('0x4e')][_0x5b4462][_0xedfd('0x51')];if(_0x59e78b[_0xedfd('0x37')]==_0xedfd('0x40')){_0x59e78b[_0xedfd('0x42')]=_0x59e78b[_0xedfd('0x24')];_0x59e78b[_0xedfd('0x52')]=_0x59e78b['connectedlinename'];_0x59e78b[_0xedfd('0x24')]=_0x59e78b[_0xedfd('0x20')];_0x59e78b['connectedlinename']=_0x59e78b[_0xedfd('0x53')];_0x59e78b['exten']=_0x59e78b[_0xedfd('0x43')];}else if(_0x59e78b['exten']==_0xedfd('0x54')){_0x59e78b['calleridnum']=_0x59e78b[_0xedfd('0x36')];_0x59e78b['exten']=_0x59e78b[_0xedfd('0x43')];}RpcVoiceRecording[_0xedfd('0x2d')](_0x59e78b);}}};Report[_0xedfd('0x10')][_0xedfd('0x18')]=function(_0x296e58){if(_[_0xedfd('0x55')](_0x296e58)){_0x296e58[_0xedfd('0x56')](function(_0x1e9af7){RpcVoiceAgentReport[_0xedfd('0x2d')](_0x1e9af7);});}else{RpcVoiceAgentReport[_0xedfd('0x2d')](_0x296e58);}};Report[_0xedfd('0x10')]['voiceDialReport']=function(_0x5cf9be){RpcVoiceDialReport['create'](_0x5cf9be);var _0x2ecf0c;var _0x20f8e4;var _0x4c331d=_0x5cf9be['channel'];if(_[_0xedfd('0x57')](_0x4c331d,_0xedfd('0x58'))){_0x20f8e4=_0x4c331d[_0xedfd('0x59')](_0x4c331d[_0xedfd('0x5a')]('/')+0x1,_0x4c331d[_0xedfd('0x5a')]('@'));_0x2ecf0c=_['find'](this[_0xedfd('0xe')],function(_0xc5f7b5){return _0xc5f7b5[_0xedfd('0x5b')]==_0x20f8e4||_0xc5f7b5[_0xedfd('0x5c')]==_0x20f8e4||_0xc5f7b5[_0xedfd('0x20')]==_0x20f8e4;});}else{_0x20f8e4=_0x4c331d[_0xedfd('0x59')](_0x4c331d[_0xedfd('0x5a')]('/')+0x1,_0x4c331d[_0xedfd('0x5d')]('-'));_0x2ecf0c=this[_0xedfd('0x1e')](_0x20f8e4);}if(_0x2ecf0c){_0x5cf9be['interface']=_[_0xedfd('0x4b')](_0x2ecf0c[_0xedfd('0x22')])?util[_0xedfd('0x29')](_0xedfd('0x23'),_0x2ecf0c[_0xedfd('0x21')]):_0x2ecf0c[_0xedfd('0x22')];_0x5cf9be['membername']=_0x2ecf0c[_0xedfd('0x21')];_0x5cf9be[_0xedfd('0x20')]=_0x2ecf0c[_0xedfd('0x20')];RpcMemberReport[_0xedfd('0x5e')](_0x5cf9be);}};Report[_0xedfd('0x10')][_0xedfd('0x1b')]=function(_0x932daa){RpcVoiceTransferReport[_0xedfd('0x47')][_0x932daa[_0xedfd('0x5f')]]=_0x932daa;};Report[_0xedfd('0x10')][_0xedfd('0x1d')]=function(_0x124f0c){RpcVoiceTransferReport[_0xedfd('0x1d')](_0x124f0c);};module['exports']=Report;
\ No newline at end of file