Built motion from commit 82cfc5ed0.|1.0.23
[motion.git] / server / config / forked_routing / sms / queue.js
index af32be0..f1516ba 100644 (file)
@@ -1 +1 @@
-var _0xf3e2=["\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","\x73\x6D\x73","\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","\x53\x6D\x73\x52\x6F\x6F\x6D","\x53\x6D\x73\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\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","\x73\x6D\x73\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","\x73\x74\x61\x63\x6B","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\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\x73\x6D\x73\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\x53\x6D\x73\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","\x62\x65\x65\x70\x61\x6C\x6C","\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x53\x6D\x73\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","\x73\x6D\x73\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"];_0xf3e2[0];var _=require(_0xf3e2[1]);var util=require(_0xf3e2[2]);var moment=require(_0xf3e2[3]);var logger=require(_0xf3e2[5])(_0xf3e2[4]);var Agent=require(_0xf3e2[7])[_0xf3e2[6]];var Room=require(_0xf3e2[7])[_0xf3e2[8]];var Queue=require(_0xf3e2[7])[_0xf3e2[9]];var Report=require(_0xf3e2[7])[_0xf3e2[10]];var Session=require(_0xf3e2[7])[_0xf3e2[11]];module[_0xf3e2[12]]= function(_0xeea0xa,_0xeea0xb,_0xeea0xc,_0xeea0xd,_0xeea0xe){var _0xeea0xf=[];var _0xeea0x10;var _0xeea0x11;var _0xeea0x12;var _0xeea0x13=0;process[_0xf3e2[30]](_0xf3e2[13],function(_0xeea0xc){switch(_0xeea0xc[_0xf3e2[29]]){case _0xf3e2[28]:logger[_0xf3e2[25]](_0xeea0xb[_0xf3e2[15]][_0xf3e2[14]](),_0xf3e2[16],_0xeea0x12[_0xf3e2[17]][_0xf3e2[14]](),_0xf3e2[18],_0xeea0x12[_0xf3e2[19]],_0xf3e2[20],_0xeea0xb[_0xf3e2[21]],_0xf3e2[22],_0xeea0xc[_0xf3e2[23]],_0xf3e2[24]);_0xeea0xf[_0xf3e2[27]]({id:_0xeea0xc[_0xf3e2[26]]});break;default:}});function _0xeea0x14(_0xeea0x15){var _0xeea0x16=_[_0xf3e2[31]](_0xeea0xf,{id:_0xeea0x15[_0xf3e2[26]]});return _0xeea0x16?true:false}function _0xeea0x17(){var _0xeea0x18=((_0xeea0xa[_0xf3e2[32]]- _0xeea0x13)> _0xeea0x12[_0xf3e2[32]])?_0xeea0x12[_0xf3e2[32]]:(_0xeea0xa[_0xf3e2[32]]- _0xeea0x13);if(_0xeea0x18> 0){if(_0xeea0x11[_0xf3e2[33]]){var _0xeea0x19={where:{id:{$in:_[_0xf3e2[34]](_0xeea0x11,_0xf3e2[26])},online:true,smsPause:false},include:[{model:Room,attributes:[_0xf3e2[26]],raw:true}],attributes:[_0xf3e2[26],_0xf3e2[17],_0xf3e2[35],_0xf3e2[36],_0xf3e2[37]],order:[[{raw:util[_0xf3e2[40]](_0xf3e2[38],_[_0xf3e2[34]](_0xeea0x11,_0xf3e2[26])[_0xf3e2[39]]())}]]};Agent[_0xf3e2[61]](_0xeea0x19)[_0xf3e2[45]](function(_0xeea0x1c){if(_0xeea0x1c[_0xf3e2[33]]){var _0xeea0x1d;for(var _0xeea0x1e=0;_0xeea0x1e< _0xeea0x1c[_0xf3e2[33]];_0xeea0x1e++){var _0xeea0x15=_0xeea0x1c[_0xeea0x1e][_0xf3e2[51]]({plain:true});if(!_0xeea0x14(_0xeea0x15)){_0xeea0x1d= _0xeea0x15;break}};if(_0xeea0x1d){logger[_0xf3e2[25]](_0xeea0xb[_0xf3e2[15]][_0xf3e2[14]](),_0xf3e2[16],_0xeea0x12[_0xf3e2[17]][_0xf3e2[14]](),_0xf3e2[18],_0xeea0x12[_0xf3e2[19]],_0xf3e2[20],_0xeea0xb[_0xf3e2[21]],_0xf3e2[52],_0xeea0x1d[_0xf3e2[26]],_0xeea0x1d[_0xf3e2[17]]);var _0xeea0x1f=_[_0xf3e2[53]](_0xeea0x11,{"\x69\x64":_0xeea0x1d[_0xf3e2[26]]});if(_0xeea0x1f>= 0){var _0xeea0x20=_0xeea0x11[_0xf3e2[54]](_0xeea0x1f,1);if(_0xeea0x20&& _0xeea0x20[_0xf3e2[33]]){_0xeea0x11[_0xf3e2[27]](_[_0xf3e2[55]](_0xeea0x20))}};return Report[_0xf3e2[59]](_[_0xf3e2[58]](_0xeea0xb,{timeslot:_0xeea0x18,application:_0xf3e2[56],membername:_0xeea0x1d[_0xf3e2[17]],memberid:_0xeea0x1d[_0xf3e2[26]],queue:_0xeea0x12[_0xf3e2[26]],queuename:_0xeea0x12[_0xf3e2[17]],calledAt:moment()[_0xf3e2[40]](_0xf3e2[57])}))};logger[_0xf3e2[25]](_0xeea0xb[_0xf3e2[15]][_0xf3e2[14]](),_0xf3e2[16],_0xeea0x12[_0xf3e2[17]][_0xf3e2[14]](),_0xf3e2[18],_0xeea0x12[_0xf3e2[19]],_0xf3e2[20],_0xeea0xb[_0xf3e2[21]],_0xf3e2[60]);return}else {logger[_0xf3e2[25]](_0xeea0xb[_0xf3e2[15]][_0xf3e2[14]](),_0xf3e2[16],_0xeea0x12[_0xf3e2[17]][_0xf3e2[14]](),_0xf3e2[18],_0xeea0x12[_0xf3e2[19]],_0xf3e2[20],_0xeea0xb[_0xf3e2[21]],_0xf3e2[60]);return}})[_0xf3e2[45]](function(_0xeea0x1b){if(_0xeea0x1b){_0xeea0xd[_0xf3e2[50]](util[_0xf3e2[40]](_0xf3e2[48],_0xeea0x1b[_0xf3e2[49]]))[_0xf3e2[47]](_0xf3e2[46],_0xeea0x1b)}})[_0xf3e2[45]](function(){_0xeea0x10= setTimeout(function(){_0xeea0x13+= _0xeea0x12[_0xf3e2[32]];_0xeea0x17()},_0xeea0x18* 1000)})[_0xf3e2[44]](function(_0xeea0x1a){logger[_0xf3e2[42]](_0xeea0xb[_0xf3e2[15]][_0xf3e2[14]](),_0xf3e2[16],_0xeea0x12[_0xf3e2[17]][_0xf3e2[14]](),_0xf3e2[18],_0xeea0x12[_0xf3e2[19]],_0xf3e2[20],_0xeea0xb[_0xf3e2[21]],_0xf3e2[41]);logger[_0xf3e2[42]](_0xeea0x1a[_0xf3e2[43]]);_0xeea0xe(_0xeea0x1a)})}else {logger[_0xf3e2[25]](_0xeea0xb[_0xf3e2[15]][_0xf3e2[14]](),_0xf3e2[16],_0xeea0x12[_0xf3e2[17]][_0xf3e2[14]](),_0xf3e2[18],_0xeea0x12[_0xf3e2[19]],_0xf3e2[20],_0xeea0xb[_0xf3e2[21]],_0xf3e2[60]);_0xeea0x10= setTimeout(function(){_0xeea0x13+= _0xeea0x12[_0xf3e2[32]];_0xeea0x17()},_0xeea0x18* 1000)}}else {return Session[_0xf3e2[66]]({leaveAt:moment()[_0xf3e2[40]](_0xf3e2[57]),timeout:true},{where:{uniqueid:_0xeea0xb[_0xf3e2[21]],leaveAt:null},individualHooks:true})[_0xf3e2[45]](function(_0xeea0x21){if(_0xeea0x21&& _0xeea0x21[_0xf3e2[33]]&& _0xeea0x21[1][_0xf3e2[33]]){for(var _0xeea0x1e=0;_0xeea0x1e< _0xeea0x21[1][_0xf3e2[33]];_0xeea0x1e++){var _0xeea0x22=_0xeea0x21[1][_0xeea0x1e][_0xf3e2[51]]({plain:true});_0xeea0xd[_0xf3e2[50]](_0xf3e2[63])[_0xf3e2[47]](_0xf3e2[62],_0xeea0x22);_0xeea0xd[_0xf3e2[50]](_0xf3e2[64])[_0xf3e2[47]](_0xf3e2[62],_0xeea0x22)}};logger[_0xf3e2[25]](_0xeea0xb[_0xf3e2[15]][_0xf3e2[14]](),_0xf3e2[16],_0xeea0x12[_0xf3e2[17]][_0xf3e2[14]](),_0xf3e2[18],_0xeea0x12[_0xf3e2[19]],_0xf3e2[20],_0xeea0xb[_0xf3e2[21]],_0xf3e2[65]);clearTimeout(_0xeea0x10);_0xeea0xe()})[_0xf3e2[44]](function(_0xeea0x1a){logger[_0xf3e2[42]](_0xeea0xb[_0xf3e2[15]][_0xf3e2[14]](),_0xf3e2[16],_0xeea0x12[_0xf3e2[17]][_0xf3e2[14]](),_0xf3e2[18],_0xeea0x12[_0xf3e2[19]],_0xf3e2[20],_0xeea0xb[_0xf3e2[21]],_0xf3e2[41]);logger[_0xf3e2[42]](_0xeea0x1a[_0xf3e2[43]]);_0xeea0xe(_0xeea0x1a)})}}function _0xeea0x23(){var _0xeea0x18=((_0xeea0xa[_0xf3e2[32]]- _0xeea0x13)> _0xeea0x12[_0xf3e2[32]])?_0xeea0x12[_0xf3e2[32]]:(_0xeea0xa[_0xf3e2[32]]- _0xeea0x13);if(_0xeea0x18> 0){Queue[_0xf3e2[74]](_0xeea0xa.SmsQueueId,{attributes:[_0xf3e2[26],_0xf3e2[17],_0xf3e2[32],_0xf3e2[19],_0xf3e2[73]],include:[{model:Agent,where:{online:true,smsPause:false},attributes:[_0xf3e2[26],_0xf3e2[17],_0xf3e2[35],_0xf3e2[36],_0xf3e2[37]],raw:true}]})[_0xf3e2[45]](function(_0xeea0x25){if(_0xeea0x25){var _0xeea0x1c=_[_0xf3e2[69]](_[_0xf3e2[68]](_0xeea0x25.Users,_0xf3e2[67]));if(_0xeea0x1c&& _0xeea0x1c[_0xf3e2[33]]){var _0xeea0x26;for(var _0xeea0x1e=0;_0xeea0x1e< _0xeea0x1c[_0xf3e2[33]];_0xeea0x1e++){_[_0xf3e2[70]](_0xeea0x1c[_0xeea0x1e],function(_0xeea0x15){return _0xeea0x14(_0xeea0x15)});if(_0xeea0x1c[_0xeea0x1e][_0xf3e2[33]]){_0xeea0x26= _0xeea0x1c[_0xeea0x1e];break}};if(_0xeea0x26&& _0xeea0x26[_0xf3e2[33]]){var _0xeea0x27=_[_0xf3e2[34]](_0xeea0x26,function(_0xeea0x15){return _[_0xf3e2[71]](_[_0xf3e2[58]](_0xeea0xb,{timeslot:_0xeea0x18,application:_0xf3e2[56],membername:_0xeea0x15[_0xf3e2[17]],memberid:_0xeea0x15[_0xf3e2[26]],queue:_0xeea0x12[_0xf3e2[26]],queuename:_0xeea0x12[_0xf3e2[17]],calledAt:moment()[_0xf3e2[40]](_0xf3e2[57])}))});return Report[_0xf3e2[72]](_0xeea0x27,{individualHooks:true})}else {logger[_0xf3e2[25]](_0xeea0xb[_0xf3e2[15]][_0xf3e2[14]](),_0xf3e2[16],_0xeea0x12[_0xf3e2[17]][_0xf3e2[14]](),_0xf3e2[18],_0xeea0x12[_0xf3e2[19]],_0xf3e2[20],_0xeea0xb[_0xf3e2[21]],_0xf3e2[60])}}else {logger[_0xf3e2[25]](_0xeea0xb[_0xf3e2[15]][_0xf3e2[14]](),_0xf3e2[16],_0xeea0x12[_0xf3e2[17]][_0xf3e2[14]](),_0xf3e2[18],_0xeea0x12[_0xf3e2[19]],_0xf3e2[20],_0xeea0xb[_0xf3e2[21]],_0xf3e2[60])}}else {logger[_0xf3e2[25]](_0xeea0xb[_0xf3e2[15]][_0xf3e2[14]](),_0xf3e2[16],_0xeea0x12[_0xf3e2[17]][_0xf3e2[14]](),_0xf3e2[18],_0xeea0x12[_0xf3e2[19]],_0xf3e2[20],_0xeea0xb[_0xf3e2[21]],_0xf3e2[60])}})[_0xf3e2[45]](function(_0xeea0x24){if(_0xeea0x24&& _0xeea0x24[_0xf3e2[33]]){for(var _0xeea0x1e=0;_0xeea0x1e< _0xeea0x24[_0xf3e2[33]];_0xeea0x1e++){var _0xeea0x1b=_0xeea0x24[_0xeea0x1e][_0xf3e2[51]]({plain:true});_0xeea0xd[_0xf3e2[50]](util[_0xf3e2[40]](_0xf3e2[48],_0xeea0x1b[_0xf3e2[49]]))[_0xf3e2[47]](_0xf3e2[46],_0xeea0x1b)}};_0xeea0x10= setTimeout(function(){_0xeea0x13+= _0xeea0x12[_0xf3e2[32]];_0xeea0x23()},_0xeea0x18* 1000)})[_0xf3e2[44]](function(_0xeea0x1a){logger[_0xf3e2[42]](_0xeea0xb[_0xf3e2[15]][_0xf3e2[14]](),_0xf3e2[16],_0xeea0x12[_0xf3e2[17]][_0xf3e2[14]](),_0xf3e2[18],_0xeea0x12[_0xf3e2[19]],_0xf3e2[20],_0xeea0xb[_0xf3e2[21]],_0xf3e2[41]);logger[_0xf3e2[42]](_0xeea0x1a[_0xf3e2[43]]);_0xeea0xe(_0xeea0x1a)})}else {return Session[_0xf3e2[66]]({leaveAt:moment()[_0xf3e2[40]](_0xf3e2[57]),timeout:true},{where:{uniqueid:_0xeea0xb[_0xf3e2[21]],leaveAt:null},individualHooks:true})[_0xf3e2[45]](function(_0xeea0x21){if(_0xeea0x21&& _0xeea0x21[_0xf3e2[33]]&& _0xeea0x21[1][_0xf3e2[33]]){for(var _0xeea0x1e=0;_0xeea0x1e< _0xeea0x21[1][_0xf3e2[33]];_0xeea0x1e++){var _0xeea0x22=_0xeea0x21[1][_0xeea0x1e][_0xf3e2[51]]({plain:true});_0xeea0xd[_0xf3e2[50]](_0xf3e2[63])[_0xf3e2[47]](_0xf3e2[62],_0xeea0x22);_0xeea0xd[_0xf3e2[50]](_0xf3e2[64])[_0xf3e2[47]](_0xf3e2[62],_0xeea0x22)}};logger[_0xf3e2[25]](_0xeea0xb[_0xf3e2[15]][_0xf3e2[14]](),_0xf3e2[16],_0xeea0x12[_0xf3e2[17]][_0xf3e2[14]](),_0xf3e2[18],_0xeea0x12[_0xf3e2[19]],_0xf3e2[20],_0xeea0xb[_0xf3e2[21]],_0xf3e2[65]);clearTimeout(_0xeea0x10);_0xeea0xe()})[_0xf3e2[44]](function(_0xeea0x1a){logger[_0xf3e2[42]](_0xeea0xb[_0xf3e2[15]][_0xf3e2[14]](),_0xf3e2[16],_0xeea0x12[_0xf3e2[17]][_0xf3e2[14]](),_0xf3e2[18],_0xeea0x12[_0xf3e2[19]],_0xf3e2[20],_0xeea0xb[_0xf3e2[21]],_0xf3e2[41]);logger[_0xf3e2[42]](_0xeea0x1a[_0xf3e2[43]]);_0xeea0xe(_0xeea0x1a)})}}return Queue[_0xf3e2[74]](_0xeea0xa.SmsQueueId,{attributes:[_0xf3e2[26],_0xf3e2[17],_0xf3e2[32],_0xf3e2[19],_0xf3e2[73]],include:[{model:Agent,attributes:[_0xf3e2[26]],raw:true}]})[_0xf3e2[45]](function(_0xeea0x25){_0xeea0x12= _0xeea0x25[_0xf3e2[51]]({plain:true});logger[_0xf3e2[25]](_0xeea0xb[_0xf3e2[15]][_0xf3e2[14]](),_0xf3e2[16],_0xeea0x12[_0xf3e2[17]][_0xf3e2[14]](),_0xf3e2[18],_0xeea0x12[_0xf3e2[19]],_0xf3e2[20],_0xeea0xb[_0xf3e2[21]],_0xf3e2[83],_0xeea0xa[_0xf3e2[32]],_0xf3e2[84]);return Session[_0xf3e2[59]](_[_0xf3e2[58]](_0xeea0xb,{timeslot:_0xeea0xa[_0xf3e2[32]],application:_0xf3e2[56],queue:_0xeea0x25[_0xf3e2[26]],queuename:_0xeea0x25[_0xf3e2[17]],calledAt:moment()[_0xf3e2[40]](_0xf3e2[57]),joinAt:moment()[_0xf3e2[40]](_0xf3e2[57]),membername:null,memberid:null}))})[_0xf3e2[45]](function(_0xeea0x22){_0xeea0xd[_0xf3e2[50]](_0xf3e2[63])[_0xf3e2[47]](_0xf3e2[62],_0xeea0x22);_0xeea0xd[_0xf3e2[50]](_0xf3e2[64])[_0xf3e2[47]](_0xf3e2[62],_0xeea0x22);return Room[_0xf3e2[74]](_0xeea0xb[_0xf3e2[82]])})[_0xf3e2[45]](function(_0xeea0x28){if(_0xeea0x28){return _0xeea0x28[_0xf3e2[66]]({waiting:true})}})[_0xf3e2[45]](function(_0xeea0x28){if(_0xeea0x28){_0xeea0xd[_0xf3e2[47]](_0xf3e2[81],_0xeea0x28[_0xf3e2[51]]({plain:true}))}})[_0xf3e2[45]](function(_0xeea0x28){switch(_0xeea0x12[_0xf3e2[19]]){case _0xf3e2[75]:_0xeea0x23();break;case _0xf3e2[79]:_0xeea0x11= _[_0xf3e2[78]](_0xeea0x12.Users,[function(_0xeea0x29){return _0xeea0x29[_0xf3e2[77]][_0xf3e2[76]]|| 0}]);_0xeea0x17();break;case _0xf3e2[80]:_0xeea0x11= _[_0xf3e2[78]](_0xeea0x12.Users,[function(_0xeea0x29){return _0xeea0x29[_0xf3e2[77]][_0xf3e2[76]]|| 0}]);_0xeea0x17();break;default:}})[_0xf3e2[44]](function(_0xeea0x1a){logger[_0xf3e2[42]](_0xeea0xb[_0xf3e2[15]][_0xf3e2[14]](),_0xf3e2[16],_0xeea0x12[_0xf3e2[17]][_0xf3e2[14]](),_0xf3e2[18],_0xeea0x12[_0xf3e2[19]],_0xf3e2[20],_0xeea0xb[_0xf3e2[21]],_0xf3e2[41]);logger[_0xf3e2[42]](_0xeea0x1a[_0xf3e2[43]]);_0xeea0xe(_0xeea0x1a)})}
\ No newline at end of file
+var _0xd44f=["\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","\x73\x6D\x73","\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","\x53\x6D\x73\x52\x6F\x6F\x6D","\x53\x6D\x73\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\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","\x73\x6D\x73\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","\x73\x74\x61\x63\x6B","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\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\x73\x6D\x73\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\x53\x6D\x73\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","\x62\x65\x65\x70\x61\x6C\x6C","\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x53\x6D\x73\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","\x73\x6D\x73\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"];_0xd44f[0];var _=require(_0xd44f[1]);var util=require(_0xd44f[2]);var moment=require(_0xd44f[3]);var logger=require(_0xd44f[5])(_0xd44f[4]);var Agent=require(_0xd44f[7])[_0xd44f[6]];var Room=require(_0xd44f[7])[_0xd44f[8]];var Queue=require(_0xd44f[7])[_0xd44f[9]];var Report=require(_0xd44f[7])[_0xd44f[10]];var Session=require(_0xd44f[7])[_0xd44f[11]];module[_0xd44f[12]]= function(_0x160cxa,_0x160cxb,_0x160cxc,_0x160cxd,_0x160cxe){var _0x160cxf=[];var _0x160cx10;var _0x160cx11;var _0x160cx12;var _0x160cx13=0;process[_0xd44f[30]](_0xd44f[13],function(_0x160cxc){switch(_0x160cxc[_0xd44f[29]]){case _0xd44f[28]:logger[_0xd44f[25]](_0x160cxb[_0xd44f[15]][_0xd44f[14]](),_0xd44f[16],_0x160cx12[_0xd44f[17]][_0xd44f[14]](),_0xd44f[18],_0x160cx12[_0xd44f[19]],_0xd44f[20],_0x160cxb[_0xd44f[21]],_0xd44f[22],_0x160cxc[_0xd44f[23]],_0xd44f[24]);_0x160cxf[_0xd44f[27]]({id:_0x160cxc[_0xd44f[26]]});break;default:}});function _0x160cx14(_0x160cx15){var _0x160cx16=_[_0xd44f[31]](_0x160cxf,{id:_0x160cx15[_0xd44f[26]]});return _0x160cx16?true:false}function _0x160cx17(){var _0x160cx18=((_0x160cxa[_0xd44f[32]]- _0x160cx13)> _0x160cx12[_0xd44f[32]])?_0x160cx12[_0xd44f[32]]:(_0x160cxa[_0xd44f[32]]- _0x160cx13);if(_0x160cx18> 0){if(_0x160cx11[_0xd44f[33]]){var _0x160cx19={where:{id:{$in:_[_0xd44f[34]](_0x160cx11,_0xd44f[26])},online:true,smsPause:false},include:[{model:Room,attributes:[_0xd44f[26]],raw:true}],attributes:[_0xd44f[26],_0xd44f[17],_0xd44f[35],_0xd44f[36],_0xd44f[37]],order:[[{raw:util[_0xd44f[40]](_0xd44f[38],_[_0xd44f[34]](_0x160cx11,_0xd44f[26])[_0xd44f[39]]())}]]};Agent[_0xd44f[61]](_0x160cx19)[_0xd44f[45]](function(_0x160cx1c){if(_0x160cx1c[_0xd44f[33]]){var _0x160cx1d;for(var _0x160cx1e=0;_0x160cx1e< _0x160cx1c[_0xd44f[33]];_0x160cx1e++){var _0x160cx15=_0x160cx1c[_0x160cx1e][_0xd44f[51]]({plain:true});if(!_0x160cx14(_0x160cx15)){_0x160cx1d= _0x160cx15;break}};if(_0x160cx1d){logger[_0xd44f[25]](_0x160cxb[_0xd44f[15]][_0xd44f[14]](),_0xd44f[16],_0x160cx12[_0xd44f[17]][_0xd44f[14]](),_0xd44f[18],_0x160cx12[_0xd44f[19]],_0xd44f[20],_0x160cxb[_0xd44f[21]],_0xd44f[52],_0x160cx1d[_0xd44f[26]],_0x160cx1d[_0xd44f[17]]);var _0x160cx1f=_[_0xd44f[53]](_0x160cx11,{"\x69\x64":_0x160cx1d[_0xd44f[26]]});if(_0x160cx1f>= 0){var _0x160cx20=_0x160cx11[_0xd44f[54]](_0x160cx1f,1);if(_0x160cx20&& _0x160cx20[_0xd44f[33]]){_0x160cx11[_0xd44f[27]](_[_0xd44f[55]](_0x160cx20))}};return Report[_0xd44f[59]](_[_0xd44f[58]](_0x160cxb,{timeslot:_0x160cx18,application:_0xd44f[56],membername:_0x160cx1d[_0xd44f[17]],memberid:_0x160cx1d[_0xd44f[26]],queue:_0x160cx12[_0xd44f[26]],queuename:_0x160cx12[_0xd44f[17]],calledAt:moment()[_0xd44f[40]](_0xd44f[57])}))};logger[_0xd44f[25]](_0x160cxb[_0xd44f[15]][_0xd44f[14]](),_0xd44f[16],_0x160cx12[_0xd44f[17]][_0xd44f[14]](),_0xd44f[18],_0x160cx12[_0xd44f[19]],_0xd44f[20],_0x160cxb[_0xd44f[21]],_0xd44f[60]);return}else {logger[_0xd44f[25]](_0x160cxb[_0xd44f[15]][_0xd44f[14]](),_0xd44f[16],_0x160cx12[_0xd44f[17]][_0xd44f[14]](),_0xd44f[18],_0x160cx12[_0xd44f[19]],_0xd44f[20],_0x160cxb[_0xd44f[21]],_0xd44f[60]);return}})[_0xd44f[45]](function(_0x160cx1b){if(_0x160cx1b){_0x160cxd[_0xd44f[50]](util[_0xd44f[40]](_0xd44f[48],_0x160cx1b[_0xd44f[49]]))[_0xd44f[47]](_0xd44f[46],_0x160cx1b)}})[_0xd44f[45]](function(){_0x160cx10= setTimeout(function(){_0x160cx13+= _0x160cx12[_0xd44f[32]];_0x160cx17()},_0x160cx18* 1000)})[_0xd44f[44]](function(_0x160cx1a){logger[_0xd44f[42]](_0x160cxb[_0xd44f[15]][_0xd44f[14]](),_0xd44f[16],_0x160cx12[_0xd44f[17]][_0xd44f[14]](),_0xd44f[18],_0x160cx12[_0xd44f[19]],_0xd44f[20],_0x160cxb[_0xd44f[21]],_0xd44f[41]);logger[_0xd44f[42]](_0x160cx1a[_0xd44f[43]]);_0x160cxe(_0x160cx1a)})}else {logger[_0xd44f[25]](_0x160cxb[_0xd44f[15]][_0xd44f[14]](),_0xd44f[16],_0x160cx12[_0xd44f[17]][_0xd44f[14]](),_0xd44f[18],_0x160cx12[_0xd44f[19]],_0xd44f[20],_0x160cxb[_0xd44f[21]],_0xd44f[60]);_0x160cx10= setTimeout(function(){_0x160cx13+= _0x160cx12[_0xd44f[32]];_0x160cx17()},_0x160cx18* 1000)}}else {return Session[_0xd44f[66]]({leaveAt:moment()[_0xd44f[40]](_0xd44f[57]),timeout:true},{where:{uniqueid:_0x160cxb[_0xd44f[21]],leaveAt:null},individualHooks:true})[_0xd44f[45]](function(_0x160cx21){if(_0x160cx21&& _0x160cx21[_0xd44f[33]]&& _0x160cx21[1][_0xd44f[33]]){for(var _0x160cx1e=0;_0x160cx1e< _0x160cx21[1][_0xd44f[33]];_0x160cx1e++){var _0x160cx22=_0x160cx21[1][_0x160cx1e][_0xd44f[51]]({plain:true});_0x160cxd[_0xd44f[50]](_0xd44f[63])[_0xd44f[47]](_0xd44f[62],_0x160cx22);_0x160cxd[_0xd44f[50]](_0xd44f[64])[_0xd44f[47]](_0xd44f[62],_0x160cx22)}};logger[_0xd44f[25]](_0x160cxb[_0xd44f[15]][_0xd44f[14]](),_0xd44f[16],_0x160cx12[_0xd44f[17]][_0xd44f[14]](),_0xd44f[18],_0x160cx12[_0xd44f[19]],_0xd44f[20],_0x160cxb[_0xd44f[21]],_0xd44f[65]);clearTimeout(_0x160cx10);_0x160cxe()})[_0xd44f[44]](function(_0x160cx1a){logger[_0xd44f[42]](_0x160cxb[_0xd44f[15]][_0xd44f[14]](),_0xd44f[16],_0x160cx12[_0xd44f[17]][_0xd44f[14]](),_0xd44f[18],_0x160cx12[_0xd44f[19]],_0xd44f[20],_0x160cxb[_0xd44f[21]],_0xd44f[41]);logger[_0xd44f[42]](_0x160cx1a[_0xd44f[43]]);_0x160cxe(_0x160cx1a)})}}function _0x160cx23(){var _0x160cx18=((_0x160cxa[_0xd44f[32]]- _0x160cx13)> _0x160cx12[_0xd44f[32]])?_0x160cx12[_0xd44f[32]]:(_0x160cxa[_0xd44f[32]]- _0x160cx13);if(_0x160cx18> 0){Queue[_0xd44f[74]](_0x160cxa.SmsQueueId,{attributes:[_0xd44f[26],_0xd44f[17],_0xd44f[32],_0xd44f[19],_0xd44f[73]],include:[{model:Agent,where:{online:true,smsPause:false},attributes:[_0xd44f[26],_0xd44f[17],_0xd44f[35],_0xd44f[36],_0xd44f[37]],raw:true}]})[_0xd44f[45]](function(_0x160cx25){if(_0x160cx25){var _0x160cx1c=_[_0xd44f[69]](_[_0xd44f[68]](_0x160cx25.Users,_0xd44f[67]));if(_0x160cx1c&& _0x160cx1c[_0xd44f[33]]){var _0x160cx26;for(var _0x160cx1e=0;_0x160cx1e< _0x160cx1c[_0xd44f[33]];_0x160cx1e++){_[_0xd44f[70]](_0x160cx1c[_0x160cx1e],function(_0x160cx15){return _0x160cx14(_0x160cx15)});if(_0x160cx1c[_0x160cx1e][_0xd44f[33]]){_0x160cx26= _0x160cx1c[_0x160cx1e];break}};if(_0x160cx26&& _0x160cx26[_0xd44f[33]]){var _0x160cx27=_[_0xd44f[34]](_0x160cx26,function(_0x160cx15){return _[_0xd44f[71]](_[_0xd44f[58]](_0x160cxb,{timeslot:_0x160cx18,application:_0xd44f[56],membername:_0x160cx15[_0xd44f[17]],memberid:_0x160cx15[_0xd44f[26]],queue:_0x160cx12[_0xd44f[26]],queuename:_0x160cx12[_0xd44f[17]],calledAt:moment()[_0xd44f[40]](_0xd44f[57])}))});return Report[_0xd44f[72]](_0x160cx27,{individualHooks:true})}else {logger[_0xd44f[25]](_0x160cxb[_0xd44f[15]][_0xd44f[14]](),_0xd44f[16],_0x160cx12[_0xd44f[17]][_0xd44f[14]](),_0xd44f[18],_0x160cx12[_0xd44f[19]],_0xd44f[20],_0x160cxb[_0xd44f[21]],_0xd44f[60])}}else {logger[_0xd44f[25]](_0x160cxb[_0xd44f[15]][_0xd44f[14]](),_0xd44f[16],_0x160cx12[_0xd44f[17]][_0xd44f[14]](),_0xd44f[18],_0x160cx12[_0xd44f[19]],_0xd44f[20],_0x160cxb[_0xd44f[21]],_0xd44f[60])}}else {logger[_0xd44f[25]](_0x160cxb[_0xd44f[15]][_0xd44f[14]](),_0xd44f[16],_0x160cx12[_0xd44f[17]][_0xd44f[14]](),_0xd44f[18],_0x160cx12[_0xd44f[19]],_0xd44f[20],_0x160cxb[_0xd44f[21]],_0xd44f[60])}})[_0xd44f[45]](function(_0x160cx24){if(_0x160cx24&& _0x160cx24[_0xd44f[33]]){for(var _0x160cx1e=0;_0x160cx1e< _0x160cx24[_0xd44f[33]];_0x160cx1e++){var _0x160cx1b=_0x160cx24[_0x160cx1e][_0xd44f[51]]({plain:true});_0x160cxd[_0xd44f[50]](util[_0xd44f[40]](_0xd44f[48],_0x160cx1b[_0xd44f[49]]))[_0xd44f[47]](_0xd44f[46],_0x160cx1b)}};_0x160cx10= setTimeout(function(){_0x160cx13+= _0x160cx12[_0xd44f[32]];_0x160cx23()},_0x160cx18* 1000)})[_0xd44f[44]](function(_0x160cx1a){logger[_0xd44f[42]](_0x160cxb[_0xd44f[15]][_0xd44f[14]](),_0xd44f[16],_0x160cx12[_0xd44f[17]][_0xd44f[14]](),_0xd44f[18],_0x160cx12[_0xd44f[19]],_0xd44f[20],_0x160cxb[_0xd44f[21]],_0xd44f[41]);logger[_0xd44f[42]](_0x160cx1a[_0xd44f[43]]);_0x160cxe(_0x160cx1a)})}else {return Session[_0xd44f[66]]({leaveAt:moment()[_0xd44f[40]](_0xd44f[57]),timeout:true},{where:{uniqueid:_0x160cxb[_0xd44f[21]],leaveAt:null},individualHooks:true})[_0xd44f[45]](function(_0x160cx21){if(_0x160cx21&& _0x160cx21[_0xd44f[33]]&& _0x160cx21[1][_0xd44f[33]]){for(var _0x160cx1e=0;_0x160cx1e< _0x160cx21[1][_0xd44f[33]];_0x160cx1e++){var _0x160cx22=_0x160cx21[1][_0x160cx1e][_0xd44f[51]]({plain:true});_0x160cxd[_0xd44f[50]](_0xd44f[63])[_0xd44f[47]](_0xd44f[62],_0x160cx22);_0x160cxd[_0xd44f[50]](_0xd44f[64])[_0xd44f[47]](_0xd44f[62],_0x160cx22)}};logger[_0xd44f[25]](_0x160cxb[_0xd44f[15]][_0xd44f[14]](),_0xd44f[16],_0x160cx12[_0xd44f[17]][_0xd44f[14]](),_0xd44f[18],_0x160cx12[_0xd44f[19]],_0xd44f[20],_0x160cxb[_0xd44f[21]],_0xd44f[65]);clearTimeout(_0x160cx10);_0x160cxe()})[_0xd44f[44]](function(_0x160cx1a){logger[_0xd44f[42]](_0x160cxb[_0xd44f[15]][_0xd44f[14]](),_0xd44f[16],_0x160cx12[_0xd44f[17]][_0xd44f[14]](),_0xd44f[18],_0x160cx12[_0xd44f[19]],_0xd44f[20],_0x160cxb[_0xd44f[21]],_0xd44f[41]);logger[_0xd44f[42]](_0x160cx1a[_0xd44f[43]]);_0x160cxe(_0x160cx1a)})}}return Queue[_0xd44f[74]](_0x160cxa.SmsQueueId,{attributes:[_0xd44f[26],_0xd44f[17],_0xd44f[32],_0xd44f[19],_0xd44f[73]],include:[{model:Agent,attributes:[_0xd44f[26]],raw:true}]})[_0xd44f[45]](function(_0x160cx25){_0x160cx12= _0x160cx25[_0xd44f[51]]({plain:true});logger[_0xd44f[25]](_0x160cxb[_0xd44f[15]][_0xd44f[14]](),_0xd44f[16],_0x160cx12[_0xd44f[17]][_0xd44f[14]](),_0xd44f[18],_0x160cx12[_0xd44f[19]],_0xd44f[20],_0x160cxb[_0xd44f[21]],_0xd44f[83],_0x160cxa[_0xd44f[32]],_0xd44f[84]);return Session[_0xd44f[59]](_[_0xd44f[58]](_0x160cxb,{timeslot:_0x160cxa[_0xd44f[32]],application:_0xd44f[56],queue:_0x160cx25[_0xd44f[26]],queuename:_0x160cx25[_0xd44f[17]],calledAt:moment()[_0xd44f[40]](_0xd44f[57]),joinAt:moment()[_0xd44f[40]](_0xd44f[57]),membername:null,memberid:null}))})[_0xd44f[45]](function(_0x160cx22){_0x160cxd[_0xd44f[50]](_0xd44f[63])[_0xd44f[47]](_0xd44f[62],_0x160cx22);_0x160cxd[_0xd44f[50]](_0xd44f[64])[_0xd44f[47]](_0xd44f[62],_0x160cx22);return Room[_0xd44f[74]](_0x160cxb[_0xd44f[82]])})[_0xd44f[45]](function(_0x160cx28){if(_0x160cx28){return _0x160cx28[_0xd44f[66]]({waiting:true})}})[_0xd44f[45]](function(_0x160cx28){if(_0x160cx28){_0x160cxd[_0xd44f[47]](_0xd44f[81],_0x160cx28[_0xd44f[51]]({plain:true}))}})[_0xd44f[45]](function(_0x160cx28){switch(_0x160cx12[_0xd44f[19]]){case _0xd44f[75]:_0x160cx23();break;case _0xd44f[79]:_0x160cx11= _[_0xd44f[78]](_0x160cx12.Users,[function(_0x160cx29){return _0x160cx29[_0xd44f[77]][_0xd44f[76]]|| 0}]);_0x160cx17();break;case _0xd44f[80]:_0x160cx11= _[_0xd44f[78]](_0x160cx12.Users,[function(_0x160cx29){return _0x160cx29[_0xd44f[77]][_0xd44f[76]]|| 0}]);_0x160cx17();break;default:}})[_0xd44f[44]](function(_0x160cx1a){logger[_0xd44f[42]](_0x160cxb[_0xd44f[15]][_0xd44f[14]](),_0xd44f[16],_0x160cx12[_0xd44f[17]][_0xd44f[14]](),_0xd44f[18],_0x160cx12[_0xd44f[19]],_0xd44f[20],_0x160cxb[_0xd44f[21]],_0xd44f[41]);logger[_0xd44f[42]](_0x160cx1a[_0xd44f[43]]);_0x160cxe(_0x160cx1a)})}
\ No newline at end of file