Built motion from commit a9fb64cc6defd8fb3a5cc199221f878e91c0e969. Version 3.0.0...
[motion-next.git] / server / services / agi / server.js
index 528a753..c97c586 100644 (file)
@@ -1 +1 @@
-const a1046_0x12d5=['ready','nextTick','E_AGI_SERVER_VOICE_DISABLED','emit','destroy','EventEmitter','close','connection','exports','./error','util','E_AGI_SERVER_MAXCONNECTION','./channel','call','E_AGI_SERVER_CLOSE','error','listen','inherits','createServer','code','E_AGI_ARGUMENT_PORT','getConnections','E_AGI_SERVER_ERROR'];(function(_0x293a05,_0x12d530){const _0x751259=function(_0x49f929){while(--_0x49f929){_0x293a05['push'](_0x293a05['shift']());}};_0x751259(++_0x12d530);}(a1046_0x12d5,0x1e8));const a1046_0x7512=function(_0x293a05,_0x12d530){_0x293a05=_0x293a05-0x0;let _0x751259=a1046_0x12d5[_0x293a05];return _0x751259;};const _0x16d574=a1046_0x7512;'use strict';const util=require(_0x16d574('0x5')),net=require('net'),EventEmitter=require('events')[_0x16d574('0x0')],AGIError=require(_0x16d574('0x4')),AGIChannel=require(_0x16d574('0x7')),AGIServer=function(_0x49f929,_0x4f87d4,_0x3995ff){const _0x3328b0=_0x16d574,_0x5715c5=this;_0x49f929=_0x49f929||0x11dd,_0x4f87d4=_0x4f87d4||'127.0.0.1';let _0x53a953=null,_0x249ba6=0x0;EventEmitter[_0x3328b0('0x8')](_0x5715c5);function _0x44f567(){const _0x16dfc5=_0x3328b0;if(!_0x49f929)return _0x5715c5[_0x16dfc5('0x15')]('error',new AGIError(_0x16dfc5('0xf'))),![];_0x53a953=net[_0x16dfc5('0xd')](),_0x53a953[_0x16dfc5('0xb')](_0x49f929,_0x4f87d4),_0x53a953['on']('listening',function(){const _0x3d826c=_0x16dfc5;_0x5715c5[_0x3d826c('0x15')]('listening');}),_0x53a953['on'](_0x16dfc5('0x2'),function(_0x46a86f){const _0x4345a3=_0x16dfc5;_0x53a953[_0x4345a3('0x10')](function(_0x598a07,_0x28e187){const _0x45ac1b=_0x4345a3;if(_0x598a07)_0x5715c5['emit']('error',new AGIError(_0x45ac1b('0x11'),_0x598a07));else{if(_0x3995ff&&_0x3995ff<0x0)_0x5715c5[_0x45ac1b('0x15')]('error',new AGIError(_0x45ac1b('0x14'))),_0x46a86f[_0x45ac1b('0x16')]();else{if(_0x3995ff&&_0x3995ff>0x0&&_0x3995ff<_0x28e187)_0x249ba6+=0x1,_0x5715c5[_0x45ac1b('0x15')](_0x45ac1b('0xa'),new AGIError(_0x45ac1b('0x6'),_0x249ba6)),_0x46a86f[_0x45ac1b('0x16')]();else{const _0x436da6=new AGIChannel(_0x46a86f);_0x436da6['on'](_0x45ac1b('0x12'),function(){const _0x45986b=_0x45ac1b;_0x5715c5[_0x45986b('0x15')](_0x45986b('0x2'),_0x436da6);});}}}});}),_0x53a953['on'](_0x16dfc5('0xa'),function(_0x277690){const _0x39bcf7=_0x16dfc5;_0x5715c5['emit'](_0x39bcf7('0xa'),new AGIError('E_AGI_SERVER_ERROR',_0x277690[_0x39bcf7('0xe')]));}),_0x53a953['on']('close',function(){const _0x3167f8=_0x16dfc5;_0x5715c5[_0x3167f8('0x15')](_0x3167f8('0x1'),new AGIError(_0x3167f8('0x9')));});}process[_0x3328b0('0x13')](function(){_0x44f567();});};util[_0x16d574('0xc')](AGIServer,EventEmitter),module[_0x16d574('0x3')]=function(_0x26afe6,_0x57cd72,_0x17af59){return new AGIServer(_0x26afe6,_0x57cd72,_0x17af59);};
\ No newline at end of file
+const a1046_0x1e6c=['127.0.0.1','E_AGI_SERVER_CLOSE','emit','error','E_AGI_SERVER_MAXCONNECTION','nextTick','ready','code','util','./channel','E_AGI_SERVER_VOICE_DISABLED','createServer','events','getConnections','call','connection','close','inherits','net','destroy'];(function(_0x47bae0,_0x1e6c88){const _0x38960d=function(_0x2f56ba){while(--_0x2f56ba){_0x47bae0['push'](_0x47bae0['shift']());}};_0x38960d(++_0x1e6c88);}(a1046_0x1e6c,0x149));const a1046_0x3896=function(_0x47bae0,_0x1e6c88){_0x47bae0=_0x47bae0-0x0;let _0x38960d=a1046_0x1e6c[_0x47bae0];return _0x38960d;};const _0x1e5f53=a1046_0x3896;'use strict';const util=require(_0x1e5f53('0x13')),net=require(_0x1e5f53('0x9')),EventEmitter=require(_0x1e5f53('0x3'))['EventEmitter'],AGIError=require('./error'),AGIChannel=require(_0x1e5f53('0x0')),AGIServer=function(_0x2f56ba,_0x2bea81,_0x33495d){const _0x5c8386=_0x1e5f53,_0x2092df=this;_0x2f56ba=_0x2f56ba||0x11dd,_0x2bea81=_0x2bea81||_0x5c8386('0xb');let _0x5e2fdf=null,_0x383a1d=0x0;EventEmitter[_0x5c8386('0x5')](_0x2092df);function _0x1210f1(){const _0x46915d=_0x5c8386;if(!_0x2f56ba)return _0x2092df['emit'](_0x46915d('0xe'),new AGIError('E_AGI_ARGUMENT_PORT')),![];_0x5e2fdf=net[_0x46915d('0x2')](),_0x5e2fdf['listen'](_0x2f56ba,_0x2bea81),_0x5e2fdf['on']('listening',function(){_0x2092df['emit']('listening');}),_0x5e2fdf['on']('connection',function(_0x2fc4f5){const _0x4b7e26=_0x46915d;_0x5e2fdf[_0x4b7e26('0x4')](function(_0x254872,_0x267755){const _0x337149=_0x4b7e26;if(_0x254872)_0x2092df[_0x337149('0xd')](_0x337149('0xe'),new AGIError('E_AGI_SERVER_ERROR',_0x254872));else{if(_0x33495d&&_0x33495d<0x0)_0x2092df[_0x337149('0xd')](_0x337149('0xe'),new AGIError(_0x337149('0x1'))),_0x2fc4f5['destroy']();else{if(_0x33495d&&_0x33495d>0x0&&_0x33495d<_0x267755)_0x383a1d+=0x1,_0x2092df['emit'](_0x337149('0xe'),new AGIError(_0x337149('0xf'),_0x383a1d)),_0x2fc4f5[_0x337149('0xa')]();else{const _0x15f356=new AGIChannel(_0x2fc4f5);_0x15f356['on'](_0x337149('0x11'),function(){const _0x47ec19=_0x337149;_0x2092df[_0x47ec19('0xd')](_0x47ec19('0x6'),_0x15f356);});}}}});}),_0x5e2fdf['on'](_0x46915d('0xe'),function(_0x541701){const _0x2a5e86=_0x46915d;_0x2092df[_0x2a5e86('0xd')](_0x2a5e86('0xe'),new AGIError('E_AGI_SERVER_ERROR',_0x541701[_0x2a5e86('0x12')]));}),_0x5e2fdf['on']('close',function(){const _0x34503a=_0x46915d;_0x2092df[_0x34503a('0xd')](_0x34503a('0x7'),new AGIError(_0x34503a('0xc')));});}process[_0x5c8386('0x10')](function(){_0x1210f1();});};util[_0x1e5f53('0x8')](AGIServer,EventEmitter),module['exports']=function(_0x9c8893,_0x477b02,_0x3526f0){return new AGIServer(_0x9c8893,_0x477b02,_0x3526f0);};
\ No newline at end of file