Built motion from commit f25620e4.|2.6.30
[motion2.git] / server / services / ami / report / index.js
index 8713658..8ed97c9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x888f=['custom:voiceCallReport','custom:voiceAgentReport','voiceAgentReport','bind','voiceDialReport','blindtransfer','blindTransfer','attendedtransfer','attendedTransfer','findAgent','find','accountcode','name','isNil','interface','format','SIP/%s','length','lastAssignedTo','queuecallercomplete','YYYY-MM-DD\x20HH:mm:ss','queuecallerexit','queuecallerexitAt','voiceQueueReport','create','match','getAgentByInternal','keys','channel','split','outbound','internal','destination','exten','dialer','lastdata','queue','context','from-voip-provider','callerid','from-sip','xcally-motion-preview','calleridpreview','calleridnum','originatecalleridnum','destinationchannel','disposition','ANSWERED','\x22%s\x22\x20<%s>','calleridname','transfers','linkedid','type','getCallType','UserId','monitor','monitors','monitorFilename','createdAt','connectedlinenum','connectedlinename','xcally-motion-dialer','isArray','forEach','startsWith','substring','indexOf','mobile','phone','lastIndexOf','membername','transfererlinkedid','exports','lodash','moment','util','../../../config/environment','../ami','../rpc/voiceDialReport','../rpc/voiceQueueReport','../rpc/voiceRecording','../rpc/voiceTransferReport','./voiceQueueReport','./voiceCallReport','./voiceAgentReport','./voiceDialReport','realtime','agents','telephones','prototype','sync','xdr','custom:voiceQueueReport'];(function(_0x3bd053,_0x102a3d){var _0x40e1e3=function(_0x34a2cc){while(--_0x34a2cc){_0x3bd053['push'](_0x3bd053['shift']());}};_0x40e1e3(++_0x102a3d);}(_0x888f,0xa6));var _0xf888=function(_0x1f3b9e,_0x564869){_0x1f3b9e=_0x1f3b9e-0x0;var _0x245276=_0x888f[_0x1f3b9e];return _0x245276;};'use strict';var _=require(_0xf888('0x0'));var moment=require(_0xf888('0x1'));var util=require(_0xf888('0x2'));var config=require(_0xf888('0x3'));var ami=require(_0xf888('0x4'));var RpcVoiceAgentReport=require('../rpc/voiceAgentReport');var RpcVoiceCallReport=require('../rpc/voiceCallReport');var RpcVoiceDialReport=require(_0xf888('0x5'));var RpcMemberReport=require('../rpc/memberReport');var RpcVoiceQueueReport=require(_0xf888('0x6'));var RpcVoiceRecording=require(_0xf888('0x7'));var RpcVoiceTransferReport=require(_0xf888('0x8'));var VoiceQueueReport=require(_0xf888('0x9'));var VoiceCallReport=require(_0xf888('0xa'));var VoiceAgentReport=require(_0xf888('0xb'));var VoiceDialReport=require(_0xf888('0xc'));var UserReport=require('./userReport');function Report(_0x4aa48b){this[_0xf888('0xd')]=_0x4aa48b;this[_0xf888('0xe')]=_0x4aa48b['agents'];this[_0xf888('0xf')]=_0x4aa48b[_0xf888('0xf')];}Report[_0xf888('0x10')][_0xf888('0x11')]=function(_0x4ca1f5){var _0x2095b0=new VoiceQueueReport(this[_0xf888('0xd')]);var _0x387651=new VoiceAgentReport(this[_0xf888('0xd')]);var _0x33ae09=new VoiceDialReport(this[_0xf888('0xd')]);var _0x5ccb96=new VoiceCallReport(this[_0xf888('0xd')]);var _0xe077c3=new UserReport(this[_0xf888('0xd')]);if(config[_0xf888('0x12')]&&config['xdr']['disabled']){ami['on'](_0xf888('0x13'),this['voiceQueueReport']['bind'](this));ami['on'](_0xf888('0x14'),this['voiceCallReport']['bind'](this));ami['on'](_0xf888('0x15'),this[_0xf888('0x16')][_0xf888('0x17')](this));ami['on']('custom:voiceDialReport',this[_0xf888('0x18')][_0xf888('0x17')](this));ami['on'](_0xf888('0x19'),this[_0xf888('0x1a')]['bind'](this));ami['on'](_0xf888('0x1b'),this[_0xf888('0x1c')][_0xf888('0x17')](this));}};Report[_0xf888('0x10')][_0xf888('0x1d')]=function(_0x373d8b){var _0xdff63b;_0xdff63b=_[_0xf888('0x1e')](this[_0xf888('0xe')],function(_0x316b68){return _0x316b68[_0xf888('0x1f')]==_0x373d8b||_0x316b68[_0xf888('0x20')]==_0x373d8b;});if(_[_0xf888('0x21')](_0xdff63b)){var _0x201dca=_[_0xf888('0x1e')](this[_0xf888('0xf')],function(_0x2e992b){return _0x2e992b[_0xf888('0x1f')]==_0x373d8b||_0x2e992b[_0xf888('0x20')]==_0x373d8b;});if(_0x201dca){_0xdff63b=_[_0xf888('0x1e')](this['agents'],function(_0x203b39){return _0x203b39[_0xf888('0x22')]==util[_0xf888('0x23')](_0xf888('0x24'),_0x201dca['name']);});}}return _0xdff63b;};Report['prototype']['voiceQueueReport']=function(_0x1c72fe){for(var _0x51efd3=0x0;_0x51efd3<_0x1c72fe[_0xf888('0x25')];_0x51efd3+=0x1){var _0x17ea8c=this[_0xf888('0x1d')](_0x1c72fe[_0x51efd3]['connectedlinenum']);if(_0x17ea8c){_0x1c72fe[_0x51efd3][_0xf888('0x1f')]=_0x17ea8c['accountcode'];_0x1c72fe[_0x51efd3]['assigned']=!![];_0x1c72fe[_0x51efd3][_0xf888('0x26')]=_0x17ea8c[_0xf888('0x20')];_0x1c72fe[_0x51efd3][_0xf888('0x22')]=_[_0xf888('0x21')](_0x17ea8c[_0xf888('0x22')])?util['format'](_0xf888('0x24'),_0x17ea8c[_0xf888('0x20')]):_0x17ea8c['interface'];if(_0x1c72fe[_0x51efd3][_0xf888('0x27')]){_0x1c72fe[_0x51efd3]['queuecallercompleteAt']=moment()[_0xf888('0x23')](_0xf888('0x28'));}if(_0x1c72fe[_0x51efd3][_0xf888('0x29')]){_0x1c72fe[_0x51efd3][_0xf888('0x2a')]=moment()[_0xf888('0x23')](_0xf888('0x28'));}RpcMemberReport[_0xf888('0x2b')](_0x1c72fe[_0x51efd3]);}RpcVoiceQueueReport[_0xf888('0x2c')](_0x1c72fe[_0x51efd3]);}};function extractCalleridNumber(_0xb695ba){var _0x32541c=_0xb695ba[_0xf888('0x2d')](/<(.*?)>/);return _0x32541c?_0x32541c[0x1]:_0xb695ba;}Report[_0xf888('0x10')][_0xf888('0x2e')]=function(_0x504c80){for(var _0x24c7e3=0x0;_0x24c7e3<Object[_0xf888('0x2f')](this[_0xf888('0xe')])[_0xf888('0x25')];_0x24c7e3++){var _0x3e2032=Object[_0xf888('0x2f')](this[_0xf888('0xe')])[_0x24c7e3];var _0xfe2bce=this['agents'][_0x3e2032];if(_0xfe2bce[_0xf888('0x1f')]===Number(_0x504c80))return _0xfe2bce;}return null;};Report[_0xf888('0x10')]['getCallType']=function(_0x46f0b5){var _0x22b710=_0x46f0b5[_0xf888('0x30')][_0xf888('0x31')]('-')[0x0];var _0x3f30dc=this[_0xf888('0xe')][_0x22b710];if(!_0x3f30dc)_0x3f30dc=this[_0xf888('0x2e')](_0x46f0b5['calleridnum']);return!_0x3f30dc?_0xf888('0x32'):_0xf888('0x33');};Report[_0xf888('0x10')]['voiceCallReport']=function(_0x32dfd6){_0x32dfd6[_0xf888('0x34')]=_0x32dfd6[_0xf888('0x34')]||_0x32dfd6[_0xf888('0x35')];if(_0x32dfd6['type']==_0xf888('0x36')){_0x32dfd6['lastapplication']='queue';_0x32dfd6[_0xf888('0x37')]=_0x32dfd6[_0xf888('0x38')];if(_0x32dfd6[_0xf888('0x39')]==_0xf888('0x3a')){_0x32dfd6['accountcode']='';_0x32dfd6[_0xf888('0x34')]=extractCalleridNumber(_0x32dfd6[_0xf888('0x3b')]);}else if(_0x32dfd6['context']==_0xf888('0x3c')){if(_0x32dfd6[_0xf888('0x34')]==_0xf888('0x3d')){_0x32dfd6[_0xf888('0x34')]=extractCalleridNumber(_0x32dfd6[_0xf888('0x3e')]);_0x32dfd6[_0xf888('0x3f')]=_0x32dfd6[_0xf888('0x40')];_0x32dfd6[_0xf888('0x41')]=[_0x32dfd6[_0xf888('0x30')],_0x32dfd6[_0xf888('0x30')]=_0x32dfd6[_0xf888('0x41')]][0x0];_0x32dfd6['callerid']=_0x32dfd6[_0xf888('0x3e')];}else{_0x32dfd6[_0xf888('0x34')]=_0x32dfd6[_0xf888('0x3f')];_0x32dfd6[_0xf888('0x3f')]=_0x32dfd6[_0xf888('0x40')];if(_0x32dfd6[_0xf888('0x42')]==_0xf888('0x43')){_0x32dfd6[_0xf888('0x1f')]=_0x32dfd6['connectedlinenum'];}else{_0x32dfd6['accountcode']='';}}}}else{_0x32dfd6[_0xf888('0x3b')]=util[_0xf888('0x23')](_0xf888('0x44'),_0x32dfd6[_0xf888('0x45')],_0x32dfd6[_0xf888('0x3f')]);}if(RpcVoiceTransferReport[_0xf888('0x46')][_0x32dfd6[_0xf888('0x47')]]){var _0x30552e=RpcVoiceTransferReport[_0xf888('0x46')][_0x32dfd6['linkedid']];_0x30552e['transfereelinkedid']=_0x32dfd6['uniqueid'];RpcVoiceTransferReport[_0xf888('0x1a')](_0x30552e);delete RpcVoiceTransferReport[_0xf888('0x46')][_0x32dfd6['linkedid']];}if(_[_0xf888('0x21')](_0x32dfd6[_0xf888('0x48')])){_0x32dfd6[_0xf888('0x48')]=this[_0xf888('0x49')](_0x32dfd6);}if(_[_0xf888('0x21')](_0x32dfd6[_0xf888('0x4a')])){var _0x36bca5=_0x32dfd6[_0xf888('0x30')]['split']('-')[0x0];var _0x412070=this[_0xf888('0xe')][_0x36bca5];if(!_0x412070)_0x412070=this['getAgentByInternal'](_0x32dfd6[_0xf888('0x1f')]);if(_0x412070){_0x32dfd6[_0xf888('0x4a')]=_0x412070['id'];_0x32dfd6['membername']=_0x412070[_0xf888('0x20')];}}RpcVoiceCallReport[_0xf888('0x2c')](_0x32dfd6);if(_0x32dfd6[_0xf888('0x4b')]){for(var _0x116915=0x0;_0x116915<_0x32dfd6[_0xf888('0x4c')][_0xf888('0x25')];_0x116915+=0x1){_0x32dfd6[_0xf888('0x4d')]=_0x32dfd6[_0xf888('0x4c')][_0x116915]['filename'];_0x32dfd6[_0xf888('0x4e')]=_0x32dfd6[_0xf888('0x4c')][_0x116915][_0xf888('0x4e')];if(_0x32dfd6[_0xf888('0x35')]==_0xf888('0x3d')){_0x32dfd6['calleridnum']=_0x32dfd6[_0xf888('0x4f')];_0x32dfd6[_0xf888('0x45')]=_0x32dfd6[_0xf888('0x50')];_0x32dfd6['connectedlinenum']=_0x32dfd6[_0xf888('0x1f')];_0x32dfd6['connectedlinename']=_0x32dfd6['membername'];_0x32dfd6['exten']=_0x32dfd6[_0xf888('0x40')];}else if(_0x32dfd6[_0xf888('0x35')]==_0xf888('0x51')){_0x32dfd6[_0xf888('0x3f')]=_0x32dfd6['destination'];_0x32dfd6[_0xf888('0x35')]=_0x32dfd6[_0xf888('0x40')];}RpcVoiceRecording[_0xf888('0x2c')](_0x32dfd6);}}};Report[_0xf888('0x10')][_0xf888('0x16')]=function(_0xf86f42){if(_[_0xf888('0x52')](_0xf86f42)){_0xf86f42[_0xf888('0x53')](function(_0x242680){RpcVoiceAgentReport['create'](_0x242680);});}else{RpcVoiceAgentReport[_0xf888('0x2c')](_0xf86f42);}};Report[_0xf888('0x10')][_0xf888('0x18')]=function(_0x57f647){RpcVoiceDialReport['create'](_0x57f647);var _0x1aba5f;var _0xb61874;var _0x29b45d=_0x57f647[_0xf888('0x30')];if(_[_0xf888('0x54')](_0x29b45d,'Local')){_0xb61874=_0x29b45d[_0xf888('0x55')](_0x29b45d[_0xf888('0x56')]('/')+0x1,_0x29b45d[_0xf888('0x56')]('@'));_0x1aba5f=_[_0xf888('0x1e')](this[_0xf888('0xe')],function(_0x44b19e){return _0x44b19e[_0xf888('0x57')]==_0xb61874||_0x44b19e[_0xf888('0x58')]==_0xb61874||_0x44b19e['accountcode']==_0xb61874;});}else{_0xb61874=_0x29b45d[_0xf888('0x55')](_0x29b45d[_0xf888('0x56')]('/')+0x1,_0x29b45d[_0xf888('0x59')]('-'));_0x1aba5f=this[_0xf888('0x1d')](_0xb61874);}if(_0x1aba5f){_0x57f647[_0xf888('0x22')]=_['isNil'](_0x1aba5f[_0xf888('0x22')])?util[_0xf888('0x23')](_0xf888('0x24'),_0x1aba5f['name']):_0x1aba5f[_0xf888('0x22')];_0x57f647[_0xf888('0x5a')]=_0x1aba5f[_0xf888('0x20')];_0x57f647['accountcode']=_0x1aba5f['accountcode'];RpcMemberReport[_0xf888('0x18')](_0x57f647);}};Report[_0xf888('0x10')]['blindTransfer']=function(_0x556130){RpcVoiceTransferReport[_0xf888('0x46')][_0x556130[_0xf888('0x5b')]]=_0x556130;};Report['prototype'][_0xf888('0x1c')]=function(_0xaba74c){RpcVoiceTransferReport['attendedTransfer'](_0xaba74c);};module[_0xf888('0x5c')]=Report;
\ No newline at end of file
+var _0x8907=['blindtransfer','blindTransfer','attendedtransfer','attendedTransfer','find','agents','name','isNil','interface','SIP/%s','voiceQueueReport','length','connectedlinenum','accountcode','assigned','lastAssignedTo','format','YYYY-MM-DD\x20HH:mm:ss','queuecallerexit','match','getAgentByInternal','keys','getCallType','channel','outbound','destination','exten','type','dialer','lastapplication','lastdata','queue','context','from-voip-provider','from-sip','xcally-motion-preview','calleridpreview','calleridnum','originatecalleridnum','destinationchannel','callerid','disposition','ANSWERED','\x22%s\x22\x20<%s>','calleridname','transfers','linkedid','transfereelinkedid','uniqueid','UserId','split','membername','monitor','monitors','monitorFilename','filename','createdAt','connectedlinename','xcally-motion-dialer','isArray','forEach','create','voiceDialReport','startsWith','Local','substring','indexOf','lastIndexOf','findAgent','transfererlinkedid','exports','lodash','moment','util','../../../config/environment','../ami','../rpc/voiceAgentReport','../rpc/voiceCallReport','../rpc/voiceDialReport','../rpc/memberReport','../rpc/voiceRecording','./voiceQueueReport','./voiceCallReport','./voiceAgentReport','./voiceDialReport','./userReport','realtime','telephones','prototype','sync','xdr','disabled','custom:voiceQueueReport','bind','custom:voiceCallReport','voiceCallReport','custom:voiceAgentReport','voiceAgentReport','custom:voiceDialReport'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0x8907,0x1d3));var _0x7890=function(_0x2232d9,_0x452ce5){_0x2232d9=_0x2232d9-0x0;var _0x11afa1=_0x8907[_0x2232d9];return _0x11afa1;};'use strict';var _=require(_0x7890('0x0'));var moment=require(_0x7890('0x1'));var util=require(_0x7890('0x2'));var config=require(_0x7890('0x3'));var ami=require(_0x7890('0x4'));var RpcVoiceAgentReport=require(_0x7890('0x5'));var RpcVoiceCallReport=require(_0x7890('0x6'));var RpcVoiceDialReport=require(_0x7890('0x7'));var RpcMemberReport=require(_0x7890('0x8'));var RpcVoiceQueueReport=require('../rpc/voiceQueueReport');var RpcVoiceRecording=require(_0x7890('0x9'));var RpcVoiceTransferReport=require('../rpc/voiceTransferReport');var VoiceQueueReport=require(_0x7890('0xa'));var VoiceCallReport=require(_0x7890('0xb'));var VoiceAgentReport=require(_0x7890('0xc'));var VoiceDialReport=require(_0x7890('0xd'));var UserReport=require(_0x7890('0xe'));function Report(_0xc1e8d){this[_0x7890('0xf')]=_0xc1e8d;this['agents']=_0xc1e8d['agents'];this[_0x7890('0x10')]=_0xc1e8d[_0x7890('0x10')];}Report[_0x7890('0x11')][_0x7890('0x12')]=function(_0x3690cf){var _0x5d0fde=new VoiceQueueReport(this[_0x7890('0xf')]);var _0x36d3b9=new VoiceAgentReport(this[_0x7890('0xf')]);var _0x275b48=new VoiceDialReport(this[_0x7890('0xf')]);var _0x32f19c=new VoiceCallReport(this['realtime']);var _0x21590c=new UserReport(this[_0x7890('0xf')]);if(config[_0x7890('0x13')]&&config[_0x7890('0x13')][_0x7890('0x14')]){ami['on'](_0x7890('0x15'),this['voiceQueueReport'][_0x7890('0x16')](this));ami['on'](_0x7890('0x17'),this[_0x7890('0x18')][_0x7890('0x16')](this));ami['on'](_0x7890('0x19'),this[_0x7890('0x1a')][_0x7890('0x16')](this));ami['on'](_0x7890('0x1b'),this['voiceDialReport'][_0x7890('0x16')](this));ami['on'](_0x7890('0x1c'),this[_0x7890('0x1d')][_0x7890('0x16')](this));ami['on'](_0x7890('0x1e'),this[_0x7890('0x1f')][_0x7890('0x16')](this));}};Report[_0x7890('0x11')]['findAgent']=function(_0x56fee8){var _0x2bbd55;_0x2bbd55=_[_0x7890('0x20')](this[_0x7890('0x21')],function(_0x1e1512){return _0x1e1512['accountcode']==_0x56fee8||_0x1e1512[_0x7890('0x22')]==_0x56fee8;});if(_[_0x7890('0x23')](_0x2bbd55)){var _0x3b07f5=_['find'](this[_0x7890('0x10')],function(_0x2a5adf){return _0x2a5adf['accountcode']==_0x56fee8||_0x2a5adf[_0x7890('0x22')]==_0x56fee8;});if(_0x3b07f5){_0x2bbd55=_['find'](this['agents'],function(_0x12fe2c){return _0x12fe2c[_0x7890('0x24')]==util['format'](_0x7890('0x25'),_0x3b07f5[_0x7890('0x22')]);});}}return _0x2bbd55;};Report[_0x7890('0x11')][_0x7890('0x26')]=function(_0x5406b6){for(var _0x416b1b=0x0;_0x416b1b<_0x5406b6[_0x7890('0x27')];_0x416b1b+=0x1){var _0x10aaa2=this['findAgent'](_0x5406b6[_0x416b1b][_0x7890('0x28')]);if(_0x10aaa2){_0x5406b6[_0x416b1b][_0x7890('0x29')]=_0x10aaa2[_0x7890('0x29')];_0x5406b6[_0x416b1b][_0x7890('0x2a')]=!![];_0x5406b6[_0x416b1b][_0x7890('0x2b')]=_0x10aaa2[_0x7890('0x22')];_0x5406b6[_0x416b1b][_0x7890('0x24')]=_[_0x7890('0x23')](_0x10aaa2[_0x7890('0x24')])?util['format'](_0x7890('0x25'),_0x10aaa2[_0x7890('0x22')]):_0x10aaa2[_0x7890('0x24')];if(_0x5406b6[_0x416b1b]['queuecallercomplete']){_0x5406b6[_0x416b1b]['queuecallercompleteAt']=moment()[_0x7890('0x2c')](_0x7890('0x2d'));}if(_0x5406b6[_0x416b1b][_0x7890('0x2e')]){_0x5406b6[_0x416b1b]['queuecallerexitAt']=moment()['format'](_0x7890('0x2d'));}RpcMemberReport[_0x7890('0x26')](_0x5406b6[_0x416b1b]);}RpcVoiceQueueReport['create'](_0x5406b6[_0x416b1b]);}};function extractCalleridNumber(_0x343377){var _0x32f45c=_0x343377[_0x7890('0x2f')](/<(.*?)>/);return _0x32f45c?_0x32f45c[0x1]:_0x343377;}Report['prototype'][_0x7890('0x30')]=function(_0x331b94){for(var _0x2f37cb=0x0;_0x2f37cb<Object[_0x7890('0x31')](this[_0x7890('0x21')])[_0x7890('0x27')];_0x2f37cb++){var _0x527cec=Object['keys'](this[_0x7890('0x21')])[_0x2f37cb];var _0x3004b2=this['agents'][_0x527cec];if(_0x3004b2[_0x7890('0x29')]===Number(_0x331b94))return _0x3004b2;}return null;};Report['prototype'][_0x7890('0x32')]=function(_0x31c467){var _0x3f2d28=_0x31c467[_0x7890('0x33')]['split']('-')[0x0];var _0x1f3563=this['agents'][_0x3f2d28];if(!_0x1f3563)_0x1f3563=this['getAgentByInternal'](_0x31c467['calleridnum']);return!_0x1f3563?_0x7890('0x34'):'internal';};Report['prototype'][_0x7890('0x18')]=function(_0x1d0cfd){_0x1d0cfd[_0x7890('0x35')]=_0x1d0cfd[_0x7890('0x35')]||_0x1d0cfd[_0x7890('0x36')];if(_0x1d0cfd[_0x7890('0x37')]==_0x7890('0x38')){_0x1d0cfd[_0x7890('0x39')]='queue';_0x1d0cfd[_0x7890('0x3a')]=_0x1d0cfd[_0x7890('0x3b')];if(_0x1d0cfd[_0x7890('0x3c')]==_0x7890('0x3d')){_0x1d0cfd[_0x7890('0x29')]='';_0x1d0cfd['destination']=extractCalleridNumber(_0x1d0cfd['callerid']);}else if(_0x1d0cfd['context']==_0x7890('0x3e')){if(_0x1d0cfd['destination']==_0x7890('0x3f')){_0x1d0cfd[_0x7890('0x35')]=extractCalleridNumber(_0x1d0cfd[_0x7890('0x40')]);_0x1d0cfd[_0x7890('0x41')]=_0x1d0cfd[_0x7890('0x42')];_0x1d0cfd[_0x7890('0x43')]=[_0x1d0cfd[_0x7890('0x33')],_0x1d0cfd['channel']=_0x1d0cfd[_0x7890('0x43')]][0x0];_0x1d0cfd[_0x7890('0x44')]=_0x1d0cfd['calleridpreview'];}else{_0x1d0cfd[_0x7890('0x35')]=_0x1d0cfd[_0x7890('0x41')];_0x1d0cfd[_0x7890('0x41')]=_0x1d0cfd[_0x7890('0x42')];if(_0x1d0cfd[_0x7890('0x45')]==_0x7890('0x46')){_0x1d0cfd[_0x7890('0x29')]=_0x1d0cfd['connectedlinenum'];}else{_0x1d0cfd[_0x7890('0x29')]='';}}}}else{_0x1d0cfd[_0x7890('0x44')]=util[_0x7890('0x2c')](_0x7890('0x47'),_0x1d0cfd[_0x7890('0x48')],_0x1d0cfd['calleridnum']);}if(RpcVoiceTransferReport[_0x7890('0x49')][_0x1d0cfd[_0x7890('0x4a')]]){var _0x4101bd=RpcVoiceTransferReport[_0x7890('0x49')][_0x1d0cfd[_0x7890('0x4a')]];_0x4101bd[_0x7890('0x4b')]=_0x1d0cfd[_0x7890('0x4c')];RpcVoiceTransferReport[_0x7890('0x1d')](_0x4101bd);delete RpcVoiceTransferReport[_0x7890('0x49')][_0x1d0cfd['linkedid']];}if(_['isNil'](_0x1d0cfd[_0x7890('0x37')])){_0x1d0cfd[_0x7890('0x37')]=this[_0x7890('0x32')](_0x1d0cfd);}if(_[_0x7890('0x23')](_0x1d0cfd[_0x7890('0x4d')])){var _0x30b90a=_0x1d0cfd['channel'][_0x7890('0x4e')]('-')[0x0];var _0x4f95af=this[_0x7890('0x21')][_0x30b90a];if(!_0x4f95af)_0x4f95af=this[_0x7890('0x30')](_0x1d0cfd[_0x7890('0x29')]);if(_0x4f95af){_0x1d0cfd[_0x7890('0x4d')]=_0x4f95af['id'];_0x1d0cfd[_0x7890('0x4f')]=_0x4f95af[_0x7890('0x22')];}}RpcVoiceCallReport['create'](_0x1d0cfd);if(_0x1d0cfd[_0x7890('0x50')]){for(var _0x4a4663=0x0;_0x4a4663<_0x1d0cfd[_0x7890('0x51')][_0x7890('0x27')];_0x4a4663+=0x1){_0x1d0cfd[_0x7890('0x52')]=_0x1d0cfd[_0x7890('0x51')][_0x4a4663][_0x7890('0x53')];_0x1d0cfd['createdAt']=_0x1d0cfd[_0x7890('0x51')][_0x4a4663][_0x7890('0x54')];if(_0x1d0cfd[_0x7890('0x36')]=='xcally-motion-preview'){_0x1d0cfd[_0x7890('0x41')]=_0x1d0cfd[_0x7890('0x28')];_0x1d0cfd[_0x7890('0x48')]=_0x1d0cfd['connectedlinename'];_0x1d0cfd[_0x7890('0x28')]=_0x1d0cfd[_0x7890('0x29')];_0x1d0cfd[_0x7890('0x55')]=_0x1d0cfd[_0x7890('0x4f')];_0x1d0cfd[_0x7890('0x36')]=_0x1d0cfd[_0x7890('0x42')];}else if(_0x1d0cfd[_0x7890('0x36')]==_0x7890('0x56')){_0x1d0cfd[_0x7890('0x41')]=_0x1d0cfd['destination'];_0x1d0cfd[_0x7890('0x36')]=_0x1d0cfd[_0x7890('0x42')];}RpcVoiceRecording['create'](_0x1d0cfd);}}};Report[_0x7890('0x11')][_0x7890('0x1a')]=function(_0x423aac){if(_[_0x7890('0x57')](_0x423aac)){_0x423aac[_0x7890('0x58')](function(_0x365a71){RpcVoiceAgentReport[_0x7890('0x59')](_0x365a71);});}else{RpcVoiceAgentReport[_0x7890('0x59')](_0x423aac);}};Report['prototype'][_0x7890('0x5a')]=function(_0x2914ef){RpcVoiceDialReport[_0x7890('0x59')](_0x2914ef);var _0x6eb2d9;var _0x1e213b;var _0x1cbf7b=_0x2914ef[_0x7890('0x33')];if(_[_0x7890('0x5b')](_0x1cbf7b,_0x7890('0x5c'))){_0x1e213b=_0x1cbf7b[_0x7890('0x5d')](_0x1cbf7b[_0x7890('0x5e')]('/')+0x1,_0x1cbf7b[_0x7890('0x5e')]('@'));_0x6eb2d9=_[_0x7890('0x20')](this[_0x7890('0x21')],function(_0x34112b){return _0x34112b['mobile']==_0x1e213b||_0x34112b['phone']==_0x1e213b||_0x34112b[_0x7890('0x29')]==_0x1e213b;});}else{_0x1e213b=_0x1cbf7b['substring'](_0x1cbf7b[_0x7890('0x5e')]('/')+0x1,_0x1cbf7b[_0x7890('0x5f')]('-'));_0x6eb2d9=this[_0x7890('0x60')](_0x1e213b);}if(_0x6eb2d9){_0x2914ef[_0x7890('0x24')]=_[_0x7890('0x23')](_0x6eb2d9['interface'])?util[_0x7890('0x2c')]('SIP/%s',_0x6eb2d9['name']):_0x6eb2d9[_0x7890('0x24')];_0x2914ef['membername']=_0x6eb2d9[_0x7890('0x22')];_0x2914ef['accountcode']=_0x6eb2d9[_0x7890('0x29')];RpcMemberReport[_0x7890('0x5a')](_0x2914ef);}};Report[_0x7890('0x11')][_0x7890('0x1d')]=function(_0x552dd6){RpcVoiceTransferReport[_0x7890('0x49')][_0x552dd6[_0x7890('0x61')]]=_0x552dd6;};Report['prototype'][_0x7890('0x1f')]=function(_0x429c32){RpcVoiceTransferReport['attendedTransfer'](_0x429c32);};module[_0x7890('0x62')]=Report;
\ No newline at end of file