Built motion from commit 15a6d846f.|1.0.20
[motion.git] / server / utils / voice_extension.js
index aa2f664..033c62e 100644 (file)
@@ -1 +1 @@
-var _0x56f2=["\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\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"];_0x56f2[0];var _=require(_0x56f2[1]);var util=require(_0x56f2[2]);var Interval=require(_0x56f2[4])[_0x56f2[3]];var sequelize=require(_0x56f2[4])[_0x56f2[5]];var VoiceExtension=require(_0x56f2[4])[_0x56f2[6]];exports[_0x56f2[7]]= createApplications;exports[_0x56f2[8]]= function(_0x50bbx6,_0x50bbx7){var sequelize=require(_0x56f2[4])[_0x56f2[5]];var VoiceExtension=require(_0x56f2[4])[_0x56f2[6]];if(_0x50bbx6[_0x56f2[10]][_0x56f2[9]]){delete _0x50bbx6[_0x56f2[10]][_0x56f2[9]]};return VoiceExtension[_0x56f2[17]](_0x50bbx6[_0x56f2[10]],{where:{id:_0x50bbx6[_0x56f2[15]][_0x56f2[9]]},transaction:_0x50bbx7})[_0x56f2[11]](function(_0x50bbx8){if(_0x50bbx6[_0x56f2[10]][_0x56f2[12]]){_0x50bbx6[_0x56f2[10]][_0x56f2[9]]= _0x50bbx6[_0x56f2[15]][_0x56f2[9]];return VoiceExtension[_0x56f2[16]]({where:{VoiceExtensionId:_0x50bbx6[_0x56f2[15]][_0x56f2[9]]},transaction:_0x50bbx7})}})[_0x56f2[11]](function(){if(_0x50bbx6[_0x56f2[10]][_0x56f2[12]]&& Array[_0x56f2[13]](_0x50bbx6[_0x56f2[10]].Applications)&& _0x50bbx6[_0x56f2[10]][_0x56f2[12]][_0x56f2[14]]){return _0x50bbx6[_0x56f2[10]]}})[_0x56f2[11]](createApplications(_0x50bbx6[_0x56f2[10]].Applications,_0x50bbx7))};function createApplications(_0x50bbxa,_0x50bbx7){var Interval=require(_0x56f2[4])[_0x56f2[3]];var VoiceExtension=require(_0x56f2[4])[_0x56f2[6]];return function(_0x50bbx8){if(_0x50bbx8){return Interval[_0x56f2[89]]()[_0x56f2[11]](function(_0x50bbxb){var _0x50bbxc=2;var _0x50bbxd={exten:_0x50bbx8[_0x56f2[19]],type:_0x50bbx8[_0x56f2[20]],context:_0x50bbx8[_0x56f2[21]],VoiceExtensionId:_0x50bbx8[_0x56f2[9]]};var _0x50bbxe=[];var _0x50bbxf=8;var _0x50bbx10=[],_0x50bbx11=[];_0x50bbx10[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[22],appdata:util[_0x56f2[24]](_0x56f2[23],_0x50bbx8[_0x56f2[20]]),priority:_0x50bbxc},_0x50bbxd));_0x50bbxc++;if(_0x50bbx8[_0x56f2[20]]=== _0x56f2[27]){_0x50bbx10[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[22],appdata:util[_0x56f2[24]](_0x56f2[28],_0x50bbx8[_0x56f2[29]]|| _0x56f2[30]),priority:_0x50bbxc},_0x50bbxd));_0x50bbxc++};var _0x50bbx12=_[_0x56f2[34]](_0x50bbxa,function(_0x50bbx13){return _0x50bbx13[_0x56f2[32]][_0x56f2[31]]()=== _0x56f2[33]});if(_0x50bbx12){_0x50bbx10[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[22],appdata:_0x56f2[35],priority:_0x50bbxc},_0x50bbxd));_0x50bbxc++};_0x50bbxe[_0x56f2[26]](VoiceExtension[_0x56f2[36]](_0x50bbx10,{transaction:_0x50bbx7}));_0x50bbxa[_0x56f2[47]](function(_0x50bbx13){var _0x50bbx14=[];var _0x50bbx15=[];if(_0x50bbx13[_0x56f2[37]]){var _0x50bbx16=_[_0x56f2[38]](_0x50bbxb,{IntervalId:_0x50bbx13[_0x56f2[37]]});_0x50bbx14= _0x50bbx16[_0x56f2[14]]?_[_0x56f2[40]](_0x50bbx16,_0x56f2[39]):[_0x56f2[41]];var _0x50bbx17=_[_0x56f2[34]](_0x50bbxb,{id:_0x50bbx13[_0x56f2[37]]});_0x50bbx13[_0x56f2[39]]= _0x50bbx17?_0x50bbx17[_0x56f2[42]]:_0x56f2[41]}else {_0x50bbx14= [_0x50bbx13[_0x56f2[39]]]};_0x50bbx15[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[43],appdata:_0x50bbx13[_0x56f2[32]]+ _0x56f2[44],priority:_0x50bbxc},_0x50bbxd));_0x50bbxc++;var _0x50bbx18=_0x50bbx14[_0x56f2[14]];_0x50bbx14[_0x56f2[47]](function(_0x50bbx19,_0x50bbx1a){_0x50bbx15[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[45],appdata:util[_0x56f2[24]](_0x56f2[46],_0x50bbx19,_0x50bbx8[_0x56f2[21]],_0x50bbxc+ (_0x50bbx18- _0x50bbx1a),_0x50bbx8[_0x56f2[21]],((_0x50bbx1a+ 1)< _0x50bbx18)?_0x50bbxc+ 1:_0x50bbxc+ _0x50bbxf),priority:_0x50bbxc},_0x50bbxd));_0x50bbxc++});if(_0x50bbx13[_0x56f2[32]][_0x56f2[31]]()=== _0x56f2[48]&& _0x50bbx8[_0x56f2[20]]=== _0x56f2[27]){_0x50bbx15[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[22],appdata:util[_0x56f2[24]](_0x56f2[49],_0x50bbx8[_0x56f2[9]]|| _0x56f2[50]),priority:_0x50bbxc},_0x50bbxd))}else {_0x50bbx15[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[43],appdata:_0x56f2[51],priority:_0x50bbxc},_0x50bbxd))};_0x50bbxc++;if(_0x50bbx13[_0x56f2[32]][_0x56f2[31]]()=== _0x56f2[48]&& _0x50bbx8[_0x56f2[20]]=== _0x56f2[27]&& _0x50bbx13[_0x56f2[52]][1]){_0x50bbx15[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[22],appdata:util[_0x56f2[24]](_0x56f2[53],_0x50bbx13[_0x56f2[52]][1]),priority:_0x50bbxc},_0x50bbxd))}else {_0x50bbx15[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[43],appdata:_0x56f2[54],priority:_0x50bbxc},_0x50bbxd))};_0x50bbxc++;if(_0x50bbx13[_0x56f2[32]][_0x56f2[31]]()=== _0x56f2[48]&& _0x50bbx8[_0x56f2[55]]&& _0x50bbx8[_0x56f2[20]]=== _0x56f2[27]){_0x50bbx15[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[56],appdata:_0x56f2[57]+ (_0x50bbx8[_0x56f2[58]]|| _0x56f2[59])+ _0x56f2[60],priority:_0x50bbxc},_0x50bbxd))}else {_0x50bbx15[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[43],appdata:_0x56f2[61],priority:_0x50bbxc},_0x50bbxd))};_0x50bbxc++;if(_0x50bbx13[_0x56f2[32]][_0x56f2[31]]()=== _0x56f2[62]&& _0x50bbx13[_0x56f2[63]]!== _0x56f2[64]&& !_0x50bbx13[_0x56f2[65]]){_0x50bbx15[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[66],appdata:_0x56f2[50],priority:_0x50bbxc},_0x50bbxd))}else {_0x50bbx15[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[43],appdata:_0x56f2[67],priority:_0x50bbxc},_0x50bbxd))};_0x50bbxc++;if((_0x50bbx13[_0x56f2[32]][_0x56f2[31]]()=== _0x56f2[62]|| _0x50bbx13[_0x56f2[32]][_0x56f2[31]]()=== _0x56f2[68])&& _0x50bbx13[_0x56f2[63]]!== _0x56f2[64]&& _0x50bbx13[_0x56f2[65]]){_0x50bbx15[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[69],appdata:_0x56f2[50],priority:_0x50bbxc},_0x50bbxd))}else {_0x50bbx15[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[43],appdata:_0x56f2[70],priority:_0x50bbxc},_0x50bbxd))};_0x50bbxc++;if(_0x50bbx13[_0x56f2[32]][_0x56f2[31]]()=== _0x56f2[48]&& _0x50bbx13[_0x56f2[63]]=== _0x56f2[71]){_0x50bbx13[_0x56f2[52]][4]= _0x50bbx13[_0x56f2[52]][4]|| _0x56f2[50];_0x50bbx13[_0x56f2[52]][4]+= (_[_0x56f2[73]](_0x50bbx13[_0x56f2[52]][4],_0x56f2[72])?_0x56f2[50]:_0x56f2[72])+ (_[_0x56f2[73]](_0x50bbx13[_0x56f2[52]][4],_0x56f2[74])?_0x56f2[50]:_0x56f2[74]);_0x50bbx15[_0x56f2[26]](_[_0x56f2[25]]({app:_0x50bbx13[_0x56f2[32]],appdata:util[_0x56f2[24]](_0x56f2[75],_0x50bbx13[_0x56f2[52]][0],_0x50bbx13[_0x56f2[52]][2]|| _0x56f2[50],_0x50bbx8[_0x56f2[76]]|| 0,_0x50bbx13[_0x56f2[52]][3]|| _0x56f2[50],_0x50bbx13[_0x56f2[52]][4]|| _0x56f2[50],_0x50bbx13[_0x56f2[52]][5]|| _0x56f2[50]),priority:_0x50bbxc,IntervalId:_0x50bbx13[_0x56f2[37]]|| null,interval:_0x50bbx13[_0x56f2[39]]|| _0x56f2[41],isApp:true,callerID:_0x50bbx13[_0x56f2[52]][1]|| null,appType:_0x50bbx13[_0x56f2[63]]},_0x50bbxd))}else {if(_0x50bbx13[_0x56f2[32]][_0x56f2[31]]()=== _0x56f2[48]&& _0x50bbx13[_0x56f2[63]]=== _0x56f2[77]){_0x50bbx13[_0x56f2[52]][3]= _0x50bbx13[_0x56f2[52]][3]|| _0x56f2[50];_0x50bbx13[_0x56f2[52]][3]+= (_[_0x56f2[73]](_0x50bbx13[_0x56f2[52]][3],_0x56f2[72])?_0x56f2[50]:_0x56f2[72])+ (_[_0x56f2[73]](_0x50bbx13[_0x56f2[52]][3],_0x56f2[74])?_0x56f2[50]:_0x56f2[74]);_0x50bbx15[_0x56f2[26]](_[_0x56f2[25]]({app:_0x50bbx13[_0x56f2[32]],appdata:util[_0x56f2[24]](_0x56f2[78],_0x50bbx13[_0x56f2[52]][0],_0x50bbx13[_0x56f2[52]][1],_0x50bbx13[_0x56f2[52]][2]|| _0x56f2[50],_0x50bbx13[_0x56f2[52]][3]|| _0x56f2[50],_0x50bbx13[_0x56f2[52]][4]|| _0x56f2[50]),priority:_0x50bbxc,IntervalId:_0x50bbx13[_0x56f2[37]]|| null,interval:_0x50bbx13[_0x56f2[39]]|| _0x56f2[41],isApp:true,appType:_0x50bbx13[_0x56f2[63]]},_0x50bbxd))}else {if(_0x50bbx13[_0x56f2[32]][_0x56f2[31]]()=== _0x56f2[48]&& _0x50bbx13[_0x56f2[63]]=== _0x56f2[79]){_0x50bbx13[_0x56f2[52]][2]= _0x50bbx13[_0x56f2[52]][2]|| _0x56f2[50];_0x50bbx13[_0x56f2[52]][2]+= (_[_0x56f2[73]](_0x50bbx13[_0x56f2[52]][2],_0x56f2[72])?_0x56f2[50]:_0x56f2[72])+ (_[_0x56f2[73]](_0x50bbx13[_0x56f2[52]][2],_0x56f2[74])?_0x56f2[50]:_0x56f2[74]);_0x50bbx15[_0x56f2[26]](_[_0x56f2[25]]({app:_0x50bbx13[_0x56f2[32]],appdata:util[_0x56f2[24]](_0x56f2[80],_0x50bbx13[_0x56f2[52]][0],_0x50bbx13[_0x56f2[52]][1]|| _0x56f2[50],_0x50bbx13[_0x56f2[52]][2]|| _0x56f2[50],_0x50bbx13[_0x56f2[52]][3]|| _0x56f2[50]),priority:_0x50bbxc,IntervalId:_0x50bbx13[_0x56f2[37]]|| null,interval:_0x50bbx13[_0x56f2[39]]|| _0x56f2[41],isApp:true,appType:_0x50bbx13[_0x56f2[63]]},_0x50bbxd))}else {if((_0x50bbx13[_0x56f2[32]][_0x56f2[31]]()=== _0x56f2[48]|| _0x50bbx13[_0x56f2[32]][_0x56f2[31]]()=== _0x56f2[62])&& _0x50bbx13[_0x56f2[63]]!== _0x56f2[64]){var _0x50bbx1b=_0x50bbx13[_0x56f2[32]][_0x56f2[31]]()=== _0x56f2[48]?2:1;_0x50bbx13[_0x56f2[52]][_0x50bbx1b]= _0x50bbx13[_0x56f2[52]][_0x50bbx1b]|| _0x56f2[50];_0x50bbx13[_0x56f2[52]][_0x50bbx1b]+= (_[_0x56f2[73]](_0x50bbx13[_0x56f2[52]][_0x50bbx1b],_0x56f2[72])?_0x56f2[50]:_0x56f2[72])+ (_[_0x56f2[73]](_0x50bbx13[_0x56f2[52]][_0x50bbx1b],_0x56f2[74])?_0x56f2[50]:_0x56f2[74])};_0x50bbx15[_0x56f2[26]](_[_0x56f2[25]]({app:_0x50bbx13[_0x56f2[32]],appdata:_0x50bbx13[_0x56f2[52]][_0x56f2[82]](_0x56f2[81]),priority:_0x50bbxc,IntervalId:_0x50bbx13[_0x56f2[37]],interval:_0x50bbx13[_0x56f2[39]]|| _0x56f2[41],isApp:true,appType:_0x50bbx13[_0x56f2[63]]|| null,answer:_0x50bbx13[_0x56f2[65]]|| false},_0x50bbxd))}}};_0x50bbxc++;if(_0x50bbx13[_0x56f2[32]][_0x56f2[31]]()=== _0x56f2[48]&& _0x50bbx8[_0x56f2[55]]&& _0x50bbx8[_0x56f2[20]]=== _0x56f2[27]){_0x50bbx15[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[83],appdata:_0x56f2[50],priority:_0x50bbxc},_0x50bbxd))}else {_0x50bbx15[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[43],appdata:_0x56f2[84],priority:_0x50bbxc},_0x50bbxd))};_0x50bbxc++;_0x50bbx15[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[43],appdata:_0x50bbx13[_0x56f2[32]]+ _0x56f2[85],priority:_0x50bbxc},_0x50bbxd));_0x50bbxc++;_0x50bbxe[_0x56f2[26]](VoiceExtension[_0x56f2[36]](_0x50bbx15,{transaction:_0x50bbx7}))});_0x50bbx11[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[43],appdata:_0x50bbx8[_0x56f2[20]]+ _0x56f2[86],priority:_0x50bbxc},_0x50bbxd));_0x50bbxc++;if(_0x50bbx8[_0x56f2[20]]=== _0x56f2[87]|| _0x50bbx8[_0x56f2[20]]=== _0x56f2[27]){_0x50bbx11[_0x56f2[26]](_[_0x56f2[25]]({app:_0x56f2[88],appdata:_0x56f2[50],priority:_0x50bbxc},_0x50bbxd));_0x50bbxc++};_0x50bbxe[_0x56f2[26]](VoiceExtension[_0x56f2[36]](_0x50bbx11,{transaction:_0x50bbx7}));return _0x50bbxe})[_0x56f2[18]]()}}}
\ No newline at end of file
+var _0x5796=["\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"];_0x5796[0];var _=require(_0x5796[1]);var util=require(_0x5796[2]);var Interval=require(_0x5796[4])[_0x5796[3]];var sequelize=require(_0x5796[4])[_0x5796[5]];var VoiceExtension=require(_0x5796[4])[_0x5796[6]];exports[_0x5796[7]]= createApplications;exports[_0x5796[8]]= function(_0xa87ax6,_0xa87ax7){var sequelize=require(_0x5796[4])[_0x5796[5]];var VoiceExtension=require(_0x5796[4])[_0x5796[6]];if(_0xa87ax6[_0x5796[10]][_0x5796[9]]){delete _0xa87ax6[_0x5796[10]][_0x5796[9]]};return VoiceExtension[_0x5796[17]](_0xa87ax6[_0x5796[10]],{where:{id:_0xa87ax6[_0x5796[15]][_0x5796[9]]},transaction:_0xa87ax7})[_0x5796[11]](function(_0xa87ax8){if(_0xa87ax6[_0x5796[10]][_0x5796[12]]){_0xa87ax6[_0x5796[10]][_0x5796[9]]= _0xa87ax6[_0x5796[15]][_0x5796[9]];return VoiceExtension[_0x5796[16]]({where:{VoiceExtensionId:_0xa87ax6[_0x5796[15]][_0x5796[9]]},transaction:_0xa87ax7})}})[_0x5796[11]](function(){if(_0xa87ax6[_0x5796[10]][_0x5796[12]]&& Array[_0x5796[13]](_0xa87ax6[_0x5796[10]].Applications)&& _0xa87ax6[_0x5796[10]][_0x5796[12]][_0x5796[14]]){return _0xa87ax6[_0x5796[10]]}})[_0x5796[11]](createApplications(_0xa87ax6[_0x5796[10]].Applications,_0xa87ax7))};function createApplications(_0xa87axa,_0xa87ax7){var Interval=require(_0x5796[4])[_0x5796[3]];var VoiceExtension=require(_0x5796[4])[_0x5796[6]];return function(_0xa87ax8){if(_0xa87ax8){return Interval[_0x5796[89]]()[_0x5796[11]](function(_0xa87axb){var _0xa87axc=false;var _0xa87axd=false;var _0xa87axe=2;var _0xa87axf={exten:_0xa87ax8[_0x5796[19]],type:_0xa87ax8[_0x5796[20]],context:_0xa87ax8[_0x5796[21]],VoiceExtensionId:_0xa87ax8[_0x5796[9]]};var _0xa87ax10=[];var _0xa87ax11=8;var _0xa87ax12=[],_0xa87ax13=[];_0xa87ax12[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[22],appdata:util[_0x5796[24]](_0x5796[23],_0xa87ax8[_0x5796[20]]),priority:_0xa87axe},_0xa87axf));_0xa87axe++;if(_0xa87ax8[_0x5796[20]]=== _0x5796[27]){_0xa87ax12[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[22],appdata:util[_0x5796[24]](_0x5796[28],_0xa87ax8[_0x5796[29]]|| _0x5796[30]),priority:_0xa87axe},_0xa87axf));_0xa87axe++};var _0xa87ax14=_[_0x5796[34]](_0xa87axa,function(_0xa87ax15){return _0xa87ax15[_0x5796[32]][_0x5796[31]]()=== _0x5796[33]});if(_0xa87ax14){_0xa87ax12[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[22],appdata:_0x5796[35],priority:_0xa87axe},_0xa87axf));_0xa87axe++};_0xa87ax10[_0x5796[26]](VoiceExtension[_0x5796[36]](_0xa87ax12,{transaction:_0xa87ax7}));_0xa87axa[_0x5796[47]](function(_0xa87ax15){var _0xa87ax16=[];var _0xa87ax17=[];if(_0xa87ax15[_0x5796[37]]){var _0xa87ax18=_[_0x5796[38]](_0xa87axb,{IntervalId:_0xa87ax15[_0x5796[37]]});_0xa87ax16= _0xa87ax18[_0x5796[14]]?_[_0x5796[40]](_0xa87ax18,_0x5796[39]):[_0x5796[41]];var _0xa87ax19=_[_0x5796[34]](_0xa87axb,{id:_0xa87ax15[_0x5796[37]]});_0xa87ax15[_0x5796[39]]= _0xa87ax19?_0xa87ax19[_0x5796[42]]:_0x5796[41]}else {_0xa87ax16= [_0xa87ax15[_0x5796[39]]]};_0xa87ax17[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[43],appdata:_0xa87ax15[_0x5796[32]]+ _0x5796[44],priority:_0xa87axe},_0xa87axf));_0xa87axe++;var _0xa87ax1a=_0xa87ax16[_0x5796[14]];_0xa87ax16[_0x5796[47]](function(_0xa87ax1b,_0xa87ax1c){_0xa87ax17[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[45],appdata:util[_0x5796[24]](_0x5796[46],_0xa87ax1b,_0xa87ax8[_0x5796[21]],_0xa87axe+ (_0xa87ax1a- _0xa87ax1c),_0xa87ax8[_0x5796[21]],((_0xa87ax1c+ 1)< _0xa87ax1a)?_0xa87axe+ 1:_0xa87axe+ _0xa87ax11),priority:_0xa87axe},_0xa87axf));_0xa87axe++});if(_0xa87ax15[_0x5796[32]][_0x5796[31]]()=== _0x5796[48]&& _0xa87ax8[_0x5796[20]]=== _0x5796[27]){_0xa87ax17[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[22],appdata:util[_0x5796[24]](_0x5796[49],_0xa87ax8[_0x5796[9]]|| _0x5796[50]),priority:_0xa87axe},_0xa87axf))}else {_0xa87ax17[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[43],appdata:_0x5796[51],priority:_0xa87axe},_0xa87axf))};_0xa87axe++;if(_0xa87ax15[_0x5796[32]][_0x5796[31]]()=== _0x5796[48]&& _0xa87ax8[_0x5796[20]]=== _0x5796[27]&& _0xa87ax15[_0x5796[52]][1]){_0xa87ax17[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[22],appdata:util[_0x5796[24]](_0x5796[53],_0xa87ax15[_0x5796[52]][1]),priority:_0xa87axe},_0xa87axf))}else {_0xa87ax17[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[43],appdata:_0x5796[54],priority:_0xa87axe},_0xa87axf))};_0xa87axe++;if(_0xa87ax15[_0x5796[32]][_0x5796[31]]()=== _0x5796[48]&& _0xa87ax8[_0x5796[55]]&& _0xa87ax8[_0x5796[20]]=== _0x5796[27]){_0xa87ax17[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[56],appdata:_0x5796[57]+ (_0xa87ax8[_0x5796[58]]|| _0x5796[59])+ _0x5796[60],priority:_0xa87axe},_0xa87axf))}else {_0xa87ax17[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[43],appdata:_0x5796[61],priority:_0xa87axe},_0xa87axf))};_0xa87axe++;if(_0xa87ax15[_0x5796[32]][_0x5796[31]]()=== _0x5796[62]&& _0xa87ax15[_0x5796[63]]!== _0x5796[64]&&  !_0xa87ax15[_0x5796[65]]&&  !_0xa87axd&&  !_0xa87axc){_0xa87ax17[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[66],appdata:_0x5796[50],priority:_0xa87axe},_0xa87axf));_0xa87axd= true}else {_0xa87ax17[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[43],appdata:_0x5796[67],priority:_0xa87axe},_0xa87axf))};_0xa87axe++;if((_0xa87ax15[_0x5796[32]][_0x5796[31]]()=== _0x5796[62]|| _0xa87ax15[_0x5796[32]][_0x5796[31]]()=== _0x5796[68])&& _0xa87ax15[_0x5796[63]]!== _0x5796[64]&& _0xa87ax15[_0x5796[65]]&&  !_0xa87axc){_0xa87ax17[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[69],appdata:_0x5796[50],priority:_0xa87axe},_0xa87axf));_0xa87axc= true;_0xa87axd= true}else {_0xa87ax17[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[43],appdata:_0x5796[70],priority:_0xa87axe},_0xa87axf))};_0xa87axe++;if(_0xa87ax15[_0x5796[32]][_0x5796[31]]()=== _0x5796[48]&& _0xa87ax15[_0x5796[63]]=== _0x5796[71]){_0xa87ax15[_0x5796[52]][4]= _0xa87ax15[_0x5796[52]][4]|| _0x5796[50];_0xa87ax15[_0x5796[52]][4]+= (_[_0x5796[73]](_0xa87ax15[_0x5796[52]][4],_0x5796[72])?_0x5796[50]:_0x5796[72])+ (_[_0x5796[73]](_0xa87ax15[_0x5796[52]][4],_0x5796[74])?_0x5796[50]:_0x5796[74]);_0xa87ax17[_0x5796[26]](_[_0x5796[25]]({app:_0xa87ax15[_0x5796[32]],appdata:util[_0x5796[24]](_0x5796[75],_0xa87ax15[_0x5796[52]][0],_0xa87ax15[_0x5796[52]][2]|| _0x5796[50],_0xa87ax8[_0x5796[76]]|| 0,_0xa87ax15[_0x5796[52]][3]|| _0x5796[50],_0xa87ax15[_0x5796[52]][4]|| _0x5796[50],_0xa87ax15[_0x5796[52]][5]|| _0x5796[50]),priority:_0xa87axe,IntervalId:_0xa87ax15[_0x5796[37]]|| null,interval:_0xa87ax15[_0x5796[39]]|| _0x5796[41],isApp:true,callerID:_0xa87ax15[_0x5796[52]][1]|| null,appType:_0xa87ax15[_0x5796[63]]},_0xa87axf))}else {if(_0xa87ax15[_0x5796[32]][_0x5796[31]]()=== _0x5796[48]&& _0xa87ax15[_0x5796[63]]=== _0x5796[77]){_0xa87ax15[_0x5796[52]][3]= _0xa87ax15[_0x5796[52]][3]|| _0x5796[50];_0xa87ax15[_0x5796[52]][3]+= (_[_0x5796[73]](_0xa87ax15[_0x5796[52]][3],_0x5796[72])?_0x5796[50]:_0x5796[72])+ (_[_0x5796[73]](_0xa87ax15[_0x5796[52]][3],_0x5796[74])?_0x5796[50]:_0x5796[74]);_0xa87ax17[_0x5796[26]](_[_0x5796[25]]({app:_0xa87ax15[_0x5796[32]],appdata:util[_0x5796[24]](_0x5796[78],_0xa87ax15[_0x5796[52]][0],_0xa87ax15[_0x5796[52]][1],_0xa87ax15[_0x5796[52]][2]|| _0x5796[50],_0xa87ax15[_0x5796[52]][3]|| _0x5796[50],_0xa87ax15[_0x5796[52]][4]|| _0x5796[50]),priority:_0xa87axe,IntervalId:_0xa87ax15[_0x5796[37]]|| null,interval:_0xa87ax15[_0x5796[39]]|| _0x5796[41],isApp:true,appType:_0xa87ax15[_0x5796[63]]},_0xa87axf))}else {if(_0xa87ax15[_0x5796[32]][_0x5796[31]]()=== _0x5796[48]&& _0xa87ax15[_0x5796[63]]=== _0x5796[79]){_0xa87ax15[_0x5796[52]][2]= _0xa87ax15[_0x5796[52]][2]|| _0x5796[50];_0xa87ax15[_0x5796[52]][2]+= (_[_0x5796[73]](_0xa87ax15[_0x5796[52]][2],_0x5796[72])?_0x5796[50]:_0x5796[72])+ (_[_0x5796[73]](_0xa87ax15[_0x5796[52]][2],_0x5796[74])?_0x5796[50]:_0x5796[74]);_0xa87ax17[_0x5796[26]](_[_0x5796[25]]({app:_0xa87ax15[_0x5796[32]],appdata:util[_0x5796[24]](_0x5796[80],_0xa87ax15[_0x5796[52]][0],_0xa87ax15[_0x5796[52]][1]|| _0x5796[50],_0xa87ax15[_0x5796[52]][2]|| _0x5796[50],_0xa87ax15[_0x5796[52]][3]|| _0x5796[50]),priority:_0xa87axe,IntervalId:_0xa87ax15[_0x5796[37]]|| null,interval:_0xa87ax15[_0x5796[39]]|| _0x5796[41],isApp:true,appType:_0xa87ax15[_0x5796[63]]},_0xa87axf))}else {if((_0xa87ax15[_0x5796[32]][_0x5796[31]]()=== _0x5796[48]|| _0xa87ax15[_0x5796[32]][_0x5796[31]]()=== _0x5796[62])&& _0xa87ax15[_0x5796[63]]!== _0x5796[64]){var _0xa87ax1d=_0xa87ax15[_0x5796[32]][_0x5796[31]]()=== _0x5796[48]?2:1;_0xa87ax15[_0x5796[52]][_0xa87ax1d]= _0xa87ax15[_0x5796[52]][_0xa87ax1d]|| _0x5796[50];_0xa87ax15[_0x5796[52]][_0xa87ax1d]+= (_[_0x5796[73]](_0xa87ax15[_0x5796[52]][_0xa87ax1d],_0x5796[72])?_0x5796[50]:_0x5796[72])+ (_[_0x5796[73]](_0xa87ax15[_0x5796[52]][_0xa87ax1d],_0x5796[74])?_0x5796[50]:_0x5796[74])};_0xa87ax17[_0x5796[26]](_[_0x5796[25]]({app:_0xa87ax15[_0x5796[32]],appdata:_0xa87ax15[_0x5796[52]][_0x5796[82]](_0x5796[81]),priority:_0xa87axe,IntervalId:_0xa87ax15[_0x5796[37]],interval:_0xa87ax15[_0x5796[39]]|| _0x5796[41],isApp:true,appType:_0xa87ax15[_0x5796[63]]|| null,answer:_0xa87ax15[_0x5796[65]]|| false},_0xa87axf))}}};_0xa87axe++;if(_0xa87ax15[_0x5796[32]][_0x5796[31]]()=== _0x5796[48]&& _0xa87ax8[_0x5796[55]]&& _0xa87ax8[_0x5796[20]]=== _0x5796[27]){_0xa87ax17[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[83],appdata:_0x5796[50],priority:_0xa87axe},_0xa87axf))}else {_0xa87ax17[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[43],appdata:_0x5796[84],priority:_0xa87axe},_0xa87axf))};_0xa87axe++;_0xa87ax17[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[43],appdata:_0xa87ax15[_0x5796[32]]+ _0x5796[85],priority:_0xa87axe},_0xa87axf));_0xa87axe++;_0xa87ax10[_0x5796[26]](VoiceExtension[_0x5796[36]](_0xa87ax17,{transaction:_0xa87ax7}))});_0xa87ax13[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[43],appdata:_0xa87ax8[_0x5796[20]]+ _0x5796[86],priority:_0xa87axe},_0xa87axf));_0xa87axe++;if(_0xa87ax8[_0x5796[20]]=== _0x5796[87]|| _0xa87ax8[_0x5796[20]]=== _0x5796[27]){_0xa87ax13[_0x5796[26]](_[_0x5796[25]]({app:_0x5796[88],appdata:_0x5796[50],priority:_0xa87axe},_0xa87axf));_0xa87axe++};_0xa87ax10[_0x5796[26]](VoiceExtension[_0x5796[36]](_0xa87ax13,{transaction:_0xa87ax7}));return _0xa87ax10})[_0x5796[18]]()}}}
\ No newline at end of file