Built motion from commit (unavailable).|2.5.6
[motion2.git] / server / services / agi / server.js
index 7d4805a..57b1af7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe489=['./error','./channel','127.0.0.1','call','emit','error','E_AGI_ARGUMENT_PORT','createServer','listen','listening','connection','E_AGI_SERVER_ERROR','E_AGI_SERVER_VOICE_DISABLED','destroy','E_AGI_SERVER_MAXCONNECTION','code','close','nextTick','inherits','exports','util','net','EventEmitter'];(function(_0x56a06f,_0x183813){var _0x3309ac=function(_0x562fb0){while(--_0x562fb0){_0x56a06f['push'](_0x56a06f['shift']());}};_0x3309ac(++_0x183813);}(_0xe489,0x9e));var _0x9e48=function(_0x4a2001,_0x3cce7b){_0x4a2001=_0x4a2001-0x0;var _0x50e70f=_0xe489[_0x4a2001];return _0x50e70f;};'use strict';var util=require(_0x9e48('0x0'));var net=require(_0x9e48('0x1'));var EventEmitter=require('events')[_0x9e48('0x2')];var AGIError=require(_0x9e48('0x3'));var AGIChannel=require(_0x9e48('0x4'));var AGIServer=function(_0x1e9e0b,_0x1c874c,_0x5f372b){var _0x5f02d6=this,_0x1e9e0b=_0x1e9e0b||0x11dd,_0x1c874c=_0x1c874c||_0x9e48('0x5'),_0x9b6c19=null,_0x42747f=0x0;EventEmitter[_0x9e48('0x6')](_0x5f02d6);function _0x4b9d5e(){if(!_0x1e9e0b){_0x5f02d6[_0x9e48('0x7')](_0x9e48('0x8'),new AGIError(_0x9e48('0x9')));return![];}_0x9b6c19=net[_0x9e48('0xa')]();_0x9b6c19[_0x9e48('0xb')](_0x1e9e0b,_0x1c874c);_0x9b6c19['on']('listening',function(){_0x5f02d6[_0x9e48('0x7')](_0x9e48('0xc'));});_0x9b6c19['on'](_0x9e48('0xd'),function(_0x2b617b){_0x9b6c19['getConnections'](function(_0x343a37,_0x397b82){if(_0x343a37){_0x5f02d6[_0x9e48('0x7')](_0x9e48('0x8'),new AGIError(_0x9e48('0xe'),_0x343a37));}else if(_0x5f372b&&_0x5f372b<0x0){_0x5f02d6[_0x9e48('0x7')](_0x9e48('0x8'),new AGIError(_0x9e48('0xf')));_0x2b617b[_0x9e48('0x10')]();}else if(_0x5f372b&&_0x5f372b>0x0&&_0x5f372b<_0x397b82){_0x42747f+=0x1;_0x5f02d6['emit']('error',new AGIError(_0x9e48('0x11'),_0x42747f));_0x2b617b[_0x9e48('0x10')]();}else{var _0x52bdba=new AGIChannel(_0x2b617b);_0x52bdba['on']('ready',function(){_0x5f02d6[_0x9e48('0x7')]('connection',_0x52bdba);});}});});_0x9b6c19['on'](_0x9e48('0x8'),function(_0x5ac1ef){_0x5f02d6[_0x9e48('0x7')](_0x9e48('0x8'),new AGIError(_0x9e48('0xe'),_0x5ac1ef[_0x9e48('0x12')]));});_0x9b6c19['on']('close',function(){_0x5f02d6[_0x9e48('0x7')](_0x9e48('0x13'),new AGIError('E_AGI_SERVER_CLOSE'));});}process[_0x9e48('0x14')](function(){_0x4b9d5e();});};util[_0x9e48('0x15')](AGIServer,EventEmitter);module[_0x9e48('0x16')]=function(_0x49c3d3,_0x5f5360,_0x10a39a){return new AGIServer(_0x49c3d3,_0x5f5360,_0x10a39a);};
\ No newline at end of file
+var _0x1280=['connection','getConnections','error','E_AGI_SERVER_ERROR','destroy','E_AGI_SERVER_MAXCONNECTION','ready','close','E_AGI_SERVER_CLOSE','exports','util','net','events','EventEmitter','./error','./channel','127.0.0.1','call','emit','createServer','listen','listening'];(function(_0x5743e3,_0x4a2aab){var _0x24d100=function(_0x10737c){while(--_0x10737c){_0x5743e3['push'](_0x5743e3['shift']());}};_0x24d100(++_0x4a2aab);}(_0x1280,0xba));var _0x0128=function(_0x43c62a,_0x125d82){_0x43c62a=_0x43c62a-0x0;var _0x367fb8=_0x1280[_0x43c62a];return _0x367fb8;};'use strict';var util=require(_0x0128('0x0'));var net=require(_0x0128('0x1'));var EventEmitter=require(_0x0128('0x2'))[_0x0128('0x3')];var AGIError=require(_0x0128('0x4'));var AGIChannel=require(_0x0128('0x5'));var AGIServer=function(_0x2334b5,_0x3a3112,_0x403dd9){var _0x551461=this,_0x2334b5=_0x2334b5||0x11dd,_0x3a3112=_0x3a3112||_0x0128('0x6'),_0x59959a=null,_0x589536=0x0;EventEmitter[_0x0128('0x7')](_0x551461);function _0x79484c(){if(!_0x2334b5){_0x551461[_0x0128('0x8')]('error',new AGIError('E_AGI_ARGUMENT_PORT'));return![];}_0x59959a=net[_0x0128('0x9')]();_0x59959a[_0x0128('0xa')](_0x2334b5,_0x3a3112);_0x59959a['on']('listening',function(){_0x551461[_0x0128('0x8')](_0x0128('0xb'));});_0x59959a['on'](_0x0128('0xc'),function(_0x4cc655){_0x59959a[_0x0128('0xd')](function(_0x32d5d2,_0x1faf8c){if(_0x32d5d2){_0x551461[_0x0128('0x8')](_0x0128('0xe'),new AGIError(_0x0128('0xf'),_0x32d5d2));}else if(_0x403dd9&&_0x403dd9<0x0){_0x551461[_0x0128('0x8')](_0x0128('0xe'),new AGIError('E_AGI_SERVER_VOICE_DISABLED'));_0x4cc655[_0x0128('0x10')]();}else if(_0x403dd9&&_0x403dd9>0x0&&_0x403dd9<_0x1faf8c){_0x589536+=0x1;_0x551461['emit']('error',new AGIError(_0x0128('0x11'),_0x589536));_0x4cc655[_0x0128('0x10')]();}else{var _0x4467ae=new AGIChannel(_0x4cc655);_0x4467ae['on'](_0x0128('0x12'),function(){_0x551461[_0x0128('0x8')]('connection',_0x4467ae);});}});});_0x59959a['on'](_0x0128('0xe'),function(_0x2b4c26){_0x551461[_0x0128('0x8')]('error',new AGIError('E_AGI_SERVER_ERROR',_0x2b4c26['code']));});_0x59959a['on'](_0x0128('0x13'),function(){_0x551461[_0x0128('0x8')](_0x0128('0x13'),new AGIError(_0x0128('0x14')));});}process['nextTick'](function(){_0x79484c();});};util['inherits'](AGIServer,EventEmitter);module[_0x0128('0x15')]=function(_0xdc1ed7,_0xcd45bf,_0x11f76e){return new AGIServer(_0xdc1ed7,_0xcd45bf,_0x11f76e);};
\ No newline at end of file