Built motion from commit b5996064.|2.6.21
[motion2.git] / server / api / cdr / cdr.rpc.js
index 55bab87..c729b00 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9cfa=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','Cdr,\x20%s,\x20%s','request\x20sent','debug','Cdr,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','bluebird','randomstring','ioredis'];(function(_0x3f7f18,_0x16f1f8){var _0x5a54ed=function(_0x487bbd){while(--_0x487bbd){_0x3f7f18['push'](_0x3f7f18['shift']());}};_0x5a54ed(++_0x16f1f8);}(_0x9cfa,0x19e));var _0xa9cf=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x9cfa[_0x1facfa];return _0x9ec701;};'use strict';var _=require(_0xa9cf('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xa9cf('0x1'));var rs=require(_0xa9cf('0x2'));var fs=require('fs');var Redis=require(_0xa9cf('0x3'));var db=require(_0xa9cf('0x4'))['db'];var utils=require(_0xa9cf('0x5'));var logger=require(_0xa9cf('0x6'))(_0xa9cf('0x7'));var config=require(_0xa9cf('0x8'));var jayson=require(_0xa9cf('0x9'));var client=jayson[_0xa9cf('0xa')][_0xa9cf('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x316118,_0x5aa9c5,_0x5de791){return new BPromise(function(_0x30c5cf,_0x2edda3){return client['request'](_0x316118,_0x5de791)['then'](function(_0xe584c5){logger['info'](_0xa9cf('0xc'),_0x5aa9c5,_0xa9cf('0xd'));logger[_0xa9cf('0xe')](_0xa9cf('0xf'),_0x5aa9c5,_0xa9cf('0xd'),JSON[_0xa9cf('0x10')](_0xe584c5));if(_0xe584c5[_0xa9cf('0x11')]){if(_0xe584c5[_0xa9cf('0x11')][_0xa9cf('0x12')]===0x1f4){logger[_0xa9cf('0x11')](_0xa9cf('0xc'),_0x5aa9c5,_0xe584c5[_0xa9cf('0x11')]['message']);return _0x2edda3(_0xe584c5[_0xa9cf('0x11')][_0xa9cf('0x13')]);}logger[_0xa9cf('0x11')](_0xa9cf('0xc'),_0x5aa9c5,_0xe584c5[_0xa9cf('0x11')]['message']);return _0x30c5cf(_0xe584c5['error'][_0xa9cf('0x13')]);}else{logger['info'](_0xa9cf('0xc'),_0x5aa9c5,_0xa9cf('0xd'));_0x30c5cf(_0xe584c5[_0xa9cf('0x14')]['message']);}})[_0xa9cf('0x15')](function(_0x56f670){logger[_0xa9cf('0x11')](_0xa9cf('0xc'),_0x5aa9c5,_0x56f670);_0x2edda3(_0x56f670);});});}
\ No newline at end of file
+var _0x8a2f=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','Cdr,\x20%s,\x20%s','request\x20sent','debug','Cdr,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','util','bluebird'];(function(_0x261a93,_0x477405){var _0x12f3e5=function(_0x13ec0f){while(--_0x13ec0f){_0x261a93['push'](_0x261a93['shift']());}};_0x12f3e5(++_0x477405);}(_0x8a2f,0x11b));var _0xf8a2=function(_0x1e7aa9,_0x37e4e3){_0x1e7aa9=_0x1e7aa9-0x0;var _0x15facc=_0x8a2f[_0x1e7aa9];return _0x15facc;};'use strict';var _=require(_0xf8a2('0x0'));var util=require(_0xf8a2('0x1'));var moment=require('moment');var BPromise=require(_0xf8a2('0x2'));var rs=require(_0xf8a2('0x3'));var fs=require('fs');var Redis=require(_0xf8a2('0x4'));var db=require(_0xf8a2('0x5'))['db'];var utils=require(_0xf8a2('0x6'));var logger=require(_0xf8a2('0x7'))(_0xf8a2('0x8'));var config=require(_0xf8a2('0x9'));var jayson=require(_0xf8a2('0xa'));var client=jayson[_0xf8a2('0xb')][_0xf8a2('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x4fb2c3,_0x4c979c,_0x521bfa){return new BPromise(function(_0x2f7547,_0xae538e){return client[_0xf8a2('0xd')](_0x4fb2c3,_0x521bfa)[_0xf8a2('0xe')](function(_0x4f15ec){logger['info'](_0xf8a2('0xf'),_0x4c979c,_0xf8a2('0x10'));logger[_0xf8a2('0x11')](_0xf8a2('0x12'),_0x4c979c,_0xf8a2('0x10'),JSON[_0xf8a2('0x13')](_0x4f15ec));if(_0x4f15ec[_0xf8a2('0x14')]){if(_0x4f15ec[_0xf8a2('0x14')][_0xf8a2('0x15')]===0x1f4){logger['error'](_0xf8a2('0xf'),_0x4c979c,_0x4f15ec['error'][_0xf8a2('0x16')]);return _0xae538e(_0x4f15ec[_0xf8a2('0x14')]['message']);}logger[_0xf8a2('0x14')](_0xf8a2('0xf'),_0x4c979c,_0x4f15ec[_0xf8a2('0x14')][_0xf8a2('0x16')]);return _0x2f7547(_0x4f15ec[_0xf8a2('0x14')][_0xf8a2('0x16')]);}else{logger[_0xf8a2('0x17')](_0xf8a2('0xf'),_0x4c979c,_0xf8a2('0x10'));_0x2f7547(_0x4f15ec[_0xf8a2('0x18')][_0xf8a2('0x16')]);}})[_0xf8a2('0x19')](function(_0x911708){logger[_0xf8a2('0x14')](_0xf8a2('0xf'),_0x4c979c,_0x911708);_0xae538e(_0x911708);});});}
\ No newline at end of file