Built motion from commit b0a9a629.|2.6.33
[motion2.git] / server / api / teamVoiceQueue / teamVoiceQueue.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 _0xae99=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','info','TeamVoiceQueue,\x20%s,\x20%s','request\x20sent','debug','TeamVoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','ioredis','../../mysqldb'];(function(_0x15b230,_0x5845b3){var _0x4ae3f6=function(_0x46cde7){while(--_0x46cde7){_0x15b230['push'](_0x15b230['shift']());}};_0x4ae3f6(++_0x5845b3);}(_0xae99,0x172));var _0x9ae9=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0xae99[_0x397e5f];return _0x5302b8;};'use strict';var _=require(_0x9ae9('0x0'));var util=require(_0x9ae9('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9ae9('0x2'));var db=require(_0x9ae9('0x3'))['db'];var utils=require(_0x9ae9('0x4'));var logger=require(_0x9ae9('0x5'))(_0x9ae9('0x6'));var config=require(_0x9ae9('0x7'));var jayson=require(_0x9ae9('0x8'));var client=jayson[_0x9ae9('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5e2871,_0x1eeea9,_0x5e1734){return new BPromise(function(_0x61398c,_0x2c6eb5){return client[_0x9ae9('0xa')](_0x5e2871,_0x5e1734)['then'](function(_0x193030){logger[_0x9ae9('0xb')](_0x9ae9('0xc'),_0x1eeea9,_0x9ae9('0xd'));logger[_0x9ae9('0xe')](_0x9ae9('0xf'),_0x1eeea9,_0x9ae9('0xd'),JSON[_0x9ae9('0x10')](_0x193030));if(_0x193030[_0x9ae9('0x11')]){if(_0x193030[_0x9ae9('0x11')][_0x9ae9('0x12')]===0x1f4){logger[_0x9ae9('0x11')](_0x9ae9('0xc'),_0x1eeea9,_0x193030[_0x9ae9('0x11')][_0x9ae9('0x13')]);return _0x2c6eb5(_0x193030[_0x9ae9('0x11')][_0x9ae9('0x13')]);}logger[_0x9ae9('0x11')](_0x9ae9('0xc'),_0x1eeea9,_0x193030[_0x9ae9('0x11')][_0x9ae9('0x13')]);return _0x61398c(_0x193030[_0x9ae9('0x11')][_0x9ae9('0x13')]);}else{logger[_0x9ae9('0xb')](_0x9ae9('0xc'),_0x1eeea9,'request\x20sent');_0x61398c(_0x193030[_0x9ae9('0x14')][_0x9ae9('0x13')]);}})[_0x9ae9('0x15')](function(_0x5bc5d2){logger[_0x9ae9('0x11')]('TeamVoiceQueue,\x20%s,\x20%s',_0x1eeea9,_0x5bc5d2);_0x2c6eb5(_0x5bc5d2);});});}