Built motion from commit 0dbf6b8.|0.0.131
[motion.git] / server / utils / voice_extension.js
index f01fffd..2a6849f 100644 (file)
@@ -1 +1 @@
-var _0x59a8=["\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x73","\x72\x6F\x75\x74\x65\x55\x70\x64\x61\x74\x65","\x69\x64","\x62\x6F\x64\x79","\x74\x68\x65\x6E","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x70\x61\x72\x61\x6D\x73","\x64\x65\x73\x74\x72\x6F\x79","\x75\x70\x64\x61\x74\x65","\x61\x6C\x6C","\x65\x78\x74\x65\x6E","\x74\x79\x70\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x70\x75\x73\x68","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x43\x44\x52\x28\x74\x61\x67\x29\x3D\x25\x73","\x74\x61\x67","\x2D\x2D","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x66\x69\x6C\x74\x65\x72","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x6D\x61\x70","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x66\x69\x6E\x64","\x6E\x61\x6D\x65","\x4E\x6F\x4F\x50","\x61\x70\x70","\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x53\x74\x61\x72\x74","\x47\x6F\x74\x6F\x49\x66\x54\x69\x6D\x65","\x25\x73\x3F\x25\x73\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x25\x73\x3A\x25\x73\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x25\x73","\x66\x6F\x72\x45\x61\x63\x68","\x44\x69\x61\x6C","\x61\x70\x70\x64\x61\x74\x61","\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x61\x6C\x6C\x29\x3D\x25\x73","\x53\x6B\x69\x70\x70\x65\x64\x20\x43\x61\x6C\x6C\x65\x72\x49\x44\x20\x53\x65\x74","\x72\x65\x63\x6F\x72\x64","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D\x2E\x77\x61\x76\x2C\x61\x62","\x53\x6B\x69\x70\x70\x65\x64\x20\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x51\x75\x65\x75\x65","\x63\x75\x73\x74\x6F\x6D","\x50\x72\x6F\x67\x72\x65\x73\x73","","\x53\x6B\x69\x70\x70\x65\x64\x20\x50\x72\x6F\x67\x72\x65\x73\x73","\x61\x70\x70\x54\x79\x70\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x69\x61\x6C","\x53\x49\x50\x2F\x25\x73\x2F\x25\x73\x24\x7B\x45\x58\x54\x45\x4E\x3A\x25\x73\x7D\x2C\x25\x73\x2C\x25\x73\x2C\x25\x73","\x63\x75\x74\x64\x69\x67\x69\x74\x73","\x65\x78\x74\x65\x72\x6E\x61\x6C\x44\x69\x61\x6C","\x53\x49\x50\x2F\x25\x73\x2F\x25\x73\x2C\x25\x73\x2C\x25\x73\x2C\x25\x73","\x69\x6E\x74\x65\x72\x6E\x61\x6C\x44\x69\x61\x6C","\x53\x49\x50\x2F\x25\x73\x2C\x25\x73\x2C\x25\x73\x2C\x25\x73","\x2C","\x6A\x6F\x69\x6E","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x53\x6B\x69\x70\x70\x65\x64\x20\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x45\x6E\x64","\x20\x63\x61\x6C\x6C\x20\x65\x6E\x64","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x48\x61\x6E\x67\x75\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73"];var _=require(_0x59a8[0]);var util=require(_0x59a8[1]);var Interval=require(_0x59a8[3])[_0x59a8[2]];var sequelize=require(_0x59a8[3])[_0x59a8[4]];var VoiceExtension=require(_0x59a8[3])[_0x59a8[5]];exports[_0x59a8[6]]=createApplications;exports[_0x59a8[7]]=function(_0xf0bfx6,_0xf0bfx7){var sequelize=require(_0x59a8[3])[_0x59a8[4]];var VoiceExtension=require(_0x59a8[3])[_0x59a8[5]];if(_0xf0bfx6[_0x59a8[9]][_0x59a8[8]]){delete _0xf0bfx6[_0x59a8[9]][_0x59a8[8]]};return VoiceExtension[_0x59a8[16]](_0xf0bfx6[_0x59a8[9]],{where:{id:_0xf0bfx6[_0x59a8[14]][_0x59a8[8]]},transaction:_0xf0bfx7})[_0x59a8[10]](function(_0xf0bfx8){if(_0xf0bfx6[_0x59a8[9]][_0x59a8[11]]){_0xf0bfx6[_0x59a8[9]][_0x59a8[8]]=_0xf0bfx6[_0x59a8[14]][_0x59a8[8]];return VoiceExtension[_0x59a8[15]]({where:{VoiceExtensionId:_0xf0bfx6[_0x59a8[14]][_0x59a8[8]]},transaction:_0xf0bfx7})}})[_0x59a8[10]](function(){if(_0xf0bfx6[_0x59a8[9]][_0x59a8[11]]&&Array[_0x59a8[12]](_0xf0bfx6[_0x59a8[9]].Applications)&&_0xf0bfx6[_0x59a8[9]][_0x59a8[11]][_0x59a8[13]]){return _0xf0bfx6[_0x59a8[9]]}})[_0x59a8[10]](createApplications(_0xf0bfx6[_0x59a8[9]].Applications,_0xf0bfx7))};function createApplications(_0xf0bfxa,_0xf0bfx7){var Interval=require(_0x59a8[3])[_0x59a8[2]];var VoiceExtension=require(_0x59a8[3])[_0x59a8[5]];return function(_0xf0bfx8){if(_0xf0bfx8){return Interval[_0x59a8[73]]()[_0x59a8[10]](function(_0xf0bfxb){var _0xf0bfxc=2;var _0xf0bfxd={exten:_0xf0bfx8[_0x59a8[18]],type:_0xf0bfx8[_0x59a8[19]],context:_0xf0bfx8[_0x59a8[20]],VoiceExtensionId:_0xf0bfx8[_0x59a8[8]]};var _0xf0bfxe=[];var _0xf0bfxf=6;var _0xf0bfx10=[],_0xf0bfx11=[];_0xf0bfx10[_0x59a8[25]](_[_0x59a8[24]]({app:_0x59a8[21],appdata:util[_0x59a8[23]](_0x59a8[22],_0xf0bfx8[_0x59a8[19]]),priority:_0xf0bfxc},_0xf0bfxd));_0xf0bfxc++;if(_0xf0bfx8[_0x59a8[19]]===_0x59a8[26]){_0xf0bfx10[_0x59a8[25]](_[_0x59a8[24]]({app:_0x59a8[21],appdata:util[_0x59a8[23]](_0x59a8[27],_0xf0bfx8[_0x59a8[28]]||_0x59a8[29]),priority:_0xf0bfxc},_0xf0bfxd));_0xf0bfxc++};_0xf0bfxe[_0x59a8[25]](VoiceExtension[_0x59a8[30]](_0xf0bfx10,{transaction:_0xf0bfx7}));_0xf0bfxa[_0x59a8[43]](function(_0xf0bfx12){var _0xf0bfx13=[];var _0xf0bfx14=[];if(_0xf0bfx12[_0x59a8[31]]){var _0xf0bfx15=_[_0x59a8[32]](_0xf0bfxb,{IntervalId:_0xf0bfx12[_0x59a8[31]]});_0xf0bfx13=_0xf0bfx15[_0x59a8[13]]?_[_0x59a8[34]](_0xf0bfx15,_0x59a8[33]):[_0x59a8[35]];var _0xf0bfx16=_[_0x59a8[36]](_0xf0bfxb,{id:_0xf0bfx12[_0x59a8[31]]});_0xf0bfx12[_0x59a8[33]]=_0xf0bfx16?_0xf0bfx16[_0x59a8[37]]:_0x59a8[35]}else {_0xf0bfx13=[_0xf0bfx12[_0x59a8[33]]]};_0xf0bfx14[_0x59a8[25]](_[_0x59a8[24]]({app:_0x59a8[38],appdata:_0xf0bfx12[_0x59a8[39]]+_0x59a8[40],priority:_0xf0bfxc},_0xf0bfxd));_0xf0bfxc++;var _0xf0bfx17=_0xf0bfx13[_0x59a8[13]];_0xf0bfx13[_0x59a8[43]](function(_0xf0bfx18,_0xf0bfx19){_0xf0bfx14[_0x59a8[25]](_[_0x59a8[24]]({app:_0x59a8[41],appdata:util[_0x59a8[23]](_0x59a8[42],_0xf0bfx18,_0xf0bfx8[_0x59a8[20]],_0xf0bfxc+(_0xf0bfx17-_0xf0bfx19),_0xf0bfx8[_0x59a8[20]],((_0xf0bfx19+1)<_0xf0bfx17)?_0xf0bfxc+1:_0xf0bfxc+_0xf0bfxf),priority:_0xf0bfxc},_0xf0bfxd));_0xf0bfxc++});if(_0xf0bfx12[_0x59a8[39]]===_0x59a8[44]&&_0xf0bfx8[_0x59a8[19]]===_0x59a8[26]&&_0xf0bfx12[_0x59a8[45]][1]){_0xf0bfx14[_0x59a8[25]](_[_0x59a8[24]]({app:_0x59a8[21],appdata:util[_0x59a8[23]](_0x59a8[46],_0xf0bfx12[_0x59a8[45]][1]),priority:_0xf0bfxc},_0xf0bfxd))}else {_0xf0bfx14[_0x59a8[25]](_[_0x59a8[24]]({app:_0x59a8[38],appdata:_0x59a8[47],priority:_0xf0bfxc},_0xf0bfxd))};_0xf0bfxc++;if(_0xf0bfx12[_0x59a8[39]]===_0x59a8[44]&&_0xf0bfx8[_0x59a8[48]]&&_0xf0bfx8[_0x59a8[19]]===_0x59a8[26]){_0xf0bfx14[_0x59a8[25]](_[_0x59a8[24]]({app:_0x59a8[49],appdata:_0x59a8[50],priority:_0xf0bfxc},_0xf0bfxd))}else {_0xf0bfx14[_0x59a8[25]](_[_0x59a8[24]]({app:_0x59a8[38],appdata:_0x59a8[51],priority:_0xf0bfxc},_0xf0bfxd))};_0xf0bfxc++;if(_0xf0bfx12[_0x59a8[39]]===_0x59a8[52]&&_0xf0bfx12[_0x59a8[39]]!==_0x59a8[53]){_0xf0bfx14[_0x59a8[25]](_[_0x59a8[24]]({app:_0x59a8[54],appdata:_0x59a8[55],priority:_0xf0bfxc},_0xf0bfxd))}else {_0xf0bfx14[_0x59a8[25]](_[_0x59a8[24]]({app:_0x59a8[38],appdata:_0x59a8[56],priority:_0xf0bfxc},_0xf0bfxd))};_0xf0bfxc++;if(_0xf0bfx12[_0x59a8[39]]===_0x59a8[44]&&_0xf0bfx12[_0x59a8[57]]===_0x59a8[58]){_0xf0bfx14[_0x59a8[25]](_[_0x59a8[24]]({app:_0xf0bfx12[_0x59a8[39]],appdata:util[_0x59a8[23]](_0x59a8[59],_0xf0bfx12[_0x59a8[45]][0],_0xf0bfx12[_0x59a8[45]][2]||_0x59a8[55],_0xf0bfx8[_0x59a8[60]]||0,_0xf0bfx12[_0x59a8[45]][3]||_0x59a8[55],_0xf0bfx12[_0x59a8[45]][4]||_0x59a8[55],_0xf0bfx12[_0x59a8[45]][5]||_0x59a8[55]),priority:_0xf0bfxc,IntervalId:_0xf0bfx12[_0x59a8[31]]||null,interval:_0xf0bfx12[_0x59a8[33]]||_0x59a8[35],isApp:true,callerID:_0xf0bfx12[_0x59a8[45]][1]||null,appType:_0xf0bfx12[_0x59a8[57]]},_0xf0bfxd))}else {if(_0xf0bfx12[_0x59a8[39]]===_0x59a8[44]&&_0xf0bfx12[_0x59a8[57]]===_0x59a8[61]){_0xf0bfx14[_0x59a8[25]](_[_0x59a8[24]]({app:_0xf0bfx12[_0x59a8[39]],appdata:util[_0x59a8[23]](_0x59a8[62],_0xf0bfx12[_0x59a8[45]][0],_0xf0bfx12[_0x59a8[45]][1],_0xf0bfx12[_0x59a8[45]][2]||_0x59a8[55],_0xf0bfx12[_0x59a8[45]][3]||_0x59a8[55],_0xf0bfx12[_0x59a8[45]][4]||_0x59a8[55]),priority:_0xf0bfxc,IntervalId:_0xf0bfx12[_0x59a8[31]]||null,interval:_0xf0bfx12[_0x59a8[33]]||_0x59a8[35],isApp:true,appType:_0xf0bfx12[_0x59a8[57]]},_0xf0bfxd))}else {if(_0xf0bfx12[_0x59a8[39]]===_0x59a8[44]&&_0xf0bfx12[_0x59a8[57]]===_0x59a8[63]){_0xf0bfx14[_0x59a8[25]](_[_0x59a8[24]]({app:_0xf0bfx12[_0x59a8[39]],appdata:util[_0x59a8[23]](_0x59a8[64],_0xf0bfx12[_0x59a8[45]][0],_0xf0bfx12[_0x59a8[45]][1]||_0x59a8[55],_0xf0bfx12[_0x59a8[45]][2]||_0x59a8[55],_0xf0bfx12[_0x59a8[45]][3]||_0x59a8[55]),priority:_0xf0bfxc,IntervalId:_0xf0bfx12[_0x59a8[31]]||null,interval:_0xf0bfx12[_0x59a8[33]]||_0x59a8[35],isApp:true,appType:_0xf0bfx12[_0x59a8[57]]},_0xf0bfxd))}else {_0xf0bfx14[_0x59a8[25]](_[_0x59a8[24]]({app:_0xf0bfx12[_0x59a8[39]],appdata:_0xf0bfx12[_0x59a8[45]][_0x59a8[66]](_0x59a8[65]),priority:_0xf0bfxc,IntervalId:_0xf0bfx12[_0x59a8[31]],interval:_0xf0bfx12[_0x59a8[33]]||_0x59a8[35],isApp:true,appType:_0xf0bfx12[_0x59a8[57]]||null},_0xf0bfxd))}}};_0xf0bfxc++;if(_0xf0bfx12[_0x59a8[39]]===_0x59a8[44]&&_0xf0bfx8[_0x59a8[48]]&&_0xf0bfx8[_0x59a8[19]]===_0x59a8[26]){_0xf0bfx14[_0x59a8[25]](_[_0x59a8[24]]({app:_0x59a8[67],appdata:_0x59a8[55],priority:_0xf0bfxc},_0xf0bfxd))}else {_0xf0bfx14[_0x59a8[25]](_[_0x59a8[24]]({app:_0x59a8[38],appdata:_0x59a8[68],priority:_0xf0bfxc},_0xf0bfxd))};_0xf0bfxc++;_0xf0bfx14[_0x59a8[25]](_[_0x59a8[24]]({app:_0x59a8[38],appdata:_0xf0bfx12[_0x59a8[39]]+_0x59a8[69],priority:_0xf0bfxc},_0xf0bfxd));_0xf0bfxc++;_0xf0bfxe[_0x59a8[25]](VoiceExtension[_0x59a8[30]](_0xf0bfx14,{transaction:_0xf0bfx7}))});_0xf0bfx11[_0x59a8[25]](_[_0x59a8[24]]({app:_0x59a8[38],appdata:_0xf0bfx8[_0x59a8[19]]+_0x59a8[70],priority:_0xf0bfxc},_0xf0bfxd));_0xf0bfxc++;if(_0xf0bfx8[_0x59a8[19]]===_0x59a8[71]||_0xf0bfx8[_0x59a8[19]]===_0x59a8[26]){_0xf0bfx11[_0x59a8[25]](_[_0x59a8[24]]({app:_0x59a8[72],appdata:_0x59a8[55],priority:_0xf0bfxc},_0xf0bfxd));_0xf0bfxc++};_0xf0bfxe[_0x59a8[25]](VoiceExtension[_0x59a8[30]](_0xf0bfx11,{transaction:_0xf0bfx7}));return _0xf0bfxe})[_0x59a8[17]]()}}}function handleError(_0xf0bfx1b,_0xf0bfx1c){return _0xf0bfx1b[_0x59a8[75]](500)[_0x59a8[74]](_0xf0bfx1c)}
\ No newline at end of file
+var _0xc385=["\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x73","\x72\x6F\x75\x74\x65\x55\x70\x64\x61\x74\x65","\x69\x64","\x62\x6F\x64\x79","\x74\x68\x65\x6E","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x70\x61\x72\x61\x6D\x73","\x64\x65\x73\x74\x72\x6F\x79","\x75\x70\x64\x61\x74\x65","\x61\x6C\x6C","\x65\x78\x74\x65\x6E","\x74\x79\x70\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x70\x75\x73\x68","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x43\x44\x52\x28\x74\x61\x67\x29\x3D\x25\x73","\x74\x61\x67","\x2D\x2D","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x66\x69\x6C\x74\x65\x72","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x6D\x61\x70","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x66\x69\x6E\x64","\x6E\x61\x6D\x65","\x4E\x6F\x4F\x50","\x61\x70\x70","\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x53\x74\x61\x72\x74","\x47\x6F\x74\x6F\x49\x66\x54\x69\x6D\x65","\x25\x73\x3F\x25\x73\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x25\x73\x3A\x25\x73\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x25\x73","\x66\x6F\x72\x45\x61\x63\x68","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x64\x69\x61\x6C","\x61\x70\x70\x64\x61\x74\x61","\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x61\x6C\x6C\x29\x3D\x25\x73","\x53\x6B\x69\x70\x70\x65\x64\x20\x43\x61\x6C\x6C\x65\x72\x49\x44\x20\x53\x65\x74","\x72\x65\x63\x6F\x72\x64","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D\x2E","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x77\x61\x76","\x2C\x61\x62","\x53\x6B\x69\x70\x70\x65\x64\x20\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x71\x75\x65\x75\x65","\x63\x75\x73\x74\x6F\x6D","\x50\x72\x6F\x67\x72\x65\x73\x73","","\x53\x6B\x69\x70\x70\x65\x64\x20\x50\x72\x6F\x67\x72\x65\x73\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x72\x6F\x75\x74\x65\x69\x64\x3D\x25\x64","\x53\x6B\x69\x70\x70\x65\x64\x20\x4F\x75\x74\x6F\x75\x6E\x64\x20\x52\x6F\x75\x74\x65\x20\x49\x64\x20\x53\x65\x74","\x61\x70\x70\x54\x79\x70\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x69\x61\x6C","\x53\x49\x50\x2F\x25\x73\x2F\x25\x73\x24\x7B\x45\x58\x54\x45\x4E\x3A\x25\x73\x7D\x2C\x25\x73\x2C\x25\x73\x2C\x25\x73","\x63\x75\x74\x64\x69\x67\x69\x74\x73","\x65\x78\x74\x65\x72\x6E\x61\x6C\x44\x69\x61\x6C","\x53\x49\x50\x2F\x25\x73\x2F\x25\x73\x2C\x25\x73\x2C\x25\x73\x2C\x25\x73","\x69\x6E\x74\x65\x72\x6E\x61\x6C\x44\x69\x61\x6C","\x53\x49\x50\x2F\x25\x73\x2C\x25\x73\x2C\x25\x73\x2C\x25\x73","\x2C","\x6A\x6F\x69\x6E","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x53\x6B\x69\x70\x70\x65\x64\x20\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x45\x6E\x64","\x20\x63\x61\x6C\x6C\x20\x65\x6E\x64","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x48\x61\x6E\x67\x75\x70","\x66\x69\x6E\x64\x41\x6C\x6C"];var _=require(_0xc385[0]);var util=require(_0xc385[1]);var Interval=require(_0xc385[3])[_0xc385[2]];var sequelize=require(_0xc385[3])[_0xc385[4]];var VoiceExtension=require(_0xc385[3])[_0xc385[5]];exports[_0xc385[6]]= createApplications;exports[_0xc385[7]]= function(_0x3078x6,_0x3078x7){var sequelize=require(_0xc385[3])[_0xc385[4]];var VoiceExtension=require(_0xc385[3])[_0xc385[5]];if(_0x3078x6[_0xc385[9]][_0xc385[8]]){delete _0x3078x6[_0xc385[9]][_0xc385[8]]};return VoiceExtension[_0xc385[16]](_0x3078x6[_0xc385[9]],{where:{id:_0x3078x6[_0xc385[14]][_0xc385[8]]},transaction:_0x3078x7})[_0xc385[10]](function(_0x3078x8){if(_0x3078x6[_0xc385[9]][_0xc385[11]]){_0x3078x6[_0xc385[9]][_0xc385[8]]= _0x3078x6[_0xc385[14]][_0xc385[8]];return VoiceExtension[_0xc385[15]]({where:{VoiceExtensionId:_0x3078x6[_0xc385[14]][_0xc385[8]]},transaction:_0x3078x7})}})[_0xc385[10]](function(){if(_0x3078x6[_0xc385[9]][_0xc385[11]]&& Array[_0xc385[12]](_0x3078x6[_0xc385[9]].Applications)&& _0x3078x6[_0xc385[9]][_0xc385[11]][_0xc385[13]]){return _0x3078x6[_0xc385[9]]}})[_0xc385[10]](createApplications(_0x3078x6[_0xc385[9]].Applications,_0x3078x7))};function createApplications(_0x3078xa,_0x3078x7){var Interval=require(_0xc385[3])[_0xc385[2]];var VoiceExtension=require(_0xc385[3])[_0xc385[5]];return function(_0x3078x8){if(_0x3078x8){return Interval[_0xc385[79]]()[_0xc385[10]](function(_0x3078xb){var _0x3078xc=2;var _0x3078xd={exten:_0x3078x8[_0xc385[18]],type:_0x3078x8[_0xc385[19]],context:_0x3078x8[_0xc385[20]],VoiceExtensionId:_0x3078x8[_0xc385[8]]};var _0x3078xe=[];var _0x3078xf=7;var _0x3078x10=[],_0x3078x11=[];_0x3078x10[_0xc385[25]](_[_0xc385[24]]({app:_0xc385[21],appdata:util[_0xc385[23]](_0xc385[22],_0x3078x8[_0xc385[19]]),priority:_0x3078xc},_0x3078xd));_0x3078xc++;if(_0x3078x8[_0xc385[19]]=== _0xc385[26]){_0x3078x10[_0xc385[25]](_[_0xc385[24]]({app:_0xc385[21],appdata:util[_0xc385[23]](_0xc385[27],_0x3078x8[_0xc385[28]]|| _0xc385[29]),priority:_0x3078xc},_0x3078xd));_0x3078xc++};_0x3078xe[_0xc385[25]](VoiceExtension[_0xc385[30]](_0x3078x10,{transaction:_0x3078x7}));_0x3078xa[_0xc385[43]](function(_0x3078x12){var _0x3078x13=[];var _0x3078x14=[];if(_0x3078x12[_0xc385[31]]){var _0x3078x15=_[_0xc385[32]](_0x3078xb,{IntervalId:_0x3078x12[_0xc385[31]]});_0x3078x13= _0x3078x15[_0xc385[13]]?_[_0xc385[34]](_0x3078x15,_0xc385[33]):[_0xc385[35]];var _0x3078x16=_[_0xc385[36]](_0x3078xb,{id:_0x3078x12[_0xc385[31]]});_0x3078x12[_0xc385[33]]= _0x3078x16?_0x3078x16[_0xc385[37]]:_0xc385[35]}else {_0x3078x13= [_0x3078x12[_0xc385[33]]]};_0x3078x14[_0xc385[25]](_[_0xc385[24]]({app:_0xc385[38],appdata:_0x3078x12[_0xc385[39]]+ _0xc385[40],priority:_0x3078xc},_0x3078xd));_0x3078xc++;var _0x3078x17=_0x3078x13[_0xc385[13]];_0x3078x13[_0xc385[43]](function(_0x3078x18,_0x3078x19){_0x3078x14[_0xc385[25]](_[_0xc385[24]]({app:_0xc385[41],appdata:util[_0xc385[23]](_0xc385[42],_0x3078x18,_0x3078x8[_0xc385[20]],_0x3078xc+ (_0x3078x17- _0x3078x19),_0x3078x8[_0xc385[20]],((_0x3078x19+ 1)< _0x3078x17)?_0x3078xc+ 1:_0x3078xc+ _0x3078xf),priority:_0x3078xc},_0x3078xd));_0x3078xc++});if(_0x3078x12[_0xc385[39]][_0xc385[44]]()=== _0xc385[45]&& _0x3078x8[_0xc385[19]]=== _0xc385[26]&& _0x3078x12[_0xc385[46]][1]){_0x3078x14[_0xc385[25]](_[_0xc385[24]]({app:_0xc385[21],appdata:util[_0xc385[23]](_0xc385[47],_0x3078x12[_0xc385[46]][1]),priority:_0x3078xc},_0x3078xd))}else {_0x3078x14[_0xc385[25]](_[_0xc385[24]]({app:_0xc385[38],appdata:_0xc385[48],priority:_0x3078xc},_0x3078xd))};_0x3078xc++;if(_0x3078x12[_0xc385[39]][_0xc385[44]]()=== _0xc385[45]&& _0x3078x8[_0xc385[49]]&& _0x3078x8[_0xc385[19]]=== _0xc385[26]){_0x3078x14[_0xc385[25]](_[_0xc385[24]]({app:_0xc385[50],appdata:_0xc385[51]+ (_0x3078x8[_0xc385[52]]|| _0xc385[53])+ _0xc385[54],priority:_0x3078xc},_0x3078xd))}else {_0x3078x14[_0xc385[25]](_[_0xc385[24]]({app:_0xc385[38],appdata:_0xc385[55],priority:_0x3078xc},_0x3078xd))};_0x3078xc++;if(_0x3078x12[_0xc385[39]][_0xc385[44]]()=== _0xc385[56]&& _0x3078x12[_0xc385[39]]!== _0xc385[57]){_0x3078x14[_0xc385[25]](_[_0xc385[24]]({app:_0xc385[58],appdata:_0xc385[59],priority:_0x3078xc},_0x3078xd))}else {_0x3078x14[_0xc385[25]](_[_0xc385[24]]({app:_0xc385[38],appdata:_0xc385[60],priority:_0x3078xc},_0x3078xd))};_0x3078xc++;if(_0x3078x12[_0xc385[39]][_0xc385[44]]()=== _0xc385[45]&& _0x3078x8[_0xc385[19]]=== _0xc385[26]){_0x3078x14[_0xc385[25]](_[_0xc385[24]]({app:_0xc385[21],appdata:util[_0xc385[23]](_0xc385[61],_0x3078x8[_0xc385[8]]|| _0xc385[59]),priority:_0x3078xc},_0x3078xd))}else {_0x3078x14[_0xc385[25]](_[_0xc385[24]]({app:_0xc385[38],appdata:_0xc385[62],priority:_0x3078xc},_0x3078xd))};_0x3078xc++;if(_0x3078x12[_0xc385[39]][_0xc385[44]]()=== _0xc385[45]&& _0x3078x12[_0xc385[63]]=== _0xc385[64]){_0x3078x14[_0xc385[25]](_[_0xc385[24]]({app:_0x3078x12[_0xc385[39]],appdata:util[_0xc385[23]](_0xc385[65],_0x3078x12[_0xc385[46]][0],_0x3078x12[_0xc385[46]][2]|| _0xc385[59],_0x3078x8[_0xc385[66]]|| 0,_0x3078x12[_0xc385[46]][3]|| _0xc385[59],_0x3078x12[_0xc385[46]][4]|| _0xc385[59],_0x3078x12[_0xc385[46]][5]|| _0xc385[59]),priority:_0x3078xc,IntervalId:_0x3078x12[_0xc385[31]]|| null,interval:_0x3078x12[_0xc385[33]]|| _0xc385[35],isApp:true,callerID:_0x3078x12[_0xc385[46]][1]|| null,appType:_0x3078x12[_0xc385[63]]},_0x3078xd))}else {if(_0x3078x12[_0xc385[39]][_0xc385[44]]()=== _0xc385[45]&& _0x3078x12[_0xc385[63]]=== _0xc385[67]){_0x3078x14[_0xc385[25]](_[_0xc385[24]]({app:_0x3078x12[_0xc385[39]],appdata:util[_0xc385[23]](_0xc385[68],_0x3078x12[_0xc385[46]][0],_0x3078x12[_0xc385[46]][1],_0x3078x12[_0xc385[46]][2]|| _0xc385[59],_0x3078x12[_0xc385[46]][3]|| _0xc385[59],_0x3078x12[_0xc385[46]][4]|| _0xc385[59]),priority:_0x3078xc,IntervalId:_0x3078x12[_0xc385[31]]|| null,interval:_0x3078x12[_0xc385[33]]|| _0xc385[35],isApp:true,appType:_0x3078x12[_0xc385[63]]},_0x3078xd))}else {if(_0x3078x12[_0xc385[39]][_0xc385[44]]()=== _0xc385[45]&& _0x3078x12[_0xc385[63]]=== _0xc385[69]){_0x3078x14[_0xc385[25]](_[_0xc385[24]]({app:_0x3078x12[_0xc385[39]],appdata:util[_0xc385[23]](_0xc385[70],_0x3078x12[_0xc385[46]][0],_0x3078x12[_0xc385[46]][1]|| _0xc385[59],_0x3078x12[_0xc385[46]][2]|| _0xc385[59],_0x3078x12[_0xc385[46]][3]|| _0xc385[59]),priority:_0x3078xc,IntervalId:_0x3078x12[_0xc385[31]]|| null,interval:_0x3078x12[_0xc385[33]]|| _0xc385[35],isApp:true,appType:_0x3078x12[_0xc385[63]]},_0x3078xd))}else {_0x3078x14[_0xc385[25]](_[_0xc385[24]]({app:_0x3078x12[_0xc385[39]],appdata:_0x3078x12[_0xc385[46]][_0xc385[72]](_0xc385[71]),priority:_0x3078xc,IntervalId:_0x3078x12[_0xc385[31]],interval:_0x3078x12[_0xc385[33]]|| _0xc385[35],isApp:true,appType:_0x3078x12[_0xc385[63]]|| null},_0x3078xd))}}};_0x3078xc++;if(_0x3078x12[_0xc385[39]][_0xc385[44]]()=== _0xc385[45]&& _0x3078x8[_0xc385[49]]&& _0x3078x8[_0xc385[19]]=== _0xc385[26]){_0x3078x14[_0xc385[25]](_[_0xc385[24]]({app:_0xc385[73],appdata:_0xc385[59],priority:_0x3078xc},_0x3078xd))}else {_0x3078x14[_0xc385[25]](_[_0xc385[24]]({app:_0xc385[38],appdata:_0xc385[74],priority:_0x3078xc},_0x3078xd))};_0x3078xc++;_0x3078x14[_0xc385[25]](_[_0xc385[24]]({app:_0xc385[38],appdata:_0x3078x12[_0xc385[39]]+ _0xc385[75],priority:_0x3078xc},_0x3078xd));_0x3078xc++;_0x3078xe[_0xc385[25]](VoiceExtension[_0xc385[30]](_0x3078x14,{transaction:_0x3078x7}))});_0x3078x11[_0xc385[25]](_[_0xc385[24]]({app:_0xc385[38],appdata:_0x3078x8[_0xc385[19]]+ _0xc385[76],priority:_0x3078xc},_0x3078xd));_0x3078xc++;if(_0x3078x8[_0xc385[19]]=== _0xc385[77]|| _0x3078x8[_0xc385[19]]=== _0xc385[26]){_0x3078x11[_0xc385[25]](_[_0xc385[24]]({app:_0xc385[78],appdata:_0xc385[59],priority:_0x3078xc},_0x3078xd));_0x3078xc++};_0x3078xe[_0xc385[25]](VoiceExtension[_0xc385[30]](_0x3078x11,{transaction:_0x3078x7}));return _0x3078xe})[_0xc385[17]]()}}}
\ No newline at end of file