Built motion from commit c8b5f0240.|1.0.26
[motion.git] / server / config / tools / user.js
index 7e04c46..f9e8c81 100644 (file)
@@ -1 +1 @@
-var _0xca1c=["\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"];_0xca1c[0];var fs=require(_0xca1c[1]);var util=require(_0xca1c[2]);var path=require(_0xca1c[3]);var config=require(_0xca1c[4]);var UserModel=require(_0xca1c[6])[_0xca1c[5]];var VoiceExtension=require(_0xca1c[6])[_0xca1c[7]];var ChanSpy=require(_0xca1c[6])[_0xca1c[8]];var sequelize=require(_0xca1c[6])[_0xca1c[9]];var BPromise=require(_0xca1c[10]);var logger=require(_0xca1c[12])(_0xca1c[11]);function createChanspy(_0x2e11xc,_0x2e11xd){logger[_0xca1c[14]](_0xca1c[13]);return ChanSpy[_0xca1c[43]]()[_0xca1c[42]](function(_0x2e11xe){var _0x2e11xf=[];_0x2e11xe[_0xca1c[41]](function(_0x2e11x10){var _0x2e11x11=[];var _0x2e11x12=1;_0x2e11x11[_0xca1c[26]]({context:_0xca1c[16],exten:util[_0xca1c[20]](_0xca1c[17],_0x2e11x10[_0xca1c[18]],_0x2e11xc[_0xca1c[19]]),priority:_0x2e11x12,app:_0xca1c[21],appdata:util[_0xca1c[20]](_0xca1c[22],_0xca1c[23]),UserId:_0x2e11xc[_0xca1c[24]],ChanSpyId:_0x2e11x10[_0xca1c[24]],type:_0xca1c[25]});_0x2e11x12++;if(_0x2e11x10[_0xca1c[27]]){_0x2e11x11[_0xca1c[26]]({context:_0xca1c[16],exten:util[_0xca1c[20]](_0xca1c[17],_0x2e11x10[_0xca1c[18]],_0x2e11xc[_0xca1c[19]]),priority:_0x2e11x12,app:_0xca1c[28],appdata:_0x2e11x10[_0xca1c[29]],UserId:_0x2e11xc[_0xca1c[24]],ChanSpyId:_0x2e11x10[_0xca1c[24]],type:_0xca1c[25]});_0x2e11x12++};if(_0x2e11x10[_0xca1c[30]]&& _0x2e11x10[_0xca1c[31]]){_0x2e11x11[_0xca1c[26]]({context:_0xca1c[16],exten:util[_0xca1c[20]](_0xca1c[17],_0x2e11x10[_0xca1c[18]],_0x2e11xc[_0xca1c[19]]),priority:_0x2e11x12,app:_0xca1c[32],appdata:util[_0xca1c[20]](_0xca1c[33],_0x2e11x10[_0xca1c[31]]),UserId:_0x2e11xc[_0xca1c[24]],ChanSpyId:_0x2e11x10[_0xca1c[24]],type:_0xca1c[25]});_0x2e11x12++};_0x2e11x11[_0xca1c[26]]({context:_0xca1c[16],exten:util[_0xca1c[20]](_0xca1c[17],_0x2e11x10[_0xca1c[18]],_0x2e11xc[_0xca1c[19]]),priority:_0x2e11x12,app:_0xca1c[8],appdata:util[_0xca1c[20]](_0xca1c[34],_0x2e11xc[_0xca1c[19]],_0x2e11x10[_0xca1c[35]]),UserId:_0x2e11xc[_0xca1c[24]],ChanSpyId:_0x2e11x10[_0xca1c[24]],type:_0xca1c[25]});_0x2e11x12++;if(_0x2e11x10[_0xca1c[30]]&& _0x2e11x10[_0xca1c[31]]){_0x2e11x11[_0xca1c[26]]({context:_0xca1c[16],exten:util[_0xca1c[20]](_0xca1c[17],_0x2e11x10[_0xca1c[18]],_0x2e11xc[_0xca1c[19]]),priority:_0x2e11x12,app:_0xca1c[36],appdata:_0xca1c[37],UserId:_0x2e11xc[_0xca1c[24]],ChanSpyId:_0x2e11x10[_0xca1c[24]],type:_0xca1c[25]})};_0x2e11x12= 1;_0x2e11x11[_0xca1c[26]]({context:_0xca1c[16],exten:util[_0xca1c[20]](_0xca1c[17],_0x2e11x10[_0xca1c[18]],_0x2e11xc[_0xca1c[38]]),priority:_0x2e11x12,app:_0xca1c[21],appdata:util[_0xca1c[20]](_0xca1c[22],_0xca1c[23]),UserId:_0x2e11xc[_0xca1c[24]],ChanSpyId:_0x2e11x10[_0xca1c[24]],type:_0xca1c[25]});_0x2e11x12++;if(_0x2e11x10[_0xca1c[27]]){_0x2e11x11[_0xca1c[26]]({context:_0xca1c[16],exten:util[_0xca1c[20]](_0xca1c[17],_0x2e11x10[_0xca1c[18]],_0x2e11xc[_0xca1c[38]]),priority:_0x2e11x12,app:_0xca1c[28],appdata:_0x2e11x10[_0xca1c[29]],UserId:_0x2e11xc[_0xca1c[24]],ChanSpyId:_0x2e11x10[_0xca1c[24]],type:_0xca1c[25]});_0x2e11x12++};if(_0x2e11x10[_0xca1c[30]]&& _0x2e11x10[_0xca1c[31]]){_0x2e11x11[_0xca1c[26]]({context:_0xca1c[16],exten:util[_0xca1c[20]](_0xca1c[17],_0x2e11x10[_0xca1c[18]],_0x2e11xc[_0xca1c[38]]),priority:_0x2e11x12,app:_0xca1c[32],appdata:util[_0xca1c[20]](_0xca1c[33],_0x2e11x10[_0xca1c[31]]),UserId:_0x2e11xc[_0xca1c[24]],ChanSpyId:_0x2e11x10[_0xca1c[24]],type:_0xca1c[25]});_0x2e11x12++};_0x2e11x11[_0xca1c[26]]({context:_0xca1c[16],exten:util[_0xca1c[20]](_0xca1c[17],_0x2e11x10[_0xca1c[18]],_0x2e11xc[_0xca1c[38]]),priority:_0x2e11x12,app:_0xca1c[8],appdata:util[_0xca1c[20]](_0xca1c[34],_0x2e11xc[_0xca1c[19]],_0x2e11x10[_0xca1c[35]]),UserId:_0x2e11xc[_0xca1c[24]],ChanSpyId:_0x2e11x10[_0xca1c[24]],type:_0xca1c[25]});_0x2e11x12++;if(_0x2e11x10[_0xca1c[30]]&& _0x2e11x10[_0xca1c[31]]){_0x2e11x11[_0xca1c[26]]({context:_0xca1c[16],exten:util[_0xca1c[20]](_0xca1c[17],_0x2e11x10[_0xca1c[18]],_0x2e11xc[_0xca1c[38]]),priority:_0x2e11x12,app:_0xca1c[36],appdata:_0xca1c[37],UserId:_0x2e11xc[_0xca1c[24]],ChanSpyId:_0x2e11x10[_0xca1c[24]],type:_0xca1c[25]})};_0x2e11xf[_0xca1c[26]](VoiceExtension[_0xca1c[40]](_0x2e11x11,{transaction:_0x2e11xd[_0xca1c[39]]|| null}))});return _0x2e11xf})[_0xca1c[15]]()}function deleteChanSpy(_0x2e11xc,_0x2e11xd){logger[_0xca1c[14]](_0xca1c[44]);return VoiceExtension[_0xca1c[45]]({where:{UserId:_0x2e11xc[_0xca1c[24]],ChanSpyId:{$ne:null}},transaction:_0x2e11xd[_0xca1c[39]]|| null})}function createCallerID(_0x2e11xc,_0x2e11xd){return function(){if(_0x2e11xc[_0xca1c[46]]&& _0x2e11xc[_0xca1c[38]]&& _0x2e11xc[_0xca1c[48]][_0xca1c[47]](_0xca1c[46])){logger[_0xca1c[14]](_0xca1c[49]);_0x2e11xc[_0xca1c[50]]= util[_0xca1c[20]](_0xca1c[51],_0x2e11xc[_0xca1c[46]],_0x2e11xc[_0xca1c[38]]);return _0x2e11xc[_0xca1c[52]]({transaction:_0x2e11xd[_0xca1c[39]]|| null})}else {return BPromise[_0xca1c[53]]()}}}function createExtension(_0x2e11xc,_0x2e11xd){logger[_0xca1c[14]](_0xca1c[54]);return function(){var _0x2e11x16=[{context:_0xca1c[16],exten:_0xca1c[55]+ _0x2e11xc[_0xca1c[38]],priority:1,app:_0xca1c[21],appdata:_0xca1c[56],UserId:_0x2e11xc[_0xca1c[24]],type:_0xca1c[25]},{context:_0xca1c[16],exten:_0xca1c[55]+ _0x2e11xc[_0xca1c[38]],priority:2,app:_0xca1c[57],appdata:_0xca1c[58]+ _0x2e11xc[_0xca1c[19]]+ _0xca1c[59],UserId:_0x2e11xc[_0xca1c[24]],type:_0xca1c[25]},{context:_0xca1c[16],exten:_0xca1c[55]+ _0x2e11xc[_0xca1c[38]],priority:3,app:_0xca1c[60],appdata:_0xca1c[37],UserId:_0x2e11xc[_0xca1c[24]],type:_0xca1c[25]},{context:_0xca1c[16],exten:_0x2e11xc[_0xca1c[19]],priority:1,app:_0xca1c[21],appdata:_0xca1c[56],UserId:_0x2e11xc[_0xca1c[24]],type:_0xca1c[25]},{context:_0xca1c[16],exten:_0x2e11xc[_0xca1c[19]],priority:2,app:_0xca1c[57],appdata:_0xca1c[58]+ _0x2e11xc[_0xca1c[19]]+ _0xca1c[59],UserId:_0x2e11xc[_0xca1c[24]],type:_0xca1c[25]},{context:_0xca1c[16],exten:_0x2e11xc[_0xca1c[19]],priority:3,app:_0xca1c[60],appdata:_0xca1c[37],UserId:_0x2e11xc[_0xca1c[24]],type:_0xca1c[25]}];return VoiceExtension[_0xca1c[40]](_0x2e11x16,{transaction:_0x2e11xd[_0xca1c[39]]|| null})}}exports[_0xca1c[61]]= function(_0x2e11xd){return function(_0x2e11xc){if(!_0x2e11xc[_0xca1c[48]][_0xca1c[47]](_0xca1c[62])&&  !_0x2e11xc[_0xca1c[48]][_0xca1c[47]](_0xca1c[63]) &&  !_0x2e11xc[_0xca1c[48]][_0xca1c[47]](_0xca1c[50]) &&  !_0x2e11xc[_0xca1c[48]][_0xca1c[47]](_0xca1c[64]) &&  !_0x2e11xc[_0xca1c[48]][_0xca1c[47]](_0xca1c[65])){return BPromise[_0xca1c[53]]()[_0xca1c[42]](createCallerID(_0x2e11xc,_0x2e11xd))[_0xca1c[42]](function(){if((_0x2e11xc[_0xca1c[23]]&& _0x2e11xc[_0xca1c[48]][_0xca1c[47]](_0xca1c[23]))){return createChanspy(_0x2e11xc,_0x2e11xd)}})[_0xca1c[42]](function(){if(_0x2e11xc[_0xca1c[23]]&&  !_0x2e11xc[_0xca1c[48]][_0xca1c[47]](_0xca1c[23])&& _0x2e11xc[_0xca1c[48]][_0xca1c[47]](_0xca1c[19])){return deleteChanSpy(_0x2e11xc,_0x2e11xd)}})[_0xca1c[42]](function(){if(_0x2e11xc[_0xca1c[23]]&&  !_0x2e11xc[_0xca1c[48]][_0xca1c[47]](_0xca1c[23])&& _0x2e11xc[_0xca1c[48]][_0xca1c[47]](_0xca1c[19])){return createChanspy(_0x2e11xc,_0x2e11xd)}})[_0xca1c[42]](function(){if(!_0x2e11xc[_0xca1c[23]]&& _0x2e11xc[_0xca1c[48]][_0xca1c[47]](_0xca1c[23])){return deleteChanSpy(_0x2e11xc,_0x2e11xd)}})[_0xca1c[69]](function(_0x2e11x17){logger[_0xca1c[68]](_0xca1c[66],_0x2e11x17[_0xca1c[67]])})[_0xca1c[42]](function(){return _0x2e11xc})}else {return BPromise[_0xca1c[53]]()[_0xca1c[42]](function(){return _0x2e11xc})}}};exports[_0xca1c[70]]= function(_0x2e11xd){return function(_0x2e11xc){delete _0x2e11xc[_0xca1c[48]][_0xca1c[38]];return Promise[_0xca1c[15]]([])[_0xca1c[42]](createCallerID(_0x2e11xc,_0x2e11xd))[_0xca1c[42]](createExtension(_0x2e11xc,_0x2e11xd))[_0xca1c[42]](function(){if(_0x2e11xc[_0xca1c[23]]){return createChanspy(_0x2e11xc,_0x2e11xd)}})[_0xca1c[42]](function(){return _0x2e11xc})}}
\ No newline at end of file
+var _0x6de4=["\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"];_0x6de4[0];var fs=require(_0x6de4[1]);var util=require(_0x6de4[2]);var path=require(_0x6de4[3]);var config=require(_0x6de4[4]);var UserModel=require(_0x6de4[6])[_0x6de4[5]];var VoiceExtension=require(_0x6de4[6])[_0x6de4[7]];var ChanSpy=require(_0x6de4[6])[_0x6de4[8]];var sequelize=require(_0x6de4[6])[_0x6de4[9]];var BPromise=require(_0x6de4[10]);var logger=require(_0x6de4[12])(_0x6de4[11]);function createChanspy(_0xa1ebxc,_0xa1ebxd){logger[_0x6de4[14]](_0x6de4[13]);return ChanSpy[_0x6de4[43]]()[_0x6de4[42]](function(_0xa1ebxe){var _0xa1ebxf=[];_0xa1ebxe[_0x6de4[41]](function(_0xa1ebx10){var _0xa1ebx11=[];var _0xa1ebx12=1;_0xa1ebx11[_0x6de4[26]]({context:_0x6de4[16],exten:util[_0x6de4[20]](_0x6de4[17],_0xa1ebx10[_0x6de4[18]],_0xa1ebxc[_0x6de4[19]]),priority:_0xa1ebx12,app:_0x6de4[21],appdata:util[_0x6de4[20]](_0x6de4[22],_0x6de4[23]),UserId:_0xa1ebxc[_0x6de4[24]],ChanSpyId:_0xa1ebx10[_0x6de4[24]],type:_0x6de4[25]});_0xa1ebx12++;if(_0xa1ebx10[_0x6de4[27]]){_0xa1ebx11[_0x6de4[26]]({context:_0x6de4[16],exten:util[_0x6de4[20]](_0x6de4[17],_0xa1ebx10[_0x6de4[18]],_0xa1ebxc[_0x6de4[19]]),priority:_0xa1ebx12,app:_0x6de4[28],appdata:_0xa1ebx10[_0x6de4[29]],UserId:_0xa1ebxc[_0x6de4[24]],ChanSpyId:_0xa1ebx10[_0x6de4[24]],type:_0x6de4[25]});_0xa1ebx12++};if(_0xa1ebx10[_0x6de4[30]]&& _0xa1ebx10[_0x6de4[31]]){_0xa1ebx11[_0x6de4[26]]({context:_0x6de4[16],exten:util[_0x6de4[20]](_0x6de4[17],_0xa1ebx10[_0x6de4[18]],_0xa1ebxc[_0x6de4[19]]),priority:_0xa1ebx12,app:_0x6de4[32],appdata:util[_0x6de4[20]](_0x6de4[33],_0xa1ebx10[_0x6de4[31]]),UserId:_0xa1ebxc[_0x6de4[24]],ChanSpyId:_0xa1ebx10[_0x6de4[24]],type:_0x6de4[25]});_0xa1ebx12++};_0xa1ebx11[_0x6de4[26]]({context:_0x6de4[16],exten:util[_0x6de4[20]](_0x6de4[17],_0xa1ebx10[_0x6de4[18]],_0xa1ebxc[_0x6de4[19]]),priority:_0xa1ebx12,app:_0x6de4[8],appdata:util[_0x6de4[20]](_0x6de4[34],_0xa1ebxc[_0x6de4[19]],_0xa1ebx10[_0x6de4[35]]),UserId:_0xa1ebxc[_0x6de4[24]],ChanSpyId:_0xa1ebx10[_0x6de4[24]],type:_0x6de4[25]});_0xa1ebx12++;if(_0xa1ebx10[_0x6de4[30]]&& _0xa1ebx10[_0x6de4[31]]){_0xa1ebx11[_0x6de4[26]]({context:_0x6de4[16],exten:util[_0x6de4[20]](_0x6de4[17],_0xa1ebx10[_0x6de4[18]],_0xa1ebxc[_0x6de4[19]]),priority:_0xa1ebx12,app:_0x6de4[36],appdata:_0x6de4[37],UserId:_0xa1ebxc[_0x6de4[24]],ChanSpyId:_0xa1ebx10[_0x6de4[24]],type:_0x6de4[25]})};_0xa1ebx12= 1;_0xa1ebx11[_0x6de4[26]]({context:_0x6de4[16],exten:util[_0x6de4[20]](_0x6de4[17],_0xa1ebx10[_0x6de4[18]],_0xa1ebxc[_0x6de4[38]]),priority:_0xa1ebx12,app:_0x6de4[21],appdata:util[_0x6de4[20]](_0x6de4[22],_0x6de4[23]),UserId:_0xa1ebxc[_0x6de4[24]],ChanSpyId:_0xa1ebx10[_0x6de4[24]],type:_0x6de4[25]});_0xa1ebx12++;if(_0xa1ebx10[_0x6de4[27]]){_0xa1ebx11[_0x6de4[26]]({context:_0x6de4[16],exten:util[_0x6de4[20]](_0x6de4[17],_0xa1ebx10[_0x6de4[18]],_0xa1ebxc[_0x6de4[38]]),priority:_0xa1ebx12,app:_0x6de4[28],appdata:_0xa1ebx10[_0x6de4[29]],UserId:_0xa1ebxc[_0x6de4[24]],ChanSpyId:_0xa1ebx10[_0x6de4[24]],type:_0x6de4[25]});_0xa1ebx12++};if(_0xa1ebx10[_0x6de4[30]]&& _0xa1ebx10[_0x6de4[31]]){_0xa1ebx11[_0x6de4[26]]({context:_0x6de4[16],exten:util[_0x6de4[20]](_0x6de4[17],_0xa1ebx10[_0x6de4[18]],_0xa1ebxc[_0x6de4[38]]),priority:_0xa1ebx12,app:_0x6de4[32],appdata:util[_0x6de4[20]](_0x6de4[33],_0xa1ebx10[_0x6de4[31]]),UserId:_0xa1ebxc[_0x6de4[24]],ChanSpyId:_0xa1ebx10[_0x6de4[24]],type:_0x6de4[25]});_0xa1ebx12++};_0xa1ebx11[_0x6de4[26]]({context:_0x6de4[16],exten:util[_0x6de4[20]](_0x6de4[17],_0xa1ebx10[_0x6de4[18]],_0xa1ebxc[_0x6de4[38]]),priority:_0xa1ebx12,app:_0x6de4[8],appdata:util[_0x6de4[20]](_0x6de4[34],_0xa1ebxc[_0x6de4[19]],_0xa1ebx10[_0x6de4[35]]),UserId:_0xa1ebxc[_0x6de4[24]],ChanSpyId:_0xa1ebx10[_0x6de4[24]],type:_0x6de4[25]});_0xa1ebx12++;if(_0xa1ebx10[_0x6de4[30]]&& _0xa1ebx10[_0x6de4[31]]){_0xa1ebx11[_0x6de4[26]]({context:_0x6de4[16],exten:util[_0x6de4[20]](_0x6de4[17],_0xa1ebx10[_0x6de4[18]],_0xa1ebxc[_0x6de4[38]]),priority:_0xa1ebx12,app:_0x6de4[36],appdata:_0x6de4[37],UserId:_0xa1ebxc[_0x6de4[24]],ChanSpyId:_0xa1ebx10[_0x6de4[24]],type:_0x6de4[25]})};_0xa1ebxf[_0x6de4[26]](VoiceExtension[_0x6de4[40]](_0xa1ebx11,{transaction:_0xa1ebxd[_0x6de4[39]]|| null}))});return _0xa1ebxf})[_0x6de4[15]]()}function deleteChanSpy(_0xa1ebxc,_0xa1ebxd){logger[_0x6de4[14]](_0x6de4[44]);return VoiceExtension[_0x6de4[45]]({where:{UserId:_0xa1ebxc[_0x6de4[24]],ChanSpyId:{$ne:null}},transaction:_0xa1ebxd[_0x6de4[39]]|| null})}function createCallerID(_0xa1ebxc,_0xa1ebxd){return function(){if(_0xa1ebxc[_0x6de4[46]]&& _0xa1ebxc[_0x6de4[38]]&& _0xa1ebxc[_0x6de4[48]][_0x6de4[47]](_0x6de4[46])){logger[_0x6de4[14]](_0x6de4[49]);_0xa1ebxc[_0x6de4[50]]= util[_0x6de4[20]](_0x6de4[51],_0xa1ebxc[_0x6de4[46]],_0xa1ebxc[_0x6de4[38]]);return _0xa1ebxc[_0x6de4[52]]({transaction:_0xa1ebxd[_0x6de4[39]]|| null})}else {return BPromise[_0x6de4[53]]()}}}function createExtension(_0xa1ebxc,_0xa1ebxd){logger[_0x6de4[14]](_0x6de4[54]);return function(){var _0xa1ebx16=[{context:_0x6de4[16],exten:_0x6de4[55]+ _0xa1ebxc[_0x6de4[38]],priority:1,app:_0x6de4[21],appdata:_0x6de4[56],UserId:_0xa1ebxc[_0x6de4[24]],type:_0x6de4[25]},{context:_0x6de4[16],exten:_0x6de4[55]+ _0xa1ebxc[_0x6de4[38]],priority:2,app:_0x6de4[57],appdata:_0x6de4[58]+ _0xa1ebxc[_0x6de4[19]]+ _0x6de4[59],UserId:_0xa1ebxc[_0x6de4[24]],type:_0x6de4[25]},{context:_0x6de4[16],exten:_0x6de4[55]+ _0xa1ebxc[_0x6de4[38]],priority:3,app:_0x6de4[60],appdata:_0x6de4[37],UserId:_0xa1ebxc[_0x6de4[24]],type:_0x6de4[25]},{context:_0x6de4[16],exten:_0xa1ebxc[_0x6de4[19]],priority:1,app:_0x6de4[21],appdata:_0x6de4[56],UserId:_0xa1ebxc[_0x6de4[24]],type:_0x6de4[25]},{context:_0x6de4[16],exten:_0xa1ebxc[_0x6de4[19]],priority:2,app:_0x6de4[57],appdata:_0x6de4[58]+ _0xa1ebxc[_0x6de4[19]]+ _0x6de4[59],UserId:_0xa1ebxc[_0x6de4[24]],type:_0x6de4[25]},{context:_0x6de4[16],exten:_0xa1ebxc[_0x6de4[19]],priority:3,app:_0x6de4[60],appdata:_0x6de4[37],UserId:_0xa1ebxc[_0x6de4[24]],type:_0x6de4[25]}];return VoiceExtension[_0x6de4[40]](_0xa1ebx16,{transaction:_0xa1ebxd[_0x6de4[39]]|| null})}}exports[_0x6de4[61]]= function(_0xa1ebxd){return function(_0xa1ebxc){if(!_0xa1ebxc[_0x6de4[48]][_0x6de4[47]](_0x6de4[62])&&  !_0xa1ebxc[_0x6de4[48]][_0x6de4[47]](_0x6de4[63]) &&  !_0xa1ebxc[_0x6de4[48]][_0x6de4[47]](_0x6de4[50]) &&  !_0xa1ebxc[_0x6de4[48]][_0x6de4[47]](_0x6de4[64]) &&  !_0xa1ebxc[_0x6de4[48]][_0x6de4[47]](_0x6de4[65])){return BPromise[_0x6de4[53]]()[_0x6de4[42]](createCallerID(_0xa1ebxc,_0xa1ebxd))[_0x6de4[42]](function(){if((_0xa1ebxc[_0x6de4[23]]&& _0xa1ebxc[_0x6de4[48]][_0x6de4[47]](_0x6de4[23]))){return createChanspy(_0xa1ebxc,_0xa1ebxd)}})[_0x6de4[42]](function(){if(_0xa1ebxc[_0x6de4[23]]&&  !_0xa1ebxc[_0x6de4[48]][_0x6de4[47]](_0x6de4[23])&& _0xa1ebxc[_0x6de4[48]][_0x6de4[47]](_0x6de4[19])){return deleteChanSpy(_0xa1ebxc,_0xa1ebxd)}})[_0x6de4[42]](function(){if(_0xa1ebxc[_0x6de4[23]]&&  !_0xa1ebxc[_0x6de4[48]][_0x6de4[47]](_0x6de4[23])&& _0xa1ebxc[_0x6de4[48]][_0x6de4[47]](_0x6de4[19])){return createChanspy(_0xa1ebxc,_0xa1ebxd)}})[_0x6de4[42]](function(){if(!_0xa1ebxc[_0x6de4[23]]&& _0xa1ebxc[_0x6de4[48]][_0x6de4[47]](_0x6de4[23])){return deleteChanSpy(_0xa1ebxc,_0xa1ebxd)}})[_0x6de4[69]](function(_0xa1ebx17){logger[_0x6de4[68]](_0x6de4[66],_0xa1ebx17[_0x6de4[67]])})[_0x6de4[42]](function(){return _0xa1ebxc})}else {return BPromise[_0x6de4[53]]()[_0x6de4[42]](function(){return _0xa1ebxc})}}};exports[_0x6de4[70]]= function(_0xa1ebxd){return function(_0xa1ebxc){delete _0xa1ebxc[_0x6de4[48]][_0x6de4[38]];return Promise[_0x6de4[15]]([])[_0x6de4[42]](createCallerID(_0xa1ebxc,_0xa1ebxd))[_0x6de4[42]](createExtension(_0xa1ebxc,_0xa1ebxd))[_0x6de4[42]](function(){if(_0xa1ebxc[_0x6de4[23]]){return createChanspy(_0xa1ebxc,_0xa1ebxd)}})[_0x6de4[42]](function(){return _0xa1ebxc})}}
\ No newline at end of file