Built motion from commit (unavailable).|2.5.24
[motion2.git] / server / api / voiceMusicOnHold / voiceMusicOnHold.rpc.js
index 8ad5d7b..bdbbc24 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1a70=['debug','VoiceMusicOnHold,\x20%s,\x20%s,\x20%s','stringify','error','code','VoiceMusicOnHold,\x20%s,\x20%s','message','info','lodash','bluebird','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','request','then','request\x20sent'];(function(_0xd3bcf8,_0x994fdb){var _0x296170=function(_0x2f5519){while(--_0x2f5519){_0xd3bcf8['push'](_0xd3bcf8['shift']());}};_0x296170(++_0x994fdb);}(_0x1a70,0x197));var _0x01a7=function(_0x16fe3d,_0x49dc87){_0x16fe3d=_0x16fe3d-0x0;var _0x1e354f=_0x1a70[_0x16fe3d];return _0x1e354f;};'use strict';var _=require(_0x01a7('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x01a7('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x01a7('0x2'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x01a7('0x3'));var config=require(_0x01a7('0x4'));var jayson=require(_0x01a7('0x5'));var client=jayson[_0x01a7('0x6')][_0x01a7('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x56e868,_0x52c45e,_0x252f11){return new BPromise(function(_0x341685,_0x3f9ffd){return client[_0x01a7('0x8')](_0x56e868,_0x252f11)[_0x01a7('0x9')](function(_0x48306c){logger['info']('VoiceMusicOnHold,\x20%s,\x20%s',_0x52c45e,_0x01a7('0xa'));logger[_0x01a7('0xb')](_0x01a7('0xc'),_0x52c45e,'request\x20sent',JSON[_0x01a7('0xd')](_0x48306c));if(_0x48306c[_0x01a7('0xe')]){if(_0x48306c[_0x01a7('0xe')][_0x01a7('0xf')]===0x1f4){logger[_0x01a7('0xe')](_0x01a7('0x10'),_0x52c45e,_0x48306c['error']['message']);return _0x3f9ffd(_0x48306c[_0x01a7('0xe')][_0x01a7('0x11')]);}logger['error']('VoiceMusicOnHold,\x20%s,\x20%s',_0x52c45e,_0x48306c[_0x01a7('0xe')][_0x01a7('0x11')]);return _0x341685(_0x48306c['error'][_0x01a7('0x11')]);}else{logger[_0x01a7('0x12')](_0x01a7('0x10'),_0x52c45e,_0x01a7('0xa'));_0x341685(_0x48306c['result'][_0x01a7('0x11')]);}})['catch'](function(_0x35268c){logger[_0x01a7('0xe')](_0x01a7('0x10'),_0x52c45e,_0x35268c);_0x3f9ffd(_0x35268c);});});}
\ No newline at end of file
+var _0x3731=['request','info','VoiceMusicOnHold,\x20%s,\x20%s','request\x20sent','debug','VoiceMusicOnHold,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','util','bluebird','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http'];(function(_0x124ac5,_0xf25dd9){var _0x1680aa=function(_0x265d7c){while(--_0x265d7c){_0x124ac5['push'](_0x124ac5['shift']());}};_0x1680aa(++_0xf25dd9);}(_0x3731,0xd3));var _0x1373=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x3731[_0x501510];return _0x1e6ee5;};'use strict';var _=require('lodash');var util=require(_0x1373('0x0'));var moment=require('moment');var BPromise=require(_0x1373('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1373('0x2'));var db=require(_0x1373('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x1373('0x4'))('rpc');var config=require(_0x1373('0x5'));var jayson=require(_0x1373('0x6'));var client=jayson[_0x1373('0x7')][_0x1373('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2e5408,_0x86830e,_0x79e6ff){return new BPromise(function(_0x3726ff,_0xa97231){return client[_0x1373('0x9')](_0x2e5408,_0x79e6ff)['then'](function(_0x5ca922){logger[_0x1373('0xa')](_0x1373('0xb'),_0x86830e,_0x1373('0xc'));logger[_0x1373('0xd')](_0x1373('0xe'),_0x86830e,'request\x20sent',JSON['stringify'](_0x5ca922));if(_0x5ca922[_0x1373('0xf')]){if(_0x5ca922[_0x1373('0xf')][_0x1373('0x10')]===0x1f4){logger[_0x1373('0xf')]('VoiceMusicOnHold,\x20%s,\x20%s',_0x86830e,_0x5ca922[_0x1373('0xf')][_0x1373('0x11')]);return _0xa97231(_0x5ca922['error'][_0x1373('0x11')]);}logger['error'](_0x1373('0xb'),_0x86830e,_0x5ca922[_0x1373('0xf')][_0x1373('0x11')]);return _0x3726ff(_0x5ca922[_0x1373('0xf')][_0x1373('0x11')]);}else{logger[_0x1373('0xa')](_0x1373('0xb'),_0x86830e,_0x1373('0xc'));_0x3726ff(_0x5ca922[_0x1373('0x12')][_0x1373('0x11')]);}})[_0x1373('0x13')](function(_0x42aae6){logger[_0x1373('0xf')](_0x1373('0xb'),_0x86830e,_0x42aae6);_0xa97231(_0x42aae6);});});}
\ No newline at end of file