Built motion from commit (unavailable).|2.3.1
[motion2.git] / server / services / xdr / recordings.controller.js
index 8dc8d73..787de67 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x928c=['varset','isNil','variable','mixmonitor_filename','.wav49','value','.WAV','assign','agentconnect','connectedlinenum','cdr','type','destinationchannel','dialer','lastdata','destination','uniqueid','calleridnum','calleridname','debug','getUserByInternal','accountcode','then','membername','UserId','request','CreateVoiceRecording','channel'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x928c,0x17f));var _0xc928=function(_0x239af8,_0x42838c){_0x239af8=_0x239af8-0x0;var _0x5b2eed=_0x928c[_0x239af8];return _0x5b2eed;};'use strict';var _=require('lodash');var utils=require('./utils');var recordings={};function writeDB(_0x261249){utils[_0xc928('0x0')](_0x261249);if(_0x261249['accountcode']){utils[_0xc928('0x1')](_0x261249[_0xc928('0x2')])[_0xc928('0x3')](function(_0x3e4e60){if(_0x3e4e60){_0x261249[_0xc928('0x4')]=_0x3e4e60['name'];_0x261249[_0xc928('0x5')]=_0x3e4e60['id'];}utils[_0xc928('0x6')](_0xc928('0x7'),_0x261249);});}else{utils['request']('CreateVoiceRecording',_0x261249);}if(recordings[_0x261249['channel']]){delete recordings[_0x261249[_0xc928('0x8')]];}}exports[_0xc928('0x9')]=function(_0x6b7b61){if(!_[_0xc928('0xa')](_0x6b7b61[_0xc928('0xb')])&&!_[_0xc928('0xa')](_0x6b7b61[_0xc928('0xb')][_0xc928('0xc')])){if(!_['isNil'](recordings[_0x6b7b61[_0xc928('0x8')]])){writeDB(recordings[_0x6b7b61[_0xc928('0x8')]]);}if(_['endsWith'](_0x6b7b61['value'],_0xc928('0xd'))){_0x6b7b61['value']=_0x6b7b61[_0xc928('0xe')]['replace'](_0xc928('0xd'),_0xc928('0xf'));}recordings[_0x6b7b61['channel']]=_[_0xc928('0x10')](_0x6b7b61,{});}};exports[_0xc928('0x11')]=function(_0x5591a1){if(!_[_0xc928('0xa')](recordings[_0x5591a1[_0xc928('0x8')]])){recordings[_0x5591a1[_0xc928('0x8')]]=_[_0xc928('0x10')](recordings[_0x5591a1[_0xc928('0x8')]],{'membername':_0x5591a1[_0xc928('0x4')],'queue':_0x5591a1['queue'],'accountcode':_0x5591a1[_0xc928('0x12')]});}};exports[_0xc928('0x13')]=function(_0x301ef9){if(!_[_0xc928('0xa')](recordings[_0x301ef9[_0xc928('0x8')]])){recordings[_0x301ef9[_0xc928('0x8')]]=_[_0xc928('0x10')](recordings[_0x301ef9[_0xc928('0x8')]],{'type':_0x301ef9[_0xc928('0x14')]});writeDB(recordings[_0x301ef9[_0xc928('0x8')]]);}else if(!_[_0xc928('0xa')](recordings[_0x301ef9[_0xc928('0x15')]])){recordings[_0x301ef9['channel']]=recordings[_0x301ef9[_0xc928('0x15')]];delete recordings[_0x301ef9[_0xc928('0x15')]];if(_0x301ef9[_0xc928('0x14')]==_0xc928('0x16')){recordings[_0x301ef9['channel']]=_[_0xc928('0x10')](recordings[_0x301ef9[_0xc928('0x8')]],{'type':_0x301ef9[_0xc928('0x14')],'uniqueid':_0x301ef9['uniqueid'],'context':_0x301ef9['destinationcontext'],'queue':_0x301ef9[_0xc928('0x17')],'connectedlinenum':_0x301ef9[_0xc928('0x2')],'connectedlinename':'','calleridnum':_0x301ef9[_0xc928('0x18')],'exten':recordings[_0x301ef9[_0xc928('0x8')]]['calleridnum']});}else{recordings[_0x301ef9['channel']]=_[_0xc928('0x10')](recordings[_0x301ef9[_0xc928('0x8')]],{'type':_0x301ef9[_0xc928('0x14')],'channel':_0x301ef9[_0xc928('0x8')],'exten':_0x301ef9[_0xc928('0x18')],'context':_0x301ef9['destinationcontext'],'uniqueid':_0x301ef9[_0xc928('0x19')],'calleridnum':recordings[_0x301ef9[_0xc928('0x8')]][_0xc928('0x12')],'calleridname':recordings[_0x301ef9['channel']]['connectedlinename'],'connectedlinenum':recordings[_0x301ef9[_0xc928('0x8')]][_0xc928('0x1a')],'connectedlinename':recordings[_0x301ef9['channel']][_0xc928('0x1b')]});}writeDB(recordings[_0x301ef9[_0xc928('0x8')]]);}};
\ No newline at end of file
+var _0x8f37=['value','.WAV','assign','agentconnect','queue','connectedlinenum','cdr','type','destinationchannel','dialer','destinationcontext','lastdata','destination','calleridnum','connectedlinename','calleridname','lodash','./utils','getUserByInternal','accountcode','then','membername','UserId','CreateVoiceRecording','request','channel','varset','variable','isNil','mixmonitor_filename','endsWith','.wav49'];(function(_0x28e1a0,_0x463ab4){var _0x4a759f=function(_0x26e7e8){while(--_0x26e7e8){_0x28e1a0['push'](_0x28e1a0['shift']());}};_0x4a759f(++_0x463ab4);}(_0x8f37,0x190));var _0x78f3=function(_0x1a8f78,_0x53f7d5){_0x1a8f78=_0x1a8f78-0x0;var _0x12a821=_0x8f37[_0x1a8f78];return _0x12a821;};'use strict';var _=require(_0x78f3('0x0'));var utils=require(_0x78f3('0x1'));var recordings={};function writeDB(_0x351c4f){utils['debug'](_0x351c4f);if(_0x351c4f['accountcode']){utils[_0x78f3('0x2')](_0x351c4f[_0x78f3('0x3')])[_0x78f3('0x4')](function(_0x539794){if(_0x539794){_0x351c4f[_0x78f3('0x5')]=_0x539794['name'];_0x351c4f[_0x78f3('0x6')]=_0x539794['id'];}utils['request'](_0x78f3('0x7'),_0x351c4f);});}else{utils[_0x78f3('0x8')]('CreateVoiceRecording',_0x351c4f);}if(recordings[_0x351c4f[_0x78f3('0x9')]]){delete recordings[_0x351c4f['channel']];}}exports[_0x78f3('0xa')]=function(_0x423223){if(!_['isNil'](_0x423223[_0x78f3('0xb')])&&!_[_0x78f3('0xc')](_0x423223[_0x78f3('0xb')][_0x78f3('0xd')])){if(!_[_0x78f3('0xc')](recordings[_0x423223['channel']])){writeDB(recordings[_0x423223[_0x78f3('0x9')]]);}if(_[_0x78f3('0xe')](_0x423223['value'],_0x78f3('0xf'))){_0x423223[_0x78f3('0x10')]=_0x423223[_0x78f3('0x10')]['replace'](_0x78f3('0xf'),_0x78f3('0x11'));}recordings[_0x423223[_0x78f3('0x9')]]=_[_0x78f3('0x12')](_0x423223,{});}};exports[_0x78f3('0x13')]=function(_0x1858f1){if(!_[_0x78f3('0xc')](recordings[_0x1858f1[_0x78f3('0x9')]])){recordings[_0x1858f1[_0x78f3('0x9')]]=_[_0x78f3('0x12')](recordings[_0x1858f1[_0x78f3('0x9')]],{'membername':_0x1858f1[_0x78f3('0x5')],'queue':_0x1858f1[_0x78f3('0x14')],'accountcode':_0x1858f1[_0x78f3('0x15')]});}};exports[_0x78f3('0x16')]=function(_0x422855){if(!_[_0x78f3('0xc')](recordings[_0x422855[_0x78f3('0x9')]])){recordings[_0x422855[_0x78f3('0x9')]]=_[_0x78f3('0x12')](recordings[_0x422855[_0x78f3('0x9')]],{'type':_0x422855[_0x78f3('0x17')]});writeDB(recordings[_0x422855[_0x78f3('0x9')]]);}else if(!_['isNil'](recordings[_0x422855[_0x78f3('0x18')]])){recordings[_0x422855[_0x78f3('0x9')]]=recordings[_0x422855['destinationchannel']];delete recordings[_0x422855['destinationchannel']];if(_0x422855['type']==_0x78f3('0x19')){recordings[_0x422855[_0x78f3('0x9')]]=_[_0x78f3('0x12')](recordings[_0x422855[_0x78f3('0x9')]],{'type':_0x422855[_0x78f3('0x17')],'uniqueid':_0x422855['uniqueid'],'context':_0x422855[_0x78f3('0x1a')],'queue':_0x422855[_0x78f3('0x1b')],'connectedlinenum':_0x422855[_0x78f3('0x3')],'connectedlinename':'','calleridnum':_0x422855[_0x78f3('0x1c')],'exten':recordings[_0x422855[_0x78f3('0x9')]][_0x78f3('0x1d')]});}else{recordings[_0x422855[_0x78f3('0x9')]]=_[_0x78f3('0x12')](recordings[_0x422855[_0x78f3('0x9')]],{'type':_0x422855[_0x78f3('0x17')],'channel':_0x422855['channel'],'exten':_0x422855[_0x78f3('0x1c')],'context':_0x422855[_0x78f3('0x1a')],'uniqueid':_0x422855['uniqueid'],'calleridnum':recordings[_0x422855[_0x78f3('0x9')]][_0x78f3('0x15')],'calleridname':recordings[_0x422855[_0x78f3('0x9')]][_0x78f3('0x1e')],'connectedlinenum':recordings[_0x422855[_0x78f3('0x9')]]['calleridnum'],'connectedlinename':recordings[_0x422855[_0x78f3('0x9')]][_0x78f3('0x1f')]});}writeDB(recordings[_0x422855[_0x78f3('0x9')]]);}};
\ No newline at end of file