Built motion from commit 92b7db905.|1.0.30
[motion.git] / server / utils / voice_extension.js
index ea0b7be..b5a0a98 100644 (file)
@@ -1 +1 @@
-var _0xe218=["\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"];_0xe218[0];var _=require(_0xe218[1]);var util=require(_0xe218[2]);var Interval=require(_0xe218[4])[_0xe218[3]];var sequelize=require(_0xe218[4])[_0xe218[5]];var VoiceExtension=require(_0xe218[4])[_0xe218[6]];exports[_0xe218[7]]= createApplications;exports[_0xe218[8]]= function(_0x13cfx6,_0x13cfx7){var sequelize=require(_0xe218[4])[_0xe218[5]];var VoiceExtension=require(_0xe218[4])[_0xe218[6]];if(_0x13cfx6[_0xe218[10]][_0xe218[9]]){delete _0x13cfx6[_0xe218[10]][_0xe218[9]]};return VoiceExtension[_0xe218[17]](_0x13cfx6[_0xe218[10]],{where:{id:_0x13cfx6[_0xe218[15]][_0xe218[9]]},transaction:_0x13cfx7})[_0xe218[11]](function(_0x13cfx8){if(_0x13cfx6[_0xe218[10]][_0xe218[12]]){_0x13cfx6[_0xe218[10]][_0xe218[9]]= _0x13cfx6[_0xe218[15]][_0xe218[9]];return VoiceExtension[_0xe218[16]]({where:{VoiceExtensionId:_0x13cfx6[_0xe218[15]][_0xe218[9]]},transaction:_0x13cfx7})}})[_0xe218[11]](function(){if(_0x13cfx6[_0xe218[10]][_0xe218[12]]&& Array[_0xe218[13]](_0x13cfx6[_0xe218[10]].Applications)&& _0x13cfx6[_0xe218[10]][_0xe218[12]][_0xe218[14]]){return _0x13cfx6[_0xe218[10]]}})[_0xe218[11]](createApplications(_0x13cfx6[_0xe218[10]].Applications,_0x13cfx7))};function createApplications(_0x13cfxa,_0x13cfx7){var Interval=require(_0xe218[4])[_0xe218[3]];var VoiceExtension=require(_0xe218[4])[_0xe218[6]];return function(_0x13cfx8){if(_0x13cfx8){return Interval[_0xe218[89]]()[_0xe218[11]](function(_0x13cfxb){var _0x13cfxc=false;var _0x13cfxd=false;var _0x13cfxe=2;var _0x13cfxf={exten:_0x13cfx8[_0xe218[19]],type:_0x13cfx8[_0xe218[20]],context:_0x13cfx8[_0xe218[21]],VoiceExtensionId:_0x13cfx8[_0xe218[9]]};var _0x13cfx10=[];var _0x13cfx11=8;var _0x13cfx12=[],_0x13cfx13=[];_0x13cfx12[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[22],appdata:util[_0xe218[24]](_0xe218[23],_0x13cfx8[_0xe218[20]]),priority:_0x13cfxe},_0x13cfxf));_0x13cfxe++;if(_0x13cfx8[_0xe218[20]]=== _0xe218[27]){_0x13cfx12[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[22],appdata:util[_0xe218[24]](_0xe218[28],_0x13cfx8[_0xe218[29]]|| _0xe218[30]),priority:_0x13cfxe},_0x13cfxf));_0x13cfxe++};var _0x13cfx14=_[_0xe218[34]](_0x13cfxa,function(_0x13cfx15){return _0x13cfx15[_0xe218[32]][_0xe218[31]]()=== _0xe218[33]});if(_0x13cfx14){_0x13cfx12[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[22],appdata:_0xe218[35],priority:_0x13cfxe},_0x13cfxf));_0x13cfxe++};_0x13cfx10[_0xe218[26]](VoiceExtension[_0xe218[36]](_0x13cfx12,{transaction:_0x13cfx7}));_0x13cfxa[_0xe218[47]](function(_0x13cfx15){var _0x13cfx16=[];var _0x13cfx17=[];if(_0x13cfx15[_0xe218[37]]){var _0x13cfx18=_[_0xe218[38]](_0x13cfxb,{IntervalId:_0x13cfx15[_0xe218[37]]});_0x13cfx16= _0x13cfx18[_0xe218[14]]?_[_0xe218[40]](_0x13cfx18,_0xe218[39]):[_0xe218[41]];var _0x13cfx19=_[_0xe218[34]](_0x13cfxb,{id:_0x13cfx15[_0xe218[37]]});_0x13cfx15[_0xe218[39]]= _0x13cfx19?_0x13cfx19[_0xe218[42]]:_0xe218[41]}else {_0x13cfx16= [_0x13cfx15[_0xe218[39]]]};_0x13cfx17[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[43],appdata:_0x13cfx15[_0xe218[32]]+ _0xe218[44],priority:_0x13cfxe},_0x13cfxf));_0x13cfxe++;var _0x13cfx1a=_0x13cfx16[_0xe218[14]];_0x13cfx16[_0xe218[47]](function(_0x13cfx1b,_0x13cfx1c){_0x13cfx17[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[45],appdata:util[_0xe218[24]](_0xe218[46],_0x13cfx1b,_0x13cfx8[_0xe218[21]],_0x13cfxe+ (_0x13cfx1a- _0x13cfx1c),_0x13cfx8[_0xe218[21]],((_0x13cfx1c+ 1)< _0x13cfx1a)?_0x13cfxe+ 1:_0x13cfxe+ _0x13cfx11),priority:_0x13cfxe},_0x13cfxf));_0x13cfxe++});if(_0x13cfx15[_0xe218[32]][_0xe218[31]]()=== _0xe218[48]&& _0x13cfx8[_0xe218[20]]=== _0xe218[27]){_0x13cfx17[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[22],appdata:util[_0xe218[24]](_0xe218[49],_0x13cfx8[_0xe218[9]]|| _0xe218[50]),priority:_0x13cfxe},_0x13cfxf))}else {_0x13cfx17[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[43],appdata:_0xe218[51],priority:_0x13cfxe},_0x13cfxf))};_0x13cfxe++;if(_0x13cfx15[_0xe218[32]][_0xe218[31]]()=== _0xe218[48]&& _0x13cfx8[_0xe218[20]]=== _0xe218[27]&& _0x13cfx15[_0xe218[52]][1]){_0x13cfx17[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[22],appdata:util[_0xe218[24]](_0xe218[53],_0x13cfx15[_0xe218[52]][1]),priority:_0x13cfxe},_0x13cfxf))}else {_0x13cfx17[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[43],appdata:_0xe218[54],priority:_0x13cfxe},_0x13cfxf))};_0x13cfxe++;if(_0x13cfx15[_0xe218[32]][_0xe218[31]]()=== _0xe218[48]&& _0x13cfx8[_0xe218[55]]&& _0x13cfx8[_0xe218[20]]=== _0xe218[27]){_0x13cfx17[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[56],appdata:_0xe218[57]+ (_0x13cfx8[_0xe218[58]]|| _0xe218[59])+ _0xe218[60],priority:_0x13cfxe},_0x13cfxf))}else {_0x13cfx17[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[43],appdata:_0xe218[61],priority:_0x13cfxe},_0x13cfxf))};_0x13cfxe++;if(_0x13cfx15[_0xe218[32]][_0xe218[31]]()=== _0xe218[62]&& _0x13cfx15[_0xe218[63]]!== _0xe218[64]&&  !_0x13cfx15[_0xe218[65]]&&  !_0x13cfxd&&  !_0x13cfxc){_0x13cfx17[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[66],appdata:_0xe218[50],priority:_0x13cfxe},_0x13cfxf));_0x13cfxd= true}else {_0x13cfx17[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[43],appdata:_0xe218[67],priority:_0x13cfxe},_0x13cfxf))};_0x13cfxe++;if((_0x13cfx15[_0xe218[32]][_0xe218[31]]()=== _0xe218[62]|| _0x13cfx15[_0xe218[32]][_0xe218[31]]()=== _0xe218[68])&& _0x13cfx15[_0xe218[63]]!== _0xe218[64]&& _0x13cfx15[_0xe218[65]]&&  !_0x13cfxc){_0x13cfx17[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[69],appdata:_0xe218[50],priority:_0x13cfxe},_0x13cfxf));_0x13cfxc= true;_0x13cfxd= true}else {_0x13cfx17[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[43],appdata:_0xe218[70],priority:_0x13cfxe},_0x13cfxf))};_0x13cfxe++;if(_0x13cfx15[_0xe218[32]][_0xe218[31]]()=== _0xe218[48]&& _0x13cfx15[_0xe218[63]]=== _0xe218[71]){_0x13cfx15[_0xe218[52]][4]= _0x13cfx15[_0xe218[52]][4]|| _0xe218[50];_0x13cfx15[_0xe218[52]][4]+= (_[_0xe218[73]](_0x13cfx15[_0xe218[52]][4],_0xe218[72])?_0xe218[50]:_0xe218[72])+ (_[_0xe218[73]](_0x13cfx15[_0xe218[52]][4],_0xe218[74])?_0xe218[50]:_0xe218[74]);_0x13cfx17[_0xe218[26]](_[_0xe218[25]]({app:_0x13cfx15[_0xe218[32]],appdata:util[_0xe218[24]](_0xe218[75],_0x13cfx15[_0xe218[52]][0],_0x13cfx15[_0xe218[52]][2]|| _0xe218[50],_0x13cfx8[_0xe218[76]]|| 0,_0x13cfx15[_0xe218[52]][3]|| _0xe218[50],_0x13cfx15[_0xe218[52]][4]|| _0xe218[50],_0x13cfx15[_0xe218[52]][5]|| _0xe218[50]),priority:_0x13cfxe,IntervalId:_0x13cfx15[_0xe218[37]]|| null,interval:_0x13cfx15[_0xe218[39]]|| _0xe218[41],isApp:true,callerID:_0x13cfx15[_0xe218[52]][1]|| null,appType:_0x13cfx15[_0xe218[63]]},_0x13cfxf))}else {if(_0x13cfx15[_0xe218[32]][_0xe218[31]]()=== _0xe218[48]&& _0x13cfx15[_0xe218[63]]=== _0xe218[77]){_0x13cfx15[_0xe218[52]][3]= _0x13cfx15[_0xe218[52]][3]|| _0xe218[50];_0x13cfx15[_0xe218[52]][3]+= (_[_0xe218[73]](_0x13cfx15[_0xe218[52]][3],_0xe218[72])?_0xe218[50]:_0xe218[72])+ (_[_0xe218[73]](_0x13cfx15[_0xe218[52]][3],_0xe218[74])?_0xe218[50]:_0xe218[74]);_0x13cfx17[_0xe218[26]](_[_0xe218[25]]({app:_0x13cfx15[_0xe218[32]],appdata:util[_0xe218[24]](_0xe218[78],_0x13cfx15[_0xe218[52]][0],_0x13cfx15[_0xe218[52]][1],_0x13cfx15[_0xe218[52]][2]|| _0xe218[50],_0x13cfx15[_0xe218[52]][3]|| _0xe218[50],_0x13cfx15[_0xe218[52]][4]|| _0xe218[50]),priority:_0x13cfxe,IntervalId:_0x13cfx15[_0xe218[37]]|| null,interval:_0x13cfx15[_0xe218[39]]|| _0xe218[41],isApp:true,appType:_0x13cfx15[_0xe218[63]]},_0x13cfxf))}else {if(_0x13cfx15[_0xe218[32]][_0xe218[31]]()=== _0xe218[48]&& _0x13cfx15[_0xe218[63]]=== _0xe218[79]){_0x13cfx15[_0xe218[52]][2]= _0x13cfx15[_0xe218[52]][2]|| _0xe218[50];_0x13cfx15[_0xe218[52]][2]+= (_[_0xe218[73]](_0x13cfx15[_0xe218[52]][2],_0xe218[72])?_0xe218[50]:_0xe218[72])+ (_[_0xe218[73]](_0x13cfx15[_0xe218[52]][2],_0xe218[74])?_0xe218[50]:_0xe218[74]);_0x13cfx17[_0xe218[26]](_[_0xe218[25]]({app:_0x13cfx15[_0xe218[32]],appdata:util[_0xe218[24]](_0xe218[80],_0x13cfx15[_0xe218[52]][0],_0x13cfx15[_0xe218[52]][1]|| _0xe218[50],_0x13cfx15[_0xe218[52]][2]|| _0xe218[50],_0x13cfx15[_0xe218[52]][3]|| _0xe218[50]),priority:_0x13cfxe,IntervalId:_0x13cfx15[_0xe218[37]]|| null,interval:_0x13cfx15[_0xe218[39]]|| _0xe218[41],isApp:true,appType:_0x13cfx15[_0xe218[63]]},_0x13cfxf))}else {if((_0x13cfx15[_0xe218[32]][_0xe218[31]]()=== _0xe218[48]|| _0x13cfx15[_0xe218[32]][_0xe218[31]]()=== _0xe218[62])&& _0x13cfx15[_0xe218[63]]!== _0xe218[64]){var _0x13cfx1d=_0x13cfx15[_0xe218[32]][_0xe218[31]]()=== _0xe218[48]?2:1;_0x13cfx15[_0xe218[52]][_0x13cfx1d]= _0x13cfx15[_0xe218[52]][_0x13cfx1d]|| _0xe218[50];_0x13cfx15[_0xe218[52]][_0x13cfx1d]+= (_[_0xe218[73]](_0x13cfx15[_0xe218[52]][_0x13cfx1d],_0xe218[72])?_0xe218[50]:_0xe218[72])+ (_[_0xe218[73]](_0x13cfx15[_0xe218[52]][_0x13cfx1d],_0xe218[74])?_0xe218[50]:_0xe218[74])};_0x13cfx17[_0xe218[26]](_[_0xe218[25]]({app:_0x13cfx15[_0xe218[32]],appdata:_0x13cfx15[_0xe218[52]][_0xe218[82]](_0xe218[81]),priority:_0x13cfxe,IntervalId:_0x13cfx15[_0xe218[37]],interval:_0x13cfx15[_0xe218[39]]|| _0xe218[41],isApp:true,appType:_0x13cfx15[_0xe218[63]]|| null,answer:_0x13cfx15[_0xe218[65]]|| false},_0x13cfxf))}}};_0x13cfxe++;if(_0x13cfx15[_0xe218[32]][_0xe218[31]]()=== _0xe218[48]&& _0x13cfx8[_0xe218[55]]&& _0x13cfx8[_0xe218[20]]=== _0xe218[27]){_0x13cfx17[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[83],appdata:_0xe218[50],priority:_0x13cfxe},_0x13cfxf))}else {_0x13cfx17[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[43],appdata:_0xe218[84],priority:_0x13cfxe},_0x13cfxf))};_0x13cfxe++;_0x13cfx17[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[43],appdata:_0x13cfx15[_0xe218[32]]+ _0xe218[85],priority:_0x13cfxe},_0x13cfxf));_0x13cfxe++;_0x13cfx10[_0xe218[26]](VoiceExtension[_0xe218[36]](_0x13cfx17,{transaction:_0x13cfx7}))});_0x13cfx13[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[43],appdata:_0x13cfx8[_0xe218[20]]+ _0xe218[86],priority:_0x13cfxe},_0x13cfxf));_0x13cfxe++;if(_0x13cfx8[_0xe218[20]]=== _0xe218[87]|| _0x13cfx8[_0xe218[20]]=== _0xe218[27]){_0x13cfx13[_0xe218[26]](_[_0xe218[25]]({app:_0xe218[88],appdata:_0xe218[50],priority:_0x13cfxe},_0x13cfxf));_0x13cfxe++};_0x13cfx10[_0xe218[26]](VoiceExtension[_0xe218[36]](_0x13cfx13,{transaction:_0x13cfx7}));return _0x13cfx10})[_0xe218[18]]()}}}
\ No newline at end of file
+var _0x2830=["\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","\x5F\x58\x43\x41\x4C\x4C\x59\x5F\x4D\x49\x58\x4D\x4F\x4E\x49\x54\x4F\x52\x5F\x55\x4E\x49\x51\x55\x45\x49\x44\x3D\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D","\x5F\x58\x43\x41\x4C\x4C\x59\x5F\x4D\x49\x58\x4D\x4F\x4E\x49\x54\x4F\x52\x5F\x46\x4F\x52\x4D\x41\x54\x3D","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x77\x61\x76","\x53\x6B\x69\x70\x70\x65\x64\x20\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72\x20\x55\x6E\x69\x71\x75\x65\x69\x64\x20\x53\x65\x74","\x53\x6B\x69\x70\x70\x65\x64\x20\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72\x20\x46\x6F\x72\x6D\x61\x74\x20\x53\x65\x74","\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","\x55\x28\x78\x63\x61\x6C\x6C\x79\x2D\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72\x2D\x63\x6F\x6E\x74\x65\x78\x74\x29","\x69\x6E\x64\x65\x78\x4F\x66","\x72\x65\x70\x6C\x61\x63\x65","\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","\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"];_0x2830[0];var _=require(_0x2830[1]);var util=require(_0x2830[2]);var Interval=require(_0x2830[4])[_0x2830[3]];var sequelize=require(_0x2830[4])[_0x2830[5]];var VoiceExtension=require(_0x2830[4])[_0x2830[6]];exports[_0x2830[7]]= createApplications;exports[_0x2830[8]]= function(_0x83e8x6,_0x83e8x7){var sequelize=require(_0x2830[4])[_0x2830[5]];var VoiceExtension=require(_0x2830[4])[_0x2830[6]];if(_0x83e8x6[_0x2830[10]][_0x2830[9]]){delete _0x83e8x6[_0x2830[10]][_0x2830[9]]};return VoiceExtension[_0x2830[17]](_0x83e8x6[_0x2830[10]],{where:{id:_0x83e8x6[_0x2830[15]][_0x2830[9]]},transaction:_0x83e8x7})[_0x2830[11]](function(_0x83e8x8){if(_0x83e8x6[_0x2830[10]][_0x2830[12]]){_0x83e8x6[_0x2830[10]][_0x2830[9]]= _0x83e8x6[_0x2830[15]][_0x2830[9]];return VoiceExtension[_0x2830[16]]({where:{VoiceExtensionId:_0x83e8x6[_0x2830[15]][_0x2830[9]]},transaction:_0x83e8x7})}})[_0x2830[11]](function(){if(_0x83e8x6[_0x2830[10]][_0x2830[12]]&& Array[_0x2830[13]](_0x83e8x6[_0x2830[10]].Applications)&& _0x83e8x6[_0x2830[10]][_0x2830[12]][_0x2830[14]]){return _0x83e8x6[_0x2830[10]]}})[_0x2830[11]](createApplications(_0x83e8x6[_0x2830[10]].Applications,_0x83e8x7))};function createApplications(_0x83e8xa,_0x83e8x7){var Interval=require(_0x2830[4])[_0x2830[3]];var VoiceExtension=require(_0x2830[4])[_0x2830[6]];return function(_0x83e8x8){if(_0x83e8x8){return Interval[_0x2830[90]]()[_0x2830[11]](function(_0x83e8xb){var _0x83e8xc=false;var _0x83e8xd=false;var _0x83e8xe=2;var _0x83e8xf={exten:_0x83e8x8[_0x2830[19]],type:_0x83e8x8[_0x2830[20]],context:_0x83e8x8[_0x2830[21]],VoiceExtensionId:_0x83e8x8[_0x2830[9]]};var _0x83e8x10=[];var _0x83e8x11=8;var _0x83e8x12=[],_0x83e8x13=[];_0x83e8x12[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[22],appdata:util[_0x2830[24]](_0x2830[23],_0x83e8x8[_0x2830[20]]),priority:_0x83e8xe},_0x83e8xf));_0x83e8xe++;if(_0x83e8x8[_0x2830[20]]=== _0x2830[27]){_0x83e8x12[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[22],appdata:util[_0x2830[24]](_0x2830[28],_0x83e8x8[_0x2830[29]]|| _0x2830[30]),priority:_0x83e8xe},_0x83e8xf));_0x83e8xe++};var _0x83e8x14=_[_0x2830[34]](_0x83e8xa,function(_0x83e8x15){return _0x83e8x15[_0x2830[32]][_0x2830[31]]()=== _0x2830[33]});if(_0x83e8x14){_0x83e8x12[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[22],appdata:_0x2830[35],priority:_0x83e8xe},_0x83e8xf));_0x83e8xe++};_0x83e8x10[_0x2830[26]](VoiceExtension[_0x2830[36]](_0x83e8x12,{transaction:_0x83e8x7}));_0x83e8xa[_0x2830[47]](function(_0x83e8x15){var _0x83e8x16=[];var _0x83e8x17=[];if(_0x83e8x15[_0x2830[37]]){var _0x83e8x18=_[_0x2830[38]](_0x83e8xb,{IntervalId:_0x83e8x15[_0x2830[37]]});_0x83e8x16= _0x83e8x18[_0x2830[14]]?_[_0x2830[40]](_0x83e8x18,_0x2830[39]):[_0x2830[41]];var _0x83e8x19=_[_0x2830[34]](_0x83e8xb,{id:_0x83e8x15[_0x2830[37]]});_0x83e8x15[_0x2830[39]]= _0x83e8x19?_0x83e8x19[_0x2830[42]]:_0x2830[41]}else {_0x83e8x16= [_0x83e8x15[_0x2830[39]]]};_0x83e8x17[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[43],appdata:_0x83e8x15[_0x2830[32]]+ _0x2830[44],priority:_0x83e8xe},_0x83e8xf));_0x83e8xe++;var _0x83e8x1a=_0x83e8x16[_0x2830[14]];_0x83e8x16[_0x2830[47]](function(_0x83e8x1b,_0x83e8x1c){_0x83e8x17[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[45],appdata:util[_0x2830[24]](_0x2830[46],_0x83e8x1b,_0x83e8x8[_0x2830[21]],_0x83e8xe+ (_0x83e8x1a- _0x83e8x1c),_0x83e8x8[_0x2830[21]],((_0x83e8x1c+ 1)< _0x83e8x1a)?_0x83e8xe+ 1:_0x83e8xe+ _0x83e8x11),priority:_0x83e8xe},_0x83e8xf));_0x83e8xe++});if(_0x83e8x15[_0x2830[32]][_0x2830[31]]()=== _0x2830[48]&& _0x83e8x8[_0x2830[20]]=== _0x2830[27]){_0x83e8x17[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[22],appdata:util[_0x2830[24]](_0x2830[49],_0x83e8x8[_0x2830[9]]|| _0x2830[50]),priority:_0x83e8xe},_0x83e8xf))}else {_0x83e8x17[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[43],appdata:_0x2830[51],priority:_0x83e8xe},_0x83e8xf))};_0x83e8xe++;if(_0x83e8x15[_0x2830[32]][_0x2830[31]]()=== _0x2830[48]&& _0x83e8x8[_0x2830[20]]=== _0x2830[27]&& _0x83e8x15[_0x2830[52]][1]){_0x83e8x17[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[22],appdata:util[_0x2830[24]](_0x2830[53],_0x83e8x15[_0x2830[52]][1]),priority:_0x83e8xe},_0x83e8xf))}else {_0x83e8x17[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[43],appdata:_0x2830[54],priority:_0x83e8xe},_0x83e8xf))};_0x83e8xe++;if(_0x83e8x15[_0x2830[32]][_0x2830[31]]()=== _0x2830[48]&& _0x83e8x8[_0x2830[55]]&& _0x83e8x8[_0x2830[20]]=== _0x2830[27]){_0x83e8x17[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[22],appdata:_0x2830[56],priority:_0x83e8xe},_0x83e8xf));_0x83e8xe++;_0x83e8x17[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[22],appdata:_0x2830[57]+ _0x83e8x8[_0x2830[58]]|| _0x2830[59],priority:_0x83e8xe},_0x83e8xf));_0x83e8xe++}else {_0x83e8x17[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[43],appdata:_0x2830[60],priority:_0x83e8xe},_0x83e8xf));_0x83e8xe++;_0x83e8x17[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[43],appdata:_0x2830[61],priority:_0x83e8xe},_0x83e8xf));_0x83e8xe++};if(_0x83e8x15[_0x2830[32]][_0x2830[31]]()=== _0x2830[62]&& _0x83e8x15[_0x2830[63]]!== _0x2830[64]&&  !_0x83e8x15[_0x2830[65]]&&  !_0x83e8xd&&  !_0x83e8xc){_0x83e8x17[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[66],appdata:_0x2830[50],priority:_0x83e8xe},_0x83e8xf));_0x83e8xd= true}else {_0x83e8x17[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[43],appdata:_0x2830[67],priority:_0x83e8xe},_0x83e8xf))};_0x83e8xe++;if((_0x83e8x15[_0x2830[32]][_0x2830[31]]()=== _0x2830[62]|| _0x83e8x15[_0x2830[32]][_0x2830[31]]()=== _0x2830[68])&& _0x83e8x15[_0x2830[63]]!== _0x2830[64]&& _0x83e8x15[_0x2830[65]]&&  !_0x83e8xc){_0x83e8x17[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[69],appdata:_0x2830[50],priority:_0x83e8xe},_0x83e8xf));_0x83e8xc= true;_0x83e8xd= true}else {_0x83e8x17[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[43],appdata:_0x2830[70],priority:_0x83e8xe},_0x83e8xf))};_0x83e8xe++;if(_0x83e8x15[_0x2830[32]][_0x2830[31]]()=== _0x2830[48]&& _0x83e8x15[_0x2830[63]]=== _0x2830[71]){_0x83e8x15[_0x2830[52]][4]= _0x83e8x15[_0x2830[52]][4]|| _0x2830[50];_0x83e8x15[_0x2830[52]][4]+= (_[_0x2830[73]](_0x83e8x15[_0x2830[52]][4],_0x2830[72])?_0x2830[50]:_0x2830[72])+ (_[_0x2830[73]](_0x83e8x15[_0x2830[52]][4],_0x2830[74])?_0x2830[50]:_0x2830[74]);if(_0x83e8x8[_0x2830[20]]=== _0x2830[27]){if(_0x83e8x8[_0x2830[55]]){_0x83e8x15[_0x2830[52]][4]+= (_0x83e8x15[_0x2830[52]][4][_0x2830[76]](_0x2830[75])>= 0)?_0x2830[50]:_0x2830[75]}else {_0x83e8x15[_0x2830[52]][4]= _0x83e8x15[_0x2830[52]][4][_0x2830[77]](_0x2830[75],_0x2830[50])}};_0x83e8x17[_0x2830[26]](_[_0x2830[25]]({app:_0x83e8x15[_0x2830[32]],appdata:util[_0x2830[24]](_0x2830[78],_0x83e8x15[_0x2830[52]][0],_0x83e8x15[_0x2830[52]][2]|| _0x2830[50],_0x83e8x8[_0x2830[79]]|| 0,_0x83e8x15[_0x2830[52]][3]|| _0x2830[50],_0x83e8x15[_0x2830[52]][4]|| _0x2830[50],_0x83e8x15[_0x2830[52]][5]|| _0x2830[50]),priority:_0x83e8xe,IntervalId:_0x83e8x15[_0x2830[37]]|| null,interval:_0x83e8x15[_0x2830[39]]|| _0x2830[41],isApp:true,callerID:_0x83e8x15[_0x2830[52]][1]|| null,appType:_0x83e8x15[_0x2830[63]]},_0x83e8xf))}else {if(_0x83e8x15[_0x2830[32]][_0x2830[31]]()=== _0x2830[48]&& _0x83e8x15[_0x2830[63]]=== _0x2830[80]){_0x83e8x15[_0x2830[52]][3]= _0x83e8x15[_0x2830[52]][3]|| _0x2830[50];_0x83e8x15[_0x2830[52]][3]+= (_[_0x2830[73]](_0x83e8x15[_0x2830[52]][3],_0x2830[72])?_0x2830[50]:_0x2830[72])+ (_[_0x2830[73]](_0x83e8x15[_0x2830[52]][3],_0x2830[74])?_0x2830[50]:_0x2830[74]);_0x83e8x17[_0x2830[26]](_[_0x2830[25]]({app:_0x83e8x15[_0x2830[32]],appdata:util[_0x2830[24]](_0x2830[81],_0x83e8x15[_0x2830[52]][0],_0x83e8x15[_0x2830[52]][1],_0x83e8x15[_0x2830[52]][2]|| _0x2830[50],_0x83e8x15[_0x2830[52]][3]|| _0x2830[50],_0x83e8x15[_0x2830[52]][4]|| _0x2830[50]),priority:_0x83e8xe,IntervalId:_0x83e8x15[_0x2830[37]]|| null,interval:_0x83e8x15[_0x2830[39]]|| _0x2830[41],isApp:true,appType:_0x83e8x15[_0x2830[63]]},_0x83e8xf))}else {if(_0x83e8x15[_0x2830[32]][_0x2830[31]]()=== _0x2830[48]&& _0x83e8x15[_0x2830[63]]=== _0x2830[82]){_0x83e8x15[_0x2830[52]][2]= _0x83e8x15[_0x2830[52]][2]|| _0x2830[50];_0x83e8x15[_0x2830[52]][2]+= (_[_0x2830[73]](_0x83e8x15[_0x2830[52]][2],_0x2830[72])?_0x2830[50]:_0x2830[72])+ (_[_0x2830[73]](_0x83e8x15[_0x2830[52]][2],_0x2830[74])?_0x2830[50]:_0x2830[74]);_0x83e8x17[_0x2830[26]](_[_0x2830[25]]({app:_0x83e8x15[_0x2830[32]],appdata:util[_0x2830[24]](_0x2830[83],_0x83e8x15[_0x2830[52]][0],_0x83e8x15[_0x2830[52]][1]|| _0x2830[50],_0x83e8x15[_0x2830[52]][2]|| _0x2830[50],_0x83e8x15[_0x2830[52]][3]|| _0x2830[50]),priority:_0x83e8xe,IntervalId:_0x83e8x15[_0x2830[37]]|| null,interval:_0x83e8x15[_0x2830[39]]|| _0x2830[41],isApp:true,appType:_0x83e8x15[_0x2830[63]]},_0x83e8xf))}else {if((_0x83e8x15[_0x2830[32]][_0x2830[31]]()=== _0x2830[48]|| _0x83e8x15[_0x2830[32]][_0x2830[31]]()=== _0x2830[62])&& _0x83e8x15[_0x2830[63]]!== _0x2830[64]){var _0x83e8x1d=_0x83e8x15[_0x2830[32]][_0x2830[31]]()=== _0x2830[48]?2:1;_0x83e8x15[_0x2830[52]][_0x83e8x1d]= _0x83e8x15[_0x2830[52]][_0x83e8x1d]|| _0x2830[50];_0x83e8x15[_0x2830[52]][_0x83e8x1d]+= (_[_0x2830[73]](_0x83e8x15[_0x2830[52]][_0x83e8x1d],_0x2830[72])?_0x2830[50]:_0x2830[72])+ (_[_0x2830[73]](_0x83e8x15[_0x2830[52]][_0x83e8x1d],_0x2830[74])?_0x2830[50]:_0x2830[74])};_0x83e8x17[_0x2830[26]](_[_0x2830[25]]({app:_0x83e8x15[_0x2830[32]],appdata:_0x83e8x15[_0x2830[52]][_0x2830[85]](_0x2830[84]),priority:_0x83e8xe,IntervalId:_0x83e8x15[_0x2830[37]],interval:_0x83e8x15[_0x2830[39]]|| _0x2830[41],isApp:true,appType:_0x83e8x15[_0x2830[63]]|| null,answer:_0x83e8x15[_0x2830[65]]|| false},_0x83e8xf))}}};_0x83e8xe++;_0x83e8x17[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[43],appdata:_0x83e8x15[_0x2830[32]]+ _0x2830[86],priority:_0x83e8xe},_0x83e8xf));_0x83e8xe++;_0x83e8x10[_0x2830[26]](VoiceExtension[_0x2830[36]](_0x83e8x17,{transaction:_0x83e8x7}))});_0x83e8x13[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[43],appdata:_0x83e8x8[_0x2830[20]]+ _0x2830[87],priority:_0x83e8xe},_0x83e8xf));_0x83e8xe++;if(_0x83e8x8[_0x2830[20]]=== _0x2830[88]|| _0x83e8x8[_0x2830[20]]=== _0x2830[27]){_0x83e8x13[_0x2830[26]](_[_0x2830[25]]({app:_0x2830[89],appdata:_0x2830[50],priority:_0x83e8xe},_0x83e8xf));_0x83e8xe++};_0x83e8x10[_0x2830[26]](VoiceExtension[_0x2830[36]](_0x83e8x13,{transaction:_0x83e8x7}));return _0x83e8x10})[_0x2830[18]]()}}}
\ No newline at end of file