Built motion from commit fc731d1ea.|1.0.23
[motion.git] / server / utils / voice_extension.js
index b451a64..565ae67 100644 (file)
@@ -1 +1 @@
-var _0x5e71=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\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","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x70\x70","\x61\x67\x69","\x66\x69\x6E\x64","\x56\x4F\x4C\x55\x4D\x45\x28\x52\x58\x29\x3D\x30","\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","\x6E\x61\x6D\x65","\x4E\x6F\x4F\x50","\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","\x64\x69\x61\x6C","\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\x62\x6F\x75\x6E\x64\x20\x52\x6F\x75\x74\x65\x20\x49\x64\x20\x53\x65\x74","\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","\x61\x70\x70\x54\x79\x70\x65","\x63\x75\x73\x74\x6F\x6D","\x61\x6E\x73\x77\x65\x72","\x50\x72\x6F\x67\x72\x65\x73\x73","\x53\x6B\x69\x70\x70\x65\x64\x20\x50\x72\x6F\x67\x72\x65\x73\x73","\x70\x6C\x61\x79\x62\x61\x63\x6B","\x41\x6E\x73\x77\x65\x72","\x53\x6B\x69\x70\x70\x65\x64\x20\x41\x6E\x73\x77\x65\x72","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x69\x61\x6C","\x78","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x58","\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"];_0x5e71[0];var _=require(_0x5e71[1]);var util=require(_0x5e71[2]);var Interval=require(_0x5e71[4])[_0x5e71[3]];var sequelize=require(_0x5e71[4])[_0x5e71[5]];var VoiceExtension=require(_0x5e71[4])[_0x5e71[6]];exports[_0x5e71[7]]= createApplications;exports[_0x5e71[8]]= function(_0x546ax6,_0x546ax7){var sequelize=require(_0x5e71[4])[_0x5e71[5]];var VoiceExtension=require(_0x5e71[4])[_0x5e71[6]];if(_0x546ax6[_0x5e71[10]][_0x5e71[9]]){delete _0x546ax6[_0x5e71[10]][_0x5e71[9]]};return VoiceExtension[_0x5e71[17]](_0x546ax6[_0x5e71[10]],{where:{id:_0x546ax6[_0x5e71[15]][_0x5e71[9]]},transaction:_0x546ax7})[_0x5e71[11]](function(_0x546ax8){if(_0x546ax6[_0x5e71[10]][_0x5e71[12]]){_0x546ax6[_0x5e71[10]][_0x5e71[9]]= _0x546ax6[_0x5e71[15]][_0x5e71[9]];return VoiceExtension[_0x5e71[16]]({where:{VoiceExtensionId:_0x546ax6[_0x5e71[15]][_0x5e71[9]]},transaction:_0x546ax7})}})[_0x5e71[11]](function(){if(_0x546ax6[_0x5e71[10]][_0x5e71[12]]&& Array[_0x5e71[13]](_0x546ax6[_0x5e71[10]].Applications)&& _0x546ax6[_0x5e71[10]][_0x5e71[12]][_0x5e71[14]]){return _0x546ax6[_0x5e71[10]]}})[_0x5e71[11]](createApplications(_0x546ax6[_0x5e71[10]].Applications,_0x546ax7))};function createApplications(_0x546axa,_0x546ax7){var Interval=require(_0x5e71[4])[_0x5e71[3]];var VoiceExtension=require(_0x5e71[4])[_0x5e71[6]];return function(_0x546ax8){if(_0x546ax8){return Interval[_0x5e71[89]]()[_0x5e71[11]](function(_0x546axb){var _0x546axc=false;var _0x546axd=false;var _0x546axe=2;var _0x546axf={exten:_0x546ax8[_0x5e71[19]],type:_0x546ax8[_0x5e71[20]],context:_0x546ax8[_0x5e71[21]],VoiceExtensionId:_0x546ax8[_0x5e71[9]]};var _0x546ax10=[];var _0x546ax11=8;var _0x546ax12=[],_0x546ax13=[];_0x546ax12[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[22],appdata:util[_0x5e71[24]](_0x5e71[23],_0x546ax8[_0x5e71[20]]),priority:_0x546axe},_0x546axf));_0x546axe++;if(_0x546ax8[_0x5e71[20]]=== _0x5e71[27]){_0x546ax12[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[22],appdata:util[_0x5e71[24]](_0x5e71[28],_0x546ax8[_0x5e71[29]]|| _0x5e71[30]),priority:_0x546axe},_0x546axf));_0x546axe++};var _0x546ax14=_[_0x5e71[34]](_0x546axa,function(_0x546ax15){return _0x546ax15[_0x5e71[32]][_0x5e71[31]]()=== _0x5e71[33]});if(_0x546ax14){_0x546ax12[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[22],appdata:_0x5e71[35],priority:_0x546axe},_0x546axf));_0x546axe++};_0x546ax10[_0x5e71[26]](VoiceExtension[_0x5e71[36]](_0x546ax12,{transaction:_0x546ax7}));_0x546axa[_0x5e71[47]](function(_0x546ax15){var _0x546ax16=[];var _0x546ax17=[];if(_0x546ax15[_0x5e71[37]]){var _0x546ax18=_[_0x5e71[38]](_0x546axb,{IntervalId:_0x546ax15[_0x5e71[37]]});_0x546ax16= _0x546ax18[_0x5e71[14]]?_[_0x5e71[40]](_0x546ax18,_0x5e71[39]):[_0x5e71[41]];var _0x546ax19=_[_0x5e71[34]](_0x546axb,{id:_0x546ax15[_0x5e71[37]]});_0x546ax15[_0x5e71[39]]= _0x546ax19?_0x546ax19[_0x5e71[42]]:_0x5e71[41]}else {_0x546ax16= [_0x546ax15[_0x5e71[39]]]};_0x546ax17[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[43],appdata:_0x546ax15[_0x5e71[32]]+ _0x5e71[44],priority:_0x546axe},_0x546axf));_0x546axe++;var _0x546ax1a=_0x546ax16[_0x5e71[14]];_0x546ax16[_0x5e71[47]](function(_0x546ax1b,_0x546ax1c){_0x546ax17[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[45],appdata:util[_0x5e71[24]](_0x5e71[46],_0x546ax1b,_0x546ax8[_0x5e71[21]],_0x546axe+ (_0x546ax1a- _0x546ax1c),_0x546ax8[_0x5e71[21]],((_0x546ax1c+ 1)< _0x546ax1a)?_0x546axe+ 1:_0x546axe+ _0x546ax11),priority:_0x546axe},_0x546axf));_0x546axe++});if(_0x546ax15[_0x5e71[32]][_0x5e71[31]]()=== _0x5e71[48]&& _0x546ax8[_0x5e71[20]]=== _0x5e71[27]){_0x546ax17[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[22],appdata:util[_0x5e71[24]](_0x5e71[49],_0x546ax8[_0x5e71[9]]|| _0x5e71[50]),priority:_0x546axe},_0x546axf))}else {_0x546ax17[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[43],appdata:_0x5e71[51],priority:_0x546axe},_0x546axf))};_0x546axe++;if(_0x546ax15[_0x5e71[32]][_0x5e71[31]]()=== _0x5e71[48]&& _0x546ax8[_0x5e71[20]]=== _0x5e71[27]&& _0x546ax15[_0x5e71[52]][1]){_0x546ax17[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[22],appdata:util[_0x5e71[24]](_0x5e71[53],_0x546ax15[_0x5e71[52]][1]),priority:_0x546axe},_0x546axf))}else {_0x546ax17[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[43],appdata:_0x5e71[54],priority:_0x546axe},_0x546axf))};_0x546axe++;if(_0x546ax15[_0x5e71[32]][_0x5e71[31]]()=== _0x5e71[48]&& _0x546ax8[_0x5e71[55]]&& _0x546ax8[_0x5e71[20]]=== _0x5e71[27]){_0x546ax17[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[56],appdata:_0x5e71[57]+ (_0x546ax8[_0x5e71[58]]|| _0x5e71[59])+ _0x5e71[60],priority:_0x546axe},_0x546axf))}else {_0x546ax17[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[43],appdata:_0x5e71[61],priority:_0x546axe},_0x546axf))};_0x546axe++;if(_0x546ax15[_0x5e71[32]][_0x5e71[31]]()=== _0x5e71[62]&& _0x546ax15[_0x5e71[63]]!== _0x5e71[64]&&  !_0x546ax15[_0x5e71[65]]&&  !_0x546axd&&  !_0x546axc){_0x546ax17[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[66],appdata:_0x5e71[50],priority:_0x546axe},_0x546axf));_0x546axd= true}else {_0x546ax17[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[43],appdata:_0x5e71[67],priority:_0x546axe},_0x546axf))};_0x546axe++;if((_0x546ax15[_0x5e71[32]][_0x5e71[31]]()=== _0x5e71[62]|| _0x546ax15[_0x5e71[32]][_0x5e71[31]]()=== _0x5e71[68])&& _0x546ax15[_0x5e71[63]]!== _0x5e71[64]&& _0x546ax15[_0x5e71[65]]&&  !_0x546axc){_0x546ax17[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[69],appdata:_0x5e71[50],priority:_0x546axe},_0x546axf));_0x546axc= true;_0x546axd= true}else {_0x546ax17[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[43],appdata:_0x5e71[70],priority:_0x546axe},_0x546axf))};_0x546axe++;if(_0x546ax15[_0x5e71[32]][_0x5e71[31]]()=== _0x5e71[48]&& _0x546ax15[_0x5e71[63]]=== _0x5e71[71]){_0x546ax15[_0x5e71[52]][4]= _0x546ax15[_0x5e71[52]][4]|| _0x5e71[50];_0x546ax15[_0x5e71[52]][4]+= (_[_0x5e71[73]](_0x546ax15[_0x5e71[52]][4],_0x5e71[72])?_0x5e71[50]:_0x5e71[72])+ (_[_0x5e71[73]](_0x546ax15[_0x5e71[52]][4],_0x5e71[74])?_0x5e71[50]:_0x5e71[74]);_0x546ax17[_0x5e71[26]](_[_0x5e71[25]]({app:_0x546ax15[_0x5e71[32]],appdata:util[_0x5e71[24]](_0x5e71[75],_0x546ax15[_0x5e71[52]][0],_0x546ax15[_0x5e71[52]][2]|| _0x5e71[50],_0x546ax8[_0x5e71[76]]|| 0,_0x546ax15[_0x5e71[52]][3]|| _0x5e71[50],_0x546ax15[_0x5e71[52]][4]|| _0x5e71[50],_0x546ax15[_0x5e71[52]][5]|| _0x5e71[50]),priority:_0x546axe,IntervalId:_0x546ax15[_0x5e71[37]]|| null,interval:_0x546ax15[_0x5e71[39]]|| _0x5e71[41],isApp:true,callerID:_0x546ax15[_0x5e71[52]][1]|| null,appType:_0x546ax15[_0x5e71[63]]},_0x546axf))}else {if(_0x546ax15[_0x5e71[32]][_0x5e71[31]]()=== _0x5e71[48]&& _0x546ax15[_0x5e71[63]]=== _0x5e71[77]){_0x546ax15[_0x5e71[52]][3]= _0x546ax15[_0x5e71[52]][3]|| _0x5e71[50];_0x546ax15[_0x5e71[52]][3]+= (_[_0x5e71[73]](_0x546ax15[_0x5e71[52]][3],_0x5e71[72])?_0x5e71[50]:_0x5e71[72])+ (_[_0x5e71[73]](_0x546ax15[_0x5e71[52]][3],_0x5e71[74])?_0x5e71[50]:_0x5e71[74]);_0x546ax17[_0x5e71[26]](_[_0x5e71[25]]({app:_0x546ax15[_0x5e71[32]],appdata:util[_0x5e71[24]](_0x5e71[78],_0x546ax15[_0x5e71[52]][0],_0x546ax15[_0x5e71[52]][1],_0x546ax15[_0x5e71[52]][2]|| _0x5e71[50],_0x546ax15[_0x5e71[52]][3]|| _0x5e71[50],_0x546ax15[_0x5e71[52]][4]|| _0x5e71[50]),priority:_0x546axe,IntervalId:_0x546ax15[_0x5e71[37]]|| null,interval:_0x546ax15[_0x5e71[39]]|| _0x5e71[41],isApp:true,appType:_0x546ax15[_0x5e71[63]]},_0x546axf))}else {if(_0x546ax15[_0x5e71[32]][_0x5e71[31]]()=== _0x5e71[48]&& _0x546ax15[_0x5e71[63]]=== _0x5e71[79]){_0x546ax15[_0x5e71[52]][2]= _0x546ax15[_0x5e71[52]][2]|| _0x5e71[50];_0x546ax15[_0x5e71[52]][2]+= (_[_0x5e71[73]](_0x546ax15[_0x5e71[52]][2],_0x5e71[72])?_0x5e71[50]:_0x5e71[72])+ (_[_0x5e71[73]](_0x546ax15[_0x5e71[52]][2],_0x5e71[74])?_0x5e71[50]:_0x5e71[74]);_0x546ax17[_0x5e71[26]](_[_0x5e71[25]]({app:_0x546ax15[_0x5e71[32]],appdata:util[_0x5e71[24]](_0x5e71[80],_0x546ax15[_0x5e71[52]][0],_0x546ax15[_0x5e71[52]][1]|| _0x5e71[50],_0x546ax15[_0x5e71[52]][2]|| _0x5e71[50],_0x546ax15[_0x5e71[52]][3]|| _0x5e71[50]),priority:_0x546axe,IntervalId:_0x546ax15[_0x5e71[37]]|| null,interval:_0x546ax15[_0x5e71[39]]|| _0x5e71[41],isApp:true,appType:_0x546ax15[_0x5e71[63]]},_0x546axf))}else {if((_0x546ax15[_0x5e71[32]][_0x5e71[31]]()=== _0x5e71[48]|| _0x546ax15[_0x5e71[32]][_0x5e71[31]]()=== _0x5e71[62])&& _0x546ax15[_0x5e71[63]]!== _0x5e71[64]){var _0x546ax1d=_0x546ax15[_0x5e71[32]][_0x5e71[31]]()=== _0x5e71[48]?2:1;_0x546ax15[_0x5e71[52]][_0x546ax1d]= _0x546ax15[_0x5e71[52]][_0x546ax1d]|| _0x5e71[50];_0x546ax15[_0x5e71[52]][_0x546ax1d]+= (_[_0x5e71[73]](_0x546ax15[_0x5e71[52]][_0x546ax1d],_0x5e71[72])?_0x5e71[50]:_0x5e71[72])+ (_[_0x5e71[73]](_0x546ax15[_0x5e71[52]][_0x546ax1d],_0x5e71[74])?_0x5e71[50]:_0x5e71[74])};_0x546ax17[_0x5e71[26]](_[_0x5e71[25]]({app:_0x546ax15[_0x5e71[32]],appdata:_0x546ax15[_0x5e71[52]][_0x5e71[82]](_0x5e71[81]),priority:_0x546axe,IntervalId:_0x546ax15[_0x5e71[37]],interval:_0x546ax15[_0x5e71[39]]|| _0x5e71[41],isApp:true,appType:_0x546ax15[_0x5e71[63]]|| null,answer:_0x546ax15[_0x5e71[65]]|| false},_0x546axf))}}};_0x546axe++;if(_0x546ax15[_0x5e71[32]][_0x5e71[31]]()=== _0x5e71[48]&& _0x546ax8[_0x5e71[55]]&& _0x546ax8[_0x5e71[20]]=== _0x5e71[27]){_0x546ax17[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[83],appdata:_0x5e71[50],priority:_0x546axe},_0x546axf))}else {_0x546ax17[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[43],appdata:_0x5e71[84],priority:_0x546axe},_0x546axf))};_0x546axe++;_0x546ax17[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[43],appdata:_0x546ax15[_0x5e71[32]]+ _0x5e71[85],priority:_0x546axe},_0x546axf));_0x546axe++;_0x546ax10[_0x5e71[26]](VoiceExtension[_0x5e71[36]](_0x546ax17,{transaction:_0x546ax7}))});_0x546ax13[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[43],appdata:_0x546ax8[_0x5e71[20]]+ _0x5e71[86],priority:_0x546axe},_0x546axf));_0x546axe++;if(_0x546ax8[_0x5e71[20]]=== _0x5e71[87]|| _0x546ax8[_0x5e71[20]]=== _0x5e71[27]){_0x546ax13[_0x5e71[26]](_[_0x5e71[25]]({app:_0x5e71[88],appdata:_0x5e71[50],priority:_0x546axe},_0x546axf));_0x546axe++};_0x546ax10[_0x5e71[26]](VoiceExtension[_0x5e71[36]](_0x546ax13,{transaction:_0x546ax7}));return _0x546ax10})[_0x5e71[18]]()}}}
\ No newline at end of file
+var _0xf049=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\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","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x70\x70","\x61\x67\x69","\x66\x69\x6E\x64","\x56\x4F\x4C\x55\x4D\x45\x28\x52\x58\x29\x3D\x30","\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","\x6E\x61\x6D\x65","\x4E\x6F\x4F\x50","\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","\x64\x69\x61\x6C","\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\x62\x6F\x75\x6E\x64\x20\x52\x6F\x75\x74\x65\x20\x49\x64\x20\x53\x65\x74","\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","\x61\x70\x70\x54\x79\x70\x65","\x63\x75\x73\x74\x6F\x6D","\x61\x6E\x73\x77\x65\x72","\x50\x72\x6F\x67\x72\x65\x73\x73","\x53\x6B\x69\x70\x70\x65\x64\x20\x50\x72\x6F\x67\x72\x65\x73\x73","\x70\x6C\x61\x79\x62\x61\x63\x6B","\x41\x6E\x73\x77\x65\x72","\x53\x6B\x69\x70\x70\x65\x64\x20\x41\x6E\x73\x77\x65\x72","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x69\x61\x6C","\x78","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x58","\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"];_0xf049[0];var _=require(_0xf049[1]);var util=require(_0xf049[2]);var Interval=require(_0xf049[4])[_0xf049[3]];var sequelize=require(_0xf049[4])[_0xf049[5]];var VoiceExtension=require(_0xf049[4])[_0xf049[6]];exports[_0xf049[7]]= createApplications;exports[_0xf049[8]]= function(_0x7acdx6,_0x7acdx7){var sequelize=require(_0xf049[4])[_0xf049[5]];var VoiceExtension=require(_0xf049[4])[_0xf049[6]];if(_0x7acdx6[_0xf049[10]][_0xf049[9]]){delete _0x7acdx6[_0xf049[10]][_0xf049[9]]};return VoiceExtension[_0xf049[17]](_0x7acdx6[_0xf049[10]],{where:{id:_0x7acdx6[_0xf049[15]][_0xf049[9]]},transaction:_0x7acdx7})[_0xf049[11]](function(_0x7acdx8){if(_0x7acdx6[_0xf049[10]][_0xf049[12]]){_0x7acdx6[_0xf049[10]][_0xf049[9]]= _0x7acdx6[_0xf049[15]][_0xf049[9]];return VoiceExtension[_0xf049[16]]({where:{VoiceExtensionId:_0x7acdx6[_0xf049[15]][_0xf049[9]]},transaction:_0x7acdx7})}})[_0xf049[11]](function(){if(_0x7acdx6[_0xf049[10]][_0xf049[12]]&& Array[_0xf049[13]](_0x7acdx6[_0xf049[10]].Applications)&& _0x7acdx6[_0xf049[10]][_0xf049[12]][_0xf049[14]]){return _0x7acdx6[_0xf049[10]]}})[_0xf049[11]](createApplications(_0x7acdx6[_0xf049[10]].Applications,_0x7acdx7))};function createApplications(_0x7acdxa,_0x7acdx7){var Interval=require(_0xf049[4])[_0xf049[3]];var VoiceExtension=require(_0xf049[4])[_0xf049[6]];return function(_0x7acdx8){if(_0x7acdx8){return Interval[_0xf049[89]]()[_0xf049[11]](function(_0x7acdxb){var _0x7acdxc=false;var _0x7acdxd=false;var _0x7acdxe=2;var _0x7acdxf={exten:_0x7acdx8[_0xf049[19]],type:_0x7acdx8[_0xf049[20]],context:_0x7acdx8[_0xf049[21]],VoiceExtensionId:_0x7acdx8[_0xf049[9]]};var _0x7acdx10=[];var _0x7acdx11=8;var _0x7acdx12=[],_0x7acdx13=[];_0x7acdx12[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[22],appdata:util[_0xf049[24]](_0xf049[23],_0x7acdx8[_0xf049[20]]),priority:_0x7acdxe},_0x7acdxf));_0x7acdxe++;if(_0x7acdx8[_0xf049[20]]=== _0xf049[27]){_0x7acdx12[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[22],appdata:util[_0xf049[24]](_0xf049[28],_0x7acdx8[_0xf049[29]]|| _0xf049[30]),priority:_0x7acdxe},_0x7acdxf));_0x7acdxe++};var _0x7acdx14=_[_0xf049[34]](_0x7acdxa,function(_0x7acdx15){return _0x7acdx15[_0xf049[32]][_0xf049[31]]()=== _0xf049[33]});if(_0x7acdx14){_0x7acdx12[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[22],appdata:_0xf049[35],priority:_0x7acdxe},_0x7acdxf));_0x7acdxe++};_0x7acdx10[_0xf049[26]](VoiceExtension[_0xf049[36]](_0x7acdx12,{transaction:_0x7acdx7}));_0x7acdxa[_0xf049[47]](function(_0x7acdx15){var _0x7acdx16=[];var _0x7acdx17=[];if(_0x7acdx15[_0xf049[37]]){var _0x7acdx18=_[_0xf049[38]](_0x7acdxb,{IntervalId:_0x7acdx15[_0xf049[37]]});_0x7acdx16= _0x7acdx18[_0xf049[14]]?_[_0xf049[40]](_0x7acdx18,_0xf049[39]):[_0xf049[41]];var _0x7acdx19=_[_0xf049[34]](_0x7acdxb,{id:_0x7acdx15[_0xf049[37]]});_0x7acdx15[_0xf049[39]]= _0x7acdx19?_0x7acdx19[_0xf049[42]]:_0xf049[41]}else {_0x7acdx16= [_0x7acdx15[_0xf049[39]]]};_0x7acdx17[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[43],appdata:_0x7acdx15[_0xf049[32]]+ _0xf049[44],priority:_0x7acdxe},_0x7acdxf));_0x7acdxe++;var _0x7acdx1a=_0x7acdx16[_0xf049[14]];_0x7acdx16[_0xf049[47]](function(_0x7acdx1b,_0x7acdx1c){_0x7acdx17[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[45],appdata:util[_0xf049[24]](_0xf049[46],_0x7acdx1b,_0x7acdx8[_0xf049[21]],_0x7acdxe+ (_0x7acdx1a- _0x7acdx1c),_0x7acdx8[_0xf049[21]],((_0x7acdx1c+ 1)< _0x7acdx1a)?_0x7acdxe+ 1:_0x7acdxe+ _0x7acdx11),priority:_0x7acdxe},_0x7acdxf));_0x7acdxe++});if(_0x7acdx15[_0xf049[32]][_0xf049[31]]()=== _0xf049[48]&& _0x7acdx8[_0xf049[20]]=== _0xf049[27]){_0x7acdx17[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[22],appdata:util[_0xf049[24]](_0xf049[49],_0x7acdx8[_0xf049[9]]|| _0xf049[50]),priority:_0x7acdxe},_0x7acdxf))}else {_0x7acdx17[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[43],appdata:_0xf049[51],priority:_0x7acdxe},_0x7acdxf))};_0x7acdxe++;if(_0x7acdx15[_0xf049[32]][_0xf049[31]]()=== _0xf049[48]&& _0x7acdx8[_0xf049[20]]=== _0xf049[27]&& _0x7acdx15[_0xf049[52]][1]){_0x7acdx17[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[22],appdata:util[_0xf049[24]](_0xf049[53],_0x7acdx15[_0xf049[52]][1]),priority:_0x7acdxe},_0x7acdxf))}else {_0x7acdx17[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[43],appdata:_0xf049[54],priority:_0x7acdxe},_0x7acdxf))};_0x7acdxe++;if(_0x7acdx15[_0xf049[32]][_0xf049[31]]()=== _0xf049[48]&& _0x7acdx8[_0xf049[55]]&& _0x7acdx8[_0xf049[20]]=== _0xf049[27]){_0x7acdx17[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[56],appdata:_0xf049[57]+ (_0x7acdx8[_0xf049[58]]|| _0xf049[59])+ _0xf049[60],priority:_0x7acdxe},_0x7acdxf))}else {_0x7acdx17[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[43],appdata:_0xf049[61],priority:_0x7acdxe},_0x7acdxf))};_0x7acdxe++;if(_0x7acdx15[_0xf049[32]][_0xf049[31]]()=== _0xf049[62]&& _0x7acdx15[_0xf049[63]]!== _0xf049[64]&&  !_0x7acdx15[_0xf049[65]]&&  !_0x7acdxd&&  !_0x7acdxc){_0x7acdx17[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[66],appdata:_0xf049[50],priority:_0x7acdxe},_0x7acdxf));_0x7acdxd= true}else {_0x7acdx17[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[43],appdata:_0xf049[67],priority:_0x7acdxe},_0x7acdxf))};_0x7acdxe++;if((_0x7acdx15[_0xf049[32]][_0xf049[31]]()=== _0xf049[62]|| _0x7acdx15[_0xf049[32]][_0xf049[31]]()=== _0xf049[68])&& _0x7acdx15[_0xf049[63]]!== _0xf049[64]&& _0x7acdx15[_0xf049[65]]&&  !_0x7acdxc){_0x7acdx17[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[69],appdata:_0xf049[50],priority:_0x7acdxe},_0x7acdxf));_0x7acdxc= true;_0x7acdxd= true}else {_0x7acdx17[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[43],appdata:_0xf049[70],priority:_0x7acdxe},_0x7acdxf))};_0x7acdxe++;if(_0x7acdx15[_0xf049[32]][_0xf049[31]]()=== _0xf049[48]&& _0x7acdx15[_0xf049[63]]=== _0xf049[71]){_0x7acdx15[_0xf049[52]][4]= _0x7acdx15[_0xf049[52]][4]|| _0xf049[50];_0x7acdx15[_0xf049[52]][4]+= (_[_0xf049[73]](_0x7acdx15[_0xf049[52]][4],_0xf049[72])?_0xf049[50]:_0xf049[72])+ (_[_0xf049[73]](_0x7acdx15[_0xf049[52]][4],_0xf049[74])?_0xf049[50]:_0xf049[74]);_0x7acdx17[_0xf049[26]](_[_0xf049[25]]({app:_0x7acdx15[_0xf049[32]],appdata:util[_0xf049[24]](_0xf049[75],_0x7acdx15[_0xf049[52]][0],_0x7acdx15[_0xf049[52]][2]|| _0xf049[50],_0x7acdx8[_0xf049[76]]|| 0,_0x7acdx15[_0xf049[52]][3]|| _0xf049[50],_0x7acdx15[_0xf049[52]][4]|| _0xf049[50],_0x7acdx15[_0xf049[52]][5]|| _0xf049[50]),priority:_0x7acdxe,IntervalId:_0x7acdx15[_0xf049[37]]|| null,interval:_0x7acdx15[_0xf049[39]]|| _0xf049[41],isApp:true,callerID:_0x7acdx15[_0xf049[52]][1]|| null,appType:_0x7acdx15[_0xf049[63]]},_0x7acdxf))}else {if(_0x7acdx15[_0xf049[32]][_0xf049[31]]()=== _0xf049[48]&& _0x7acdx15[_0xf049[63]]=== _0xf049[77]){_0x7acdx15[_0xf049[52]][3]= _0x7acdx15[_0xf049[52]][3]|| _0xf049[50];_0x7acdx15[_0xf049[52]][3]+= (_[_0xf049[73]](_0x7acdx15[_0xf049[52]][3],_0xf049[72])?_0xf049[50]:_0xf049[72])+ (_[_0xf049[73]](_0x7acdx15[_0xf049[52]][3],_0xf049[74])?_0xf049[50]:_0xf049[74]);_0x7acdx17[_0xf049[26]](_[_0xf049[25]]({app:_0x7acdx15[_0xf049[32]],appdata:util[_0xf049[24]](_0xf049[78],_0x7acdx15[_0xf049[52]][0],_0x7acdx15[_0xf049[52]][1],_0x7acdx15[_0xf049[52]][2]|| _0xf049[50],_0x7acdx15[_0xf049[52]][3]|| _0xf049[50],_0x7acdx15[_0xf049[52]][4]|| _0xf049[50]),priority:_0x7acdxe,IntervalId:_0x7acdx15[_0xf049[37]]|| null,interval:_0x7acdx15[_0xf049[39]]|| _0xf049[41],isApp:true,appType:_0x7acdx15[_0xf049[63]]},_0x7acdxf))}else {if(_0x7acdx15[_0xf049[32]][_0xf049[31]]()=== _0xf049[48]&& _0x7acdx15[_0xf049[63]]=== _0xf049[79]){_0x7acdx15[_0xf049[52]][2]= _0x7acdx15[_0xf049[52]][2]|| _0xf049[50];_0x7acdx15[_0xf049[52]][2]+= (_[_0xf049[73]](_0x7acdx15[_0xf049[52]][2],_0xf049[72])?_0xf049[50]:_0xf049[72])+ (_[_0xf049[73]](_0x7acdx15[_0xf049[52]][2],_0xf049[74])?_0xf049[50]:_0xf049[74]);_0x7acdx17[_0xf049[26]](_[_0xf049[25]]({app:_0x7acdx15[_0xf049[32]],appdata:util[_0xf049[24]](_0xf049[80],_0x7acdx15[_0xf049[52]][0],_0x7acdx15[_0xf049[52]][1]|| _0xf049[50],_0x7acdx15[_0xf049[52]][2]|| _0xf049[50],_0x7acdx15[_0xf049[52]][3]|| _0xf049[50]),priority:_0x7acdxe,IntervalId:_0x7acdx15[_0xf049[37]]|| null,interval:_0x7acdx15[_0xf049[39]]|| _0xf049[41],isApp:true,appType:_0x7acdx15[_0xf049[63]]},_0x7acdxf))}else {if((_0x7acdx15[_0xf049[32]][_0xf049[31]]()=== _0xf049[48]|| _0x7acdx15[_0xf049[32]][_0xf049[31]]()=== _0xf049[62])&& _0x7acdx15[_0xf049[63]]!== _0xf049[64]){var _0x7acdx1d=_0x7acdx15[_0xf049[32]][_0xf049[31]]()=== _0xf049[48]?2:1;_0x7acdx15[_0xf049[52]][_0x7acdx1d]= _0x7acdx15[_0xf049[52]][_0x7acdx1d]|| _0xf049[50];_0x7acdx15[_0xf049[52]][_0x7acdx1d]+= (_[_0xf049[73]](_0x7acdx15[_0xf049[52]][_0x7acdx1d],_0xf049[72])?_0xf049[50]:_0xf049[72])+ (_[_0xf049[73]](_0x7acdx15[_0xf049[52]][_0x7acdx1d],_0xf049[74])?_0xf049[50]:_0xf049[74])};_0x7acdx17[_0xf049[26]](_[_0xf049[25]]({app:_0x7acdx15[_0xf049[32]],appdata:_0x7acdx15[_0xf049[52]][_0xf049[82]](_0xf049[81]),priority:_0x7acdxe,IntervalId:_0x7acdx15[_0xf049[37]],interval:_0x7acdx15[_0xf049[39]]|| _0xf049[41],isApp:true,appType:_0x7acdx15[_0xf049[63]]|| null,answer:_0x7acdx15[_0xf049[65]]|| false},_0x7acdxf))}}};_0x7acdxe++;if(_0x7acdx15[_0xf049[32]][_0xf049[31]]()=== _0xf049[48]&& _0x7acdx8[_0xf049[55]]&& _0x7acdx8[_0xf049[20]]=== _0xf049[27]){_0x7acdx17[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[83],appdata:_0xf049[50],priority:_0x7acdxe},_0x7acdxf))}else {_0x7acdx17[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[43],appdata:_0xf049[84],priority:_0x7acdxe},_0x7acdxf))};_0x7acdxe++;_0x7acdx17[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[43],appdata:_0x7acdx15[_0xf049[32]]+ _0xf049[85],priority:_0x7acdxe},_0x7acdxf));_0x7acdxe++;_0x7acdx10[_0xf049[26]](VoiceExtension[_0xf049[36]](_0x7acdx17,{transaction:_0x7acdx7}))});_0x7acdx13[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[43],appdata:_0x7acdx8[_0xf049[20]]+ _0xf049[86],priority:_0x7acdxe},_0x7acdxf));_0x7acdxe++;if(_0x7acdx8[_0xf049[20]]=== _0xf049[87]|| _0x7acdx8[_0xf049[20]]=== _0xf049[27]){_0x7acdx13[_0xf049[26]](_[_0xf049[25]]({app:_0xf049[88],appdata:_0xf049[50],priority:_0x7acdxe},_0x7acdxf));_0x7acdxe++};_0x7acdx10[_0xf049[26]](VoiceExtension[_0xf049[36]](_0x7acdx13,{transaction:_0x7acdx7}));return _0x7acdx10})[_0xf049[18]]()}}}
\ No newline at end of file