Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / services / agi / server.js
index bcc7b2f..b0f60ad 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x632f=['127.0.0.1','call','E_AGI_ARGUMENT_PORT','createServer','listen','listening','emit','connection','getConnections','error','E_AGI_SERVER_ERROR','E_AGI_SERVER_VOICE_DISABLED','E_AGI_SERVER_MAXCONNECTION','code','close','E_AGI_SERVER_CLOSE','exports','util','net','events','EventEmitter','./error','./channel'];(function(_0x2f1123,_0x4204a0){var _0x4f98e0=function(_0x24b63d){while(--_0x24b63d){_0x2f1123['push'](_0x2f1123['shift']());}};_0x4f98e0(++_0x4204a0);}(_0x632f,0x1f4));var _0xf632=function(_0x16d10f,_0x2ba2d5){_0x16d10f=_0x16d10f-0x0;var _0x50c823=_0x632f[_0x16d10f];return _0x50c823;};'use strict';var util=require(_0xf632('0x0'));var net=require(_0xf632('0x1'));var EventEmitter=require(_0xf632('0x2'))[_0xf632('0x3')];var AGIError=require(_0xf632('0x4'));var AGIChannel=require(_0xf632('0x5'));var AGIServer=function(_0x345043,_0x19b712,_0x175286){var _0x437e4d=this,_0x345043=_0x345043||0x11dd,_0x19b712=_0x19b712||_0xf632('0x6'),_0xfdf18d=null,_0x266159=0x0;EventEmitter[_0xf632('0x7')](_0x437e4d);function _0x4e9ba7(){if(!_0x345043){_0x437e4d['emit']('error',new AGIError(_0xf632('0x8')));return![];}_0xfdf18d=net[_0xf632('0x9')]();_0xfdf18d[_0xf632('0xa')](_0x345043,_0x19b712);_0xfdf18d['on'](_0xf632('0xb'),function(){_0x437e4d[_0xf632('0xc')](_0xf632('0xb'));});_0xfdf18d['on'](_0xf632('0xd'),function(_0x55684e){_0xfdf18d[_0xf632('0xe')](function(_0xbf92c7,_0x45dd49){if(_0xbf92c7){_0x437e4d['emit'](_0xf632('0xf'),new AGIError(_0xf632('0x10'),_0xbf92c7));}else if(_0x175286&&_0x175286<0x0){_0x437e4d[_0xf632('0xc')](_0xf632('0xf'),new AGIError(_0xf632('0x11')));_0x55684e['destroy']();}else if(_0x175286&&_0x175286>0x0&&_0x175286<_0x45dd49){_0x266159+=0x1;_0x437e4d[_0xf632('0xc')](_0xf632('0xf'),new AGIError(_0xf632('0x12'),_0x266159));_0x55684e['destroy']();}else{var _0x3eb75b=new AGIChannel(_0x55684e);_0x3eb75b['on']('ready',function(){_0x437e4d[_0xf632('0xc')]('connection',_0x3eb75b);});}});});_0xfdf18d['on']('error',function(_0x5a2d62){_0x437e4d['emit'](_0xf632('0xf'),new AGIError(_0xf632('0x10'),_0x5a2d62[_0xf632('0x13')]));});_0xfdf18d['on'](_0xf632('0x14'),function(){_0x437e4d[_0xf632('0xc')](_0xf632('0x14'),new AGIError(_0xf632('0x15')));});}process['nextTick'](function(){_0x4e9ba7();});};util['inherits'](AGIServer,EventEmitter);module[_0xf632('0x16')]=function(_0x253e03,_0x26aa78,_0x358864){return new AGIServer(_0x253e03,_0x26aa78,_0x358864);};
\ No newline at end of file
+var _0xd8b0=['getConnections','E_AGI_SERVER_ERROR','E_AGI_SERVER_VOICE_DISABLED','destroy','E_AGI_SERVER_MAXCONNECTION','ready','code','close','E_AGI_SERVER_CLOSE','nextTick','inherits','exports','util','net','./channel','127.0.0.1','call','error','E_AGI_ARGUMENT_PORT','listen','listening','emit','connection'];(function(_0x4b0f59,_0x427904){var _0x4219c2=function(_0x3adf72){while(--_0x3adf72){_0x4b0f59['push'](_0x4b0f59['shift']());}};_0x4219c2(++_0x427904);}(_0xd8b0,0xad));var _0x0d8b=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xd8b0[_0x122ef9];return _0x42fba0;};'use strict';var util=require(_0x0d8b('0x0'));var net=require(_0x0d8b('0x1'));var EventEmitter=require('events')['EventEmitter'];var AGIError=require('./error');var AGIChannel=require(_0x0d8b('0x2'));var AGIServer=function(_0x5b9b89,_0x43bca1,_0x364286){var _0x8196ed=this;var _0x577834=null;var _0x5e15e6=0x0;if(!_0x5b9b89)_0x5b9b89=0x11dd;if(!_0x43bca1)_0x43bca1=_0x0d8b('0x3');EventEmitter[_0x0d8b('0x4')](_0x8196ed);function _0x39f43a(){if(!_0x5b9b89){_0x8196ed['emit'](_0x0d8b('0x5'),new AGIError(_0x0d8b('0x6')));return![];}_0x577834=net['createServer']();_0x577834[_0x0d8b('0x7')](_0x5b9b89,_0x43bca1);_0x577834['on'](_0x0d8b('0x8'),function(){_0x8196ed[_0x0d8b('0x9')](_0x0d8b('0x8'));});_0x577834['on'](_0x0d8b('0xa'),function(_0x1cac62){_0x577834[_0x0d8b('0xb')](function(_0x28f87c,_0x48fa16){if(_0x28f87c){_0x8196ed[_0x0d8b('0x9')]('error',new AGIError(_0x0d8b('0xc'),_0x28f87c));}else if(_0x364286&&_0x364286<0x0){_0x8196ed[_0x0d8b('0x9')](_0x0d8b('0x5'),new AGIError(_0x0d8b('0xd')));_0x1cac62[_0x0d8b('0xe')]();}else if(_0x364286&&_0x364286>0x0&&_0x364286<_0x48fa16){_0x5e15e6+=0x1;_0x8196ed[_0x0d8b('0x9')](_0x0d8b('0x5'),new AGIError(_0x0d8b('0xf'),_0x5e15e6));_0x1cac62[_0x0d8b('0xe')]();}else{var _0x2ce75e=new AGIChannel(_0x1cac62);_0x2ce75e['on'](_0x0d8b('0x10'),function(){_0x8196ed[_0x0d8b('0x9')](_0x0d8b('0xa'),_0x2ce75e);});}});});_0x577834['on'](_0x0d8b('0x5'),function(_0x4f6f21){_0x8196ed[_0x0d8b('0x9')](_0x0d8b('0x5'),new AGIError(_0x0d8b('0xc'),_0x4f6f21[_0x0d8b('0x11')]));});_0x577834['on'](_0x0d8b('0x12'),function(){_0x8196ed['emit'](_0x0d8b('0x12'),new AGIError(_0x0d8b('0x13')));});}process[_0x0d8b('0x14')](function(){_0x39f43a();});};util[_0x0d8b('0x15')](AGIServer,EventEmitter);module[_0x0d8b('0x16')]=function(_0x18dd2d,_0x264b39,_0xa3612a){return new AGIServer(_0x18dd2d,_0x264b39,_0xa3612a);};
\ No newline at end of file