Built motion from commit 9e1399f3.|2.5.37
[motion2.git] / server / api / cdr / cdr.rpc.js
index 3b8873b..c541ff5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1126=['request','info','Cdr,\x20%s,\x20%s','request\x20sent','debug','Cdr,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client'];(function(_0x474c66,_0xbce925){var _0xcbd9bf=function(_0x44019d){while(--_0x44019d){_0x474c66['push'](_0x474c66['shift']());}};_0xcbd9bf(++_0xbce925);}(_0x1126,0x165));var _0x6112=function(_0x2eb4c0,_0x5806ec){_0x2eb4c0=_0x2eb4c0-0x0;var _0x272172=_0x1126[_0x2eb4c0];return _0x272172;};'use strict';var _=require('lodash');var util=require(_0x6112('0x0'));var moment=require(_0x6112('0x1'));var BPromise=require(_0x6112('0x2'));var rs=require(_0x6112('0x3'));var fs=require('fs');var Redis=require(_0x6112('0x4'));var db=require(_0x6112('0x5'))['db'];var utils=require(_0x6112('0x6'));var logger=require('../../config/logger')(_0x6112('0x7'));var config=require(_0x6112('0x8'));var jayson=require(_0x6112('0x9'));var client=jayson[_0x6112('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x85b8d5,_0x4a34bb,_0x1b2c5b){return new BPromise(function(_0x11bfa2,_0x5e8253){return client[_0x6112('0xb')](_0x85b8d5,_0x1b2c5b)['then'](function(_0x2f97b4){logger[_0x6112('0xc')](_0x6112('0xd'),_0x4a34bb,_0x6112('0xe'));logger[_0x6112('0xf')](_0x6112('0x10'),_0x4a34bb,_0x6112('0xe'),JSON[_0x6112('0x11')](_0x2f97b4));if(_0x2f97b4['error']){if(_0x2f97b4[_0x6112('0x12')][_0x6112('0x13')]===0x1f4){logger[_0x6112('0x12')](_0x6112('0xd'),_0x4a34bb,_0x2f97b4[_0x6112('0x12')][_0x6112('0x14')]);return _0x5e8253(_0x2f97b4[_0x6112('0x12')][_0x6112('0x14')]);}logger[_0x6112('0x12')](_0x6112('0xd'),_0x4a34bb,_0x2f97b4[_0x6112('0x12')][_0x6112('0x14')]);return _0x11bfa2(_0x2f97b4[_0x6112('0x12')][_0x6112('0x14')]);}else{logger[_0x6112('0xc')]('Cdr,\x20%s,\x20%s',_0x4a34bb,_0x6112('0xe'));_0x11bfa2(_0x2f97b4[_0x6112('0x15')][_0x6112('0x14')]);}})[_0x6112('0x16')](function(_0x1b1e73){logger[_0x6112('0x12')]('Cdr,\x20%s,\x20%s',_0x4a34bb,_0x1b1e73);_0x5e8253(_0x1b1e73);});});}
\ No newline at end of file
+var _0xba8e=['catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','Cdr,\x20%s,\x20%s','request\x20sent','debug','Cdr,\x20%s,\x20%s,\x20%s','error','message','info','result'];(function(_0x59520f,_0xc939d7){var _0x1c7e29=function(_0x11c88e){while(--_0x11c88e){_0x59520f['push'](_0x59520f['shift']());}};_0x1c7e29(++_0xc939d7);}(_0xba8e,0xb1));var _0xeba8=function(_0x36de10,_0xfe25e8){_0x36de10=_0x36de10-0x0;var _0x58100f=_0xba8e[_0x36de10];return _0x58100f;};'use strict';var _=require(_0xeba8('0x0'));var util=require(_0xeba8('0x1'));var moment=require(_0xeba8('0x2'));var BPromise=require(_0xeba8('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xeba8('0x4'));var db=require(_0xeba8('0x5'))['db'];var utils=require(_0xeba8('0x6'));var logger=require('../../config/logger')(_0xeba8('0x7'));var config=require(_0xeba8('0x8'));var jayson=require(_0xeba8('0x9'));var client=jayson[_0xeba8('0xa')][_0xeba8('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x18b194,_0x1be09c,_0x4b5666){return new BPromise(function(_0x19bd07,_0x3b0ef8){return client[_0xeba8('0xc')](_0x18b194,_0x4b5666)['then'](function(_0x375dec){logger['info'](_0xeba8('0xd'),_0x1be09c,_0xeba8('0xe'));logger[_0xeba8('0xf')](_0xeba8('0x10'),_0x1be09c,'request\x20sent',JSON['stringify'](_0x375dec));if(_0x375dec['error']){if(_0x375dec[_0xeba8('0x11')]['code']===0x1f4){logger[_0xeba8('0x11')](_0xeba8('0xd'),_0x1be09c,_0x375dec['error'][_0xeba8('0x12')]);return _0x3b0ef8(_0x375dec[_0xeba8('0x11')][_0xeba8('0x12')]);}logger[_0xeba8('0x11')]('Cdr,\x20%s,\x20%s',_0x1be09c,_0x375dec[_0xeba8('0x11')][_0xeba8('0x12')]);return _0x19bd07(_0x375dec[_0xeba8('0x11')][_0xeba8('0x12')]);}else{logger[_0xeba8('0x13')](_0xeba8('0xd'),_0x1be09c,_0xeba8('0xe'));_0x19bd07(_0x375dec[_0xeba8('0x14')]['message']);}})[_0xeba8('0x15')](function(_0x3ef84f){logger[_0xeba8('0x11')]('Cdr,\x20%s,\x20%s',_0x1be09c,_0x3ef84f);_0x3b0ef8(_0x3ef84f);});});}
\ No newline at end of file