Built motion from commit ec3309576.|1.0.33
[motion.git] / server / config / forked_routing / fax / queue.js
index a8dc852..ecc2a36 100644 (file)
@@ -1 +1 @@
-var _0x9876=["\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"];_0x9876[0];var _=require(_0x9876[1]);var util=require(_0x9876[2]);var moment=require(_0x9876[3]);var logger=require(_0x9876[5])(_0x9876[4]);var Agent=require(_0x9876[7])[_0x9876[6]];var Room=require(_0x9876[7])[_0x9876[8]];var Queue=require(_0x9876[7])[_0x9876[9]];var Report=require(_0x9876[7])[_0x9876[10]];var Session=require(_0x9876[7])[_0x9876[11]];module[_0x9876[12]]= function(_0x13faxa,_0x13faxb,_0x13faxc,_0x13faxd,_0x13faxe){var _0x13faxf=[];var _0x13fax10;var _0x13fax11;var _0x13fax12;var _0x13fax13=0;process[_0x9876[30]](_0x9876[13],function(_0x13faxc){switch(_0x13faxc[_0x9876[29]]){case _0x9876[28]:logger[_0x9876[25]](_0x13faxb[_0x9876[15]][_0x9876[14]](),_0x9876[16],_0x13fax12[_0x9876[17]][_0x9876[14]](),_0x9876[18],_0x13fax12[_0x9876[19]],_0x9876[20],_0x13faxb[_0x9876[21]],_0x9876[22],_0x13faxc[_0x9876[23]],_0x9876[24]);_0x13faxf[_0x9876[27]]({id:_0x13faxc[_0x9876[26]]});break;default:}});function _0x13fax14(_0x13fax15){var _0x13fax16=_[_0x9876[31]](_0x13faxf,{id:_0x13fax15[_0x9876[26]]});return _0x13fax16?true:false}function _0x13fax17(){var _0x13fax18=((_0x13faxa[_0x9876[32]]- _0x13fax13)> _0x13fax12[_0x9876[32]])?_0x13fax12[_0x9876[32]]:(_0x13faxa[_0x9876[32]]- _0x13fax13);if(_0x13fax18> 0){if(_0x13fax11[_0x9876[33]]){var _0x13fax19={where:{id:{$in:_[_0x9876[34]](_0x13fax11,_0x9876[26])},online:true,faxPause:false},include:[{model:Room,attributes:[_0x9876[26]],raw:true}],attributes:[_0x9876[26],_0x9876[17],_0x9876[35],_0x9876[36],_0x9876[37]],order:[[{raw:util[_0x9876[40]](_0x9876[38],_[_0x9876[34]](_0x13fax11,_0x9876[26])[_0x9876[39]]())}]]};Agent[_0x9876[60]](_0x13fax19)[_0x9876[44]](function(_0x13fax1c){if(_0x13fax1c[_0x9876[33]]){var _0x13fax1d;for(var _0x13fax1e=0;_0x13fax1e< _0x13fax1c[_0x9876[33]];_0x13fax1e++){var _0x13fax15=_0x13fax1c[_0x13fax1e][_0x9876[50]]({plain:true});if(!_0x13fax14(_0x13fax15)){_0x13fax1d= _0x13fax15;break}};if(_0x13fax1d){logger[_0x9876[25]](_0x13faxb[_0x9876[15]][_0x9876[14]](),_0x9876[16],_0x13fax12[_0x9876[17]][_0x9876[14]](),_0x9876[18],_0x13fax12[_0x9876[19]],_0x9876[20],_0x13faxb[_0x9876[21]],_0x9876[51],_0x13fax1d[_0x9876[26]],_0x13fax1d[_0x9876[17]]);var _0x13fax1f=_[_0x9876[52]](_0x13fax11,{"\x69\x64":_0x13fax1d[_0x9876[26]]});if(_0x13fax1f>= 0){var _0x13fax20=_0x13fax11[_0x9876[53]](_0x13fax1f,1);if(_0x13fax20&& _0x13fax20[_0x9876[33]]){_0x13fax11[_0x9876[27]](_[_0x9876[54]](_0x13fax20))}};return Report[_0x9876[58]](_[_0x9876[57]](_0x13faxb,{timeslot:_0x13fax18,application:_0x9876[55],membername:_0x13fax1d[_0x9876[17]],memberid:_0x13fax1d[_0x9876[26]],queue:_0x13fax12[_0x9876[26]],queuename:_0x13fax12[_0x9876[17]],calledAt:moment()[_0x9876[40]](_0x9876[56])}))};logger[_0x9876[25]](_0x13faxb[_0x9876[15]][_0x9876[14]](),_0x9876[16],_0x13fax12[_0x9876[17]][_0x9876[14]](),_0x9876[18],_0x13fax12[_0x9876[19]],_0x9876[20],_0x13faxb[_0x9876[21]],_0x9876[59]);return}else {logger[_0x9876[25]](_0x13faxb[_0x9876[15]][_0x9876[14]](),_0x9876[16],_0x13fax12[_0x9876[17]][_0x9876[14]](),_0x9876[18],_0x13fax12[_0x9876[19]],_0x9876[20],_0x13faxb[_0x9876[21]],_0x9876[59]);return}})[_0x9876[44]](function(_0x13fax1b){if(_0x13fax1b){_0x13faxd[_0x9876[49]](util[_0x9876[40]](_0x9876[47],_0x13fax1b[_0x9876[48]]))[_0x9876[46]](_0x9876[45],_0x13fax1b)}})[_0x9876[44]](function(){_0x13fax10= setTimeout(function(){_0x13fax13+= _0x13fax12[_0x9876[32]];_0x13fax17()},_0x13fax18* 1000)})[_0x9876[43]](function(_0x13fax1a){logger[_0x9876[42]](_0x13faxb[_0x9876[15]][_0x9876[14]](),_0x9876[16],_0x13fax12[_0x9876[17]][_0x9876[14]](),_0x9876[18],_0x13fax12[_0x9876[19]],_0x9876[20],_0x13faxb[_0x9876[21]],_0x9876[41]);_0x13faxe(_0x13fax1a)})}else {logger[_0x9876[25]](_0x13faxb[_0x9876[15]][_0x9876[14]](),_0x9876[16],_0x13fax12[_0x9876[17]][_0x9876[14]](),_0x9876[18],_0x13fax12[_0x9876[19]],_0x9876[20],_0x13faxb[_0x9876[21]],_0x9876[59]);_0x13fax10= setTimeout(function(){_0x13fax13+= _0x13fax12[_0x9876[32]];_0x13fax17()},_0x13fax18* 1000)}}else {return Session[_0x9876[65]]({leaveAt:moment()[_0x9876[40]](_0x9876[56]),timeout:true},{where:{uniqueid:_0x13faxb[_0x9876[21]],leaveAt:null},individualHooks:true})[_0x9876[44]](function(_0x13fax21){if(_0x13fax21&& _0x13fax21[_0x9876[33]]&& _0x13fax21[1][_0x9876[33]]){for(var _0x13fax1e=0;_0x13fax1e< _0x13fax21[1][_0x9876[33]];_0x13fax1e++){var _0x13fax22=_0x13fax21[1][_0x13fax1e][_0x9876[50]]({plain:true});_0x13faxd[_0x9876[49]](_0x9876[62])[_0x9876[46]](_0x9876[61],_0x13fax22);_0x13faxd[_0x9876[49]](_0x9876[63])[_0x9876[46]](_0x9876[61],_0x13fax22)}};logger[_0x9876[25]](_0x13faxb[_0x9876[15]][_0x9876[14]](),_0x9876[16],_0x13fax12[_0x9876[17]][_0x9876[14]](),_0x9876[18],_0x13fax12[_0x9876[19]],_0x9876[20],_0x13faxb[_0x9876[21]],_0x9876[64]);clearTimeout(_0x13fax10);_0x13faxe()})[_0x9876[43]](function(_0x13fax1a){logger[_0x9876[42]](_0x13faxb[_0x9876[15]][_0x9876[14]](),_0x9876[16],_0x13fax12[_0x9876[17]][_0x9876[14]](),_0x9876[18],_0x13fax12[_0x9876[19]],_0x9876[20],_0x13faxb[_0x9876[21]],_0x9876[41]);_0x13faxe(_0x13fax1a)})}}function _0x13fax23(){var _0x13fax18=((_0x13faxa[_0x9876[32]]- _0x13fax13)> _0x13fax12[_0x9876[32]])?_0x13fax12[_0x9876[32]]:(_0x13faxa[_0x9876[32]]- _0x13fax13);if(_0x13fax18> 0){Queue[_0x9876[73]](_0x13faxa.FaxQueueId,{attributes:[_0x9876[26],_0x9876[17],_0x9876[32],_0x9876[19],_0x9876[72]],include:[{model:Agent,where:{online:true,faxPause:false},attributes:[_0x9876[26],_0x9876[17],_0x9876[35],_0x9876[36],_0x9876[37]],raw:true}]})[_0x9876[44]](function(_0x13fax25){if(_0x13fax25){var _0x13fax1c=_[_0x9876[68]](_[_0x9876[67]](_0x13fax25.Users,_0x9876[66]));if(_0x13fax1c&& _0x13fax1c[_0x9876[33]]){var _0x13fax26;for(var _0x13fax1e=0;_0x13fax1e< _0x13fax1c[_0x9876[33]];_0x13fax1e++){_[_0x9876[69]](_0x13fax1c[_0x13fax1e],function(_0x13fax15){return _0x13fax14(_0x13fax15)});if(_0x13fax1c[_0x13fax1e][_0x9876[33]]){_0x13fax26= _0x13fax1c[_0x13fax1e];break}};if(_0x13fax26&& _0x13fax26[_0x9876[33]]){var _0x13fax27=_[_0x9876[34]](_0x13fax26,function(_0x13fax15){return _[_0x9876[70]](_[_0x9876[57]](_0x13faxb,{timeslot:_0x13fax18,application:_0x9876[55],membername:_0x13fax15[_0x9876[17]],memberid:_0x13fax15[_0x9876[26]],queue:_0x13fax12[_0x9876[26]],queuename:_0x13fax12[_0x9876[17]],calledAt:moment()[_0x9876[40]](_0x9876[56])}))});return Report[_0x9876[71]](_0x13fax27,{individualHooks:true})}else {logger[_0x9876[25]](_0x13faxb[_0x9876[15]][_0x9876[14]](),_0x9876[16],_0x13fax12[_0x9876[17]][_0x9876[14]](),_0x9876[18],_0x13fax12[_0x9876[19]],_0x9876[20],_0x13faxb[_0x9876[21]],_0x9876[59])}}else {logger[_0x9876[25]](_0x13faxb[_0x9876[15]][_0x9876[14]](),_0x9876[16],_0x13fax12[_0x9876[17]][_0x9876[14]](),_0x9876[18],_0x13fax12[_0x9876[19]],_0x9876[20],_0x13faxb[_0x9876[21]],_0x9876[59])}}else {logger[_0x9876[25]](_0x13faxb[_0x9876[15]][_0x9876[14]](),_0x9876[16],_0x13fax12[_0x9876[17]][_0x9876[14]](),_0x9876[18],_0x13fax12[_0x9876[19]],_0x9876[20],_0x13faxb[_0x9876[21]],_0x9876[59])}})[_0x9876[44]](function(_0x13fax24){if(_0x13fax24&& _0x13fax24[_0x9876[33]]){for(var _0x13fax1e=0;_0x13fax1e< _0x13fax24[_0x9876[33]];_0x13fax1e++){var _0x13fax1b=_0x13fax24[_0x13fax1e][_0x9876[50]]({plain:true});_0x13faxd[_0x9876[49]](util[_0x9876[40]](_0x9876[47],_0x13fax1b[_0x9876[48]]))[_0x9876[46]](_0x9876[45],_0x13fax1b)}};_0x13fax10= setTimeout(function(){_0x13fax13+= _0x13fax12[_0x9876[32]];_0x13fax23()},_0x13fax18* 1000)})[_0x9876[43]](function(_0x13fax1a){logger[_0x9876[42]](_0x13faxb[_0x9876[15]][_0x9876[14]](),_0x9876[16],_0x13fax12[_0x9876[17]][_0x9876[14]](),_0x9876[18],_0x13fax12[_0x9876[19]],_0x9876[20],_0x13faxb[_0x9876[21]],_0x9876[41]);_0x13faxe(_0x13fax1a)})}else {return Session[_0x9876[65]]({leaveAt:moment()[_0x9876[40]](_0x9876[56]),timeout:true},{where:{uniqueid:_0x13faxb[_0x9876[21]],leaveAt:null},individualHooks:true})[_0x9876[44]](function(_0x13fax21){if(_0x13fax21&& _0x13fax21[_0x9876[33]]&& _0x13fax21[1][_0x9876[33]]){for(var _0x13fax1e=0;_0x13fax1e< _0x13fax21[1][_0x9876[33]];_0x13fax1e++){var _0x13fax22=_0x13fax21[1][_0x13fax1e][_0x9876[50]]({plain:true});_0x13faxd[_0x9876[49]](_0x9876[62])[_0x9876[46]](_0x9876[61],_0x13fax22);_0x13faxd[_0x9876[49]](_0x9876[63])[_0x9876[46]](_0x9876[61],_0x13fax22)}};logger[_0x9876[25]](_0x13faxb[_0x9876[15]][_0x9876[14]](),_0x9876[16],_0x13fax12[_0x9876[17]][_0x9876[14]](),_0x9876[18],_0x13fax12[_0x9876[19]],_0x9876[20],_0x13faxb[_0x9876[21]],_0x9876[64]);clearTimeout(_0x13fax10);_0x13faxe()})[_0x9876[43]](function(_0x13fax1a){logger[_0x9876[42]](_0x13faxb[_0x9876[15]][_0x9876[14]](),_0x9876[16],_0x13fax12[_0x9876[17]][_0x9876[14]](),_0x9876[18],_0x13fax12[_0x9876[19]],_0x9876[20],_0x13faxb[_0x9876[21]],_0x9876[41]);_0x13faxe(_0x13fax1a)})}}return Queue[_0x9876[73]](_0x13faxa.FaxQueueId,{attributes:[_0x9876[26],_0x9876[17],_0x9876[32],_0x9876[19],_0x9876[72]],include:[{model:Agent,attributes:[_0x9876[26]],raw:true}]})[_0x9876[44]](function(_0x13fax25){_0x13fax12= _0x13fax25[_0x9876[50]]({plain:true});logger[_0x9876[25]](_0x13faxb[_0x9876[15]][_0x9876[14]](),_0x9876[16],_0x13fax12[_0x9876[17]][_0x9876[14]](),_0x9876[18],_0x13fax12[_0x9876[19]],_0x9876[20],_0x13faxb[_0x9876[21]],_0x9876[83],_0x13faxa[_0x9876[32]],_0x9876[84]);return Session[_0x9876[58]](_[_0x9876[57]](_0x13faxb,{timeslot:_0x13faxa[_0x9876[32]],application:_0x9876[55],queue:_0x13fax25[_0x9876[26]],queuename:_0x13fax25[_0x9876[17]],calledAt:moment()[_0x9876[40]](_0x9876[56]),joinAt:moment()[_0x9876[40]](_0x9876[56]),membername:null,memberid:null}))})[_0x9876[44]](function(_0x13fax22){_0x13faxd[_0x9876[49]](_0x9876[62])[_0x9876[46]](_0x9876[61],_0x13fax22);_0x13faxd[_0x9876[49]](_0x9876[63])[_0x9876[46]](_0x9876[61],_0x13fax22);return Room[_0x9876[73]](_0x13faxb[_0x9876[82]])})[_0x9876[44]](function(_0x13fax28){if(_0x13fax28){return _0x13fax28[_0x9876[65]]({waiting:true})}})[_0x9876[44]](function(_0x13fax28){if(_0x13fax28){_0x13faxd[_0x9876[46]](_0x9876[81],_0x13fax28[_0x9876[50]]({plain:true}))}})[_0x9876[44]](function(_0x13fax28){switch(_0x13fax12[_0x9876[19]]){case _0x9876[75]:_0x13fax23();break;case _0x9876[79]:_0x13fax11= _[_0x9876[78]](_0x13fax12.Users,[function(_0x13fax29){return _0x13fax29[_0x9876[77]][_0x9876[76]]|| 0}]);_0x13fax17();break;case _0x9876[80]:_0x13fax11= _[_0x9876[78]](_0x13fax12.Users,[function(_0x13fax29){return _0x13fax29[_0x9876[77]][_0x9876[76]]|| 0}]);_0x13fax17();break;default:}})[_0x9876[43]](function(_0x13fax1a){logger[_0x9876[42]](_0x13faxb[_0x9876[15]][_0x9876[14]](),_0x9876[16],_0x13fax12[_0x9876[17]][_0x9876[14]](),_0x9876[18],_0x13fax12[_0x9876[19]],_0x9876[20],_0x13faxb[_0x9876[21]],_0x9876[41]);logger[_0x9876[42]](_0x13fax1a[_0x9876[74]]);_0x13faxe(_0x13fax1a)})}
\ No newline at end of file
+var _0x61d5=["\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"];_0x61d5[0];var _=require(_0x61d5[1]);var util=require(_0x61d5[2]);var moment=require(_0x61d5[3]);var logger=require(_0x61d5[5])(_0x61d5[4]);var Agent=require(_0x61d5[7])[_0x61d5[6]];var Room=require(_0x61d5[7])[_0x61d5[8]];var Queue=require(_0x61d5[7])[_0x61d5[9]];var Report=require(_0x61d5[7])[_0x61d5[10]];var Session=require(_0x61d5[7])[_0x61d5[11]];module[_0x61d5[12]]= function(_0x549cxa,_0x549cxb,_0x549cxc,_0x549cxd,_0x549cxe){var _0x549cxf=[];var _0x549cx10;var _0x549cx11;var _0x549cx12;var _0x549cx13=0;process[_0x61d5[30]](_0x61d5[13],function(_0x549cxc){switch(_0x549cxc[_0x61d5[29]]){case _0x61d5[28]:logger[_0x61d5[25]](_0x549cxb[_0x61d5[15]][_0x61d5[14]](),_0x61d5[16],_0x549cx12[_0x61d5[17]][_0x61d5[14]](),_0x61d5[18],_0x549cx12[_0x61d5[19]],_0x61d5[20],_0x549cxb[_0x61d5[21]],_0x61d5[22],_0x549cxc[_0x61d5[23]],_0x61d5[24]);_0x549cxf[_0x61d5[27]]({id:_0x549cxc[_0x61d5[26]]});break;default:}});function _0x549cx14(_0x549cx15){var _0x549cx16=_[_0x61d5[31]](_0x549cxf,{id:_0x549cx15[_0x61d5[26]]});return _0x549cx16?true:false}function _0x549cx17(){var _0x549cx18=((_0x549cxa[_0x61d5[32]]- _0x549cx13)> _0x549cx12[_0x61d5[32]])?_0x549cx12[_0x61d5[32]]:(_0x549cxa[_0x61d5[32]]- _0x549cx13);if(_0x549cx18> 0){if(_0x549cx11[_0x61d5[33]]){var _0x549cx19={where:{id:{$in:_[_0x61d5[34]](_0x549cx11,_0x61d5[26])},online:true,faxPause:false},include:[{model:Room,attributes:[_0x61d5[26]],raw:true}],attributes:[_0x61d5[26],_0x61d5[17],_0x61d5[35],_0x61d5[36],_0x61d5[37]],order:[[{raw:util[_0x61d5[40]](_0x61d5[38],_[_0x61d5[34]](_0x549cx11,_0x61d5[26])[_0x61d5[39]]())}]]};Agent[_0x61d5[60]](_0x549cx19)[_0x61d5[44]](function(_0x549cx1c){if(_0x549cx1c[_0x61d5[33]]){var _0x549cx1d;for(var _0x549cx1e=0;_0x549cx1e< _0x549cx1c[_0x61d5[33]];_0x549cx1e++){var _0x549cx15=_0x549cx1c[_0x549cx1e][_0x61d5[50]]({plain:true});if(!_0x549cx14(_0x549cx15)){_0x549cx1d= _0x549cx15;break}};if(_0x549cx1d){logger[_0x61d5[25]](_0x549cxb[_0x61d5[15]][_0x61d5[14]](),_0x61d5[16],_0x549cx12[_0x61d5[17]][_0x61d5[14]](),_0x61d5[18],_0x549cx12[_0x61d5[19]],_0x61d5[20],_0x549cxb[_0x61d5[21]],_0x61d5[51],_0x549cx1d[_0x61d5[26]],_0x549cx1d[_0x61d5[17]]);var _0x549cx1f=_[_0x61d5[52]](_0x549cx11,{"\x69\x64":_0x549cx1d[_0x61d5[26]]});if(_0x549cx1f>= 0){var _0x549cx20=_0x549cx11[_0x61d5[53]](_0x549cx1f,1);if(_0x549cx20&& _0x549cx20[_0x61d5[33]]){_0x549cx11[_0x61d5[27]](_[_0x61d5[54]](_0x549cx20))}};return Report[_0x61d5[58]](_[_0x61d5[57]](_0x549cxb,{timeslot:_0x549cx18,application:_0x61d5[55],membername:_0x549cx1d[_0x61d5[17]],memberid:_0x549cx1d[_0x61d5[26]],queue:_0x549cx12[_0x61d5[26]],queuename:_0x549cx12[_0x61d5[17]],calledAt:moment()[_0x61d5[40]](_0x61d5[56])}))};logger[_0x61d5[25]](_0x549cxb[_0x61d5[15]][_0x61d5[14]](),_0x61d5[16],_0x549cx12[_0x61d5[17]][_0x61d5[14]](),_0x61d5[18],_0x549cx12[_0x61d5[19]],_0x61d5[20],_0x549cxb[_0x61d5[21]],_0x61d5[59]);return}else {logger[_0x61d5[25]](_0x549cxb[_0x61d5[15]][_0x61d5[14]](),_0x61d5[16],_0x549cx12[_0x61d5[17]][_0x61d5[14]](),_0x61d5[18],_0x549cx12[_0x61d5[19]],_0x61d5[20],_0x549cxb[_0x61d5[21]],_0x61d5[59]);return}})[_0x61d5[44]](function(_0x549cx1b){if(_0x549cx1b){_0x549cxd[_0x61d5[49]](util[_0x61d5[40]](_0x61d5[47],_0x549cx1b[_0x61d5[48]]))[_0x61d5[46]](_0x61d5[45],_0x549cx1b)}})[_0x61d5[44]](function(){_0x549cx10= setTimeout(function(){_0x549cx13+= _0x549cx12[_0x61d5[32]];_0x549cx17()},_0x549cx18* 1000)})[_0x61d5[43]](function(_0x549cx1a){logger[_0x61d5[42]](_0x549cxb[_0x61d5[15]][_0x61d5[14]](),_0x61d5[16],_0x549cx12[_0x61d5[17]][_0x61d5[14]](),_0x61d5[18],_0x549cx12[_0x61d5[19]],_0x61d5[20],_0x549cxb[_0x61d5[21]],_0x61d5[41]);_0x549cxe(_0x549cx1a)})}else {logger[_0x61d5[25]](_0x549cxb[_0x61d5[15]][_0x61d5[14]](),_0x61d5[16],_0x549cx12[_0x61d5[17]][_0x61d5[14]](),_0x61d5[18],_0x549cx12[_0x61d5[19]],_0x61d5[20],_0x549cxb[_0x61d5[21]],_0x61d5[59]);_0x549cx10= setTimeout(function(){_0x549cx13+= _0x549cx12[_0x61d5[32]];_0x549cx17()},_0x549cx18* 1000)}}else {return Session[_0x61d5[65]]({leaveAt:moment()[_0x61d5[40]](_0x61d5[56]),timeout:true},{where:{uniqueid:_0x549cxb[_0x61d5[21]],leaveAt:null},individualHooks:true})[_0x61d5[44]](function(_0x549cx21){if(_0x549cx21&& _0x549cx21[_0x61d5[33]]&& _0x549cx21[1][_0x61d5[33]]){for(var _0x549cx1e=0;_0x549cx1e< _0x549cx21[1][_0x61d5[33]];_0x549cx1e++){var _0x549cx22=_0x549cx21[1][_0x549cx1e][_0x61d5[50]]({plain:true});_0x549cxd[_0x61d5[49]](_0x61d5[62])[_0x61d5[46]](_0x61d5[61],_0x549cx22);_0x549cxd[_0x61d5[49]](_0x61d5[63])[_0x61d5[46]](_0x61d5[61],_0x549cx22)}};logger[_0x61d5[25]](_0x549cxb[_0x61d5[15]][_0x61d5[14]](),_0x61d5[16],_0x549cx12[_0x61d5[17]][_0x61d5[14]](),_0x61d5[18],_0x549cx12[_0x61d5[19]],_0x61d5[20],_0x549cxb[_0x61d5[21]],_0x61d5[64]);clearTimeout(_0x549cx10);_0x549cxe()})[_0x61d5[43]](function(_0x549cx1a){logger[_0x61d5[42]](_0x549cxb[_0x61d5[15]][_0x61d5[14]](),_0x61d5[16],_0x549cx12[_0x61d5[17]][_0x61d5[14]](),_0x61d5[18],_0x549cx12[_0x61d5[19]],_0x61d5[20],_0x549cxb[_0x61d5[21]],_0x61d5[41]);_0x549cxe(_0x549cx1a)})}}function _0x549cx23(){var _0x549cx18=((_0x549cxa[_0x61d5[32]]- _0x549cx13)> _0x549cx12[_0x61d5[32]])?_0x549cx12[_0x61d5[32]]:(_0x549cxa[_0x61d5[32]]- _0x549cx13);if(_0x549cx18> 0){Queue[_0x61d5[73]](_0x549cxa.FaxQueueId,{attributes:[_0x61d5[26],_0x61d5[17],_0x61d5[32],_0x61d5[19],_0x61d5[72]],include:[{model:Agent,where:{online:true,faxPause:false},attributes:[_0x61d5[26],_0x61d5[17],_0x61d5[35],_0x61d5[36],_0x61d5[37]],raw:true}]})[_0x61d5[44]](function(_0x549cx25){if(_0x549cx25){var _0x549cx1c=_[_0x61d5[68]](_[_0x61d5[67]](_0x549cx25.Users,_0x61d5[66]));if(_0x549cx1c&& _0x549cx1c[_0x61d5[33]]){var _0x549cx26;for(var _0x549cx1e=0;_0x549cx1e< _0x549cx1c[_0x61d5[33]];_0x549cx1e++){_[_0x61d5[69]](_0x549cx1c[_0x549cx1e],function(_0x549cx15){return _0x549cx14(_0x549cx15)});if(_0x549cx1c[_0x549cx1e][_0x61d5[33]]){_0x549cx26= _0x549cx1c[_0x549cx1e];break}};if(_0x549cx26&& _0x549cx26[_0x61d5[33]]){var _0x549cx27=_[_0x61d5[34]](_0x549cx26,function(_0x549cx15){return _[_0x61d5[70]](_[_0x61d5[57]](_0x549cxb,{timeslot:_0x549cx18,application:_0x61d5[55],membername:_0x549cx15[_0x61d5[17]],memberid:_0x549cx15[_0x61d5[26]],queue:_0x549cx12[_0x61d5[26]],queuename:_0x549cx12[_0x61d5[17]],calledAt:moment()[_0x61d5[40]](_0x61d5[56])}))});return Report[_0x61d5[71]](_0x549cx27,{individualHooks:true})}else {logger[_0x61d5[25]](_0x549cxb[_0x61d5[15]][_0x61d5[14]](),_0x61d5[16],_0x549cx12[_0x61d5[17]][_0x61d5[14]](),_0x61d5[18],_0x549cx12[_0x61d5[19]],_0x61d5[20],_0x549cxb[_0x61d5[21]],_0x61d5[59])}}else {logger[_0x61d5[25]](_0x549cxb[_0x61d5[15]][_0x61d5[14]](),_0x61d5[16],_0x549cx12[_0x61d5[17]][_0x61d5[14]](),_0x61d5[18],_0x549cx12[_0x61d5[19]],_0x61d5[20],_0x549cxb[_0x61d5[21]],_0x61d5[59])}}else {logger[_0x61d5[25]](_0x549cxb[_0x61d5[15]][_0x61d5[14]](),_0x61d5[16],_0x549cx12[_0x61d5[17]][_0x61d5[14]](),_0x61d5[18],_0x549cx12[_0x61d5[19]],_0x61d5[20],_0x549cxb[_0x61d5[21]],_0x61d5[59])}})[_0x61d5[44]](function(_0x549cx24){if(_0x549cx24&& _0x549cx24[_0x61d5[33]]){for(var _0x549cx1e=0;_0x549cx1e< _0x549cx24[_0x61d5[33]];_0x549cx1e++){var _0x549cx1b=_0x549cx24[_0x549cx1e][_0x61d5[50]]({plain:true});_0x549cxd[_0x61d5[49]](util[_0x61d5[40]](_0x61d5[47],_0x549cx1b[_0x61d5[48]]))[_0x61d5[46]](_0x61d5[45],_0x549cx1b)}};_0x549cx10= setTimeout(function(){_0x549cx13+= _0x549cx12[_0x61d5[32]];_0x549cx23()},_0x549cx18* 1000)})[_0x61d5[43]](function(_0x549cx1a){logger[_0x61d5[42]](_0x549cxb[_0x61d5[15]][_0x61d5[14]](),_0x61d5[16],_0x549cx12[_0x61d5[17]][_0x61d5[14]](),_0x61d5[18],_0x549cx12[_0x61d5[19]],_0x61d5[20],_0x549cxb[_0x61d5[21]],_0x61d5[41]);_0x549cxe(_0x549cx1a)})}else {return Session[_0x61d5[65]]({leaveAt:moment()[_0x61d5[40]](_0x61d5[56]),timeout:true},{where:{uniqueid:_0x549cxb[_0x61d5[21]],leaveAt:null},individualHooks:true})[_0x61d5[44]](function(_0x549cx21){if(_0x549cx21&& _0x549cx21[_0x61d5[33]]&& _0x549cx21[1][_0x61d5[33]]){for(var _0x549cx1e=0;_0x549cx1e< _0x549cx21[1][_0x61d5[33]];_0x549cx1e++){var _0x549cx22=_0x549cx21[1][_0x549cx1e][_0x61d5[50]]({plain:true});_0x549cxd[_0x61d5[49]](_0x61d5[62])[_0x61d5[46]](_0x61d5[61],_0x549cx22);_0x549cxd[_0x61d5[49]](_0x61d5[63])[_0x61d5[46]](_0x61d5[61],_0x549cx22)}};logger[_0x61d5[25]](_0x549cxb[_0x61d5[15]][_0x61d5[14]](),_0x61d5[16],_0x549cx12[_0x61d5[17]][_0x61d5[14]](),_0x61d5[18],_0x549cx12[_0x61d5[19]],_0x61d5[20],_0x549cxb[_0x61d5[21]],_0x61d5[64]);clearTimeout(_0x549cx10);_0x549cxe()})[_0x61d5[43]](function(_0x549cx1a){logger[_0x61d5[42]](_0x549cxb[_0x61d5[15]][_0x61d5[14]](),_0x61d5[16],_0x549cx12[_0x61d5[17]][_0x61d5[14]](),_0x61d5[18],_0x549cx12[_0x61d5[19]],_0x61d5[20],_0x549cxb[_0x61d5[21]],_0x61d5[41]);_0x549cxe(_0x549cx1a)})}}return Queue[_0x61d5[73]](_0x549cxa.FaxQueueId,{attributes:[_0x61d5[26],_0x61d5[17],_0x61d5[32],_0x61d5[19],_0x61d5[72]],include:[{model:Agent,attributes:[_0x61d5[26]],raw:true}]})[_0x61d5[44]](function(_0x549cx25){_0x549cx12= _0x549cx25[_0x61d5[50]]({plain:true});logger[_0x61d5[25]](_0x549cxb[_0x61d5[15]][_0x61d5[14]](),_0x61d5[16],_0x549cx12[_0x61d5[17]][_0x61d5[14]](),_0x61d5[18],_0x549cx12[_0x61d5[19]],_0x61d5[20],_0x549cxb[_0x61d5[21]],_0x61d5[83],_0x549cxa[_0x61d5[32]],_0x61d5[84]);return Session[_0x61d5[58]](_[_0x61d5[57]](_0x549cxb,{timeslot:_0x549cxa[_0x61d5[32]],application:_0x61d5[55],queue:_0x549cx25[_0x61d5[26]],queuename:_0x549cx25[_0x61d5[17]],calledAt:moment()[_0x61d5[40]](_0x61d5[56]),joinAt:moment()[_0x61d5[40]](_0x61d5[56]),membername:null,memberid:null}))})[_0x61d5[44]](function(_0x549cx22){_0x549cxd[_0x61d5[49]](_0x61d5[62])[_0x61d5[46]](_0x61d5[61],_0x549cx22);_0x549cxd[_0x61d5[49]](_0x61d5[63])[_0x61d5[46]](_0x61d5[61],_0x549cx22);return Room[_0x61d5[73]](_0x549cxb[_0x61d5[82]])})[_0x61d5[44]](function(_0x549cx28){if(_0x549cx28){return _0x549cx28[_0x61d5[65]]({waiting:true})}})[_0x61d5[44]](function(_0x549cx28){if(_0x549cx28){_0x549cxd[_0x61d5[46]](_0x61d5[81],_0x549cx28[_0x61d5[50]]({plain:true}))}})[_0x61d5[44]](function(_0x549cx28){switch(_0x549cx12[_0x61d5[19]]){case _0x61d5[75]:_0x549cx23();break;case _0x61d5[79]:_0x549cx11= _[_0x61d5[78]](_0x549cx12.Users,[function(_0x549cx29){return _0x549cx29[_0x61d5[77]][_0x61d5[76]]|| 0}]);_0x549cx17();break;case _0x61d5[80]:_0x549cx11= _[_0x61d5[78]](_0x549cx12.Users,[function(_0x549cx29){return _0x549cx29[_0x61d5[77]][_0x61d5[76]]|| 0}]);_0x549cx17();break;default:}})[_0x61d5[43]](function(_0x549cx1a){logger[_0x61d5[42]](_0x549cxb[_0x61d5[15]][_0x61d5[14]](),_0x61d5[16],_0x549cx12[_0x61d5[17]][_0x61d5[14]](),_0x61d5[18],_0x549cx12[_0x61d5[19]],_0x61d5[20],_0x549cxb[_0x61d5[21]],_0x61d5[41]);logger[_0x61d5[42]](_0x549cx1a[_0x61d5[74]]);_0x549cxe(_0x549cx1a)})}
\ No newline at end of file