Built motion from commit 8dae768.|0.0.121
[motion.git] / server / config / ami / voice_context.js
index 934ee27..76b3775 100644 (file)
@@ -1 +1 @@
-var _0x54dc=["\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\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(_0x54dc[1])[_0x54dc[0]];var VoiceExtension=require(_0x54dc[1])[_0x54dc[2]];var fs=require(_0x54dc[3]);var util=require(_0x54dc[4]);var path=require(_0x54dc[5]);var config=require(_0x54dc[6]);function Context(_0xb5f1x8){VoiceContext[_0x54dc[12]](function(_0xb5f1x9){if(_0xb5f1x9[_0x54dc[8]](_0x54dc[7])){throw  new Error(_0x54dc[9])};if(_0xb5f1x9[_0x54dc[10]]){throw  new Error(_0x54dc[11])}});VoiceContext[_0x54dc[14]](function(_0xb5f1xa){if(_0xb5f1xa[_0x54dc[10]]){throw  new Error(_0x54dc[13])}});VoiceContext[_0x54dc[15]](function(_0xb5f1xb){rewriteContexts(_0xb5f1xb,_0xb5f1x8,false);createHangup(_0xb5f1xb)});VoiceContext[_0x54dc[16]](function(_0xb5f1xb){rewriteContexts(_0xb5f1xb,_0xb5f1x8,true)})}function rewriteContexts(_0xb5f1xb,_0xb5f1x8,_0xb5f1xd){var _0xb5f1xe=_0x54dc[17];if(!_0xb5f1xd){_0xb5f1xe=util[_0x54dc[19]](_0x54dc[18],_0xb5f1xb[_0x54dc[7]])};VoiceContext[_0x54dc[35]]({where:{id:{$ne:_0xb5f1xb[_0x54dc[34]]}}})[_0x54dc[33]](function(_0xb5f1x10){_0xb5f1x10[_0x54dc[22]](function(_0xb5f1x11){_0xb5f1xe+=util[_0x54dc[19]](_0x54dc[18],_0xb5f1x11[_0x54dc[7]])});fs[_0x54dc[32]](path[_0x54dc[25]](config[_0x54dc[23]],_0x54dc[24]),_0xb5f1xe,{flags:_0x54dc[26],mode:parseInt(_0x54dc[27],8)},function(_0xb5f1xf){if(_0xb5f1xf){throw _0xb5f1xf};console[_0x54dc[20]](_0x54dc[28]);_0xb5f1x8[_0x54dc[31]]({Action:_0x54dc[29]},function(_0xb5f1xf,_0xb5f1x12){if(_0xb5f1xf){console[_0x54dc[30]](_0xb5f1xf)}else {console[_0x54dc[20]](_0xb5f1x12)}})})})[_0x54dc[21]](function(_0xb5f1xf){console[_0x54dc[20]](_0xb5f1xf)})}function createHangup(_0xb5f1xb){var _0xb5f1x14={context:_0xb5f1xb[_0x54dc[7]],exten:_0x54dc[36],priority:_0x54dc[37],VoiceContextId:_0xb5f1xb[_0x54dc[34]],type:_0x54dc[38],app:_0x54dc[39]};VoiceExtension[_0x54dc[41]](_0xb5f1x14)[_0x54dc[33]](function(_0xb5f1x12){console[_0x54dc[20]](_0x54dc[40])})[_0x54dc[21]](function(_0xb5f1xf){console[_0x54dc[20]](_0xb5f1xf)})}module[_0x54dc[42]]=Context
\ No newline at end of file
+var _0xc16d=["\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(_0xc16d[1])[_0xc16d[0]];var VoiceExtension=require(_0xc16d[1])[_0xc16d[2]];var fs=require(_0xc16d[3]);var util=require(_0xc16d[4]);var path=require(_0xc16d[5]);var config=require(_0xc16d[6]);function Context(_0x18dfx8){VoiceContext[_0xc16d[12]](function(_0x18dfx9){if(_0x18dfx9[_0xc16d[8]](_0xc16d[7])){throw  new Error(_0xc16d[9])};if(_0x18dfx9[_0xc16d[10]]){throw  new Error(_0xc16d[11])}});VoiceContext[_0xc16d[14]](function(_0x18dfxa){if(_0x18dfxa[_0xc16d[10]]){throw  new Error(_0xc16d[13])}});VoiceContext[_0xc16d[15]](function(_0x18dfxb){rewriteContexts(_0x18dfxb,_0x18dfx8,false);createHangup(_0x18dfxb)});VoiceContext[_0xc16d[16]](function(_0x18dfxb){rewriteContexts(_0x18dfxb,_0x18dfx8,true)})}function rewriteContexts(_0x18dfxb,_0x18dfx8,_0x18dfxd){var _0x18dfxe=_0xc16d[17];if(!_0x18dfxd){_0x18dfxe= util[_0xc16d[19]](_0xc16d[18],_0x18dfxb[_0xc16d[7]],_0x18dfxb[_0xc16d[7]])};VoiceContext[_0xc16d[35]]({where:{id:{$ne:_0x18dfxb[_0xc16d[34]]}}})[_0xc16d[33]](function(_0x18dfx10){_0x18dfx10[_0xc16d[22]](function(_0x18dfx11){_0x18dfxe+= util[_0xc16d[19]](_0xc16d[18],_0x18dfx11[_0xc16d[7]],_0x18dfx11[_0xc16d[7]])});fs[_0xc16d[32]](path[_0xc16d[25]](config[_0xc16d[23]],_0xc16d[24]),_0x18dfxe,{flags:_0xc16d[26],mode:parseInt(_0xc16d[27],8)},function(_0x18dfxf){if(_0x18dfxf){throw _0x18dfxf};console[_0xc16d[20]](_0xc16d[28]);_0x18dfx8[_0xc16d[31]]({Action:_0xc16d[29]},function(_0x18dfxf,_0x18dfx12){if(_0x18dfxf){console[_0xc16d[30]](_0x18dfxf)}else {console[_0xc16d[20]](_0x18dfx12)}})})})[_0xc16d[21]](function(_0x18dfxf){console[_0xc16d[20]](_0x18dfxf)})}function createHangup(_0x18dfxb){console[_0xc16d[20]](_0xc16d[36],_0x18dfxb[_0xc16d[7]]);var _0x18dfx14=[{context:_0x18dfxb[_0xc16d[7]],exten:_0xc16d[37],priority:_0xc16d[38],VoiceContextId:_0x18dfxb[_0xc16d[34]],type:_0xc16d[39],app:_0xc16d[40]},{context:_0x18dfxb[_0xc16d[7]],exten:_0xc16d[41],priority:_0xc16d[38],VoiceContextId:_0x18dfxb[_0xc16d[34]],type:_0xc16d[39],app:_0xc16d[40]}];return VoiceExtension[_0xc16d[43]](_0x18dfx14)[_0xc16d[33]](function(_0x18dfx12){console[_0xc16d[20]](_0xc16d[42])})[_0xc16d[21]](function(_0x18dfxf){console[_0xc16d[20]](_0x18dfxf)})}module[_0xc16d[44]]= Context
\ No newline at end of file