Built motion from commit (unavailable).|2.5.8
[motion2.git] / server / api / userFaxQueue / userFaxQueue.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 _0xe676=['../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','request','then','info','UserFaxQueue,\x20%s,\x20%s','debug','UserFaxQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','result','catch','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x1c3480,_0x28983f){var _0x22f8f9=function(_0xbf504c){while(--_0xbf504c){_0x1c3480['push'](_0x1c3480['shift']());}};_0x22f8f9(++_0x28983f);}(_0xe676,0x1d5));var _0x6e67=function(_0x9c2427,_0x17c865){_0x9c2427=_0x9c2427-0x0;var _0x51984f=_0xe676[_0x9c2427];return _0x51984f;};'use strict';var _=require(_0x6e67('0x0'));var util=require(_0x6e67('0x1'));var moment=require(_0x6e67('0x2'));var BPromise=require(_0x6e67('0x3'));var rs=require(_0x6e67('0x4'));var fs=require('fs');var Redis=require(_0x6e67('0x5'));var db=require(_0x6e67('0x6'))['db'];var utils=require(_0x6e67('0x7'));var logger=require('../../config/logger')(_0x6e67('0x8'));var config=require(_0x6e67('0x9'));var jayson=require(_0x6e67('0xa'));var client=jayson[_0x6e67('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0xb2524c,_0x57da2c,_0x4d0e9a){return new BPromise(function(_0x386f3c,_0x41f0c9){return client[_0x6e67('0xc')](_0xb2524c,_0x4d0e9a)[_0x6e67('0xd')](function(_0x3aae5c){logger[_0x6e67('0xe')](_0x6e67('0xf'),_0x57da2c,'request\x20sent');logger[_0x6e67('0x10')](_0x6e67('0x11'),_0x57da2c,'request\x20sent',JSON[_0x6e67('0x12')](_0x3aae5c));if(_0x3aae5c[_0x6e67('0x13')]){if(_0x3aae5c[_0x6e67('0x13')][_0x6e67('0x14')]===0x1f4){logger[_0x6e67('0x13')](_0x6e67('0xf'),_0x57da2c,_0x3aae5c[_0x6e67('0x13')]['message']);return _0x41f0c9(_0x3aae5c[_0x6e67('0x13')]['message']);}logger[_0x6e67('0x13')](_0x6e67('0xf'),_0x57da2c,_0x3aae5c[_0x6e67('0x13')][_0x6e67('0x15')]);return _0x386f3c(_0x3aae5c['error'][_0x6e67('0x15')]);}else{logger['info'](_0x6e67('0xf'),_0x57da2c,_0x6e67('0x16'));_0x386f3c(_0x3aae5c[_0x6e67('0x17')]['message']);}})[_0x6e67('0x18')](function(_0x114591){logger[_0x6e67('0x13')](_0x6e67('0xf'),_0x57da2c,_0x114591);_0x41f0c9(_0x114591);});});}