Built motion from commit (unavailable).|2.5.8
[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 _0x823c=['catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','VoiceQueuesLog,\x20%s,\x20%s','VoiceQueuesLog,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result'];(function(_0x209ae6,_0x44158f){var _0x51833b=function(_0x1be235){while(--_0x1be235){_0x209ae6['push'](_0x209ae6['shift']());}};_0x51833b(++_0x44158f);}(_0x823c,0x143));var _0xc823=function(_0x25fa28,_0x5d4e47){_0x25fa28=_0x25fa28-0x0;var _0x325ae5=_0x823c[_0x25fa28];return _0x325ae5;};'use strict';var _=require(_0xc823('0x0'));var util=require('util');var moment=require(_0xc823('0x1'));var BPromise=require(_0xc823('0x2'));var rs=require(_0xc823('0x3'));var fs=require('fs');var Redis=require(_0xc823('0x4'));var db=require(_0xc823('0x5'))['db'];var utils=require(_0xc823('0x6'));var logger=require('../../config/logger')(_0xc823('0x7'));var config=require(_0xc823('0x8'));var jayson=require(_0xc823('0x9'));var client=jayson[_0xc823('0xa')][_0xc823('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x49e861,_0xba407e,_0x472007){return new BPromise(function(_0x5daab9,_0x52bb76){return client[_0xc823('0xc')](_0x49e861,_0x472007)[_0xc823('0xd')](function(_0x53d48d){logger[_0xc823('0xe')](_0xc823('0xf'),_0xba407e,'request\x20sent');logger['debug'](_0xc823('0x10'),_0xba407e,_0xc823('0x11'),JSON[_0xc823('0x12')](_0x53d48d));if(_0x53d48d[_0xc823('0x13')]){if(_0x53d48d[_0xc823('0x13')]['code']===0x1f4){logger[_0xc823('0x13')](_0xc823('0xf'),_0xba407e,_0x53d48d[_0xc823('0x13')][_0xc823('0x14')]);return _0x52bb76(_0x53d48d[_0xc823('0x13')][_0xc823('0x14')]);}logger['error'](_0xc823('0xf'),_0xba407e,_0x53d48d[_0xc823('0x13')][_0xc823('0x14')]);return _0x5daab9(_0x53d48d[_0xc823('0x13')]['message']);}else{logger['info']('VoiceQueuesLog,\x20%s,\x20%s',_0xba407e,'request\x20sent');_0x5daab9(_0x53d48d[_0xc823('0x15')]['message']);}})[_0xc823('0x16')](function(_0x122510){logger[_0xc823('0x13')](_0xc823('0xf'),_0xba407e,_0x122510);_0x52bb76(_0x122510);});});}