Built motion from commit a11024eac.|1.0.35
[motion.git] / server / config / forked_routing / sms / queue.js
index 1f09dbd..c0f6a6c 100644 (file)
@@ -1 +1 @@
-var _0xdfcb=["\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"];_0xdfcb[0];var _=require(_0xdfcb[1]);var util=require(_0xdfcb[2]);var moment=require(_0xdfcb[3]);var Agent=require(_0xdfcb[5])[_0xdfcb[4]];var Room=require(_0xdfcb[5])[_0xdfcb[6]];var Queue=require(_0xdfcb[5])[_0xdfcb[7]];var Report=require(_0xdfcb[5])[_0xdfcb[8]];var Session=require(_0xdfcb[5])[_0xdfcb[9]];module[_0xdfcb[10]]= function(_0xec03x9,_0xec03xa,_0xec03xb,_0xec03xc,_0xec03xd){var _0xec03xe=[];var _0xec03xf;var _0xec03x10;var _0xec03x11;var _0xec03x12=0;process[_0xdfcb[28]](_0xdfcb[11],function(_0xec03xb){switch(_0xec03xb[_0xdfcb[27]]){case _0xdfcb[26]:console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[20],_0xec03xb[_0xdfcb[21]],_0xdfcb[22]);_0xec03xe[_0xdfcb[25]]({id:_0xec03xb[_0xdfcb[24]]});break;default:}});function _0xec03x13(_0xec03x14){var _0xec03x15=_[_0xdfcb[29]](_0xec03xe,{id:_0xec03x14[_0xdfcb[24]]});return _0xec03x15?true:false}function _0xec03x16(){var _0xec03x17=((_0xec03x9[_0xdfcb[30]]- _0xec03x12)> _0xec03x11[_0xdfcb[30]])?_0xec03x11[_0xdfcb[30]]:(_0xec03x9[_0xdfcb[30]]- _0xec03x12);if(_0xec03x17> 0){if(_0xec03x10[_0xdfcb[31]]){var _0xec03x18={where:{id:{$in:_[_0xdfcb[32]](_0xec03x10,_0xdfcb[24])},online:true,smsPause:false},include:[{model:Room,attributes:[_0xdfcb[24]],raw:true}],attributes:[_0xdfcb[24],_0xdfcb[15],_0xdfcb[33],_0xdfcb[34],_0xdfcb[35]],order:[[{raw:util[_0xdfcb[38]](_0xdfcb[36],_[_0xdfcb[32]](_0xec03x10,_0xdfcb[24])[_0xdfcb[37]]())}]]};Agent[_0xdfcb[58]](_0xec03x18)[_0xdfcb[42]](function(_0xec03x1b){if(_0xec03x1b[_0xdfcb[31]]){var _0xec03x1c;for(var _0xec03x1d=0;_0xec03x1d< _0xec03x1b[_0xdfcb[31]];_0xec03x1d++){var _0xec03x14=_0xec03x1b[_0xec03x1d][_0xdfcb[48]]({plain:true});if(!_0xec03x13(_0xec03x14)){_0xec03x1c= _0xec03x14;break}};if(_0xec03x1c){console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[49],_0xec03x1c[_0xdfcb[24]],_0xec03x1c[_0xdfcb[15]]);var _0xec03x1e=_[_0xdfcb[50]](_0xec03x10,{"\x69\x64":_0xec03x1c[_0xdfcb[24]]});if(_0xec03x1e>= 0){var _0xec03x1f=_0xec03x10[_0xdfcb[51]](_0xec03x1e,1);if(_0xec03x1f&& _0xec03x1f[_0xdfcb[31]]){_0xec03x10[_0xdfcb[25]](_[_0xdfcb[52]](_0xec03x1f))}};return Report[_0xdfcb[56]](_[_0xdfcb[55]](_0xec03xa,{timeslot:_0xec03x17,application:_0xdfcb[53],membername:_0xec03x1c[_0xdfcb[15]],memberid:_0xec03x1c[_0xdfcb[24]],queue:_0xec03x11[_0xdfcb[24]],queuename:_0xec03x11[_0xdfcb[15]],calledAt:moment()[_0xdfcb[38]](_0xdfcb[54])}))};console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[57]);return}else {console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[57]);return}})[_0xdfcb[42]](function(_0xec03x1a){if(_0xec03x1a){_0xec03xc[_0xdfcb[47]](util[_0xdfcb[38]](_0xdfcb[45],_0xec03x1a[_0xdfcb[46]]))[_0xdfcb[44]](_0xdfcb[43],_0xec03x1a)}})[_0xdfcb[42]](function(){_0xec03xf= setTimeout(function(){_0xec03x12+= _0xec03x11[_0xdfcb[30]];_0xec03x16()},_0xec03x17* 1000)})[_0xdfcb[41]](function(_0xec03x19){console[_0xdfcb[40]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[39]);_0xec03xd(_0xec03x19)})}else {console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[57]);_0xec03xf= setTimeout(function(){_0xec03x12+= _0xec03x11[_0xdfcb[30]];_0xec03x16()},_0xec03x17* 1000)}}else {return Session[_0xdfcb[63]]({leaveAt:moment()[_0xdfcb[38]](_0xdfcb[54]),timeout:true},{where:{uniqueid:_0xec03xa[_0xdfcb[19]],leaveAt:null},individualHooks:true})[_0xdfcb[42]](function(_0xec03x20){if(_0xec03x20&& _0xec03x20[_0xdfcb[31]]&& _0xec03x20[1][_0xdfcb[31]]){for(var _0xec03x1d=0;_0xec03x1d< _0xec03x20[1][_0xdfcb[31]];_0xec03x1d++){var _0xec03x21=_0xec03x20[1][_0xec03x1d][_0xdfcb[48]]({plain:true});_0xec03xc[_0xdfcb[47]](_0xdfcb[60])[_0xdfcb[44]](_0xdfcb[59],_0xec03x21);_0xec03xc[_0xdfcb[47]](_0xdfcb[61])[_0xdfcb[44]](_0xdfcb[59],_0xec03x21)}};console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[62]);clearTimeout(_0xec03xf);_0xec03xd()})[_0xdfcb[41]](function(_0xec03x19){console[_0xdfcb[40]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[39]);_0xec03xd(_0xec03x19)})}}function _0xec03x22(){var _0xec03x17=((_0xec03x9[_0xdfcb[30]]- _0xec03x12)> _0xec03x11[_0xdfcb[30]])?_0xec03x11[_0xdfcb[30]]:(_0xec03x9[_0xdfcb[30]]- _0xec03x12);if(_0xec03x17> 0){Queue[_0xdfcb[71]](_0xec03x9.SmsQueueId,{attributes:[_0xdfcb[24],_0xdfcb[15],_0xdfcb[30],_0xdfcb[17],_0xdfcb[70]],include:[{model:Agent,where:{online:true,smsPause:false},attributes:[_0xdfcb[24],_0xdfcb[15],_0xdfcb[33],_0xdfcb[34],_0xdfcb[35]],raw:true}]})[_0xdfcb[42]](function(_0xec03x24){if(_0xec03x24){var _0xec03x1b=_[_0xdfcb[66]](_[_0xdfcb[65]](_0xec03x24.Users,_0xdfcb[64]));if(_0xec03x1b&& _0xec03x1b[_0xdfcb[31]]){var _0xec03x25;for(var _0xec03x1d=0;_0xec03x1d< _0xec03x1b[_0xdfcb[31]];_0xec03x1d++){_[_0xdfcb[67]](_0xec03x1b[_0xec03x1d],function(_0xec03x14){return _0xec03x13(_0xec03x14)});if(_0xec03x1b[_0xec03x1d][_0xdfcb[31]]){_0xec03x25= _0xec03x1b[_0xec03x1d];break}};if(_0xec03x25&& _0xec03x25[_0xdfcb[31]]){var _0xec03x26=_[_0xdfcb[32]](_0xec03x25,function(_0xec03x14){return _[_0xdfcb[68]](_[_0xdfcb[55]](_0xec03xa,{timeslot:_0xec03x17,application:_0xdfcb[53],membername:_0xec03x14[_0xdfcb[15]],memberid:_0xec03x14[_0xdfcb[24]],queue:_0xec03x11[_0xdfcb[24]],queuename:_0xec03x11[_0xdfcb[15]],calledAt:moment()[_0xdfcb[38]](_0xdfcb[54])}))});return Report[_0xdfcb[69]](_0xec03x26,{individualHooks:true})}else {console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[57])}}else {console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[57])}}else {console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[57])}})[_0xdfcb[42]](function(_0xec03x23){if(_0xec03x23&& _0xec03x23[_0xdfcb[31]]){for(var _0xec03x1d=0;_0xec03x1d< _0xec03x23[_0xdfcb[31]];_0xec03x1d++){var _0xec03x1a=_0xec03x23[_0xec03x1d][_0xdfcb[48]]({plain:true});_0xec03xc[_0xdfcb[47]](util[_0xdfcb[38]](_0xdfcb[45],_0xec03x1a[_0xdfcb[46]]))[_0xdfcb[44]](_0xdfcb[43],_0xec03x1a)}};_0xec03xf= setTimeout(function(){_0xec03x12+= _0xec03x11[_0xdfcb[30]];_0xec03x22()},_0xec03x17* 1000)})[_0xdfcb[41]](function(_0xec03x19){console[_0xdfcb[40]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[39]);_0xec03xd(_0xec03x19)})}else {return Session[_0xdfcb[63]]({leaveAt:moment()[_0xdfcb[38]](_0xdfcb[54]),timeout:true},{where:{uniqueid:_0xec03xa[_0xdfcb[19]],leaveAt:null},individualHooks:true})[_0xdfcb[42]](function(_0xec03x20){if(_0xec03x20&& _0xec03x20[_0xdfcb[31]]&& _0xec03x20[1][_0xdfcb[31]]){for(var _0xec03x1d=0;_0xec03x1d< _0xec03x20[1][_0xdfcb[31]];_0xec03x1d++){var _0xec03x21=_0xec03x20[1][_0xec03x1d][_0xdfcb[48]]({plain:true});_0xec03xc[_0xdfcb[47]](_0xdfcb[60])[_0xdfcb[44]](_0xdfcb[59],_0xec03x21);_0xec03xc[_0xdfcb[47]](_0xdfcb[61])[_0xdfcb[44]](_0xdfcb[59],_0xec03x21)}};console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[62]);clearTimeout(_0xec03xf);_0xec03xd()})[_0xdfcb[41]](function(_0xec03x19){console[_0xdfcb[40]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[39]);_0xec03xd(_0xec03x19)})}}return Queue[_0xdfcb[71]](_0xec03x9.SmsQueueId,{attributes:[_0xdfcb[24],_0xdfcb[15],_0xdfcb[30],_0xdfcb[17],_0xdfcb[70]],include:[{model:Agent,attributes:[_0xdfcb[24]],raw:true}]})[_0xdfcb[42]](function(_0xec03x24){_0xec03x11= _0xec03x24[_0xdfcb[48]]({plain:true});console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[80],_0xec03x9[_0xdfcb[30]],_0xdfcb[81]);return Session[_0xdfcb[56]](_[_0xdfcb[55]](_0xec03xa,{timeslot:_0xec03x9[_0xdfcb[30]],application:_0xdfcb[53],queue:_0xec03x24[_0xdfcb[24]],queuename:_0xec03x24[_0xdfcb[15]],calledAt:moment()[_0xdfcb[38]](_0xdfcb[54]),joinAt:moment()[_0xdfcb[38]](_0xdfcb[54]),membername:null,memberid:null}))})[_0xdfcb[42]](function(_0xec03x21){_0xec03xc[_0xdfcb[47]](_0xdfcb[60])[_0xdfcb[44]](_0xdfcb[59],_0xec03x21);_0xec03xc[_0xdfcb[47]](_0xdfcb[61])[_0xdfcb[44]](_0xdfcb[59],_0xec03x21);return Room[_0xdfcb[71]](_0xec03xa[_0xdfcb[79]])})[_0xdfcb[42]](function(_0xec03x27){if(_0xec03x27){return _0xec03x27[_0xdfcb[63]]({waiting:true})}})[_0xdfcb[42]](function(_0xec03x27){if(_0xec03x27){_0xec03xc[_0xdfcb[44]](_0xdfcb[78],_0xec03x27[_0xdfcb[48]]({plain:true}))}})[_0xdfcb[42]](function(_0xec03x27){switch(_0xec03x11[_0xdfcb[17]]){case _0xdfcb[72]:_0xec03x22();break;case _0xdfcb[76]:_0xec03x10= _[_0xdfcb[75]](_0xec03x11.Users,[function(_0xec03x28){return _0xec03x28[_0xdfcb[74]][_0xdfcb[73]]|| 0}]);_0xec03x16();break;case _0xdfcb[77]:_0xec03x10= _[_0xdfcb[75]](_0xec03x11.Users,[function(_0xec03x28){return _0xec03x28[_0xdfcb[74]][_0xdfcb[73]]|| 0}]);_0xec03x16();break;default:}})[_0xdfcb[41]](function(_0xec03x19){console[_0xdfcb[40]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[39]);console[_0xdfcb[40]](_0xec03x19);_0xec03xd(_0xec03x19)})}
\ No newline at end of file
+var _0x34f2=["\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"];_0x34f2[0];var _=require(_0x34f2[1]);var util=require(_0x34f2[2]);var moment=require(_0x34f2[3]);var logger=require(_0x34f2[5])(_0x34f2[4]);var Agent=require(_0x34f2[7])[_0x34f2[6]];var Room=require(_0x34f2[7])[_0x34f2[8]];var Queue=require(_0x34f2[7])[_0x34f2[9]];var Report=require(_0x34f2[7])[_0x34f2[10]];var Session=require(_0x34f2[7])[_0x34f2[11]];module[_0x34f2[12]]= function(_0x420dxa,_0x420dxb,_0x420dxc,_0x420dxd,_0x420dxe){var _0x420dxf=[];var _0x420dx10;var _0x420dx11;var _0x420dx12;var _0x420dx13=0;process[_0x34f2[30]](_0x34f2[13],function(_0x420dxc){switch(_0x420dxc[_0x34f2[29]]){case _0x34f2[28]:logger[_0x34f2[25]](_0x420dxb[_0x34f2[15]][_0x34f2[14]](),_0x34f2[16],_0x420dx12[_0x34f2[17]][_0x34f2[14]](),_0x34f2[18],_0x420dx12[_0x34f2[19]],_0x34f2[20],_0x420dxb[_0x34f2[21]],_0x34f2[22],_0x420dxc[_0x34f2[23]],_0x34f2[24]);_0x420dxf[_0x34f2[27]]({id:_0x420dxc[_0x34f2[26]]});break;default:}});function _0x420dx14(_0x420dx15){var _0x420dx16=_[_0x34f2[31]](_0x420dxf,{id:_0x420dx15[_0x34f2[26]]});return _0x420dx16?true:false}function _0x420dx17(){var _0x420dx18=((_0x420dxa[_0x34f2[32]]- _0x420dx13)> _0x420dx12[_0x34f2[32]])?_0x420dx12[_0x34f2[32]]:(_0x420dxa[_0x34f2[32]]- _0x420dx13);if(_0x420dx18> 0){if(_0x420dx11[_0x34f2[33]]){var _0x420dx19={where:{id:{$in:_[_0x34f2[34]](_0x420dx11,_0x34f2[26])},online:true,smsPause:false},include:[{model:Room,attributes:[_0x34f2[26]],raw:true}],attributes:[_0x34f2[26],_0x34f2[17],_0x34f2[35],_0x34f2[36],_0x34f2[37]],order:[[{raw:util[_0x34f2[40]](_0x34f2[38],_[_0x34f2[34]](_0x420dx11,_0x34f2[26])[_0x34f2[39]]())}]]};Agent[_0x34f2[61]](_0x420dx19)[_0x34f2[45]](function(_0x420dx1c){if(_0x420dx1c[_0x34f2[33]]){var _0x420dx1d;for(var _0x420dx1e=0;_0x420dx1e< _0x420dx1c[_0x34f2[33]];_0x420dx1e++){var _0x420dx15=_0x420dx1c[_0x420dx1e][_0x34f2[51]]({plain:true});if(!_0x420dx14(_0x420dx15)){_0x420dx1d= _0x420dx15;break}};if(_0x420dx1d){logger[_0x34f2[25]](_0x420dxb[_0x34f2[15]][_0x34f2[14]](),_0x34f2[16],_0x420dx12[_0x34f2[17]][_0x34f2[14]](),_0x34f2[18],_0x420dx12[_0x34f2[19]],_0x34f2[20],_0x420dxb[_0x34f2[21]],_0x34f2[52],_0x420dx1d[_0x34f2[26]],_0x420dx1d[_0x34f2[17]]);var _0x420dx1f=_[_0x34f2[53]](_0x420dx11,{"\x69\x64":_0x420dx1d[_0x34f2[26]]});if(_0x420dx1f>= 0){var _0x420dx20=_0x420dx11[_0x34f2[54]](_0x420dx1f,1);if(_0x420dx20&& _0x420dx20[_0x34f2[33]]){_0x420dx11[_0x34f2[27]](_[_0x34f2[55]](_0x420dx20))}};return Report[_0x34f2[59]](_[_0x34f2[58]](_0x420dxb,{timeslot:_0x420dx18,application:_0x34f2[56],membername:_0x420dx1d[_0x34f2[17]],memberid:_0x420dx1d[_0x34f2[26]],queue:_0x420dx12[_0x34f2[26]],queuename:_0x420dx12[_0x34f2[17]],calledAt:moment()[_0x34f2[40]](_0x34f2[57])}))};logger[_0x34f2[25]](_0x420dxb[_0x34f2[15]][_0x34f2[14]](),_0x34f2[16],_0x420dx12[_0x34f2[17]][_0x34f2[14]](),_0x34f2[18],_0x420dx12[_0x34f2[19]],_0x34f2[20],_0x420dxb[_0x34f2[21]],_0x34f2[60]);return}else {logger[_0x34f2[25]](_0x420dxb[_0x34f2[15]][_0x34f2[14]](),_0x34f2[16],_0x420dx12[_0x34f2[17]][_0x34f2[14]](),_0x34f2[18],_0x420dx12[_0x34f2[19]],_0x34f2[20],_0x420dxb[_0x34f2[21]],_0x34f2[60]);return}})[_0x34f2[45]](function(_0x420dx1b){if(_0x420dx1b){_0x420dxd[_0x34f2[50]](util[_0x34f2[40]](_0x34f2[48],_0x420dx1b[_0x34f2[49]]))[_0x34f2[47]](_0x34f2[46],_0x420dx1b)}})[_0x34f2[45]](function(){_0x420dx10= setTimeout(function(){_0x420dx13+= _0x420dx12[_0x34f2[32]];_0x420dx17()},_0x420dx18* 1000)})[_0x34f2[44]](function(_0x420dx1a){logger[_0x34f2[42]](_0x420dxb[_0x34f2[15]][_0x34f2[14]](),_0x34f2[16],_0x420dx12[_0x34f2[17]][_0x34f2[14]](),_0x34f2[18],_0x420dx12[_0x34f2[19]],_0x34f2[20],_0x420dxb[_0x34f2[21]],_0x34f2[41]);logger[_0x34f2[42]](_0x420dx1a[_0x34f2[43]]);_0x420dxe(_0x420dx1a)})}else {logger[_0x34f2[25]](_0x420dxb[_0x34f2[15]][_0x34f2[14]](),_0x34f2[16],_0x420dx12[_0x34f2[17]][_0x34f2[14]](),_0x34f2[18],_0x420dx12[_0x34f2[19]],_0x34f2[20],_0x420dxb[_0x34f2[21]],_0x34f2[60]);_0x420dx10= setTimeout(function(){_0x420dx13+= _0x420dx12[_0x34f2[32]];_0x420dx17()},_0x420dx18* 1000)}}else {return Session[_0x34f2[66]]({leaveAt:moment()[_0x34f2[40]](_0x34f2[57]),timeout:true},{where:{uniqueid:_0x420dxb[_0x34f2[21]],leaveAt:null},individualHooks:true})[_0x34f2[45]](function(_0x420dx21){if(_0x420dx21&& _0x420dx21[_0x34f2[33]]&& _0x420dx21[1][_0x34f2[33]]){for(var _0x420dx1e=0;_0x420dx1e< _0x420dx21[1][_0x34f2[33]];_0x420dx1e++){var _0x420dx22=_0x420dx21[1][_0x420dx1e][_0x34f2[51]]({plain:true});_0x420dxd[_0x34f2[50]](_0x34f2[63])[_0x34f2[47]](_0x34f2[62],_0x420dx22);_0x420dxd[_0x34f2[50]](_0x34f2[64])[_0x34f2[47]](_0x34f2[62],_0x420dx22)}};logger[_0x34f2[25]](_0x420dxb[_0x34f2[15]][_0x34f2[14]](),_0x34f2[16],_0x420dx12[_0x34f2[17]][_0x34f2[14]](),_0x34f2[18],_0x420dx12[_0x34f2[19]],_0x34f2[20],_0x420dxb[_0x34f2[21]],_0x34f2[65]);clearTimeout(_0x420dx10);_0x420dxe()})[_0x34f2[44]](function(_0x420dx1a){logger[_0x34f2[42]](_0x420dxb[_0x34f2[15]][_0x34f2[14]](),_0x34f2[16],_0x420dx12[_0x34f2[17]][_0x34f2[14]](),_0x34f2[18],_0x420dx12[_0x34f2[19]],_0x34f2[20],_0x420dxb[_0x34f2[21]],_0x34f2[41]);logger[_0x34f2[42]](_0x420dx1a[_0x34f2[43]]);_0x420dxe(_0x420dx1a)})}}function _0x420dx23(){var _0x420dx18=((_0x420dxa[_0x34f2[32]]- _0x420dx13)> _0x420dx12[_0x34f2[32]])?_0x420dx12[_0x34f2[32]]:(_0x420dxa[_0x34f2[32]]- _0x420dx13);if(_0x420dx18> 0){Queue[_0x34f2[74]](_0x420dxa.SmsQueueId,{attributes:[_0x34f2[26],_0x34f2[17],_0x34f2[32],_0x34f2[19],_0x34f2[73]],include:[{model:Agent,where:{online:true,smsPause:false},attributes:[_0x34f2[26],_0x34f2[17],_0x34f2[35],_0x34f2[36],_0x34f2[37]],raw:true}]})[_0x34f2[45]](function(_0x420dx25){if(_0x420dx25){var _0x420dx1c=_[_0x34f2[69]](_[_0x34f2[68]](_0x420dx25.Users,_0x34f2[67]));if(_0x420dx1c&& _0x420dx1c[_0x34f2[33]]){var _0x420dx26;for(var _0x420dx1e=0;_0x420dx1e< _0x420dx1c[_0x34f2[33]];_0x420dx1e++){_[_0x34f2[70]](_0x420dx1c[_0x420dx1e],function(_0x420dx15){return _0x420dx14(_0x420dx15)});if(_0x420dx1c[_0x420dx1e][_0x34f2[33]]){_0x420dx26= _0x420dx1c[_0x420dx1e];break}};if(_0x420dx26&& _0x420dx26[_0x34f2[33]]){var _0x420dx27=_[_0x34f2[34]](_0x420dx26,function(_0x420dx15){return _[_0x34f2[71]](_[_0x34f2[58]](_0x420dxb,{timeslot:_0x420dx18,application:_0x34f2[56],membername:_0x420dx15[_0x34f2[17]],memberid:_0x420dx15[_0x34f2[26]],queue:_0x420dx12[_0x34f2[26]],queuename:_0x420dx12[_0x34f2[17]],calledAt:moment()[_0x34f2[40]](_0x34f2[57])}))});return Report[_0x34f2[72]](_0x420dx27,{individualHooks:true})}else {logger[_0x34f2[25]](_0x420dxb[_0x34f2[15]][_0x34f2[14]](),_0x34f2[16],_0x420dx12[_0x34f2[17]][_0x34f2[14]](),_0x34f2[18],_0x420dx12[_0x34f2[19]],_0x34f2[20],_0x420dxb[_0x34f2[21]],_0x34f2[60])}}else {logger[_0x34f2[25]](_0x420dxb[_0x34f2[15]][_0x34f2[14]](),_0x34f2[16],_0x420dx12[_0x34f2[17]][_0x34f2[14]](),_0x34f2[18],_0x420dx12[_0x34f2[19]],_0x34f2[20],_0x420dxb[_0x34f2[21]],_0x34f2[60])}}else {logger[_0x34f2[25]](_0x420dxb[_0x34f2[15]][_0x34f2[14]](),_0x34f2[16],_0x420dx12[_0x34f2[17]][_0x34f2[14]](),_0x34f2[18],_0x420dx12[_0x34f2[19]],_0x34f2[20],_0x420dxb[_0x34f2[21]],_0x34f2[60])}})[_0x34f2[45]](function(_0x420dx24){if(_0x420dx24&& _0x420dx24[_0x34f2[33]]){for(var _0x420dx1e=0;_0x420dx1e< _0x420dx24[_0x34f2[33]];_0x420dx1e++){var _0x420dx1b=_0x420dx24[_0x420dx1e][_0x34f2[51]]({plain:true});_0x420dxd[_0x34f2[50]](util[_0x34f2[40]](_0x34f2[48],_0x420dx1b[_0x34f2[49]]))[_0x34f2[47]](_0x34f2[46],_0x420dx1b)}};_0x420dx10= setTimeout(function(){_0x420dx13+= _0x420dx12[_0x34f2[32]];_0x420dx23()},_0x420dx18* 1000)})[_0x34f2[44]](function(_0x420dx1a){logger[_0x34f2[42]](_0x420dxb[_0x34f2[15]][_0x34f2[14]](),_0x34f2[16],_0x420dx12[_0x34f2[17]][_0x34f2[14]](),_0x34f2[18],_0x420dx12[_0x34f2[19]],_0x34f2[20],_0x420dxb[_0x34f2[21]],_0x34f2[41]);logger[_0x34f2[42]](_0x420dx1a[_0x34f2[43]]);_0x420dxe(_0x420dx1a)})}else {return Session[_0x34f2[66]]({leaveAt:moment()[_0x34f2[40]](_0x34f2[57]),timeout:true},{where:{uniqueid:_0x420dxb[_0x34f2[21]],leaveAt:null},individualHooks:true})[_0x34f2[45]](function(_0x420dx21){if(_0x420dx21&& _0x420dx21[_0x34f2[33]]&& _0x420dx21[1][_0x34f2[33]]){for(var _0x420dx1e=0;_0x420dx1e< _0x420dx21[1][_0x34f2[33]];_0x420dx1e++){var _0x420dx22=_0x420dx21[1][_0x420dx1e][_0x34f2[51]]({plain:true});_0x420dxd[_0x34f2[50]](_0x34f2[63])[_0x34f2[47]](_0x34f2[62],_0x420dx22);_0x420dxd[_0x34f2[50]](_0x34f2[64])[_0x34f2[47]](_0x34f2[62],_0x420dx22)}};logger[_0x34f2[25]](_0x420dxb[_0x34f2[15]][_0x34f2[14]](),_0x34f2[16],_0x420dx12[_0x34f2[17]][_0x34f2[14]](),_0x34f2[18],_0x420dx12[_0x34f2[19]],_0x34f2[20],_0x420dxb[_0x34f2[21]],_0x34f2[65]);clearTimeout(_0x420dx10);_0x420dxe()})[_0x34f2[44]](function(_0x420dx1a){logger[_0x34f2[42]](_0x420dxb[_0x34f2[15]][_0x34f2[14]](),_0x34f2[16],_0x420dx12[_0x34f2[17]][_0x34f2[14]](),_0x34f2[18],_0x420dx12[_0x34f2[19]],_0x34f2[20],_0x420dxb[_0x34f2[21]],_0x34f2[41]);logger[_0x34f2[42]](_0x420dx1a[_0x34f2[43]]);_0x420dxe(_0x420dx1a)})}}return Queue[_0x34f2[74]](_0x420dxa.SmsQueueId,{attributes:[_0x34f2[26],_0x34f2[17],_0x34f2[32],_0x34f2[19],_0x34f2[73]],include:[{model:Agent,attributes:[_0x34f2[26]],raw:true}]})[_0x34f2[45]](function(_0x420dx25){_0x420dx12= _0x420dx25[_0x34f2[51]]({plain:true});logger[_0x34f2[25]](_0x420dxb[_0x34f2[15]][_0x34f2[14]](),_0x34f2[16],_0x420dx12[_0x34f2[17]][_0x34f2[14]](),_0x34f2[18],_0x420dx12[_0x34f2[19]],_0x34f2[20],_0x420dxb[_0x34f2[21]],_0x34f2[83],_0x420dxa[_0x34f2[32]],_0x34f2[84]);return Session[_0x34f2[59]](_[_0x34f2[58]](_0x420dxb,{timeslot:_0x420dxa[_0x34f2[32]],application:_0x34f2[56],queue:_0x420dx25[_0x34f2[26]],queuename:_0x420dx25[_0x34f2[17]],calledAt:moment()[_0x34f2[40]](_0x34f2[57]),joinAt:moment()[_0x34f2[40]](_0x34f2[57]),membername:null,memberid:null}))})[_0x34f2[45]](function(_0x420dx22){_0x420dxd[_0x34f2[50]](_0x34f2[63])[_0x34f2[47]](_0x34f2[62],_0x420dx22);_0x420dxd[_0x34f2[50]](_0x34f2[64])[_0x34f2[47]](_0x34f2[62],_0x420dx22);return Room[_0x34f2[74]](_0x420dxb[_0x34f2[82]])})[_0x34f2[45]](function(_0x420dx28){if(_0x420dx28){return _0x420dx28[_0x34f2[66]]({waiting:true})}})[_0x34f2[45]](function(_0x420dx28){if(_0x420dx28){_0x420dxd[_0x34f2[47]](_0x34f2[81],_0x420dx28[_0x34f2[51]]({plain:true}))}})[_0x34f2[45]](function(_0x420dx28){switch(_0x420dx12[_0x34f2[19]]){case _0x34f2[75]:_0x420dx23();break;case _0x34f2[79]:_0x420dx11= _[_0x34f2[78]](_0x420dx12.Users,[function(_0x420dx29){return _0x420dx29[_0x34f2[77]][_0x34f2[76]]|| 0}]);_0x420dx17();break;case _0x34f2[80]:_0x420dx11= _[_0x34f2[78]](_0x420dx12.Users,[function(_0x420dx29){return _0x420dx29[_0x34f2[77]][_0x34f2[76]]|| 0}]);_0x420dx17();break;default:}})[_0x34f2[44]](function(_0x420dx1a){logger[_0x34f2[42]](_0x420dxb[_0x34f2[15]][_0x34f2[14]](),_0x34f2[16],_0x420dx12[_0x34f2[17]][_0x34f2[14]](),_0x34f2[18],_0x420dx12[_0x34f2[19]],_0x34f2[20],_0x420dxb[_0x34f2[21]],_0x34f2[41]);logger[_0x34f2[42]](_0x420dx1a[_0x34f2[43]]);_0x420dxe(_0x420dx1a)})}
\ No newline at end of file