03e4cd1831765c4f8202ed75542c0f5836c1bcfb
[motion.git] / server / config / ami / socket.js
1 var _0x8142=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x64\x69\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x55\x73\x65\x72","\x2E\x2E\x2F\x74\x72\x69\x67\x67\x65\x72\x73","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x61\x6D\x69","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x2E\x2F\x75\x74\x69\x6C\x73","\x72\x65\x64\x69\x73\x50\x77\x64","\x69\x70","\x63\x72\x65\x61\x74\x65\x43\x6C\x69\x65\x6E\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x65\x78\x70\x6F\x72\x74\x73","\x65\x6D\x69\x74","\x74\x6F","\x65\x76\x65\x6E\x74","\x70\x72\x69\x76\x69\x6C\x65\x67\x65","\x6D\x65\x6D\x62\x65\x72\x73\x68\x69\x70","\x72\x69\x6E\x67\x69\x6E\x75\x73\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x73\x74\x61\x74\x65\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x73\x74\x61\x74\x75\x73\x64\x65\x73\x63","\x55\x4E\x4B\x4E\x4F\x57\x4E","\x30","\x4E\x4F\x54\x5F\x49\x4E\x55\x53\x45","\x31","\x49\x4E\x55\x53\x45","\x32","\x42\x55\x53\x59","\x33","\x49\x4E\x56\x41\x4C\x49\x44","\x34","\x55\x4E\x41\x56\x41\x49\x4C\x41\x42\x4C\x45","\x35","\x52\x49\x4E\x47\x49\x4E\x47","\x36","\x52\x49\x4E\x47\x49\x4E\x55\x53\x45","\x37","\x4F\x4E\x48\x4F\x4C\x44","\x38","\x73\x74\x61\x74\x75\x73","\x70\x65\x6E\x61\x6C\x74\x79","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x63\x61\x6C\x6C\x73\x74\x61\x6B\x65\x6E","\x6C\x61\x73\x74\x63\x61\x6C\x6C","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x61\x75\x73\x65\x64","\x71\x75\x65\x75\x65\x73","\x69\x6E\x62\x6F\x75\x6E\x64","\x67\x6C\x6F\x62\x61\x6C","\x69\x6E\x62\x6F\x75\x6E\x64\x20\x69\x6E\x69\x74\x20\x65\x72\x72\x6F\x72\x3A","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x6C\x65\x6E\x67\x74\x68","\x71\x75\x65\x75\x65","\x74\x6F\x74\x61\x6C","\x69\x73\x57\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67","\x69\x73\x41\x63\x74\x69\x76\x65","\x61\x63\x74\x69\x76\x65","\x69\x73\x43\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x61\x76\x67\x48\x6F\x6C\x64\x74\x69\x6D\x65","\x72\x6F\x75\x6E\x64","\x61\x76\x67\x54\x61\x6C\x6B\x74\x69\x6D\x65","\x69\x73\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x69\x73\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x61\x6E\x73\x77\x65\x72\x52\x61\x74\x65","\x61\x62\x61\x6E\x64\x6F\x6E\x52\x61\x74\x65","\x74\x68\x65\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x20\x69\x6E\x69\x74\x20\x65\x72\x72\x6F\x72\x3A","\x66\x69\x6C\x74\x65\x72","\x74\x69\x67\x65\x72\x64\x69\x61\x6C","\x61\x6E\x73\x77\x65\x72\x65\x64","\x41\x4E\x53\x57\x45\x52\x45\x44","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x6F\x75\x6E\x74\x42\x79","\x73\x75\x6D\x44\x75\x72\x61\x74\x69\x6F\x6E","\x62\x69\x6C\x6C\x61\x62\x6C\x65\x73\x65\x63\x6F\x6E\x64\x73","\x73\x75\x6D\x42\x79","\x61\x76\x67\x44\x75\x72\x61\x74\x69\x6F\x6E","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x74\x79\x70\x65","\x72\x65\x73\x6F\x6C\x76\x65","\x61\x67\x65\x6E\x74\x73","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x3A\x73\x61\x76\x65","\x76\x6F\x69\x63\x65\x2F\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2F\x67\x6C\x6F\x62\x61\x6C","\x76\x6F\x69\x63\x65\x3A\x6F\x75\x74\x62\x6F\x75\x6E\x64\x3A\x67\x6C\x6F\x62\x61\x6C","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x61\x67\x65\x6E\x74\x3A\x25\x73","\x73\x70\x6C\x69\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C\x3A\x75\x70\x64\x61\x74\x65","\x61\x64\x6D\x69\x6E\x73","\x75\x73\x65\x72\x73","\x72\x65\x70\x6F\x72\x74\x44\x69\x61\x6C","\x64\x65\x76\x69\x63\x65\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65\x20\x2D\x20\x73\x6F\x63\x6B\x65\x74","\x69\x6E\x66\x6F","\x69\x64","\x73\x74\x61\x74\x65","\x61\x73\x73\x69\x67\x6E","\x64\x65\x76\x69\x63\x65\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65","\x25\x73\x3A\x25\x73","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74\x3A\x73\x61\x76\x65","\x53\x49\x50\x2F","","\x72\x65\x70\x6C\x61\x63\x65","\x64\x65\x76\x69\x63\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x74\x72\x75\x6E\x6B\x73","\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73","\x76\x6F\x69\x63\x65\x2F\x74\x72\x75\x6E\x6B\x73","\x76\x6F\x69\x63\x65\x3A\x74\x72\x75\x6E\x6B\x73","\x65\x78\x74\x72\x61\x76\x61\x72","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x3A\x73\x61\x76\x65","\x72\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64\x20\x2D\x20\x73\x6F\x63\x6B\x65\x74","\x63\x61\x6C\x6C\x65\x64","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64","\x72\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x55\x70\x64\x61\x74\x65","\x76\x6F\x69\x63\x65\x3A\x69\x6E\x62\x6F\x75\x6E\x64","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x2D\x20\x73\x6F\x63\x6B\x65\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A\x75\x70\x64\x61\x74\x65","\x72\x65\x61\x73\x6F\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x3A\x75\x70\x64\x61\x74\x65","\x69\x64\x20\x44\x45\x53\x43","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x6F\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x72\x69\x6E\x67\x74\x69\x6D\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x20\x2D\x20\x73\x6F\x63\x6B\x65\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x61\x6E\x73\x77\x65\x72\x65\x64\x5F\x65\x6C\x73\x65\x77\x68\x65\x72\x65","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72\x20\x2D\x20\x73\x6F\x63\x6B\x65\x74","\x72\x65\x6A\x65\x63\x74\x65\x64","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x72\x65\x6D\x6F\x76\x65\x64\x20\x2D\x20\x73\x6F\x63\x6B\x65\x74","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x63\x68\x61\x6E\x6E\x65\x6C\x73\x74\x61\x74\x65","\x63\x68\x61\x6E\x6E\x65\x6C\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x65\x78\x74\x65\x6E","\x70\x72\x69\x6F\x72\x69\x74\x79","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x6F\x75\x6E\x74","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x72\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x72\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x5F\x63\x68\x61\x6E\x67\x65\x64","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x20\x2D\x20\x73\x6F\x63\x6B\x65\x74","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x64\x69\x61\x6C\x73\x74\x72\x69\x6E\x67","\x6D\x65\x72\x67\x65","\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C\x3A\x73\x61\x76\x65","\x64\x69\x61\x6C\x73\x74\x61\x74\x75\x73","\x64\x65\x73\x74\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x72\x6F\x75\x74\x65\x69\x64","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x6C\x75\x65","\x76\x61\x72\x53\x65\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x61\x67\x65\x6E\x74\x75\x70\x64\x61\x74\x65","\x73\x6F\x63\x6B\x65\x74","\x63\x6F\x6E\x73\x6F\x6C\x65\x3A\x25\x73","\x64\x61\x74\x61","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x66\x6F\x72\x4F\x77\x6E","\x75\x70\x64\x61\x74\x65\x54\x72\x69\x67\x67\x65\x72\x73","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x25\x73\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x25\x73\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x63\x68\x65\x63\x6B\x54\x72\x69\x67\x67\x65\x72\x73","\x76\x69\x64\x65\x6F\x4F\x6E","\x72\x65\x70\x6F\x72\x74\x66\x61\x78\x75\x70\x64\x61\x74\x65","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x3A\x75\x70\x64\x61\x74\x65","\x77\x69\x64\x67\x65\x74\x5F\x75\x70\x64\x61\x74\x65\x3A","\x72\x65\x63\x65\x69\x76\x65\x66\x61\x78"];_0x8142[0];var _=require(_0x8142[1]);var util=require(_0x8142[2]);var moment=require(_0x8142[3]);var BPromise=require(_0x8142[4]);var redis=require(_0x8142[5]);var VoiceQueue=require(_0x8142[7])[_0x8142[6]];var ReportQueue=require(_0x8142[7])[_0x8142[8]];var ReportCall=require(_0x8142[7])[_0x8142[9]];var ReportAgent=require(_0x8142[7])[_0x8142[10]];var ReportDial=require(_0x8142[7])[_0x8142[11]];var ReportMember=require(_0x8142[7])[_0x8142[12]];var User=require(_0x8142[7])[_0x8142[13]];var Triggers=require(_0x8142[14]);var config=require(_0x8142[15]);var logger=require(_0x8142[17])(_0x8142[16]);var utils=require(_0x8142[18]);var redisConf;if(config[_0x8142[19]]){redisConf= {password:config[_0x8142[19]]}};var redisClient=redis[_0x8142[21]](6379,config[_0x8142[20]],redisConf);var io=require(_0x8142[22])(redisClient);var triggers= new Triggers(io);var params={trunks:[],inbound:{queues:{},channels:[],global:{waiting:0,active:0,completed:0,abandoned:0,unmanaged:0,holdtime:0,talktime:0,avgHoldtime:0,avgTalktime:0,answerRate:0,abandonRate:0,total:0}},outbound:{global:{total:0,answered:0,sumDuration:0,avgDuration:0,tigerdial:0},channels:[]}};module[_0x8142[23]]= function(){var _0x3f35x16=function(_0x3f35x17,_0x3f35x18,_0x3f35x19){if(_0x3f35x17){io[_0x8142[25]](_0x3f35x17)[_0x8142[24]](_0x3f35x18,_0x3f35x19)}else {io[_0x8142[24]](_0x3f35x18,_0x3f35x19)}};var _0x3f35x1a=function(_0x3f35x1b){delete _0x3f35x1b[_0x8142[26]];delete _0x3f35x1b[_0x8142[27]];delete _0x3f35x1b[_0x8142[28]];delete _0x3f35x1b[_0x8142[29]];_0x3f35x1b[_0x8142[30]]= _0x3f35x1b[_0x8142[31]]|| _0x3f35x1b[_0x8142[30]];_0x3f35x1b[_0x8142[32]]= _0x3f35x1b[_0x8142[33]];_0x3f35x1b[_0x8142[34]]= _0x8142[35];switch(_0x3f35x1b[_0x8142[53]]){case _0x8142[36]:_0x3f35x1b[_0x8142[34]]= _0x8142[35];break;case _0x8142[38]:_0x3f35x1b[_0x8142[34]]= _0x8142[37];break;case _0x8142[40]:_0x3f35x1b[_0x8142[34]]= _0x8142[39];break;case _0x8142[42]:_0x3f35x1b[_0x8142[34]]= _0x8142[41];break;case _0x8142[44]:_0x3f35x1b[_0x8142[34]]= _0x8142[43];break;case _0x8142[46]:_0x3f35x1b[_0x8142[34]]= _0x8142[45];break;case _0x8142[48]:_0x3f35x1b[_0x8142[34]]= _0x8142[47];break;case _0x8142[50]:_0x3f35x1b[_0x8142[34]]= _0x8142[49];break;case _0x8142[52]:_0x3f35x1b[_0x8142[34]]= _0x8142[51];break;default:};_0x3f35x1b[_0x8142[53]]= Number(_0x3f35x1b[_0x8142[53]]);if(_0x3f35x1b[_0x8142[55]](_0x8142[54])){_0x3f35x1b[_0x8142[54]]= Number(_0x3f35x1b[_0x8142[54]])};if(_0x3f35x1b[_0x8142[55]](_0x8142[56])){_0x3f35x1b[_0x8142[56]]= Number(_0x3f35x1b[_0x8142[56]])};if(_0x3f35x1b[_0x8142[55]](_0x8142[57])){if(_0x3f35x1b[_0x8142[57]]=== _0x8142[36]){_0x3f35x1b[_0x8142[57]]= null}else {_0x3f35x1b[_0x8142[57]]= moment()[_0x8142[59]](_0x8142[58])}};_0x3f35x1b[_0x8142[60]]= parseInt(_0x3f35x1b[_0x8142[60]],10)?true:false};function _0x3f35x1c(_0x3f35x1d){if(!params[_0x8142[62]][_0x8142[61]][_0x3f35x1d]){params[_0x8142[62]][_0x8142[61]][_0x3f35x1d]= {agents:{},waiting:0,active:0,completed:0,abandoned:0,unmanaged:0,holdtime:0,talktime:0,avgHoldtime:0,avgTalktime:0,answerRate:0,abandonRate:0,total:0}}}function _0x3f35x1e(){return function(){params[_0x8142[62]][_0x8142[61]]= {};params[_0x8142[62]][_0x8142[63]]= {waiting:0,active:0,completed:0,abandoned:0,unmanaged:0,holdtime:0,talktime:0,avgHoldtime:0,avgTalktime:0,answerRate:0,abandonRate:0,total:0};return VoiceQueue[_0x8142[97]]({attributes:[_0x8142[31]],raw:true})[_0x8142[92]](function(_0x3f35x20){if(_0x3f35x20){_[_0x8142[93]](_0x3f35x20,function(_0x3f35x1d){_0x3f35x1c(_0x3f35x1d[_0x8142[31]])});return ReportQueue[_0x8142[97]]({attributes:[_0x8142[69],_0x8142[79],_0x8142[82],_0x8142[94],_0x8142[95],_0x8142[96],_0x8142[77]],raw:true})}})[_0x8142[92]](function(_0x3f35x20){if(_0x3f35x20){var _0x3f35x21;var _0x3f35x22;var _0x3f35x23=_0x3f35x20[_0x8142[68]];for(var _0x3f35x24=0;_0x3f35x24< _0x3f35x23;_0x3f35x24++){_0x3f35x21= _0x3f35x20[_0x3f35x24];_0x3f35x22= _0x3f35x21[_0x8142[69]];_0x3f35x1c(_0x3f35x22);params[_0x8142[62]][_0x8142[63]][_0x8142[70]]++;params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[70]]++;if(utils[_0x8142[71]](_0x3f35x21)){params[_0x8142[62]][_0x8142[63]][_0x8142[72]]++;params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[72]]++};if(utils[_0x8142[73]](_0x3f35x21)){params[_0x8142[62]][_0x8142[63]][_0x8142[74]]++;params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[74]]++};if(utils[_0x8142[75]](_0x3f35x21)){params[_0x8142[62]][_0x8142[63]][_0x8142[76]]++;params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[76]]++;params[_0x8142[62]][_0x8142[63]][_0x8142[77]]+= _0x3f35x21[_0x8142[77]]|| 0;params[_0x8142[62]][_0x8142[63]][_0x8142[78]]+= moment(_0x3f35x21[_0x8142[82]])[_0x8142[81]](moment(_0x3f35x21[_0x8142[79]]),_0x8142[80]);params[_0x8142[62]][_0x8142[63]][_0x8142[83]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[77]]/ params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[76]]);params[_0x8142[62]][_0x8142[63]][_0x8142[85]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[78]]/ params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[76]]);params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[77]]+= _0x3f35x21[_0x8142[77]]|| 0;params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[78]]+= moment(_0x3f35x21[_0x8142[82]])[_0x8142[81]](moment(_0x3f35x21[_0x8142[79]]),_0x8142[80]);params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[83]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[77]]/ params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[76]]);params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[85]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[78]]/ params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[76]])};if(utils[_0x8142[86]](_0x3f35x21)){params[_0x8142[62]][_0x8142[63]][_0x8142[87]]++;params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[87]]++};if(utils[_0x8142[88]](_0x3f35x21)){params[_0x8142[62]][_0x8142[63]][_0x8142[89]]++;params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[89]]++};params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[90]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[76]]/ (params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[76]]+ params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[87]])* 100,2);params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[91]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[87]]/ (params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[76]]+ params[_0x8142[62]][_0x8142[61]][_0x3f35x22][_0x8142[87]])* 100,2);params[_0x8142[62]][_0x8142[63]][_0x8142[90]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[63]][_0x8142[76]]/ (params[_0x8142[62]][_0x8142[63]][_0x8142[76]]+ params[_0x8142[62]][_0x8142[63]][_0x8142[87]])* 100,2);params[_0x8142[62]][_0x8142[63]][_0x8142[91]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[63]][_0x8142[87]]/ (params[_0x8142[62]][_0x8142[63]][_0x8142[76]]+ params[_0x8142[62]][_0x8142[63]][_0x8142[87]])* 100,2)}}})[_0x8142[67]](function(_0x3f35x1f){logger[_0x8142[66]](_0x8142[64],_0x3f35x1f[_0x8142[65]])})}}function _0x3f35x25(){return function(){params[_0x8142[98]][_0x8142[63]]= {total:0,answered:0,sumDuration:0,avgDuration:0,tigerdial:0,answerRate:0};return ReportCall[_0x8142[97]]({where:{type:[_0x8142[98],_0x8142[101]],createdAt:{$gte:moment()[_0x8142[111]](_0x8142[110])}},attributes:[_0x8142[112],_0x8142[104],_0x8142[107]],raw:true})[_0x8142[92]](function(_0x3f35x20){if(_0x3f35x20){var _0x3f35x26=_[_0x8142[100]](_0x3f35x20,{type:_0x8142[98]});var _0x3f35x27=_[_0x8142[100]](_0x3f35x20,{type:_0x8142[101]});if(_0x3f35x26[_0x8142[68]]){params[_0x8142[98]][_0x8142[63]][_0x8142[70]]= _0x3f35x26[_0x8142[68]];params[_0x8142[98]][_0x8142[63]][_0x8142[102]]= _[_0x8142[105]](_0x3f35x26,_0x8142[104])[_0x8142[103]]|| 0;params[_0x8142[98]][_0x8142[63]][_0x8142[106]]= _[_0x8142[108]](_0x3f35x26,_0x8142[107]);if(params[_0x8142[98]][_0x8142[63]][_0x8142[102]]){params[_0x8142[98]][_0x8142[63]][_0x8142[109]]= _[_0x8142[84]]((_[_0x8142[108]](_0x3f35x26,_0x8142[107])/ params[_0x8142[98]][_0x8142[63]][_0x8142[102]]));params[_0x8142[98]][_0x8142[63]][_0x8142[90]]= _[_0x8142[84]](params[_0x8142[98]][_0x8142[63]][_0x8142[102]]/ params[_0x8142[98]][_0x8142[63]][_0x8142[70]]* 100,1)}};if(_0x3f35x27[_0x8142[68]]){params[_0x8142[98]][_0x8142[63]][_0x8142[101]]= _0x3f35x27[_0x8142[68]]}}})[_0x8142[67]](function(_0x3f35x1f){logger[_0x8142[66]](_0x8142[99],_0x3f35x1f[_0x8142[65]])})}}BPromise[_0x8142[113]]()[_0x8142[92]](_0x3f35x1e())[_0x8142[92]](_0x3f35x25());return {cdr:function(_0x3f35x1b){return function(_0x3f35x20){_0x3f35x16(_0x8142[114],_0x8142[115],_0x3f35x1b);if(_0x3f35x1b[_0x8142[112]]== _0x8142[98]|| _0x3f35x1b[_0x8142[112]]== _0x8142[101]){if(_0x3f35x1b[_0x8142[112]]== _0x8142[98]){params[_0x8142[98]][_0x8142[63]][_0x8142[70]]++;_0x3f35x1b[_0x8142[104]]== _0x8142[103]&& (params[_0x8142[98]][_0x8142[63]][_0x8142[102]]++);params[_0x8142[98]][_0x8142[63]][_0x8142[106]]+= Number(_0x3f35x1b[_0x8142[107]]);if(params[_0x8142[98]][_0x8142[63]][_0x8142[102]]){params[_0x8142[98]][_0x8142[63]][_0x8142[109]]= _[_0x8142[84]](params[_0x8142[98]][_0x8142[63]][_0x8142[106]]/ params[_0x8142[98]][_0x8142[63]][_0x8142[102]]);params[_0x8142[98]][_0x8142[63]][_0x8142[90]]= _[_0x8142[84]](params[_0x8142[98]][_0x8142[63]][_0x8142[102]]/ params[_0x8142[98]][_0x8142[63]][_0x8142[70]]* 100,1)}}else {params[_0x8142[98]][_0x8142[63]][_0x8142[101]]++};_0x3f35x16(_0x8142[116],_0x8142[117],params[_0x8142[98]][_0x8142[63]])}}},send:function(_0x3f35x1b){return function(_0x3f35x20){return BPromise[_0x8142[113]]()}},hangup:function(_0x3f35x1b){return function(_0x3f35x20){if(params[_0x8142[98]][_0x8142[119]][_0x3f35x1b[_0x8142[118]]]){delete params[_0x8142[98]][_0x8142[119]][_0x3f35x1b[_0x8142[118]]]};if(params[_0x8142[62]][_0x8142[119]][_0x3f35x1b[_0x8142[118]]]){delete params[_0x8142[62]][_0x8142[119]][_0x3f35x1b[_0x8142[118]]]};var _0x3f35x28={uniqueid:_0x3f35x1b[_0x8142[118]],linkedid:_0x3f35x1b[_0x8142[120]],endtime:moment()[_0x8142[59]](_0x8142[58]),lastevent:_0x8142[121],updatedAt:moment()[_0x8142[59]](_0x8142[58])};_0x3f35x16(util[_0x8142[59]](_0x8142[122],_0x3f35x1b[_0x8142[124]][_0x8142[123]](/\/|-/)[1]),_0x8142[125],_0x3f35x28);_0x3f35x16(_0x8142[126],_0x8142[125],_0x3f35x28);_0x3f35x16(_0x8142[127],_0x8142[125],_0x3f35x28);if(_0x3f35x20){triggers[_0x8142[128]](_0x3f35x20)};return BPromise[_0x8142[113]]()}},devicestatechange:function(_0x3f35x1b){return function(_0x3f35x20){return User[_0x8142[142]]({where:{name:_0x3f35x1b[_0x8142[141]][_0x8142[140]](_0x8142[138],_0x8142[139])},raw:true})[_0x8142[92]](function(_0x3f35x29){if(_0x3f35x29){var _0x3f35x28=_[_0x8142[133]]({newValues:{id:_0x3f35x29[_0x8142[131]],status:_0x3f35x1b[_0x8142[132]],statusAt:moment()[_0x8142[59]](_0x8142[58])}},_0x3f35x29,{status:_0x3f35x1b[_0x8142[132]],statusAt:moment()[_0x8142[59]](_0x8142[58])});_0x3f35x28[_0x8142[26]]= _0x8142[134];_0x3f35x16(util[_0x8142[59]](_0x8142[135],_0x3f35x29[_0x8142[136]],_0x3f35x29[_0x8142[131]]),_0x8142[137],_0x3f35x28);_0x3f35x16(_0x8142[127],_0x8142[137],_0x3f35x28);_0x3f35x16(_0x8142[126],_0x8142[137],_0x3f35x28)}})[_0x8142[67]](function(_0x3f35x1f){logger[_0x8142[130]](_0x8142[129],_0x3f35x1f)})}},peerstatus:function(_0x3f35x1b){return function(_0x3f35x20){if(_0x3f35x20&& _0x3f35x20[0]){_[_0x8142[93]](_0x3f35x20[1],function(_0x3f35x2a){if(!params[_0x8142[143]][_0x3f35x2a[_0x8142[31]]]){params[_0x8142[143]][_0x3f35x2a[_0x8142[31]]]= {name:_0x3f35x2a[_0x8142[31]]}};params[_0x8142[143]][_0x3f35x2a[_0x8142[31]]][_0x8142[144]]= _0x3f35x1b[_0x8142[144]];_0x3f35x16(_0x8142[145],_0x8142[146],params[_0x8142[143]][_0x3f35x2a[_0x8142[31]]])})};return BPromise[_0x8142[113]]()}},registry:function(_0x3f35x1b){return function(_0x3f35x20){if(_0x3f35x20&& _0x3f35x20[0]){_[_0x8142[93]](_0x3f35x20[1],function(_0x3f35x2a){if(!params[_0x8142[143]][_0x3f35x2a[_0x8142[31]]]){params[_0x8142[143]][_0x3f35x2a[_0x8142[31]]]= {name:_0x3f35x2a[_0x8142[31]]}};params[_0x8142[143]][_0x3f35x2a[_0x8142[31]]][_0x8142[53]]= _0x3f35x1b[_0x8142[53]];_0x3f35x16(_0x8142[145],_0x8142[146],params[_0x8142[143]][_0x3f35x2a[_0x8142[31]]])})};return BPromise[_0x8142[113]]()}},agentcalled:function(_0x3f35x1b){return function(_0x3f35x20){if(_0x3f35x20){_0x3f35x1b[_0x8142[147]]&& (_0x3f35x20[_0x8142[148]][_0x8142[147]]= _0x3f35x1b[_0x8142[147]]);_0x3f35x16(util[_0x8142[59]](_0x8142[122],_0x3f35x20[_0x8142[30]]),_0x8142[149],_0x3f35x20);triggers[_0x8142[150]](_0x3f35x20)};return User[_0x8142[142]]({where:{name:_0x3f35x1b[_0x8142[30]],voicePause:false},raw:true})[_0x8142[92]](function(_0x3f35x29){if(_0x3f35x29){var _0x3f35x2b=moment()[_0x8142[59]](_0x8142[58]);var _0x3f35x28=_[_0x8142[133]]({newValues:{id:_0x3f35x29[_0x8142[131]],queueStatus:_0x8142[152],queueStatusAt:_0x3f35x2b,lastQueue:_0x3f35x1b[_0x8142[69]]}},_0x3f35x29,{queueStatus:_0x8142[152],queueStatusAt:_0x3f35x2b,lastQueue:_0x3f35x1b[_0x8142[69]]});_0x3f35x28[_0x8142[26]]= _0x8142[153];_0x3f35x16(util[_0x8142[59]](_0x8142[135],_0x3f35x29[_0x8142[136]],_0x3f35x29[_0x8142[131]]),_0x8142[137],_0x3f35x28);_0x3f35x16(_0x8142[127],_0x8142[137],_0x3f35x28);_0x3f35x16(_0x8142[126],_0x8142[137],_0x3f35x28)}})[_0x8142[67]](function(_0x3f35x1f){logger[_0x8142[66]](_0x8142[151],_0x3f35x1f)})}},agentcomplete:function(_0x3f35x1b){return function(_0x3f35x20){if(_0x3f35x20){triggers[_0x8142[154]](_0x3f35x20)};if(params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[74]]){params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[74]]--};if(params[_0x8142[62]][_0x8142[63]][_0x8142[74]]){params[_0x8142[62]][_0x8142[63]][_0x8142[74]]--;_0x3f35x16(_0x3f35x1b[_0x8142[69]],_0x8142[155],{type:_0x8142[74],amount:-1,queue:_0x3f35x1b[_0x8142[69]]})};params[_0x8142[62]][_0x8142[63]][_0x8142[76]]++;params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[76]]++;_0x3f35x16(_0x3f35x1b[_0x8142[69]],_0x8142[155],{type:_0x8142[121],amount:1,queue:_0x3f35x1b[_0x8142[69]]});params[_0x8142[62]][_0x8142[63]][_0x8142[90]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[63]][_0x8142[76]]/ (params[_0x8142[62]][_0x8142[63]][_0x8142[76]]+ params[_0x8142[62]][_0x8142[63]][_0x8142[87]])* 100,2);params[_0x8142[62]][_0x8142[63]][_0x8142[91]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[63]][_0x8142[87]]/ (params[_0x8142[62]][_0x8142[63]][_0x8142[76]]+ params[_0x8142[62]][_0x8142[63]][_0x8142[87]])* 100,2);params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[90]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[76]]/ (params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[76]]+ params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[87]])* 100,2);params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[91]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[87]]/ (params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[76]]+ params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[87]])* 100,2);params[_0x8142[62]][_0x8142[63]][_0x8142[78]]+= Number(_0x3f35x1b[_0x8142[78]]);params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[78]]+= Number(_0x3f35x1b[_0x8142[78]]);_0x3f35x16(_0x3f35x1b[_0x8142[69]],_0x8142[155],{type:_0x8142[78],amount:Number(_0x3f35x1b[_0x8142[78]]),queue:_0x3f35x1b[_0x8142[69]]});params[_0x8142[62]][_0x8142[63]][_0x8142[85]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[63]][_0x8142[78]]/ params[_0x8142[62]][_0x8142[63]][_0x8142[76]]);params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[85]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[78]]/ params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[76]]);params[_0x8142[62]][_0x8142[63]][_0x8142[77]]+= Number(_0x3f35x1b[_0x8142[77]]);params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[77]]+= Number(_0x3f35x1b[_0x8142[77]]);_0x3f35x16(_0x3f35x1b[_0x8142[69]],_0x8142[155],{type:_0x8142[77],amount:Number(_0x3f35x1b[_0x8142[77]]),queue:_0x3f35x1b[_0x8142[69]]});params[_0x8142[62]][_0x8142[63]][_0x8142[83]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[63]][_0x8142[77]]/ params[_0x8142[62]][_0x8142[63]][_0x8142[76]]);params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[83]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[77]]/ params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[76]]);var _0x3f35x28;var _0x3f35x2b=moment()[_0x8142[59]](_0x8142[58]);return ReportAgent[_0x8142[142]]({where:{uniqueid:_0x3f35x1b[_0x8142[118]],destuniqueid:_0x3f35x1b[_0x8142[162]]},raw:true})[_0x8142[92]](function(_0x3f35x2c){if(_0x3f35x2c){_0x3f35x28= _[_0x8142[133]]({},_0x3f35x2c,{lastevent:_0x8142[121],agentcomplete:true,agentcompleteAt:_0x3f35x2b,talktime:Number(_0x3f35x1b[_0x8142[78]]),reason:_0x3f35x1b[_0x8142[159]]});_0x3f35x1b[_0x8142[147]]&& (_0x3f35x28[_0x8142[147]]= _0x3f35x1b[_0x8142[147]]);_0x3f35x16(util[_0x8142[59]](_0x8142[122],_0x3f35x2c[_0x8142[30]]),_0x8142[160],_0x3f35x28)};return ReportQueue[_0x8142[142]]({where:{uniqueid:_0x3f35x1b[_0x8142[118]]},order:_0x8142[161],raw:true})})[_0x8142[92]](function(_0x3f35x2c){if(_0x3f35x2c){_0x3f35x28= _[_0x8142[133]]({},_0x3f35x2c,{queuecallercomplete:true,queuecallercompleteAt:_0x3f35x2b});_0x3f35x16(_0x3f35x2c[_0x8142[69]],_0x8142[158],_0x3f35x28)};return User[_0x8142[142]]({where:{name:_0x3f35x1b[_0x8142[30]]},raw:true})})[_0x8142[92]](function(_0x3f35x29){if(_0x3f35x29){var _0x3f35x28=_[_0x8142[133]]({newValues:{id:_0x3f35x29[_0x8142[131]],queueStatus:_0x8142[121],queueStatusAt:_0x3f35x2b,lastQueue:_0x3f35x1b[_0x8142[69]]}},_0x3f35x29,{queueStatus:_0x8142[121],queueStatusAt:_0x3f35x2b,lastQueue:_0x3f35x1b[_0x8142[69]]});_0x3f35x28[_0x8142[26]]= _0x8142[157];_0x3f35x16(util[_0x8142[59]](_0x8142[135],_0x3f35x29[_0x8142[136]],_0x3f35x29[_0x8142[131]]),_0x8142[137],_0x3f35x28);_0x3f35x16(_0x8142[127],_0x8142[137],_0x3f35x28);_0x3f35x16(_0x8142[126],_0x8142[137],_0x3f35x28)}})[_0x8142[67]](function(_0x3f35x1f){logger[_0x8142[66]](_0x8142[156],_0x3f35x1f)})}},agentconnect:function(_0x3f35x1b){return function(_0x3f35x20){if(_0x3f35x20){triggers[_0x8142[154]](_0x3f35x20)};if(params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[72]]){params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[72]]--;_0x3f35x16(_0x3f35x1b[_0x8142[69]],_0x8142[155],{type:_0x8142[72],amount:-1,queue:_0x3f35x1b[_0x8142[69]]})};if(params[_0x8142[62]][_0x8142[63]][_0x8142[72]]){params[_0x8142[62]][_0x8142[63]][_0x8142[72]]--};if(params[_0x8142[62]][_0x8142[119]][_0x3f35x1b[_0x8142[118]]]){params[_0x8142[62]][_0x8142[119]][_0x3f35x1b[_0x8142[118]]][_0x8142[163]]= _0x3f35x1b[_0x8142[164]];params[_0x8142[62]][_0x8142[119]][_0x3f35x1b[_0x8142[118]]][_0x8142[165]]= _0x3f35x1b[_0x8142[165]];params[_0x8142[62]][_0x8142[119]][_0x3f35x1b[_0x8142[118]]][_0x8142[77]]= Number(_0x3f35x1b[_0x8142[77]]);params[_0x8142[62]][_0x8142[119]][_0x3f35x1b[_0x8142[118]]][_0x8142[166]]= Number(_0x3f35x1b[_0x8142[166]]);params[_0x8142[62]][_0x8142[119]][_0x3f35x1b[_0x8142[118]]][_0x8142[32]]= _0x3f35x1b[_0x8142[32]];params[_0x8142[62]][_0x8142[119]][_0x3f35x1b[_0x8142[118]]][_0x8142[30]]= _0x3f35x1b[_0x8142[30]]};params[_0x8142[62]][_0x8142[63]][_0x8142[74]]++;params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[74]]++;_0x3f35x16(_0x3f35x1b[_0x8142[69]],_0x8142[155],{type:_0x8142[74],amount:1,queue:_0x3f35x1b[_0x8142[69]]});var _0x3f35x28;var _0x3f35x2b=moment()[_0x8142[59]](_0x8142[58]);return ReportQueue[_0x8142[142]]({where:{uniqueid:_0x3f35x1b[_0x8142[118]]},order:_0x8142[161],raw:true})[_0x8142[92]](function(_0x3f35x2c){if(_0x3f35x2c){_0x3f35x28= _[_0x8142[133]]({},_0x3f35x2c,{queuecallerleaveAt:moment()[_0x8142[59]](_0x8142[58]),holdtime:_0x3f35x1b[_0x8142[77]],assigned:true,lastAssignedTo:_0x3f35x1b[_0x8142[30]]});_0x3f35x16(_0x3f35x2c[_0x8142[69]],_0x8142[158],_0x3f35x28)};return ReportAgent[_0x8142[142]]({where:{uniqueid:_0x3f35x1b[_0x8142[118]],destuniqueid:_0x3f35x1b[_0x8142[162]]},raw:true})})[_0x8142[92]](function(_0x3f35x2c){if(_0x3f35x2c){_0x3f35x28= _[_0x8142[133]]({},_0x3f35x2c,{lastevent:_0x8142[168],agentconnectAt:moment()[_0x8142[59]](_0x8142[58]),holdtime:_0x3f35x1b[_0x8142[77]]});_0x3f35x1b[_0x8142[147]]&& (_0x3f35x28[_0x8142[147]]= _0x3f35x1b[_0x8142[147]]);_0x3f35x16(util[_0x8142[59]](_0x8142[122],_0x3f35x2c[_0x8142[30]]),_0x8142[160],_0x3f35x28)};return ReportAgent[_0x8142[97]]({where:{uniqueid:_0x3f35x1b[_0x8142[118]],destuniqueid:{$ne:_0x3f35x1b[_0x8142[162]]},reason:null},raw:true})})[_0x8142[92]](function(_0x3f35x2e){if(_0x3f35x2e&& _0x3f35x2e[_0x8142[68]]){_[_0x8142[93]](_0x3f35x2e,function(_0x3f35x2c){_0x3f35x28= _[_0x8142[133]]({},_0x3f35x2c,{lastevent:_0x8142[170],agentringnoanswer:true,agentringnoanswerAt:_0x3f35x2b,reason:_0x8142[170],answeredelsewheredestinationuniqueid:_0x3f35x1b[_0x8142[162]],answeredelsewheremembername:_0x3f35x1b[_0x8142[30]]});_0x3f35x16(util[_0x8142[59]](_0x8142[122],_0x3f35x2c[_0x8142[30]]),_0x8142[160],_0x3f35x28)})};return User[_0x8142[142]]({where:{name:_0x3f35x1b[_0x8142[30]]},raw:true})})[_0x8142[92]](function(_0x3f35x29){if(_0x3f35x29){var _0x3f35x28=_[_0x8142[133]]({newValues:{id:_0x3f35x29[_0x8142[131]],queueStatus:_0x8142[168],queueStatusAt:_0x3f35x2b,lastQueue:_0x3f35x1b[_0x8142[69]]}},_0x3f35x29,{queueStatus:_0x8142[168],queueStatusAt:_0x3f35x2b,lastQueue:_0x3f35x1b[_0x8142[69]]});_0x3f35x28[_0x8142[26]]= _0x8142[169];_0x3f35x16(util[_0x8142[59]](_0x8142[135],_0x3f35x29[_0x8142[136]],_0x3f35x29[_0x8142[131]]),_0x8142[137],_0x3f35x28);_0x3f35x16(_0x8142[127],_0x8142[137],_0x3f35x28);_0x3f35x16(_0x8142[126],_0x8142[137],_0x3f35x28)};return User[_0x8142[97]]({where:{lastQueue:_0x3f35x1b[_0x8142[69]],name:{$ne:_0x3f35x1b[_0x8142[30]]}},raw:true})})[_0x8142[92]](function(_0x3f35x2d){if(_0x3f35x2d&& _0x3f35x2d[_0x8142[68]]){_[_0x8142[93]](_0x3f35x2d,function(_0x3f35x29){var _0x3f35x28=_[_0x8142[133]]({newValues:{id:_0x3f35x29[_0x8142[131]],queueStatus:_0x8142[121],queueStatusAt:_0x3f35x2b}},_0x3f35x29,{queueStatus:_0x8142[121],queueStatusAt:_0x3f35x2b});_0x3f35x16(util[_0x8142[59]](_0x8142[135],_0x3f35x29[_0x8142[136]],_0x3f35x29[_0x8142[131]]),_0x8142[137],_0x3f35x28);_0x3f35x16(_0x8142[127],_0x8142[137],_0x3f35x28);_0x3f35x16(_0x8142[126],_0x8142[137],_0x3f35x28)})}})[_0x8142[67]](function(_0x3f35x1f){logger[_0x8142[66]](_0x8142[167],_0x3f35x1f)})}},agentringnoanswer:function(_0x3f35x1b){return function(_0x3f35x20){if(_0x3f35x20){triggers[_0x8142[154]](_0x3f35x20)};var _0x3f35x28;var _0x3f35x2b=moment()[_0x8142[59]](_0x8142[58]);return User[_0x8142[142]]({where:{name:_0x3f35x1b[_0x8142[30]]},raw:true})[_0x8142[92]](function(_0x3f35x29){if(_0x3f35x29){var _0x3f35x28=_[_0x8142[133]]({newValues:{id:_0x3f35x29[_0x8142[131]],queueStatus:_0x8142[121],queueStatusAt:_0x3f35x2b,lastQueue:_0x3f35x1b[_0x8142[69]]}},_0x3f35x29,{queueStatus:_0x8142[121],queueStatusAt:_0x3f35x2b,lastQueue:_0x3f35x1b[_0x8142[69]]});_0x3f35x28[_0x8142[26]]= _0x8142[173];_0x3f35x16(util[_0x8142[59]](_0x8142[135],_0x3f35x29[_0x8142[136]],_0x3f35x29[_0x8142[131]]),_0x8142[137],_0x3f35x28);_0x3f35x16(_0x8142[127],_0x8142[137],_0x3f35x28);_0x3f35x16(_0x8142[126],_0x8142[137],_0x3f35x28)};return ReportAgent[_0x8142[142]]({where:{uniqueid:_0x3f35x1b[_0x8142[118]],destuniqueid:_0x3f35x1b[_0x8142[162]]},raw:true})})[_0x8142[92]](function(_0x3f35x2c){if(_0x3f35x2c){_0x3f35x28= _[_0x8142[133]]({},_0x3f35x2c,{lastevent:_0x8142[172],agentringnoanswer:true,agentringnoanswerAt:moment()[_0x8142[59]](_0x8142[58]),reason:_0x8142[172]});_0x3f35x16(util[_0x8142[59]](_0x8142[122],_0x3f35x2c[_0x8142[30]]),_0x8142[160],_0x3f35x28)}})[_0x8142[67]](function(_0x3f35x1f){logger[_0x8142[66]](_0x8142[171],_0x3f35x1f)})}},queuememberadded:function(_0x3f35x1b){return function(_0x3f35x20){if(_0x3f35x20){_0x3f35x16(_0x3f35x20[_0x8142[69]],_0x8142[174],_0x3f35x20);_0x3f35x16(util[_0x8142[59]](_0x8142[122],_0x3f35x20.UserId),_0x8142[174],_0x3f35x20)};return BPromise[_0x8142[113]]()}},queuememberremoved:function(_0x3f35x1b){return function(_0x3f35x20){if(params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]]){delete params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[114]][_0x3f35x1b[_0x8142[30]]]};return User[_0x8142[142]]({where:{name:_0x3f35x1b[_0x8142[32]][_0x8142[140]](_0x8142[138],_0x8142[139])},raw:true})[_0x8142[92]](function(_0x3f35x29){if(_0x3f35x29){_0x3f35x16(_0x3f35x1b[_0x8142[69]],_0x8142[176],{queue:_0x3f35x1b[_0x8142[69]],UserId:_0x3f35x29[_0x8142[131]]});_0x3f35x16(util[_0x8142[59]](_0x8142[122],_0x3f35x29[_0x8142[131]]),_0x8142[176],{queue:_0x3f35x1b[_0x8142[69]],UserId:_0x3f35x29[_0x8142[131]]})}})[_0x8142[67]](function(_0x3f35x1f){logger[_0x8142[66]](_0x8142[175],_0x3f35x1f)})}},queuememberpause:function(_0x3f35x1b){return function(_0x3f35x20){if(_0x3f35x20){_0x3f35x16(_0x3f35x20[_0x8142[69]],_0x8142[174],_0x3f35x20);_0x3f35x16(util[_0x8142[59]](_0x8142[122],_0x3f35x20.UserId),_0x8142[174],_0x3f35x20)}}},queuememberpenalty:function(_0x3f35x1b){return function(_0x3f35x20){return BPromise[_0x8142[113]]()}},queuememberringinuse:function(_0x3f35x1b){return function(_0x3f35x20){return BPromise[_0x8142[113]]()}},queuemember:function(_0x3f35x1b){return function(_0x3f35x20){_0x3f35x1a(_0x3f35x1b);_0x3f35x1c(_0x3f35x1b[_0x8142[69]]);params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[114]][_0x3f35x1b[_0x8142[31]]]= _0x3f35x1b;return BPromise[_0x8142[113]]()}},queuecallerjoin:function(_0x3f35x1b){return function(_0x3f35x20){if(!params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]]){params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]]= {};params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[72]]= 0;params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[74]]= 0;params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[76]]= 0;params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[87]]= 0;params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[89]]= 0;params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[77]]= 0;params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[78]]= 0;params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[83]]= 0;params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[85]]= 0;params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[90]]= 0;params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[91]]= 0;params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[70]]= 0};params[_0x8142[62]][_0x8142[119]][_0x3f35x1b[_0x8142[118]]]= {channel:_0x3f35x1b[_0x8142[124]],channelstate:Number(_0x3f35x1b[_0x8142[177]]),channelstatedesc:_0x3f35x1b[_0x8142[178]],calleridnum:_0x3f35x1b[_0x8142[179]],calleridname:_0x3f35x1b[_0x8142[180]],exten:_0x3f35x1b[_0x8142[181]],priority:Number(_0x3f35x1b[_0x8142[182]]),uniqueid:_0x3f35x1b[_0x8142[118]],queue:_0x3f35x1b[_0x8142[69]],position:Number(_0x3f35x1b[_0x8142[183]]),count:Number(_0x3f35x1b[_0x8142[184]])};params[_0x8142[62]][_0x8142[63]][_0x8142[72]]++;params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[72]]++;_0x3f35x16(_0x3f35x1b[_0x8142[69]],_0x8142[155],{type:_0x8142[70],amount:1,queue:_0x3f35x1b[_0x8142[69]]});params[_0x8142[62]][_0x8142[63]][_0x8142[70]]++;params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[70]]++;_0x3f35x16(_0x3f35x1b[_0x8142[69]],_0x8142[155],{type:_0x8142[72],amount:1,queue:_0x3f35x1b[_0x8142[69]]});if(_0x3f35x20){_0x3f35x16(_0x3f35x20[_0x8142[69]],_0x8142[185],_0x3f35x20)};return BPromise[_0x8142[113]]()}},queuecallerabandon:function(_0x3f35x1b){return function(_0x3f35x20){if(_0x3f35x20&& _0x3f35x20[_0x8142[186]]&& _0x3f35x20[_0x8142[186]][0]){_[_0x8142[93]](_0x3f35x20[_0x8142[186]][1],function(_0x3f35x2c){_0x3f35x16(util[_0x8142[59]](_0x8142[122],_0x3f35x2c[_0x8142[30]]),_0x8142[160],_0x3f35x2c)})};if(_0x3f35x20&& _0x3f35x20[_0x8142[187]]){_0x3f35x16(_0x3f35x1b[_0x8142[69]],_0x8142[158],_0x3f35x20[_0x8142[187]]);_0x3f35x20[_0x8142[187]][_0x8142[148]][_0x8142[188]]= _0x8142[87];_0x3f35x20[_0x8142[187]][_0x8142[189]][_0x8142[188]]= true;triggers[_0x8142[154]](_0x3f35x20[_0x8142[187]])};var _0x3f35x28;var _0x3f35x2b=moment()[_0x8142[59]](_0x8142[58]);if(params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[72]]){params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[72]]--;_0x3f35x16(_0x3f35x1b[_0x8142[69]],_0x8142[155],{type:_0x8142[72],amount:-1,queue:_0x3f35x1b[_0x8142[69]]})};if(params[_0x8142[62]][_0x8142[63]][_0x8142[72]]){params[_0x8142[62]][_0x8142[63]][_0x8142[72]]--};if(params[_0x8142[62]][_0x8142[119]][_0x3f35x1b[_0x8142[118]]]){params[_0x8142[62]][_0x8142[119]][_0x3f35x1b[_0x8142[118]]][_0x8142[77]]= Number(_0x3f35x1b[_0x8142[77]]);params[_0x8142[62]][_0x8142[119]][_0x3f35x1b[_0x8142[118]]][_0x8142[183]]= Number(_0x3f35x1b[_0x8142[183]]);params[_0x8142[62]][_0x8142[119]][_0x3f35x1b[_0x8142[118]]][_0x8142[190]]= Number(_0x3f35x1b[_0x8142[190]])};params[_0x8142[62]][_0x8142[63]][_0x8142[87]]++;params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[87]]++;_0x3f35x16(_0x3f35x1b[_0x8142[69]],_0x8142[155],{type:_0x8142[191],amount:1,queue:_0x3f35x1b[_0x8142[69]]});params[_0x8142[62]][_0x8142[63]][_0x8142[90]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[63]][_0x8142[76]]/ (params[_0x8142[62]][_0x8142[63]][_0x8142[76]]+ params[_0x8142[62]][_0x8142[63]][_0x8142[87]])* 100,2);params[_0x8142[62]][_0x8142[63]][_0x8142[91]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[63]][_0x8142[87]]/ (params[_0x8142[62]][_0x8142[63]][_0x8142[76]]+ params[_0x8142[62]][_0x8142[63]][_0x8142[87]])* 100,2);params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[90]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[76]]/ (params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[76]]+ params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[87]])* 100,2);params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[91]]= _[_0x8142[84]](params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[87]]/ (params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[76]]+ params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[87]])* 100,2);return User[_0x8142[97]]({where:{lastQueue:_0x3f35x1b[_0x8142[69]]},raw:true})[_0x8142[92]](function(_0x3f35x2f){if(_0x3f35x2f&& _0x3f35x2f[_0x8142[68]]){var _0x3f35x28;_[_0x8142[93]](_0x3f35x2f,function(_0x3f35x30){_0x3f35x28= _[_0x8142[133]]({newValues:{id:_0x3f35x30[_0x8142[131]],queueStatus:_0x8142[121],queueStatusAt:_0x3f35x2b,lastQueue:_0x3f35x1b[_0x8142[69]]}},_0x3f35x30,{id:_0x3f35x30[_0x8142[131]],queueStatus:_0x8142[121],queueStatusAt:_0x3f35x2b,lastQueue:_0x3f35x1b[_0x8142[69]]});_0x3f35x28[_0x8142[26]]= _0x8142[95];_0x3f35x16(util[_0x8142[59]](_0x8142[135],_0x3f35x30[_0x8142[136]],_0x3f35x30[_0x8142[131]]),_0x8142[137],_0x3f35x28);_0x3f35x16(_0x8142[127],_0x8142[137],_0x3f35x28);_0x3f35x16(_0x8142[126],_0x8142[137],_0x3f35x28)})}})[_0x8142[67]](function(_0x3f35x1f){logger[_0x8142[66]](_0x8142[192],_0x3f35x1f)})}},blindtransfer:function(_0x3f35x1b){return function(_0x3f35x20){_0x3f35x16(null,_0x3f35x1b[_0x8142[26]][_0x8142[193]](),_0x3f35x1b);return BPromise[_0x8142[113]]()}},attendedtransfer:function(_0x3f35x1b){return function(_0x3f35x20){_0x3f35x16(null,_0x3f35x1b[_0x8142[26]][_0x8142[193]](),_0x3f35x1b);return BPromise[_0x8142[113]]()}},dialbegin:function(_0x3f35x1b){return function(_0x3f35x20){params[_0x8142[98]][_0x8142[119]][_0x3f35x1b[_0x8142[118]]]= {channel:_0x3f35x1b[_0x8142[124]],channelstate:Number(_0x3f35x1b[_0x8142[177]]),channelstatedesc:_0x3f35x1b[_0x8142[178]],calleridnum:_0x3f35x1b[_0x8142[179]],calleridname:_0x3f35x1b[_0x8142[180]],context:_0x3f35x1b[_0x8142[194]],exten:_0x3f35x1b[_0x8142[181]],priority:Number(_0x3f35x1b[_0x8142[182]]),dialstring:_0x3f35x1b[_0x8142[195]]};if(_0x3f35x1b[_0x8142[124]]){var _0x3f35x28=_[_0x8142[196]](_0x3f35x1b,{starttime:moment()[_0x8142[59]](_0x8142[58]),lastevent:_0x8142[152],updatedAt:moment()[_0x8142[59]](_0x8142[58])});_0x3f35x16(util[_0x8142[59]](_0x8142[122],_0x3f35x1b[_0x8142[124]][_0x8142[123]](/\/|-/)[1]),_0x8142[197],_0x3f35x28);_0x3f35x16(_0x8142[127],_0x8142[125],_[_0x8142[196]](_0x3f35x28,{role:_0x8142[127]}));_0x3f35x16(_0x8142[126],_0x8142[125],_0x3f35x28,_[_0x8142[196]](_0x3f35x28,{role:_0x8142[126]}));if(_0x3f35x20){triggers[_0x8142[128]](_0x3f35x20)}};return BPromise[_0x8142[113]]()}},dialend:function(_0x3f35x1b){return function(_0x3f35x20){if(params[_0x8142[98]][_0x8142[119]][_0x3f35x1b[_0x8142[118]]]){params[_0x8142[98]][_0x8142[119]][_0x3f35x1b[_0x8142[118]]][_0x8142[198]]= _0x3f35x1b[_0x8142[198]]};if(_0x3f35x1b[_0x8142[124]]){var _0x3f35x2b=moment()[_0x8142[59]](_0x8142[58]);var _0x3f35x28={dialstatus:_0x3f35x1b[_0x8142[198]],lastevent:(_0x3f35x1b[_0x8142[198]]=== _0x8142[103])?_0x8142[168]:_0x8142[121],answertime:(_0x3f35x1b[_0x8142[198]]=== _0x8142[103])?_0x3f35x2b:null,uniqueid:_0x3f35x1b[_0x8142[118]],linkedid:_0x3f35x1b[_0x8142[120]],destuniqueid:_0x3f35x1b[_0x8142[162]],destlinkedid:_0x3f35x1b[_0x8142[199]],updatedAt:_0x3f35x2b};_0x3f35x16(util[_0x8142[59]](_0x8142[122],_0x3f35x1b[_0x8142[124]][_0x8142[123]](/\/|-/)[1]),_0x8142[125],_0x3f35x28);_0x3f35x16(_0x8142[127],_0x8142[125],_0x3f35x28);_0x3f35x16(_0x8142[126],_0x8142[125],_0x3f35x28);if(_0x3f35x20){triggers[_0x8142[128]](_0x3f35x20)}};return BPromise[_0x8142[113]]()}},varset:function(_0x3f35x1b){return function(_0x3f35x20){if(_0x3f35x1b[_0x8142[201]][_0x8142[55]](_0x8142[200])){_0x3f35x16(_0x8142[127],_0x8142[197],{uniqueid:_0x3f35x1b[_0x8142[118]],routeId:_0x3f35x1b[_0x8142[202]],updatedAt:moment()[_0x8142[59]](_0x8142[58])});_0x3f35x16(_0x8142[126],_0x8142[197],{uniqueid:_0x3f35x1b[_0x8142[118]],routeId:_0x3f35x1b[_0x8142[202]],updatedAt:moment()[_0x8142[59]](_0x8142[58])})};if(_0x3f35x1b){triggers[_0x8142[203]](_0x3f35x1b)};return BPromise[_0x8142[113]]()}},queuecallerunmanaged:function(_0x3f35x1b){return function(_0x3f35x20){if(_0x3f35x20){params[_0x8142[62]][_0x8142[63]][_0x8142[89]]+= 1;params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[89]]+= 1;_0x3f35x16(_0x3f35x1b[_0x8142[69]],_0x8142[155],{type:_0x8142[89],amount:1,queue:_0x3f35x1b[_0x8142[69]]});if(params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[72]]){params[_0x8142[62]][_0x8142[61]][_0x3f35x1b[_0x8142[69]]][_0x8142[72]]-= 1};if(params[_0x8142[62]][_0x8142[63]][_0x8142[72]]){params[_0x8142[62]][_0x8142[63]][_0x8142[72]]-= 1;_0x3f35x16(_0x3f35x1b[_0x8142[69]],_0x8142[155],{type:_0x8142[72],amount:-1,queue:_0x3f35x1b[_0x8142[69]]})};_0x3f35x16(_0x3f35x1b[_0x8142[69]],_0x8142[158],_0x3f35x20);var _0x3f35x2b=moment()[_0x8142[59]](_0x8142[58]);return User[_0x8142[97]]({where:{lastQueue:_0x3f35x1b[_0x8142[69]]},raw:true})[_0x8142[92]](function(_0x3f35x2f){if(_0x3f35x2f&& _0x3f35x2f[_0x8142[68]]){var _0x3f35x28;_[_0x8142[93]](_0x3f35x2f,function(_0x3f35x30){_0x3f35x28= _[_0x8142[133]]({newValues:{id:_0x3f35x30[_0x8142[131]],queueStatus:_0x8142[121],queueStatusAt:_0x3f35x2b,lastQueue:_0x3f35x1b[_0x8142[69]]}},_0x3f35x30,{id:_0x3f35x30[_0x8142[131]],queueStatus:_0x8142[121],queueStatusAt:_0x3f35x2b,lastQueue:_0x3f35x1b[_0x8142[69]]});_0x3f35x28[_0x8142[26]]= _0x8142[204];_0x3f35x16(util[_0x8142[59]](_0x8142[135],_0x3f35x30[_0x8142[136]],_0x3f35x30[_0x8142[131]]),_0x8142[137],_0x3f35x28);_0x3f35x16(_0x8142[127],_0x8142[137],_0x3f35x28);_0x3f35x16(_0x8142[126],_0x8142[137],_0x3f35x28)})}})[_0x8142[67]](function(_0x3f35x1f){logger[_0x8142[66]](_0x8142[192],_0x3f35x1f)})}}},agentUpdate:function(_0x3f35x30){return function(){_0x3f35x30[_0x8142[26]]= _0x8142[205];_0x3f35x16(util[_0x8142[59]](_0x8142[122],_0x3f35x30[_0x8142[131]]),_0x8142[137],_0x3f35x30);_0x3f35x16(_0x8142[127],_0x8142[137],_0x3f35x30);_0x3f35x16(_0x8142[126],_0x8142[137],_0x3f35x30)}},console:function(_0x3f35x31){_0x3f35x16(_0x3f35x31[_0x8142[206]],util[_0x8142[59]](_0x8142[207],_0x3f35x31[_0x8142[112]]),_0x3f35x31[_0x8142[208]])},realtimeQueueMembers:function(_0x3f35x32){return function(){_[_0x8142[210]](params[_0x8142[62]][_0x8142[61]],function(_0x3f35x1d,_0x3f35x22){if(_[_0x8142[209]](_0x3f35x32,_0x3f35x22)){_[_0x8142[210]](_0x3f35x1d[_0x8142[114]],function(_0x3f35x30){_0x3f35x16(_0x3f35x22,_0x8142[174],_0x3f35x30)})}})}},updateTriggers:function(_0x3f35x31){return function(){return triggers[_0x8142[211]](_0x3f35x31)}},queueAdd:function(_0x3f35x33,_0x3f35x34){return function(){if(_0x3f35x33&& _0x3f35x34){_[_0x8142[93]](_0x3f35x33,function(_0x3f35x20){_0x3f35x16(null,util[_0x8142[59]](_0x8142[212],_0x3f35x34),_0x3f35x20[0])})}}},queueRemove:function(_0x3f35x20,_0x3f35x34){return function(){if(_0x3f35x20&& _0x3f35x34){_0x3f35x16(null,util[_0x8142[59]](_0x8142[213],_0x3f35x34),_0x3f35x20)}}},checkTriggers:function(_0x3f35x31){return function(){return triggers[_0x8142[214]](_0x3f35x31)}},videoOn:function(_0x3f35x1b){return function(){return triggers[_0x8142[215]](_0x3f35x1b)}},inboundInit:function(){return function(){return BPromise[_0x8142[113]]()[_0x8142[92]](_0x3f35x1e())}},outboundInit:function(){return function(){return BPromise[_0x8142[113]]()[_0x8142[92]](_0x3f35x25())}},reportFaxUpdate:function(_0x3f35x35){return function(){_0x3f35x35[_0x8142[26]]= _0x8142[216];_0x3f35x16(util[_0x8142[59]](_0x8142[122],_0x3f35x35[_0x8142[217]]),_0x8142[137],_0x3f35x35);_0x3f35x16(_0x8142[126],_0x8142[218],_0x3f35x35)}},widgetValues:function(_0x3f35x36,_0x3f35x29){return function(){_[_0x8142[210]](_0x3f35x36,function(_0x3f35x37,_0x3f35x38){_0x3f35x16(util[_0x8142[59]](_0x8142[135],_0x3f35x29[_0x8142[136]],_0x3f35x29[_0x8142[131]]),_0x8142[219]+ _0x3f35x38,_0x3f35x37)})}},receivefax:function(_0x3f35x1b){return function(_0x3f35x31){if(_0x3f35x31){return triggers[_0x8142[220]](_0x3f35x31)};return null}}}}