16344c9a0b4277fff44c6234498812e05be74acf
[motion.git] / server / config / ami / index.js
1 var _0xd23a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x70\x61\x74\x68","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x72\x75\x6E\x6B","\x41\x63\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x4E\x65\x74\x77\x6F\x72\x6B","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x72\x6F\x75\x74\x69\x6E\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x61\x6D\x69","\x6A\x6F\x69\x6E","\x66\x6F\x72\x6B","\x65\x72\x72\x6F\x72","\x45\x52\x52\x4F\x52\x20\x4F\x4E\x20\x41\x4D\x49\x20\x53\x45\x52\x56\x49\x43\x45","\x6D\x65\x73\x73\x61\x67\x65","\x66\x6F\x72\x6D\x61\x74","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x41\x4D\x49\x20\x53\x45\x52\x56\x49\x43\x45\x20\x45\x58\x49\x54\x45\x44\x20\x57\x49\x54\x48\x20\x43\x4F\x44\x45\x20\x25\x73","\x6C\x6F\x67","\x64\x6F\x63","\x69\x6E\x69\x74\x46\x61\x78\x53\x63\x68\x65\x64\x75\x6C\x65\x72","\x74\x79\x70\x65","\x6E\x61\x6D\x65","\x63\x68\x61\x6E\x67\x65\x64","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x6D\x6F\x64\x69\x66\x79\x20\x61\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x6E\x61\x6D\x65","\x64\x65\x66\x61\x75\x6C\x74\x45\x6E\x74\x72\x79","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x6D\x6F\x64\x69\x66\x79\x20\x61\x20\x64\x65\x66\x61\x75\x6C\x74\x20\x63\x6F\x6E\x74\x65\x78\x74","\x62\x65\x66\x6F\x72\x65\x55\x70\x64\x61\x74\x65","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x64\x65\x6C\x65\x74\x65\x20\x61\x20\x64\x65\x66\x61\x75\x6C\x74\x20\x63\x6F\x6E\x74\x65\x78\x74","\x62\x65\x66\x6F\x72\x65\x44\x65\x73\x74\x72\x6F\x79","\x65\x76\x74","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x72\x6F\x6C\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x55\x73\x65\x72\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x54\x72\x75\x6E\x6B\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x54\x72\x75\x6E\x6B\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x6B\x65\x79\x42\x79","\x54\x72\x75\x6E\x6B\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x41\x63\x74\x69\x6F\x6E\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x62\x6F\x64\x79","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x2E\x62\x65\x66\x6F\x72\x65\x43\x72\x65\x61\x74\x65","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x75\x73\x65\x72","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x46\x61\x78\x52\x6F\x6F\x6D\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x69\x6E\x69\x74","\x4E\x65\x74\x77\x6F\x72\x6B\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x4E\x65\x74\x77\x6F\x72\x6B\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x4E\x65\x74\x77\x6F\x72\x6B\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xd23a[0];const path=require(_0xd23a[1]);const cp=require(_0xd23a[2]);const _=require(_0xd23a[3]);const util=require(_0xd23a[4]);const config=require(_0xd23a[5]);const User=require(_0xd23a[7])[_0xd23a[6]];const Trunk=require(_0xd23a[7])[_0xd23a[8]];const Action=require(_0xd23a[7])[_0xd23a[9]];const ReportMember=require(_0xd23a[7])[_0xd23a[10]];const FaxMessage=require(_0xd23a[7])[_0xd23a[11]];const ReportFax=require(_0xd23a[7])[_0xd23a[12]];const FaxRoom=require(_0xd23a[7])[_0xd23a[13]];const FaxAccount=require(_0xd23a[7])[_0xd23a[14]];const VoiceContext=require(_0xd23a[7])[_0xd23a[15]];const Network=require(_0xd23a[7])[_0xd23a[16]];const VoiceQueue=require(_0xd23a[7])[_0xd23a[17]];const Scheduler=require(_0xd23a[18]);var cpAmi=cp[_0xd23a[21]](path[_0xd23a[20]](__dirname,_0xd23a[19]));cpAmi[_0xd23a[26]](_0xd23a[24],function(_0x7eb4x15){switch(_0x7eb4x15[_0xd23a[32]]){case _0xd23a[31]:handleInitFaxScheduler(_0x7eb4x15[_0xd23a[30]]);break;default:}})[_0xd23a[26]](_0xd23a[27],function(_0x7eb4x14){console[_0xd23a[29]](util[_0xd23a[25]](_0xd23a[28],_0x7eb4x14))})[_0xd23a[26]](_0xd23a[22],function(_0x7eb4x13){console[_0xd23a[22]](util[_0xd23a[25]](_0xd23a[23],_0x7eb4x13[_0xd23a[24]]))});VoiceContext[_0xd23a[38]](function(_0x7eb4x16,_0x7eb4x17){if(_0x7eb4x16[_0xd23a[34]](_0xd23a[33])){throw  new Error(_0xd23a[35])};if(_0x7eb4x16[_0xd23a[36]]){throw  new Error(_0xd23a[37])}});VoiceContext[_0xd23a[40]](function(_0x7eb4x16,_0x7eb4x17){if(_0x7eb4x16[_0xd23a[36]]){throw  new Error(_0xd23a[39])}});VoiceContext[_0xd23a[45]](function(_0x7eb4x16,_0x7eb4x17){_0x7eb4x16[_0xd23a[42]][_0xd23a[41]]= _0xd23a[43];cpAmi[_0xd23a[44]](_0x7eb4x16[_0xd23a[42]])});User[_0xd23a[51]](function(_0x7eb4x16,_0x7eb4x17){if(_[_0xd23a[49]]([_0xd23a[46],_0xd23a[47]],_0x7eb4x16[_0xd23a[48]])){_0x7eb4x16[_0xd23a[42]][_0xd23a[41]]= _0xd23a[50];cpAmi[_0xd23a[44]](_0x7eb4x16[_0xd23a[42]])}});VoiceContext[_0xd23a[53]](function(_0x7eb4x16,_0x7eb4x17){_0x7eb4x16[_0xd23a[42]][_0xd23a[41]]= _0xd23a[52];cpAmi[_0xd23a[44]](_0x7eb4x16[_0xd23a[42]])});Trunk[_0xd23a[45]](function(_0x7eb4x16,_0x7eb4x17){_0x7eb4x16[_0xd23a[42]][_0xd23a[41]]= _0xd23a[54];cpAmi[_0xd23a[44]](_0x7eb4x16[_0xd23a[42]])});Trunk[_0xd23a[51]](function(_0x7eb4x16,_0x7eb4x17){_0x7eb4x16[_0xd23a[42]][_0xd23a[41]]= _0xd23a[55];_0x7eb4x16[_0xd23a[42]][_0xd23a[34]]= _[_0xd23a[56]](_0x7eb4x16[_0xd23a[34]]());cpAmi[_0xd23a[44]](_0x7eb4x16[_0xd23a[42]])});Trunk[_0xd23a[53]](function(_0x7eb4x16,_0x7eb4x17){_0x7eb4x16[_0xd23a[42]][_0xd23a[41]]= _0xd23a[57];cpAmi[_0xd23a[44]](_0x7eb4x16[_0xd23a[42]])});Action[_0xd23a[45]](function(_0x7eb4x16,_0x7eb4x17){_0x7eb4x16[_0xd23a[42]][_0xd23a[41]]= _0xd23a[58];_0x7eb4x16[_0xd23a[42]][_0xd23a[59]]= {body:_0x7eb4x17[_0xd23a[60]]|| null};cpAmi[_0xd23a[44]](_0x7eb4x16[_0xd23a[42]])});ReportMember[_0xd23a[45]](function(_0x7eb4x16,_0x7eb4x17){_0x7eb4x16[_0xd23a[42]][_0xd23a[41]]= _0xd23a[61];cpAmi[_0xd23a[44]](_0x7eb4x16[_0xd23a[42]])});FaxMessage[_0xd23a[45]](function(_0x7eb4x16,_0x7eb4x17){var _0x7eb4x15={message:_0xd23a[62],doc:_0x7eb4x16[_0xd23a[42]],options:{user:_0x7eb4x17[_0xd23a[63]]|| null}};cpAmi[_0xd23a[44]](_0x7eb4x15)});FaxMessage[_0xd23a[51]](function(_0x7eb4x16,_0x7eb4x17){var _0x7eb4x15={message:_0xd23a[64],doc:_0x7eb4x16[_0xd23a[42]],options:{user:_0x7eb4x17[_0xd23a[63]]|| null,changed:_0x7eb4x16[_0xd23a[34]]()}};cpAmi[_0xd23a[44]](_0x7eb4x15)});ReportFax[_0xd23a[51]](function(_0x7eb4x16,_0x7eb4x17){var _0x7eb4x15={message:_0xd23a[65],doc:_0x7eb4x16[_0xd23a[42]],options:{user:_0x7eb4x17[_0xd23a[63]]|| null,changed:_0x7eb4x16[_0xd23a[34]]()}};cpAmi[_0xd23a[44]](_0x7eb4x15)});FaxRoom[_0xd23a[51]](function(_0x7eb4x16,_0x7eb4x17){var _0x7eb4x15={message:_0xd23a[66],doc:_0x7eb4x16[_0xd23a[42]],options:{user:_0x7eb4x17[_0xd23a[63]]|| null,changed:_0x7eb4x16[_0xd23a[34]]()}};cpAmi[_0xd23a[44]](_0x7eb4x15)});FaxAccount[_0xd23a[45]](function(_0x7eb4x16,_0x7eb4x17){var _0x7eb4x15={message:_0xd23a[67],doc:_0x7eb4x16[_0xd23a[42]],options:{user:_0x7eb4x17[_0xd23a[63]]|| null}};cpAmi[_0xd23a[44]](_0x7eb4x15)});FaxAccount[_0xd23a[51]](function(_0x7eb4x16,_0x7eb4x17){var _0x7eb4x15={message:_0xd23a[68],doc:_0x7eb4x16[_0xd23a[42]],options:{user:_0x7eb4x17[_0xd23a[63]]|| null,changed:_0x7eb4x16[_0xd23a[34]]()}};cpAmi[_0xd23a[44]](_0x7eb4x15)});FaxAccount[_0xd23a[53]](function(_0x7eb4x16,_0x7eb4x17){var _0x7eb4x15={message:_0xd23a[69],doc:_0x7eb4x16[_0xd23a[42]],options:{user:_0x7eb4x17[_0xd23a[63]]|| null}};cpAmi[_0xd23a[44]](_0x7eb4x15)});function handleInitFaxScheduler(_0x7eb4x15){var _0x7eb4x19= new Scheduler(_0x7eb4x15);_0x7eb4x19[_0xd23a[70]]()}Network[_0xd23a[45]](function(_0x7eb4x16,_0x7eb4x17){_0x7eb4x16[_0xd23a[42]][_0xd23a[41]]= _0xd23a[71];cpAmi[_0xd23a[44]](_0x7eb4x16[_0xd23a[42]])});Network[_0xd23a[51]](function(_0x7eb4x16,_0x7eb4x17){_0x7eb4x16[_0xd23a[42]][_0xd23a[41]]= _0xd23a[72];_0x7eb4x16[_0xd23a[42]][_0xd23a[34]]= _[_0xd23a[56]](_0x7eb4x16[_0xd23a[34]]());cpAmi[_0xd23a[44]](_0x7eb4x16[_0xd23a[42]])});Network[_0xd23a[53]](function(_0x7eb4x16,_0x7eb4x17){_0x7eb4x16[_0xd23a[42]][_0xd23a[41]]= _0xd23a[73];cpAmi[_0xd23a[44]](_0x7eb4x16[_0xd23a[42]])});VoiceQueue[_0xd23a[45]](function(_0x7eb4x16,_0x7eb4x17){_0x7eb4x16[_0xd23a[42]][_0xd23a[41]]= _0xd23a[74];cpAmi[_0xd23a[44]](_0x7eb4x16[_0xd23a[42]])});VoiceQueue[_0xd23a[51]](function(_0x7eb4x16,_0x7eb4x17){_0x7eb4x16[_0xd23a[42]][_0xd23a[41]]= _0xd23a[75];_0x7eb4x16[_0xd23a[42]][_0xd23a[34]]= _[_0xd23a[56]](_0x7eb4x16[_0xd23a[34]]());cpAmi[_0xd23a[44]](_0x7eb4x16[_0xd23a[42]])});VoiceQueue[_0xd23a[53]](function(_0x7eb4x16,_0x7eb4x17){_0x7eb4x16[_0xd23a[42]][_0xd23a[41]]= _0xd23a[76];cpAmi[_0xd23a[44]](_0x7eb4x16[_0xd23a[42]])});User[_0xd23a[45]](function(_0x7eb4x16,_0x7eb4x17){if(_0x7eb4x16[_0xd23a[48]]=== _0xd23a[46]){_0x7eb4x16[_0xd23a[42]][_0xd23a[41]]= _0xd23a[77];cpAmi[_0xd23a[44]](_0x7eb4x16[_0xd23a[42]])}});User[_0xd23a[51]](function(_0x7eb4x16,_0x7eb4x17){if(_0x7eb4x16[_0xd23a[48]]=== _0xd23a[46]|| _0x7eb4x16[_0xd23a[48]]=== _0xd23a[47]){_0x7eb4x16[_0xd23a[42]][_0xd23a[41]]= _0xd23a[78];_0x7eb4x16[_0xd23a[42]][_0xd23a[34]]= _[_0xd23a[56]](_0x7eb4x16[_0xd23a[34]]());cpAmi[_0xd23a[44]](_0x7eb4x16[_0xd23a[42]])}});User[_0xd23a[53]](function(_0x7eb4x16,_0x7eb4x17){if(_0x7eb4x16[_0xd23a[48]]=== _0xd23a[46]|| _0x7eb4x16[_0xd23a[48]]=== _0xd23a[47]){_0x7eb4x16[_0xd23a[42]][_0xd23a[41]]= _0xd23a[79];cpAmi[_0xd23a[44]](_0x7eb4x16[_0xd23a[42]])}});module[_0xd23a[80]]= cpAmi