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 _0x3d53=['rpc','error','message','result','catch','exports','jayson/promise','bluebird','../../config/logger','routing','client','http','Request','request','then','debug'];(function(_0x35b80e,_0x120fd7){var _0x363914=function(_0x14aaf9){while(--_0x14aaf9){_0x35b80e['push'](_0x35b80e['shift']());}};_0x363914(++_0x120fd7);}(_0x3d53,0x126));var _0x33d5=function(_0x4ec520,_0x15fee2){_0x4ec520=_0x4ec520-0x0;var _0xed49d7=_0x3d53[_0x4ec520];return _0xed49d7;};'use strict';var jayson=require(_0x33d5('0x0'));var BPromise=require(_0x33d5('0x1'));var logger=require(_0x33d5('0x2'))(_0x33d5('0x3'));var client=jayson[_0x33d5('0x4')][_0x33d5('0x5')]({'port':0x2329});client[_0x33d5('0x6')]=function(_0x2acf46,_0x4ff03d){return new BPromise(function(_0x4b2aa5,_0x4ab904){return client[_0x33d5('0x7')](_0x2acf46,_0x4ff03d)[_0x33d5('0x8')](function(_0x63e8c4){logger[_0x33d5('0x9')](_0x33d5('0xa'),'routing',_0x2acf46,_0x4ff03d,_0x63e8c4);if(_0x63e8c4[_0x33d5('0xb')]){logger[_0x33d5('0xb')](_0x33d5('0xa'),_0x33d5('0x3'),_0x2acf46,_0x63e8c4[_0x33d5('0xb')][_0x33d5('0xc')],_0x4ff03d);return _0x4ab904(_0x63e8c4[_0x33d5('0xb')]['message']);}else{return _0x4b2aa5(_0x63e8c4[_0x33d5('0xd')]);}})[_0x33d5('0xe')](function(_0x4b0d57){logger[_0x33d5('0xb')]('rpc',_0x33d5('0x3'),_0x2acf46,_0x4b0d57,_0x4ff03d);return _0x4ab904(_0x4b0d57);});});};module[_0x33d5('0xf')]=client;