Built motion from commit da24aabd.|2.6.20
[motion2.git] / server / api / cdr / cdr.rpc.js
index 02dcd09..ca97f97 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5b48=['../../config/environment','jayson/promise','client','http','request','info','request\x20sent','debug','stringify','code','error','Cdr,\x20%s,\x20%s','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x543084,_0x4337f5){var _0x306a57=function(_0x2769ed){while(--_0x2769ed){_0x543084['push'](_0x543084['shift']());}};_0x306a57(++_0x4337f5);}(_0x5b48,0xf4));var _0x85b4=function(_0x34a1b2,_0x3b2ee5){_0x34a1b2=_0x34a1b2-0x0;var _0x52c608=_0x5b48[_0x34a1b2];return _0x52c608;};'use strict';var _=require(_0x85b4('0x0'));var util=require(_0x85b4('0x1'));var moment=require(_0x85b4('0x2'));var BPromise=require(_0x85b4('0x3'));var rs=require(_0x85b4('0x4'));var fs=require('fs');var Redis=require(_0x85b4('0x5'));var db=require(_0x85b4('0x6'))['db'];var utils=require(_0x85b4('0x7'));var logger=require(_0x85b4('0x8'))('rpc');var config=require(_0x85b4('0x9'));var jayson=require(_0x85b4('0xa'));var client=jayson[_0x85b4('0xb')][_0x85b4('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x502af3,_0xc2b43a,_0x1de407){return new BPromise(function(_0x2860b5,_0x4781ec){return client[_0x85b4('0xd')](_0x502af3,_0x1de407)['then'](function(_0x139aff){logger[_0x85b4('0xe')]('Cdr,\x20%s,\x20%s',_0xc2b43a,_0x85b4('0xf'));logger[_0x85b4('0x10')]('Cdr,\x20%s,\x20%s,\x20%s',_0xc2b43a,_0x85b4('0xf'),JSON[_0x85b4('0x11')](_0x139aff));if(_0x139aff['error']){if(_0x139aff['error'][_0x85b4('0x12')]===0x1f4){logger['error']('Cdr,\x20%s,\x20%s',_0xc2b43a,_0x139aff[_0x85b4('0x13')]['message']);return _0x4781ec(_0x139aff[_0x85b4('0x13')]['message']);}logger[_0x85b4('0x13')](_0x85b4('0x14'),_0xc2b43a,_0x139aff[_0x85b4('0x13')][_0x85b4('0x15')]);return _0x2860b5(_0x139aff[_0x85b4('0x13')]['message']);}else{logger[_0x85b4('0xe')](_0x85b4('0x14'),_0xc2b43a,_0x85b4('0xf'));_0x2860b5(_0x139aff[_0x85b4('0x16')][_0x85b4('0x15')]);}})['catch'](function(_0x5c2377){logger['error'](_0x85b4('0x14'),_0xc2b43a,_0x5c2377);_0x4781ec(_0x5c2377);});});}
\ No newline at end of file
+var _0xf977=['moment','bluebird','randomstring','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Cdr,\x20%s,\x20%s','request\x20sent','Cdr,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util'];(function(_0x3f3d4a,_0x29db30){var _0x32e876=function(_0x815fdd){while(--_0x815fdd){_0x3f3d4a['push'](_0x3f3d4a['shift']());}};_0x32e876(++_0x29db30);}(_0xf977,0x82));var _0x7f97=function(_0x41d436,_0x2b97f2){_0x41d436=_0x41d436-0x0;var _0x19e918=_0xf977[_0x41d436];return _0x19e918;};'use strict';var _=require(_0x7f97('0x0'));var util=require(_0x7f97('0x1'));var moment=require(_0x7f97('0x2'));var BPromise=require(_0x7f97('0x3'));var rs=require(_0x7f97('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x7f97('0x5'));var logger=require('../../config/logger')(_0x7f97('0x6'));var config=require(_0x7f97('0x7'));var jayson=require(_0x7f97('0x8'));var client=jayson[_0x7f97('0x9')][_0x7f97('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x542d00,_0x4c86ca,_0x48523d){return new BPromise(function(_0x3fdcaa,_0x56cde7){return client[_0x7f97('0xb')](_0x542d00,_0x48523d)[_0x7f97('0xc')](function(_0x583a76){logger[_0x7f97('0xd')](_0x7f97('0xe'),_0x4c86ca,_0x7f97('0xf'));logger['debug'](_0x7f97('0x10'),_0x4c86ca,'request\x20sent',JSON['stringify'](_0x583a76));if(_0x583a76[_0x7f97('0x11')]){if(_0x583a76[_0x7f97('0x11')][_0x7f97('0x12')]===0x1f4){logger[_0x7f97('0x11')]('Cdr,\x20%s,\x20%s',_0x4c86ca,_0x583a76[_0x7f97('0x11')][_0x7f97('0x13')]);return _0x56cde7(_0x583a76['error'][_0x7f97('0x13')]);}logger[_0x7f97('0x11')](_0x7f97('0xe'),_0x4c86ca,_0x583a76['error']['message']);return _0x3fdcaa(_0x583a76[_0x7f97('0x11')][_0x7f97('0x13')]);}else{logger[_0x7f97('0xd')]('Cdr,\x20%s,\x20%s',_0x4c86ca,_0x7f97('0xf'));_0x3fdcaa(_0x583a76[_0x7f97('0x14')][_0x7f97('0x13')]);}})[_0x7f97('0x15')](function(_0x5db77c){logger[_0x7f97('0x11')](_0x7f97('0xe'),_0x4c86ca,_0x5db77c);_0x56cde7(_0x5db77c);});});}
\ No newline at end of file