Built motion from commit 78ef1e9a0.|1.0.36
[motion.git] / server / config / tools / user.js
index fe7df77..4bed402 100644 (file)
@@ -1 +1 @@
-var _0xd035=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x43\x68\x61\x6E\x53\x70\x79","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x75\x73\x65\x72\x20\x63\x68\x61\x6E\x73\x70\x79\x2E\x2E\x2E","\x64\x65\x62\x75\x67","\x61\x6C\x6C","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x25\x73\x25\x73","\x70\x72\x65\x66\x69\x78","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x25\x73","\x63\x68\x61\x6E\x73\x70\x79","\x69\x64","\x73\x79\x73\x74\x65\x6D","\x70\x75\x73\x68","\x61\x75\x74\x68","\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x63\x6F\x72\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D\x2E\x25\x73","\x53\x49\x50\x2F\x25\x73\x2C\x25\x73","\x6F\x70\x74\x69\x6F\x6E\x73","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x44\x65\x6C\x65\x74\x69\x6E\x67\x20\x75\x73\x65\x72\x20\x63\x68\x61\x6E\x73\x70\x79\x2E\x2E\x2E","\x64\x65\x73\x74\x72\x6F\x79","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x5F\x63\x68\x61\x6E\x67\x65\x64","\x55\x70\x64\x61\x74\x69\x6E\x67\x20\x75\x73\x65\x72\x20\x63\x61\x6C\x6C\x65\x72\x49\x44\x2E\x2E\x2E","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x73\x61\x76\x65","\x72\x65\x73\x6F\x6C\x76\x65","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x75\x73\x65\x72\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x2E\x2E\x2E","\x5F","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x44\x69\x61\x6C","\x53\x49\x50\x2F","\x2C\x2C\x74\x54\x78\x58","\x48\x61\x6E\x67\x75\x70","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x6C\x61\x73\x74\x4C\x6F\x67\x69\x6E\x41\x74","\x6F\x6E\x6C\x69\x6E\x65","\x43\x68\x61\x6E\x73\x70\x79\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65"];_0xd035[0];var fs=require(_0xd035[1]);var util=require(_0xd035[2]);var path=require(_0xd035[3]);var config=require(_0xd035[4]);var UserModel=require(_0xd035[6])[_0xd035[5]];var VoiceExtension=require(_0xd035[6])[_0xd035[7]];var ChanSpy=require(_0xd035[6])[_0xd035[8]];var sequelize=require(_0xd035[6])[_0xd035[9]];var BPromise=require(_0xd035[10]);var logger=require(_0xd035[12])(_0xd035[11]);function createChanspy(_0xed48xc,_0xed48xd){logger[_0xd035[14]](_0xd035[13]);return ChanSpy[_0xd035[43]]()[_0xd035[42]](function(_0xed48xe){var _0xed48xf=[];_0xed48xe[_0xd035[41]](function(_0xed48x10){var _0xed48x11=[];var _0xed48x12=1;_0xed48x11[_0xd035[26]]({context:_0xd035[16],exten:util[_0xd035[20]](_0xd035[17],_0xed48x10[_0xd035[18]],_0xed48xc[_0xd035[19]]),priority:_0xed48x12,app:_0xd035[21],appdata:util[_0xd035[20]](_0xd035[22],_0xd035[23]),UserId:_0xed48xc[_0xd035[24]],ChanSpyId:_0xed48x10[_0xd035[24]],type:_0xd035[25]});_0xed48x12++;if(_0xed48x10[_0xd035[27]]){_0xed48x11[_0xd035[26]]({context:_0xd035[16],exten:util[_0xd035[20]](_0xd035[17],_0xed48x10[_0xd035[18]],_0xed48xc[_0xd035[19]]),priority:_0xed48x12,app:_0xd035[28],appdata:_0xed48x10[_0xd035[29]],UserId:_0xed48xc[_0xd035[24]],ChanSpyId:_0xed48x10[_0xd035[24]],type:_0xd035[25]});_0xed48x12++};if(_0xed48x10[_0xd035[30]]&& _0xed48x10[_0xd035[31]]){_0xed48x11[_0xd035[26]]({context:_0xd035[16],exten:util[_0xd035[20]](_0xd035[17],_0xed48x10[_0xd035[18]],_0xed48xc[_0xd035[19]]),priority:_0xed48x12,app:_0xd035[32],appdata:util[_0xd035[20]](_0xd035[33],_0xed48x10[_0xd035[31]]),UserId:_0xed48xc[_0xd035[24]],ChanSpyId:_0xed48x10[_0xd035[24]],type:_0xd035[25]});_0xed48x12++};_0xed48x11[_0xd035[26]]({context:_0xd035[16],exten:util[_0xd035[20]](_0xd035[17],_0xed48x10[_0xd035[18]],_0xed48xc[_0xd035[19]]),priority:_0xed48x12,app:_0xd035[8],appdata:util[_0xd035[20]](_0xd035[34],_0xed48xc[_0xd035[19]],_0xed48x10[_0xd035[35]]),UserId:_0xed48xc[_0xd035[24]],ChanSpyId:_0xed48x10[_0xd035[24]],type:_0xd035[25]});_0xed48x12++;if(_0xed48x10[_0xd035[30]]&& _0xed48x10[_0xd035[31]]){_0xed48x11[_0xd035[26]]({context:_0xd035[16],exten:util[_0xd035[20]](_0xd035[17],_0xed48x10[_0xd035[18]],_0xed48xc[_0xd035[19]]),priority:_0xed48x12,app:_0xd035[36],appdata:_0xd035[37],UserId:_0xed48xc[_0xd035[24]],ChanSpyId:_0xed48x10[_0xd035[24]],type:_0xd035[25]})};_0xed48x12= 1;_0xed48x11[_0xd035[26]]({context:_0xd035[16],exten:util[_0xd035[20]](_0xd035[17],_0xed48x10[_0xd035[18]],_0xed48xc[_0xd035[38]]),priority:_0xed48x12,app:_0xd035[21],appdata:util[_0xd035[20]](_0xd035[22],_0xd035[23]),UserId:_0xed48xc[_0xd035[24]],ChanSpyId:_0xed48x10[_0xd035[24]],type:_0xd035[25]});_0xed48x12++;if(_0xed48x10[_0xd035[27]]){_0xed48x11[_0xd035[26]]({context:_0xd035[16],exten:util[_0xd035[20]](_0xd035[17],_0xed48x10[_0xd035[18]],_0xed48xc[_0xd035[38]]),priority:_0xed48x12,app:_0xd035[28],appdata:_0xed48x10[_0xd035[29]],UserId:_0xed48xc[_0xd035[24]],ChanSpyId:_0xed48x10[_0xd035[24]],type:_0xd035[25]});_0xed48x12++};if(_0xed48x10[_0xd035[30]]&& _0xed48x10[_0xd035[31]]){_0xed48x11[_0xd035[26]]({context:_0xd035[16],exten:util[_0xd035[20]](_0xd035[17],_0xed48x10[_0xd035[18]],_0xed48xc[_0xd035[38]]),priority:_0xed48x12,app:_0xd035[32],appdata:util[_0xd035[20]](_0xd035[33],_0xed48x10[_0xd035[31]]),UserId:_0xed48xc[_0xd035[24]],ChanSpyId:_0xed48x10[_0xd035[24]],type:_0xd035[25]});_0xed48x12++};_0xed48x11[_0xd035[26]]({context:_0xd035[16],exten:util[_0xd035[20]](_0xd035[17],_0xed48x10[_0xd035[18]],_0xed48xc[_0xd035[38]]),priority:_0xed48x12,app:_0xd035[8],appdata:util[_0xd035[20]](_0xd035[34],_0xed48xc[_0xd035[19]],_0xed48x10[_0xd035[35]]),UserId:_0xed48xc[_0xd035[24]],ChanSpyId:_0xed48x10[_0xd035[24]],type:_0xd035[25]});_0xed48x12++;if(_0xed48x10[_0xd035[30]]&& _0xed48x10[_0xd035[31]]){_0xed48x11[_0xd035[26]]({context:_0xd035[16],exten:util[_0xd035[20]](_0xd035[17],_0xed48x10[_0xd035[18]],_0xed48xc[_0xd035[38]]),priority:_0xed48x12,app:_0xd035[36],appdata:_0xd035[37],UserId:_0xed48xc[_0xd035[24]],ChanSpyId:_0xed48x10[_0xd035[24]],type:_0xd035[25]})};_0xed48xf[_0xd035[26]](VoiceExtension[_0xd035[40]](_0xed48x11,{transaction:_0xed48xd[_0xd035[39]]|| null}))});return _0xed48xf})[_0xd035[15]]()}function deleteChanSpy(_0xed48xc,_0xed48xd){logger[_0xd035[14]](_0xd035[44]);return VoiceExtension[_0xd035[45]]({where:{UserId:_0xed48xc[_0xd035[24]],ChanSpyId:{$ne:null}},transaction:_0xed48xd[_0xd035[39]]|| null})}function createCallerID(_0xed48xc,_0xed48xd){return function(){if(_0xed48xc[_0xd035[46]]&& _0xed48xc[_0xd035[38]]&& _0xed48xc[_0xd035[48]][_0xd035[47]](_0xd035[46])){logger[_0xd035[14]](_0xd035[49]);_0xed48xc[_0xd035[50]]= util[_0xd035[20]](_0xd035[51],_0xed48xc[_0xd035[46]],_0xed48xc[_0xd035[38]]);return _0xed48xc[_0xd035[52]]({transaction:_0xed48xd[_0xd035[39]]|| null})}else {return BPromise[_0xd035[53]]()}}}function createExtension(_0xed48xc,_0xed48xd){logger[_0xd035[14]](_0xd035[54]);return function(){var _0xed48x16=[{context:_0xd035[16],exten:_0xd035[55]+ _0xed48xc[_0xd035[38]],priority:1,app:_0xd035[21],appdata:_0xd035[56],UserId:_0xed48xc[_0xd035[24]],type:_0xd035[25]},{context:_0xd035[16],exten:_0xd035[55]+ _0xed48xc[_0xd035[38]],priority:2,app:_0xd035[57],appdata:_0xd035[58]+ _0xed48xc[_0xd035[19]]+ _0xd035[59],UserId:_0xed48xc[_0xd035[24]],type:_0xd035[25]},{context:_0xd035[16],exten:_0xd035[55]+ _0xed48xc[_0xd035[38]],priority:3,app:_0xd035[60],appdata:_0xd035[37],UserId:_0xed48xc[_0xd035[24]],type:_0xd035[25]},{context:_0xd035[16],exten:_0xed48xc[_0xd035[19]],priority:1,app:_0xd035[21],appdata:_0xd035[56],UserId:_0xed48xc[_0xd035[24]],type:_0xd035[25]},{context:_0xd035[16],exten:_0xed48xc[_0xd035[19]],priority:2,app:_0xd035[57],appdata:_0xd035[58]+ _0xed48xc[_0xd035[19]]+ _0xd035[59],UserId:_0xed48xc[_0xd035[24]],type:_0xd035[25]},{context:_0xd035[16],exten:_0xed48xc[_0xd035[19]],priority:3,app:_0xd035[60],appdata:_0xd035[37],UserId:_0xed48xc[_0xd035[24]],type:_0xd035[25]}];return VoiceExtension[_0xd035[40]](_0xed48x16,{transaction:_0xed48xd[_0xd035[39]]|| null})}}exports[_0xd035[61]]= function(_0xed48xd){return function(_0xed48xc){if(!_0xed48xc[_0xd035[48]][_0xd035[47]](_0xd035[62])&&  !_0xed48xc[_0xd035[48]][_0xd035[47]](_0xd035[63]) &&  !_0xed48xc[_0xd035[48]][_0xd035[47]](_0xd035[50]) &&  !_0xed48xc[_0xd035[48]][_0xd035[47]](_0xd035[64]) &&  !_0xed48xc[_0xd035[48]][_0xd035[47]](_0xd035[65])){return BPromise[_0xd035[53]]()[_0xd035[42]](createCallerID(_0xed48xc,_0xed48xd))[_0xd035[42]](function(){if((_0xed48xc[_0xd035[23]]&& _0xed48xc[_0xd035[48]][_0xd035[47]](_0xd035[23]))){return createChanspy(_0xed48xc,_0xed48xd)}})[_0xd035[42]](function(){if(_0xed48xc[_0xd035[23]]&&  !_0xed48xc[_0xd035[48]][_0xd035[47]](_0xd035[23])&& _0xed48xc[_0xd035[48]][_0xd035[47]](_0xd035[19])){return deleteChanSpy(_0xed48xc,_0xed48xd)}})[_0xd035[42]](function(){if(_0xed48xc[_0xd035[23]]&&  !_0xed48xc[_0xd035[48]][_0xd035[47]](_0xd035[23])&& _0xed48xc[_0xd035[48]][_0xd035[47]](_0xd035[19])){return createChanspy(_0xed48xc,_0xed48xd)}})[_0xd035[42]](function(){if(!_0xed48xc[_0xd035[23]]&& _0xed48xc[_0xd035[48]][_0xd035[47]](_0xd035[23])){return deleteChanSpy(_0xed48xc,_0xed48xd)}})[_0xd035[69]](function(_0xed48x17){logger[_0xd035[68]](_0xd035[66],_0xed48x17[_0xd035[67]])})[_0xd035[42]](function(){return _0xed48xc})}else {return BPromise[_0xd035[53]]()[_0xd035[42]](function(){return _0xed48xc})}}};exports[_0xd035[70]]= function(_0xed48xd){return function(_0xed48xc){delete _0xed48xc[_0xd035[48]][_0xd035[38]];return Promise[_0xd035[15]]([])[_0xd035[42]](createCallerID(_0xed48xc,_0xed48xd))[_0xd035[42]](createExtension(_0xed48xc,_0xed48xd))[_0xd035[42]](function(){if(_0xed48xc[_0xd035[23]]){return createChanspy(_0xed48xc,_0xed48xd)}})[_0xd035[42]](function(){return _0xed48xc})}}
\ No newline at end of file
+var _0x61d0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x43\x68\x61\x6E\x53\x70\x79","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x75\x73\x65\x72\x20\x63\x68\x61\x6E\x73\x70\x79\x2E\x2E\x2E","\x64\x65\x62\x75\x67","\x61\x6C\x6C","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x25\x73\x25\x73","\x70\x72\x65\x66\x69\x78","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x25\x73","\x63\x68\x61\x6E\x73\x70\x79","\x69\x64","\x73\x79\x73\x74\x65\x6D","\x70\x75\x73\x68","\x61\x75\x74\x68","\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x63\x6F\x72\x64","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D\x2E\x25\x73","\x53\x49\x50\x2F\x25\x73\x2C\x25\x73","\x6F\x70\x74\x69\x6F\x6E\x73","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x44\x65\x6C\x65\x74\x69\x6E\x67\x20\x75\x73\x65\x72\x20\x63\x68\x61\x6E\x73\x70\x79\x2E\x2E\x2E","\x64\x65\x73\x74\x72\x6F\x79","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x5F\x63\x68\x61\x6E\x67\x65\x64","\x55\x70\x64\x61\x74\x69\x6E\x67\x20\x75\x73\x65\x72\x20\x63\x61\x6C\x6C\x65\x72\x49\x44\x2E\x2E\x2E","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x73\x61\x76\x65","\x72\x65\x73\x6F\x6C\x76\x65","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x75\x73\x65\x72\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x2E\x2E\x2E","\x5F","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x44\x69\x61\x6C","\x53\x49\x50\x2F","\x2C\x2C\x74\x54\x78\x58","\x48\x61\x6E\x67\x75\x70","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x6C\x61\x73\x74\x4C\x6F\x67\x69\x6E\x41\x74","\x6F\x6E\x6C\x69\x6E\x65","\x43\x68\x61\x6E\x73\x70\x79\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65"];_0x61d0[0];var fs=require(_0x61d0[1]);var util=require(_0x61d0[2]);var path=require(_0x61d0[3]);var config=require(_0x61d0[4]);var UserModel=require(_0x61d0[6])[_0x61d0[5]];var VoiceExtension=require(_0x61d0[6])[_0x61d0[7]];var ChanSpy=require(_0x61d0[6])[_0x61d0[8]];var sequelize=require(_0x61d0[6])[_0x61d0[9]];var BPromise=require(_0x61d0[10]);var logger=require(_0x61d0[12])(_0x61d0[11]);function createChanspy(_0x9cd8xc,_0x9cd8xd){logger[_0x61d0[14]](_0x61d0[13]);return ChanSpy[_0x61d0[43]]()[_0x61d0[42]](function(_0x9cd8xe){var _0x9cd8xf=[];_0x9cd8xe[_0x61d0[41]](function(_0x9cd8x10){var _0x9cd8x11=[];var _0x9cd8x12=1;_0x9cd8x11[_0x61d0[26]]({context:_0x61d0[16],exten:util[_0x61d0[20]](_0x61d0[17],_0x9cd8x10[_0x61d0[18]],_0x9cd8xc[_0x61d0[19]]),priority:_0x9cd8x12,app:_0x61d0[21],appdata:util[_0x61d0[20]](_0x61d0[22],_0x61d0[23]),UserId:_0x9cd8xc[_0x61d0[24]],ChanSpyId:_0x9cd8x10[_0x61d0[24]],type:_0x61d0[25]});_0x9cd8x12++;if(_0x9cd8x10[_0x61d0[27]]){_0x9cd8x11[_0x61d0[26]]({context:_0x61d0[16],exten:util[_0x61d0[20]](_0x61d0[17],_0x9cd8x10[_0x61d0[18]],_0x9cd8xc[_0x61d0[19]]),priority:_0x9cd8x12,app:_0x61d0[28],appdata:_0x9cd8x10[_0x61d0[29]],UserId:_0x9cd8xc[_0x61d0[24]],ChanSpyId:_0x9cd8x10[_0x61d0[24]],type:_0x61d0[25]});_0x9cd8x12++};if(_0x9cd8x10[_0x61d0[30]]&& _0x9cd8x10[_0x61d0[31]]){_0x9cd8x11[_0x61d0[26]]({context:_0x61d0[16],exten:util[_0x61d0[20]](_0x61d0[17],_0x9cd8x10[_0x61d0[18]],_0x9cd8xc[_0x61d0[19]]),priority:_0x9cd8x12,app:_0x61d0[32],appdata:util[_0x61d0[20]](_0x61d0[33],_0x9cd8x10[_0x61d0[31]]),UserId:_0x9cd8xc[_0x61d0[24]],ChanSpyId:_0x9cd8x10[_0x61d0[24]],type:_0x61d0[25]});_0x9cd8x12++};_0x9cd8x11[_0x61d0[26]]({context:_0x61d0[16],exten:util[_0x61d0[20]](_0x61d0[17],_0x9cd8x10[_0x61d0[18]],_0x9cd8xc[_0x61d0[19]]),priority:_0x9cd8x12,app:_0x61d0[8],appdata:util[_0x61d0[20]](_0x61d0[34],_0x9cd8xc[_0x61d0[19]],_0x9cd8x10[_0x61d0[35]]),UserId:_0x9cd8xc[_0x61d0[24]],ChanSpyId:_0x9cd8x10[_0x61d0[24]],type:_0x61d0[25]});_0x9cd8x12++;if(_0x9cd8x10[_0x61d0[30]]&& _0x9cd8x10[_0x61d0[31]]){_0x9cd8x11[_0x61d0[26]]({context:_0x61d0[16],exten:util[_0x61d0[20]](_0x61d0[17],_0x9cd8x10[_0x61d0[18]],_0x9cd8xc[_0x61d0[19]]),priority:_0x9cd8x12,app:_0x61d0[36],appdata:_0x61d0[37],UserId:_0x9cd8xc[_0x61d0[24]],ChanSpyId:_0x9cd8x10[_0x61d0[24]],type:_0x61d0[25]})};_0x9cd8x12= 1;_0x9cd8x11[_0x61d0[26]]({context:_0x61d0[16],exten:util[_0x61d0[20]](_0x61d0[17],_0x9cd8x10[_0x61d0[18]],_0x9cd8xc[_0x61d0[38]]),priority:_0x9cd8x12,app:_0x61d0[21],appdata:util[_0x61d0[20]](_0x61d0[22],_0x61d0[23]),UserId:_0x9cd8xc[_0x61d0[24]],ChanSpyId:_0x9cd8x10[_0x61d0[24]],type:_0x61d0[25]});_0x9cd8x12++;if(_0x9cd8x10[_0x61d0[27]]){_0x9cd8x11[_0x61d0[26]]({context:_0x61d0[16],exten:util[_0x61d0[20]](_0x61d0[17],_0x9cd8x10[_0x61d0[18]],_0x9cd8xc[_0x61d0[38]]),priority:_0x9cd8x12,app:_0x61d0[28],appdata:_0x9cd8x10[_0x61d0[29]],UserId:_0x9cd8xc[_0x61d0[24]],ChanSpyId:_0x9cd8x10[_0x61d0[24]],type:_0x61d0[25]});_0x9cd8x12++};if(_0x9cd8x10[_0x61d0[30]]&& _0x9cd8x10[_0x61d0[31]]){_0x9cd8x11[_0x61d0[26]]({context:_0x61d0[16],exten:util[_0x61d0[20]](_0x61d0[17],_0x9cd8x10[_0x61d0[18]],_0x9cd8xc[_0x61d0[38]]),priority:_0x9cd8x12,app:_0x61d0[32],appdata:util[_0x61d0[20]](_0x61d0[33],_0x9cd8x10[_0x61d0[31]]),UserId:_0x9cd8xc[_0x61d0[24]],ChanSpyId:_0x9cd8x10[_0x61d0[24]],type:_0x61d0[25]});_0x9cd8x12++};_0x9cd8x11[_0x61d0[26]]({context:_0x61d0[16],exten:util[_0x61d0[20]](_0x61d0[17],_0x9cd8x10[_0x61d0[18]],_0x9cd8xc[_0x61d0[38]]),priority:_0x9cd8x12,app:_0x61d0[8],appdata:util[_0x61d0[20]](_0x61d0[34],_0x9cd8xc[_0x61d0[19]],_0x9cd8x10[_0x61d0[35]]),UserId:_0x9cd8xc[_0x61d0[24]],ChanSpyId:_0x9cd8x10[_0x61d0[24]],type:_0x61d0[25]});_0x9cd8x12++;if(_0x9cd8x10[_0x61d0[30]]&& _0x9cd8x10[_0x61d0[31]]){_0x9cd8x11[_0x61d0[26]]({context:_0x61d0[16],exten:util[_0x61d0[20]](_0x61d0[17],_0x9cd8x10[_0x61d0[18]],_0x9cd8xc[_0x61d0[38]]),priority:_0x9cd8x12,app:_0x61d0[36],appdata:_0x61d0[37],UserId:_0x9cd8xc[_0x61d0[24]],ChanSpyId:_0x9cd8x10[_0x61d0[24]],type:_0x61d0[25]})};_0x9cd8xf[_0x61d0[26]](VoiceExtension[_0x61d0[40]](_0x9cd8x11,{transaction:_0x9cd8xd[_0x61d0[39]]|| null}))});return _0x9cd8xf})[_0x61d0[15]]()}function deleteChanSpy(_0x9cd8xc,_0x9cd8xd){logger[_0x61d0[14]](_0x61d0[44]);return VoiceExtension[_0x61d0[45]]({where:{UserId:_0x9cd8xc[_0x61d0[24]],ChanSpyId:{$ne:null}},transaction:_0x9cd8xd[_0x61d0[39]]|| null})}function createCallerID(_0x9cd8xc,_0x9cd8xd){return function(){if(_0x9cd8xc[_0x61d0[46]]&& _0x9cd8xc[_0x61d0[38]]&& _0x9cd8xc[_0x61d0[48]][_0x61d0[47]](_0x61d0[46])){logger[_0x61d0[14]](_0x61d0[49]);_0x9cd8xc[_0x61d0[50]]= util[_0x61d0[20]](_0x61d0[51],_0x9cd8xc[_0x61d0[46]],_0x9cd8xc[_0x61d0[38]]);return _0x9cd8xc[_0x61d0[52]]({transaction:_0x9cd8xd[_0x61d0[39]]|| null})}else {return BPromise[_0x61d0[53]]()}}}function createExtension(_0x9cd8xc,_0x9cd8xd){logger[_0x61d0[14]](_0x61d0[54]);return function(){var _0x9cd8x16=[{context:_0x61d0[16],exten:_0x61d0[55]+ _0x9cd8xc[_0x61d0[38]],priority:1,app:_0x61d0[21],appdata:_0x61d0[56],UserId:_0x9cd8xc[_0x61d0[24]],type:_0x61d0[25]},{context:_0x61d0[16],exten:_0x61d0[55]+ _0x9cd8xc[_0x61d0[38]],priority:2,app:_0x61d0[57],appdata:_0x61d0[58]+ _0x9cd8xc[_0x61d0[19]]+ _0x61d0[59],UserId:_0x9cd8xc[_0x61d0[24]],type:_0x61d0[25]},{context:_0x61d0[16],exten:_0x61d0[55]+ _0x9cd8xc[_0x61d0[38]],priority:3,app:_0x61d0[60],appdata:_0x61d0[37],UserId:_0x9cd8xc[_0x61d0[24]],type:_0x61d0[25]},{context:_0x61d0[16],exten:_0x9cd8xc[_0x61d0[19]],priority:1,app:_0x61d0[21],appdata:_0x61d0[56],UserId:_0x9cd8xc[_0x61d0[24]],type:_0x61d0[25]},{context:_0x61d0[16],exten:_0x9cd8xc[_0x61d0[19]],priority:2,app:_0x61d0[57],appdata:_0x61d0[58]+ _0x9cd8xc[_0x61d0[19]]+ _0x61d0[59],UserId:_0x9cd8xc[_0x61d0[24]],type:_0x61d0[25]},{context:_0x61d0[16],exten:_0x9cd8xc[_0x61d0[19]],priority:3,app:_0x61d0[60],appdata:_0x61d0[37],UserId:_0x9cd8xc[_0x61d0[24]],type:_0x61d0[25]}];return VoiceExtension[_0x61d0[40]](_0x9cd8x16,{transaction:_0x9cd8xd[_0x61d0[39]]|| null})}}exports[_0x61d0[61]]= function(_0x9cd8xd){return function(_0x9cd8xc){if(!_0x9cd8xc[_0x61d0[48]][_0x61d0[47]](_0x61d0[62])&&  !_0x9cd8xc[_0x61d0[48]][_0x61d0[47]](_0x61d0[63]) &&  !_0x9cd8xc[_0x61d0[48]][_0x61d0[47]](_0x61d0[50]) &&  !_0x9cd8xc[_0x61d0[48]][_0x61d0[47]](_0x61d0[64]) &&  !_0x9cd8xc[_0x61d0[48]][_0x61d0[47]](_0x61d0[65])){return BPromise[_0x61d0[53]]()[_0x61d0[42]](createCallerID(_0x9cd8xc,_0x9cd8xd))[_0x61d0[42]](function(){if((_0x9cd8xc[_0x61d0[23]]&& _0x9cd8xc[_0x61d0[48]][_0x61d0[47]](_0x61d0[23]))){return createChanspy(_0x9cd8xc,_0x9cd8xd)}})[_0x61d0[42]](function(){if(_0x9cd8xc[_0x61d0[23]]&&  !_0x9cd8xc[_0x61d0[48]][_0x61d0[47]](_0x61d0[23])&& _0x9cd8xc[_0x61d0[48]][_0x61d0[47]](_0x61d0[19])){return deleteChanSpy(_0x9cd8xc,_0x9cd8xd)}})[_0x61d0[42]](function(){if(_0x9cd8xc[_0x61d0[23]]&&  !_0x9cd8xc[_0x61d0[48]][_0x61d0[47]](_0x61d0[23])&& _0x9cd8xc[_0x61d0[48]][_0x61d0[47]](_0x61d0[19])){return createChanspy(_0x9cd8xc,_0x9cd8xd)}})[_0x61d0[42]](function(){if(!_0x9cd8xc[_0x61d0[23]]&& _0x9cd8xc[_0x61d0[48]][_0x61d0[47]](_0x61d0[23])){return deleteChanSpy(_0x9cd8xc,_0x9cd8xd)}})[_0x61d0[69]](function(_0x9cd8x17){logger[_0x61d0[68]](_0x61d0[66],_0x9cd8x17[_0x61d0[67]])})[_0x61d0[42]](function(){return _0x9cd8xc})}else {return BPromise[_0x61d0[53]]()[_0x61d0[42]](function(){return _0x9cd8xc})}}};exports[_0x61d0[70]]= function(_0x9cd8xd){return function(_0x9cd8xc){delete _0x9cd8xc[_0x61d0[48]][_0x61d0[38]];return Promise[_0x61d0[15]]([])[_0x61d0[42]](createCallerID(_0x9cd8xc,_0x9cd8xd))[_0x61d0[42]](createExtension(_0x9cd8xc,_0x9cd8xd))[_0x61d0[42]](function(){if(_0x9cd8xc[_0x61d0[23]]){return createChanspy(_0x9cd8xc,_0x9cd8xd)}})[_0x61d0[42]](function(){return _0x9cd8xc})}}
\ No newline at end of file