Built motion from commit ec04e100c.|1.0.34
[motion.git] / server / config / forked_routing / fax / queue.js
index 1f52c72..87ea526 100644 (file)
@@ -1 +1 @@
-var _0x77ab=["\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"];_0x77ab[0];var _=require(_0x77ab[1]);var util=require(_0x77ab[2]);var moment=require(_0x77ab[3]);var logger=require(_0x77ab[5])(_0x77ab[4]);var Agent=require(_0x77ab[7])[_0x77ab[6]];var Room=require(_0x77ab[7])[_0x77ab[8]];var Queue=require(_0x77ab[7])[_0x77ab[9]];var Report=require(_0x77ab[7])[_0x77ab[10]];var Session=require(_0x77ab[7])[_0x77ab[11]];module[_0x77ab[12]]= function(_0xeeeaxa,_0xeeeaxb,_0xeeeaxc,_0xeeeaxd,_0xeeeaxe){var _0xeeeaxf=[];var _0xeeeax10;var _0xeeeax11;var _0xeeeax12;var _0xeeeax13=0;process[_0x77ab[30]](_0x77ab[13],function(_0xeeeaxc){switch(_0xeeeaxc[_0x77ab[29]]){case _0x77ab[28]:logger[_0x77ab[25]](_0xeeeaxb[_0x77ab[15]][_0x77ab[14]](),_0x77ab[16],_0xeeeax12[_0x77ab[17]][_0x77ab[14]](),_0x77ab[18],_0xeeeax12[_0x77ab[19]],_0x77ab[20],_0xeeeaxb[_0x77ab[21]],_0x77ab[22],_0xeeeaxc[_0x77ab[23]],_0x77ab[24]);_0xeeeaxf[_0x77ab[27]]({id:_0xeeeaxc[_0x77ab[26]]});break;default:}});function _0xeeeax14(_0xeeeax15){var _0xeeeax16=_[_0x77ab[31]](_0xeeeaxf,{id:_0xeeeax15[_0x77ab[26]]});return _0xeeeax16?true:false}function _0xeeeax17(){var _0xeeeax18=((_0xeeeaxa[_0x77ab[32]]- _0xeeeax13)> _0xeeeax12[_0x77ab[32]])?_0xeeeax12[_0x77ab[32]]:(_0xeeeaxa[_0x77ab[32]]- _0xeeeax13);if(_0xeeeax18> 0){if(_0xeeeax11[_0x77ab[33]]){var _0xeeeax19={where:{id:{$in:_[_0x77ab[34]](_0xeeeax11,_0x77ab[26])},online:true,faxPause:false},include:[{model:Room,attributes:[_0x77ab[26]],raw:true}],attributes:[_0x77ab[26],_0x77ab[17],_0x77ab[35],_0x77ab[36],_0x77ab[37]],order:[[{raw:util[_0x77ab[40]](_0x77ab[38],_[_0x77ab[34]](_0xeeeax11,_0x77ab[26])[_0x77ab[39]]())}]]};Agent[_0x77ab[60]](_0xeeeax19)[_0x77ab[44]](function(_0xeeeax1c){if(_0xeeeax1c[_0x77ab[33]]){var _0xeeeax1d;for(var _0xeeeax1e=0;_0xeeeax1e< _0xeeeax1c[_0x77ab[33]];_0xeeeax1e++){var _0xeeeax15=_0xeeeax1c[_0xeeeax1e][_0x77ab[50]]({plain:true});if(!_0xeeeax14(_0xeeeax15)){_0xeeeax1d= _0xeeeax15;break}};if(_0xeeeax1d){logger[_0x77ab[25]](_0xeeeaxb[_0x77ab[15]][_0x77ab[14]](),_0x77ab[16],_0xeeeax12[_0x77ab[17]][_0x77ab[14]](),_0x77ab[18],_0xeeeax12[_0x77ab[19]],_0x77ab[20],_0xeeeaxb[_0x77ab[21]],_0x77ab[51],_0xeeeax1d[_0x77ab[26]],_0xeeeax1d[_0x77ab[17]]);var _0xeeeax1f=_[_0x77ab[52]](_0xeeeax11,{"\x69\x64":_0xeeeax1d[_0x77ab[26]]});if(_0xeeeax1f>= 0){var _0xeeeax20=_0xeeeax11[_0x77ab[53]](_0xeeeax1f,1);if(_0xeeeax20&& _0xeeeax20[_0x77ab[33]]){_0xeeeax11[_0x77ab[27]](_[_0x77ab[54]](_0xeeeax20))}};return Report[_0x77ab[58]](_[_0x77ab[57]](_0xeeeaxb,{timeslot:_0xeeeax18,application:_0x77ab[55],membername:_0xeeeax1d[_0x77ab[17]],memberid:_0xeeeax1d[_0x77ab[26]],queue:_0xeeeax12[_0x77ab[26]],queuename:_0xeeeax12[_0x77ab[17]],calledAt:moment()[_0x77ab[40]](_0x77ab[56])}))};logger[_0x77ab[25]](_0xeeeaxb[_0x77ab[15]][_0x77ab[14]](),_0x77ab[16],_0xeeeax12[_0x77ab[17]][_0x77ab[14]](),_0x77ab[18],_0xeeeax12[_0x77ab[19]],_0x77ab[20],_0xeeeaxb[_0x77ab[21]],_0x77ab[59]);return}else {logger[_0x77ab[25]](_0xeeeaxb[_0x77ab[15]][_0x77ab[14]](),_0x77ab[16],_0xeeeax12[_0x77ab[17]][_0x77ab[14]](),_0x77ab[18],_0xeeeax12[_0x77ab[19]],_0x77ab[20],_0xeeeaxb[_0x77ab[21]],_0x77ab[59]);return}})[_0x77ab[44]](function(_0xeeeax1b){if(_0xeeeax1b){_0xeeeaxd[_0x77ab[49]](util[_0x77ab[40]](_0x77ab[47],_0xeeeax1b[_0x77ab[48]]))[_0x77ab[46]](_0x77ab[45],_0xeeeax1b)}})[_0x77ab[44]](function(){_0xeeeax10= setTimeout(function(){_0xeeeax13+= _0xeeeax12[_0x77ab[32]];_0xeeeax17()},_0xeeeax18* 1000)})[_0x77ab[43]](function(_0xeeeax1a){logger[_0x77ab[42]](_0xeeeaxb[_0x77ab[15]][_0x77ab[14]](),_0x77ab[16],_0xeeeax12[_0x77ab[17]][_0x77ab[14]](),_0x77ab[18],_0xeeeax12[_0x77ab[19]],_0x77ab[20],_0xeeeaxb[_0x77ab[21]],_0x77ab[41]);_0xeeeaxe(_0xeeeax1a)})}else {logger[_0x77ab[25]](_0xeeeaxb[_0x77ab[15]][_0x77ab[14]](),_0x77ab[16],_0xeeeax12[_0x77ab[17]][_0x77ab[14]](),_0x77ab[18],_0xeeeax12[_0x77ab[19]],_0x77ab[20],_0xeeeaxb[_0x77ab[21]],_0x77ab[59]);_0xeeeax10= setTimeout(function(){_0xeeeax13+= _0xeeeax12[_0x77ab[32]];_0xeeeax17()},_0xeeeax18* 1000)}}else {return Session[_0x77ab[65]]({leaveAt:moment()[_0x77ab[40]](_0x77ab[56]),timeout:true},{where:{uniqueid:_0xeeeaxb[_0x77ab[21]],leaveAt:null},individualHooks:true})[_0x77ab[44]](function(_0xeeeax21){if(_0xeeeax21&& _0xeeeax21[_0x77ab[33]]&& _0xeeeax21[1][_0x77ab[33]]){for(var _0xeeeax1e=0;_0xeeeax1e< _0xeeeax21[1][_0x77ab[33]];_0xeeeax1e++){var _0xeeeax22=_0xeeeax21[1][_0xeeeax1e][_0x77ab[50]]({plain:true});_0xeeeaxd[_0x77ab[49]](_0x77ab[62])[_0x77ab[46]](_0x77ab[61],_0xeeeax22);_0xeeeaxd[_0x77ab[49]](_0x77ab[63])[_0x77ab[46]](_0x77ab[61],_0xeeeax22)}};logger[_0x77ab[25]](_0xeeeaxb[_0x77ab[15]][_0x77ab[14]](),_0x77ab[16],_0xeeeax12[_0x77ab[17]][_0x77ab[14]](),_0x77ab[18],_0xeeeax12[_0x77ab[19]],_0x77ab[20],_0xeeeaxb[_0x77ab[21]],_0x77ab[64]);clearTimeout(_0xeeeax10);_0xeeeaxe()})[_0x77ab[43]](function(_0xeeeax1a){logger[_0x77ab[42]](_0xeeeaxb[_0x77ab[15]][_0x77ab[14]](),_0x77ab[16],_0xeeeax12[_0x77ab[17]][_0x77ab[14]](),_0x77ab[18],_0xeeeax12[_0x77ab[19]],_0x77ab[20],_0xeeeaxb[_0x77ab[21]],_0x77ab[41]);_0xeeeaxe(_0xeeeax1a)})}}function _0xeeeax23(){var _0xeeeax18=((_0xeeeaxa[_0x77ab[32]]- _0xeeeax13)> _0xeeeax12[_0x77ab[32]])?_0xeeeax12[_0x77ab[32]]:(_0xeeeaxa[_0x77ab[32]]- _0xeeeax13);if(_0xeeeax18> 0){Queue[_0x77ab[73]](_0xeeeaxa.FaxQueueId,{attributes:[_0x77ab[26],_0x77ab[17],_0x77ab[32],_0x77ab[19],_0x77ab[72]],include:[{model:Agent,where:{online:true,faxPause:false},attributes:[_0x77ab[26],_0x77ab[17],_0x77ab[35],_0x77ab[36],_0x77ab[37]],raw:true}]})[_0x77ab[44]](function(_0xeeeax25){if(_0xeeeax25){var _0xeeeax1c=_[_0x77ab[68]](_[_0x77ab[67]](_0xeeeax25.Users,_0x77ab[66]));if(_0xeeeax1c&& _0xeeeax1c[_0x77ab[33]]){var _0xeeeax26;for(var _0xeeeax1e=0;_0xeeeax1e< _0xeeeax1c[_0x77ab[33]];_0xeeeax1e++){_[_0x77ab[69]](_0xeeeax1c[_0xeeeax1e],function(_0xeeeax15){return _0xeeeax14(_0xeeeax15)});if(_0xeeeax1c[_0xeeeax1e][_0x77ab[33]]){_0xeeeax26= _0xeeeax1c[_0xeeeax1e];break}};if(_0xeeeax26&& _0xeeeax26[_0x77ab[33]]){var _0xeeeax27=_[_0x77ab[34]](_0xeeeax26,function(_0xeeeax15){return _[_0x77ab[70]](_[_0x77ab[57]](_0xeeeaxb,{timeslot:_0xeeeax18,application:_0x77ab[55],membername:_0xeeeax15[_0x77ab[17]],memberid:_0xeeeax15[_0x77ab[26]],queue:_0xeeeax12[_0x77ab[26]],queuename:_0xeeeax12[_0x77ab[17]],calledAt:moment()[_0x77ab[40]](_0x77ab[56])}))});return Report[_0x77ab[71]](_0xeeeax27,{individualHooks:true})}else {logger[_0x77ab[25]](_0xeeeaxb[_0x77ab[15]][_0x77ab[14]](),_0x77ab[16],_0xeeeax12[_0x77ab[17]][_0x77ab[14]](),_0x77ab[18],_0xeeeax12[_0x77ab[19]],_0x77ab[20],_0xeeeaxb[_0x77ab[21]],_0x77ab[59])}}else {logger[_0x77ab[25]](_0xeeeaxb[_0x77ab[15]][_0x77ab[14]](),_0x77ab[16],_0xeeeax12[_0x77ab[17]][_0x77ab[14]](),_0x77ab[18],_0xeeeax12[_0x77ab[19]],_0x77ab[20],_0xeeeaxb[_0x77ab[21]],_0x77ab[59])}}else {logger[_0x77ab[25]](_0xeeeaxb[_0x77ab[15]][_0x77ab[14]](),_0x77ab[16],_0xeeeax12[_0x77ab[17]][_0x77ab[14]](),_0x77ab[18],_0xeeeax12[_0x77ab[19]],_0x77ab[20],_0xeeeaxb[_0x77ab[21]],_0x77ab[59])}})[_0x77ab[44]](function(_0xeeeax24){if(_0xeeeax24&& _0xeeeax24[_0x77ab[33]]){for(var _0xeeeax1e=0;_0xeeeax1e< _0xeeeax24[_0x77ab[33]];_0xeeeax1e++){var _0xeeeax1b=_0xeeeax24[_0xeeeax1e][_0x77ab[50]]({plain:true});_0xeeeaxd[_0x77ab[49]](util[_0x77ab[40]](_0x77ab[47],_0xeeeax1b[_0x77ab[48]]))[_0x77ab[46]](_0x77ab[45],_0xeeeax1b)}};_0xeeeax10= setTimeout(function(){_0xeeeax13+= _0xeeeax12[_0x77ab[32]];_0xeeeax23()},_0xeeeax18* 1000)})[_0x77ab[43]](function(_0xeeeax1a){logger[_0x77ab[42]](_0xeeeaxb[_0x77ab[15]][_0x77ab[14]](),_0x77ab[16],_0xeeeax12[_0x77ab[17]][_0x77ab[14]](),_0x77ab[18],_0xeeeax12[_0x77ab[19]],_0x77ab[20],_0xeeeaxb[_0x77ab[21]],_0x77ab[41]);_0xeeeaxe(_0xeeeax1a)})}else {return Session[_0x77ab[65]]({leaveAt:moment()[_0x77ab[40]](_0x77ab[56]),timeout:true},{where:{uniqueid:_0xeeeaxb[_0x77ab[21]],leaveAt:null},individualHooks:true})[_0x77ab[44]](function(_0xeeeax21){if(_0xeeeax21&& _0xeeeax21[_0x77ab[33]]&& _0xeeeax21[1][_0x77ab[33]]){for(var _0xeeeax1e=0;_0xeeeax1e< _0xeeeax21[1][_0x77ab[33]];_0xeeeax1e++){var _0xeeeax22=_0xeeeax21[1][_0xeeeax1e][_0x77ab[50]]({plain:true});_0xeeeaxd[_0x77ab[49]](_0x77ab[62])[_0x77ab[46]](_0x77ab[61],_0xeeeax22);_0xeeeaxd[_0x77ab[49]](_0x77ab[63])[_0x77ab[46]](_0x77ab[61],_0xeeeax22)}};logger[_0x77ab[25]](_0xeeeaxb[_0x77ab[15]][_0x77ab[14]](),_0x77ab[16],_0xeeeax12[_0x77ab[17]][_0x77ab[14]](),_0x77ab[18],_0xeeeax12[_0x77ab[19]],_0x77ab[20],_0xeeeaxb[_0x77ab[21]],_0x77ab[64]);clearTimeout(_0xeeeax10);_0xeeeaxe()})[_0x77ab[43]](function(_0xeeeax1a){logger[_0x77ab[42]](_0xeeeaxb[_0x77ab[15]][_0x77ab[14]](),_0x77ab[16],_0xeeeax12[_0x77ab[17]][_0x77ab[14]](),_0x77ab[18],_0xeeeax12[_0x77ab[19]],_0x77ab[20],_0xeeeaxb[_0x77ab[21]],_0x77ab[41]);_0xeeeaxe(_0xeeeax1a)})}}return Queue[_0x77ab[73]](_0xeeeaxa.FaxQueueId,{attributes:[_0x77ab[26],_0x77ab[17],_0x77ab[32],_0x77ab[19],_0x77ab[72]],include:[{model:Agent,attributes:[_0x77ab[26]],raw:true}]})[_0x77ab[44]](function(_0xeeeax25){_0xeeeax12= _0xeeeax25[_0x77ab[50]]({plain:true});logger[_0x77ab[25]](_0xeeeaxb[_0x77ab[15]][_0x77ab[14]](),_0x77ab[16],_0xeeeax12[_0x77ab[17]][_0x77ab[14]](),_0x77ab[18],_0xeeeax12[_0x77ab[19]],_0x77ab[20],_0xeeeaxb[_0x77ab[21]],_0x77ab[83],_0xeeeaxa[_0x77ab[32]],_0x77ab[84]);return Session[_0x77ab[58]](_[_0x77ab[57]](_0xeeeaxb,{timeslot:_0xeeeaxa[_0x77ab[32]],application:_0x77ab[55],queue:_0xeeeax25[_0x77ab[26]],queuename:_0xeeeax25[_0x77ab[17]],calledAt:moment()[_0x77ab[40]](_0x77ab[56]),joinAt:moment()[_0x77ab[40]](_0x77ab[56]),membername:null,memberid:null}))})[_0x77ab[44]](function(_0xeeeax22){_0xeeeaxd[_0x77ab[49]](_0x77ab[62])[_0x77ab[46]](_0x77ab[61],_0xeeeax22);_0xeeeaxd[_0x77ab[49]](_0x77ab[63])[_0x77ab[46]](_0x77ab[61],_0xeeeax22);return Room[_0x77ab[73]](_0xeeeaxb[_0x77ab[82]])})[_0x77ab[44]](function(_0xeeeax28){if(_0xeeeax28){return _0xeeeax28[_0x77ab[65]]({waiting:true})}})[_0x77ab[44]](function(_0xeeeax28){if(_0xeeeax28){_0xeeeaxd[_0x77ab[46]](_0x77ab[81],_0xeeeax28[_0x77ab[50]]({plain:true}))}})[_0x77ab[44]](function(_0xeeeax28){switch(_0xeeeax12[_0x77ab[19]]){case _0x77ab[75]:_0xeeeax23();break;case _0x77ab[79]:_0xeeeax11= _[_0x77ab[78]](_0xeeeax12.Users,[function(_0xeeeax29){return _0xeeeax29[_0x77ab[77]][_0x77ab[76]]|| 0}]);_0xeeeax17();break;case _0x77ab[80]:_0xeeeax11= _[_0x77ab[78]](_0xeeeax12.Users,[function(_0xeeeax29){return _0xeeeax29[_0x77ab[77]][_0x77ab[76]]|| 0}]);_0xeeeax17();break;default:}})[_0x77ab[43]](function(_0xeeeax1a){logger[_0x77ab[42]](_0xeeeaxb[_0x77ab[15]][_0x77ab[14]](),_0x77ab[16],_0xeeeax12[_0x77ab[17]][_0x77ab[14]](),_0x77ab[18],_0xeeeax12[_0x77ab[19]],_0x77ab[20],_0xeeeaxb[_0x77ab[21]],_0x77ab[41]);logger[_0x77ab[42]](_0xeeeax1a[_0x77ab[74]]);_0xeeeaxe(_0xeeeax1a)})}
\ No newline at end of file
+var _0xc416=["\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"];_0xc416[0];var _=require(_0xc416[1]);var util=require(_0xc416[2]);var moment=require(_0xc416[3]);var logger=require(_0xc416[5])(_0xc416[4]);var Agent=require(_0xc416[7])[_0xc416[6]];var Room=require(_0xc416[7])[_0xc416[8]];var Queue=require(_0xc416[7])[_0xc416[9]];var Report=require(_0xc416[7])[_0xc416[10]];var Session=require(_0xc416[7])[_0xc416[11]];module[_0xc416[12]]= function(_0x82e0xa,_0x82e0xb,_0x82e0xc,_0x82e0xd,_0x82e0xe){var _0x82e0xf=[];var _0x82e0x10;var _0x82e0x11;var _0x82e0x12;var _0x82e0x13=0;process[_0xc416[30]](_0xc416[13],function(_0x82e0xc){switch(_0x82e0xc[_0xc416[29]]){case _0xc416[28]:logger[_0xc416[25]](_0x82e0xb[_0xc416[15]][_0xc416[14]](),_0xc416[16],_0x82e0x12[_0xc416[17]][_0xc416[14]](),_0xc416[18],_0x82e0x12[_0xc416[19]],_0xc416[20],_0x82e0xb[_0xc416[21]],_0xc416[22],_0x82e0xc[_0xc416[23]],_0xc416[24]);_0x82e0xf[_0xc416[27]]({id:_0x82e0xc[_0xc416[26]]});break;default:}});function _0x82e0x14(_0x82e0x15){var _0x82e0x16=_[_0xc416[31]](_0x82e0xf,{id:_0x82e0x15[_0xc416[26]]});return _0x82e0x16?true:false}function _0x82e0x17(){var _0x82e0x18=((_0x82e0xa[_0xc416[32]]- _0x82e0x13)> _0x82e0x12[_0xc416[32]])?_0x82e0x12[_0xc416[32]]:(_0x82e0xa[_0xc416[32]]- _0x82e0x13);if(_0x82e0x18> 0){if(_0x82e0x11[_0xc416[33]]){var _0x82e0x19={where:{id:{$in:_[_0xc416[34]](_0x82e0x11,_0xc416[26])},online:true,faxPause:false},include:[{model:Room,attributes:[_0xc416[26]],raw:true}],attributes:[_0xc416[26],_0xc416[17],_0xc416[35],_0xc416[36],_0xc416[37]],order:[[{raw:util[_0xc416[40]](_0xc416[38],_[_0xc416[34]](_0x82e0x11,_0xc416[26])[_0xc416[39]]())}]]};Agent[_0xc416[60]](_0x82e0x19)[_0xc416[44]](function(_0x82e0x1c){if(_0x82e0x1c[_0xc416[33]]){var _0x82e0x1d;for(var _0x82e0x1e=0;_0x82e0x1e< _0x82e0x1c[_0xc416[33]];_0x82e0x1e++){var _0x82e0x15=_0x82e0x1c[_0x82e0x1e][_0xc416[50]]({plain:true});if(!_0x82e0x14(_0x82e0x15)){_0x82e0x1d= _0x82e0x15;break}};if(_0x82e0x1d){logger[_0xc416[25]](_0x82e0xb[_0xc416[15]][_0xc416[14]](),_0xc416[16],_0x82e0x12[_0xc416[17]][_0xc416[14]](),_0xc416[18],_0x82e0x12[_0xc416[19]],_0xc416[20],_0x82e0xb[_0xc416[21]],_0xc416[51],_0x82e0x1d[_0xc416[26]],_0x82e0x1d[_0xc416[17]]);var _0x82e0x1f=_[_0xc416[52]](_0x82e0x11,{"\x69\x64":_0x82e0x1d[_0xc416[26]]});if(_0x82e0x1f>= 0){var _0x82e0x20=_0x82e0x11[_0xc416[53]](_0x82e0x1f,1);if(_0x82e0x20&& _0x82e0x20[_0xc416[33]]){_0x82e0x11[_0xc416[27]](_[_0xc416[54]](_0x82e0x20))}};return Report[_0xc416[58]](_[_0xc416[57]](_0x82e0xb,{timeslot:_0x82e0x18,application:_0xc416[55],membername:_0x82e0x1d[_0xc416[17]],memberid:_0x82e0x1d[_0xc416[26]],queue:_0x82e0x12[_0xc416[26]],queuename:_0x82e0x12[_0xc416[17]],calledAt:moment()[_0xc416[40]](_0xc416[56])}))};logger[_0xc416[25]](_0x82e0xb[_0xc416[15]][_0xc416[14]](),_0xc416[16],_0x82e0x12[_0xc416[17]][_0xc416[14]](),_0xc416[18],_0x82e0x12[_0xc416[19]],_0xc416[20],_0x82e0xb[_0xc416[21]],_0xc416[59]);return}else {logger[_0xc416[25]](_0x82e0xb[_0xc416[15]][_0xc416[14]](),_0xc416[16],_0x82e0x12[_0xc416[17]][_0xc416[14]](),_0xc416[18],_0x82e0x12[_0xc416[19]],_0xc416[20],_0x82e0xb[_0xc416[21]],_0xc416[59]);return}})[_0xc416[44]](function(_0x82e0x1b){if(_0x82e0x1b){_0x82e0xd[_0xc416[49]](util[_0xc416[40]](_0xc416[47],_0x82e0x1b[_0xc416[48]]))[_0xc416[46]](_0xc416[45],_0x82e0x1b)}})[_0xc416[44]](function(){_0x82e0x10= setTimeout(function(){_0x82e0x13+= _0x82e0x12[_0xc416[32]];_0x82e0x17()},_0x82e0x18* 1000)})[_0xc416[43]](function(_0x82e0x1a){logger[_0xc416[42]](_0x82e0xb[_0xc416[15]][_0xc416[14]](),_0xc416[16],_0x82e0x12[_0xc416[17]][_0xc416[14]](),_0xc416[18],_0x82e0x12[_0xc416[19]],_0xc416[20],_0x82e0xb[_0xc416[21]],_0xc416[41]);_0x82e0xe(_0x82e0x1a)})}else {logger[_0xc416[25]](_0x82e0xb[_0xc416[15]][_0xc416[14]](),_0xc416[16],_0x82e0x12[_0xc416[17]][_0xc416[14]](),_0xc416[18],_0x82e0x12[_0xc416[19]],_0xc416[20],_0x82e0xb[_0xc416[21]],_0xc416[59]);_0x82e0x10= setTimeout(function(){_0x82e0x13+= _0x82e0x12[_0xc416[32]];_0x82e0x17()},_0x82e0x18* 1000)}}else {return Session[_0xc416[65]]({leaveAt:moment()[_0xc416[40]](_0xc416[56]),timeout:true},{where:{uniqueid:_0x82e0xb[_0xc416[21]],leaveAt:null},individualHooks:true})[_0xc416[44]](function(_0x82e0x21){if(_0x82e0x21&& _0x82e0x21[_0xc416[33]]&& _0x82e0x21[1][_0xc416[33]]){for(var _0x82e0x1e=0;_0x82e0x1e< _0x82e0x21[1][_0xc416[33]];_0x82e0x1e++){var _0x82e0x22=_0x82e0x21[1][_0x82e0x1e][_0xc416[50]]({plain:true});_0x82e0xd[_0xc416[49]](_0xc416[62])[_0xc416[46]](_0xc416[61],_0x82e0x22);_0x82e0xd[_0xc416[49]](_0xc416[63])[_0xc416[46]](_0xc416[61],_0x82e0x22)}};logger[_0xc416[25]](_0x82e0xb[_0xc416[15]][_0xc416[14]](),_0xc416[16],_0x82e0x12[_0xc416[17]][_0xc416[14]](),_0xc416[18],_0x82e0x12[_0xc416[19]],_0xc416[20],_0x82e0xb[_0xc416[21]],_0xc416[64]);clearTimeout(_0x82e0x10);_0x82e0xe()})[_0xc416[43]](function(_0x82e0x1a){logger[_0xc416[42]](_0x82e0xb[_0xc416[15]][_0xc416[14]](),_0xc416[16],_0x82e0x12[_0xc416[17]][_0xc416[14]](),_0xc416[18],_0x82e0x12[_0xc416[19]],_0xc416[20],_0x82e0xb[_0xc416[21]],_0xc416[41]);_0x82e0xe(_0x82e0x1a)})}}function _0x82e0x23(){var _0x82e0x18=((_0x82e0xa[_0xc416[32]]- _0x82e0x13)> _0x82e0x12[_0xc416[32]])?_0x82e0x12[_0xc416[32]]:(_0x82e0xa[_0xc416[32]]- _0x82e0x13);if(_0x82e0x18> 0){Queue[_0xc416[73]](_0x82e0xa.FaxQueueId,{attributes:[_0xc416[26],_0xc416[17],_0xc416[32],_0xc416[19],_0xc416[72]],include:[{model:Agent,where:{online:true,faxPause:false},attributes:[_0xc416[26],_0xc416[17],_0xc416[35],_0xc416[36],_0xc416[37]],raw:true}]})[_0xc416[44]](function(_0x82e0x25){if(_0x82e0x25){var _0x82e0x1c=_[_0xc416[68]](_[_0xc416[67]](_0x82e0x25.Users,_0xc416[66]));if(_0x82e0x1c&& _0x82e0x1c[_0xc416[33]]){var _0x82e0x26;for(var _0x82e0x1e=0;_0x82e0x1e< _0x82e0x1c[_0xc416[33]];_0x82e0x1e++){_[_0xc416[69]](_0x82e0x1c[_0x82e0x1e],function(_0x82e0x15){return _0x82e0x14(_0x82e0x15)});if(_0x82e0x1c[_0x82e0x1e][_0xc416[33]]){_0x82e0x26= _0x82e0x1c[_0x82e0x1e];break}};if(_0x82e0x26&& _0x82e0x26[_0xc416[33]]){var _0x82e0x27=_[_0xc416[34]](_0x82e0x26,function(_0x82e0x15){return _[_0xc416[70]](_[_0xc416[57]](_0x82e0xb,{timeslot:_0x82e0x18,application:_0xc416[55],membername:_0x82e0x15[_0xc416[17]],memberid:_0x82e0x15[_0xc416[26]],queue:_0x82e0x12[_0xc416[26]],queuename:_0x82e0x12[_0xc416[17]],calledAt:moment()[_0xc416[40]](_0xc416[56])}))});return Report[_0xc416[71]](_0x82e0x27,{individualHooks:true})}else {logger[_0xc416[25]](_0x82e0xb[_0xc416[15]][_0xc416[14]](),_0xc416[16],_0x82e0x12[_0xc416[17]][_0xc416[14]](),_0xc416[18],_0x82e0x12[_0xc416[19]],_0xc416[20],_0x82e0xb[_0xc416[21]],_0xc416[59])}}else {logger[_0xc416[25]](_0x82e0xb[_0xc416[15]][_0xc416[14]](),_0xc416[16],_0x82e0x12[_0xc416[17]][_0xc416[14]](),_0xc416[18],_0x82e0x12[_0xc416[19]],_0xc416[20],_0x82e0xb[_0xc416[21]],_0xc416[59])}}else {logger[_0xc416[25]](_0x82e0xb[_0xc416[15]][_0xc416[14]](),_0xc416[16],_0x82e0x12[_0xc416[17]][_0xc416[14]](),_0xc416[18],_0x82e0x12[_0xc416[19]],_0xc416[20],_0x82e0xb[_0xc416[21]],_0xc416[59])}})[_0xc416[44]](function(_0x82e0x24){if(_0x82e0x24&& _0x82e0x24[_0xc416[33]]){for(var _0x82e0x1e=0;_0x82e0x1e< _0x82e0x24[_0xc416[33]];_0x82e0x1e++){var _0x82e0x1b=_0x82e0x24[_0x82e0x1e][_0xc416[50]]({plain:true});_0x82e0xd[_0xc416[49]](util[_0xc416[40]](_0xc416[47],_0x82e0x1b[_0xc416[48]]))[_0xc416[46]](_0xc416[45],_0x82e0x1b)}};_0x82e0x10= setTimeout(function(){_0x82e0x13+= _0x82e0x12[_0xc416[32]];_0x82e0x23()},_0x82e0x18* 1000)})[_0xc416[43]](function(_0x82e0x1a){logger[_0xc416[42]](_0x82e0xb[_0xc416[15]][_0xc416[14]](),_0xc416[16],_0x82e0x12[_0xc416[17]][_0xc416[14]](),_0xc416[18],_0x82e0x12[_0xc416[19]],_0xc416[20],_0x82e0xb[_0xc416[21]],_0xc416[41]);_0x82e0xe(_0x82e0x1a)})}else {return Session[_0xc416[65]]({leaveAt:moment()[_0xc416[40]](_0xc416[56]),timeout:true},{where:{uniqueid:_0x82e0xb[_0xc416[21]],leaveAt:null},individualHooks:true})[_0xc416[44]](function(_0x82e0x21){if(_0x82e0x21&& _0x82e0x21[_0xc416[33]]&& _0x82e0x21[1][_0xc416[33]]){for(var _0x82e0x1e=0;_0x82e0x1e< _0x82e0x21[1][_0xc416[33]];_0x82e0x1e++){var _0x82e0x22=_0x82e0x21[1][_0x82e0x1e][_0xc416[50]]({plain:true});_0x82e0xd[_0xc416[49]](_0xc416[62])[_0xc416[46]](_0xc416[61],_0x82e0x22);_0x82e0xd[_0xc416[49]](_0xc416[63])[_0xc416[46]](_0xc416[61],_0x82e0x22)}};logger[_0xc416[25]](_0x82e0xb[_0xc416[15]][_0xc416[14]](),_0xc416[16],_0x82e0x12[_0xc416[17]][_0xc416[14]](),_0xc416[18],_0x82e0x12[_0xc416[19]],_0xc416[20],_0x82e0xb[_0xc416[21]],_0xc416[64]);clearTimeout(_0x82e0x10);_0x82e0xe()})[_0xc416[43]](function(_0x82e0x1a){logger[_0xc416[42]](_0x82e0xb[_0xc416[15]][_0xc416[14]](),_0xc416[16],_0x82e0x12[_0xc416[17]][_0xc416[14]](),_0xc416[18],_0x82e0x12[_0xc416[19]],_0xc416[20],_0x82e0xb[_0xc416[21]],_0xc416[41]);_0x82e0xe(_0x82e0x1a)})}}return Queue[_0xc416[73]](_0x82e0xa.FaxQueueId,{attributes:[_0xc416[26],_0xc416[17],_0xc416[32],_0xc416[19],_0xc416[72]],include:[{model:Agent,attributes:[_0xc416[26]],raw:true}]})[_0xc416[44]](function(_0x82e0x25){_0x82e0x12= _0x82e0x25[_0xc416[50]]({plain:true});logger[_0xc416[25]](_0x82e0xb[_0xc416[15]][_0xc416[14]](),_0xc416[16],_0x82e0x12[_0xc416[17]][_0xc416[14]](),_0xc416[18],_0x82e0x12[_0xc416[19]],_0xc416[20],_0x82e0xb[_0xc416[21]],_0xc416[83],_0x82e0xa[_0xc416[32]],_0xc416[84]);return Session[_0xc416[58]](_[_0xc416[57]](_0x82e0xb,{timeslot:_0x82e0xa[_0xc416[32]],application:_0xc416[55],queue:_0x82e0x25[_0xc416[26]],queuename:_0x82e0x25[_0xc416[17]],calledAt:moment()[_0xc416[40]](_0xc416[56]),joinAt:moment()[_0xc416[40]](_0xc416[56]),membername:null,memberid:null}))})[_0xc416[44]](function(_0x82e0x22){_0x82e0xd[_0xc416[49]](_0xc416[62])[_0xc416[46]](_0xc416[61],_0x82e0x22);_0x82e0xd[_0xc416[49]](_0xc416[63])[_0xc416[46]](_0xc416[61],_0x82e0x22);return Room[_0xc416[73]](_0x82e0xb[_0xc416[82]])})[_0xc416[44]](function(_0x82e0x28){if(_0x82e0x28){return _0x82e0x28[_0xc416[65]]({waiting:true})}})[_0xc416[44]](function(_0x82e0x28){if(_0x82e0x28){_0x82e0xd[_0xc416[46]](_0xc416[81],_0x82e0x28[_0xc416[50]]({plain:true}))}})[_0xc416[44]](function(_0x82e0x28){switch(_0x82e0x12[_0xc416[19]]){case _0xc416[75]:_0x82e0x23();break;case _0xc416[79]:_0x82e0x11= _[_0xc416[78]](_0x82e0x12.Users,[function(_0x82e0x29){return _0x82e0x29[_0xc416[77]][_0xc416[76]]|| 0}]);_0x82e0x17();break;case _0xc416[80]:_0x82e0x11= _[_0xc416[78]](_0x82e0x12.Users,[function(_0x82e0x29){return _0x82e0x29[_0xc416[77]][_0xc416[76]]|| 0}]);_0x82e0x17();break;default:}})[_0xc416[43]](function(_0x82e0x1a){logger[_0xc416[42]](_0x82e0xb[_0xc416[15]][_0xc416[14]](),_0xc416[16],_0x82e0x12[_0xc416[17]][_0xc416[14]](),_0xc416[18],_0x82e0x12[_0xc416[19]],_0xc416[20],_0x82e0xb[_0xc416[21]],_0xc416[41]);logger[_0xc416[42]](_0x82e0x1a[_0xc416[74]]);_0x82e0xe(_0x82e0x1a)})}
\ No newline at end of file