Built motion from commit b5413ace.|2.6.9
[motion2.git] / server / api / voiceQueuesLog / voiceQueuesLog.rpc.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xd19f=['moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','VoiceQueuesLog,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','util'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xd19f,0x16e));var _0xfd19=function(_0x4f1da5,_0x4ced17){_0x4f1da5=_0x4f1da5-0x0;var _0xe972a8=_0xd19f[_0x4f1da5];return _0xe972a8;};'use strict';var _=require(_0xfd19('0x0'));var util=require(_0xfd19('0x1'));var moment=require(_0xfd19('0x2'));var BPromise=require(_0xfd19('0x3'));var rs=require(_0xfd19('0x4'));var fs=require('fs');var Redis=require(_0xfd19('0x5'));var db=require(_0xfd19('0x6'))['db'];var utils=require(_0xfd19('0x7'));var logger=require(_0xfd19('0x8'))(_0xfd19('0x9'));var config=require(_0xfd19('0xa'));var jayson=require(_0xfd19('0xb'));var client=jayson['client'][_0xfd19('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x37064c,_0x5124ec,_0x17ef2e){return new BPromise(function(_0x3d4a80,_0x14ed82){return client[_0xfd19('0xd')](_0x37064c,_0x17ef2e)['then'](function(_0xbe75f0){logger['info'](_0xfd19('0xe'),_0x5124ec,_0xfd19('0xf'));logger[_0xfd19('0x10')]('VoiceQueuesLog,\x20%s,\x20%s,\x20%s',_0x5124ec,_0xfd19('0xf'),JSON[_0xfd19('0x11')](_0xbe75f0));if(_0xbe75f0[_0xfd19('0x12')]){if(_0xbe75f0[_0xfd19('0x12')][_0xfd19('0x13')]===0x1f4){logger[_0xfd19('0x12')](_0xfd19('0xe'),_0x5124ec,_0xbe75f0[_0xfd19('0x12')][_0xfd19('0x14')]);return _0x14ed82(_0xbe75f0[_0xfd19('0x12')][_0xfd19('0x14')]);}logger[_0xfd19('0x12')](_0xfd19('0xe'),_0x5124ec,_0xbe75f0[_0xfd19('0x12')][_0xfd19('0x14')]);return _0x3d4a80(_0xbe75f0[_0xfd19('0x12')][_0xfd19('0x14')]);}else{logger['info']('VoiceQueuesLog,\x20%s,\x20%s',_0x5124ec,_0xfd19('0xf'));_0x3d4a80(_0xbe75f0[_0xfd19('0x15')][_0xfd19('0x14')]);}})[_0xfd19('0x16')](function(_0x5ce09f){logger['error']('VoiceQueuesLog,\x20%s,\x20%s',_0x5124ec,_0x5ce09f);_0x14ed82(_0x5ce09f);});});}