Built motion from commit 464be02.|0.0.84
[motion.git] / server / config / ami / voice_context.js
index eedd445..1bb36d6 100644 (file)
@@ -1 +1 @@
-var _0x9c04=["\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","\x68","\x6E","\x61\x6E\x79","\x48\x61\x6E\x67\x75\x70","\x68\x61\x6E\x67\x75\x70\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65\x64","\x63\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];var VoiceContext=require(_0x9c04[1])[_0x9c04[0]];var VoiceExtension=require(_0x9c04[1])[_0x9c04[2]];var fs=require(_0x9c04[3]);var util=require(_0x9c04[4]);var path=require(_0x9c04[5]);var config=require(_0x9c04[6]);function Context(_0x5ba5x8){VoiceContext[_0x9c04[12]](function(_0x5ba5x9){if(_0x5ba5x9[_0x9c04[8]](_0x9c04[7])){throw  new Error(_0x9c04[9])};if(_0x5ba5x9[_0x9c04[10]]){throw  new Error(_0x9c04[11])}});VoiceContext[_0x9c04[14]](function(_0x5ba5xa){if(_0x5ba5xa[_0x9c04[10]]){throw  new Error(_0x9c04[13])}});VoiceContext[_0x9c04[15]](function(_0x5ba5xb){rewriteContexts(_0x5ba5xb,_0x5ba5x8,false);createHangup(_0x5ba5xb)});VoiceContext[_0x9c04[16]](function(_0x5ba5xb){rewriteContexts(_0x5ba5xb,_0x5ba5x8,true)})}function rewriteContexts(_0x5ba5xb,_0x5ba5x8,_0x5ba5xd){var _0x5ba5xe=_0x9c04[17];if(!_0x5ba5xd){_0x5ba5xe=util[_0x9c04[19]](_0x9c04[18],_0x5ba5xb[_0x9c04[7]],_0x5ba5xb[_0x9c04[7]])};VoiceContext[_0x9c04[35]]({where:{id:{$ne:_0x5ba5xb[_0x9c04[34]]}}})[_0x9c04[33]](function(_0x5ba5x10){_0x5ba5x10[_0x9c04[22]](function(_0x5ba5x11){_0x5ba5xe+=util[_0x9c04[19]](_0x9c04[18],_0x5ba5x11[_0x9c04[7]],_0x5ba5x11[_0x9c04[7]])});fs[_0x9c04[32]](path[_0x9c04[25]](config[_0x9c04[23]],_0x9c04[24]),_0x5ba5xe,{flags:_0x9c04[26],mode:parseInt(_0x9c04[27],8)},function(_0x5ba5xf){if(_0x5ba5xf){throw _0x5ba5xf};console[_0x9c04[20]](_0x9c04[28]);_0x5ba5x8[_0x9c04[31]]({Action:_0x9c04[29]},function(_0x5ba5xf,_0x5ba5x12){if(_0x5ba5xf){console[_0x9c04[30]](_0x5ba5xf)}else {console[_0x9c04[20]](_0x5ba5x12)}})})})[_0x9c04[21]](function(_0x5ba5xf){console[_0x9c04[20]](_0x5ba5xf)})}function createHangup(_0x5ba5xb){var _0x5ba5x14={context:_0x5ba5xb[_0x9c04[7]],exten:_0x9c04[36],priority:_0x9c04[37],VoiceContextId:_0x5ba5xb[_0x9c04[34]],type:_0x9c04[38],app:_0x9c04[39]};VoiceExtension[_0x9c04[41]](_0x5ba5x14)[_0x9c04[33]](function(_0x5ba5x12){console[_0x9c04[20]](_0x9c04[40])})[_0x9c04[21]](function(_0x5ba5xf){console[_0x9c04[20]](_0x5ba5xf)})}module[_0x9c04[42]]=Context
\ No newline at end of file
+var _0x6914=["\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","\x68","\x6E","\x61\x6E\x79","\x48\x61\x6E\x67\x75\x70","\x68\x61\x6E\x67\x75\x70\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65\x64","\x63\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];var VoiceContext=require(_0x6914[1])[_0x6914[0]];var VoiceExtension=require(_0x6914[1])[_0x6914[2]];var fs=require(_0x6914[3]);var util=require(_0x6914[4]);var path=require(_0x6914[5]);var config=require(_0x6914[6]);function Context(_0x1ff0x8){VoiceContext[_0x6914[12]](function(_0x1ff0x9){if(_0x1ff0x9[_0x6914[8]](_0x6914[7])){throw  new Error(_0x6914[9])};if(_0x1ff0x9[_0x6914[10]]){throw  new Error(_0x6914[11])}});VoiceContext[_0x6914[14]](function(_0x1ff0xa){if(_0x1ff0xa[_0x6914[10]]){throw  new Error(_0x6914[13])}});VoiceContext[_0x6914[15]](function(_0x1ff0xb){rewriteContexts(_0x1ff0xb,_0x1ff0x8,false);createHangup(_0x1ff0xb)});VoiceContext[_0x6914[16]](function(_0x1ff0xb){rewriteContexts(_0x1ff0xb,_0x1ff0x8,true)})}function rewriteContexts(_0x1ff0xb,_0x1ff0x8,_0x1ff0xd){var _0x1ff0xe=_0x6914[17];if(!_0x1ff0xd){_0x1ff0xe=util[_0x6914[19]](_0x6914[18],_0x1ff0xb[_0x6914[7]],_0x1ff0xb[_0x6914[7]])};VoiceContext[_0x6914[35]]({where:{id:{$ne:_0x1ff0xb[_0x6914[34]]}}})[_0x6914[33]](function(_0x1ff0x10){_0x1ff0x10[_0x6914[22]](function(_0x1ff0x11){_0x1ff0xe+=util[_0x6914[19]](_0x6914[18],_0x1ff0x11[_0x6914[7]],_0x1ff0x11[_0x6914[7]])});fs[_0x6914[32]](path[_0x6914[25]](config[_0x6914[23]],_0x6914[24]),_0x1ff0xe,{flags:_0x6914[26],mode:parseInt(_0x6914[27],8)},function(_0x1ff0xf){if(_0x1ff0xf){throw _0x1ff0xf};console[_0x6914[20]](_0x6914[28]);_0x1ff0x8[_0x6914[31]]({Action:_0x6914[29]},function(_0x1ff0xf,_0x1ff0x12){if(_0x1ff0xf){console[_0x6914[30]](_0x1ff0xf)}else {console[_0x6914[20]](_0x1ff0x12)}})})})[_0x6914[21]](function(_0x1ff0xf){console[_0x6914[20]](_0x1ff0xf)})}function createHangup(_0x1ff0xb){var _0x1ff0x14={context:_0x1ff0xb[_0x6914[7]],exten:_0x6914[36],priority:_0x6914[37],VoiceContextId:_0x1ff0xb[_0x6914[34]],type:_0x6914[38],app:_0x6914[39]};VoiceExtension[_0x6914[41]](_0x1ff0x14)[_0x6914[33]](function(_0x1ff0x12){console[_0x6914[20]](_0x6914[40])})[_0x6914[21]](function(_0x1ff0xf){console[_0x6914[20]](_0x1ff0xf)})}module[_0x6914[42]]=Context
\ No newline at end of file