Built motion from commit (unavailable).|2.5.18
[motion2.git] / server / services / ami / ami.js
index 54c5ad5..c109a99 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfead=['coreshowchannels','info','Manager\x20\x22%s\x22\x20logged\x20on\x20to\x20%s:%s','once','close','connect','shutdown','Shutdown\x20\x22%s\x22\x20to\x20%s:%s\x20with:\x0a%s','fullybooted','Fullybooted\x20\x22%s\x22\x20to\x20%s:%s','resolve','then','log','bluebird','moment','util','../../config/logger','ami','asterisk','port','password','keepConnected','promisify','action','error','Manager\x20\x22%s\x22\x20error\x20to\x20%s:%s\x20with:\x0a%s','username','inspect','format','Manager\x20\x22%s\x22\x20closed\x20to\x20%s:%s','actionSipShowRegistry','Action','sipshowregistry','actionDeviceStateList','devicestatelist','actionSipPeerStatus','sippeerstatus','actionQueueSummary','queuesummary','actionCoreShowChannels'];(function(_0x50ede0,_0x7e6410){var _0x5cbe32=function(_0x954b2a){while(--_0x954b2a){_0x50ede0['push'](_0x50ede0['shift']());}};_0x5cbe32(++_0x7e6410);}(_0xfead,0xad));var _0xdfea=function(_0x3b7abc,_0x12559f){_0x3b7abc=_0x3b7abc-0x0;var _0x5395b6=_0xfead[_0x3b7abc];return _0x5395b6;};'use strict';var Manager=require('asterisk-manager');var BPromise=require(_0xdfea('0x0'));var moment=require(_0xdfea('0x1'));var util=require(_0xdfea('0x2'));var _=require('lodash');var logger=require(_0xdfea('0x3'))(_0xdfea('0x4'));var config=require('../../config/environment');var ami=new Manager(config[_0xdfea('0x5')][_0xdfea('0x6')],config[_0xdfea('0x5')]['ip'],config[_0xdfea('0x5')]['username'],config[_0xdfea('0x5')][_0xdfea('0x7')],!![]);ami[_0xdfea('0x8')]();ami['Action']=BPromise[_0xdfea('0x9')](ami[_0xdfea('0xa')]);function error(_0x358bba){logger[_0xdfea('0xb')](util['format'](_0xdfea('0xc'),config['asterisk'][_0xdfea('0xd')],config[_0xdfea('0x5')]['ip'],config[_0xdfea('0x5')][_0xdfea('0x6')],util[_0xdfea('0xe')](_0x358bba,![],null)));}function close(){logger[_0xdfea('0xb')](util[_0xdfea('0xf')](_0xdfea('0x10'),config[_0xdfea('0x5')][_0xdfea('0xd')],config[_0xdfea('0x5')]['ip'],config[_0xdfea('0x5')][_0xdfea('0x6')]));}ami[_0xdfea('0x11')]=function(){return function(){return ami[_0xdfea('0x12')]({'action':_0xdfea('0x13')});};};ami[_0xdfea('0x14')]=function(){return function(){return ami[_0xdfea('0x12')]({'action':_0xdfea('0x15')});};};ami[_0xdfea('0x16')]=function(){return function(){return ami['Action']({'action':_0xdfea('0x17')});};};ami[_0xdfea('0x18')]=function(){return function(){return ami[_0xdfea('0x12')]({'action':_0xdfea('0x19')});};};ami[_0xdfea('0x1a')]=function(){return function(){return ami[_0xdfea('0x12')]({'action':_0xdfea('0x1b')});};};function connect(_0x4c32c8){logger[_0xdfea('0x1c')](util[_0xdfea('0xf')](_0xdfea('0x1d'),config[_0xdfea('0x5')][_0xdfea('0xd')],config['asterisk']['ip'],config[_0xdfea('0x5')]['port']));ami[_0xdfea('0x1e')](_0xdfea('0xb'),error);ami[_0xdfea('0x1e')](_0xdfea('0x1f'),close);}ami['on'](_0xdfea('0x20'),connect);ami['on'](_0xdfea('0x21'),function(_0x1f23a3){logger['info'](util[_0xdfea('0xf')](_0xdfea('0x22'),config[_0xdfea('0x5')][_0xdfea('0xd')],config['asterisk']['ip'],config[_0xdfea('0x5')][_0xdfea('0x6')],util['inspect'](_0x1f23a3,![],null)));});ami['on'](_0xdfea('0x23'),function(_0x111b2){logger[_0xdfea('0x1c')](util['format'](_0xdfea('0x24'),config[_0xdfea('0x5')][_0xdfea('0xd')],config['asterisk']['ip'],config[_0xdfea('0x5')][_0xdfea('0x6')]));return BPromise[_0xdfea('0x25')]()[_0xdfea('0x26')](ami[_0xdfea('0x11')]())['then'](ami[_0xdfea('0x14')]())['then'](ami[_0xdfea('0x16')]())[_0xdfea('0x26')](ami['actionQueueSummary']())[_0xdfea('0x26')](ami[_0xdfea('0x1a')]())['catch'](function(_0x74119a){console[_0xdfea('0x27')](_0x74119a);});});ami['once'](_0xdfea('0xb'),error);ami[_0xdfea('0x1e')]('close',close);module['exports']=ami;
\ No newline at end of file
+var _0xf231=['Action','promisify','error','Manager\x20\x22%s\x22\x20error\x20to\x20%s:%s\x20with:\x0a%s','inspect','Manager\x20\x22%s\x22\x20closed\x20to\x20%s:%s','actionSipShowRegistry','actionDeviceStateList','devicestatelist','actionSipPeerStatus','sippeerstatus','actionQueueSummary','actionCoreShowChannels','coreshowchannels','info','format','Manager\x20\x22%s\x22\x20logged\x20on\x20to\x20%s:%s','once','close','shutdown','Shutdown\x20\x22%s\x22\x20to\x20%s:%s\x20with:\x0a%s','Fullybooted\x20\x22%s\x22\x20to\x20%s:%s','resolve','then','log','exports','asterisk-manager','bluebird','moment','lodash','../../config/logger','ami','../../config/environment','asterisk','port','username','password','keepConnected'];(function(_0x311c35,_0x534915){var _0x5cc50c=function(_0x3ad680){while(--_0x3ad680){_0x311c35['push'](_0x311c35['shift']());}};_0x5cc50c(++_0x534915);}(_0xf231,0xd8));var _0x1f23=function(_0x3e0f37,_0x7b27ba){_0x3e0f37=_0x3e0f37-0x0;var _0x57f07f=_0xf231[_0x3e0f37];return _0x57f07f;};'use strict';var Manager=require(_0x1f23('0x0'));var BPromise=require(_0x1f23('0x1'));var moment=require(_0x1f23('0x2'));var util=require('util');var _=require(_0x1f23('0x3'));var logger=require(_0x1f23('0x4'))(_0x1f23('0x5'));var config=require(_0x1f23('0x6'));var ami=new Manager(config[_0x1f23('0x7')][_0x1f23('0x8')],config[_0x1f23('0x7')]['ip'],config[_0x1f23('0x7')][_0x1f23('0x9')],config[_0x1f23('0x7')][_0x1f23('0xa')],!![]);ami[_0x1f23('0xb')]();ami[_0x1f23('0xc')]=BPromise[_0x1f23('0xd')](ami['action']);function error(_0x377514){logger[_0x1f23('0xe')](util['format'](_0x1f23('0xf'),config[_0x1f23('0x7')][_0x1f23('0x9')],config[_0x1f23('0x7')]['ip'],config[_0x1f23('0x7')][_0x1f23('0x8')],util[_0x1f23('0x10')](_0x377514,![],null)));}function close(){logger[_0x1f23('0xe')](util['format'](_0x1f23('0x11'),config[_0x1f23('0x7')][_0x1f23('0x9')],config[_0x1f23('0x7')]['ip'],config[_0x1f23('0x7')]['port']));}ami[_0x1f23('0x12')]=function(){return function(){return ami[_0x1f23('0xc')]({'action':'sipshowregistry'});};};ami[_0x1f23('0x13')]=function(){return function(){return ami[_0x1f23('0xc')]({'action':_0x1f23('0x14')});};};ami[_0x1f23('0x15')]=function(){return function(){return ami['Action']({'action':_0x1f23('0x16')});};};ami[_0x1f23('0x17')]=function(){return function(){return ami[_0x1f23('0xc')]({'action':'queuesummary'});};};ami[_0x1f23('0x18')]=function(){return function(){return ami['Action']({'action':_0x1f23('0x19')});};};function connect(_0x6e4762){logger[_0x1f23('0x1a')](util[_0x1f23('0x1b')](_0x1f23('0x1c'),config[_0x1f23('0x7')][_0x1f23('0x9')],config['asterisk']['ip'],config['asterisk'][_0x1f23('0x8')]));ami[_0x1f23('0x1d')]('error',error);ami[_0x1f23('0x1d')](_0x1f23('0x1e'),close);}ami['on']('connect',connect);ami['on'](_0x1f23('0x1f'),function(_0x4d36db){logger[_0x1f23('0x1a')](util[_0x1f23('0x1b')](_0x1f23('0x20'),config[_0x1f23('0x7')]['username'],config[_0x1f23('0x7')]['ip'],config['asterisk'][_0x1f23('0x8')],util[_0x1f23('0x10')](_0x4d36db,![],null)));});ami['on']('fullybooted',function(_0x328aca){logger[_0x1f23('0x1a')](util[_0x1f23('0x1b')](_0x1f23('0x21'),config[_0x1f23('0x7')]['username'],config[_0x1f23('0x7')]['ip'],config['asterisk'][_0x1f23('0x8')]));return BPromise[_0x1f23('0x22')]()[_0x1f23('0x23')](ami[_0x1f23('0x12')]())[_0x1f23('0x23')](ami[_0x1f23('0x13')]())[_0x1f23('0x23')](ami['actionSipPeerStatus']())[_0x1f23('0x23')](ami[_0x1f23('0x17')]())[_0x1f23('0x23')](ami[_0x1f23('0x18')]())['catch'](function(_0xcfb24){console[_0x1f23('0x24')](_0xcfb24);});});ami['once'](_0x1f23('0xe'),error);ami[_0x1f23('0x1d')](_0x1f23('0x1e'),close);module[_0x1f23('0x25')]=ami;
\ No newline at end of file