Built motion from commit b387bb7c7.|1.0.28
[motion.git] / server / config / ami / db / voiceDialReport.js
1 var _0xf660=["\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\x44\x69\x61\x6C","\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\x44\x69\x61\x6C\x20\x2D\x20\x64\x69\x61\x6C\x62\x65\x67\x69\x6E","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x64\x69\x61\x6C\x73\x74\x72\x69\x6E\x67","\x40","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x70\x6C\x69\x74","\x6C\x65\x6E\x67\x74\x68","\x2F","\x6E\x6F\x77","\x63\x61\x6C\x6C\x65\x64","\x6D\x65\x72\x67\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","\x69\x64\x20\x44\x45\x53\x43","\x66\x69\x6E\x64\x4F\x6E\x65","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C\x20\x2D\x20\x64\x69\x61\x6C\x65\x6E\x64","\x64\x69\x61\x6C\x73\x74\x61\x74\x75\x73","\x41\x4E\x53\x57\x45\x52","\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x73\x74\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C\x20\x2D\x20\x68\x61\x6E\x67\x75\x70","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x46\x41\x49\x4C\x45\x44","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x72\x6F\x75\x74\x65\x69\x64","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x76\x61\x72\x69\x61\x62\x6C\x65","\x72\x65\x73\x6F\x6C\x76\x65","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C\x20\x2D\x20\x6F\x75\x74\x62\x6F\x75\x6E\x64\x72\x6F\x75\x74\x65\x69\x64","\x64\x65\x62\x75\x67","\x76\x61\x6C\x75\x65","\x63\x72\x65\x61\x74\x65"];_0xf660[0];var BPromise=require(_0xf660[1]);var moment=require(_0xf660[2]);var _=require(_0xf660[3]);var ReportDial=require(_0xf660[5])[_0xf660[4]];var logger=require(_0xf660[7])(_0xf660[6]);module[_0xf660[8]]= function(){return {dialbegin:function(_0xf61cx6){return function(_0xf61cx7){return ReportDial[_0xf660[27]]({where:{uniqueid:_0xf61cx6[_0xf660[25]]},order:_0xf660[26]})[_0xf660[24]](function(_0xf61cx9){if(_0xf61cx9){var _0xf61cxa=_0xf61cx6[_0xf660[12]];var _0xf61cxb=_0xf61cx6[_0xf660[13]];if(_0xf61cx6[_0xf660[14]]){var _0xf61cxc;if(_0xf61cx6[_0xf660[14]][_0xf660[16]](_0xf660[15])> 0){_0xf61cxc= _0xf61cx6[_0xf660[14]][_0xf660[17]](_0xf660[15]);if(_0xf61cxc[_0xf660[18]]> 1){_0xf61cxa= _0xf61cxc[0];_0xf61cxb= _0xf61cxc[0]}}else {_0xf61cxc= _0xf61cx6[_0xf660[14]][_0xf660[17]](_0xf660[19]);if(_0xf61cxc[_0xf660[18]]> 1){_0xf61cxa= _0xf61cxc[1];_0xf61cxb= _0xf61cxc[1]}}};return _0xf61cx9[_0xf660[23]](_[_0xf660[22]](_0xf61cx6,{starttime:_0xf61cx6[_0xf660[20]],lastevent:_0xf660[21],destcalleridnum:_0xf61cxa,destcalleridname:_0xf61cxb}))}})[_0xf660[11]](function(_0xf61cx8){logger[_0xf660[10]](_0xf660[9],_0xf61cx8)})}},dialend:function(_0xf61cx6){return function(_0xf61cx7){return ReportDial[_0xf660[27]]({where:{uniqueid:_0xf61cx6[_0xf660[25]],linkedid:_0xf61cx6[_0xf660[33]],destuniqueid:_0xf61cx6[_0xf660[34]],destlinkedid:_0xf61cx6[_0xf660[35]]},order:_0xf660[26]})[_0xf660[24]](function(_0xf61cx9){if(_0xf61cx9){return _0xf61cx9[_0xf660[23]]({dialstatus:_0xf61cx6[_0xf660[29]],lastevent:(_0xf61cx6[_0xf660[29]]=== _0xf660[30])?_0xf660[31]:_0xf660[32],answertime:(_0xf61cx6[_0xf660[29]]=== _0xf660[30])?_0xf61cx6[_0xf660[20]]:null})}})[_0xf660[11]](function(_0xf61cx8){logger[_0xf660[10]](_0xf660[28],_0xf61cx8)})}},hangup:function(_0xf61cx6){return function(_0xf61cx7){return ReportDial[_0xf660[27]]({where:{uniqueid:_0xf61cx6[_0xf660[25]]},order:_0xf660[26]})[_0xf660[24]](function(_0xf61cx9){if(_0xf61cx9){var _0xf61cxd={endtime:_0xf61cx6[_0xf660[20]],lastevent:_0xf660[32]};if(!_0xf61cx9[_0xf660[37]]){_0xf61cxd[_0xf660[29]]= _0xf660[38]};return _0xf61cx9[_0xf660[23]](_0xf61cxd)}})[_0xf660[11]](function(_0xf61cx8){logger[_0xf660[10]](_0xf660[36],_0xf61cx8)})}},outboundrouteid:function(_0xf61cx6){return function(_0xf61cx7){if(!_0xf61cx6[_0xf660[41]][_0xf660[40]](_0xf660[39])){return BPromise[_0xf660[42]]()};return ReportDial[_0xf660[46]]({uniqueid:_0xf61cx6[_0xf660[25]],routeId:_0xf61cx6[_0xf660[45]]},{raw:true})[_0xf660[24]](function(){logger[_0xf660[44]](_0xf660[43],_0xf61cx6[_0xf660[25]])})[_0xf660[11]](function(_0xf61cx8){logger[_0xf660[10]](_0xf660[43],_0xf61cx8)})}}}}