Built motion from commit (unavailable).|2.5.14
[motion2.git] / server / api / cdr / cdr.rpc.js
index 55bab87..f9b1c6e 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 _0xb778=['result','util','moment','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','debug','Cdr,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','Cdr,\x20%s,\x20%s','message'];(function(_0x2e4aa2,_0x11956a){var _0x5e6092=function(_0x4c12c2){while(--_0x4c12c2){_0x2e4aa2['push'](_0x2e4aa2['shift']());}};_0x5e6092(++_0x11956a);}(_0xb778,0x94));var _0x8b77=function(_0x4efc87,_0x17a7d1){_0x4efc87=_0x4efc87-0x0;var _0x191fc4=_0xb778[_0x4efc87];return _0x191fc4;};'use strict';var _=require('lodash');var util=require(_0x8b77('0x0'));var moment=require(_0x8b77('0x1'));var BPromise=require('bluebird');var rs=require(_0x8b77('0x2'));var fs=require('fs');var Redis=require(_0x8b77('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x8b77('0x4'))(_0x8b77('0x5'));var config=require(_0x8b77('0x6'));var jayson=require(_0x8b77('0x7'));var client=jayson['client'][_0x8b77('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x290974,_0xcd6fd6,_0xdaf651){return new BPromise(function(_0x4deb2c,_0x219aa3){return client[_0x8b77('0x9')](_0x290974,_0xdaf651)[_0x8b77('0xa')](function(_0x3abc80){logger[_0x8b77('0xb')]('Cdr,\x20%s,\x20%s',_0xcd6fd6,'request\x20sent');logger[_0x8b77('0xc')](_0x8b77('0xd'),_0xcd6fd6,_0x8b77('0xe'),JSON[_0x8b77('0xf')](_0x3abc80));if(_0x3abc80[_0x8b77('0x10')]){if(_0x3abc80[_0x8b77('0x10')][_0x8b77('0x11')]===0x1f4){logger[_0x8b77('0x10')](_0x8b77('0x12'),_0xcd6fd6,_0x3abc80['error']['message']);return _0x219aa3(_0x3abc80['error'][_0x8b77('0x13')]);}logger['error'](_0x8b77('0x12'),_0xcd6fd6,_0x3abc80['error']['message']);return _0x4deb2c(_0x3abc80[_0x8b77('0x10')][_0x8b77('0x13')]);}else{logger[_0x8b77('0xb')]('Cdr,\x20%s,\x20%s',_0xcd6fd6,'request\x20sent');_0x4deb2c(_0x3abc80[_0x8b77('0x14')][_0x8b77('0x13')]);}})['catch'](function(_0x5d8708){logger[_0x8b77('0x10')]('Cdr,\x20%s,\x20%s',_0xcd6fd6,_0x5d8708);_0x219aa3(_0x5d8708);});});}
\ No newline at end of file