Built motion from commit (unavailable).|2.5.0
[motion2.git] / server / api / voiceMusicOnHold / voiceMusicOnHold.rpc.js
index 48233f9..a1d2df1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfc2c=['message','result','bluebird','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','then','info','VoiceMusicOnHold,\x20%s,\x20%s','request\x20sent','debug','VoiceMusicOnHold,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x3d8679,_0x2af567){var _0x50870f=function(_0x34fee1){while(--_0x34fee1){_0x3d8679['push'](_0x3d8679['shift']());}};_0x50870f(++_0x2af567);}(_0xfc2c,0x11f));var _0xcfc2=function(_0x3db291,_0x279603){_0x3db291=_0x3db291-0x0;var _0x40ef9c=_0xfc2c[_0x3db291];return _0x40ef9c;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xcfc2('0x0'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xcfc2('0x1'));var db=require('../../mysqldb')['db'];var utils=require(_0xcfc2('0x2'));var logger=require(_0xcfc2('0x3'))('rpc');var config=require(_0xcfc2('0x4'));var jayson=require(_0xcfc2('0x5'));var client=jayson['client'][_0xcfc2('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x12194d,_0x2628a2,_0x444dd4){return new BPromise(function(_0x25465b,_0x27cdbc){return client[_0xcfc2('0x7')](_0x12194d,_0x444dd4)[_0xcfc2('0x8')](function(_0x1f765d){logger[_0xcfc2('0x9')](_0xcfc2('0xa'),_0x2628a2,_0xcfc2('0xb'));logger[_0xcfc2('0xc')](_0xcfc2('0xd'),_0x2628a2,'request\x20sent',JSON[_0xcfc2('0xe')](_0x1f765d));if(_0x1f765d[_0xcfc2('0xf')]){if(_0x1f765d[_0xcfc2('0xf')][_0xcfc2('0x10')]===0x1f4){logger[_0xcfc2('0xf')](_0xcfc2('0xa'),_0x2628a2,_0x1f765d[_0xcfc2('0xf')][_0xcfc2('0x11')]);return _0x27cdbc(_0x1f765d[_0xcfc2('0xf')]['message']);}logger[_0xcfc2('0xf')]('VoiceMusicOnHold,\x20%s,\x20%s',_0x2628a2,_0x1f765d['error'][_0xcfc2('0x11')]);return _0x25465b(_0x1f765d[_0xcfc2('0xf')][_0xcfc2('0x11')]);}else{logger[_0xcfc2('0x9')]('VoiceMusicOnHold,\x20%s,\x20%s',_0x2628a2,_0xcfc2('0xb'));_0x25465b(_0x1f765d[_0xcfc2('0x12')][_0xcfc2('0x11')]);}})['catch'](function(_0x1c6149){logger[_0xcfc2('0xf')](_0xcfc2('0xa'),_0x2628a2,_0x1c6149);_0x27cdbc(_0x1c6149);});});}
\ No newline at end of file
+var _0xe9b7=['catch','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','request','then','info','VoiceMusicOnHold,\x20%s,\x20%s','request\x20sent','debug','VoiceMusicOnHold,\x20%s,\x20%s,\x20%s','error','message','result'];(function(_0x1ecb37,_0x334181){var _0x1062a1=function(_0xefe217){while(--_0xefe217){_0x1ecb37['push'](_0x1ecb37['shift']());}};_0x1062a1(++_0x334181);}(_0xe9b7,0x157));var _0x7e9b=function(_0x136533,_0x41cef9){_0x136533=_0x136533-0x0;var _0x2cc80c=_0xe9b7[_0x136533];return _0x2cc80c;};'use strict';var _=require('lodash');var util=require(_0x7e9b('0x0'));var moment=require(_0x7e9b('0x1'));var BPromise=require(_0x7e9b('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x7e9b('0x3'))['db'];var utils=require(_0x7e9b('0x4'));var logger=require(_0x7e9b('0x5'))(_0x7e9b('0x6'));var config=require(_0x7e9b('0x7'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x291b60,_0x17cbc9,_0x44647e){return new BPromise(function(_0x223c70,_0x580c9d){return client[_0x7e9b('0x8')](_0x291b60,_0x44647e)[_0x7e9b('0x9')](function(_0x1fb162){logger[_0x7e9b('0xa')](_0x7e9b('0xb'),_0x17cbc9,_0x7e9b('0xc'));logger[_0x7e9b('0xd')](_0x7e9b('0xe'),_0x17cbc9,'request\x20sent',JSON['stringify'](_0x1fb162));if(_0x1fb162[_0x7e9b('0xf')]){if(_0x1fb162[_0x7e9b('0xf')]['code']===0x1f4){logger[_0x7e9b('0xf')](_0x7e9b('0xb'),_0x17cbc9,_0x1fb162['error']['message']);return _0x580c9d(_0x1fb162[_0x7e9b('0xf')][_0x7e9b('0x10')]);}logger[_0x7e9b('0xf')](_0x7e9b('0xb'),_0x17cbc9,_0x1fb162[_0x7e9b('0xf')][_0x7e9b('0x10')]);return _0x223c70(_0x1fb162[_0x7e9b('0xf')][_0x7e9b('0x10')]);}else{logger['info']('VoiceMusicOnHold,\x20%s,\x20%s',_0x17cbc9,_0x7e9b('0xc'));_0x223c70(_0x1fb162[_0x7e9b('0x11')]['message']);}})[_0x7e9b('0x12')](function(_0x36ca2e){logger[_0x7e9b('0xf')](_0x7e9b('0xb'),_0x17cbc9,_0x36ca2e);_0x580c9d(_0x36ca2e);});});}
\ No newline at end of file