Built motion from commit 712a57186.|1.0.37
[motion.git] / server / utils / voice_extension.js
index 41552c5..d3bfc87 100644 (file)
@@ -1 +1 @@
-var _0xe973=["\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"];_0xe973[0];var _=require(_0xe973[1]);var util=require(_0xe973[2]);var Interval=require(_0xe973[4])[_0xe973[3]];var sequelize=require(_0xe973[4])[_0xe973[5]];var VoiceExtension=require(_0xe973[4])[_0xe973[6]];exports[_0xe973[7]]= createApplications;exports[_0xe973[8]]= function(_0xc846x6,_0xc846x7){var sequelize=require(_0xe973[4])[_0xe973[5]];var VoiceExtension=require(_0xe973[4])[_0xe973[6]];if(_0xc846x6[_0xe973[10]][_0xe973[9]]){delete _0xc846x6[_0xe973[10]][_0xe973[9]]};return VoiceExtension[_0xe973[17]](_0xc846x6[_0xe973[10]],{where:{id:_0xc846x6[_0xe973[15]][_0xe973[9]]},transaction:_0xc846x7})[_0xe973[11]](function(_0xc846x8){if(_0xc846x6[_0xe973[10]][_0xe973[12]]){_0xc846x6[_0xe973[10]][_0xe973[9]]= _0xc846x6[_0xe973[15]][_0xe973[9]];return VoiceExtension[_0xe973[16]]({where:{VoiceExtensionId:_0xc846x6[_0xe973[15]][_0xe973[9]]},transaction:_0xc846x7})}})[_0xe973[11]](function(){if(_0xc846x6[_0xe973[10]][_0xe973[12]]&& Array[_0xe973[13]](_0xc846x6[_0xe973[10]].Applications)&& _0xc846x6[_0xe973[10]][_0xe973[12]][_0xe973[14]]){return _0xc846x6[_0xe973[10]]}})[_0xe973[11]](createApplications(_0xc846x6[_0xe973[10]].Applications,_0xc846x7))};function createApplications(_0xc846xa,_0xc846x7){var Interval=require(_0xe973[4])[_0xe973[3]];var VoiceExtension=require(_0xe973[4])[_0xe973[6]];return function(_0xc846x8){if(_0xc846x8){return Interval[_0xe973[89]]()[_0xe973[11]](function(_0xc846xb){var _0xc846xc=false;var _0xc846xd=false;var _0xc846xe=2;var _0xc846xf={exten:_0xc846x8[_0xe973[19]],type:_0xc846x8[_0xe973[20]],context:_0xc846x8[_0xe973[21]],VoiceExtensionId:_0xc846x8[_0xe973[9]]};var _0xc846x10=[];var _0xc846x11=8;var _0xc846x12=[],_0xc846x13=[];_0xc846x12[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[22],appdata:util[_0xe973[24]](_0xe973[23],_0xc846x8[_0xe973[20]]),priority:_0xc846xe},_0xc846xf));_0xc846xe++;if(_0xc846x8[_0xe973[20]]=== _0xe973[27]){_0xc846x12[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[22],appdata:util[_0xe973[24]](_0xe973[28],_0xc846x8[_0xe973[29]]|| _0xe973[30]),priority:_0xc846xe},_0xc846xf));_0xc846xe++};var _0xc846x14=_[_0xe973[34]](_0xc846xa,function(_0xc846x15){return _0xc846x15[_0xe973[32]][_0xe973[31]]()=== _0xe973[33]});if(_0xc846x14){_0xc846x12[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[22],appdata:_0xe973[35],priority:_0xc846xe},_0xc846xf));_0xc846xe++};_0xc846x10[_0xe973[26]](VoiceExtension[_0xe973[36]](_0xc846x12,{transaction:_0xc846x7}));_0xc846xa[_0xe973[47]](function(_0xc846x15){var _0xc846x16=[];var _0xc846x17=[];if(_0xc846x15[_0xe973[37]]){var _0xc846x18=_[_0xe973[38]](_0xc846xb,{IntervalId:_0xc846x15[_0xe973[37]]});_0xc846x16= _0xc846x18[_0xe973[14]]?_[_0xe973[40]](_0xc846x18,_0xe973[39]):[_0xe973[41]];var _0xc846x19=_[_0xe973[34]](_0xc846xb,{id:_0xc846x15[_0xe973[37]]});_0xc846x15[_0xe973[39]]= _0xc846x19?_0xc846x19[_0xe973[42]]:_0xe973[41]}else {_0xc846x16= [_0xc846x15[_0xe973[39]]]};_0xc846x17[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[43],appdata:_0xc846x15[_0xe973[32]]+ _0xe973[44],priority:_0xc846xe},_0xc846xf));_0xc846xe++;var _0xc846x1a=_0xc846x16[_0xe973[14]];_0xc846x16[_0xe973[47]](function(_0xc846x1b,_0xc846x1c){_0xc846x17[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[45],appdata:util[_0xe973[24]](_0xe973[46],_0xc846x1b,_0xc846x8[_0xe973[21]],_0xc846xe+ (_0xc846x1a- _0xc846x1c),_0xc846x8[_0xe973[21]],((_0xc846x1c+ 1)< _0xc846x1a)?_0xc846xe+ 1:_0xc846xe+ _0xc846x11),priority:_0xc846xe},_0xc846xf));_0xc846xe++});if(_0xc846x15[_0xe973[32]][_0xe973[31]]()=== _0xe973[48]&& _0xc846x8[_0xe973[20]]=== _0xe973[27]){_0xc846x17[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[22],appdata:util[_0xe973[24]](_0xe973[49],_0xc846x8[_0xe973[9]]|| _0xe973[50]),priority:_0xc846xe},_0xc846xf))}else {_0xc846x17[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[43],appdata:_0xe973[51],priority:_0xc846xe},_0xc846xf))};_0xc846xe++;if(_0xc846x15[_0xe973[32]][_0xe973[31]]()=== _0xe973[48]&& _0xc846x8[_0xe973[20]]=== _0xe973[27]&& _0xc846x15[_0xe973[52]][1]){_0xc846x17[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[22],appdata:util[_0xe973[24]](_0xe973[53],_0xc846x15[_0xe973[52]][1]),priority:_0xc846xe},_0xc846xf))}else {_0xc846x17[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[43],appdata:_0xe973[54],priority:_0xc846xe},_0xc846xf))};_0xc846xe++;if(_0xc846x15[_0xe973[32]][_0xe973[31]]()=== _0xe973[48]&& _0xc846x8[_0xe973[55]]&& _0xc846x8[_0xe973[20]]=== _0xe973[27]){_0xc846x17[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[56],appdata:_0xe973[57]+ (_0xc846x8[_0xe973[58]]|| _0xe973[59])+ _0xe973[60],priority:_0xc846xe},_0xc846xf))}else {_0xc846x17[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[43],appdata:_0xe973[61],priority:_0xc846xe},_0xc846xf))};_0xc846xe++;if(_0xc846x15[_0xe973[32]][_0xe973[31]]()=== _0xe973[62]&& _0xc846x15[_0xe973[63]]!== _0xe973[64]&&  !_0xc846x15[_0xe973[65]]&&  !_0xc846xd&&  !_0xc846xc){_0xc846x17[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[66],appdata:_0xe973[50],priority:_0xc846xe},_0xc846xf));_0xc846xd= true}else {_0xc846x17[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[43],appdata:_0xe973[67],priority:_0xc846xe},_0xc846xf))};_0xc846xe++;if((_0xc846x15[_0xe973[32]][_0xe973[31]]()=== _0xe973[62]|| _0xc846x15[_0xe973[32]][_0xe973[31]]()=== _0xe973[68])&& _0xc846x15[_0xe973[63]]!== _0xe973[64]&& _0xc846x15[_0xe973[65]]&&  !_0xc846xc){_0xc846x17[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[69],appdata:_0xe973[50],priority:_0xc846xe},_0xc846xf));_0xc846xc= true;_0xc846xd= true}else {_0xc846x17[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[43],appdata:_0xe973[70],priority:_0xc846xe},_0xc846xf))};_0xc846xe++;if(_0xc846x15[_0xe973[32]][_0xe973[31]]()=== _0xe973[48]&& _0xc846x15[_0xe973[63]]=== _0xe973[71]){_0xc846x15[_0xe973[52]][4]= _0xc846x15[_0xe973[52]][4]|| _0xe973[50];_0xc846x15[_0xe973[52]][4]+= (_[_0xe973[73]](_0xc846x15[_0xe973[52]][4],_0xe973[72])?_0xe973[50]:_0xe973[72])+ (_[_0xe973[73]](_0xc846x15[_0xe973[52]][4],_0xe973[74])?_0xe973[50]:_0xe973[74]);_0xc846x17[_0xe973[26]](_[_0xe973[25]]({app:_0xc846x15[_0xe973[32]],appdata:util[_0xe973[24]](_0xe973[75],_0xc846x15[_0xe973[52]][0],_0xc846x15[_0xe973[52]][2]|| _0xe973[50],_0xc846x8[_0xe973[76]]|| 0,_0xc846x15[_0xe973[52]][3]|| _0xe973[50],_0xc846x15[_0xe973[52]][4]|| _0xe973[50],_0xc846x15[_0xe973[52]][5]|| _0xe973[50]),priority:_0xc846xe,IntervalId:_0xc846x15[_0xe973[37]]|| null,interval:_0xc846x15[_0xe973[39]]|| _0xe973[41],isApp:true,callerID:_0xc846x15[_0xe973[52]][1]|| null,appType:_0xc846x15[_0xe973[63]]},_0xc846xf))}else {if(_0xc846x15[_0xe973[32]][_0xe973[31]]()=== _0xe973[48]&& _0xc846x15[_0xe973[63]]=== _0xe973[77]){_0xc846x15[_0xe973[52]][3]= _0xc846x15[_0xe973[52]][3]|| _0xe973[50];_0xc846x15[_0xe973[52]][3]+= (_[_0xe973[73]](_0xc846x15[_0xe973[52]][3],_0xe973[72])?_0xe973[50]:_0xe973[72])+ (_[_0xe973[73]](_0xc846x15[_0xe973[52]][3],_0xe973[74])?_0xe973[50]:_0xe973[74]);_0xc846x17[_0xe973[26]](_[_0xe973[25]]({app:_0xc846x15[_0xe973[32]],appdata:util[_0xe973[24]](_0xe973[78],_0xc846x15[_0xe973[52]][0],_0xc846x15[_0xe973[52]][1],_0xc846x15[_0xe973[52]][2]|| _0xe973[50],_0xc846x15[_0xe973[52]][3]|| _0xe973[50],_0xc846x15[_0xe973[52]][4]|| _0xe973[50]),priority:_0xc846xe,IntervalId:_0xc846x15[_0xe973[37]]|| null,interval:_0xc846x15[_0xe973[39]]|| _0xe973[41],isApp:true,appType:_0xc846x15[_0xe973[63]]},_0xc846xf))}else {if(_0xc846x15[_0xe973[32]][_0xe973[31]]()=== _0xe973[48]&& _0xc846x15[_0xe973[63]]=== _0xe973[79]){_0xc846x15[_0xe973[52]][2]= _0xc846x15[_0xe973[52]][2]|| _0xe973[50];_0xc846x15[_0xe973[52]][2]+= (_[_0xe973[73]](_0xc846x15[_0xe973[52]][2],_0xe973[72])?_0xe973[50]:_0xe973[72])+ (_[_0xe973[73]](_0xc846x15[_0xe973[52]][2],_0xe973[74])?_0xe973[50]:_0xe973[74]);_0xc846x17[_0xe973[26]](_[_0xe973[25]]({app:_0xc846x15[_0xe973[32]],appdata:util[_0xe973[24]](_0xe973[80],_0xc846x15[_0xe973[52]][0],_0xc846x15[_0xe973[52]][1]|| _0xe973[50],_0xc846x15[_0xe973[52]][2]|| _0xe973[50],_0xc846x15[_0xe973[52]][3]|| _0xe973[50]),priority:_0xc846xe,IntervalId:_0xc846x15[_0xe973[37]]|| null,interval:_0xc846x15[_0xe973[39]]|| _0xe973[41],isApp:true,appType:_0xc846x15[_0xe973[63]]},_0xc846xf))}else {if((_0xc846x15[_0xe973[32]][_0xe973[31]]()=== _0xe973[48]|| _0xc846x15[_0xe973[32]][_0xe973[31]]()=== _0xe973[62])&& _0xc846x15[_0xe973[63]]!== _0xe973[64]){var _0xc846x1d=_0xc846x15[_0xe973[32]][_0xe973[31]]()=== _0xe973[48]?2:1;_0xc846x15[_0xe973[52]][_0xc846x1d]= _0xc846x15[_0xe973[52]][_0xc846x1d]|| _0xe973[50];_0xc846x15[_0xe973[52]][_0xc846x1d]+= (_[_0xe973[73]](_0xc846x15[_0xe973[52]][_0xc846x1d],_0xe973[72])?_0xe973[50]:_0xe973[72])+ (_[_0xe973[73]](_0xc846x15[_0xe973[52]][_0xc846x1d],_0xe973[74])?_0xe973[50]:_0xe973[74])};_0xc846x17[_0xe973[26]](_[_0xe973[25]]({app:_0xc846x15[_0xe973[32]],appdata:_0xc846x15[_0xe973[52]][_0xe973[82]](_0xe973[81]),priority:_0xc846xe,IntervalId:_0xc846x15[_0xe973[37]],interval:_0xc846x15[_0xe973[39]]|| _0xe973[41],isApp:true,appType:_0xc846x15[_0xe973[63]]|| null,answer:_0xc846x15[_0xe973[65]]|| false},_0xc846xf))}}};_0xc846xe++;if(_0xc846x15[_0xe973[32]][_0xe973[31]]()=== _0xe973[48]&& _0xc846x8[_0xe973[55]]&& _0xc846x8[_0xe973[20]]=== _0xe973[27]){_0xc846x17[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[83],appdata:_0xe973[50],priority:_0xc846xe},_0xc846xf))}else {_0xc846x17[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[43],appdata:_0xe973[84],priority:_0xc846xe},_0xc846xf))};_0xc846xe++;_0xc846x17[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[43],appdata:_0xc846x15[_0xe973[32]]+ _0xe973[85],priority:_0xc846xe},_0xc846xf));_0xc846xe++;_0xc846x10[_0xe973[26]](VoiceExtension[_0xe973[36]](_0xc846x17,{transaction:_0xc846x7}))});_0xc846x13[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[43],appdata:_0xc846x8[_0xe973[20]]+ _0xe973[86],priority:_0xc846xe},_0xc846xf));_0xc846xe++;if(_0xc846x8[_0xe973[20]]=== _0xe973[87]|| _0xc846x8[_0xe973[20]]=== _0xe973[27]){_0xc846x13[_0xe973[26]](_[_0xe973[25]]({app:_0xe973[88],appdata:_0xe973[50],priority:_0xc846xe},_0xc846xf));_0xc846xe++};_0xc846x10[_0xe973[26]](VoiceExtension[_0xe973[36]](_0xc846x13,{transaction:_0xc846x7}));return _0xc846x10})[_0xe973[18]]()}}}
\ No newline at end of file
+var _0xa7c4=["\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"];_0xa7c4[0];var _=require(_0xa7c4[1]);var util=require(_0xa7c4[2]);var Interval=require(_0xa7c4[4])[_0xa7c4[3]];var sequelize=require(_0xa7c4[4])[_0xa7c4[5]];var VoiceExtension=require(_0xa7c4[4])[_0xa7c4[6]];exports[_0xa7c4[7]]= createApplications;exports[_0xa7c4[8]]= function(_0x66afx6,_0x66afx7){var sequelize=require(_0xa7c4[4])[_0xa7c4[5]];var VoiceExtension=require(_0xa7c4[4])[_0xa7c4[6]];if(_0x66afx6[_0xa7c4[10]][_0xa7c4[9]]){delete _0x66afx6[_0xa7c4[10]][_0xa7c4[9]]};return VoiceExtension[_0xa7c4[17]](_0x66afx6[_0xa7c4[10]],{where:{id:_0x66afx6[_0xa7c4[15]][_0xa7c4[9]]},transaction:_0x66afx7})[_0xa7c4[11]](function(_0x66afx8){if(_0x66afx6[_0xa7c4[10]][_0xa7c4[12]]){_0x66afx6[_0xa7c4[10]][_0xa7c4[9]]= _0x66afx6[_0xa7c4[15]][_0xa7c4[9]];return VoiceExtension[_0xa7c4[16]]({where:{VoiceExtensionId:_0x66afx6[_0xa7c4[15]][_0xa7c4[9]]},transaction:_0x66afx7})}})[_0xa7c4[11]](function(){if(_0x66afx6[_0xa7c4[10]][_0xa7c4[12]]&& Array[_0xa7c4[13]](_0x66afx6[_0xa7c4[10]].Applications)&& _0x66afx6[_0xa7c4[10]][_0xa7c4[12]][_0xa7c4[14]]){return _0x66afx6[_0xa7c4[10]]}})[_0xa7c4[11]](createApplications(_0x66afx6[_0xa7c4[10]].Applications,_0x66afx7))};function createApplications(_0x66afxa,_0x66afx7){var Interval=require(_0xa7c4[4])[_0xa7c4[3]];var VoiceExtension=require(_0xa7c4[4])[_0xa7c4[6]];return function(_0x66afx8){if(_0x66afx8){return Interval[_0xa7c4[90]]()[_0xa7c4[11]](function(_0x66afxb){var _0x66afxc=false;var _0x66afxd=false;var _0x66afxe=2;var _0x66afxf={exten:_0x66afx8[_0xa7c4[19]],type:_0x66afx8[_0xa7c4[20]],context:_0x66afx8[_0xa7c4[21]],VoiceExtensionId:_0x66afx8[_0xa7c4[9]]};var _0x66afx10=[];var _0x66afx11=8;var _0x66afx12=[],_0x66afx13=[];_0x66afx12[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[22],appdata:util[_0xa7c4[24]](_0xa7c4[23],_0x66afx8[_0xa7c4[20]]),priority:_0x66afxe},_0x66afxf));_0x66afxe++;if(_0x66afx8[_0xa7c4[20]]=== _0xa7c4[27]){_0x66afx12[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[22],appdata:util[_0xa7c4[24]](_0xa7c4[28],_0x66afx8[_0xa7c4[29]]|| _0xa7c4[30]),priority:_0x66afxe},_0x66afxf));_0x66afxe++};var _0x66afx14=_[_0xa7c4[34]](_0x66afxa,function(_0x66afx15){return _0x66afx15[_0xa7c4[32]][_0xa7c4[31]]()=== _0xa7c4[33]});if(_0x66afx14){_0x66afx12[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[22],appdata:_0xa7c4[35],priority:_0x66afxe},_0x66afxf));_0x66afxe++};_0x66afx10[_0xa7c4[26]](VoiceExtension[_0xa7c4[36]](_0x66afx12,{transaction:_0x66afx7}));_0x66afxa[_0xa7c4[47]](function(_0x66afx15){var _0x66afx16=[];var _0x66afx17=[];if(_0x66afx15[_0xa7c4[37]]){var _0x66afx18=_[_0xa7c4[38]](_0x66afxb,{IntervalId:_0x66afx15[_0xa7c4[37]]});_0x66afx16= _0x66afx18[_0xa7c4[14]]?_[_0xa7c4[40]](_0x66afx18,_0xa7c4[39]):[_0xa7c4[41]];var _0x66afx19=_[_0xa7c4[34]](_0x66afxb,{id:_0x66afx15[_0xa7c4[37]]});_0x66afx15[_0xa7c4[39]]= _0x66afx19?_0x66afx19[_0xa7c4[42]]:_0xa7c4[41]}else {_0x66afx16= [_0x66afx15[_0xa7c4[39]]]};_0x66afx17[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[43],appdata:_0x66afx15[_0xa7c4[32]]+ _0xa7c4[44],priority:_0x66afxe},_0x66afxf));_0x66afxe++;var _0x66afx1a=_0x66afx16[_0xa7c4[14]];_0x66afx16[_0xa7c4[47]](function(_0x66afx1b,_0x66afx1c){_0x66afx17[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[45],appdata:util[_0xa7c4[24]](_0xa7c4[46],_0x66afx1b,_0x66afx8[_0xa7c4[21]],_0x66afxe+ (_0x66afx1a- _0x66afx1c),_0x66afx8[_0xa7c4[21]],((_0x66afx1c+ 1)< _0x66afx1a)?_0x66afxe+ 1:_0x66afxe+ _0x66afx11),priority:_0x66afxe},_0x66afxf));_0x66afxe++});if(_0x66afx15[_0xa7c4[32]][_0xa7c4[31]]()=== _0xa7c4[48]&& _0x66afx8[_0xa7c4[20]]=== _0xa7c4[27]){_0x66afx17[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[22],appdata:util[_0xa7c4[24]](_0xa7c4[49],_0x66afx8[_0xa7c4[9]]|| _0xa7c4[50]),priority:_0x66afxe},_0x66afxf))}else {_0x66afx17[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[43],appdata:_0xa7c4[51],priority:_0x66afxe},_0x66afxf))};_0x66afxe++;if(_0x66afx15[_0xa7c4[32]][_0xa7c4[31]]()=== _0xa7c4[48]&& _0x66afx8[_0xa7c4[20]]=== _0xa7c4[27]&& _0x66afx15[_0xa7c4[52]][1]){_0x66afx17[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[22],appdata:util[_0xa7c4[24]](_0xa7c4[53],_0x66afx15[_0xa7c4[52]][1]),priority:_0x66afxe},_0x66afxf))}else {_0x66afx17[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[43],appdata:_0xa7c4[54],priority:_0x66afxe},_0x66afxf))};_0x66afxe++;if(_0x66afx15[_0xa7c4[32]][_0xa7c4[31]]()=== _0xa7c4[48]&& _0x66afx8[_0xa7c4[55]]&& _0x66afx8[_0xa7c4[20]]=== _0xa7c4[27]){_0x66afx17[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[22],appdata:_0xa7c4[56],priority:_0x66afxe},_0x66afxf));_0x66afxe++;_0x66afx17[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[22],appdata:_0xa7c4[57]+ _0x66afx8[_0xa7c4[58]]|| _0xa7c4[59],priority:_0x66afxe},_0x66afxf));_0x66afxe++}else {_0x66afx17[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[43],appdata:_0xa7c4[60],priority:_0x66afxe},_0x66afxf));_0x66afxe++;_0x66afx17[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[43],appdata:_0xa7c4[61],priority:_0x66afxe},_0x66afxf));_0x66afxe++};if(_0x66afx15[_0xa7c4[32]][_0xa7c4[31]]()=== _0xa7c4[62]&& _0x66afx15[_0xa7c4[63]]!== _0xa7c4[64]&&  !_0x66afx15[_0xa7c4[65]]&&  !_0x66afxd&&  !_0x66afxc){_0x66afx17[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[66],appdata:_0xa7c4[50],priority:_0x66afxe},_0x66afxf));_0x66afxd= true}else {_0x66afx17[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[43],appdata:_0xa7c4[67],priority:_0x66afxe},_0x66afxf))};_0x66afxe++;if((_0x66afx15[_0xa7c4[32]][_0xa7c4[31]]()=== _0xa7c4[62]|| _0x66afx15[_0xa7c4[32]][_0xa7c4[31]]()=== _0xa7c4[68])&& _0x66afx15[_0xa7c4[63]]!== _0xa7c4[64]&& _0x66afx15[_0xa7c4[65]]&&  !_0x66afxc){_0x66afx17[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[69],appdata:_0xa7c4[50],priority:_0x66afxe},_0x66afxf));_0x66afxc= true;_0x66afxd= true}else {_0x66afx17[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[43],appdata:_0xa7c4[70],priority:_0x66afxe},_0x66afxf))};_0x66afxe++;if(_0x66afx15[_0xa7c4[32]][_0xa7c4[31]]()=== _0xa7c4[48]&& _0x66afx15[_0xa7c4[63]]=== _0xa7c4[71]){_0x66afx15[_0xa7c4[52]][4]= _0x66afx15[_0xa7c4[52]][4]|| _0xa7c4[50];_0x66afx15[_0xa7c4[52]][4]+= (_[_0xa7c4[73]](_0x66afx15[_0xa7c4[52]][4],_0xa7c4[72])?_0xa7c4[50]:_0xa7c4[72])+ (_[_0xa7c4[73]](_0x66afx15[_0xa7c4[52]][4],_0xa7c4[74])?_0xa7c4[50]:_0xa7c4[74]);if(_0x66afx8[_0xa7c4[20]]=== _0xa7c4[27]){if(_0x66afx8[_0xa7c4[55]]){_0x66afx15[_0xa7c4[52]][4]+= (_0x66afx15[_0xa7c4[52]][4][_0xa7c4[76]](_0xa7c4[75])>= 0)?_0xa7c4[50]:_0xa7c4[75]}else {_0x66afx15[_0xa7c4[52]][4]= _0x66afx15[_0xa7c4[52]][4][_0xa7c4[77]](_0xa7c4[75],_0xa7c4[50])}};_0x66afx17[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0x66afx15[_0xa7c4[32]],appdata:util[_0xa7c4[24]](_0xa7c4[78],_0x66afx15[_0xa7c4[52]][0],_0x66afx15[_0xa7c4[52]][2]|| _0xa7c4[50],_0x66afx8[_0xa7c4[79]]|| 0,_0x66afx15[_0xa7c4[52]][3]|| _0xa7c4[50],_0x66afx15[_0xa7c4[52]][4]|| _0xa7c4[50],_0x66afx15[_0xa7c4[52]][5]|| _0xa7c4[50]),priority:_0x66afxe,IntervalId:_0x66afx15[_0xa7c4[37]]|| null,interval:_0x66afx15[_0xa7c4[39]]|| _0xa7c4[41],isApp:true,callerID:_0x66afx15[_0xa7c4[52]][1]|| null,appType:_0x66afx15[_0xa7c4[63]]},_0x66afxf))}else {if(_0x66afx15[_0xa7c4[32]][_0xa7c4[31]]()=== _0xa7c4[48]&& _0x66afx15[_0xa7c4[63]]=== _0xa7c4[80]){_0x66afx15[_0xa7c4[52]][3]= _0x66afx15[_0xa7c4[52]][3]|| _0xa7c4[50];_0x66afx15[_0xa7c4[52]][3]+= (_[_0xa7c4[73]](_0x66afx15[_0xa7c4[52]][3],_0xa7c4[72])?_0xa7c4[50]:_0xa7c4[72])+ (_[_0xa7c4[73]](_0x66afx15[_0xa7c4[52]][3],_0xa7c4[74])?_0xa7c4[50]:_0xa7c4[74]);_0x66afx17[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0x66afx15[_0xa7c4[32]],appdata:util[_0xa7c4[24]](_0xa7c4[81],_0x66afx15[_0xa7c4[52]][0],_0x66afx15[_0xa7c4[52]][1],_0x66afx15[_0xa7c4[52]][2]|| _0xa7c4[50],_0x66afx15[_0xa7c4[52]][3]|| _0xa7c4[50],_0x66afx15[_0xa7c4[52]][4]|| _0xa7c4[50]),priority:_0x66afxe,IntervalId:_0x66afx15[_0xa7c4[37]]|| null,interval:_0x66afx15[_0xa7c4[39]]|| _0xa7c4[41],isApp:true,appType:_0x66afx15[_0xa7c4[63]]},_0x66afxf))}else {if(_0x66afx15[_0xa7c4[32]][_0xa7c4[31]]()=== _0xa7c4[48]&& _0x66afx15[_0xa7c4[63]]=== _0xa7c4[82]){_0x66afx15[_0xa7c4[52]][2]= _0x66afx15[_0xa7c4[52]][2]|| _0xa7c4[50];_0x66afx15[_0xa7c4[52]][2]+= (_[_0xa7c4[73]](_0x66afx15[_0xa7c4[52]][2],_0xa7c4[72])?_0xa7c4[50]:_0xa7c4[72])+ (_[_0xa7c4[73]](_0x66afx15[_0xa7c4[52]][2],_0xa7c4[74])?_0xa7c4[50]:_0xa7c4[74]);_0x66afx17[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0x66afx15[_0xa7c4[32]],appdata:util[_0xa7c4[24]](_0xa7c4[83],_0x66afx15[_0xa7c4[52]][0],_0x66afx15[_0xa7c4[52]][1]|| _0xa7c4[50],_0x66afx15[_0xa7c4[52]][2]|| _0xa7c4[50],_0x66afx15[_0xa7c4[52]][3]|| _0xa7c4[50]),priority:_0x66afxe,IntervalId:_0x66afx15[_0xa7c4[37]]|| null,interval:_0x66afx15[_0xa7c4[39]]|| _0xa7c4[41],isApp:true,appType:_0x66afx15[_0xa7c4[63]]},_0x66afxf))}else {if((_0x66afx15[_0xa7c4[32]][_0xa7c4[31]]()=== _0xa7c4[48]|| _0x66afx15[_0xa7c4[32]][_0xa7c4[31]]()=== _0xa7c4[62])&& _0x66afx15[_0xa7c4[63]]!== _0xa7c4[64]){var _0x66afx1d=_0x66afx15[_0xa7c4[32]][_0xa7c4[31]]()=== _0xa7c4[48]?2:1;_0x66afx15[_0xa7c4[52]][_0x66afx1d]= _0x66afx15[_0xa7c4[52]][_0x66afx1d]|| _0xa7c4[50];_0x66afx15[_0xa7c4[52]][_0x66afx1d]+= (_[_0xa7c4[73]](_0x66afx15[_0xa7c4[52]][_0x66afx1d],_0xa7c4[72])?_0xa7c4[50]:_0xa7c4[72])+ (_[_0xa7c4[73]](_0x66afx15[_0xa7c4[52]][_0x66afx1d],_0xa7c4[74])?_0xa7c4[50]:_0xa7c4[74])};_0x66afx17[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0x66afx15[_0xa7c4[32]],appdata:_0x66afx15[_0xa7c4[52]][_0xa7c4[85]](_0xa7c4[84]),priority:_0x66afxe,IntervalId:_0x66afx15[_0xa7c4[37]],interval:_0x66afx15[_0xa7c4[39]]|| _0xa7c4[41],isApp:true,appType:_0x66afx15[_0xa7c4[63]]|| null,answer:_0x66afx15[_0xa7c4[65]]|| false},_0x66afxf))}}};_0x66afxe++;_0x66afx17[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[43],appdata:_0x66afx15[_0xa7c4[32]]+ _0xa7c4[86],priority:_0x66afxe},_0x66afxf));_0x66afxe++;_0x66afx10[_0xa7c4[26]](VoiceExtension[_0xa7c4[36]](_0x66afx17,{transaction:_0x66afx7}))});_0x66afx13[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[43],appdata:_0x66afx8[_0xa7c4[20]]+ _0xa7c4[87],priority:_0x66afxe},_0x66afxf));_0x66afxe++;if(_0x66afx8[_0xa7c4[20]]=== _0xa7c4[88]|| _0x66afx8[_0xa7c4[20]]=== _0xa7c4[27]){_0x66afx13[_0xa7c4[26]](_[_0xa7c4[25]]({app:_0xa7c4[89],appdata:_0xa7c4[50],priority:_0x66afxe},_0x66afxf));_0x66afxe++};_0x66afx10[_0xa7c4[26]](VoiceExtension[_0xa7c4[36]](_0x66afx13,{transaction:_0x66afx7}));return _0x66afx10})[_0xa7c4[18]]()}}}
\ No newline at end of file