f677ff35cedcb4f978d84fa529b1e8a48642c141
[motion2.git] / server / services / routing / server / index.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 _0x0f19=['busyQueue','QueueReport','update','catch','error\x20update\x20queue\x20report','message\x20is\x20empty','end','capacity','hasOwnProperty','CurrentCapacity','updateRealtime','agent\x20not\x20found','find','chatQueues','available','loggedIn','paused','mailQueues','name','waiting','openchannelQueues','smsQueues','faxQueues','whatsappQueues','values','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','server','http','listen','127.0.0.1','log','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','lodash','util','path','bluebird','./applications/utils','routing','../rpc/mailQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../lib/rule-engine','format','%s.%s.%s','IntervalId','isNil','Intervals','map','interval','rules','channel','message','interaction','checkWaitingNotifications','transfer','applications','length','existsSync','app','toLowerCase','autoreply','appdata','split','mail','push','slice','join','dialogflow','dialogflowv2','amazonlex','tag','TagId','tvox','getMustacheRender','account','notificationTemplate','ChatWebsiteId','body','%s:%s:%s','./interval','condition','consequence','priority','Push\x20new\x20rule','intervals','error','Please\x20create\x20a\x20new\x20file\x20under','.js','execute','info','Applications\x20executed','stringify','matchPath','emit','complete','Skipped\x20routing\x20for\x20%s','No\x20applications\x20to\x20execute','stack','agent','agents','busy'];(function(_0xdf14fc,_0x573450){var _0x23df83=function(_0x4503c4){while(--_0x4503c4){_0xdf14fc['push'](_0xdf14fc['shift']());}};_0x23df83(++_0x573450);}(_0x0f19,0xf3));var _0x90f1=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0f19[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x90f1('0x0'));var util=require(_0x90f1('0x1'));var path=require(_0x90f1('0x2'));var fs=require('fs');var jayson=require('jayson/promise');var BPromise=require(_0x90f1('0x3'));var utils=require(_0x90f1('0x4'));var sUtils=require('./applications/strategy/util');var logger=require('../../../config/logger')(_0x90f1('0x5'));var rpc={'openchannelQueueReport':require('../rpc/openchannelQueueReport'),'mailQueueReport':require(_0x90f1('0x6')),'chatQueueReport':require(_0x90f1('0x7')),'smsQueueReport':require(_0x90f1('0x8')),'faxQueueReport':require('../rpc/faxQueueReport'),'whatsappQueueReport':require('../rpc/whatsappQueueReport')};var RuleEngine=require(_0x90f1('0x9'));function getId(_0x519c56,_0x4156c2,_0x59e56d){return util[_0x90f1('0xa')](_0x90f1('0xb'),_0x519c56,_0x4156c2||0x0,_0x59e56d||0x0);}function getIntervals(_0x50d858,_0x141ee8){var _0x5f4143=[];if(!_['isNil'](_0x141ee8[_0x90f1('0xc')])&&!_[_0x90f1('0xd')](_0x50d858[_0x141ee8[_0x90f1('0xc')]])&&!_[_0x90f1('0xd')](_0x50d858[_0x141ee8[_0x90f1('0xc')]][_0x90f1('0xe')])){_0x5f4143=_[_0x90f1('0xf')](_0x50d858[_0x141ee8[_0x90f1('0xc')]][_0x90f1('0xe')],'interval');}else if(!_[_0x90f1('0xd')](_0x141ee8[_0x90f1('0x10')])){_0x5f4143=[_0x141ee8['interval']];}return _0x5f4143;}exports['listen']=function(_0x43dbd0){_0x43dbd0[_0x90f1('0x11')]={};return new BPromise(function(_0x353881,_0x4ab1b9){var _0x452fe5={'Start':function(_0x3c5621){var _0x18c10b=this;return new Promise(function(_0x100747,_0x51e663){if(_0x3c5621){try{var _0x24026a=[];var _0x40e574=getId(_0x3c5621[_0x90f1('0x12')],_0x3c5621[_0x90f1('0x13')]?_0x3c5621['message']['id']:0x0,_0x3c5621[_0x90f1('0x14')]?_0x3c5621[_0x90f1('0x14')]['id']:0x0);var _0xe7aa22=sUtils[_0x90f1('0x15')](_0x43dbd0,_0x3c5621);if(_0x3c5621[_0x90f1('0x16')]||!_0xe7aa22&&_0x3c5621[_0x90f1('0x17')]&&_['isArray'](_0x3c5621[_0x90f1('0x17')])&&_0x3c5621[_0x90f1('0x17')][_0x90f1('0x18')]){for(var _0x4e2ebd=0x0;_0x4e2ebd<_0x3c5621['applications'][_0x90f1('0x18')];_0x4e2ebd+=0x1){var _0x177ea5=_0x3c5621[_0x90f1('0x17')][_0x4e2ebd];if(fs[_0x90f1('0x19')](path['join'](__dirname,'applications',_0x177ea5[_0x90f1('0x1a')]+'.js'))){var _0x44a761=[];switch(_0x177ea5[_0x90f1('0x1a')][_0x90f1('0x1b')]()){case _0x90f1('0x1c'):var _0x4d0a87=_0x177ea5[_0x90f1('0x1d')][_0x90f1('0x1e')](',');if(_0x3c5621[_0x90f1('0x12')]===_0x90f1('0x1f')){_0x44a761['push'](_0x4d0a87[0x0]);_0x44a761[_0x90f1('0x20')](_0x4d0a87[0x1]);_0x44a761[_0x90f1('0x20')](_0x4d0a87[_0x90f1('0x21')](0x2,_0x4d0a87['length'])[_0x90f1('0x22')](','));}else{_0x44a761[_0x90f1('0x20')](_0x4d0a87[0x0]);_0x44a761[_0x90f1('0x20')](_0x4d0a87['slice'](0x1,_0x4d0a87[_0x90f1('0x18')])[_0x90f1('0x22')](','));}break;case _0x90f1('0x23'):var _0x556cea=_0x177ea5['appdata']['split'](',');_0x44a761[_0x90f1('0x20')](_0x556cea[0x0]);_0x44a761[_0x90f1('0x20')](_0x556cea[0x1]);_0x44a761[_0x90f1('0x20')](_0x556cea[_0x90f1('0x21')](0x2,_0x556cea[_0x90f1('0x18')])[_0x90f1('0x22')](','));break;case _0x90f1('0x24'):var _0x1af312=_0x177ea5['appdata'][_0x90f1('0x1e')](',');_0x44a761[_0x90f1('0x20')](_0x1af312[0x0]);_0x44a761['push'](_0x1af312[0x1]);_0x44a761[_0x90f1('0x20')](_0x1af312[0x2]);_0x44a761[_0x90f1('0x20')](_0x1af312[0x3]);_0x44a761[_0x90f1('0x20')](_0x1af312[_0x90f1('0x21')](0x4,_0x1af312['length'])[_0x90f1('0x22')](','));break;case _0x90f1('0x25'):var _0xab4252=_0x177ea5[_0x90f1('0x1d')][_0x90f1('0x1e')](',');_0x44a761[_0x90f1('0x20')](_0xab4252[0x0]);_0x44a761[_0x90f1('0x20')](_0xab4252[0x1]);_0x44a761[_0x90f1('0x20')](_0xab4252[0x2]);_0x44a761[_0x90f1('0x20')](_0xab4252[0x3]);_0x44a761[_0x90f1('0x20')](_0xab4252['slice'](0x4,_0xab4252[_0x90f1('0x18')])[_0x90f1('0x22')](','));break;case'message':_0x44a761[_0x90f1('0x20')](_0x177ea5[_0x90f1('0x1d')]);break;case _0x90f1('0x26'):_0x44a761[_0x90f1('0x20')](_0x177ea5[_0x90f1('0x27')]);_0x44a761[_0x90f1('0x20')](_0x177ea5[_0x90f1('0x1d')]);break;case _0x90f1('0x28'):var _0x2cf389=utils[_0x90f1('0x29')](_0x3c5621[_0x90f1('0x2a')][_0x90f1('0x2b')],_0x3c5621);var _0x4423c3=_0x177ea5[_0x90f1('0x1d')][_0x90f1('0x1e')](',');_0x44a761[_0x90f1('0x20')](_0x4423c3[0x0]);_0x44a761[_0x90f1('0x20')](_0x4423c3[0x1]);_0x44a761[_0x90f1('0x20')](_0x4423c3[0x2]);_0x44a761[_0x90f1('0x20')](_0x4423c3[0x3]);_0x44a761['push'](_0x4423c3[0x4]);_0x44a761[_0x90f1('0x20')](_0x4423c3[0x5]);_0x44a761[_0x90f1('0x20')](_0x4423c3[0x6]);_0x44a761[_0x90f1('0x20')](_0x4423c3[0x7]);_0x44a761[_0x90f1('0x20')](_0x4423c3[0x8]);_0x44a761['push'](_0x4423c3[0x9]);_0x44a761[_0x90f1('0x20')](_0x4423c3[0xa]);_0x44a761[_0x90f1('0x20')](_0x3c5621[_0x90f1('0x14')]['id']);_0x44a761['push'](_0x3c5621[_0x90f1('0x13')]['id']);_0x44a761[_0x90f1('0x20')](_0x177ea5[_0x90f1('0x2c')]);_0x44a761[_0x90f1('0x20')](_0x3c5621['interaction']['ContactId']);_0x44a761['push'](_0x3c5621[_0x90f1('0x2d')][_0x90f1('0x2d')]);_0x44a761[_0x90f1('0x20')](_0x2cf389);break;default:_0x44a761=_[_0x90f1('0xd')](_0x177ea5[_0x90f1('0x1d')])?[]:_0x177ea5['appdata'][_0x90f1('0x1e')](',');}var _0x2b480a={'id':util['format'](_0x90f1('0x2e'),_0x40e574,_0x177ea5['id'],_0x177ea5[_0x90f1('0x1a')]),'condition':require(_0x90f1('0x2f'))[_0x90f1('0x30')](_0x40e574,getIntervals(_0x43dbd0['intervals'],_0x177ea5),_0x43dbd0),'consequence':require('./applications/'+_0x177ea5[_0x90f1('0x1a')])[_0x90f1('0x31')](_0x40e574,_0x44a761,_0x43dbd0,_0x3c5621),'p':_0x177ea5[_0x90f1('0x32')]||0x0};logger['info'](_0x90f1('0x33'),_0x2b480a['id'],'on\x20interval',getIntervals(_0x43dbd0[_0x90f1('0x34')],_0x177ea5)[_0x90f1('0x22')]('\x20|\x20'));_0x24026a[_0x90f1('0x20')](_0x2b480a);}else{logger[_0x90f1('0x35')](_0x90f1('0x36'),path['join'](__dirname,_0x90f1('0x17'),_0x177ea5[_0x90f1('0x1a')]+_0x90f1('0x37')));}}_0x43dbd0[_0x90f1('0x11')][_0x40e574]=new RuleEngine(_0x24026a);_0x43dbd0[_0x90f1('0x11')][_0x40e574][_0x90f1('0x38')](_0x3c5621,function(_0x47d7d1){logger[_0x90f1('0x39')](_0x90f1('0x3a'),JSON[_0x90f1('0x3b')](_0x47d7d1[_0x90f1('0x3c')]));if(_0x43dbd0['rules'][_0x40e574]){_0x43dbd0['rules'][_0x40e574][_0x90f1('0x3d')](_0x90f1('0x3e'));}});return _0x100747({'code':0xc8,'message':_0x3c5621});}else{if(_0xe7aa22){logger['info'](util[_0x90f1('0xa')](_0x90f1('0x3f'),_0x40e574));}else{logger[_0x90f1('0x39')](_0x90f1('0x40'));}return _0x100747({'code':0xc8,'message':_0x3c5621});}}catch(_0x39d9bc){logger[_0x90f1('0x35')](_0x39d9bc[_0x90f1('0x41')]);return _0x51e663(_0x18c10b[_0x90f1('0x35')](0x1f4,_0x39d9bc));}}return _0x51e663('routing\x20is\x20empty');});},'AcceptMessage':function(_0x462f37){var _0x3c178f=this;return new Promise(function(_0x4ebc65,_0x1e9c62){if(_0x462f37[_0x90f1('0x42')]&&_0x462f37[_0x90f1('0x42')]['id']){if(_0x43dbd0['agents'][_0x462f37[_0x90f1('0x42')]['id']]){_0x43dbd0[_0x90f1('0x43')][_0x462f37[_0x90f1('0x42')]['id']][_0x90f1('0x44')]=![];_0x43dbd0['agents'][_0x462f37[_0x90f1('0x42')]['id']][_0x90f1('0x45')]=undefined;}}if(_0x462f37[_0x90f1('0x13')]&&_0x462f37[_0x90f1('0x13')]['id']){try{var _0x11f893=getId(_0x462f37[_0x90f1('0x12')],_0x462f37[_0x90f1('0x13')]?_0x462f37['message']['id']:0x0,_0x462f37[_0x90f1('0x14')]?_0x462f37[_0x90f1('0x14')]['id']:0x0);if(_0x43dbd0[_0x90f1('0x11')][_0x11f893]){_0x43dbd0['rules'][_0x11f893][_0x90f1('0x3d')]('end');if(rpc[_0x462f37[_0x90f1('0x12')]+_0x90f1('0x46')]){rpc[_0x462f37[_0x90f1('0x12')]+_0x90f1('0x46')][_0x90f1('0x47')](_0x11f893,{'UserId':_0x462f37['message']['UserId']})[_0x90f1('0x48')](function(){logger['error'](_0x90f1('0x49'));});}}return _0x4ebc65({'code':0xc8,'message':_0x462f37});}catch(_0x2ca602){logger['error'](_0x2ca602[_0x90f1('0x41')]);return _0x1e9c62(_0x3c178f['error'](0x1f4,_0x2ca602));}}logger[_0x90f1('0x35')]('message\x20is\x20empty');return _0x1e9c62(_0x3c178f[_0x90f1('0x35')](0x1f4,_0x90f1('0x4a')));});},'RejectMessage':function(_0x5f1429){var _0x32fa75=this;return new Promise(function(_0x2ea4c7,_0x1dc598){if(_0x5f1429[_0x90f1('0x42')]&&_0x5f1429[_0x90f1('0x42')]['id']){try{if(_0x43dbd0[_0x90f1('0x43')][_0x5f1429[_0x90f1('0x42')]['id']]){_0x43dbd0[_0x90f1('0x43')][_0x5f1429['agent']['id']][_0x90f1('0x44')]=![];_0x43dbd0['agents'][_0x5f1429[_0x90f1('0x42')]['id']][_0x90f1('0x45')]=undefined;}return _0x2ea4c7({'code':0xc8,'message':_0x5f1429});}catch(_0x210340){logger[_0x90f1('0x35')](_0x210340[_0x90f1('0x41')]);return _0x1dc598(_0x32fa75[_0x90f1('0x35')](0x1f4,_0x210340));}}logger[_0x90f1('0x35')]('message\x20is\x20empty');return _0x1dc598(_0x32fa75[_0x90f1('0x35')](0x1f4,_0x90f1('0x4a')));});},'AbandonInteraction':function(_0x294347){var _0x3f4a72=this;return new Promise(function(_0x3af272,_0x28feab){if(_0x294347[_0x90f1('0x12')]&&_0x294347[_0x90f1('0x14')]&&_0x294347[_0x90f1('0x14')]['id']){try{var _0x5c01b1=getId(_0x294347[_0x90f1('0x12')],_0x294347[_0x90f1('0x13')]?_0x294347[_0x90f1('0x13')]['id']:0x0,_0x294347[_0x90f1('0x14')]?_0x294347['interaction']['id']:0x0);if(_0x43dbd0[_0x90f1('0x11')][_0x5c01b1]){_0x43dbd0[_0x90f1('0x11')][_0x5c01b1]['emit'](_0x90f1('0x4b'));}return _0x3af272({'code':0xc8,'message':_0x294347});}catch(_0x2bf4e9){logger[_0x90f1('0x35')](_0x2bf4e9[_0x90f1('0x41')]);return _0x28feab(_0x3f4a72[_0x90f1('0x35')](0x1f4,_0x2bf4e9));}}logger[_0x90f1('0x35')]('message\x20is\x20empty');return _0x28feab(_0x3f4a72[_0x90f1('0x35')](0x1f4,'message\x20is\x20empty'));});},'AgentCapacity':function(_0x46b72f){var _0x1dd564=this;return new Promise(function(_0x21c53d,_0x2f8b21){if(_0x43dbd0[_0x90f1('0x43')]['hasOwnProperty'](_0x46b72f['id'])){for(var _0x41b029 in _0x46b72f[_0x90f1('0x4c')]){if(_0x46b72f[_0x90f1('0x4c')][_0x90f1('0x4d')](_0x41b029)){if(_0x43dbd0['agents'][_0x46b72f['id']][_0x90f1('0x4d')](_0x41b029+_0x90f1('0x4e'))){_0x43dbd0[_0x90f1('0x43')][_0x46b72f['id']][_0x41b029+_0x90f1('0x4e')]=parseInt(_0x46b72f[_0x90f1('0x4c')][_0x41b029],0xa);}}}_0x43dbd0[_0x90f1('0x43')][_0x46b72f['id']][_0x90f1('0x4f')]();return _0x21c53d({'code':0xc8,'message':_0x43dbd0['agents'][_0x46b72f['id']]});}else{return _0x2f8b21(_0x1dd564[_0x90f1('0x35')](0x1f4,_0x90f1('0x50')));}});},'Agents':function(_0x2a3f05){return new Promise(function(_0x3b7203){var _0x3771fc=_['values'](_0x43dbd0[_0x90f1('0x43')]);if(_0x2a3f05&&_0x2a3f05['id']){var _0x1feae5=_[_0x90f1('0x51')](_0x3771fc,function(_0x1bcd22){return _0x1bcd22['id']===_0x2a3f05['id'];});_0x3b7203(_0x1feae5);}else{_0x3b7203({'count':_0x3771fc[_0x90f1('0x18')],'rows':_0x3771fc});}});},'ChatQueues':function(){return new Promise(function(_0x3d4e21){var _0x226fb5=[];for(var _0x578f59 in _0x43dbd0['chatQueues']){if(_0x43dbd0[_0x90f1('0x52')][_0x90f1('0x4d')](_0x578f59)){var _0xebb764=_0x43dbd0[_0x90f1('0x52')][_0x578f59];var _0x500512={'id':_0xebb764['id'],'available':_0xebb764[_0x90f1('0x53')],'loggedIn':_0xebb764[_0x90f1('0x54')],'name':_0xebb764['name'],'paused':_0xebb764[_0x90f1('0x55')],'waiting':_0xebb764['waiting']};_0x226fb5[_0x90f1('0x20')](_0x500512);}}_0x3d4e21({'count':_0x226fb5[_0x90f1('0x18')],'rows':_0x226fb5});});},'MailQueues':function(){return new Promise(function(_0x2a3595){var _0x1eacb2=[];for(var _0xf2998 in _0x43dbd0['mailQueues']){if(_0x43dbd0[_0x90f1('0x56')][_0x90f1('0x4d')](_0xf2998)){var _0x57f2eb=_0x43dbd0[_0x90f1('0x56')][_0xf2998];var _0x1e8531={'id':_0x57f2eb['id'],'available':_0x57f2eb[_0x90f1('0x53')],'loggedIn':_0x57f2eb[_0x90f1('0x54')],'name':_0x57f2eb[_0x90f1('0x57')],'paused':_0x57f2eb[_0x90f1('0x55')],'waiting':_0x57f2eb[_0x90f1('0x58')]};_0x1eacb2[_0x90f1('0x20')](_0x1e8531);}}_0x2a3595({'count':_0x1eacb2['length'],'rows':_0x1eacb2});});},'OpenchannelQueues':function(){return new Promise(function(_0x2e7675){var _0x242b32=[];for(var _0x523cdd in _0x43dbd0[_0x90f1('0x59')]){if(_0x43dbd0[_0x90f1('0x59')][_0x90f1('0x4d')](_0x523cdd)){var _0x3b2e48=_0x43dbd0['openchannelQueues'][_0x523cdd];var _0x469d60={'id':_0x3b2e48['id'],'available':_0x3b2e48[_0x90f1('0x53')],'loggedIn':_0x3b2e48['loggedIn'],'name':_0x3b2e48[_0x90f1('0x57')],'paused':_0x3b2e48[_0x90f1('0x55')],'waiting':_0x3b2e48['waiting']};_0x242b32[_0x90f1('0x20')](_0x469d60);}}_0x2e7675({'count':_0x242b32['length'],'rows':_0x242b32});});},'SmsQueues':function(){return new Promise(function(_0x22843c){var _0x477916=[];for(var _0x25e1eb in _0x43dbd0[_0x90f1('0x5a')]){if(_0x43dbd0[_0x90f1('0x5a')][_0x90f1('0x4d')](_0x25e1eb)){var _0x36cc4b=_0x43dbd0[_0x90f1('0x5a')][_0x25e1eb];var _0x3a6550={'id':_0x36cc4b['id'],'available':_0x36cc4b[_0x90f1('0x53')],'loggedIn':_0x36cc4b['loggedIn'],'name':_0x36cc4b[_0x90f1('0x57')],'paused':_0x36cc4b[_0x90f1('0x55')],'waiting':_0x36cc4b[_0x90f1('0x58')]};_0x477916['push'](_0x3a6550);}}_0x22843c({'count':_0x477916[_0x90f1('0x18')],'rows':_0x477916});});},'FaxQueues':function(){return new Promise(function(_0x463582){var _0x272792=[];for(var _0x261e2b in _0x43dbd0[_0x90f1('0x5b')]){if(_0x43dbd0[_0x90f1('0x5b')][_0x90f1('0x4d')](_0x261e2b)){var _0x4c0170=_0x43dbd0[_0x90f1('0x5b')][_0x261e2b];var _0x3e99bf={'id':_0x4c0170['id'],'available':_0x4c0170['available'],'loggedIn':_0x4c0170[_0x90f1('0x54')],'name':_0x4c0170[_0x90f1('0x57')],'paused':_0x4c0170[_0x90f1('0x55')],'waiting':_0x4c0170[_0x90f1('0x58')]};_0x272792[_0x90f1('0x20')](_0x3e99bf);}}_0x463582({'count':_0x272792['length'],'rows':_0x272792});});},'WhatsappQueues':function(){return new Promise(function(_0x10fc5a){var _0x1aada1=[];for(var _0x50323b in _0x43dbd0[_0x90f1('0x5c')]){if(_0x43dbd0[_0x90f1('0x5c')][_0x90f1('0x4d')](_0x50323b)){var _0x3dc97b=_0x43dbd0[_0x90f1('0x5c')][_0x50323b];var _0x34a413={'id':_0x3dc97b['id'],'available':_0x3dc97b['available'],'loggedIn':_0x3dc97b[_0x90f1('0x54')],'name':_0x3dc97b[_0x90f1('0x57')],'paused':_0x3dc97b[_0x90f1('0x55')],'waiting':_0x3dc97b[_0x90f1('0x58')]};_0x1aada1[_0x90f1('0x20')](_0x34a413);}}_0x10fc5a({'count':_0x1aada1[_0x90f1('0x18')],'rows':_0x1aada1});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x19007c){var _0x20614d=_[_0x90f1('0x5d')](_0x43dbd0[_0x90f1('0x5e')]);_0x19007c({'count':_0x20614d[_0x90f1('0x18')],'rows':_0x20614d});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x42b351){var _0x2a8e86=_[_0x90f1('0x5d')](_0x43dbd0[_0x90f1('0x5f')]);_0x42b351({'count':_0x2a8e86[_0x90f1('0x18')],'rows':_0x2a8e86});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x2e8953){var _0x50cb72=_[_0x90f1('0x5d')](_0x43dbd0['openchannelQueuesWaitingInteractions']);_0x2e8953({'count':_0x50cb72[_0x90f1('0x18')],'rows':_0x50cb72});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x4cbb78){var _0x6f59ca=_['values'](_0x43dbd0[_0x90f1('0x60')]);_0x4cbb78({'count':_0x6f59ca[_0x90f1('0x18')],'rows':_0x6f59ca});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x13a2c2){var _0x16081c=_[_0x90f1('0x5d')](_0x43dbd0[_0x90f1('0x61')]);_0x13a2c2({'count':_0x16081c[_0x90f1('0x18')],'rows':_0x16081c});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x2d61c0){var _0x5a0953=_[_0x90f1('0x5d')](_0x43dbd0['whatsappQueuesWaitingInteractions']);_0x2d61c0({'count':_0x5a0953[_0x90f1('0x18')],'rows':_0x5a0953});});}};var _0x413ae8=jayson[_0x90f1('0x62')](_0x452fe5)[_0x90f1('0x63')]();_0x413ae8['on']('error',function(_0x3ac3bf){logger[_0x90f1('0x35')](JSON[_0x90f1('0x3b')](_0x3ac3bf));return _0x4ab1b9(_0x3ac3bf);});_0x413ae8[_0x90f1('0x64')](0x232c,_0x90f1('0x65'),function(){console[_0x90f1('0x66')](_0x90f1('0x67'),0x232c);return _0x353881('RPC\x20listening\x20on\x20port:'+0x232c);});});};