Built motion from commit fa8c70b.|0.0.144
[motion.git] / server / config / ami / voice_context.js
index 2878a40..27597f2 100644 (file)
@@ -1 +1 @@
-var _0x8625=["\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\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\x6C\x65\x74\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","","\x5B\x25\x73\x5D\x0A\x69\x6E\x63\x6C\x75\x64\x65\x20\x3D\x3E\x20\x25\x73\x2D\x63\x75\x73\x74\x6F\x6D\x0A\x73\x77\x69\x74\x63\x68\x20\x3D\x3E\x20\x52\x65\x61\x6C\x74\x69\x6D\x65\x0A","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x66\x6F\x72\x45\x61\x63\x68","\x61\x73\x74\x65\x72\x69\x73\x6B\x43\x6F\x6E\x66","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x63\x6F\x6E\x74\x65\x78\x74\x73\x2E\x63\x6F\x6E\x66","\x6A\x6F\x69\x6E","\x77","\x30\x37\x37\x37","\x43\x6F\x6E\x74\x65\x78\x74\x73\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x52\x65\x6C\x6F\x61\x64","\x65\x72\x72\x6F\x72","\x61\x63\x74\x69\x6F\x6E","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x74\x68\x65\x6E","\x69\x64","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x68\x61\x6E\x67\x75\x70","\x68","\x31","\x73\x79\x73\x74\x65\x6D","\x48\x61\x6E\x67\x75\x70","\x66\x61\x69\x6C\x65\x64","\x68\x61\x6E\x67\x75\x70\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65\x64","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];var VoiceContext=require(_0x8625[1])[_0x8625[0]];var VoiceExtension=require(_0x8625[1])[_0x8625[2]];var fs=require(_0x8625[3]);var util=require(_0x8625[4]);var path=require(_0x8625[5]);var config=require(_0x8625[6]);function Context(_0x12bcx8){VoiceContext[_0x8625[12]](function(_0x12bcx9){if(_0x12bcx9[_0x8625[8]](_0x8625[7])){throw  new Error(_0x8625[9])};if(_0x12bcx9[_0x8625[10]]){throw  new Error(_0x8625[11])}});VoiceContext[_0x8625[14]](function(_0x12bcxa){if(_0x12bcxa[_0x8625[10]]){throw  new Error(_0x8625[13])}});VoiceContext[_0x8625[15]](function(_0x12bcxb){rewriteContexts(_0x12bcxb,_0x12bcx8,false);createHangup(_0x12bcxb)});VoiceContext[_0x8625[16]](function(_0x12bcxb){rewriteContexts(_0x12bcxb,_0x12bcx8,true)})}function rewriteContexts(_0x12bcxb,_0x12bcx8,_0x12bcxd){var _0x12bcxe=_0x8625[17];if(!_0x12bcxd){_0x12bcxe=util[_0x8625[19]](_0x8625[18],_0x12bcxb[_0x8625[7]],_0x12bcxb[_0x8625[7]])};VoiceContext[_0x8625[35]]({where:{id:{$ne:_0x12bcxb[_0x8625[34]]}}})[_0x8625[33]](function(_0x12bcx10){_0x12bcx10[_0x8625[22]](function(_0x12bcx11){_0x12bcxe+=util[_0x8625[19]](_0x8625[18],_0x12bcx11[_0x8625[7]],_0x12bcx11[_0x8625[7]])});fs[_0x8625[32]](path[_0x8625[25]](config[_0x8625[23]],_0x8625[24]),_0x12bcxe,{flags:_0x8625[26],mode:parseInt(_0x8625[27],8)},function(_0x12bcxf){if(_0x12bcxf){throw _0x12bcxf};console[_0x8625[20]](_0x8625[28]);_0x12bcx8[_0x8625[31]]({Action:_0x8625[29]},function(_0x12bcxf,_0x12bcx12){if(_0x12bcxf){console[_0x8625[30]](_0x12bcxf)}else {console[_0x8625[20]](_0x12bcx12)}})})})[_0x8625[21]](function(_0x12bcxf){console[_0x8625[20]](_0x12bcxf)})}function createHangup(_0x12bcxb){console[_0x8625[20]](_0x8625[36],_0x12bcxb[_0x8625[7]]);var _0x12bcx14=[{context:_0x12bcxb[_0x8625[7]],exten:_0x8625[37],priority:_0x8625[38],VoiceContextId:_0x12bcxb[_0x8625[34]],type:_0x8625[39],app:_0x8625[40]},{context:_0x12bcxb[_0x8625[7]],exten:_0x8625[41],priority:_0x8625[38],VoiceContextId:_0x12bcxb[_0x8625[34]],type:_0x8625[39],app:_0x8625[40]}];return VoiceExtension[_0x8625[43]](_0x12bcx14)[_0x8625[33]](function(_0x12bcx12){console[_0x8625[20]](_0x8625[42])})[_0x8625[21]](function(_0x12bcxf){console[_0x8625[20]](_0x12bcxf)})}module[_0x8625[44]]=Context
\ No newline at end of file
+var _0x1c28=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6D\x65\x73\x73\x61\x67\x65","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x2E\x61\x66\x74\x65\x72\x43\x72\x65\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","\x65\x76\x74","\x6F\x6E","","\x5B\x25\x73\x5D\x0A\x69\x6E\x63\x6C\x75\x64\x65\x20\x3D\x3E\x20\x25\x73\x2D\x63\x75\x73\x74\x6F\x6D\x0A\x73\x77\x69\x74\x63\x68\x20\x3D\x3E\x20\x52\x65\x61\x6C\x74\x69\x6D\x65\x0A","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x66\x6F\x72\x45\x61\x63\x68","\x61\x73\x74\x65\x72\x69\x73\x6B\x43\x6F\x6E\x66","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x63\x6F\x6E\x74\x65\x78\x74\x73\x2E\x63\x6F\x6E\x66","\x6A\x6F\x69\x6E","\x77","\x30\x37\x37\x37","\x43\x6F\x6E\x74\x65\x78\x74\x73\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x52\x65\x6C\x6F\x61\x64","\x65\x72\x72\x6F\x72","\x61\x63\x74\x69\x6F\x6E","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x74\x68\x65\x6E","\x69\x64","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x68\x61\x6E\x67\x75\x70","\x68","\x31","\x73\x79\x73\x74\x65\x6D","\x48\x61\x6E\x67\x75\x70","\x66\x61\x69\x6C\x65\x64","\x68\x61\x6E\x67\x75\x70\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65\x64","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x1c28[0];var VoiceContext=require(_0x1c28[2])[_0x1c28[1]];var VoiceExtension=require(_0x1c28[2])[_0x1c28[3]];var fs=require(_0x1c28[4]);var util=require(_0x1c28[5]);var path=require(_0x1c28[6]);var config=require(_0x1c28[7]);function Context(_0xadf4x8){process[_0x1c28[12]](_0x1c28[8],function(_0xadf4x9){switch(_0xadf4x9[_0x1c28[11]]){case _0x1c28[9]:rewriteContexts(_0xadf4x9,_0xadf4x8,false);createHangup(_0xadf4x9);break;case _0x1c28[10]:rewriteContexts(_0xadf4x9,_0xadf4x8,true);break;default:}})}function rewriteContexts(_0xadf4x9,_0xadf4x8,_0xadf4xb){var _0xadf4xc=_0x1c28[13];if(!_0xadf4xb){_0xadf4xc= util[_0x1c28[16]](_0x1c28[14],_0xadf4x9[_0x1c28[15]],_0xadf4x9[_0x1c28[15]])};VoiceContext[_0x1c28[32]]({where:{id:{$ne:_0xadf4x9[_0x1c28[31]]}}})[_0x1c28[30]](function(_0xadf4xe){_0xadf4xe[_0x1c28[19]](function(_0xadf4xf){_0xadf4xc+= util[_0x1c28[16]](_0x1c28[14],_0xadf4xf[_0x1c28[15]],_0xadf4xf[_0x1c28[15]])});fs[_0x1c28[29]](path[_0x1c28[22]](config[_0x1c28[20]],_0x1c28[21]),_0xadf4xc,{flags:_0x1c28[23],mode:parseInt(_0x1c28[24],8)},function(_0xadf4xd){if(_0xadf4xd){throw _0xadf4xd};console[_0x1c28[17]](_0x1c28[25]);_0xadf4x8[_0x1c28[28]]({Action:_0x1c28[26]},function(_0xadf4xd,_0xadf4x10){if(_0xadf4xd){console[_0x1c28[27]](_0xadf4xd)}else {console[_0x1c28[17]](_0xadf4x10)}})})})[_0x1c28[18]](function(_0xadf4xd){console[_0x1c28[17]](_0xadf4xd)})}function createHangup(_0xadf4x9){console[_0x1c28[17]](_0x1c28[33],_0xadf4x9[_0x1c28[15]]);var _0xadf4x12=[{context:_0xadf4x9[_0x1c28[15]],exten:_0x1c28[34],priority:_0x1c28[35],VoiceContextId:_0xadf4x9[_0x1c28[31]],type:_0x1c28[36],app:_0x1c28[37]},{context:_0xadf4x9[_0x1c28[15]],exten:_0x1c28[38],priority:_0x1c28[35],VoiceContextId:_0xadf4x9[_0x1c28[31]],type:_0x1c28[36],app:_0x1c28[37]}];return VoiceExtension[_0x1c28[40]](_0xadf4x12,{raw:true})[_0x1c28[30]](function(){console[_0x1c28[17]](_0x1c28[39])})[_0x1c28[18]](function(_0xadf4xd){console[_0x1c28[17]](_0xadf4xd)})}module[_0x1c28[41]]= Context
\ No newline at end of file