Built motion from commit d13e3c905.|1.0.24
[motion.git] / server / config / forked_routing / fax / queue.js
index 597e83e..99bcc1a 100644 (file)
@@ -1 +1 @@
-var _0xc215=["\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","\x66\x61\x78","\x2E\x2E\x2F\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x73\x73\x61\x67\x65","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x41\x50\x50\x20\x51\x55\x45\x55\x45\x2C\x20\x51\x55\x45\x55\x45\x3A","\x6E\x61\x6D\x65","\x53\x54\x52\x41\x54\x45\x47\x59\x3A","\x73\x74\x72\x61\x74\x65\x67\x79","\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x75\x6E\x69\x71\x75\x65\x69\x64","\x41\x47\x45\x4E\x54","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x52\x45\x4A\x45\x43\x54\x45\x44","\x69\x6E\x66\x6F","\x69\x64","\x70\x75\x73\x68","\x72\x65\x6A\x65\x63\x74","\x74\x79\x70\x65","\x6F\x6E","\x66\x69\x6E\x64","\x74\x69\x6D\x65\x6F\x75\x74","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x70","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x46\x49\x45\x4C\x44\x28\x55\x73\x65\x72\x2E\x69\x64\x2C\x25\x73\x29","\x6A\x6F\x69\x6E","\x66\x6F\x72\x6D\x61\x74","\x45\x52\x52\x4F\x52","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x25\x64","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x74\x6F","\x67\x65\x74","\x41\x47\x45\x4E\x54\x20\x53\x45\x4C\x45\x43\x54\x45\x44\x3A","\x66\x69\x6E\x64\x49\x6E\x64\x65\x78","\x73\x70\x6C\x69\x63\x65","\x68\x65\x61\x64","\x71\x75\x65\x75\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x6D\x65\x72\x67\x65","\x63\x72\x65\x61\x74\x65","\x4E\x4F\x20\x41\x56\x41\x49\x4C\x41\x42\x4C\x45\x20\x41\x47\x45\x4E\x54\x53","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x61\x64\x6D\x69\x6E\x73","\x75\x73\x65\x72\x73","\x45\x4E\x44\x20\x28\x4E\x4F\x20\x41\x4E\x53\x57\x45\x52\x20\x42\x59\x20\x41\x47\x45\x4E\x54\x53\x29","\x75\x70\x64\x61\x74\x65","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x67\x72\x6F\x75\x70\x42\x79","\x76\x61\x6C\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65","\x63\x6C\x6F\x6E\x65","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x6C\x61\x73\x74\x41\x67\x65\x6E\x74","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x74\x61\x63\x6B","\x62\x65\x65\x70\x61\x6C\x6C","\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x73\x6F\x72\x74\x42\x79","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x3A\x73\x61\x76\x65","\x72\x6F\x6F\x6D\x69\x64","\x54\x49\x4D\x45\x4F\x55\x54","\x53\x45\x43"];_0xc215[0];var _=require(_0xc215[1]);var util=require(_0xc215[2]);var moment=require(_0xc215[3]);var logger=require(_0xc215[5])(_0xc215[4]);var Agent=require(_0xc215[7])[_0xc215[6]];var Room=require(_0xc215[7])[_0xc215[8]];var Queue=require(_0xc215[7])[_0xc215[9]];var Report=require(_0xc215[7])[_0xc215[10]];var Session=require(_0xc215[7])[_0xc215[11]];module[_0xc215[12]]= function(_0xdb69xa,_0xdb69xb,_0xdb69xc,_0xdb69xd,_0xdb69xe){var _0xdb69xf=[];var _0xdb69x10;var _0xdb69x11;var _0xdb69x12;var _0xdb69x13=0;process[_0xc215[30]](_0xc215[13],function(_0xdb69xc){switch(_0xdb69xc[_0xc215[29]]){case _0xc215[28]:logger[_0xc215[25]](_0xdb69xb[_0xc215[15]][_0xc215[14]](),_0xc215[16],_0xdb69x12[_0xc215[17]][_0xc215[14]](),_0xc215[18],_0xdb69x12[_0xc215[19]],_0xc215[20],_0xdb69xb[_0xc215[21]],_0xc215[22],_0xdb69xc[_0xc215[23]],_0xc215[24]);_0xdb69xf[_0xc215[27]]({id:_0xdb69xc[_0xc215[26]]});break;default:}});function _0xdb69x14(_0xdb69x15){var _0xdb69x16=_[_0xc215[31]](_0xdb69xf,{id:_0xdb69x15[_0xc215[26]]});return _0xdb69x16?true:false}function _0xdb69x17(){var _0xdb69x18=((_0xdb69xa[_0xc215[32]]- _0xdb69x13)> _0xdb69x12[_0xc215[32]])?_0xdb69x12[_0xc215[32]]:(_0xdb69xa[_0xc215[32]]- _0xdb69x13);if(_0xdb69x18> 0){if(_0xdb69x11[_0xc215[33]]){var _0xdb69x19={where:{id:{$in:_[_0xc215[34]](_0xdb69x11,_0xc215[26])},online:true,faxPause:false},include:[{model:Room,attributes:[_0xc215[26]],raw:true}],attributes:[_0xc215[26],_0xc215[17],_0xc215[35],_0xc215[36],_0xc215[37]],order:[[{raw:util[_0xc215[40]](_0xc215[38],_[_0xc215[34]](_0xdb69x11,_0xc215[26])[_0xc215[39]]())}]]};Agent[_0xc215[60]](_0xdb69x19)[_0xc215[44]](function(_0xdb69x1c){if(_0xdb69x1c[_0xc215[33]]){var _0xdb69x1d;for(var _0xdb69x1e=0;_0xdb69x1e< _0xdb69x1c[_0xc215[33]];_0xdb69x1e++){var _0xdb69x15=_0xdb69x1c[_0xdb69x1e][_0xc215[50]]({plain:true});if(!_0xdb69x14(_0xdb69x15)){_0xdb69x1d= _0xdb69x15;break}};if(_0xdb69x1d){logger[_0xc215[25]](_0xdb69xb[_0xc215[15]][_0xc215[14]](),_0xc215[16],_0xdb69x12[_0xc215[17]][_0xc215[14]](),_0xc215[18],_0xdb69x12[_0xc215[19]],_0xc215[20],_0xdb69xb[_0xc215[21]],_0xc215[51],_0xdb69x1d[_0xc215[26]],_0xdb69x1d[_0xc215[17]]);var _0xdb69x1f=_[_0xc215[52]](_0xdb69x11,{"\x69\x64":_0xdb69x1d[_0xc215[26]]});if(_0xdb69x1f>= 0){var _0xdb69x20=_0xdb69x11[_0xc215[53]](_0xdb69x1f,1);if(_0xdb69x20&& _0xdb69x20[_0xc215[33]]){_0xdb69x11[_0xc215[27]](_[_0xc215[54]](_0xdb69x20))}};return Report[_0xc215[58]](_[_0xc215[57]](_0xdb69xb,{timeslot:_0xdb69x18,application:_0xc215[55],membername:_0xdb69x1d[_0xc215[17]],memberid:_0xdb69x1d[_0xc215[26]],queue:_0xdb69x12[_0xc215[26]],queuename:_0xdb69x12[_0xc215[17]],calledAt:moment()[_0xc215[40]](_0xc215[56])}))};logger[_0xc215[25]](_0xdb69xb[_0xc215[15]][_0xc215[14]](),_0xc215[16],_0xdb69x12[_0xc215[17]][_0xc215[14]](),_0xc215[18],_0xdb69x12[_0xc215[19]],_0xc215[20],_0xdb69xb[_0xc215[21]],_0xc215[59]);return}else {logger[_0xc215[25]](_0xdb69xb[_0xc215[15]][_0xc215[14]](),_0xc215[16],_0xdb69x12[_0xc215[17]][_0xc215[14]](),_0xc215[18],_0xdb69x12[_0xc215[19]],_0xc215[20],_0xdb69xb[_0xc215[21]],_0xc215[59]);return}})[_0xc215[44]](function(_0xdb69x1b){if(_0xdb69x1b){_0xdb69xd[_0xc215[49]](util[_0xc215[40]](_0xc215[47],_0xdb69x1b[_0xc215[48]]))[_0xc215[46]](_0xc215[45],_0xdb69x1b)}})[_0xc215[44]](function(){_0xdb69x10= setTimeout(function(){_0xdb69x13+= _0xdb69x12[_0xc215[32]];_0xdb69x17()},_0xdb69x18* 1000)})[_0xc215[43]](function(_0xdb69x1a){logger[_0xc215[42]](_0xdb69xb[_0xc215[15]][_0xc215[14]](),_0xc215[16],_0xdb69x12[_0xc215[17]][_0xc215[14]](),_0xc215[18],_0xdb69x12[_0xc215[19]],_0xc215[20],_0xdb69xb[_0xc215[21]],_0xc215[41]);_0xdb69xe(_0xdb69x1a)})}else {logger[_0xc215[25]](_0xdb69xb[_0xc215[15]][_0xc215[14]](),_0xc215[16],_0xdb69x12[_0xc215[17]][_0xc215[14]](),_0xc215[18],_0xdb69x12[_0xc215[19]],_0xc215[20],_0xdb69xb[_0xc215[21]],_0xc215[59]);_0xdb69x10= setTimeout(function(){_0xdb69x13+= _0xdb69x12[_0xc215[32]];_0xdb69x17()},_0xdb69x18* 1000)}}else {return Session[_0xc215[65]]({leaveAt:moment()[_0xc215[40]](_0xc215[56]),timeout:true},{where:{uniqueid:_0xdb69xb[_0xc215[21]],leaveAt:null},individualHooks:true})[_0xc215[44]](function(_0xdb69x21){if(_0xdb69x21&& _0xdb69x21[_0xc215[33]]&& _0xdb69x21[1][_0xc215[33]]){for(var _0xdb69x1e=0;_0xdb69x1e< _0xdb69x21[1][_0xc215[33]];_0xdb69x1e++){var _0xdb69x22=_0xdb69x21[1][_0xdb69x1e][_0xc215[50]]({plain:true});_0xdb69xd[_0xc215[49]](_0xc215[62])[_0xc215[46]](_0xc215[61],_0xdb69x22);_0xdb69xd[_0xc215[49]](_0xc215[63])[_0xc215[46]](_0xc215[61],_0xdb69x22)}};logger[_0xc215[25]](_0xdb69xb[_0xc215[15]][_0xc215[14]](),_0xc215[16],_0xdb69x12[_0xc215[17]][_0xc215[14]](),_0xc215[18],_0xdb69x12[_0xc215[19]],_0xc215[20],_0xdb69xb[_0xc215[21]],_0xc215[64]);clearTimeout(_0xdb69x10);_0xdb69xe()})[_0xc215[43]](function(_0xdb69x1a){logger[_0xc215[42]](_0xdb69xb[_0xc215[15]][_0xc215[14]](),_0xc215[16],_0xdb69x12[_0xc215[17]][_0xc215[14]](),_0xc215[18],_0xdb69x12[_0xc215[19]],_0xc215[20],_0xdb69xb[_0xc215[21]],_0xc215[41]);_0xdb69xe(_0xdb69x1a)})}}function _0xdb69x23(){var _0xdb69x18=((_0xdb69xa[_0xc215[32]]- _0xdb69x13)> _0xdb69x12[_0xc215[32]])?_0xdb69x12[_0xc215[32]]:(_0xdb69xa[_0xc215[32]]- _0xdb69x13);if(_0xdb69x18> 0){Queue[_0xc215[73]](_0xdb69xa.FaxQueueId,{attributes:[_0xc215[26],_0xc215[17],_0xc215[32],_0xc215[19],_0xc215[72]],include:[{model:Agent,where:{online:true,faxPause:false},attributes:[_0xc215[26],_0xc215[17],_0xc215[35],_0xc215[36],_0xc215[37]],raw:true}]})[_0xc215[44]](function(_0xdb69x25){if(_0xdb69x25){var _0xdb69x1c=_[_0xc215[68]](_[_0xc215[67]](_0xdb69x25.Users,_0xc215[66]));if(_0xdb69x1c&& _0xdb69x1c[_0xc215[33]]){var _0xdb69x26;for(var _0xdb69x1e=0;_0xdb69x1e< _0xdb69x1c[_0xc215[33]];_0xdb69x1e++){_[_0xc215[69]](_0xdb69x1c[_0xdb69x1e],function(_0xdb69x15){return _0xdb69x14(_0xdb69x15)});if(_0xdb69x1c[_0xdb69x1e][_0xc215[33]]){_0xdb69x26= _0xdb69x1c[_0xdb69x1e];break}};if(_0xdb69x26&& _0xdb69x26[_0xc215[33]]){var _0xdb69x27=_[_0xc215[34]](_0xdb69x26,function(_0xdb69x15){return _[_0xc215[70]](_[_0xc215[57]](_0xdb69xb,{timeslot:_0xdb69x18,application:_0xc215[55],membername:_0xdb69x15[_0xc215[17]],memberid:_0xdb69x15[_0xc215[26]],queue:_0xdb69x12[_0xc215[26]],queuename:_0xdb69x12[_0xc215[17]],calledAt:moment()[_0xc215[40]](_0xc215[56])}))});return Report[_0xc215[71]](_0xdb69x27,{individualHooks:true})}else {logger[_0xc215[25]](_0xdb69xb[_0xc215[15]][_0xc215[14]](),_0xc215[16],_0xdb69x12[_0xc215[17]][_0xc215[14]](),_0xc215[18],_0xdb69x12[_0xc215[19]],_0xc215[20],_0xdb69xb[_0xc215[21]],_0xc215[59])}}else {logger[_0xc215[25]](_0xdb69xb[_0xc215[15]][_0xc215[14]](),_0xc215[16],_0xdb69x12[_0xc215[17]][_0xc215[14]](),_0xc215[18],_0xdb69x12[_0xc215[19]],_0xc215[20],_0xdb69xb[_0xc215[21]],_0xc215[59])}}else {logger[_0xc215[25]](_0xdb69xb[_0xc215[15]][_0xc215[14]](),_0xc215[16],_0xdb69x12[_0xc215[17]][_0xc215[14]](),_0xc215[18],_0xdb69x12[_0xc215[19]],_0xc215[20],_0xdb69xb[_0xc215[21]],_0xc215[59])}})[_0xc215[44]](function(_0xdb69x24){if(_0xdb69x24&& _0xdb69x24[_0xc215[33]]){for(var _0xdb69x1e=0;_0xdb69x1e< _0xdb69x24[_0xc215[33]];_0xdb69x1e++){var _0xdb69x1b=_0xdb69x24[_0xdb69x1e][_0xc215[50]]({plain:true});_0xdb69xd[_0xc215[49]](util[_0xc215[40]](_0xc215[47],_0xdb69x1b[_0xc215[48]]))[_0xc215[46]](_0xc215[45],_0xdb69x1b)}};_0xdb69x10= setTimeout(function(){_0xdb69x13+= _0xdb69x12[_0xc215[32]];_0xdb69x23()},_0xdb69x18* 1000)})[_0xc215[43]](function(_0xdb69x1a){logger[_0xc215[42]](_0xdb69xb[_0xc215[15]][_0xc215[14]](),_0xc215[16],_0xdb69x12[_0xc215[17]][_0xc215[14]](),_0xc215[18],_0xdb69x12[_0xc215[19]],_0xc215[20],_0xdb69xb[_0xc215[21]],_0xc215[41]);_0xdb69xe(_0xdb69x1a)})}else {return Session[_0xc215[65]]({leaveAt:moment()[_0xc215[40]](_0xc215[56]),timeout:true},{where:{uniqueid:_0xdb69xb[_0xc215[21]],leaveAt:null},individualHooks:true})[_0xc215[44]](function(_0xdb69x21){if(_0xdb69x21&& _0xdb69x21[_0xc215[33]]&& _0xdb69x21[1][_0xc215[33]]){for(var _0xdb69x1e=0;_0xdb69x1e< _0xdb69x21[1][_0xc215[33]];_0xdb69x1e++){var _0xdb69x22=_0xdb69x21[1][_0xdb69x1e][_0xc215[50]]({plain:true});_0xdb69xd[_0xc215[49]](_0xc215[62])[_0xc215[46]](_0xc215[61],_0xdb69x22);_0xdb69xd[_0xc215[49]](_0xc215[63])[_0xc215[46]](_0xc215[61],_0xdb69x22)}};logger[_0xc215[25]](_0xdb69xb[_0xc215[15]][_0xc215[14]](),_0xc215[16],_0xdb69x12[_0xc215[17]][_0xc215[14]](),_0xc215[18],_0xdb69x12[_0xc215[19]],_0xc215[20],_0xdb69xb[_0xc215[21]],_0xc215[64]);clearTimeout(_0xdb69x10);_0xdb69xe()})[_0xc215[43]](function(_0xdb69x1a){logger[_0xc215[42]](_0xdb69xb[_0xc215[15]][_0xc215[14]](),_0xc215[16],_0xdb69x12[_0xc215[17]][_0xc215[14]](),_0xc215[18],_0xdb69x12[_0xc215[19]],_0xc215[20],_0xdb69xb[_0xc215[21]],_0xc215[41]);_0xdb69xe(_0xdb69x1a)})}}return Queue[_0xc215[73]](_0xdb69xa.FaxQueueId,{attributes:[_0xc215[26],_0xc215[17],_0xc215[32],_0xc215[19],_0xc215[72]],include:[{model:Agent,attributes:[_0xc215[26]],raw:true}]})[_0xc215[44]](function(_0xdb69x25){_0xdb69x12= _0xdb69x25[_0xc215[50]]({plain:true});logger[_0xc215[25]](_0xdb69xb[_0xc215[15]][_0xc215[14]](),_0xc215[16],_0xdb69x12[_0xc215[17]][_0xc215[14]](),_0xc215[18],_0xdb69x12[_0xc215[19]],_0xc215[20],_0xdb69xb[_0xc215[21]],_0xc215[83],_0xdb69xa[_0xc215[32]],_0xc215[84]);return Session[_0xc215[58]](_[_0xc215[57]](_0xdb69xb,{timeslot:_0xdb69xa[_0xc215[32]],application:_0xc215[55],queue:_0xdb69x25[_0xc215[26]],queuename:_0xdb69x25[_0xc215[17]],calledAt:moment()[_0xc215[40]](_0xc215[56]),joinAt:moment()[_0xc215[40]](_0xc215[56]),membername:null,memberid:null}))})[_0xc215[44]](function(_0xdb69x22){_0xdb69xd[_0xc215[49]](_0xc215[62])[_0xc215[46]](_0xc215[61],_0xdb69x22);_0xdb69xd[_0xc215[49]](_0xc215[63])[_0xc215[46]](_0xc215[61],_0xdb69x22);return Room[_0xc215[73]](_0xdb69xb[_0xc215[82]])})[_0xc215[44]](function(_0xdb69x28){if(_0xdb69x28){return _0xdb69x28[_0xc215[65]]({waiting:true})}})[_0xc215[44]](function(_0xdb69x28){if(_0xdb69x28){_0xdb69xd[_0xc215[46]](_0xc215[81],_0xdb69x28[_0xc215[50]]({plain:true}))}})[_0xc215[44]](function(_0xdb69x28){switch(_0xdb69x12[_0xc215[19]]){case _0xc215[75]:_0xdb69x23();break;case _0xc215[79]:_0xdb69x11= _[_0xc215[78]](_0xdb69x12.Users,[function(_0xdb69x29){return _0xdb69x29[_0xc215[77]][_0xc215[76]]|| 0}]);_0xdb69x17();break;case _0xc215[80]:_0xdb69x11= _[_0xc215[78]](_0xdb69x12.Users,[function(_0xdb69x29){return _0xdb69x29[_0xc215[77]][_0xc215[76]]|| 0}]);_0xdb69x17();break;default:}})[_0xc215[43]](function(_0xdb69x1a){logger[_0xc215[42]](_0xdb69xb[_0xc215[15]][_0xc215[14]](),_0xc215[16],_0xdb69x12[_0xc215[17]][_0xc215[14]](),_0xc215[18],_0xdb69x12[_0xc215[19]],_0xc215[20],_0xdb69xb[_0xc215[21]],_0xc215[41]);logger[_0xc215[42]](_0xdb69x1a[_0xc215[74]]);_0xdb69xe(_0xdb69x1a)})}
\ No newline at end of file
+var _0x169f=["\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","\x66\x61\x78","\x2E\x2E\x2F\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x73\x73\x61\x67\x65","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x41\x50\x50\x20\x51\x55\x45\x55\x45\x2C\x20\x51\x55\x45\x55\x45\x3A","\x6E\x61\x6D\x65","\x53\x54\x52\x41\x54\x45\x47\x59\x3A","\x73\x74\x72\x61\x74\x65\x67\x79","\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x75\x6E\x69\x71\x75\x65\x69\x64","\x41\x47\x45\x4E\x54","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x52\x45\x4A\x45\x43\x54\x45\x44","\x69\x6E\x66\x6F","\x69\x64","\x70\x75\x73\x68","\x72\x65\x6A\x65\x63\x74","\x74\x79\x70\x65","\x6F\x6E","\x66\x69\x6E\x64","\x74\x69\x6D\x65\x6F\x75\x74","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x70","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x46\x49\x45\x4C\x44\x28\x55\x73\x65\x72\x2E\x69\x64\x2C\x25\x73\x29","\x6A\x6F\x69\x6E","\x66\x6F\x72\x6D\x61\x74","\x45\x52\x52\x4F\x52","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x25\x64","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x74\x6F","\x67\x65\x74","\x41\x47\x45\x4E\x54\x20\x53\x45\x4C\x45\x43\x54\x45\x44\x3A","\x66\x69\x6E\x64\x49\x6E\x64\x65\x78","\x73\x70\x6C\x69\x63\x65","\x68\x65\x61\x64","\x71\x75\x65\x75\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x6D\x65\x72\x67\x65","\x63\x72\x65\x61\x74\x65","\x4E\x4F\x20\x41\x56\x41\x49\x4C\x41\x42\x4C\x45\x20\x41\x47\x45\x4E\x54\x53","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x61\x64\x6D\x69\x6E\x73","\x75\x73\x65\x72\x73","\x45\x4E\x44\x20\x28\x4E\x4F\x20\x41\x4E\x53\x57\x45\x52\x20\x42\x59\x20\x41\x47\x45\x4E\x54\x53\x29","\x75\x70\x64\x61\x74\x65","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x67\x72\x6F\x75\x70\x42\x79","\x76\x61\x6C\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65","\x63\x6C\x6F\x6E\x65","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x6C\x61\x73\x74\x41\x67\x65\x6E\x74","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x74\x61\x63\x6B","\x62\x65\x65\x70\x61\x6C\x6C","\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x73\x6F\x72\x74\x42\x79","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x3A\x73\x61\x76\x65","\x72\x6F\x6F\x6D\x69\x64","\x54\x49\x4D\x45\x4F\x55\x54","\x53\x45\x43"];_0x169f[0];var _=require(_0x169f[1]);var util=require(_0x169f[2]);var moment=require(_0x169f[3]);var logger=require(_0x169f[5])(_0x169f[4]);var Agent=require(_0x169f[7])[_0x169f[6]];var Room=require(_0x169f[7])[_0x169f[8]];var Queue=require(_0x169f[7])[_0x169f[9]];var Report=require(_0x169f[7])[_0x169f[10]];var Session=require(_0x169f[7])[_0x169f[11]];module[_0x169f[12]]= function(_0x1c9fxa,_0x1c9fxb,_0x1c9fxc,_0x1c9fxd,_0x1c9fxe){var _0x1c9fxf=[];var _0x1c9fx10;var _0x1c9fx11;var _0x1c9fx12;var _0x1c9fx13=0;process[_0x169f[30]](_0x169f[13],function(_0x1c9fxc){switch(_0x1c9fxc[_0x169f[29]]){case _0x169f[28]:logger[_0x169f[25]](_0x1c9fxb[_0x169f[15]][_0x169f[14]](),_0x169f[16],_0x1c9fx12[_0x169f[17]][_0x169f[14]](),_0x169f[18],_0x1c9fx12[_0x169f[19]],_0x169f[20],_0x1c9fxb[_0x169f[21]],_0x169f[22],_0x1c9fxc[_0x169f[23]],_0x169f[24]);_0x1c9fxf[_0x169f[27]]({id:_0x1c9fxc[_0x169f[26]]});break;default:}});function _0x1c9fx14(_0x1c9fx15){var _0x1c9fx16=_[_0x169f[31]](_0x1c9fxf,{id:_0x1c9fx15[_0x169f[26]]});return _0x1c9fx16?true:false}function _0x1c9fx17(){var _0x1c9fx18=((_0x1c9fxa[_0x169f[32]]- _0x1c9fx13)> _0x1c9fx12[_0x169f[32]])?_0x1c9fx12[_0x169f[32]]:(_0x1c9fxa[_0x169f[32]]- _0x1c9fx13);if(_0x1c9fx18> 0){if(_0x1c9fx11[_0x169f[33]]){var _0x1c9fx19={where:{id:{$in:_[_0x169f[34]](_0x1c9fx11,_0x169f[26])},online:true,faxPause:false},include:[{model:Room,attributes:[_0x169f[26]],raw:true}],attributes:[_0x169f[26],_0x169f[17],_0x169f[35],_0x169f[36],_0x169f[37]],order:[[{raw:util[_0x169f[40]](_0x169f[38],_[_0x169f[34]](_0x1c9fx11,_0x169f[26])[_0x169f[39]]())}]]};Agent[_0x169f[60]](_0x1c9fx19)[_0x169f[44]](function(_0x1c9fx1c){if(_0x1c9fx1c[_0x169f[33]]){var _0x1c9fx1d;for(var _0x1c9fx1e=0;_0x1c9fx1e< _0x1c9fx1c[_0x169f[33]];_0x1c9fx1e++){var _0x1c9fx15=_0x1c9fx1c[_0x1c9fx1e][_0x169f[50]]({plain:true});if(!_0x1c9fx14(_0x1c9fx15)){_0x1c9fx1d= _0x1c9fx15;break}};if(_0x1c9fx1d){logger[_0x169f[25]](_0x1c9fxb[_0x169f[15]][_0x169f[14]](),_0x169f[16],_0x1c9fx12[_0x169f[17]][_0x169f[14]](),_0x169f[18],_0x1c9fx12[_0x169f[19]],_0x169f[20],_0x1c9fxb[_0x169f[21]],_0x169f[51],_0x1c9fx1d[_0x169f[26]],_0x1c9fx1d[_0x169f[17]]);var _0x1c9fx1f=_[_0x169f[52]](_0x1c9fx11,{"\x69\x64":_0x1c9fx1d[_0x169f[26]]});if(_0x1c9fx1f>= 0){var _0x1c9fx20=_0x1c9fx11[_0x169f[53]](_0x1c9fx1f,1);if(_0x1c9fx20&& _0x1c9fx20[_0x169f[33]]){_0x1c9fx11[_0x169f[27]](_[_0x169f[54]](_0x1c9fx20))}};return Report[_0x169f[58]](_[_0x169f[57]](_0x1c9fxb,{timeslot:_0x1c9fx18,application:_0x169f[55],membername:_0x1c9fx1d[_0x169f[17]],memberid:_0x1c9fx1d[_0x169f[26]],queue:_0x1c9fx12[_0x169f[26]],queuename:_0x1c9fx12[_0x169f[17]],calledAt:moment()[_0x169f[40]](_0x169f[56])}))};logger[_0x169f[25]](_0x1c9fxb[_0x169f[15]][_0x169f[14]](),_0x169f[16],_0x1c9fx12[_0x169f[17]][_0x169f[14]](),_0x169f[18],_0x1c9fx12[_0x169f[19]],_0x169f[20],_0x1c9fxb[_0x169f[21]],_0x169f[59]);return}else {logger[_0x169f[25]](_0x1c9fxb[_0x169f[15]][_0x169f[14]](),_0x169f[16],_0x1c9fx12[_0x169f[17]][_0x169f[14]](),_0x169f[18],_0x1c9fx12[_0x169f[19]],_0x169f[20],_0x1c9fxb[_0x169f[21]],_0x169f[59]);return}})[_0x169f[44]](function(_0x1c9fx1b){if(_0x1c9fx1b){_0x1c9fxd[_0x169f[49]](util[_0x169f[40]](_0x169f[47],_0x1c9fx1b[_0x169f[48]]))[_0x169f[46]](_0x169f[45],_0x1c9fx1b)}})[_0x169f[44]](function(){_0x1c9fx10= setTimeout(function(){_0x1c9fx13+= _0x1c9fx12[_0x169f[32]];_0x1c9fx17()},_0x1c9fx18* 1000)})[_0x169f[43]](function(_0x1c9fx1a){logger[_0x169f[42]](_0x1c9fxb[_0x169f[15]][_0x169f[14]](),_0x169f[16],_0x1c9fx12[_0x169f[17]][_0x169f[14]](),_0x169f[18],_0x1c9fx12[_0x169f[19]],_0x169f[20],_0x1c9fxb[_0x169f[21]],_0x169f[41]);_0x1c9fxe(_0x1c9fx1a)})}else {logger[_0x169f[25]](_0x1c9fxb[_0x169f[15]][_0x169f[14]](),_0x169f[16],_0x1c9fx12[_0x169f[17]][_0x169f[14]](),_0x169f[18],_0x1c9fx12[_0x169f[19]],_0x169f[20],_0x1c9fxb[_0x169f[21]],_0x169f[59]);_0x1c9fx10= setTimeout(function(){_0x1c9fx13+= _0x1c9fx12[_0x169f[32]];_0x1c9fx17()},_0x1c9fx18* 1000)}}else {return Session[_0x169f[65]]({leaveAt:moment()[_0x169f[40]](_0x169f[56]),timeout:true},{where:{uniqueid:_0x1c9fxb[_0x169f[21]],leaveAt:null},individualHooks:true})[_0x169f[44]](function(_0x1c9fx21){if(_0x1c9fx21&& _0x1c9fx21[_0x169f[33]]&& _0x1c9fx21[1][_0x169f[33]]){for(var _0x1c9fx1e=0;_0x1c9fx1e< _0x1c9fx21[1][_0x169f[33]];_0x1c9fx1e++){var _0x1c9fx22=_0x1c9fx21[1][_0x1c9fx1e][_0x169f[50]]({plain:true});_0x1c9fxd[_0x169f[49]](_0x169f[62])[_0x169f[46]](_0x169f[61],_0x1c9fx22);_0x1c9fxd[_0x169f[49]](_0x169f[63])[_0x169f[46]](_0x169f[61],_0x1c9fx22)}};logger[_0x169f[25]](_0x1c9fxb[_0x169f[15]][_0x169f[14]](),_0x169f[16],_0x1c9fx12[_0x169f[17]][_0x169f[14]](),_0x169f[18],_0x1c9fx12[_0x169f[19]],_0x169f[20],_0x1c9fxb[_0x169f[21]],_0x169f[64]);clearTimeout(_0x1c9fx10);_0x1c9fxe()})[_0x169f[43]](function(_0x1c9fx1a){logger[_0x169f[42]](_0x1c9fxb[_0x169f[15]][_0x169f[14]](),_0x169f[16],_0x1c9fx12[_0x169f[17]][_0x169f[14]](),_0x169f[18],_0x1c9fx12[_0x169f[19]],_0x169f[20],_0x1c9fxb[_0x169f[21]],_0x169f[41]);_0x1c9fxe(_0x1c9fx1a)})}}function _0x1c9fx23(){var _0x1c9fx18=((_0x1c9fxa[_0x169f[32]]- _0x1c9fx13)> _0x1c9fx12[_0x169f[32]])?_0x1c9fx12[_0x169f[32]]:(_0x1c9fxa[_0x169f[32]]- _0x1c9fx13);if(_0x1c9fx18> 0){Queue[_0x169f[73]](_0x1c9fxa.FaxQueueId,{attributes:[_0x169f[26],_0x169f[17],_0x169f[32],_0x169f[19],_0x169f[72]],include:[{model:Agent,where:{online:true,faxPause:false},attributes:[_0x169f[26],_0x169f[17],_0x169f[35],_0x169f[36],_0x169f[37]],raw:true}]})[_0x169f[44]](function(_0x1c9fx25){if(_0x1c9fx25){var _0x1c9fx1c=_[_0x169f[68]](_[_0x169f[67]](_0x1c9fx25.Users,_0x169f[66]));if(_0x1c9fx1c&& _0x1c9fx1c[_0x169f[33]]){var _0x1c9fx26;for(var _0x1c9fx1e=0;_0x1c9fx1e< _0x1c9fx1c[_0x169f[33]];_0x1c9fx1e++){_[_0x169f[69]](_0x1c9fx1c[_0x1c9fx1e],function(_0x1c9fx15){return _0x1c9fx14(_0x1c9fx15)});if(_0x1c9fx1c[_0x1c9fx1e][_0x169f[33]]){_0x1c9fx26= _0x1c9fx1c[_0x1c9fx1e];break}};if(_0x1c9fx26&& _0x1c9fx26[_0x169f[33]]){var _0x1c9fx27=_[_0x169f[34]](_0x1c9fx26,function(_0x1c9fx15){return _[_0x169f[70]](_[_0x169f[57]](_0x1c9fxb,{timeslot:_0x1c9fx18,application:_0x169f[55],membername:_0x1c9fx15[_0x169f[17]],memberid:_0x1c9fx15[_0x169f[26]],queue:_0x1c9fx12[_0x169f[26]],queuename:_0x1c9fx12[_0x169f[17]],calledAt:moment()[_0x169f[40]](_0x169f[56])}))});return Report[_0x169f[71]](_0x1c9fx27,{individualHooks:true})}else {logger[_0x169f[25]](_0x1c9fxb[_0x169f[15]][_0x169f[14]](),_0x169f[16],_0x1c9fx12[_0x169f[17]][_0x169f[14]](),_0x169f[18],_0x1c9fx12[_0x169f[19]],_0x169f[20],_0x1c9fxb[_0x169f[21]],_0x169f[59])}}else {logger[_0x169f[25]](_0x1c9fxb[_0x169f[15]][_0x169f[14]](),_0x169f[16],_0x1c9fx12[_0x169f[17]][_0x169f[14]](),_0x169f[18],_0x1c9fx12[_0x169f[19]],_0x169f[20],_0x1c9fxb[_0x169f[21]],_0x169f[59])}}else {logger[_0x169f[25]](_0x1c9fxb[_0x169f[15]][_0x169f[14]](),_0x169f[16],_0x1c9fx12[_0x169f[17]][_0x169f[14]](),_0x169f[18],_0x1c9fx12[_0x169f[19]],_0x169f[20],_0x1c9fxb[_0x169f[21]],_0x169f[59])}})[_0x169f[44]](function(_0x1c9fx24){if(_0x1c9fx24&& _0x1c9fx24[_0x169f[33]]){for(var _0x1c9fx1e=0;_0x1c9fx1e< _0x1c9fx24[_0x169f[33]];_0x1c9fx1e++){var _0x1c9fx1b=_0x1c9fx24[_0x1c9fx1e][_0x169f[50]]({plain:true});_0x1c9fxd[_0x169f[49]](util[_0x169f[40]](_0x169f[47],_0x1c9fx1b[_0x169f[48]]))[_0x169f[46]](_0x169f[45],_0x1c9fx1b)}};_0x1c9fx10= setTimeout(function(){_0x1c9fx13+= _0x1c9fx12[_0x169f[32]];_0x1c9fx23()},_0x1c9fx18* 1000)})[_0x169f[43]](function(_0x1c9fx1a){logger[_0x169f[42]](_0x1c9fxb[_0x169f[15]][_0x169f[14]](),_0x169f[16],_0x1c9fx12[_0x169f[17]][_0x169f[14]](),_0x169f[18],_0x1c9fx12[_0x169f[19]],_0x169f[20],_0x1c9fxb[_0x169f[21]],_0x169f[41]);_0x1c9fxe(_0x1c9fx1a)})}else {return Session[_0x169f[65]]({leaveAt:moment()[_0x169f[40]](_0x169f[56]),timeout:true},{where:{uniqueid:_0x1c9fxb[_0x169f[21]],leaveAt:null},individualHooks:true})[_0x169f[44]](function(_0x1c9fx21){if(_0x1c9fx21&& _0x1c9fx21[_0x169f[33]]&& _0x1c9fx21[1][_0x169f[33]]){for(var _0x1c9fx1e=0;_0x1c9fx1e< _0x1c9fx21[1][_0x169f[33]];_0x1c9fx1e++){var _0x1c9fx22=_0x1c9fx21[1][_0x1c9fx1e][_0x169f[50]]({plain:true});_0x1c9fxd[_0x169f[49]](_0x169f[62])[_0x169f[46]](_0x169f[61],_0x1c9fx22);_0x1c9fxd[_0x169f[49]](_0x169f[63])[_0x169f[46]](_0x169f[61],_0x1c9fx22)}};logger[_0x169f[25]](_0x1c9fxb[_0x169f[15]][_0x169f[14]](),_0x169f[16],_0x1c9fx12[_0x169f[17]][_0x169f[14]](),_0x169f[18],_0x1c9fx12[_0x169f[19]],_0x169f[20],_0x1c9fxb[_0x169f[21]],_0x169f[64]);clearTimeout(_0x1c9fx10);_0x1c9fxe()})[_0x169f[43]](function(_0x1c9fx1a){logger[_0x169f[42]](_0x1c9fxb[_0x169f[15]][_0x169f[14]](),_0x169f[16],_0x1c9fx12[_0x169f[17]][_0x169f[14]](),_0x169f[18],_0x1c9fx12[_0x169f[19]],_0x169f[20],_0x1c9fxb[_0x169f[21]],_0x169f[41]);_0x1c9fxe(_0x1c9fx1a)})}}return Queue[_0x169f[73]](_0x1c9fxa.FaxQueueId,{attributes:[_0x169f[26],_0x169f[17],_0x169f[32],_0x169f[19],_0x169f[72]],include:[{model:Agent,attributes:[_0x169f[26]],raw:true}]})[_0x169f[44]](function(_0x1c9fx25){_0x1c9fx12= _0x1c9fx25[_0x169f[50]]({plain:true});logger[_0x169f[25]](_0x1c9fxb[_0x169f[15]][_0x169f[14]](),_0x169f[16],_0x1c9fx12[_0x169f[17]][_0x169f[14]](),_0x169f[18],_0x1c9fx12[_0x169f[19]],_0x169f[20],_0x1c9fxb[_0x169f[21]],_0x169f[83],_0x1c9fxa[_0x169f[32]],_0x169f[84]);return Session[_0x169f[58]](_[_0x169f[57]](_0x1c9fxb,{timeslot:_0x1c9fxa[_0x169f[32]],application:_0x169f[55],queue:_0x1c9fx25[_0x169f[26]],queuename:_0x1c9fx25[_0x169f[17]],calledAt:moment()[_0x169f[40]](_0x169f[56]),joinAt:moment()[_0x169f[40]](_0x169f[56]),membername:null,memberid:null}))})[_0x169f[44]](function(_0x1c9fx22){_0x1c9fxd[_0x169f[49]](_0x169f[62])[_0x169f[46]](_0x169f[61],_0x1c9fx22);_0x1c9fxd[_0x169f[49]](_0x169f[63])[_0x169f[46]](_0x169f[61],_0x1c9fx22);return Room[_0x169f[73]](_0x1c9fxb[_0x169f[82]])})[_0x169f[44]](function(_0x1c9fx28){if(_0x1c9fx28){return _0x1c9fx28[_0x169f[65]]({waiting:true})}})[_0x169f[44]](function(_0x1c9fx28){if(_0x1c9fx28){_0x1c9fxd[_0x169f[46]](_0x169f[81],_0x1c9fx28[_0x169f[50]]({plain:true}))}})[_0x169f[44]](function(_0x1c9fx28){switch(_0x1c9fx12[_0x169f[19]]){case _0x169f[75]:_0x1c9fx23();break;case _0x169f[79]:_0x1c9fx11= _[_0x169f[78]](_0x1c9fx12.Users,[function(_0x1c9fx29){return _0x1c9fx29[_0x169f[77]][_0x169f[76]]|| 0}]);_0x1c9fx17();break;case _0x169f[80]:_0x1c9fx11= _[_0x169f[78]](_0x1c9fx12.Users,[function(_0x1c9fx29){return _0x1c9fx29[_0x169f[77]][_0x169f[76]]|| 0}]);_0x1c9fx17();break;default:}})[_0x169f[43]](function(_0x1c9fx1a){logger[_0x169f[42]](_0x1c9fxb[_0x169f[15]][_0x169f[14]](),_0x169f[16],_0x1c9fx12[_0x169f[17]][_0x169f[14]](),_0x169f[18],_0x1c9fx12[_0x169f[19]],_0x169f[20],_0x1c9fxb[_0x169f[21]],_0x169f[41]);logger[_0x169f[42]](_0x1c9fx1a[_0x169f[74]]);_0x1c9fxe(_0x1c9fx1a)})}
\ No newline at end of file