Built motion from commit 8613b0174.|1.0.22
[motion.git] / server / config / forked_routing / sms / queue.js
index c514595..74347b6 100644 (file)
@@ -1 +1 @@
-var _0x7e32=["\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","\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","\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"];_0x7e32[0];var _=require(_0x7e32[1]);var util=require(_0x7e32[2]);var moment=require(_0x7e32[3]);var Agent=require(_0x7e32[5])[_0x7e32[4]];var Room=require(_0x7e32[5])[_0x7e32[6]];var Queue=require(_0x7e32[5])[_0x7e32[7]];var Report=require(_0x7e32[5])[_0x7e32[8]];var Session=require(_0x7e32[5])[_0x7e32[9]];module[_0x7e32[10]]= function(_0xd5c6x9,_0xd5c6xa,_0xd5c6xb,_0xd5c6xc,_0xd5c6xd){var _0xd5c6xe=[];var _0xd5c6xf;var _0xd5c6x10;var _0xd5c6x11;var _0xd5c6x12=0;process[_0x7e32[28]](_0x7e32[11],function(_0xd5c6xb){switch(_0xd5c6xb[_0x7e32[27]]){case _0x7e32[26]:console[_0x7e32[23]](_0xd5c6xa[_0x7e32[13]][_0x7e32[12]](),_0x7e32[14],_0xd5c6x11[_0x7e32[15]][_0x7e32[12]](),_0x7e32[16],_0xd5c6x11[_0x7e32[17]],_0x7e32[18],_0xd5c6xa[_0x7e32[19]],_0x7e32[20],_0xd5c6xb[_0x7e32[21]],_0x7e32[22]);_0xd5c6xe[_0x7e32[25]]({id:_0xd5c6xb[_0x7e32[24]]});break;default:}});function _0xd5c6x13(_0xd5c6x14){var _0xd5c6x15=_[_0x7e32[29]](_0xd5c6xe,{id:_0xd5c6x14[_0x7e32[24]]});return _0xd5c6x15?true:false}function _0xd5c6x16(){var _0xd5c6x17=((_0xd5c6x9[_0x7e32[30]]- _0xd5c6x12)> _0xd5c6x11[_0x7e32[30]])?_0xd5c6x11[_0x7e32[30]]:(_0xd5c6x9[_0x7e32[30]]- _0xd5c6x12);if(_0xd5c6x17> 0){if(_0xd5c6x10[_0x7e32[31]]){var _0xd5c6x18={where:{id:{$in:_[_0x7e32[32]](_0xd5c6x10,_0x7e32[24])},online:true,smsPause:false},include:[{model:Room,attributes:[_0x7e32[24]],raw:true}],attributes:[_0x7e32[24],_0x7e32[15],_0x7e32[33],_0x7e32[34],_0x7e32[35]],order:[[{raw:util[_0x7e32[38]](_0x7e32[36],_[_0x7e32[32]](_0xd5c6x10,_0x7e32[24])[_0x7e32[37]]())}]]};Agent[_0x7e32[58]](_0xd5c6x18)[_0x7e32[42]](function(_0xd5c6x1b){if(_0xd5c6x1b[_0x7e32[31]]){var _0xd5c6x1c;for(var _0xd5c6x1d=0;_0xd5c6x1d< _0xd5c6x1b[_0x7e32[31]];_0xd5c6x1d++){var _0xd5c6x14=_0xd5c6x1b[_0xd5c6x1d][_0x7e32[48]]({plain:true});if(!_0xd5c6x13(_0xd5c6x14)){_0xd5c6x1c= _0xd5c6x14;break}};if(_0xd5c6x1c){console[_0x7e32[23]](_0xd5c6xa[_0x7e32[13]][_0x7e32[12]](),_0x7e32[14],_0xd5c6x11[_0x7e32[15]][_0x7e32[12]](),_0x7e32[16],_0xd5c6x11[_0x7e32[17]],_0x7e32[18],_0xd5c6xa[_0x7e32[19]],_0x7e32[49],_0xd5c6x1c[_0x7e32[24]],_0xd5c6x1c[_0x7e32[15]]);var _0xd5c6x1e=_[_0x7e32[50]](_0xd5c6x10,{"\x69\x64":_0xd5c6x1c[_0x7e32[24]]});if(_0xd5c6x1e>= 0){var _0xd5c6x1f=_0xd5c6x10[_0x7e32[51]](_0xd5c6x1e,1);if(_0xd5c6x1f&& _0xd5c6x1f[_0x7e32[31]]){_0xd5c6x10[_0x7e32[25]](_[_0x7e32[52]](_0xd5c6x1f))}};return Report[_0x7e32[56]](_[_0x7e32[55]](_0xd5c6xa,{timeslot:_0xd5c6x17,application:_0x7e32[53],membername:_0xd5c6x1c[_0x7e32[15]],memberid:_0xd5c6x1c[_0x7e32[24]],queue:_0xd5c6x11[_0x7e32[24]],queuename:_0xd5c6x11[_0x7e32[15]],calledAt:moment()[_0x7e32[38]](_0x7e32[54])}))};console[_0x7e32[23]](_0xd5c6xa[_0x7e32[13]][_0x7e32[12]](),_0x7e32[14],_0xd5c6x11[_0x7e32[15]][_0x7e32[12]](),_0x7e32[16],_0xd5c6x11[_0x7e32[17]],_0x7e32[18],_0xd5c6xa[_0x7e32[19]],_0x7e32[57]);return}else {console[_0x7e32[23]](_0xd5c6xa[_0x7e32[13]][_0x7e32[12]](),_0x7e32[14],_0xd5c6x11[_0x7e32[15]][_0x7e32[12]](),_0x7e32[16],_0xd5c6x11[_0x7e32[17]],_0x7e32[18],_0xd5c6xa[_0x7e32[19]],_0x7e32[57]);return}})[_0x7e32[42]](function(_0xd5c6x1a){if(_0xd5c6x1a){_0xd5c6xc[_0x7e32[47]](util[_0x7e32[38]](_0x7e32[45],_0xd5c6x1a[_0x7e32[46]]))[_0x7e32[44]](_0x7e32[43],_0xd5c6x1a)}})[_0x7e32[42]](function(){_0xd5c6xf= setTimeout(function(){_0xd5c6x12+= _0xd5c6x11[_0x7e32[30]];_0xd5c6x16()},_0xd5c6x17* 1000)})[_0x7e32[41]](function(_0xd5c6x19){console[_0x7e32[40]](_0xd5c6xa[_0x7e32[13]][_0x7e32[12]](),_0x7e32[14],_0xd5c6x11[_0x7e32[15]][_0x7e32[12]](),_0x7e32[16],_0xd5c6x11[_0x7e32[17]],_0x7e32[18],_0xd5c6xa[_0x7e32[19]],_0x7e32[39]);_0xd5c6xd(_0xd5c6x19)})}else {console[_0x7e32[23]](_0xd5c6xa[_0x7e32[13]][_0x7e32[12]](),_0x7e32[14],_0xd5c6x11[_0x7e32[15]][_0x7e32[12]](),_0x7e32[16],_0xd5c6x11[_0x7e32[17]],_0x7e32[18],_0xd5c6xa[_0x7e32[19]],_0x7e32[57]);_0xd5c6xf= setTimeout(function(){_0xd5c6x12+= _0xd5c6x11[_0x7e32[30]];_0xd5c6x16()},_0xd5c6x17* 1000)}}else {return Session[_0x7e32[63]]({leaveAt:moment()[_0x7e32[38]](_0x7e32[54]),timeout:true},{where:{uniqueid:_0xd5c6xa[_0x7e32[19]],leaveAt:null},individualHooks:true})[_0x7e32[42]](function(_0xd5c6x20){if(_0xd5c6x20&& _0xd5c6x20[_0x7e32[31]]&& _0xd5c6x20[1][_0x7e32[31]]){for(var _0xd5c6x1d=0;_0xd5c6x1d< _0xd5c6x20[1][_0x7e32[31]];_0xd5c6x1d++){var _0xd5c6x21=_0xd5c6x20[1][_0xd5c6x1d][_0x7e32[48]]({plain:true});_0xd5c6xc[_0x7e32[47]](_0x7e32[60])[_0x7e32[44]](_0x7e32[59],_0xd5c6x21);_0xd5c6xc[_0x7e32[47]](_0x7e32[61])[_0x7e32[44]](_0x7e32[59],_0xd5c6x21)}};console[_0x7e32[23]](_0xd5c6xa[_0x7e32[13]][_0x7e32[12]](),_0x7e32[14],_0xd5c6x11[_0x7e32[15]][_0x7e32[12]](),_0x7e32[16],_0xd5c6x11[_0x7e32[17]],_0x7e32[18],_0xd5c6xa[_0x7e32[19]],_0x7e32[62]);clearTimeout(_0xd5c6xf);_0xd5c6xd()})[_0x7e32[41]](function(_0xd5c6x19){console[_0x7e32[40]](_0xd5c6xa[_0x7e32[13]][_0x7e32[12]](),_0x7e32[14],_0xd5c6x11[_0x7e32[15]][_0x7e32[12]](),_0x7e32[16],_0xd5c6x11[_0x7e32[17]],_0x7e32[18],_0xd5c6xa[_0x7e32[19]],_0x7e32[39]);_0xd5c6xd(_0xd5c6x19)})}}function _0xd5c6x22(){var _0xd5c6x17=((_0xd5c6x9[_0x7e32[30]]- _0xd5c6x12)> _0xd5c6x11[_0x7e32[30]])?_0xd5c6x11[_0x7e32[30]]:(_0xd5c6x9[_0x7e32[30]]- _0xd5c6x12);if(_0xd5c6x17> 0){Queue[_0x7e32[71]](_0xd5c6x9.SmsQueueId,{attributes:[_0x7e32[24],_0x7e32[15],_0x7e32[30],_0x7e32[17],_0x7e32[70]],include:[{model:Agent,where:{online:true,smsPause:false},attributes:[_0x7e32[24],_0x7e32[15],_0x7e32[33],_0x7e32[34],_0x7e32[35]],raw:true}]})[_0x7e32[42]](function(_0xd5c6x24){if(_0xd5c6x24){var _0xd5c6x1b=_[_0x7e32[66]](_[_0x7e32[65]](_0xd5c6x24.Users,_0x7e32[64]));if(_0xd5c6x1b&& _0xd5c6x1b[_0x7e32[31]]){var _0xd5c6x25;for(var _0xd5c6x1d=0;_0xd5c6x1d< _0xd5c6x1b[_0x7e32[31]];_0xd5c6x1d++){_[_0x7e32[67]](_0xd5c6x1b[_0xd5c6x1d],function(_0xd5c6x14){return _0xd5c6x13(_0xd5c6x14)});if(_0xd5c6x1b[_0xd5c6x1d][_0x7e32[31]]){_0xd5c6x25= _0xd5c6x1b[_0xd5c6x1d];break}};if(_0xd5c6x25&& _0xd5c6x25[_0x7e32[31]]){var _0xd5c6x26=_[_0x7e32[32]](_0xd5c6x25,function(_0xd5c6x14){return _[_0x7e32[68]](_[_0x7e32[55]](_0xd5c6xa,{timeslot:_0xd5c6x17,application:_0x7e32[53],membername:_0xd5c6x14[_0x7e32[15]],memberid:_0xd5c6x14[_0x7e32[24]],queue:_0xd5c6x11[_0x7e32[24]],queuename:_0xd5c6x11[_0x7e32[15]],calledAt:moment()[_0x7e32[38]](_0x7e32[54])}))});return Report[_0x7e32[69]](_0xd5c6x26,{individualHooks:true})}else {console[_0x7e32[23]](_0xd5c6xa[_0x7e32[13]][_0x7e32[12]](),_0x7e32[14],_0xd5c6x11[_0x7e32[15]][_0x7e32[12]](),_0x7e32[16],_0xd5c6x11[_0x7e32[17]],_0x7e32[18],_0xd5c6xa[_0x7e32[19]],_0x7e32[57])}}else {console[_0x7e32[23]](_0xd5c6xa[_0x7e32[13]][_0x7e32[12]](),_0x7e32[14],_0xd5c6x11[_0x7e32[15]][_0x7e32[12]](),_0x7e32[16],_0xd5c6x11[_0x7e32[17]],_0x7e32[18],_0xd5c6xa[_0x7e32[19]],_0x7e32[57])}}else {console[_0x7e32[23]](_0xd5c6xa[_0x7e32[13]][_0x7e32[12]](),_0x7e32[14],_0xd5c6x11[_0x7e32[15]][_0x7e32[12]](),_0x7e32[16],_0xd5c6x11[_0x7e32[17]],_0x7e32[18],_0xd5c6xa[_0x7e32[19]],_0x7e32[57])}})[_0x7e32[42]](function(_0xd5c6x23){if(_0xd5c6x23&& _0xd5c6x23[_0x7e32[31]]){for(var _0xd5c6x1d=0;_0xd5c6x1d< _0xd5c6x23[_0x7e32[31]];_0xd5c6x1d++){var _0xd5c6x1a=_0xd5c6x23[_0xd5c6x1d][_0x7e32[48]]({plain:true});_0xd5c6xc[_0x7e32[47]](util[_0x7e32[38]](_0x7e32[45],_0xd5c6x1a[_0x7e32[46]]))[_0x7e32[44]](_0x7e32[43],_0xd5c6x1a)}};_0xd5c6xf= setTimeout(function(){_0xd5c6x12+= _0xd5c6x11[_0x7e32[30]];_0xd5c6x22()},_0xd5c6x17* 1000)})[_0x7e32[41]](function(_0xd5c6x19){console[_0x7e32[40]](_0xd5c6xa[_0x7e32[13]][_0x7e32[12]](),_0x7e32[14],_0xd5c6x11[_0x7e32[15]][_0x7e32[12]](),_0x7e32[16],_0xd5c6x11[_0x7e32[17]],_0x7e32[18],_0xd5c6xa[_0x7e32[19]],_0x7e32[39]);_0xd5c6xd(_0xd5c6x19)})}else {return Session[_0x7e32[63]]({leaveAt:moment()[_0x7e32[38]](_0x7e32[54]),timeout:true},{where:{uniqueid:_0xd5c6xa[_0x7e32[19]],leaveAt:null},individualHooks:true})[_0x7e32[42]](function(_0xd5c6x20){if(_0xd5c6x20&& _0xd5c6x20[_0x7e32[31]]&& _0xd5c6x20[1][_0x7e32[31]]){for(var _0xd5c6x1d=0;_0xd5c6x1d< _0xd5c6x20[1][_0x7e32[31]];_0xd5c6x1d++){var _0xd5c6x21=_0xd5c6x20[1][_0xd5c6x1d][_0x7e32[48]]({plain:true});_0xd5c6xc[_0x7e32[47]](_0x7e32[60])[_0x7e32[44]](_0x7e32[59],_0xd5c6x21);_0xd5c6xc[_0x7e32[47]](_0x7e32[61])[_0x7e32[44]](_0x7e32[59],_0xd5c6x21)}};console[_0x7e32[23]](_0xd5c6xa[_0x7e32[13]][_0x7e32[12]](),_0x7e32[14],_0xd5c6x11[_0x7e32[15]][_0x7e32[12]](),_0x7e32[16],_0xd5c6x11[_0x7e32[17]],_0x7e32[18],_0xd5c6xa[_0x7e32[19]],_0x7e32[62]);clearTimeout(_0xd5c6xf);_0xd5c6xd()})[_0x7e32[41]](function(_0xd5c6x19){console[_0x7e32[40]](_0xd5c6xa[_0x7e32[13]][_0x7e32[12]](),_0x7e32[14],_0xd5c6x11[_0x7e32[15]][_0x7e32[12]](),_0x7e32[16],_0xd5c6x11[_0x7e32[17]],_0x7e32[18],_0xd5c6xa[_0x7e32[19]],_0x7e32[39]);_0xd5c6xd(_0xd5c6x19)})}}return Queue[_0x7e32[71]](_0xd5c6x9.SmsQueueId,{attributes:[_0x7e32[24],_0x7e32[15],_0x7e32[30],_0x7e32[17],_0x7e32[70]],include:[{model:Agent,attributes:[_0x7e32[24]],raw:true}]})[_0x7e32[42]](function(_0xd5c6x24){_0xd5c6x11= _0xd5c6x24[_0x7e32[48]]({plain:true});console[_0x7e32[23]](_0xd5c6xa[_0x7e32[13]][_0x7e32[12]](),_0x7e32[14],_0xd5c6x11[_0x7e32[15]][_0x7e32[12]](),_0x7e32[16],_0xd5c6x11[_0x7e32[17]],_0x7e32[18],_0xd5c6xa[_0x7e32[19]],_0x7e32[80],_0xd5c6x9[_0x7e32[30]],_0x7e32[81]);return Session[_0x7e32[56]](_[_0x7e32[55]](_0xd5c6xa,{timeslot:_0xd5c6x9[_0x7e32[30]],application:_0x7e32[53],queue:_0xd5c6x24[_0x7e32[24]],queuename:_0xd5c6x24[_0x7e32[15]],calledAt:moment()[_0x7e32[38]](_0x7e32[54]),joinAt:moment()[_0x7e32[38]](_0x7e32[54]),membername:null,memberid:null}))})[_0x7e32[42]](function(_0xd5c6x21){_0xd5c6xc[_0x7e32[47]](_0x7e32[60])[_0x7e32[44]](_0x7e32[59],_0xd5c6x21);_0xd5c6xc[_0x7e32[47]](_0x7e32[61])[_0x7e32[44]](_0x7e32[59],_0xd5c6x21);return Room[_0x7e32[71]](_0xd5c6xa[_0x7e32[79]])})[_0x7e32[42]](function(_0xd5c6x27){if(_0xd5c6x27){return _0xd5c6x27[_0x7e32[63]]({waiting:true})}})[_0x7e32[42]](function(_0xd5c6x27){if(_0xd5c6x27){_0xd5c6xc[_0x7e32[44]](_0x7e32[78],_0xd5c6x27[_0x7e32[48]]({plain:true}))}})[_0x7e32[42]](function(_0xd5c6x27){switch(_0xd5c6x11[_0x7e32[17]]){case _0x7e32[72]:_0xd5c6x22();break;case _0x7e32[76]:_0xd5c6x10= _[_0x7e32[75]](_0xd5c6x11.Users,[function(_0xd5c6x28){return _0xd5c6x28[_0x7e32[74]][_0x7e32[73]]|| 0}]);_0xd5c6x16();break;case _0x7e32[77]:_0xd5c6x10= _[_0x7e32[75]](_0xd5c6x11.Users,[function(_0xd5c6x28){return _0xd5c6x28[_0x7e32[74]][_0x7e32[73]]|| 0}]);_0xd5c6x16();break;default:}})[_0x7e32[41]](function(_0xd5c6x19){console[_0x7e32[40]](_0xd5c6xa[_0x7e32[13]][_0x7e32[12]](),_0x7e32[14],_0xd5c6x11[_0x7e32[15]][_0x7e32[12]](),_0x7e32[16],_0xd5c6x11[_0x7e32[17]],_0x7e32[18],_0xd5c6xa[_0x7e32[19]],_0x7e32[39]);console[_0x7e32[40]](_0xd5c6x19);_0xd5c6xd(_0xd5c6x19)})}
\ No newline at end of file
+var _0xf3c1=["\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"];_0xf3c1[0];var _=require(_0xf3c1[1]);var util=require(_0xf3c1[2]);var moment=require(_0xf3c1[3]);var logger=require(_0xf3c1[5])(_0xf3c1[4]);var Agent=require(_0xf3c1[7])[_0xf3c1[6]];var Room=require(_0xf3c1[7])[_0xf3c1[8]];var Queue=require(_0xf3c1[7])[_0xf3c1[9]];var Report=require(_0xf3c1[7])[_0xf3c1[10]];var Session=require(_0xf3c1[7])[_0xf3c1[11]];module[_0xf3c1[12]]= function(_0x7642xa,_0x7642xb,_0x7642xc,_0x7642xd,_0x7642xe){var _0x7642xf=[];var _0x7642x10;var _0x7642x11;var _0x7642x12;var _0x7642x13=0;process[_0xf3c1[30]](_0xf3c1[13],function(_0x7642xc){switch(_0x7642xc[_0xf3c1[29]]){case _0xf3c1[28]:logger[_0xf3c1[25]](_0x7642xb[_0xf3c1[15]][_0xf3c1[14]](),_0xf3c1[16],_0x7642x12[_0xf3c1[17]][_0xf3c1[14]](),_0xf3c1[18],_0x7642x12[_0xf3c1[19]],_0xf3c1[20],_0x7642xb[_0xf3c1[21]],_0xf3c1[22],_0x7642xc[_0xf3c1[23]],_0xf3c1[24]);_0x7642xf[_0xf3c1[27]]({id:_0x7642xc[_0xf3c1[26]]});break;default:}});function _0x7642x14(_0x7642x15){var _0x7642x16=_[_0xf3c1[31]](_0x7642xf,{id:_0x7642x15[_0xf3c1[26]]});return _0x7642x16?true:false}function _0x7642x17(){var _0x7642x18=((_0x7642xa[_0xf3c1[32]]- _0x7642x13)> _0x7642x12[_0xf3c1[32]])?_0x7642x12[_0xf3c1[32]]:(_0x7642xa[_0xf3c1[32]]- _0x7642x13);if(_0x7642x18> 0){if(_0x7642x11[_0xf3c1[33]]){var _0x7642x19={where:{id:{$in:_[_0xf3c1[34]](_0x7642x11,_0xf3c1[26])},online:true,smsPause:false},include:[{model:Room,attributes:[_0xf3c1[26]],raw:true}],attributes:[_0xf3c1[26],_0xf3c1[17],_0xf3c1[35],_0xf3c1[36],_0xf3c1[37]],order:[[{raw:util[_0xf3c1[40]](_0xf3c1[38],_[_0xf3c1[34]](_0x7642x11,_0xf3c1[26])[_0xf3c1[39]]())}]]};Agent[_0xf3c1[61]](_0x7642x19)[_0xf3c1[45]](function(_0x7642x1c){if(_0x7642x1c[_0xf3c1[33]]){var _0x7642x1d;for(var _0x7642x1e=0;_0x7642x1e< _0x7642x1c[_0xf3c1[33]];_0x7642x1e++){var _0x7642x15=_0x7642x1c[_0x7642x1e][_0xf3c1[51]]({plain:true});if(!_0x7642x14(_0x7642x15)){_0x7642x1d= _0x7642x15;break}};if(_0x7642x1d){logger[_0xf3c1[25]](_0x7642xb[_0xf3c1[15]][_0xf3c1[14]](),_0xf3c1[16],_0x7642x12[_0xf3c1[17]][_0xf3c1[14]](),_0xf3c1[18],_0x7642x12[_0xf3c1[19]],_0xf3c1[20],_0x7642xb[_0xf3c1[21]],_0xf3c1[52],_0x7642x1d[_0xf3c1[26]],_0x7642x1d[_0xf3c1[17]]);var _0x7642x1f=_[_0xf3c1[53]](_0x7642x11,{"\x69\x64":_0x7642x1d[_0xf3c1[26]]});if(_0x7642x1f>= 0){var _0x7642x20=_0x7642x11[_0xf3c1[54]](_0x7642x1f,1);if(_0x7642x20&& _0x7642x20[_0xf3c1[33]]){_0x7642x11[_0xf3c1[27]](_[_0xf3c1[55]](_0x7642x20))}};return Report[_0xf3c1[59]](_[_0xf3c1[58]](_0x7642xb,{timeslot:_0x7642x18,application:_0xf3c1[56],membername:_0x7642x1d[_0xf3c1[17]],memberid:_0x7642x1d[_0xf3c1[26]],queue:_0x7642x12[_0xf3c1[26]],queuename:_0x7642x12[_0xf3c1[17]],calledAt:moment()[_0xf3c1[40]](_0xf3c1[57])}))};logger[_0xf3c1[25]](_0x7642xb[_0xf3c1[15]][_0xf3c1[14]](),_0xf3c1[16],_0x7642x12[_0xf3c1[17]][_0xf3c1[14]](),_0xf3c1[18],_0x7642x12[_0xf3c1[19]],_0xf3c1[20],_0x7642xb[_0xf3c1[21]],_0xf3c1[60]);return}else {logger[_0xf3c1[25]](_0x7642xb[_0xf3c1[15]][_0xf3c1[14]](),_0xf3c1[16],_0x7642x12[_0xf3c1[17]][_0xf3c1[14]](),_0xf3c1[18],_0x7642x12[_0xf3c1[19]],_0xf3c1[20],_0x7642xb[_0xf3c1[21]],_0xf3c1[60]);return}})[_0xf3c1[45]](function(_0x7642x1b){if(_0x7642x1b){_0x7642xd[_0xf3c1[50]](util[_0xf3c1[40]](_0xf3c1[48],_0x7642x1b[_0xf3c1[49]]))[_0xf3c1[47]](_0xf3c1[46],_0x7642x1b)}})[_0xf3c1[45]](function(){_0x7642x10= setTimeout(function(){_0x7642x13+= _0x7642x12[_0xf3c1[32]];_0x7642x17()},_0x7642x18* 1000)})[_0xf3c1[44]](function(_0x7642x1a){logger[_0xf3c1[42]](_0x7642xb[_0xf3c1[15]][_0xf3c1[14]](),_0xf3c1[16],_0x7642x12[_0xf3c1[17]][_0xf3c1[14]](),_0xf3c1[18],_0x7642x12[_0xf3c1[19]],_0xf3c1[20],_0x7642xb[_0xf3c1[21]],_0xf3c1[41]);logger[_0xf3c1[42]](_0x7642x1a[_0xf3c1[43]]);_0x7642xe(_0x7642x1a)})}else {logger[_0xf3c1[25]](_0x7642xb[_0xf3c1[15]][_0xf3c1[14]](),_0xf3c1[16],_0x7642x12[_0xf3c1[17]][_0xf3c1[14]](),_0xf3c1[18],_0x7642x12[_0xf3c1[19]],_0xf3c1[20],_0x7642xb[_0xf3c1[21]],_0xf3c1[60]);_0x7642x10= setTimeout(function(){_0x7642x13+= _0x7642x12[_0xf3c1[32]];_0x7642x17()},_0x7642x18* 1000)}}else {return Session[_0xf3c1[66]]({leaveAt:moment()[_0xf3c1[40]](_0xf3c1[57]),timeout:true},{where:{uniqueid:_0x7642xb[_0xf3c1[21]],leaveAt:null},individualHooks:true})[_0xf3c1[45]](function(_0x7642x21){if(_0x7642x21&& _0x7642x21[_0xf3c1[33]]&& _0x7642x21[1][_0xf3c1[33]]){for(var _0x7642x1e=0;_0x7642x1e< _0x7642x21[1][_0xf3c1[33]];_0x7642x1e++){var _0x7642x22=_0x7642x21[1][_0x7642x1e][_0xf3c1[51]]({plain:true});_0x7642xd[_0xf3c1[50]](_0xf3c1[63])[_0xf3c1[47]](_0xf3c1[62],_0x7642x22);_0x7642xd[_0xf3c1[50]](_0xf3c1[64])[_0xf3c1[47]](_0xf3c1[62],_0x7642x22)}};logger[_0xf3c1[25]](_0x7642xb[_0xf3c1[15]][_0xf3c1[14]](),_0xf3c1[16],_0x7642x12[_0xf3c1[17]][_0xf3c1[14]](),_0xf3c1[18],_0x7642x12[_0xf3c1[19]],_0xf3c1[20],_0x7642xb[_0xf3c1[21]],_0xf3c1[65]);clearTimeout(_0x7642x10);_0x7642xe()})[_0xf3c1[44]](function(_0x7642x1a){logger[_0xf3c1[42]](_0x7642xb[_0xf3c1[15]][_0xf3c1[14]](),_0xf3c1[16],_0x7642x12[_0xf3c1[17]][_0xf3c1[14]](),_0xf3c1[18],_0x7642x12[_0xf3c1[19]],_0xf3c1[20],_0x7642xb[_0xf3c1[21]],_0xf3c1[41]);logger[_0xf3c1[42]](_0x7642x1a[_0xf3c1[43]]);_0x7642xe(_0x7642x1a)})}}function _0x7642x23(){var _0x7642x18=((_0x7642xa[_0xf3c1[32]]- _0x7642x13)> _0x7642x12[_0xf3c1[32]])?_0x7642x12[_0xf3c1[32]]:(_0x7642xa[_0xf3c1[32]]- _0x7642x13);if(_0x7642x18> 0){Queue[_0xf3c1[74]](_0x7642xa.SmsQueueId,{attributes:[_0xf3c1[26],_0xf3c1[17],_0xf3c1[32],_0xf3c1[19],_0xf3c1[73]],include:[{model:Agent,where:{online:true,smsPause:false},attributes:[_0xf3c1[26],_0xf3c1[17],_0xf3c1[35],_0xf3c1[36],_0xf3c1[37]],raw:true}]})[_0xf3c1[45]](function(_0x7642x25){if(_0x7642x25){var _0x7642x1c=_[_0xf3c1[69]](_[_0xf3c1[68]](_0x7642x25.Users,_0xf3c1[67]));if(_0x7642x1c&& _0x7642x1c[_0xf3c1[33]]){var _0x7642x26;for(var _0x7642x1e=0;_0x7642x1e< _0x7642x1c[_0xf3c1[33]];_0x7642x1e++){_[_0xf3c1[70]](_0x7642x1c[_0x7642x1e],function(_0x7642x15){return _0x7642x14(_0x7642x15)});if(_0x7642x1c[_0x7642x1e][_0xf3c1[33]]){_0x7642x26= _0x7642x1c[_0x7642x1e];break}};if(_0x7642x26&& _0x7642x26[_0xf3c1[33]]){var _0x7642x27=_[_0xf3c1[34]](_0x7642x26,function(_0x7642x15){return _[_0xf3c1[71]](_[_0xf3c1[58]](_0x7642xb,{timeslot:_0x7642x18,application:_0xf3c1[56],membername:_0x7642x15[_0xf3c1[17]],memberid:_0x7642x15[_0xf3c1[26]],queue:_0x7642x12[_0xf3c1[26]],queuename:_0x7642x12[_0xf3c1[17]],calledAt:moment()[_0xf3c1[40]](_0xf3c1[57])}))});return Report[_0xf3c1[72]](_0x7642x27,{individualHooks:true})}else {logger[_0xf3c1[25]](_0x7642xb[_0xf3c1[15]][_0xf3c1[14]](),_0xf3c1[16],_0x7642x12[_0xf3c1[17]][_0xf3c1[14]](),_0xf3c1[18],_0x7642x12[_0xf3c1[19]],_0xf3c1[20],_0x7642xb[_0xf3c1[21]],_0xf3c1[60])}}else {logger[_0xf3c1[25]](_0x7642xb[_0xf3c1[15]][_0xf3c1[14]](),_0xf3c1[16],_0x7642x12[_0xf3c1[17]][_0xf3c1[14]](),_0xf3c1[18],_0x7642x12[_0xf3c1[19]],_0xf3c1[20],_0x7642xb[_0xf3c1[21]],_0xf3c1[60])}}else {logger[_0xf3c1[25]](_0x7642xb[_0xf3c1[15]][_0xf3c1[14]](),_0xf3c1[16],_0x7642x12[_0xf3c1[17]][_0xf3c1[14]](),_0xf3c1[18],_0x7642x12[_0xf3c1[19]],_0xf3c1[20],_0x7642xb[_0xf3c1[21]],_0xf3c1[60])}})[_0xf3c1[45]](function(_0x7642x24){if(_0x7642x24&& _0x7642x24[_0xf3c1[33]]){for(var _0x7642x1e=0;_0x7642x1e< _0x7642x24[_0xf3c1[33]];_0x7642x1e++){var _0x7642x1b=_0x7642x24[_0x7642x1e][_0xf3c1[51]]({plain:true});_0x7642xd[_0xf3c1[50]](util[_0xf3c1[40]](_0xf3c1[48],_0x7642x1b[_0xf3c1[49]]))[_0xf3c1[47]](_0xf3c1[46],_0x7642x1b)}};_0x7642x10= setTimeout(function(){_0x7642x13+= _0x7642x12[_0xf3c1[32]];_0x7642x23()},_0x7642x18* 1000)})[_0xf3c1[44]](function(_0x7642x1a){logger[_0xf3c1[42]](_0x7642xb[_0xf3c1[15]][_0xf3c1[14]](),_0xf3c1[16],_0x7642x12[_0xf3c1[17]][_0xf3c1[14]](),_0xf3c1[18],_0x7642x12[_0xf3c1[19]],_0xf3c1[20],_0x7642xb[_0xf3c1[21]],_0xf3c1[41]);logger[_0xf3c1[42]](_0x7642x1a[_0xf3c1[43]]);_0x7642xe(_0x7642x1a)})}else {return Session[_0xf3c1[66]]({leaveAt:moment()[_0xf3c1[40]](_0xf3c1[57]),timeout:true},{where:{uniqueid:_0x7642xb[_0xf3c1[21]],leaveAt:null},individualHooks:true})[_0xf3c1[45]](function(_0x7642x21){if(_0x7642x21&& _0x7642x21[_0xf3c1[33]]&& _0x7642x21[1][_0xf3c1[33]]){for(var _0x7642x1e=0;_0x7642x1e< _0x7642x21[1][_0xf3c1[33]];_0x7642x1e++){var _0x7642x22=_0x7642x21[1][_0x7642x1e][_0xf3c1[51]]({plain:true});_0x7642xd[_0xf3c1[50]](_0xf3c1[63])[_0xf3c1[47]](_0xf3c1[62],_0x7642x22);_0x7642xd[_0xf3c1[50]](_0xf3c1[64])[_0xf3c1[47]](_0xf3c1[62],_0x7642x22)}};logger[_0xf3c1[25]](_0x7642xb[_0xf3c1[15]][_0xf3c1[14]](),_0xf3c1[16],_0x7642x12[_0xf3c1[17]][_0xf3c1[14]](),_0xf3c1[18],_0x7642x12[_0xf3c1[19]],_0xf3c1[20],_0x7642xb[_0xf3c1[21]],_0xf3c1[65]);clearTimeout(_0x7642x10);_0x7642xe()})[_0xf3c1[44]](function(_0x7642x1a){logger[_0xf3c1[42]](_0x7642xb[_0xf3c1[15]][_0xf3c1[14]](),_0xf3c1[16],_0x7642x12[_0xf3c1[17]][_0xf3c1[14]](),_0xf3c1[18],_0x7642x12[_0xf3c1[19]],_0xf3c1[20],_0x7642xb[_0xf3c1[21]],_0xf3c1[41]);logger[_0xf3c1[42]](_0x7642x1a[_0xf3c1[43]]);_0x7642xe(_0x7642x1a)})}}return Queue[_0xf3c1[74]](_0x7642xa.SmsQueueId,{attributes:[_0xf3c1[26],_0xf3c1[17],_0xf3c1[32],_0xf3c1[19],_0xf3c1[73]],include:[{model:Agent,attributes:[_0xf3c1[26]],raw:true}]})[_0xf3c1[45]](function(_0x7642x25){_0x7642x12= _0x7642x25[_0xf3c1[51]]({plain:true});logger[_0xf3c1[25]](_0x7642xb[_0xf3c1[15]][_0xf3c1[14]](),_0xf3c1[16],_0x7642x12[_0xf3c1[17]][_0xf3c1[14]](),_0xf3c1[18],_0x7642x12[_0xf3c1[19]],_0xf3c1[20],_0x7642xb[_0xf3c1[21]],_0xf3c1[83],_0x7642xa[_0xf3c1[32]],_0xf3c1[84]);return Session[_0xf3c1[59]](_[_0xf3c1[58]](_0x7642xb,{timeslot:_0x7642xa[_0xf3c1[32]],application:_0xf3c1[56],queue:_0x7642x25[_0xf3c1[26]],queuename:_0x7642x25[_0xf3c1[17]],calledAt:moment()[_0xf3c1[40]](_0xf3c1[57]),joinAt:moment()[_0xf3c1[40]](_0xf3c1[57]),membername:null,memberid:null}))})[_0xf3c1[45]](function(_0x7642x22){_0x7642xd[_0xf3c1[50]](_0xf3c1[63])[_0xf3c1[47]](_0xf3c1[62],_0x7642x22);_0x7642xd[_0xf3c1[50]](_0xf3c1[64])[_0xf3c1[47]](_0xf3c1[62],_0x7642x22);return Room[_0xf3c1[74]](_0x7642xb[_0xf3c1[82]])})[_0xf3c1[45]](function(_0x7642x28){if(_0x7642x28){return _0x7642x28[_0xf3c1[66]]({waiting:true})}})[_0xf3c1[45]](function(_0x7642x28){if(_0x7642x28){_0x7642xd[_0xf3c1[47]](_0xf3c1[81],_0x7642x28[_0xf3c1[51]]({plain:true}))}})[_0xf3c1[45]](function(_0x7642x28){switch(_0x7642x12[_0xf3c1[19]]){case _0xf3c1[75]:_0x7642x23();break;case _0xf3c1[79]:_0x7642x11= _[_0xf3c1[78]](_0x7642x12.Users,[function(_0x7642x29){return _0x7642x29[_0xf3c1[77]][_0xf3c1[76]]|| 0}]);_0x7642x17();break;case _0xf3c1[80]:_0x7642x11= _[_0xf3c1[78]](_0x7642x12.Users,[function(_0x7642x29){return _0x7642x29[_0xf3c1[77]][_0xf3c1[76]]|| 0}]);_0x7642x17();break;default:}})[_0xf3c1[44]](function(_0x7642x1a){logger[_0xf3c1[42]](_0x7642xb[_0xf3c1[15]][_0xf3c1[14]](),_0xf3c1[16],_0x7642x12[_0xf3c1[17]][_0xf3c1[14]](),_0xf3c1[18],_0x7642x12[_0xf3c1[19]],_0xf3c1[20],_0x7642xb[_0xf3c1[21]],_0xf3c1[41]);logger[_0xf3c1[42]](_0x7642x1a[_0xf3c1[43]]);_0x7642xe(_0x7642x1a)})}
\ No newline at end of file