Built motion from commit ce2081a.|0.0.133
[motion.git] / server / api / voice_extension / voice_extension.controller.js
index 600f3ef..d7146b9 100644 (file)
@@ -1 +1 @@
-var _0xb020=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77\x42\x79\x52\x6F\x75\x74\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x65\x78\x74\x65\x6E","\x61\x70\x70","\x61\x70\x70\x64\x61\x74\x61","\x70\x65\x72\x5F\x70\x61\x67\x65","\x71\x75\x65\x72\x79","\x70\x61\x67\x65","\x72\x6F\x75\x74\x65","\x70\x61\x72\x61\x6D\x73","\x4E\x6F\x4F\x70","\x6F\x72\x64\x65\x72","\x25\x73\x20\x25\x73","\x73\x6F\x72\x74\x5F\x62\x79","\x73\x6F\x72\x74\x5F\x6F\x72\x64\x65\x72","\x41\x53\x43","\x66\x6F\x72\x6D\x61\x74","\x24\x6F\x72","\x77\x68\x65\x72\x65","\x25","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x24","\x24\x6C\x69\x6B\x65","\x66\x6F\x72\x49\x6E","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x62\x6C\x65\x77\x20\x75\x70\x21","\x63\x6F\x75\x6E\x74","\x63\x65\x69\x6C","\x6F\x66\x66\x73\x65\x74","\x25\x73\x3A\x2F\x2F\x25\x73\x25\x73\x3F\x70\x61\x67\x65\x3D\x25\x64","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x68\x6F\x73\x74","\x68\x65\x61\x64\x65\x72\x73","\x62\x61\x73\x65\x55\x72\x6C","\x72\x6F\x77\x73","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77\x41\x70\x70\x73\x42\x79\x52\x6F\x75\x74\x65","\x69\x64","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x6F\x75\x74\x65\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x73\x6F\x72\x74\x41\x70\x70\x73\x42\x79\x52\x6F\x75\x74\x65","\x61\x6C\x6C","\x61\x70\x70\x47\x72\x6F\x75\x70","\x69\x73\x41\x70\x70","\x66\x69\x6E\x64","\x63\x6C\x6F\x6E\x65\x44\x65\x65\x70","\x63\x75\x73\x74\x6F\x6D\x41\x70\x70","\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","\x63\x75\x73\x74\x6F\x6D","\x25\x73","\x43\x75\x73\x74\x6F\x6D\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x45\x6E\x64","\x25\x73\x25\x73\x25\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x69\x73\x49\x6E\x74\x65\x72\x76\x61\x6C","\x66\x69\x6C\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x70\x6C\x69\x63\x65","\x47\x6F\x74\x6F\x49\x66\x54\x69\x6D\x65\x46\x72\x6F\x6D\x41\x72\x72\x61\x79","\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","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x75\x6E\x73\x68\x69\x66\x74","\x61\x70\x70\x43\x72\x65\x61\x74\x65","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x49\x64","\x6C\x6F\x67","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x61\x70","\x70\x72\x69\x6F\x72\x69\x74\x79","\x6D\x61\x78","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x52\x4F\x55\x54\x45","\x75\x70\x64\x61\x74\x65","\x72\x65\x63\x6F\x72\x64","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x72\x65\x74\x75\x72\x6E\x20\x62\x75\x6C\x6B\x41\x70\x70\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79"];_0xb020[0];var _=require(_0xb020[1]);var VoiceExtension=require(_0xb020[3])[_0xb020[2]];var Interval=require(_0xb020[3])[_0xb020[4]];var sequelize=require(_0xb020[3])[_0xb020[5]];var Sequelize=require(_0xb020[3])[_0xb020[6]];var util=require(_0xb020[7]);var async=require(_0xb020[8]);var veUtil=require(_0xb020[9]);var Applications=veUtil[_0xb020[10]];exports[_0xb020[11]]=function(_0x17bdxa,_0x17bdxb){VoiceExtension[_0xb020[16]]()[_0xb020[15]](function(_0x17bdxd){return _0x17bdxb[_0xb020[14]](200)[_0xb020[13]](_0x17bdxd)})[_0xb020[12]](function(_0x17bdxc){return handleError(_0x17bdxb,_0x17bdxc)})};exports[_0xb020[17]]=function(_0x17bdxa,_0x17bdxb,_0x17bdxe){var _0x17bdxf=[_0xb020[18],_0xb020[19],_0xb020[20],_0xb020[21]];var _0x17bdx10=_0x17bdxa[_0xb020[23]][_0xb020[22]]?parseInt(_0x17bdxa[_0xb020[23]][_0xb020[22]],10):100;var _0x17bdx11=_0x17bdxa[_0xb020[23]][_0xb020[24]]?parseInt(_0x17bdxa[_0xb020[23]][_0xb020[24]],10):0;var _0x17bdx12={where:{type:_0x17bdxa[_0xb020[26]][_0xb020[25]],VoiceExtensionId:null,app:_0xb020[27]},limit:_0x17bdx10,offset:_0x17bdx11*_0x17bdx10};_[_0xb020[41]](_0x17bdxa[_0xb020[23]],function(_0x17bdx13,_0x17bdx14){switch(_0x17bdx14){case _0xb020[22]:;case _0xb020[24]:break ;;case _0xb020[30]:_0x17bdx12[_0xb020[28]]=util[_0xb020[33]](_0xb020[29],_0x17bdxa[_0xb020[23]][_0xb020[30]],_0x17bdxa[_0xb020[23]][_0xb020[31]]||_0xb020[32])||null;break ;;case _0xb020[31]:break ;;case _0xb020[39]:_0x17bdx12[_0xb020[35]][_0xb020[34]]=[];_0x17bdxf[_0xb020[38]](function(_0x17bdx15){var _0x17bdx16={};_0x17bdx16[_0x17bdx15]={$like:_0xb020[36]+_0x17bdx13+_0xb020[36]};_0x17bdx12[_0xb020[35]][_0xb020[34]][_0xb020[37]](_0x17bdx16);});break ;;default:_0x17bdx12[_0xb020[35]][_0x17bdx14]={$like:{}};_0x17bdx12[_0xb020[35]][_0x17bdx14][_0xb020[40]]=_0xb020[36]+_0x17bdx13+_0xb020[36];;}});VoiceExtension[_0xb020[52]](_0x17bdx12)[_0xb020[15]](function(_0x17bdx17){var _0x17bdx18=Math[_0xb020[44]](_0x17bdx17[_0xb020[43]]/_0x17bdx10);var _0x17bdx19=_0x17bdx18>(_0x17bdx12[_0xb020[45]]+1)?util[_0xb020[33]](_0xb020[46],_0x17bdxa[_0xb020[47]],_0x17bdxa[_0xb020[49]][_0xb020[48]],_0x17bdxa[_0xb020[50]],_0x17bdx11+1):null;var _0x17bdx1a=_0x17bdx11>0?util[_0xb020[33]](_0xb020[46],_0x17bdxa[_0xb020[47]],_0x17bdxa[_0xb020[49]][_0xb020[48]],_0x17bdxa[_0xb020[50]],_0x17bdx11-1):null;_0x17bdxb[_0xb020[14]](200)[_0xb020[13]]({count:_0x17bdx17[_0xb020[43]],rows:_0x17bdx17[_0xb020[51]],next_page:_0x17bdx19,previous_page:_0x17bdx1a,total_pages:_0x17bdx18});})[_0xb020[12]](function(_0x17bdxc){_0x17bdxb[_0xb020[14]](500)[_0xb020[13]]({error:_0xb020[42]})});};exports[_0xb020[53]]=function(_0x17bdxa,_0x17bdxb){VoiceExtension[_0xb020[16]]({where:{VoiceExtensionId:_0x17bdxa[_0xb020[26]][_0xb020[54]],isApp:true}})[_0xb020[15]](function(_0x17bdxd){return _0x17bdxb[_0xb020[14]](200)[_0xb020[13]](_0x17bdxd)})[_0xb020[12]](function(_0x17bdxc){return handleError(_0x17bdxb,_0x17bdxc)})};exports[_0xb020[55]]=function(_0x17bdxa,_0x17bdxb){VoiceExtension[_0xb020[57]](_0x17bdxa[_0xb020[26]][_0xb020[54]])[_0xb020[15]](function(_0x17bdx1b){if(!_0x17bdx1b){return _0x17bdxb[_0xb020[56]](404)};return _0x17bdxb[_0xb020[13]](_0x17bdx1b);})[_0xb020[12]](function(_0x17bdxc){return handleError(_0x17bdxb,_0x17bdxc)})};exports[_0xb020[58]]=function(_0x17bdxa,_0x17bdxb){VoiceExtension[_0xb020[16]]({where:{exten:_0x17bdxa[_0xb020[59]][_0xb020[19]],context:_0x17bdxa[_0xb020[59]][_0xb020[18]],VoiceExtensionId:null}})[_0xb020[15]](function(_0x17bdx1b){if(!_0x17bdx1b){return _0x17bdxb[_0xb020[56]](404)};return _0x17bdxb[_0xb020[13]](_0x17bdx1b);})[_0xb020[12]](function(_0x17bdxc){return handleError(_0x17bdxb,_0x17bdxc)})};exports[_0xb020[60]]=function(_0x17bdxa,_0x17bdxb,_0x17bdxe){var _0x17bdx1c;return sequelize[_0xb020[87]](function(_0x17bdx1d){return VoiceExtension[_0xb020[16]]({where:{appGroup:_0x17bdxa[_0xb020[59]][_0xb020[85]]}})[_0xb020[15]](function(_0x17bdx27){_0x17bdx1c=_0x17bdx27;return VoiceExtension[_0xb020[86]]({where:{appGroup:_0x17bdxa[_0xb020[59]][_0xb020[85]]}},{transaction:_0x17bdx1d});})[_0xb020[15]](function(){var _0x17bdx1e=2;var _0x17bdx1f=[];_0x17bdxa[_0xb020[59]][_0xb020[85]][_0xb020[38]](function(_0x17bdx20){var _0x17bdx21=_[_0xb020[64]](_0x17bdx1c,function(_0x17bdx22){return (_0x17bdx22[_0xb020[62]]==_0x17bdx20&&_0x17bdx22[_0xb020[63]]===true)});var _0x17bdx23=_[_0xb020[65]](Applications[_0x17bdx21[_0xb020[20]]]);if(!_0x17bdx23||_0x17bdx21[_0xb020[66]]){_0x17bdx23=[{app:_0xb020[67],appdata:_0xb020[68]},{app:_0xb020[69],appdata:_0xb020[70],isApp:true},{app:_0xb020[27],appdata:_0xb020[71]}]};var _0x17bdx24=util[_0xb020[33]](_0xb020[72],_0x17bdx21[_0xb020[18]],_0x17bdx21[_0xb020[19]],_0x17bdx1e);_0x17bdx21[_0xb020[73]]=_0x17bdx21[_0xb020[73]]||_0xb020[74];var _0x17bdx25=_[_0xb020[76]](_0x17bdx1c,function(_0x17bdx22){return (_0x17bdx22[_0xb020[62]]==_0x17bdx20&&_0x17bdx22[_0xb020[75]]===true)});if(_0x17bdx25&&_0x17bdx25[_0xb020[77]]>0){_0x17bdx23[_0xb020[78]](0,1);_0x17bdx25[_0xb020[38]](function(_0x17bdx22,_0x17bdx26){_0x17bdx23[_0xb020[82]]({app:_0xb020[79],appdata:_0x17bdx22[_0xb020[73]]+_0xb020[80],IntervalId:_0x17bdx22[_0xb020[81]]?_0x17bdx22[_0xb020[81]]:null,isInterval:true,interval:_0x17bdx22[_0xb020[73]]})});};_0x17bdx1e=veUtil[_0xb020[83]](_0x17bdx23,_0x17bdx21,_0x17bdx24,_0x17bdx25||[],_0x17bdx1e);_0x17bdx1f[_0xb020[37]](VoiceExtension[_0xb020[84]](_0x17bdx23,{transaction:_0x17bdx1d}));});return _0x17bdx1f;})[_0xb020[61]]()})[_0xb020[15]](function(){_0x17bdxb[_0xb020[56]](200)})[_0xb020[12]](function(_0x17bdxc){return handleError(_0x17bdxb,_0x17bdxc)});};exports[_0xb020[88]]=function(_0x17bdxa,_0x17bdxb,_0x17bdxe){if(_0x17bdxa[_0xb020[59]][_0xb020[89]]){createVoiceApplication(_0x17bdxa,_0x17bdxb)}else {createVoiceExtension(_0x17bdxa,_0x17bdxb)}};function createVoiceApplication(_0x17bdxa,_0x17bdxb){var _0x17bdx23;var _0x17bdx24;return VoiceExtension[_0xb020[94]](_0xb020[93],{where:{VoiceExtensionId:_0x17bdxa[_0xb020[59]][_0xb020[89]]}})[_0xb020[15]](function(_0x17bdx2d){_0x17bdxa[_0xb020[59]][_0xb020[93]]=_0x17bdx2d?++_0x17bdx2d:2;_0x17bdx23=_[_0xb020[65]](Applications[_0x17bdxa[_0xb020[59]][_0xb020[20]]]);if(!_0x17bdx23||_0x17bdxa[_0xb020[59]][_0xb020[66]]){_0x17bdx23=[{app:_0xb020[67],appdata:_0xb020[68]},{app:_0xb020[69],appdata:_0xb020[70],isApp:true},{app:_0xb020[27],appdata:_0xb020[71]}]};_0x17bdx24=util[_0xb020[33]](_0xb020[72],_0x17bdxa[_0xb020[59]][_0xb020[18]],_0x17bdxa[_0xb020[59]][_0xb020[19]],_0x17bdxa[_0xb020[59]][_0xb020[93]]);_0x17bdxa[_0xb020[59]][_0xb020[73]]=_0x17bdxa[_0xb020[59]][_0xb020[73]]||_0xb020[74];return Interval[_0xb020[16]]({where:{IntervalId:(_0x17bdxa[_0xb020[59]][_0xb020[81]]!==null)?_0x17bdxa[_0xb020[59]][_0xb020[81]]:0}});})[_0xb020[15]](function(_0x17bdx2a){var _0x17bdx2b=[];var _0x17bdx2c;if(_0x17bdx2a&&_0x17bdx2a[_0xb020[77]]>0){_0x17bdx23[_0xb020[78]](0,1);_0x17bdx2b=_[_0xb020[92]](_0x17bdx2a,_0xb020[91]);_0x17bdx2b[_0xb020[38]](function(_0x17bdx22,_0x17bdx26){_0x17bdx23[_0xb020[82]]({app:_0xb020[79],appdata:_0x17bdx22[_0xb020[73]]+_0xb020[80],IntervalId:_0x17bdx22[_0xb020[54]],interval:_0x17bdx2c,isInterval:true})});};veUtil[_0xb020[83]](_0x17bdx23,_0x17bdxa[_0xb020[59]],_0x17bdx24,_0x17bdx2b);return VoiceExtension[_0xb020[84]](_0x17bdx23);})[_0xb020[15]](function(_0x17bdx29){return _0x17bdxb[_0xb020[14]](201)[_0xb020[13]](_0x17bdx29)})[_0xb020[12]](function(_0x17bdxc){console[_0xb020[90]](_0x17bdxc);return handleError(_0x17bdxb,_0x17bdxc);});}function createVoiceExtension(_0x17bdxa,_0x17bdxb){VoiceExtension[_0xb020[16]]({where:{exten:_0x17bdxa[_0xb020[59]][_0xb020[19]],context:_0x17bdxa[_0xb020[59]][_0xb020[18]],VoiceExtensionId:null}})[_0xb020[15]](function(_0x17bdx2f){if(!_0x17bdx2f){return _0x17bdxb[_0xb020[56]](404)};if(_0x17bdx2f[_0xb020[77]]>0){return _0x17bdxb[_0xb020[14]](500)[_0xb020[13]]({message:_0xb020[95]})};_0x17bdxa[_0xb020[59]][_0xb020[93]]=1;VoiceExtension[_0xb020[88]](_0x17bdxa[_0xb020[59]])[_0xb020[15]](function(_0x17bdx29){return _0x17bdxb[_0xb020[14]](201)[_0xb020[13]](_0x17bdx29)})[_0xb020[12]](function(_0x17bdxc){return handleError(_0x17bdxb,_0x17bdxc)});})[_0xb020[12]](function(_0x17bdxc){return handleError(_0x17bdxb,_0x17bdxc)})}exports[_0xb020[96]]=function(_0x17bdxa,_0x17bdxb){var _0x17bdx30;var _0x17bdx31;return sequelize[_0xb020[87]](function(_0x17bdx1d){return VoiceExtension[_0xb020[16]]({where:{exten:_0x17bdxa[_0xb020[59]][_0xb020[19]],context:_0x17bdxa[_0xb020[59]][_0xb020[18]],VoiceExtensionId:null,id:{$ne:_0x17bdxa[_0xb020[59]][_0xb020[54]]}}})[_0xb020[15]](function(_0x17bdx2f){if(!_0x17bdx2f){return _0x17bdxb[_0xb020[56]](404)};if(_0x17bdx2f[_0xb020[77]]>0){return _0x17bdxb[_0xb020[14]](500)[_0xb020[13]]({message:_0xb020[95]})};if(_0x17bdxa[_0xb020[59]][_0xb020[54]]){delete _0x17bdxa[_0xb020[59]][_0xb020[54]]};return VoiceExtension[_0xb020[64]]({where:{id:_0x17bdxa[_0xb020[26]][_0xb020[54]]}});})[_0xb020[15]](function(_0x17bdx1b){if(!_0x17bdx1b){return _0x17bdxb[_0xb020[56]](404)};var _0x17bdx35=_[_0xb020[98]](_0x17bdx1b,_0x17bdxa[_0xb020[59]]);return _0x17bdx35[_0xb020[99]]({transaction:_0x17bdx1d});})[_0xb020[15]](function(_0x17bdx34){_0x17bdx30=_0x17bdx34;return VoiceExtension[_0xb020[16]]({where:{VoiceExtensionId:_0x17bdx34[_0xb020[54]],isApp:true}});})[_0xb020[15]](function(_0x17bdx29){_0x17bdx31=_0x17bdx29;return VoiceExtension[_0xb020[86]]({where:{VoiceExtensionId:_0x17bdx30[_0xb020[54]]}},{transaction:_0x17bdx1d});})[_0xb020[15]](function(){_0x17bdx31=_[_0xb020[92]](_0x17bdx31,_0xb020[91]);var _0x17bdx33=_[_0xb020[76]](_[_0xb020[92]](_0x17bdx31,_0xb020[81]),function(_0x17bdx22){return _0x17bdx22!==null});return Interval[_0xb020[16]]({where:{IntervalId:_0x17bdx33}});})[_0xb020[15]](function(_0x17bdx2b){console[_0xb020[90]](_0x17bdx31[_0xb020[77]]);var _0x17bdx1e=2;var _0x17bdx32;var _0x17bdx1f=[];_0x17bdx31[_0xb020[38]](function(_0x17bdx21){var _0x17bdx23=_[_0xb020[65]](Applications[_0x17bdx21[_0xb020[20]]]);if(!_0x17bdx23||_0x17bdx21[_0xb020[66]]){_0x17bdx23=[{app:_0xb020[67],appdata:_0xb020[68]},{app:_0xb020[69],appdata:_0xb020[70],isApp:true},{app:_0xb020[27],appdata:_0xb020[71]}]};_0x17bdx21[_0xb020[97]]=_0x17bdx30[_0xb020[97]];_0x17bdx21[_0xb020[18]]=_0x17bdx30[_0xb020[18]];_0x17bdx21[_0xb020[19]]=_0x17bdx30[_0xb020[19]];var _0x17bdx24=util[_0xb020[33]](_0xb020[72],_0x17bdx21[_0xb020[18]],_0x17bdx21[_0xb020[19]],_0x17bdx1e);_0x17bdx21[_0xb020[73]]=_0x17bdx21[_0xb020[73]]||_0xb020[74];var _0x17bdx25=_[_0xb020[76]](_0x17bdx2b,function(_0x17bdx22){return (_0x17bdx22[_0xb020[81]]==_0x17bdx21[_0xb020[81]])});if(_0x17bdx25&&_0x17bdx25[_0xb020[77]]>0){_0x17bdx23[_0xb020[78]](0,1);_0x17bdx25[_0xb020[38]](function(_0x17bdx22,_0x17bdx26){_0x17bdx23[_0xb020[82]]({app:_0xb020[79],appdata:_0x17bdx22[_0xb020[73]]+_0xb020[80],IntervalId:_0x17bdx22[_0xb020[54]],isInterval:true,interval:_0x17bdx22[_0xb020[73]]})});};_0x17bdx1e=veUtil[_0xb020[83]](_0x17bdx23,_0x17bdx21,_0x17bdx24,_0x17bdx25||[],_0x17bdx1e);_0x17bdx1f[_0xb020[37]](VoiceExtension[_0xb020[84]](_0x17bdx23,{transaction:_0x17bdx1d}));});return _0x17bdx1f;})[_0xb020[61]]()})[_0xb020[15]](function(){_0x17bdxb[_0xb020[56]](200)})[_0xb020[12]](function(_0x17bdxc){console[_0xb020[90]](_0x17bdxc);return handleError(_0x17bdxb,_0x17bdxc);});};exports[_0xb020[100]]=function(_0x17bdxa,_0x17bdxb,_0x17bdxe){var _0x17bdx32;var _0x17bdx31;if(_0x17bdxa[_0xb020[59]][_0xb020[21]]){delete _0x17bdxa[_0xb020[59]][_0xb020[21]]};return sequelize[_0xb020[87]](function(_0x17bdx1d){return VoiceExtension[_0xb020[16]]({where:{VoiceExtensionId:_0x17bdxa[_0xb020[59]][_0xb020[89]],isApp:true}})[_0xb020[15]](function(_0x17bdx29){_0x17bdx31=_0x17bdx29;_[_0xb020[98]](_[_0xb020[64]](_0x17bdx31,{id:_0x17bdxa[_0xb020[59]][_0xb020[54]]}),_0x17bdxa[_0xb020[59]]);return VoiceExtension[_0xb020[86]]({where:{VoiceExtensionId:_0x17bdxa[_0xb020[59]][_0xb020[89]]}},{transaction:_0x17bdx1d});})[_0xb020[15]](function(){_0x17bdx31=_[_0xb020[92]](_0x17bdx31,_0xb020[91]);var _0x17bdx33=_[_0xb020[76]](_[_0xb020[92]](_0x17bdx31,_0xb020[81]),function(_0x17bdx22){return _0x17bdx22!==null});return Interval[_0xb020[16]]({where:{IntervalId:_0x17bdx33}});})[_0xb020[15]](function(_0x17bdx2b){var _0x17bdx1e=2;var _0x17bdx32;var _0x17bdx1f=[];_0x17bdx31[_0xb020[38]](function(_0x17bdx21){var _0x17bdx23=_[_0xb020[65]](Applications[_0x17bdx21[_0xb020[20]]]);if(!_0x17bdx23||_0x17bdx21[_0xb020[66]]){_0x17bdx23=[{app:_0xb020[67],appdata:_0xb020[68]},{app:_0xb020[69],appdata:_0xb020[70],isApp:true},{app:_0xb020[27],appdata:_0xb020[71]}]};var _0x17bdx24=util[_0xb020[33]](_0xb020[72],_0x17bdx21[_0xb020[18]],_0x17bdx21[_0xb020[19]],_0x17bdx1e);_0x17bdx21[_0xb020[73]]=_0x17bdx21[_0xb020[73]]||_0xb020[74];var _0x17bdx25=_[_0xb020[76]](_0x17bdx2b,function(_0x17bdx22){return (_0x17bdx22[_0xb020[81]]==_0x17bdx21[_0xb020[81]])});if(_0x17bdx25&&_0x17bdx25[_0xb020[77]]>0){_0x17bdx23[_0xb020[78]](0,1);_0x17bdx25[_0xb020[38]](function(_0x17bdx22,_0x17bdx26){_0x17bdx23[_0xb020[82]]({app:_0xb020[79],appdata:_0x17bdx22[_0xb020[73]]+_0xb020[80],IntervalId:_0x17bdx22[_0xb020[54]],isInterval:true,interval:_0x17bdx22[_0xb020[73]]})});};_0x17bdx1e=veUtil[_0xb020[83]](_0x17bdx23,_0x17bdx21,_0x17bdx24,_0x17bdx25||[],_0x17bdx1e);_0x17bdx1f[_0xb020[37]](VoiceExtension[_0xb020[84]](_0x17bdx23,{transaction:_0x17bdx1d}));});console[_0xb020[90]](_0xb020[101]);return _0x17bdx1f;})[_0xb020[61]]()})[_0xb020[15]](function(){return _0x17bdxb[_0xb020[56]](201)})[_0xb020[12]](function(_0x17bdxc){console[_0xb020[90]](_0x17bdxc);return handleError(_0x17bdxb,_0x17bdxc);});};exports[_0xb020[86]]=function(_0x17bdxa,_0x17bdxb,_0x17bdxe){VoiceExtension[_0xb020[57]](_0x17bdxa[_0xb020[26]][_0xb020[54]])[_0xb020[15]](function(_0x17bdx1b){if(!_0x17bdx1b){return _0x17bdxb[_0xb020[56]](404)};if(!_0x17bdx1b[_0xb020[89]]){destroyVoiceExtension(_0x17bdx1b,_0x17bdxb)}else {destroyVoiceApplication(_0x17bdx1b,_0x17bdxa,_0x17bdxb)};})};function destroyVoiceExtension(_0x17bdx1b,_0x17bdxb){return sequelize[_0xb020[87]](function(_0x17bdx1d){return _0x17bdx1b[_0xb020[86]]()})[_0xb020[15]](function(){return _0x17bdxb[_0xb020[56]](204)})[_0xb020[12]](function(_0x17bdxc){return handleError(_0x17bdxb,_0x17bdxc)})}function destroyVoiceApplication(_0x17bdx1b,_0x17bdxa,_0x17bdxb){var _0x17bdx1c;var _0x17bdx38;var _0x17bdx39;return sequelize[_0xb020[87]](function(_0x17bdx1d){return VoiceExtension[_0xb020[16]]({where:{appGroup:_0x17bdx1b[_0xb020[62]]}})[_0xb020[15]](function(_0x17bdxd){if(!_0x17bdxd){return _0x17bdxb[_0xb020[56]](404)};_0x17bdx38=_0x17bdxd;return VoiceExtension[_0xb020[86]]({where:{appGroup:_0x17bdx1b[_0xb020[62]]}},{transaction:_0x17bdx1d});})[_0xb020[15]](function(_0x17bdx3b){_0x17bdx39=_0x17bdx3b;return VoiceExtension[_0xb020[16]]({where:{VoiceExtensionId:_0x17bdx1b[_0xb020[89]],priority:{$gt:_0x17bdx38[_0x17bdx39-1][_0xb020[93]]}}});})[_0xb020[15]](function(_0x17bdx27){_0x17bdx1c=_0x17bdx27;return VoiceExtension[_0xb020[86]]({where:{VoiceExtensionId:_0x17bdx1b[_0xb020[89]],priority:{$gt:_0x17bdx38[_0x17bdx39-1][_0xb020[93]]}}},{transaction:_0x17bdx1d});})[_0xb020[15]](function(){var _0x17bdx3a=_[_0xb020[92]](_[_0xb020[76]](_[_0xb020[92]](_0x17bdx1c,_0xb020[91]),function(_0x17bdx22){return _0x17bdx22[_0xb020[63]]===true}),_0xb020[62]);var _0x17bdx1e=_0x17bdx38[0][_0xb020[93]];var _0x17bdx1f=[];_0x17bdx3a[_0xb020[38]](function(_0x17bdx20){var _0x17bdx21=_[_0xb020[64]](_0x17bdx1c,function(_0x17bdx22){return (_0x17bdx22[_0xb020[62]]==_0x17bdx20&&_0x17bdx22[_0xb020[63]]===true)});var _0x17bdx23=_[_0xb020[65]](Applications[_0x17bdx21[_0xb020[20]]]);if(!_0x17bdx23||_0x17bdx21[_0xb020[66]]){_0x17bdx23=[{app:_0xb020[67],appdata:_0xb020[68]},{app:_0xb020[69],appdata:_0xb020[70],isApp:true},{app:_0xb020[27],appdata:_0xb020[71]}]};var _0x17bdx24=util[_0xb020[33]](_0xb020[72],_0x17bdx21[_0xb020[18]],_0x17bdx21[_0xb020[19]],_0x17bdx1e);_0x17bdx21[_0xb020[73]]=_0x17bdx21[_0xb020[73]]||_0xb020[74];var _0x17bdx25=_[_0xb020[76]](_0x17bdx1c,function(_0x17bdx22){return (_0x17bdx22[_0xb020[62]]==_0x17bdx20&&_0x17bdx22[_0xb020[75]]===true)});if(_0x17bdx25&&_0x17bdx25[_0xb020[77]]>0){_0x17bdx23[_0xb020[78]](0,1);_0x17bdx25[_0xb020[38]](function(_0x17bdx22,_0x17bdx26){_0x17bdx23[_0xb020[82]]({app:_0xb020[79],appdata:_0x17bdx22[_0xb020[73]]+_0xb020[80],IntervalId:_0x17bdx22[_0xb020[81]]?_0x17bdx22[_0xb020[81]]:null,isInterval:true,interval:_0x17bdx22[_0xb020[73]]})});};_0x17bdx1e=veUtil[_0xb020[83]](_0x17bdx23,_0x17bdx21,_0x17bdx24,_0x17bdx25||[],_0x17bdx1e);_0x17bdx1f[_0xb020[37]](VoiceExtension[_0xb020[84]](_0x17bdx23,{transaction:_0x17bdx1d}));});return _0x17bdx1f;})[_0xb020[61]]()})[_0xb020[15]](function(_0x17bdx17){_0x17bdxb[_0xb020[56]](201)})[_0xb020[12]](function(_0x17bdxc){console[_0xb020[90]](_0x17bdxc);return handleError(_0x17bdxb,_0x17bdxc);});}exports[_0xb020[102]]=function(_0x17bdxa,_0x17bdxb){VoiceExtension[_0xb020[86]]({where:{id:_0x17bdxa[_0xb020[23]][_0xb020[54]]},individualHooks:true})[_0xb020[15]](function(){return _0x17bdxb[_0xb020[56]](204)})[_0xb020[12]](function(_0x17bdxc){return handleError(_0x17bdxb,_0x17bdxc)})};function handleError(_0x17bdxb,_0x17bdxc){return _0x17bdxb[_0xb020[14]](500)[_0xb020[13]](_0x17bdxc)}
\ No newline at end of file
+var _0x4ea8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x75\x74\x65\x73","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x63\x72\x65\x61\x74\x65","\x65\x72\x72","\x6D\x65\x73\x73\x61\x67\x65","\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x63\x6F\x6E\x74\x65\x78\x74\x20\x63\x6F\x6D\x62\x69\x6E\x61\x74\x69\x6F\x6E\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x52\x4F\x55\x54\x45","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x73","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x72\x6F\x75\x74\x65\x55\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64\x42\x79\x49\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x4ea8[0];var _=require(_0x4ea8[1]);var VoiceExtension=require(_0x4ea8[3])[_0x4ea8[2]];var Interval=require(_0x4ea8[3])[_0x4ea8[4]];var sequelize=require(_0x4ea8[3])[_0x4ea8[5]];var Sequelize=require(_0x4ea8[3])[_0x4ea8[6]];var util=require(_0x4ea8[7]);var async=require(_0x4ea8[8]);var veUtil=require(_0x4ea8[9]);var Util=require(_0x4ea8[10]);var Applications=veUtil[_0x4ea8[11]];exports[_0x4ea8[12]]= function(_0x2197xb,_0x2197xc,_0x2197xd){return VoiceExtension[_0x4ea8[23]](_0x4ea8[21],_0x4ea8[22])[_0x4ea8[20]](Util[_0x4ea8[19]](_0x2197xb[_0x4ea8[18]]))[_0x4ea8[17]](function(_0x2197xf){_0x2197xc[_0x4ea8[16]](200)[_0x4ea8[15]](_0x2197xf)})[_0x4ea8[14]](function(_0x2197xe){console[_0x4ea8[13]](_0x2197xe);return handleError(_0x2197xc,_0x2197xe)})};exports[_0x4ea8[24]]= function(_0x2197xb,_0x2197xc){return VoiceExtension[_0x4ea8[23]](_0x4ea8[22])[_0x4ea8[28]]({where:{id:_0x2197xb[_0x4ea8[27]][_0x4ea8[26]],VoiceExtensionId:null}})[_0x4ea8[17]](function(_0x2197x10){if(!_0x2197x10){return _0x2197xc[_0x4ea8[25]](404)};return _0x2197xc[_0x4ea8[15]](_0x2197x10)})[_0x4ea8[14]](function(_0x2197xe){return handleError(_0x2197xc,_0x2197xe)})};exports[_0x4ea8[29]]= function(_0x2197xb,_0x2197xc){var _0x2197x11;return sequelize[_0x4ea8[39]](function(_0x2197x12){return VoiceExtension[_0x4ea8[29]](_0x2197xb[_0x4ea8[35]],{transaction:_0x2197x12})[_0x4ea8[17]](function(_0x2197x13){_0x2197x11= _0x2197x13;if(_0x2197xb[_0x4ea8[35]][_0x4ea8[11]]&& Array[_0x4ea8[37]](_0x2197xb[_0x4ea8[35]].Applications)&& _0x2197xb[_0x4ea8[35]][_0x4ea8[11]][_0x4ea8[38]]){return _0x2197x13}})[_0x4ea8[17]](veUtil[_0x4ea8[36]](_0x2197xb[_0x4ea8[35]].Applications,_0x2197x12,_0x2197xc))})[_0x4ea8[17]](function(){return _0x2197xc[_0x4ea8[16]](201)[_0x4ea8[15]](_0x2197x11)})[_0x4ea8[14]](sequelize.UniqueConstraintError,function(_0x2197xe){_0x2197xe[_0x4ea8[31]]= _0x4ea8[32];_0x2197xe[_0x4ea8[33]]= _0x4ea8[34];return handleError(_0x2197xc,_0x2197xe)})[_0x4ea8[14]](sequelize.ValidationError,function(_0x2197xe){_0x2197xe[_0x4ea8[31]]= _0x4ea8[32];_0x2197xe[_0x4ea8[33]]= _0x4ea8[34];return handleError(_0x2197xc,_0x2197xe)})[_0x4ea8[14]](function(_0x2197xe){console[_0x4ea8[13]](_0x4ea8[30],_0x2197xe);return handleError(_0x2197xc,_0x2197xe)})};exports[_0x4ea8[40]]= function(_0x2197xb,_0x2197xc){return sequelize[_0x4ea8[39]](function(_0x2197x12){return veUtil[_0x4ea8[41]](_0x2197xb,_0x2197x12)})[_0x4ea8[17]](function(){return _0x2197xc[_0x4ea8[25]](200)})[_0x4ea8[14]](sequelize.UniqueConstraintError,function(_0x2197xe){_0x2197xe[_0x4ea8[31]]= _0x4ea8[32];_0x2197xe[_0x4ea8[33]]= _0x4ea8[34];console[_0x4ea8[13]](_0x2197xe);return handleError(_0x2197xc,_0x2197xe)})[_0x4ea8[14]](function(_0x2197xe){console[_0x4ea8[13]](_0x2197xe);return handleError(_0x2197xc,_0x2197xe)})};exports[_0x4ea8[42]]= function(_0x2197xb,_0x2197xc,_0x2197xd){return sequelize[_0x4ea8[39]](function(_0x2197x12){return VoiceExtension[_0x4ea8[43]](_0x2197xb[_0x4ea8[27]][_0x4ea8[26]])[_0x4ea8[17]](function(_0x2197x10){if(!_0x2197x10){return _0x2197xc[_0x4ea8[25]](404)};return _0x2197x10[_0x4ea8[42]]()})})[_0x4ea8[17]](function(){return _0x2197xc[_0x4ea8[25]](204)})[_0x4ea8[14]](function(_0x2197xe){console[_0x4ea8[13]](_0x2197xe);return handleError(_0x2197xc,_0x2197xe)})};exports[_0x4ea8[44]]= function(_0x2197xb,_0x2197xc){return VoiceExtension[_0x4ea8[42]]({where:{id:_0x2197xb[_0x4ea8[18]][_0x4ea8[45]]},individualHooks:true})[_0x4ea8[17]](function(){return _0x2197xc[_0x4ea8[25]](204)})[_0x4ea8[14]](function(_0x2197xe){return handleError(_0x2197xc,_0x2197xe)})};function handleError(_0x2197xc,_0x2197xe){return _0x2197xc[_0x4ea8[16]](500)[_0x4ea8[15]](_0x2197xe)}
\ No newline at end of file