Built motion from commit da24aabd.|2.6.20
[motion2.git] / server / api / cdr / cdr.rpc.js
index a4a5359..ca97f97 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x66b7=['Cdr,\x20%s,\x20%s','message','info','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','request','then','request\x20sent','debug','Cdr,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x1dba84,_0x1764b2){var _0x26f406=function(_0x13f345){while(--_0x13f345){_0x1dba84['push'](_0x1dba84['shift']());}};_0x26f406(++_0x1764b2);}(_0x66b7,0x1a7));var _0x766b=function(_0x5b174b,_0x404869){_0x5b174b=_0x5b174b-0x0;var _0x47ee37=_0x66b7[_0x5b174b];return _0x47ee37;};'use strict';var _=require('lodash');var util=require(_0x766b('0x0'));var moment=require(_0x766b('0x1'));var BPromise=require(_0x766b('0x2'));var rs=require(_0x766b('0x3'));var fs=require('fs');var Redis=require(_0x766b('0x4'));var db=require(_0x766b('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x766b('0x6'))('rpc');var config=require(_0x766b('0x7'));var jayson=require(_0x766b('0x8'));var client=jayson[_0x766b('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x566925,_0x35e8b5,_0xa3e537){return new BPromise(function(_0x4df7e9,_0x17812b){return client[_0x766b('0xa')](_0x566925,_0xa3e537)[_0x766b('0xb')](function(_0x75d77){logger['info']('Cdr,\x20%s,\x20%s',_0x35e8b5,_0x766b('0xc'));logger[_0x766b('0xd')](_0x766b('0xe'),_0x35e8b5,'request\x20sent',JSON[_0x766b('0xf')](_0x75d77));if(_0x75d77['error']){if(_0x75d77['error']['code']===0x1f4){logger[_0x766b('0x10')](_0x766b('0x11'),_0x35e8b5,_0x75d77['error']['message']);return _0x17812b(_0x75d77[_0x766b('0x10')][_0x766b('0x12')]);}logger[_0x766b('0x10')](_0x766b('0x11'),_0x35e8b5,_0x75d77[_0x766b('0x10')][_0x766b('0x12')]);return _0x4df7e9(_0x75d77[_0x766b('0x10')][_0x766b('0x12')]);}else{logger[_0x766b('0x13')](_0x766b('0x11'),_0x35e8b5,_0x766b('0xc'));_0x4df7e9(_0x75d77[_0x766b('0x14')][_0x766b('0x12')]);}})[_0x766b('0x15')](function(_0x59ad2d){logger[_0x766b('0x10')]('Cdr,\x20%s,\x20%s',_0x35e8b5,_0x59ad2d);_0x17812b(_0x59ad2d);});});}
\ 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