1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0x5c4e=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','OpenchannelTransferReport,\x20%s,\x20%s','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','lodash','util','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x33121c,_0x395903){var _0x123193=function(_0x41f650){while(--_0x41f650){_0x33121c['push'](_0x33121c['shift']());}};_0x123193(++_0x395903);}(_0x5c4e,0xea));var _0xe5c4=function(_0x534693,_0x307783){_0x534693=_0x534693-0x0;var _0x5b0292=_0x5c4e[_0x534693];return _0x5b0292;};'use strict';var _=require(_0xe5c4('0x0'));var util=require(_0xe5c4('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xe5c4('0x2'));var fs=require('fs');var Redis=require(_0xe5c4('0x3'));var db=require(_0xe5c4('0x4'))['db'];var utils=require(_0xe5c4('0x5'));var logger=require(_0xe5c4('0x6'))(_0xe5c4('0x7'));var config=require(_0xe5c4('0x8'));var jayson=require(_0xe5c4('0x9'));var client=jayson[_0xe5c4('0xa')][_0xe5c4('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x176e11,_0x3c9085,_0x702d2){return new BPromise(function(_0x472f2e,_0x421966){return client[_0xe5c4('0xc')](_0x176e11,_0x702d2)[_0xe5c4('0xd')](function(_0x35295c){logger['info'](_0xe5c4('0xe'),_0x3c9085,_0xe5c4('0xf'));logger[_0xe5c4('0x10')](_0xe5c4('0x11'),_0x3c9085,_0xe5c4('0xf'),JSON[_0xe5c4('0x12')](_0x35295c));if(_0x35295c['error']){if(_0x35295c[_0xe5c4('0x13')]['code']===0x1f4){logger[_0xe5c4('0x13')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x3c9085,_0x35295c[_0xe5c4('0x13')][_0xe5c4('0x14')]);return _0x421966(_0x35295c[_0xe5c4('0x13')][_0xe5c4('0x14')]);}logger[_0xe5c4('0x13')](_0xe5c4('0xe'),_0x3c9085,_0x35295c[_0xe5c4('0x13')]['message']);return _0x472f2e(_0x35295c[_0xe5c4('0x13')][_0xe5c4('0x14')]);}else{logger[_0xe5c4('0x15')](_0xe5c4('0xe'),_0x3c9085,_0xe5c4('0xf'));_0x472f2e(_0x35295c[_0xe5c4('0x16')][_0xe5c4('0x14')]);}})[_0xe5c4('0x17')](function(_0x157616){logger[_0xe5c4('0x13')](_0xe5c4('0xe'),_0x3c9085,_0x157616);_0x421966(_0x157616);});});}