Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / cdr / cdr.rpc.js
index a30ddc0..6938f79 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3ff4=['client','request','info','Cdr,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x46d019,_0x769b82){var _0x5da479=function(_0x5e5242){while(--_0x5e5242){_0x46d019['push'](_0x46d019['shift']());}};_0x5da479(++_0x769b82);}(_0x3ff4,0xd3));var _0x43ff=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0x3ff4[_0x2c91e9];return _0x13f0ff;};'use strict';var _=require('lodash');var util=require(_0x43ff('0x0'));var moment=require('moment');var BPromise=require(_0x43ff('0x1'));var rs=require(_0x43ff('0x2'));var fs=require('fs');var Redis=require(_0x43ff('0x3'));var db=require(_0x43ff('0x4'))['db'];var utils=require(_0x43ff('0x5'));var logger=require(_0x43ff('0x6'))(_0x43ff('0x7'));var config=require(_0x43ff('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x43ff('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5824b1,_0xf9557e,_0x38a53b){return new BPromise(function(_0x10a4ea,_0x469858){return client[_0x43ff('0xa')](_0x5824b1,_0x38a53b)['then'](function(_0xe0c31c){logger[_0x43ff('0xb')](_0x43ff('0xc'),_0xf9557e,_0x43ff('0xd'));logger[_0x43ff('0xe')]('Cdr,\x20%s,\x20%s,\x20%s',_0xf9557e,_0x43ff('0xd'),JSON[_0x43ff('0xf')](_0xe0c31c));if(_0xe0c31c['error']){if(_0xe0c31c[_0x43ff('0x10')]['code']===0x1f4){logger[_0x43ff('0x10')](_0x43ff('0xc'),_0xf9557e,_0xe0c31c[_0x43ff('0x10')][_0x43ff('0x11')]);return _0x469858(_0xe0c31c[_0x43ff('0x10')][_0x43ff('0x11')]);}logger['error'](_0x43ff('0xc'),_0xf9557e,_0xe0c31c[_0x43ff('0x10')][_0x43ff('0x11')]);return _0x10a4ea(_0xe0c31c[_0x43ff('0x10')]['message']);}else{logger[_0x43ff('0xb')](_0x43ff('0xc'),_0xf9557e,_0x43ff('0xd'));_0x10a4ea(_0xe0c31c[_0x43ff('0x12')][_0x43ff('0x11')]);}})[_0x43ff('0x13')](function(_0x47f269){logger[_0x43ff('0x10')]('Cdr,\x20%s,\x20%s',_0xf9557e,_0x47f269);_0x469858(_0x47f269);});});}
\ No newline at end of file
+var _0x8c12=['error','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','info','Cdr,\x20%s,\x20%s','request\x20sent','Cdr,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x8c12,0xf6));var _0x28c1=function(_0x5798b3,_0x2ea26f){_0x5798b3=_0x5798b3-0x0;var _0x18e3c4=_0x8c12[_0x5798b3];return _0x18e3c4;};'use strict';var _=require(_0x28c1('0x0'));var util=require(_0x28c1('0x1'));var moment=require(_0x28c1('0x2'));var BPromise=require(_0x28c1('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x28c1('0x4'));var db=require(_0x28c1('0x5'))['db'];var utils=require(_0x28c1('0x6'));var logger=require(_0x28c1('0x7'))(_0x28c1('0x8'));var config=require(_0x28c1('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x28c1('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0xf09566,_0x19074a,_0x226fc1){return new BPromise(function(_0xdb0dff,_0x333898){return client[_0x28c1('0xb')](_0xf09566,_0x226fc1)[_0x28c1('0xc')](function(_0x5a41a1){logger[_0x28c1('0xd')](_0x28c1('0xe'),_0x19074a,_0x28c1('0xf'));logger['debug'](_0x28c1('0x10'),_0x19074a,_0x28c1('0xf'),JSON[_0x28c1('0x11')](_0x5a41a1));if(_0x5a41a1[_0x28c1('0x12')]){if(_0x5a41a1['error']['code']===0x1f4){logger[_0x28c1('0x12')](_0x28c1('0xe'),_0x19074a,_0x5a41a1[_0x28c1('0x12')]['message']);return _0x333898(_0x5a41a1[_0x28c1('0x12')][_0x28c1('0x13')]);}logger['error'](_0x28c1('0xe'),_0x19074a,_0x5a41a1[_0x28c1('0x12')][_0x28c1('0x13')]);return _0xdb0dff(_0x5a41a1['error']['message']);}else{logger[_0x28c1('0xd')]('Cdr,\x20%s,\x20%s',_0x19074a,_0x28c1('0xf'));_0xdb0dff(_0x5a41a1[_0x28c1('0x14')]['message']);}})[_0x28c1('0x15')](function(_0x67f14d){logger[_0x28c1('0x12')](_0x28c1('0xe'),_0x19074a,_0x67f14d);_0x333898(_0x67f14d);});});}
\ No newline at end of file