Built motion from commit d1eab355.|2.6.28
[motion2.git] / server / services / ami / report / index.js
index 684b00b..ec26972 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x12ab=['monitors','monitorFilename','filename','createdAt','connectedlinename','xcally-motion-dialer','isArray','forEach','Local','indexOf','mobile','substring','lastIndexOf','transfererlinkedid','exports','lodash','moment','../../../config/environment','../ami','../rpc/voiceCallReport','../rpc/voiceDialReport','../rpc/memberReport','../rpc/voiceQueueReport','../rpc/voiceRecording','./voiceQueueReport','./voiceCallReport','./voiceAgentReport','./voiceDialReport','telephones','prototype','sync','realtime','xdr','custom:voiceQueueReport','voiceQueueReport','bind','custom:voiceCallReport','voiceCallReport','custom:voiceAgentReport','voiceAgentReport','custom:voiceDialReport','voiceDialReport','attendedtransfer','attendedTransfer','findAgent','find','agents','name','isNil','interface','format','SIP/%s','length','connectedlinenum','accountcode','lastAssignedTo','queuecallercomplete','queuecallercompleteAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexit','queuecallerexitAt','create','match','getAgentByInternal','keys','channel','split','calleridnum','outbound','destination','exten','type','dialer','lastapplication','lastdata','queue','from-voip-provider','callerid','context','from-sip','xcally-motion-preview','calleridpreview','originatecalleridnum','destinationchannel','ANSWERED','transfers','linkedid','transfereelinkedid','blindTransfer','getCallType','UserId','membername','monitor'];(function(_0x5b02ff,_0x4ce260){var _0xfe3187=function(_0x2aae48){while(--_0x2aae48){_0x5b02ff['push'](_0x5b02ff['shift']());}};_0xfe3187(++_0x4ce260);}(_0x12ab,0x6c));var _0xb12a=function(_0x1ca7bd,_0x22c495){_0x1ca7bd=_0x1ca7bd-0x0;var _0x5bdd3f=_0x12ab[_0x1ca7bd];return _0x5bdd3f;};'use strict';var _=require(_0xb12a('0x0'));var moment=require(_0xb12a('0x1'));var util=require('util');var config=require(_0xb12a('0x2'));var ami=require(_0xb12a('0x3'));var RpcVoiceAgentReport=require('../rpc/voiceAgentReport');var RpcVoiceCallReport=require(_0xb12a('0x4'));var RpcVoiceDialReport=require(_0xb12a('0x5'));var RpcMemberReport=require(_0xb12a('0x6'));var RpcVoiceQueueReport=require(_0xb12a('0x7'));var RpcVoiceRecording=require(_0xb12a('0x8'));var RpcVoiceTransferReport=require('../rpc/voiceTransferReport');var VoiceQueueReport=require(_0xb12a('0x9'));var VoiceCallReport=require(_0xb12a('0xa'));var VoiceAgentReport=require(_0xb12a('0xb'));var VoiceDialReport=require(_0xb12a('0xc'));var UserReport=require('./userReport');function Report(_0x520c47){this['realtime']=_0x520c47;this['agents']=_0x520c47['agents'];this[_0xb12a('0xd')]=_0x520c47[_0xb12a('0xd')];}Report[_0xb12a('0xe')][_0xb12a('0xf')]=function(_0x102686){var _0x1071c9=new VoiceQueueReport(this['realtime']);var _0x528761=new VoiceAgentReport(this['realtime']);var _0x5da65b=new VoiceDialReport(this['realtime']);var _0x132acb=new VoiceCallReport(this[_0xb12a('0x10')]);var _0x469e0c=new UserReport(this[_0xb12a('0x10')]);if(config[_0xb12a('0x11')]&&config[_0xb12a('0x11')]['disabled']){ami['on'](_0xb12a('0x12'),this[_0xb12a('0x13')][_0xb12a('0x14')](this));ami['on'](_0xb12a('0x15'),this[_0xb12a('0x16')][_0xb12a('0x14')](this));ami['on'](_0xb12a('0x17'),this[_0xb12a('0x18')][_0xb12a('0x14')](this));ami['on'](_0xb12a('0x19'),this[_0xb12a('0x1a')][_0xb12a('0x14')](this));ami['on']('blindtransfer',this['blindTransfer'][_0xb12a('0x14')](this));ami['on'](_0xb12a('0x1b'),this[_0xb12a('0x1c')][_0xb12a('0x14')](this));}};Report[_0xb12a('0xe')][_0xb12a('0x1d')]=function(_0x4304d4){var _0x59c8fb;_0x59c8fb=_[_0xb12a('0x1e')](this[_0xb12a('0x1f')],function(_0x50c9c5){return _0x50c9c5['accountcode']==_0x4304d4||_0x50c9c5[_0xb12a('0x20')]==_0x4304d4;});if(_[_0xb12a('0x21')](_0x59c8fb)){var _0x2e7bd4=_['find'](this[_0xb12a('0xd')],function(_0x83a721){return _0x83a721['accountcode']==_0x4304d4||_0x83a721['name']==_0x4304d4;});if(_0x2e7bd4){_0x59c8fb=_[_0xb12a('0x1e')](this[_0xb12a('0x1f')],function(_0x261e71){return _0x261e71[_0xb12a('0x22')]==util[_0xb12a('0x23')](_0xb12a('0x24'),_0x2e7bd4[_0xb12a('0x20')]);});}}return _0x59c8fb;};Report[_0xb12a('0xe')][_0xb12a('0x13')]=function(_0x315298){for(var _0x5dfcee=0x0;_0x5dfcee<_0x315298[_0xb12a('0x25')];_0x5dfcee+=0x1){var _0x2aeef7=this[_0xb12a('0x1d')](_0x315298[_0x5dfcee][_0xb12a('0x26')]);if(_0x2aeef7){_0x315298[_0x5dfcee][_0xb12a('0x27')]=_0x2aeef7['accountcode'];_0x315298[_0x5dfcee]['assigned']=!![];_0x315298[_0x5dfcee][_0xb12a('0x28')]=_0x2aeef7[_0xb12a('0x20')];_0x315298[_0x5dfcee][_0xb12a('0x22')]=_[_0xb12a('0x21')](_0x2aeef7[_0xb12a('0x22')])?util[_0xb12a('0x23')](_0xb12a('0x24'),_0x2aeef7[_0xb12a('0x20')]):_0x2aeef7['interface'];if(_0x315298[_0x5dfcee][_0xb12a('0x29')]){_0x315298[_0x5dfcee][_0xb12a('0x2a')]=moment()[_0xb12a('0x23')](_0xb12a('0x2b'));}if(_0x315298[_0x5dfcee][_0xb12a('0x2c')]){_0x315298[_0x5dfcee][_0xb12a('0x2d')]=moment()[_0xb12a('0x23')](_0xb12a('0x2b'));}RpcMemberReport[_0xb12a('0x13')](_0x315298[_0x5dfcee]);}RpcVoiceQueueReport[_0xb12a('0x2e')](_0x315298[_0x5dfcee]);}};function extractCalleridNumber(_0x5392a0){var _0x19157b=_0x5392a0[_0xb12a('0x2f')](/<(.*?)>/);return _0x19157b?_0x19157b[0x1]:_0x5392a0;}Report[_0xb12a('0xe')][_0xb12a('0x30')]=function(_0x13a9bc){for(var _0x5b70f4=0x0;_0x5b70f4<Object[_0xb12a('0x31')](this[_0xb12a('0x1f')])[_0xb12a('0x25')];_0x5b70f4++){var _0xade41=Object[_0xb12a('0x31')](this['agents'])[_0x5b70f4];var _0x5375e8=this[_0xb12a('0x1f')][_0xade41];if(_0x5375e8[_0xb12a('0x27')]===Number(_0x13a9bc))return _0x5375e8;}return null;};Report[_0xb12a('0xe')]['getCallType']=function(_0x1b4522){var _0x5bdbea=_0x1b4522[_0xb12a('0x32')][_0xb12a('0x33')]('-')[0x0];var _0x1a6e3d=this['agents'][_0x5bdbea];if(!_0x1a6e3d)_0x1a6e3d=this[_0xb12a('0x30')](_0x1b4522[_0xb12a('0x34')]);return!_0x1a6e3d?_0xb12a('0x35'):'internal';};Report[_0xb12a('0xe')][_0xb12a('0x16')]=function(_0x568825){_0x568825[_0xb12a('0x36')]=_0x568825[_0xb12a('0x36')]||_0x568825[_0xb12a('0x37')];if(_0x568825[_0xb12a('0x38')]==_0xb12a('0x39')){_0x568825[_0xb12a('0x3a')]='queue';_0x568825[_0xb12a('0x3b')]=_0x568825[_0xb12a('0x3c')];if(_0x568825['context']==_0xb12a('0x3d')){_0x568825['accountcode']='';_0x568825[_0xb12a('0x36')]=extractCalleridNumber(_0x568825[_0xb12a('0x3e')]);}else if(_0x568825[_0xb12a('0x3f')]==_0xb12a('0x40')){if(_0x568825[_0xb12a('0x36')]==_0xb12a('0x41')){_0x568825['destination']=extractCalleridNumber(_0x568825[_0xb12a('0x42')]);_0x568825[_0xb12a('0x34')]=_0x568825[_0xb12a('0x43')];_0x568825['destinationchannel']=[_0x568825[_0xb12a('0x32')],_0x568825['channel']=_0x568825[_0xb12a('0x44')]][0x0];_0x568825[_0xb12a('0x3e')]=_0x568825[_0xb12a('0x42')];}else{_0x568825[_0xb12a('0x36')]=_0x568825['calleridnum'];_0x568825[_0xb12a('0x34')]=_0x568825[_0xb12a('0x43')];if(_0x568825['disposition']==_0xb12a('0x45')){_0x568825[_0xb12a('0x27')]=_0x568825[_0xb12a('0x26')];}else{_0x568825[_0xb12a('0x27')]='';}}}}else{_0x568825[_0xb12a('0x3e')]=util[_0xb12a('0x23')]('\x22%s\x22\x20<%s>',_0x568825['calleridname'],_0x568825['calleridnum']);}if(RpcVoiceTransferReport[_0xb12a('0x46')][_0x568825[_0xb12a('0x47')]]){var _0x5d5b4d=RpcVoiceTransferReport['transfers'][_0x568825[_0xb12a('0x47')]];_0x5d5b4d[_0xb12a('0x48')]=_0x568825['uniqueid'];RpcVoiceTransferReport[_0xb12a('0x49')](_0x5d5b4d);delete RpcVoiceTransferReport['transfers'][_0x568825[_0xb12a('0x47')]];}if(_[_0xb12a('0x21')](_0x568825[_0xb12a('0x38')])){_0x568825[_0xb12a('0x38')]=this[_0xb12a('0x4a')](_0x568825);}if(_[_0xb12a('0x21')](_0x568825[_0xb12a('0x4b')])){var _0x4b6923=_0x568825['channel'][_0xb12a('0x33')]('-')[0x0];var _0xeaca63=this['agents'][_0x4b6923];if(!_0xeaca63)_0xeaca63=this['getAgentByInternal'](_0x568825[_0xb12a('0x27')]);if(_0xeaca63){_0x568825[_0xb12a('0x4b')]=_0xeaca63['id'];_0x568825[_0xb12a('0x4c')]=_0xeaca63[_0xb12a('0x20')];}}RpcVoiceCallReport[_0xb12a('0x2e')](_0x568825);if(_0x568825[_0xb12a('0x4d')]){for(var _0x5ddfc0=0x0;_0x5ddfc0<_0x568825[_0xb12a('0x4e')][_0xb12a('0x25')];_0x5ddfc0+=0x1){_0x568825[_0xb12a('0x4f')]=_0x568825[_0xb12a('0x4e')][_0x5ddfc0][_0xb12a('0x50')];_0x568825[_0xb12a('0x51')]=_0x568825[_0xb12a('0x4e')][_0x5ddfc0]['createdAt'];if(_0x568825['exten']==_0xb12a('0x41')){_0x568825[_0xb12a('0x34')]=_0x568825['connectedlinenum'];_0x568825['calleridname']=_0x568825['connectedlinename'];_0x568825[_0xb12a('0x26')]=_0x568825[_0xb12a('0x27')];_0x568825[_0xb12a('0x52')]=_0x568825['membername'];_0x568825['exten']=_0x568825[_0xb12a('0x43')];}else if(_0x568825['exten']==_0xb12a('0x53')){_0x568825[_0xb12a('0x34')]=_0x568825[_0xb12a('0x36')];_0x568825['exten']=_0x568825[_0xb12a('0x43')];}RpcVoiceRecording['create'](_0x568825);}}};Report[_0xb12a('0xe')][_0xb12a('0x18')]=function(_0x26da35){if(_[_0xb12a('0x54')](_0x26da35)){_0x26da35[_0xb12a('0x55')](function(_0x2a7e4e){RpcVoiceAgentReport[_0xb12a('0x2e')](_0x2a7e4e);});}else{RpcVoiceAgentReport[_0xb12a('0x2e')](_0x26da35);}};Report[_0xb12a('0xe')][_0xb12a('0x1a')]=function(_0x5d4388){RpcVoiceDialReport[_0xb12a('0x2e')](_0x5d4388);var _0xc5e206;var _0x53fb05;var _0x2b16ac=_0x5d4388['channel'];if(_['startsWith'](_0x2b16ac,_0xb12a('0x56'))){_0x53fb05=_0x2b16ac['substring'](_0x2b16ac[_0xb12a('0x57')]('/')+0x1,_0x2b16ac[_0xb12a('0x57')]('@'));_0xc5e206=_[_0xb12a('0x1e')](this[_0xb12a('0x1f')],function(_0x1efa95){return _0x1efa95[_0xb12a('0x58')]==_0x53fb05||_0x1efa95['phone']==_0x53fb05||_0x1efa95[_0xb12a('0x27')]==_0x53fb05;});}else{_0x53fb05=_0x2b16ac[_0xb12a('0x59')](_0x2b16ac[_0xb12a('0x57')]('/')+0x1,_0x2b16ac[_0xb12a('0x5a')]('-'));_0xc5e206=this[_0xb12a('0x1d')](_0x53fb05);}if(_0xc5e206){_0x5d4388[_0xb12a('0x22')]=_['isNil'](_0xc5e206[_0xb12a('0x22')])?util[_0xb12a('0x23')](_0xb12a('0x24'),_0xc5e206[_0xb12a('0x20')]):_0xc5e206[_0xb12a('0x22')];_0x5d4388[_0xb12a('0x4c')]=_0xc5e206[_0xb12a('0x20')];_0x5d4388[_0xb12a('0x27')]=_0xc5e206[_0xb12a('0x27')];RpcMemberReport[_0xb12a('0x1a')](_0x5d4388);}};Report[_0xb12a('0xe')]['blindTransfer']=function(_0x146c1d){RpcVoiceTransferReport[_0xb12a('0x46')][_0x146c1d[_0xb12a('0x5b')]]=_0x146c1d;};Report[_0xb12a('0xe')][_0xb12a('0x1c')]=function(_0x54fecc){RpcVoiceTransferReport['attendedTransfer'](_0x54fecc);};module[_0xb12a('0x5c')]=Report;
\ No newline at end of file
+var _0xece1=['exports','lodash','util','../ami','../rpc/voiceCallReport','../rpc/voiceDialReport','./voiceCallReport','./voiceAgentReport','./voiceDialReport','realtime','agents','telephones','sync','xdr','disabled','custom:voiceQueueReport','voiceQueueReport','bind','custom:voiceCallReport','custom:voiceAgentReport','voiceAgentReport','custom:voiceDialReport','voiceDialReport','blindtransfer','blindTransfer','findAgent','find','name','isNil','accountcode','interface','prototype','length','connectedlinenum','format','queuecallercomplete','queuecallercompleteAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexitAt','match','getAgentByInternal','keys','split','calleridnum','outbound','internal','voiceCallReport','destination','exten','dialer','lastdata','queue','from-voip-provider','context','from-sip','xcally-motion-preview','originatecalleridnum','destinationchannel','channel','callerid','calleridpreview','disposition','ANSWERED','calleridname','transfers','linkedid','transfereelinkedid','type','UserId','membername','create','monitor','monitors','monitorFilename','createdAt','connectedlinename','isArray','forEach','startsWith','Local','substring','indexOf','mobile','phone','lastIndexOf','SIP/%s','attendedTransfer'];(function(_0x44d541,_0x545bd8){var _0x5716ed=function(_0x3b67a6){while(--_0x3b67a6){_0x44d541['push'](_0x44d541['shift']());}};_0x5716ed(++_0x545bd8);}(_0xece1,0x1b4));var _0x1ece=function(_0x52c342,_0x5ee6f1){_0x52c342=_0x52c342-0x0;var _0x1d02f7=_0xece1[_0x52c342];return _0x1d02f7;};'use strict';var _=require(_0x1ece('0x0'));var moment=require('moment');var util=require(_0x1ece('0x1'));var config=require('../../../config/environment');var ami=require(_0x1ece('0x2'));var RpcVoiceAgentReport=require('../rpc/voiceAgentReport');var RpcVoiceCallReport=require(_0x1ece('0x3'));var RpcVoiceDialReport=require(_0x1ece('0x4'));var RpcMemberReport=require('../rpc/memberReport');var RpcVoiceQueueReport=require('../rpc/voiceQueueReport');var RpcVoiceRecording=require('../rpc/voiceRecording');var RpcVoiceTransferReport=require('../rpc/voiceTransferReport');var VoiceQueueReport=require('./voiceQueueReport');var VoiceCallReport=require(_0x1ece('0x5'));var VoiceAgentReport=require(_0x1ece('0x6'));var VoiceDialReport=require(_0x1ece('0x7'));var UserReport=require('./userReport');function Report(_0x351681){this[_0x1ece('0x8')]=_0x351681;this[_0x1ece('0x9')]=_0x351681[_0x1ece('0x9')];this[_0x1ece('0xa')]=_0x351681[_0x1ece('0xa')];}Report['prototype'][_0x1ece('0xb')]=function(_0x298e64){var _0x308458=new VoiceQueueReport(this[_0x1ece('0x8')]);var _0xf8732d=new VoiceAgentReport(this[_0x1ece('0x8')]);var _0x5a1324=new VoiceDialReport(this[_0x1ece('0x8')]);var _0x10821d=new VoiceCallReport(this[_0x1ece('0x8')]);var _0x51cd97=new UserReport(this[_0x1ece('0x8')]);if(config[_0x1ece('0xc')]&&config[_0x1ece('0xc')][_0x1ece('0xd')]){ami['on'](_0x1ece('0xe'),this[_0x1ece('0xf')][_0x1ece('0x10')](this));ami['on'](_0x1ece('0x11'),this['voiceCallReport'][_0x1ece('0x10')](this));ami['on'](_0x1ece('0x12'),this[_0x1ece('0x13')][_0x1ece('0x10')](this));ami['on'](_0x1ece('0x14'),this[_0x1ece('0x15')]['bind'](this));ami['on'](_0x1ece('0x16'),this[_0x1ece('0x17')][_0x1ece('0x10')](this));ami['on']('attendedtransfer',this['attendedTransfer'][_0x1ece('0x10')](this));}};Report['prototype'][_0x1ece('0x18')]=function(_0x52da6a){var _0xdd0108;_0xdd0108=_[_0x1ece('0x19')](this[_0x1ece('0x9')],function(_0x406fb4){return _0x406fb4['accountcode']==_0x52da6a||_0x406fb4[_0x1ece('0x1a')]==_0x52da6a;});if(_[_0x1ece('0x1b')](_0xdd0108)){var _0x4b9238=_[_0x1ece('0x19')](this[_0x1ece('0xa')],function(_0x3932d1){return _0x3932d1[_0x1ece('0x1c')]==_0x52da6a||_0x3932d1[_0x1ece('0x1a')]==_0x52da6a;});if(_0x4b9238){_0xdd0108=_[_0x1ece('0x19')](this[_0x1ece('0x9')],function(_0x46fffc){return _0x46fffc[_0x1ece('0x1d')]==util['format']('SIP/%s',_0x4b9238[_0x1ece('0x1a')]);});}}return _0xdd0108;};Report[_0x1ece('0x1e')]['voiceQueueReport']=function(_0x30eaea){for(var _0x396f62=0x0;_0x396f62<_0x30eaea[_0x1ece('0x1f')];_0x396f62+=0x1){var _0x21a767=this[_0x1ece('0x18')](_0x30eaea[_0x396f62][_0x1ece('0x20')]);if(_0x21a767){_0x30eaea[_0x396f62][_0x1ece('0x1c')]=_0x21a767[_0x1ece('0x1c')];_0x30eaea[_0x396f62]['assigned']=!![];_0x30eaea[_0x396f62]['lastAssignedTo']=_0x21a767[_0x1ece('0x1a')];_0x30eaea[_0x396f62]['interface']=_['isNil'](_0x21a767[_0x1ece('0x1d')])?util[_0x1ece('0x21')]('SIP/%s',_0x21a767['name']):_0x21a767[_0x1ece('0x1d')];if(_0x30eaea[_0x396f62][_0x1ece('0x22')]){_0x30eaea[_0x396f62][_0x1ece('0x23')]=moment()[_0x1ece('0x21')](_0x1ece('0x24'));}if(_0x30eaea[_0x396f62]['queuecallerexit']){_0x30eaea[_0x396f62][_0x1ece('0x25')]=moment()[_0x1ece('0x21')]('YYYY-MM-DD\x20HH:mm:ss');}RpcMemberReport[_0x1ece('0xf')](_0x30eaea[_0x396f62]);}RpcVoiceQueueReport['create'](_0x30eaea[_0x396f62]);}};function extractCalleridNumber(_0xbbf946){var _0x3b023e=_0xbbf946[_0x1ece('0x26')](/<(.*?)>/);return _0x3b023e?_0x3b023e[0x1]:_0xbbf946;}Report[_0x1ece('0x1e')][_0x1ece('0x27')]=function(_0x6de50b){for(var _0x1d7fb3=0x0;_0x1d7fb3<Object['keys'](this[_0x1ece('0x9')])[_0x1ece('0x1f')];_0x1d7fb3++){var _0x31ce97=Object[_0x1ece('0x28')](this[_0x1ece('0x9')])[_0x1d7fb3];var _0x364dd9=this['agents'][_0x31ce97];if(_0x364dd9[_0x1ece('0x1c')]===Number(_0x6de50b))return _0x364dd9;}return null;};Report[_0x1ece('0x1e')]['getCallType']=function(_0x24f896){var _0x129e8b=_0x24f896['channel'][_0x1ece('0x29')]('-')[0x0];var _0x5a9105=this[_0x1ece('0x9')][_0x129e8b];if(!_0x5a9105)_0x5a9105=this[_0x1ece('0x27')](_0x24f896[_0x1ece('0x2a')]);return!_0x5a9105?_0x1ece('0x2b'):_0x1ece('0x2c');};Report['prototype'][_0x1ece('0x2d')]=function(_0x331791){_0x331791[_0x1ece('0x2e')]=_0x331791[_0x1ece('0x2e')]||_0x331791[_0x1ece('0x2f')];if(_0x331791['type']==_0x1ece('0x30')){_0x331791['lastapplication']='queue';_0x331791[_0x1ece('0x31')]=_0x331791[_0x1ece('0x32')];if(_0x331791['context']==_0x1ece('0x33')){_0x331791[_0x1ece('0x1c')]='';_0x331791[_0x1ece('0x2e')]=extractCalleridNumber(_0x331791['callerid']);}else if(_0x331791[_0x1ece('0x34')]==_0x1ece('0x35')){if(_0x331791[_0x1ece('0x2e')]==_0x1ece('0x36')){_0x331791['destination']=extractCalleridNumber(_0x331791['calleridpreview']);_0x331791['calleridnum']=_0x331791[_0x1ece('0x37')];_0x331791[_0x1ece('0x38')]=[_0x331791[_0x1ece('0x39')],_0x331791[_0x1ece('0x39')]=_0x331791[_0x1ece('0x38')]][0x0];_0x331791[_0x1ece('0x3a')]=_0x331791[_0x1ece('0x3b')];}else{_0x331791[_0x1ece('0x2e')]=_0x331791[_0x1ece('0x2a')];_0x331791[_0x1ece('0x2a')]=_0x331791[_0x1ece('0x37')];if(_0x331791[_0x1ece('0x3c')]==_0x1ece('0x3d')){_0x331791['accountcode']=_0x331791['connectedlinenum'];}else{_0x331791[_0x1ece('0x1c')]='';}}}}else{_0x331791[_0x1ece('0x3a')]=util[_0x1ece('0x21')]('\x22%s\x22\x20<%s>',_0x331791[_0x1ece('0x3e')],_0x331791[_0x1ece('0x2a')]);}if(RpcVoiceTransferReport[_0x1ece('0x3f')][_0x331791[_0x1ece('0x40')]]){var _0x3e2067=RpcVoiceTransferReport[_0x1ece('0x3f')][_0x331791['linkedid']];_0x3e2067[_0x1ece('0x41')]=_0x331791['uniqueid'];RpcVoiceTransferReport[_0x1ece('0x17')](_0x3e2067);delete RpcVoiceTransferReport[_0x1ece('0x3f')][_0x331791[_0x1ece('0x40')]];}if(_['isNil'](_0x331791[_0x1ece('0x42')])){_0x331791['type']=this['getCallType'](_0x331791);}if(_['isNil'](_0x331791['UserId'])){var _0x51a924=_0x331791[_0x1ece('0x39')][_0x1ece('0x29')]('-')[0x0];var _0x1e0169=this[_0x1ece('0x9')][_0x51a924];if(!_0x1e0169)_0x1e0169=this['getAgentByInternal'](_0x331791['accountcode']);if(_0x1e0169){_0x331791[_0x1ece('0x43')]=_0x1e0169['id'];_0x331791[_0x1ece('0x44')]=_0x1e0169[_0x1ece('0x1a')];}}RpcVoiceCallReport[_0x1ece('0x45')](_0x331791);if(_0x331791[_0x1ece('0x46')]){for(var _0x1291bd=0x0;_0x1291bd<_0x331791[_0x1ece('0x47')][_0x1ece('0x1f')];_0x1291bd+=0x1){_0x331791[_0x1ece('0x48')]=_0x331791[_0x1ece('0x47')][_0x1291bd]['filename'];_0x331791[_0x1ece('0x49')]=_0x331791[_0x1ece('0x47')][_0x1291bd][_0x1ece('0x49')];if(_0x331791[_0x1ece('0x2f')]==_0x1ece('0x36')){_0x331791[_0x1ece('0x2a')]=_0x331791[_0x1ece('0x20')];_0x331791['calleridname']=_0x331791[_0x1ece('0x4a')];_0x331791[_0x1ece('0x20')]=_0x331791['accountcode'];_0x331791[_0x1ece('0x4a')]=_0x331791['membername'];_0x331791[_0x1ece('0x2f')]=_0x331791[_0x1ece('0x37')];}else if(_0x331791[_0x1ece('0x2f')]=='xcally-motion-dialer'){_0x331791[_0x1ece('0x2a')]=_0x331791[_0x1ece('0x2e')];_0x331791[_0x1ece('0x2f')]=_0x331791[_0x1ece('0x37')];}RpcVoiceRecording[_0x1ece('0x45')](_0x331791);}}};Report[_0x1ece('0x1e')]['voiceAgentReport']=function(_0xff753d){if(_[_0x1ece('0x4b')](_0xff753d)){_0xff753d[_0x1ece('0x4c')](function(_0x5ebd37){RpcVoiceAgentReport[_0x1ece('0x45')](_0x5ebd37);});}else{RpcVoiceAgentReport[_0x1ece('0x45')](_0xff753d);}};Report['prototype'][_0x1ece('0x15')]=function(_0x204b52){RpcVoiceDialReport[_0x1ece('0x45')](_0x204b52);var _0x1feced;var _0x2c83da;var _0x415b79=_0x204b52['channel'];if(_[_0x1ece('0x4d')](_0x415b79,_0x1ece('0x4e'))){_0x2c83da=_0x415b79[_0x1ece('0x4f')](_0x415b79[_0x1ece('0x50')]('/')+0x1,_0x415b79[_0x1ece('0x50')]('@'));_0x1feced=_[_0x1ece('0x19')](this[_0x1ece('0x9')],function(_0x3cf0ec){return _0x3cf0ec[_0x1ece('0x51')]==_0x2c83da||_0x3cf0ec[_0x1ece('0x52')]==_0x2c83da||_0x3cf0ec[_0x1ece('0x1c')]==_0x2c83da;});}else{_0x2c83da=_0x415b79[_0x1ece('0x4f')](_0x415b79['indexOf']('/')+0x1,_0x415b79[_0x1ece('0x53')]('-'));_0x1feced=this[_0x1ece('0x18')](_0x2c83da);}if(_0x1feced){_0x204b52[_0x1ece('0x1d')]=_[_0x1ece('0x1b')](_0x1feced[_0x1ece('0x1d')])?util[_0x1ece('0x21')](_0x1ece('0x54'),_0x1feced[_0x1ece('0x1a')]):_0x1feced[_0x1ece('0x1d')];_0x204b52[_0x1ece('0x44')]=_0x1feced[_0x1ece('0x1a')];_0x204b52[_0x1ece('0x1c')]=_0x1feced[_0x1ece('0x1c')];RpcMemberReport['voiceDialReport'](_0x204b52);}};Report[_0x1ece('0x1e')][_0x1ece('0x17')]=function(_0x2da476){RpcVoiceTransferReport['transfers'][_0x2da476['transfererlinkedid']]=_0x2da476;};Report['prototype'][_0x1ece('0x55')]=function(_0x5cd779){RpcVoiceTransferReport[_0x1ece('0x55')](_0x5cd779);};module[_0x1ece('0x56')]=Report;
\ No newline at end of file