Built motion from commit ab065936.|2.0.51
[motion2.git] / server / services / ami / report / voiceDialReport.js
1 var _0xb16c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x61\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72","\x2E\x2E\x2F\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x6C\x6F\x67","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x64\x69\x61\x6C\x62\x65\x67\x69\x6E","\x62\x69\x6E\x64","\x73\x79\x6E\x63\x44\x69\x61\x6C\x42\x65\x67\x69\x6E","\x6F\x6E","\x64\x69\x61\x6C\x65\x6E\x64","\x73\x79\x6E\x63\x44\x69\x61\x6C\x45\x6E\x64","\x76\x61\x72\x73\x65\x74","\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74","\x68\x61\x6E\x67\x75\x70","\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70","\x69\x73\x4E\x6F\x74\x4E\x75\x6C\x6C","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x73\x55\x6E\x64\x65\x66\x69\x6E\x65\x64","\x65\x6D\x69\x74","\x74\x6F","\x75\x6E\x69\x71\x75\x65\x69\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","\x63\x61\x6C\x6C\x65\x64","\x2D","\x6C\x61\x73\x74\x49\x6E\x64\x65\x78\x4F\x66","\x63\x68\x61\x6E\x6E\x65\x6C","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x2F","\x65\x76\x65\x6E\x74","\x70\x72\x69\x76\x69\x6C\x65\x67\x65","\x6F\x6D\x69\x74","\x6D\x65\x72\x67\x65","\x76\x6F\x69\x63\x65\x3A\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x76\x6F\x69\x63\x65\x5F\x6F\x75\x74\x62\x6F\x75\x6E\x64\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x3A\x73\x61\x76\x65","\x63\x75\x73\x74\x6F\x6D\x3A\x64\x69\x61\x6C\x62\x65\x67\x69\x6E","\x5B\x73\x79\x6E\x63\x44\x69\x61\x6C\x42\x65\x67\x69\x6E\x5D\x5B\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x69\x6E\x73\x70\x65\x63\x74","\x65\x72\x72\x6F\x72","\x64\x69\x61\x6C\x73\x74\x61\x74\x75\x73","\x41\x4E\x53\x57\x45\x52","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x75\x73\x74\x6F\x6D\x3A\x64\x69\x61\x6C\x63\x6F\x6E\x6E\x65\x63\x74","\x5B\x73\x79\x6E\x63\x44\x69\x61\x6C\x45\x6E\x64\x5D\x5B\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x76\x61\x6C\x75\x65","\x61\x64\x64\x56\x61\x72\x69\x61\x62\x6C\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x72\x6F\x75\x74\x65\x69\x64","\x5B\x73\x79\x6E\x63\x56\x61\x72\x53\x65\x74\x5D\x5B\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x65\x6E\x64\x74\x69\x6D\x65","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x74\x6F\x74\x61\x6C","\x61\x6E\x73\x77\x65\x72\x65\x64","\x73\x75\x6D\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x73\x75\x6D\x42\x69\x6C\x6C\x61\x62\x6C\x65","\x73\x75\x6D\x44\x75\x72\x61\x74\x69\x6F\x6E","\x63\x75\x73\x74\x6F\x6D\x3A\x76\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74","\x63\x75\x73\x74\x6F\x6D\x3A\x64\x69\x61\x6C\x65\x6E\x64","\x76\x6F\x69\x63\x65\x5F\x6F\x75\x74\x62\x6F\x75\x6E\x64\x3A\x73\x61\x76\x65","\x76\x6F\x69\x63\x65\x5F\x6F\x75\x74\x62\x6F\x75\x6E\x64\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x3A\x72\x65\x6D\x6F\x76\x65","\x5B\x73\x79\x6E\x63\x48\x61\x6E\x67\x75\x70\x5D\x5B\x56\x6F\x69\x63\x65\x44\x69\x61\x6C\x52\x65\x70\x6F\x72\x74\x5D","\x65\x78\x70\x6F\x72\x74\x73"];_0xb16c[0];var _=require(_0xb16c[1]);var moment=require(_0xb16c[2]);var util=require(_0xb16c[3]);var logger=require(_0xb16c[5])(_0xb16c[4]);var ami=require(_0xb16c[6]);var io=require(_0xb16c[8])({host:_0xb16c[7],port:6379});function VoiceDialReport(_0x211fx8){console[_0xb16c[10]](_0xb16c[9]);this[_0xb16c[11]]= _0x211fx8[_0xb16c[12]];this[_0xb16c[13]]= _0x211fx8[_0xb16c[13]];this[_0xb16c[14]]= {};ami[_0xb16c[18]](_0xb16c[15],this[_0xb16c[17]][_0xb16c[16]](this));ami[_0xb16c[18]](_0xb16c[19],this[_0xb16c[20]][_0xb16c[16]](this));ami[_0xb16c[18]](_0xb16c[21],this[_0xb16c[22]][_0xb16c[16]](this));ami[_0xb16c[18]](_0xb16c[23],this[_0xb16c[24]][_0xb16c[16]](this))}VoiceDialReport[_0xb16c[26]][_0xb16c[25]]= function(_0x211fx9){return _0x211fx9!== null&&  !_[_0xb16c[27]](_0x211fx9)};VoiceDialReport[_0xb16c[26]][_0xb16c[28]]= function(_0x211fxa,_0x211fxb,_0x211fx9){io[_0xb16c[29]](_0x211fxa)[_0xb16c[28]](_0x211fxb,_0x211fx9)};VoiceDialReport[_0xb16c[26]][_0xb16c[17]]= function(_0x211fxb){try{if(this[_0xb16c[25]](_0x211fxb)){if(this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]]){_[_0xb16c[42]](this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]],{starttime:moment()[_0xb16c[32]](_0xb16c[31]),lastevent:_0xb16c[33],interface:_0x211fxb[_0xb16c[36]][_0xb16c[37]](0,_0x211fxb[_0xb16c[36]][_0xb16c[35]](_0xb16c[34])),membername:_0x211fxb[_0xb16c[36]][_0xb16c[37]](_0x211fxb[_0xb16c[36]][_0xb16c[35]](_0xb16c[38])+ 1,_0x211fxb[_0xb16c[36]][_0xb16c[35]](_0xb16c[34]))},_[_0xb16c[41]](_0x211fxb,[_0xb16c[39],_0xb16c[40]]));this[_0xb16c[28]](_0xb16c[43],_0xb16c[44],this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]]);ami[_0xb16c[28]](_0xb16c[45],this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]])}}}catch(e){logger[_0xb16c[48]](_0xb16c[46],util[_0xb16c[47]](e,{showHidden:false,depth:null}))}};VoiceDialReport[_0xb16c[26]][_0xb16c[20]]= function(_0x211fxb){try{if(this[_0xb16c[25]](_0x211fxb)){if(this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]]){this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]][_0xb16c[49]]= _0x211fxb[_0xb16c[49]];if(_0x211fxb[_0xb16c[49]]=== _0xb16c[50]){this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]][_0xb16c[51]]= _0x211fxb[_0xb16c[51]];this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]][_0xb16c[52]]= _0x211fxb[_0xb16c[52]];this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]][_0xb16c[53]]= moment()[_0xb16c[32]](_0xb16c[31]);this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]][_0xb16c[54]]= _0xb16c[55];ami[_0xb16c[28]](_0xb16c[56],this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]])};this[_0xb16c[28]](_0xb16c[43],_0xb16c[44],this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]])}}}catch(e){logger[_0xb16c[48]](_0xb16c[57],util[_0xb16c[47]](e,{showHidden:false,depth:null}))}};VoiceDialReport[_0xb16c[26]][_0xb16c[22]]= function(_0x211fxb){try{if(this[_0xb16c[25]](_0x211fxb)){this[_0xb16c[61]](_0x211fxb[_0xb16c[30]],_[_0xb16c[59]](_0x211fxb[_0xb16c[58]])[0],_0x211fxb[_0xb16c[60]]);if(this[_0xb16c[25]](_0x211fxb[_0xb16c[58]])&& this[_0xb16c[25]](_0x211fxb[_0xb16c[58]][_0xb16c[62]])){if(_[_0xb16c[27]](this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]])){this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]]= {routeId:_0x211fxb[_0xb16c[60]],variables:this[_0xb16c[14]][_0x211fxb[_0xb16c[30]]]};this[_0xb16c[28]](_0xb16c[43],_0xb16c[44],this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]])}}}}catch(e){logger[_0xb16c[48]](_0xb16c[63],util[_0xb16c[47]](e,{showHidden:false,depth:null}))}};VoiceDialReport[_0xb16c[26]][_0xb16c[61]]= function(_0x211fxc,_0x211fxd,_0x211fxe){if(_[_0xb16c[27]](this[_0xb16c[14]][_0x211fxc])){this[_0xb16c[14]][_0x211fxc]= {}};this[_0xb16c[14]][_0x211fxc][_0x211fxd]= _0x211fxe};VoiceDialReport[_0xb16c[26]][_0xb16c[24]]= function(_0x211fxb){try{if(this[_0xb16c[25]](_0x211fxb)){if(this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]]){this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]][_0xb16c[64]]= moment()[_0xb16c[32]](_0xb16c[31]);this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]][_0xb16c[54]]= _0xb16c[65];this[_0xb16c[13]][_0xb16c[66]]+= 1;if(this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]][_0xb16c[53]]){this[_0xb16c[13]][_0xb16c[67]]+= 1;this[_0xb16c[13]][_0xb16c[68]]+= moment(this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]][_0xb16c[53]])[_0xb16c[71]](this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]][_0xb16c[69]],_0xb16c[70]);this[_0xb16c[13]][_0xb16c[72]]+= moment(this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]][_0xb16c[64]])[_0xb16c[71]](this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]][_0xb16c[53]],_0xb16c[70])};this[_0xb16c[13]][_0xb16c[73]]+= moment(this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]][_0xb16c[64]])[_0xb16c[71]](this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]][_0xb16c[53]],_0xb16c[70]);ami[_0xb16c[28]](_0xb16c[74],this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]]);ami[_0xb16c[28]](_0xb16c[75],this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]]);this[_0xb16c[28]](_0xb16c[43],_0xb16c[76],this[_0xb16c[13]]);this[_0xb16c[28]](_0xb16c[43],_0xb16c[77],this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]]);delete this[_0xb16c[11]][_0x211fxb[_0xb16c[30]]]};if(this[_0xb16c[14]][_0x211fxb[_0xb16c[30]]]){delete this[_0xb16c[14]][_0x211fxb[_0xb16c[30]]]}}}catch(e){logger[_0xb16c[48]](_0xb16c[78],util[_0xb16c[47]](e,{showHidden:false,depth:null}))}};module[_0xb16c[79]]= VoiceDialReport