Built motion from commit (unavailable).|2.5.22
[motion2.git] / server / api / voiceMusicOnHold / voiceMusicOnHold.rpc.js
index 2fd9311..7b08d12 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xed13=['stringify','error','code','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','then','info','VoiceMusicOnHold,\x20%s,\x20%s','request\x20sent','VoiceMusicOnHold,\x20%s,\x20%s,\x20%s'];(function(_0x3b0e49,_0x9beb61){var _0x26bb4d=function(_0x5f6d37){while(--_0x5f6d37){_0x3b0e49['push'](_0x3b0e49['shift']());}};_0x26bb4d(++_0x9beb61);}(_0xed13,0x89));var _0x3ed1=function(_0x16f660,_0x1a1f1b){_0x16f660=_0x16f660-0x0;var _0x5a7096=_0xed13[_0x16f660];return _0x5a7096;};'use strict';var _=require(_0x3ed1('0x0'));var util=require(_0x3ed1('0x1'));var moment=require(_0x3ed1('0x2'));var BPromise=require(_0x3ed1('0x3'));var rs=require(_0x3ed1('0x4'));var fs=require('fs');var Redis=require(_0x3ed1('0x5'));var db=require(_0x3ed1('0x6'))['db'];var utils=require(_0x3ed1('0x7'));var logger=require('../../config/logger')(_0x3ed1('0x8'));var config=require(_0x3ed1('0x9'));var jayson=require(_0x3ed1('0xa'));var client=jayson[_0x3ed1('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x398035,_0x448732,_0x5247e4){return new BPromise(function(_0x5b27e5,_0x58bd0c){return client['request'](_0x398035,_0x5247e4)[_0x3ed1('0xc')](function(_0x41adad){logger[_0x3ed1('0xd')](_0x3ed1('0xe'),_0x448732,_0x3ed1('0xf'));logger['debug'](_0x3ed1('0x10'),_0x448732,_0x3ed1('0xf'),JSON[_0x3ed1('0x11')](_0x41adad));if(_0x41adad[_0x3ed1('0x12')]){if(_0x41adad['error'][_0x3ed1('0x13')]===0x1f4){logger['error'](_0x3ed1('0xe'),_0x448732,_0x41adad['error'][_0x3ed1('0x14')]);return _0x58bd0c(_0x41adad['error'][_0x3ed1('0x14')]);}logger['error'](_0x3ed1('0xe'),_0x448732,_0x41adad['error']['message']);return _0x5b27e5(_0x41adad[_0x3ed1('0x12')][_0x3ed1('0x14')]);}else{logger[_0x3ed1('0xd')]('VoiceMusicOnHold,\x20%s,\x20%s',_0x448732,_0x3ed1('0xf'));_0x5b27e5(_0x41adad['result'][_0x3ed1('0x14')]);}})[_0x3ed1('0x15')](function(_0x511386){logger[_0x3ed1('0x12')](_0x3ed1('0xe'),_0x448732,_0x511386);_0x58bd0c(_0x511386);});});}
\ No newline at end of file
+var _0xdadb=['catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','VoiceMusicOnHold,\x20%s,\x20%s','request\x20sent','VoiceMusicOnHold,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result'];(function(_0x9ba307,_0x570631){var _0x335d04=function(_0x3125d0){while(--_0x3125d0){_0x9ba307['push'](_0x9ba307['shift']());}};_0x335d04(++_0x570631);}(_0xdadb,0x1cf));var _0xbdad=function(_0x2c3245,_0x540b38){_0x2c3245=_0x2c3245-0x0;var _0x4e1b17=_0xdadb[_0x2c3245];return _0x4e1b17;};'use strict';var _=require(_0xbdad('0x0'));var util=require('util');var moment=require(_0xbdad('0x1'));var BPromise=require(_0xbdad('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xbdad('0x3'));var db=require(_0xbdad('0x4'))['db'];var utils=require(_0xbdad('0x5'));var logger=require(_0xbdad('0x6'))(_0xbdad('0x7'));var config=require(_0xbdad('0x8'));var jayson=require(_0xbdad('0x9'));var client=jayson['client'][_0xbdad('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x166c38,_0x2b10bd,_0xd211b4){return new BPromise(function(_0x4a142a,_0x421d59){return client['request'](_0x166c38,_0xd211b4)['then'](function(_0x5b73cb){logger['info'](_0xbdad('0xb'),_0x2b10bd,_0xbdad('0xc'));logger['debug'](_0xbdad('0xd'),_0x2b10bd,_0xbdad('0xc'),JSON[_0xbdad('0xe')](_0x5b73cb));if(_0x5b73cb[_0xbdad('0xf')]){if(_0x5b73cb[_0xbdad('0xf')][_0xbdad('0x10')]===0x1f4){logger['error'](_0xbdad('0xb'),_0x2b10bd,_0x5b73cb[_0xbdad('0xf')]['message']);return _0x421d59(_0x5b73cb[_0xbdad('0xf')][_0xbdad('0x11')]);}logger[_0xbdad('0xf')](_0xbdad('0xb'),_0x2b10bd,_0x5b73cb['error'][_0xbdad('0x11')]);return _0x4a142a(_0x5b73cb[_0xbdad('0xf')][_0xbdad('0x11')]);}else{logger[_0xbdad('0x12')](_0xbdad('0xb'),_0x2b10bd,'request\x20sent');_0x4a142a(_0x5b73cb[_0xbdad('0x13')][_0xbdad('0x11')]);}})[_0xbdad('0x14')](function(_0x3384fd){logger['error'](_0xbdad('0xb'),_0x2b10bd,_0x3384fd);_0x421d59(_0x3384fd);});});}
\ No newline at end of file