Built motion from commit fa8c70b.|0.0.144
[motion.git] / server / config / ami / voice_context.js
index c07b704..27597f2 100644 (file)
@@ -1 +1 @@
-var _0xc14c=["\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(_0xc14c[1])[_0xc14c[0]];var VoiceExtension=require(_0xc14c[1])[_0xc14c[2]];var fs=require(_0xc14c[3]);var util=require(_0xc14c[4]);var path=require(_0xc14c[5]);var config=require(_0xc14c[6]);function Context(_0x1b27x8){VoiceContext[_0xc14c[12]](function(_0x1b27x9){if(_0x1b27x9[_0xc14c[8]](_0xc14c[7])){throw  new Error(_0xc14c[9])};if(_0x1b27x9[_0xc14c[10]]){throw  new Error(_0xc14c[11])}});VoiceContext[_0xc14c[14]](function(_0x1b27xa){if(_0x1b27xa[_0xc14c[10]]){throw  new Error(_0xc14c[13])}});VoiceContext[_0xc14c[15]](function(_0x1b27xb){rewriteContexts(_0x1b27xb,_0x1b27x8,false);createHangup(_0x1b27xb)});VoiceContext[_0xc14c[16]](function(_0x1b27xb){rewriteContexts(_0x1b27xb,_0x1b27x8,true)})}function rewriteContexts(_0x1b27xb,_0x1b27x8,_0x1b27xd){var _0x1b27xe=_0xc14c[17];if(!_0x1b27xd){_0x1b27xe= util[_0xc14c[19]](_0xc14c[18],_0x1b27xb[_0xc14c[7]],_0x1b27xb[_0xc14c[7]])};VoiceContext[_0xc14c[35]]({where:{id:{$ne:_0x1b27xb[_0xc14c[34]]}}})[_0xc14c[33]](function(_0x1b27x10){_0x1b27x10[_0xc14c[22]](function(_0x1b27x11){_0x1b27xe+= util[_0xc14c[19]](_0xc14c[18],_0x1b27x11[_0xc14c[7]],_0x1b27x11[_0xc14c[7]])});fs[_0xc14c[32]](path[_0xc14c[25]](config[_0xc14c[23]],_0xc14c[24]),_0x1b27xe,{flags:_0xc14c[26],mode:parseInt(_0xc14c[27],8)},function(_0x1b27xf){if(_0x1b27xf){throw _0x1b27xf};console[_0xc14c[20]](_0xc14c[28]);_0x1b27x8[_0xc14c[31]]({Action:_0xc14c[29]},function(_0x1b27xf,_0x1b27x12){if(_0x1b27xf){console[_0xc14c[30]](_0x1b27xf)}else {console[_0xc14c[20]](_0x1b27x12)}})})})[_0xc14c[21]](function(_0x1b27xf){console[_0xc14c[20]](_0x1b27xf)})}function createHangup(_0x1b27xb){console[_0xc14c[20]](_0xc14c[36],_0x1b27xb[_0xc14c[7]]);var _0x1b27x14=[{context:_0x1b27xb[_0xc14c[7]],exten:_0xc14c[37],priority:_0xc14c[38],VoiceContextId:_0x1b27xb[_0xc14c[34]],type:_0xc14c[39],app:_0xc14c[40]},{context:_0x1b27xb[_0xc14c[7]],exten:_0xc14c[41],priority:_0xc14c[38],VoiceContextId:_0x1b27xb[_0xc14c[34]],type:_0xc14c[39],app:_0xc14c[40]}];return VoiceExtension[_0xc14c[43]](_0x1b27x14)[_0xc14c[33]](function(_0x1b27x12){console[_0xc14c[20]](_0xc14c[42])})[_0xc14c[21]](function(_0x1b27xf){console[_0xc14c[20]](_0x1b27xf)})}module[_0xc14c[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