Built motion from commit 76c0fab.|0.0.109
[motion.git] / server / config / ami / voice_context.js
index ef1ea24..5988263 100644 (file)
@@ -1 +1 @@
-var _0x380a=["\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(_0x380a[1])[_0x380a[0]];var VoiceExtension=require(_0x380a[1])[_0x380a[2]];var fs=require(_0x380a[3]);var util=require(_0x380a[4]);var path=require(_0x380a[5]);var config=require(_0x380a[6]);function Context(_0x7e78x8){VoiceContext[_0x380a[12]](function(_0x7e78x9){if(_0x7e78x9[_0x380a[8]](_0x380a[7])){throw  new Error(_0x380a[9])};if(_0x7e78x9[_0x380a[10]]){throw  new Error(_0x380a[11])}});VoiceContext[_0x380a[14]](function(_0x7e78xa){if(_0x7e78xa[_0x380a[10]]){throw  new Error(_0x380a[13])}});VoiceContext[_0x380a[15]](function(_0x7e78xb){rewriteContexts(_0x7e78xb,_0x7e78x8,false);createHangup(_0x7e78xb)});VoiceContext[_0x380a[16]](function(_0x7e78xb){rewriteContexts(_0x7e78xb,_0x7e78x8,true)})}function rewriteContexts(_0x7e78xb,_0x7e78x8,_0x7e78xd){var _0x7e78xe=_0x380a[17];if(!_0x7e78xd){_0x7e78xe=util[_0x380a[19]](_0x380a[18],_0x7e78xb[_0x380a[7]],_0x7e78xb[_0x380a[7]])};VoiceContext[_0x380a[35]]({where:{id:{$ne:_0x7e78xb[_0x380a[34]]}}})[_0x380a[33]](function(_0x7e78x10){_0x7e78x10[_0x380a[22]](function(_0x7e78x11){_0x7e78xe+=util[_0x380a[19]](_0x380a[18],_0x7e78x11[_0x380a[7]],_0x7e78x11[_0x380a[7]])});fs[_0x380a[32]](path[_0x380a[25]](config[_0x380a[23]],_0x380a[24]),_0x7e78xe,{flags:_0x380a[26],mode:parseInt(_0x380a[27],8)},function(_0x7e78xf){if(_0x7e78xf){throw _0x7e78xf};console[_0x380a[20]](_0x380a[28]);_0x7e78x8[_0x380a[31]]({Action:_0x380a[29]},function(_0x7e78xf,_0x7e78x12){if(_0x7e78xf){console[_0x380a[30]](_0x7e78xf)}else {console[_0x380a[20]](_0x7e78x12)}})})})[_0x380a[21]](function(_0x7e78xf){console[_0x380a[20]](_0x7e78xf)})}function createHangup(_0x7e78xb){console[_0x380a[20]](_0x380a[36],_0x7e78xb[_0x380a[7]]);var _0x7e78x14=[{context:_0x7e78xb[_0x380a[7]],exten:_0x380a[37],priority:_0x380a[38],VoiceContextId:_0x7e78xb[_0x380a[34]],type:_0x380a[39],app:_0x380a[40]},{context:_0x7e78xb[_0x380a[7]],exten:_0x380a[41],priority:_0x380a[38],VoiceContextId:_0x7e78xb[_0x380a[34]],type:_0x380a[39],app:_0x380a[40]}];return VoiceExtension[_0x380a[43]](_0x7e78x14)[_0x380a[33]](function(_0x7e78x12){console[_0x380a[20]](_0x380a[42])})[_0x380a[21]](function(_0x7e78xf){console[_0x380a[20]](_0x7e78xf)})}module[_0x380a[44]]=Context
\ No newline at end of file
+var _0x1d51=["\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(_0x1d51[1])[_0x1d51[0]];var VoiceExtension=require(_0x1d51[1])[_0x1d51[2]];var fs=require(_0x1d51[3]);var util=require(_0x1d51[4]);var path=require(_0x1d51[5]);var config=require(_0x1d51[6]);function Context(_0x885cx8){VoiceContext[_0x1d51[12]](function(_0x885cx9){if(_0x885cx9[_0x1d51[8]](_0x1d51[7])){throw  new Error(_0x1d51[9])};if(_0x885cx9[_0x1d51[10]]){throw  new Error(_0x1d51[11])}});VoiceContext[_0x1d51[14]](function(_0x885cxa){if(_0x885cxa[_0x1d51[10]]){throw  new Error(_0x1d51[13])}});VoiceContext[_0x1d51[15]](function(_0x885cxb){rewriteContexts(_0x885cxb,_0x885cx8,false);createHangup(_0x885cxb)});VoiceContext[_0x1d51[16]](function(_0x885cxb){rewriteContexts(_0x885cxb,_0x885cx8,true)})}function rewriteContexts(_0x885cxb,_0x885cx8,_0x885cxd){var _0x885cxe=_0x1d51[17];if(!_0x885cxd){_0x885cxe=util[_0x1d51[19]](_0x1d51[18],_0x885cxb[_0x1d51[7]],_0x885cxb[_0x1d51[7]])};VoiceContext[_0x1d51[35]]({where:{id:{$ne:_0x885cxb[_0x1d51[34]]}}})[_0x1d51[33]](function(_0x885cx10){_0x885cx10[_0x1d51[22]](function(_0x885cx11){_0x885cxe+=util[_0x1d51[19]](_0x1d51[18],_0x885cx11[_0x1d51[7]],_0x885cx11[_0x1d51[7]])});fs[_0x1d51[32]](path[_0x1d51[25]](config[_0x1d51[23]],_0x1d51[24]),_0x885cxe,{flags:_0x1d51[26],mode:parseInt(_0x1d51[27],8)},function(_0x885cxf){if(_0x885cxf){throw _0x885cxf};console[_0x1d51[20]](_0x1d51[28]);_0x885cx8[_0x1d51[31]]({Action:_0x1d51[29]},function(_0x885cxf,_0x885cx12){if(_0x885cxf){console[_0x1d51[30]](_0x885cxf)}else {console[_0x1d51[20]](_0x885cx12)}})})})[_0x1d51[21]](function(_0x885cxf){console[_0x1d51[20]](_0x885cxf)})}function createHangup(_0x885cxb){console[_0x1d51[20]](_0x1d51[36],_0x885cxb[_0x1d51[7]]);var _0x885cx14=[{context:_0x885cxb[_0x1d51[7]],exten:_0x1d51[37],priority:_0x1d51[38],VoiceContextId:_0x885cxb[_0x1d51[34]],type:_0x1d51[39],app:_0x1d51[40]},{context:_0x885cxb[_0x1d51[7]],exten:_0x1d51[41],priority:_0x1d51[38],VoiceContextId:_0x885cxb[_0x1d51[34]],type:_0x1d51[39],app:_0x1d51[40]}];return VoiceExtension[_0x1d51[43]](_0x885cx14)[_0x1d51[33]](function(_0x885cx12){console[_0x1d51[20]](_0x1d51[42])})[_0x1d51[21]](function(_0x885cxf){console[_0x1d51[20]](_0x885cxf)})}module[_0x1d51[44]]=Context
\ No newline at end of file