c3823b1b65ef56288bbc10992b334e140cd0b0db
[motion.git] / server / config / ami / db / voiceDialReport.js
1 var _0x1f2f=["\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","\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","\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","\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","\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","\x6C\x6F\x67","\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","\x76\x61\x6C\x75\x65","\x63\x72\x65\x61\x74\x65"];_0x1f2f[0];var BPromise=require(_0x1f2f[1]);var moment=require(_0x1f2f[2]);var _=require(_0x1f2f[3]);var ReportDial=require(_0x1f2f[5])[_0x1f2f[4]];module[_0x1f2f[6]]= function(){return {dialbegin:function(_0xdf07x5){return function(_0xdf07x6){return ReportDial[_0x1f2f[17]]({where:{uniqueid:_0xdf07x5[_0x1f2f[16]]}})[_0x1f2f[15]](function(_0xdf07x8){if(_0xdf07x8){return _0xdf07x8[_0x1f2f[14]](_[_0x1f2f[13]](_0xdf07x5,{starttime:moment()[_0x1f2f[11]](_0x1f2f[10]),lastevent:_0x1f2f[12]}))}})[_0x1f2f[9]](function(_0xdf07x7){console[_0x1f2f[8]](_0x1f2f[7],_0xdf07x7)})}},dialend:function(_0xdf07x5){return function(_0xdf07x6){return ReportDial[_0x1f2f[17]]({where:{uniqueid:_0xdf07x5[_0x1f2f[16]],linkedid:_0xdf07x5[_0x1f2f[23]],destuniqueid:_0xdf07x5[_0x1f2f[24]],destlinkedid:_0xdf07x5[_0x1f2f[25]]}})[_0x1f2f[15]](function(_0xdf07x8){if(_0xdf07x8){return _0xdf07x8[_0x1f2f[14]]({dialstatus:_0xdf07x5[_0x1f2f[19]],lastevent:(_0xdf07x5[_0x1f2f[19]]=== _0x1f2f[20])?_0x1f2f[21]:_0x1f2f[22],answertime:(_0xdf07x5[_0x1f2f[19]]=== _0x1f2f[20])?moment()[_0x1f2f[11]](_0x1f2f[10]):null})}})[_0x1f2f[9]](function(_0xdf07x7){console[_0x1f2f[8]](_0x1f2f[18],_0xdf07x7)})}},hangup:function(_0xdf07x5){return function(_0xdf07x6){return ReportDial[_0x1f2f[17]]({where:{uniqueid:_0xdf07x5[_0x1f2f[16]],linkedid:_0xdf07x5[_0x1f2f[23]]}})[_0x1f2f[15]](function(_0xdf07x8){if(_0xdf07x8){return _0xdf07x8[_0x1f2f[14]]({endtime:moment()[_0x1f2f[11]](_0x1f2f[10]),lastevent:_0x1f2f[22]})}})[_0x1f2f[9]](function(_0xdf07x7){console[_0x1f2f[27]](_0x1f2f[26],_0xdf07x7)})}},outboundrouteid:function(_0xdf07x5){return function(_0xdf07x6){if(!_0xdf07x5[_0x1f2f[30]][_0x1f2f[29]](_0x1f2f[28])){return BPromise[_0x1f2f[31]]()};return ReportDial[_0x1f2f[34]]({uniqueid:_0xdf07x5[_0x1f2f[16]],routeId:_0xdf07x5[_0x1f2f[33]]},{raw:true})[_0x1f2f[15]](function(){console[_0x1f2f[27]](_0x1f2f[32],_0xdf07x5[_0x1f2f[16]])})[_0x1f2f[9]](function(_0xdf07x7){console[_0x1f2f[8]](_0x1f2f[32],_0xdf07x7)})}}}}