Built motion from commit 27af9f03b.|1.0.28
[motion.git] / server / config / ami / db / voiceAgentReport.js
index 8cba3f5..093c21a 100644 (file)
@@ -1 +1 @@
-var _0x5e26=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x20\x2D\x20\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x63\x61\x6C\x6C\x65\x64","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x63\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x20\x2D\x20\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x74\x68\x65\x6E","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x20\x2D\x20\x61\x6E\x73\x77\x65\x72\x65\x64\x5F\x65\x6C\x73\x65\x77\x68\x65\x72\x65","\x61\x6E\x73\x77\x65\x72\x65\x64\x5F\x65\x6C\x73\x65\x77\x68\x65\x72\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x20\x2D\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x72\x65\x61\x73\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x20\x2D\x20\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x72\x65\x6A\x65\x63\x74\x65\x64","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x20\x2D\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x75\x70\x64\x61\x74\x65"];_0x5e26[0];var BPromise=require(_0x5e26[1]);var moment=require(_0x5e26[2]);var _=require(_0x5e26[3]);var ReportAgent=require(_0x5e26[5])[_0x5e26[4]];module[_0x5e26[6]]= function(){return {agentcalled:function(_0x81dcx5){return function(_0x81dcx6){return ReportAgent[_0x5e26[14]](_[_0x5e26[13]](_0x81dcx5,{lastevent:_0x5e26[10],agentcalledAt:moment()[_0x5e26[12]](_0x5e26[11])}))[_0x5e26[9]](function(_0x81dcx7){console[_0x5e26[8]](_0x5e26[7],_0x81dcx7)})}},agentconnect:function(_0x81dcx5){return function(_0x81dcx6){return ReportAgent[_0x5e26[22]]({where:{uniqueid:_0x81dcx5[_0x5e26[20]],destuniqueid:_0x81dcx5[_0x5e26[21]]}})[_0x5e26[19]](function(_0x81dcx8){if(_0x81dcx8){return _0x81dcx8[_0x5e26[18]]({lastevent:_0x5e26[16],agentconnectAt:moment()[_0x5e26[12]](_0x5e26[11]),holdtime:_0x81dcx5[_0x5e26[17]]})}})[_0x5e26[9]](function(_0x81dcx7){console[_0x5e26[8]](_0x5e26[15],_0x81dcx7)})}},answered_elsewhere:function(_0x81dcx5){return function(_0x81dcx6){return ReportAgent[_0x5e26[22]]({where:{uniqueid:_0x81dcx5[_0x5e26[20]],destuniqueid:{$ne:_0x81dcx5[_0x5e26[21]]},reason:null}})[_0x5e26[19]](function(_0x81dcx8){if(_0x81dcx8){return _0x81dcx8[_0x5e26[18]]({lastevent:_0x5e26[24],agentringnoanswer:true,agentringnoanswerAt:moment()[_0x5e26[12]](_0x5e26[11]),reason:_0x5e26[24],answeredelsewheredestinationuniqueid:_0x81dcx5[_0x5e26[21]],answeredelsewheremembername:_0x81dcx5[_0x5e26[25]]})}})[_0x5e26[9]](function(_0x81dcx7){console[_0x5e26[8]](_0x5e26[23],_0x81dcx7)})}},agentcomplete:function(_0x81dcx5){return function(_0x81dcx6){return ReportAgent[_0x5e26[22]]({where:{uniqueid:_0x81dcx5[_0x5e26[20]],destuniqueid:_0x81dcx5[_0x5e26[21]]}})[_0x5e26[19]](function(_0x81dcx8){if(_0x81dcx8){return _0x81dcx8[_0x5e26[18]]({lastevent:_0x5e26[27],agentcomplete:true,agentcompleteAt:moment()[_0x5e26[12]](_0x5e26[11]),talktime:_0x81dcx5[_0x5e26[28]],reason:_0x81dcx5[_0x5e26[29]]})}})[_0x5e26[9]](function(_0x81dcx7){console[_0x5e26[8]](_0x5e26[26],_0x81dcx7)})}},agentringnoanswer:function(_0x81dcx5){return function(_0x81dcx6){return ReportAgent[_0x5e26[22]]({where:{uniqueid:_0x81dcx5[_0x5e26[20]],destuniqueid:_0x81dcx5[_0x5e26[21]]}})[_0x5e26[19]](function(_0x81dcx8){if(_0x81dcx8){return _0x81dcx8[_0x5e26[18]]({lastevent:_0x5e26[31],agentringnoanswer:true,agentringnoanswerAt:moment()[_0x5e26[12]](_0x5e26[11]),reason:_0x5e26[31]})}})[_0x5e26[9]](function(_0x81dcx7){console[_0x5e26[8]](_0x5e26[30],_0x81dcx7)})}},queuecallerabandon:function(_0x81dcx5){return function(_0x81dcx6){return ReportAgent[_0x5e26[34]]({lastevent:_0x5e26[33],agentringnoanswer:true,agentringnoanswerAt:moment()[_0x5e26[12]](_0x5e26[11]),reason:_0x5e26[33]},{where:{uniqueid:_0x81dcx5[_0x5e26[20]],reason:null},individualHooks:true})[_0x5e26[9]](function(_0x81dcx7){console[_0x5e26[8]](_0x5e26[32],_0x81dcx7)})}}}}
\ No newline at end of file
+var _0x73e5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x20\x2D\x20\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x63\x61\x6C\x6C\x65\x64","\x6E\x6F\x77","\x6D\x65\x72\x67\x65","\x63\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x20\x2D\x20\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x74\x68\x65\x6E","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x20\x2D\x20\x61\x6E\x73\x77\x65\x72\x65\x64\x5F\x65\x6C\x73\x65\x77\x68\x65\x72\x65","\x61\x6E\x73\x77\x65\x72\x65\x64\x5F\x65\x6C\x73\x65\x77\x68\x65\x72\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x75\x70\x64\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x20\x2D\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x72\x65\x61\x73\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x20\x2D\x20\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x20\x2D\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x72\x65\x61\x73\x6F\x6E"];_0x73e5[0];var BPromise=require(_0x73e5[1]);var moment=require(_0x73e5[2]);var _=require(_0x73e5[3]);var ReportAgent=require(_0x73e5[5])[_0x73e5[4]];var logger=require(_0x73e5[7])(_0x73e5[6]);module[_0x73e5[8]]= function(){return {agentcalled:function(_0xd27fx6){return function(_0xd27fx7){return ReportAgent[_0x73e5[15]](_[_0x73e5[14]](_0xd27fx6,{lastevent:_0x73e5[12],agentcalledAt:_0xd27fx6[_0x73e5[13]]}))[_0x73e5[11]](function(_0xd27fx8){logger[_0x73e5[10]](_0x73e5[9],_0xd27fx8)})}},agentconnect:function(_0xd27fx6){return function(_0xd27fx7){return ReportAgent[_0x73e5[23]]({where:{uniqueid:_0xd27fx6[_0x73e5[21]],destuniqueid:_0xd27fx6[_0x73e5[22]]}})[_0x73e5[20]](function(_0xd27fx9){if(_0xd27fx9){return _0xd27fx9[_0x73e5[19]]({lastevent:_0x73e5[17],agentconnectAt:_0xd27fx6[_0x73e5[13]],holdtime:_0xd27fx6[_0x73e5[18]]})}})[_0x73e5[11]](function(_0xd27fx8){logger[_0x73e5[10]](_0x73e5[16],_0xd27fx8)})}},answered_elsewhere:function(_0xd27fx6){return function(_0xd27fx7){return ReportAgent[_0x73e5[27]]({lastevent:_0x73e5[25],agentringnoanswer:true,agentringnoanswerAt:_0xd27fx6[_0x73e5[13]],reason:_0x73e5[25],answeredelsewheredestinationuniqueid:_0xd27fx6[_0x73e5[22]],answeredelsewheremembername:_0xd27fx6[_0x73e5[26]]},{where:{uniqueid:_0xd27fx6[_0x73e5[21]],destuniqueid:{$ne:_0xd27fx6[_0x73e5[22]]},reason:null}})[_0x73e5[11]](function(_0xd27fx8){logger[_0x73e5[10]](_0x73e5[24],_0xd27fx8)})}},agentcomplete:function(_0xd27fx6){return function(_0xd27fx7){return ReportAgent[_0x73e5[23]]({where:{uniqueid:_0xd27fx6[_0x73e5[21]],destuniqueid:_0xd27fx6[_0x73e5[22]]}})[_0x73e5[20]](function(_0xd27fx9){if(_0xd27fx9){return _0xd27fx9[_0x73e5[19]]({lastevent:_0x73e5[29],agentcomplete:true,agentcompleteAt:_0xd27fx6[_0x73e5[13]],talktime:_0xd27fx6[_0x73e5[30]],reason:_0xd27fx6[_0x73e5[31]]})}})[_0x73e5[11]](function(_0xd27fx8){logger[_0x73e5[10]](_0x73e5[28],_0xd27fx8)})}},agentringnoanswer:function(_0xd27fx6){return function(_0xd27fx7){return ReportAgent[_0x73e5[23]]({where:{uniqueid:_0xd27fx6[_0x73e5[21]],destuniqueid:_0xd27fx6[_0x73e5[22]]}})[_0x73e5[20]](function(_0xd27fx9){if(_0xd27fx9){return _0xd27fx9[_0x73e5[19]]({lastevent:_0xd27fx6[_0x73e5[33]],reason:_0xd27fx6[_0x73e5[33]],agentringnoanswer:true,agentringnoanswerAt:_0xd27fx6[_0x73e5[13]]})}})[_0x73e5[11]](function(_0xd27fx8){logger[_0x73e5[10]](_0x73e5[32],_0xd27fx8)})}},queuecallerabandon:function(_0xd27fx6){return function(_0xd27fx7){return ReportAgent[_0x73e5[27]]({lastevent:_0x73e5[35],agentringnoanswer:true,agentringnoanswerAt:_0xd27fx6[_0x73e5[13]],reason:_0x73e5[35]},{where:{uniqueid:_0xd27fx6[_0x73e5[21]],reason:null},individualHooks:true})[_0x73e5[20]](function(_0xd27fxa){return {reportAgent:_0xd27fxa,reportQueue:_0xd27fx7}})[_0x73e5[11]](function(_0xd27fx8){logger[_0x73e5[10]](_0x73e5[34],_0xd27fx8)})}},queuecallerunmanaged:function(_0xd27fx6){return function(_0xd27fx7){return ReportAgent[_0x73e5[27]]({lastevent:_0x73e5[36],agentringnoanswer:true,agentringnoanswerAt:_0xd27fx6[_0x73e5[13]],reason:_0xd27fx6[_0x73e5[37]]},{where:{uniqueid:_0xd27fx6[_0x73e5[21]],reason:null},individualHooks:true})[_0x73e5[11]](function(_0xd27fx8){logger[_0x73e5[10]](_0x73e5[34],_0xd27fx8)})}}}}
\ No newline at end of file