Built motion from commit (unavailable).|2.5.5
[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 _0x657b=['bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','VoiceQueuesLog,\x20%s,\x20%s','debug','VoiceQueuesLog,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','lodash','util','moment'];(function(_0x33032e,_0x31411a){var _0x13316b=function(_0x2fb049){while(--_0x2fb049){_0x33032e['push'](_0x33032e['shift']());}};_0x13316b(++_0x31411a);}(_0x657b,0x131));var _0xb657=function(_0x52f8d0,_0x3b39f7){_0x52f8d0=_0x52f8d0-0x0;var _0x35f0a5=_0x657b[_0x52f8d0];return _0x35f0a5;};'use strict';var _=require(_0xb657('0x0'));var util=require(_0xb657('0x1'));var moment=require(_0xb657('0x2'));var BPromise=require(_0xb657('0x3'));var rs=require(_0xb657('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb657('0x5'))['db'];var utils=require(_0xb657('0x6'));var logger=require('../../config/logger')(_0xb657('0x7'));var config=require(_0xb657('0x8'));var jayson=require(_0xb657('0x9'));var client=jayson[_0xb657('0xa')][_0xb657('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5d54f6,_0x471e78,_0x55acdf){return new BPromise(function(_0x326dd7,_0x42a844){return client[_0xb657('0xc')](_0x5d54f6,_0x55acdf)['then'](function(_0x36b334){logger['info'](_0xb657('0xd'),_0x471e78,'request\x20sent');logger[_0xb657('0xe')](_0xb657('0xf'),_0x471e78,_0xb657('0x10'),JSON['stringify'](_0x36b334));if(_0x36b334[_0xb657('0x11')]){if(_0x36b334[_0xb657('0x11')][_0xb657('0x12')]===0x1f4){logger[_0xb657('0x11')]('VoiceQueuesLog,\x20%s,\x20%s',_0x471e78,_0x36b334[_0xb657('0x11')][_0xb657('0x13')]);return _0x42a844(_0x36b334['error'][_0xb657('0x13')]);}logger[_0xb657('0x11')](_0xb657('0xd'),_0x471e78,_0x36b334[_0xb657('0x11')]['message']);return _0x326dd7(_0x36b334[_0xb657('0x11')][_0xb657('0x13')]);}else{logger['info']('VoiceQueuesLog,\x20%s,\x20%s',_0x471e78,_0xb657('0x10'));_0x326dd7(_0x36b334[_0xb657('0x14')][_0xb657('0x13')]);}})[_0xb657('0x15')](function(_0x17c045){logger[_0xb657('0x11')](_0xb657('0xd'),_0x471e78,_0x17c045);_0x42a844(_0x17c045);});});}