Built motion from commit 2e74e5e.|0.0.138
[motion.git] / server / utils / voice_extension.js
index 6b5bc76..ed7cf51 100644 (file)
@@ -1 +1 @@
-var _0x9388=["\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\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","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73"];var _=require(_0x9388[0]);var util=require(_0x9388[1]);var Interval=require(_0x9388[3])[_0x9388[2]];var sequelize=require(_0x9388[3])[_0x9388[4]];var VoiceExtension=require(_0x9388[3])[_0x9388[5]];exports[_0x9388[6]]= createApplications;exports[_0x9388[7]]= function(_0x626cx6,_0x626cx7){var sequelize=require(_0x9388[3])[_0x9388[4]];var VoiceExtension=require(_0x9388[3])[_0x9388[5]];if(_0x626cx6[_0x9388[9]][_0x9388[8]]){delete _0x626cx6[_0x9388[9]][_0x9388[8]]};return VoiceExtension[_0x9388[16]](_0x626cx6[_0x9388[9]],{where:{id:_0x626cx6[_0x9388[14]][_0x9388[8]]},transaction:_0x626cx7})[_0x9388[10]](function(_0x626cx8){if(_0x626cx6[_0x9388[9]][_0x9388[11]]){_0x626cx6[_0x9388[9]][_0x9388[8]]= _0x626cx6[_0x9388[14]][_0x9388[8]];return VoiceExtension[_0x9388[15]]({where:{VoiceExtensionId:_0x626cx6[_0x9388[14]][_0x9388[8]]},transaction:_0x626cx7})}})[_0x9388[10]](function(){if(_0x626cx6[_0x9388[9]][_0x9388[11]]&& Array[_0x9388[12]](_0x626cx6[_0x9388[9]].Applications)&& _0x626cx6[_0x9388[9]][_0x9388[11]][_0x9388[13]]){return _0x626cx6[_0x9388[9]]}})[_0x9388[10]](createApplications(_0x626cx6[_0x9388[9]].Applications,_0x626cx7))};function createApplications(_0x626cxa,_0x626cx7){var Interval=require(_0x9388[3])[_0x9388[2]];var VoiceExtension=require(_0x9388[3])[_0x9388[5]];return function(_0x626cx8){if(_0x626cx8){return Interval[_0x9388[76]]()[_0x9388[10]](function(_0x626cxb){var _0x626cxc=2;var _0x626cxd={exten:_0x626cx8[_0x9388[18]],type:_0x626cx8[_0x9388[19]],context:_0x626cx8[_0x9388[20]],VoiceExtensionId:_0x626cx8[_0x9388[8]]};var _0x626cxe=[];var _0x626cxf=7;var _0x626cx10=[],_0x626cx11=[];_0x626cx10[_0x9388[25]](_[_0x9388[24]]({app:_0x9388[21],appdata:util[_0x9388[23]](_0x9388[22],_0x626cx8[_0x9388[19]]),priority:_0x626cxc},_0x626cxd));_0x626cxc++;if(_0x626cx8[_0x9388[19]]=== _0x9388[26]){_0x626cx10[_0x9388[25]](_[_0x9388[24]]({app:_0x9388[21],appdata:util[_0x9388[23]](_0x9388[27],_0x626cx8[_0x9388[28]]|| _0x9388[29]),priority:_0x626cxc},_0x626cxd));_0x626cxc++};_0x626cxe[_0x9388[25]](VoiceExtension[_0x9388[30]](_0x626cx10,{transaction:_0x626cx7}));_0x626cxa[_0x9388[43]](function(_0x626cx12){var _0x626cx13=[];var _0x626cx14=[];if(_0x626cx12[_0x9388[31]]){var _0x626cx15=_[_0x9388[32]](_0x626cxb,{IntervalId:_0x626cx12[_0x9388[31]]});_0x626cx13= _0x626cx15[_0x9388[13]]?_[_0x9388[34]](_0x626cx15,_0x9388[33]):[_0x9388[35]];var _0x626cx16=_[_0x9388[36]](_0x626cxb,{id:_0x626cx12[_0x9388[31]]});_0x626cx12[_0x9388[33]]= _0x626cx16?_0x626cx16[_0x9388[37]]:_0x9388[35]}else {_0x626cx13= [_0x626cx12[_0x9388[33]]]};_0x626cx14[_0x9388[25]](_[_0x9388[24]]({app:_0x9388[38],appdata:_0x626cx12[_0x9388[39]]+ _0x9388[40],priority:_0x626cxc},_0x626cxd));_0x626cxc++;var _0x626cx17=_0x626cx13[_0x9388[13]];_0x626cx13[_0x9388[43]](function(_0x626cx18,_0x626cx19){_0x626cx14[_0x9388[25]](_[_0x9388[24]]({app:_0x9388[41],appdata:util[_0x9388[23]](_0x9388[42],_0x626cx18,_0x626cx8[_0x9388[20]],_0x626cxc+ (_0x626cx17- _0x626cx19),_0x626cx8[_0x9388[20]],((_0x626cx19+ 1)< _0x626cx17)?_0x626cxc+ 1:_0x626cxc+ _0x626cxf),priority:_0x626cxc},_0x626cxd));_0x626cxc++});if(_0x626cx12[_0x9388[39]][_0x9388[44]]()=== _0x9388[45]&& _0x626cx8[_0x9388[19]]=== _0x9388[26]&& _0x626cx12[_0x9388[46]][1]){_0x626cx14[_0x9388[25]](_[_0x9388[24]]({app:_0x9388[21],appdata:util[_0x9388[23]](_0x9388[47],_0x626cx12[_0x9388[46]][1]),priority:_0x626cxc},_0x626cxd))}else {_0x626cx14[_0x9388[25]](_[_0x9388[24]]({app:_0x9388[38],appdata:_0x9388[48],priority:_0x626cxc},_0x626cxd))};_0x626cxc++;if(_0x626cx12[_0x9388[39]][_0x9388[44]]()=== _0x9388[45]&& _0x626cx8[_0x9388[49]]&& _0x626cx8[_0x9388[19]]=== _0x9388[26]){_0x626cx14[_0x9388[25]](_[_0x9388[24]]({app:_0x9388[50],appdata:_0x9388[51],priority:_0x626cxc},_0x626cxd))}else {_0x626cx14[_0x9388[25]](_[_0x9388[24]]({app:_0x9388[38],appdata:_0x9388[52],priority:_0x626cxc},_0x626cxd))};_0x626cxc++;if(_0x626cx12[_0x9388[39]][_0x9388[44]]()=== _0x9388[53]&& _0x626cx12[_0x9388[39]]!== _0x9388[54]){_0x626cx14[_0x9388[25]](_[_0x9388[24]]({app:_0x9388[55],appdata:_0x9388[56],priority:_0x626cxc},_0x626cxd))}else {_0x626cx14[_0x9388[25]](_[_0x9388[24]]({app:_0x9388[38],appdata:_0x9388[57],priority:_0x626cxc},_0x626cxd))};_0x626cxc++;if(_0x626cx12[_0x9388[39]][_0x9388[44]]()=== _0x9388[45]&& _0x626cx8[_0x9388[19]]=== _0x9388[26]){_0x626cx14[_0x9388[25]](_[_0x9388[24]]({app:_0x9388[21],appdata:util[_0x9388[23]](_0x9388[58],_0x626cx8[_0x9388[8]]|| _0x9388[56]),priority:_0x626cxc},_0x626cxd))}else {_0x626cx14[_0x9388[25]](_[_0x9388[24]]({app:_0x9388[38],appdata:_0x9388[59],priority:_0x626cxc},_0x626cxd))};_0x626cxc++;if(_0x626cx12[_0x9388[39]][_0x9388[44]]()=== _0x9388[45]&& _0x626cx12[_0x9388[60]]=== _0x9388[61]){_0x626cx14[_0x9388[25]](_[_0x9388[24]]({app:_0x626cx12[_0x9388[39]],appdata:util[_0x9388[23]](_0x9388[62],_0x626cx12[_0x9388[46]][0],_0x626cx12[_0x9388[46]][2]|| _0x9388[56],_0x626cx8[_0x9388[63]]|| 0,_0x626cx12[_0x9388[46]][3]|| _0x9388[56],_0x626cx12[_0x9388[46]][4]|| _0x9388[56],_0x626cx12[_0x9388[46]][5]|| _0x9388[56]),priority:_0x626cxc,IntervalId:_0x626cx12[_0x9388[31]]|| null,interval:_0x626cx12[_0x9388[33]]|| _0x9388[35],isApp:true,callerID:_0x626cx12[_0x9388[46]][1]|| null,appType:_0x626cx12[_0x9388[60]]},_0x626cxd))}else {if(_0x626cx12[_0x9388[39]][_0x9388[44]]()=== _0x9388[45]&& _0x626cx12[_0x9388[60]]=== _0x9388[64]){_0x626cx14[_0x9388[25]](_[_0x9388[24]]({app:_0x626cx12[_0x9388[39]],appdata:util[_0x9388[23]](_0x9388[65],_0x626cx12[_0x9388[46]][0],_0x626cx12[_0x9388[46]][1],_0x626cx12[_0x9388[46]][2]|| _0x9388[56],_0x626cx12[_0x9388[46]][3]|| _0x9388[56],_0x626cx12[_0x9388[46]][4]|| _0x9388[56]),priority:_0x626cxc,IntervalId:_0x626cx12[_0x9388[31]]|| null,interval:_0x626cx12[_0x9388[33]]|| _0x9388[35],isApp:true,appType:_0x626cx12[_0x9388[60]]},_0x626cxd))}else {if(_0x626cx12[_0x9388[39]][_0x9388[44]]()=== _0x9388[45]&& _0x626cx12[_0x9388[60]]=== _0x9388[66]){_0x626cx14[_0x9388[25]](_[_0x9388[24]]({app:_0x626cx12[_0x9388[39]],appdata:util[_0x9388[23]](_0x9388[67],_0x626cx12[_0x9388[46]][0],_0x626cx12[_0x9388[46]][1]|| _0x9388[56],_0x626cx12[_0x9388[46]][2]|| _0x9388[56],_0x626cx12[_0x9388[46]][3]|| _0x9388[56]),priority:_0x626cxc,IntervalId:_0x626cx12[_0x9388[31]]|| null,interval:_0x626cx12[_0x9388[33]]|| _0x9388[35],isApp:true,appType:_0x626cx12[_0x9388[60]]},_0x626cxd))}else {_0x626cx14[_0x9388[25]](_[_0x9388[24]]({app:_0x626cx12[_0x9388[39]],appdata:_0x626cx12[_0x9388[46]][_0x9388[69]](_0x9388[68]),priority:_0x626cxc,IntervalId:_0x626cx12[_0x9388[31]],interval:_0x626cx12[_0x9388[33]]|| _0x9388[35],isApp:true,appType:_0x626cx12[_0x9388[60]]|| null},_0x626cxd))}}};_0x626cxc++;if(_0x626cx12[_0x9388[39]][_0x9388[44]]()=== _0x9388[45]&& _0x626cx8[_0x9388[49]]&& _0x626cx8[_0x9388[19]]=== _0x9388[26]){_0x626cx14[_0x9388[25]](_[_0x9388[24]]({app:_0x9388[70],appdata:_0x9388[56],priority:_0x626cxc},_0x626cxd))}else {_0x626cx14[_0x9388[25]](_[_0x9388[24]]({app:_0x9388[38],appdata:_0x9388[71],priority:_0x626cxc},_0x626cxd))};_0x626cxc++;_0x626cx14[_0x9388[25]](_[_0x9388[24]]({app:_0x9388[38],appdata:_0x626cx12[_0x9388[39]]+ _0x9388[72],priority:_0x626cxc},_0x626cxd));_0x626cxc++;_0x626cxe[_0x9388[25]](VoiceExtension[_0x9388[30]](_0x626cx14,{transaction:_0x626cx7}))});_0x626cx11[_0x9388[25]](_[_0x9388[24]]({app:_0x9388[38],appdata:_0x626cx8[_0x9388[19]]+ _0x9388[73],priority:_0x626cxc},_0x626cxd));_0x626cxc++;if(_0x626cx8[_0x9388[19]]=== _0x9388[74]|| _0x626cx8[_0x9388[19]]=== _0x9388[26]){_0x626cx11[_0x9388[25]](_[_0x9388[24]]({app:_0x9388[75],appdata:_0x9388[56],priority:_0x626cxc},_0x626cxd));_0x626cxc++};_0x626cxe[_0x9388[25]](VoiceExtension[_0x9388[30]](_0x626cx11,{transaction:_0x626cx7}));return _0x626cxe})[_0x9388[17]]()}}}function handleError(_0x626cx1b,_0x626cx1c){return _0x626cx1b[_0x9388[78]](500)[_0x9388[77]](_0x626cx1c)}
\ No newline at end of file
+var _0xbdc8=["\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(_0xbdc8[0]);var util=require(_0xbdc8[1]);var Interval=require(_0xbdc8[3])[_0xbdc8[2]];var sequelize=require(_0xbdc8[3])[_0xbdc8[4]];var VoiceExtension=require(_0xbdc8[3])[_0xbdc8[5]];exports[_0xbdc8[6]]= createApplications;exports[_0xbdc8[7]]= function(_0x770ex6,_0x770ex7){var sequelize=require(_0xbdc8[3])[_0xbdc8[4]];var VoiceExtension=require(_0xbdc8[3])[_0xbdc8[5]];if(_0x770ex6[_0xbdc8[9]][_0xbdc8[8]]){delete _0x770ex6[_0xbdc8[9]][_0xbdc8[8]]};return VoiceExtension[_0xbdc8[16]](_0x770ex6[_0xbdc8[9]],{where:{id:_0x770ex6[_0xbdc8[14]][_0xbdc8[8]]},transaction:_0x770ex7})[_0xbdc8[10]](function(_0x770ex8){if(_0x770ex6[_0xbdc8[9]][_0xbdc8[11]]){_0x770ex6[_0xbdc8[9]][_0xbdc8[8]]= _0x770ex6[_0xbdc8[14]][_0xbdc8[8]];return VoiceExtension[_0xbdc8[15]]({where:{VoiceExtensionId:_0x770ex6[_0xbdc8[14]][_0xbdc8[8]]},transaction:_0x770ex7})}})[_0xbdc8[10]](function(){if(_0x770ex6[_0xbdc8[9]][_0xbdc8[11]]&& Array[_0xbdc8[12]](_0x770ex6[_0xbdc8[9]].Applications)&& _0x770ex6[_0xbdc8[9]][_0xbdc8[11]][_0xbdc8[13]]){return _0x770ex6[_0xbdc8[9]]}})[_0xbdc8[10]](createApplications(_0x770ex6[_0xbdc8[9]].Applications,_0x770ex7))};function createApplications(_0x770exa,_0x770ex7){var Interval=require(_0xbdc8[3])[_0xbdc8[2]];var VoiceExtension=require(_0xbdc8[3])[_0xbdc8[5]];return function(_0x770ex8){if(_0x770ex8){return Interval[_0xbdc8[79]]()[_0xbdc8[10]](function(_0x770exb){var _0x770exc=2;var _0x770exd={exten:_0x770ex8[_0xbdc8[18]],type:_0x770ex8[_0xbdc8[19]],context:_0x770ex8[_0xbdc8[20]],VoiceExtensionId:_0x770ex8[_0xbdc8[8]]};var _0x770exe=[];var _0x770exf=7;var _0x770ex10=[],_0x770ex11=[];_0x770ex10[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0xbdc8[21],appdata:util[_0xbdc8[23]](_0xbdc8[22],_0x770ex8[_0xbdc8[19]]),priority:_0x770exc},_0x770exd));_0x770exc++;if(_0x770ex8[_0xbdc8[19]]=== _0xbdc8[26]){_0x770ex10[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0xbdc8[21],appdata:util[_0xbdc8[23]](_0xbdc8[27],_0x770ex8[_0xbdc8[28]]|| _0xbdc8[29]),priority:_0x770exc},_0x770exd));_0x770exc++};_0x770exe[_0xbdc8[25]](VoiceExtension[_0xbdc8[30]](_0x770ex10,{transaction:_0x770ex7}));_0x770exa[_0xbdc8[43]](function(_0x770ex12){var _0x770ex13=[];var _0x770ex14=[];if(_0x770ex12[_0xbdc8[31]]){var _0x770ex15=_[_0xbdc8[32]](_0x770exb,{IntervalId:_0x770ex12[_0xbdc8[31]]});_0x770ex13= _0x770ex15[_0xbdc8[13]]?_[_0xbdc8[34]](_0x770ex15,_0xbdc8[33]):[_0xbdc8[35]];var _0x770ex16=_[_0xbdc8[36]](_0x770exb,{id:_0x770ex12[_0xbdc8[31]]});_0x770ex12[_0xbdc8[33]]= _0x770ex16?_0x770ex16[_0xbdc8[37]]:_0xbdc8[35]}else {_0x770ex13= [_0x770ex12[_0xbdc8[33]]]};_0x770ex14[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0xbdc8[38],appdata:_0x770ex12[_0xbdc8[39]]+ _0xbdc8[40],priority:_0x770exc},_0x770exd));_0x770exc++;var _0x770ex17=_0x770ex13[_0xbdc8[13]];_0x770ex13[_0xbdc8[43]](function(_0x770ex18,_0x770ex19){_0x770ex14[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0xbdc8[41],appdata:util[_0xbdc8[23]](_0xbdc8[42],_0x770ex18,_0x770ex8[_0xbdc8[20]],_0x770exc+ (_0x770ex17- _0x770ex19),_0x770ex8[_0xbdc8[20]],((_0x770ex19+ 1)< _0x770ex17)?_0x770exc+ 1:_0x770exc+ _0x770exf),priority:_0x770exc},_0x770exd));_0x770exc++});if(_0x770ex12[_0xbdc8[39]][_0xbdc8[44]]()=== _0xbdc8[45]&& _0x770ex8[_0xbdc8[19]]=== _0xbdc8[26]&& _0x770ex12[_0xbdc8[46]][1]){_0x770ex14[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0xbdc8[21],appdata:util[_0xbdc8[23]](_0xbdc8[47],_0x770ex12[_0xbdc8[46]][1]),priority:_0x770exc},_0x770exd))}else {_0x770ex14[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0xbdc8[38],appdata:_0xbdc8[48],priority:_0x770exc},_0x770exd))};_0x770exc++;if(_0x770ex12[_0xbdc8[39]][_0xbdc8[44]]()=== _0xbdc8[45]&& _0x770ex8[_0xbdc8[49]]&& _0x770ex8[_0xbdc8[19]]=== _0xbdc8[26]){_0x770ex14[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0xbdc8[50],appdata:_0xbdc8[51]+ (_0x770ex8[_0xbdc8[52]]|| _0xbdc8[53])+ _0xbdc8[54],priority:_0x770exc},_0x770exd))}else {_0x770ex14[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0xbdc8[38],appdata:_0xbdc8[55],priority:_0x770exc},_0x770exd))};_0x770exc++;if(_0x770ex12[_0xbdc8[39]][_0xbdc8[44]]()=== _0xbdc8[56]&& _0x770ex12[_0xbdc8[39]]!== _0xbdc8[57]){_0x770ex14[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0xbdc8[58],appdata:_0xbdc8[59],priority:_0x770exc},_0x770exd))}else {_0x770ex14[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0xbdc8[38],appdata:_0xbdc8[60],priority:_0x770exc},_0x770exd))};_0x770exc++;if(_0x770ex12[_0xbdc8[39]][_0xbdc8[44]]()=== _0xbdc8[45]&& _0x770ex8[_0xbdc8[19]]=== _0xbdc8[26]){_0x770ex14[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0xbdc8[21],appdata:util[_0xbdc8[23]](_0xbdc8[61],_0x770ex8[_0xbdc8[8]]|| _0xbdc8[59]),priority:_0x770exc},_0x770exd))}else {_0x770ex14[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0xbdc8[38],appdata:_0xbdc8[62],priority:_0x770exc},_0x770exd))};_0x770exc++;if(_0x770ex12[_0xbdc8[39]][_0xbdc8[44]]()=== _0xbdc8[45]&& _0x770ex12[_0xbdc8[63]]=== _0xbdc8[64]){_0x770ex14[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0x770ex12[_0xbdc8[39]],appdata:util[_0xbdc8[23]](_0xbdc8[65],_0x770ex12[_0xbdc8[46]][0],_0x770ex12[_0xbdc8[46]][2]|| _0xbdc8[59],_0x770ex8[_0xbdc8[66]]|| 0,_0x770ex12[_0xbdc8[46]][3]|| _0xbdc8[59],_0x770ex12[_0xbdc8[46]][4]|| _0xbdc8[59],_0x770ex12[_0xbdc8[46]][5]|| _0xbdc8[59]),priority:_0x770exc,IntervalId:_0x770ex12[_0xbdc8[31]]|| null,interval:_0x770ex12[_0xbdc8[33]]|| _0xbdc8[35],isApp:true,callerID:_0x770ex12[_0xbdc8[46]][1]|| null,appType:_0x770ex12[_0xbdc8[63]]},_0x770exd))}else {if(_0x770ex12[_0xbdc8[39]][_0xbdc8[44]]()=== _0xbdc8[45]&& _0x770ex12[_0xbdc8[63]]=== _0xbdc8[67]){_0x770ex14[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0x770ex12[_0xbdc8[39]],appdata:util[_0xbdc8[23]](_0xbdc8[68],_0x770ex12[_0xbdc8[46]][0],_0x770ex12[_0xbdc8[46]][1],_0x770ex12[_0xbdc8[46]][2]|| _0xbdc8[59],_0x770ex12[_0xbdc8[46]][3]|| _0xbdc8[59],_0x770ex12[_0xbdc8[46]][4]|| _0xbdc8[59]),priority:_0x770exc,IntervalId:_0x770ex12[_0xbdc8[31]]|| null,interval:_0x770ex12[_0xbdc8[33]]|| _0xbdc8[35],isApp:true,appType:_0x770ex12[_0xbdc8[63]]},_0x770exd))}else {if(_0x770ex12[_0xbdc8[39]][_0xbdc8[44]]()=== _0xbdc8[45]&& _0x770ex12[_0xbdc8[63]]=== _0xbdc8[69]){_0x770ex14[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0x770ex12[_0xbdc8[39]],appdata:util[_0xbdc8[23]](_0xbdc8[70],_0x770ex12[_0xbdc8[46]][0],_0x770ex12[_0xbdc8[46]][1]|| _0xbdc8[59],_0x770ex12[_0xbdc8[46]][2]|| _0xbdc8[59],_0x770ex12[_0xbdc8[46]][3]|| _0xbdc8[59]),priority:_0x770exc,IntervalId:_0x770ex12[_0xbdc8[31]]|| null,interval:_0x770ex12[_0xbdc8[33]]|| _0xbdc8[35],isApp:true,appType:_0x770ex12[_0xbdc8[63]]},_0x770exd))}else {_0x770ex14[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0x770ex12[_0xbdc8[39]],appdata:_0x770ex12[_0xbdc8[46]][_0xbdc8[72]](_0xbdc8[71]),priority:_0x770exc,IntervalId:_0x770ex12[_0xbdc8[31]],interval:_0x770ex12[_0xbdc8[33]]|| _0xbdc8[35],isApp:true,appType:_0x770ex12[_0xbdc8[63]]|| null},_0x770exd))}}};_0x770exc++;if(_0x770ex12[_0xbdc8[39]][_0xbdc8[44]]()=== _0xbdc8[45]&& _0x770ex8[_0xbdc8[49]]&& _0x770ex8[_0xbdc8[19]]=== _0xbdc8[26]){_0x770ex14[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0xbdc8[73],appdata:_0xbdc8[59],priority:_0x770exc},_0x770exd))}else {_0x770ex14[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0xbdc8[38],appdata:_0xbdc8[74],priority:_0x770exc},_0x770exd))};_0x770exc++;_0x770ex14[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0xbdc8[38],appdata:_0x770ex12[_0xbdc8[39]]+ _0xbdc8[75],priority:_0x770exc},_0x770exd));_0x770exc++;_0x770exe[_0xbdc8[25]](VoiceExtension[_0xbdc8[30]](_0x770ex14,{transaction:_0x770ex7}))});_0x770ex11[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0xbdc8[38],appdata:_0x770ex8[_0xbdc8[19]]+ _0xbdc8[76],priority:_0x770exc},_0x770exd));_0x770exc++;if(_0x770ex8[_0xbdc8[19]]=== _0xbdc8[77]|| _0x770ex8[_0xbdc8[19]]=== _0xbdc8[26]){_0x770ex11[_0xbdc8[25]](_[_0xbdc8[24]]({app:_0xbdc8[78],appdata:_0xbdc8[59],priority:_0x770exc},_0x770exd));_0x770exc++};_0x770exe[_0xbdc8[25]](VoiceExtension[_0xbdc8[30]](_0x770ex11,{transaction:_0x770ex7}));return _0x770exe})[_0xbdc8[17]]()}}}
\ No newline at end of file