Built motion from commit fa8c70b.|0.0.144
[motion.git] / server / config / fax.js
index 9343e03..2c6429a 100644 (file)
@@ -1 +1 @@
-var _0x6515=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6E\x6F\x64\x65\x2D\x75\x75\x69\x64","\x74\x69\x66\x66\x2D\x74\x6F\x2D\x70\x6E\x67","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x66\x73","\x70\x61\x74\x68","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x43\x6F\x6E\x74\x61\x63\x74","\x45\x76\x65\x6E\x74","\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x72\x65\x67\x69\x73\x74\x65\x72","\x72\x65\x63\x65\x69\x76\x65\x66\x61\x78","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x73\x74\x61\x74\x75\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64","\x69\x64","\x49\x4E\x43\x4F\x4D\x49\x4E\x47","\x46\x41\x58","\x63\x72\x65\x61\x74\x65","\x73\x65\x74\x46\x72\x6F\x6D","\x73\x70\x72\x65\x61\x64","\x72\x65\x6D\x6F\x74\x65\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x74\x54\x6F","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x76\x34","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x66\x61\x78","\x69\x6E\x62\x6F\x75\x6E\x64","\x2E\x70\x64\x66","\x6A\x6F\x69\x6E","\x63\x6F\x6E\x76\x65\x72\x74\x20","\x20","\x54\x68\x65\x20\x66\x69\x6C\x65\x20","\x20\x65\x78\x69\x74\x73","\x20\x77\x61\x73\x20\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x20\x69\x6E\x20\x50\x44\x46","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x74\x73","\x65\x78\x69\x73\x74\x73","\x4E\x45\x57","\x6F\x6E","\x73\x65\x6E\x64\x66\x61\x78","\x2A\x2A\x2A\x53\x65\x6E\x64\x46\x41\x58\x2A\x2A\x2A","\x6C\x6F\x67","\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x76\x61\x72\x73\x65\x74","\x66\x61\x78\x73\x74\x61\x74\x75\x73","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x76\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x53\x65\x74\x3A\x20","\x76\x61\x6C\x75\x65","\x46\x41\x49\x4C\x45\x44","\x53\x45\x4E\x54","\x66\x61\x78\x65\x72\x72\x6F\x72","\x66\x61\x78\x73\x74\x61\x74\x75\x73\x73\x74\x72\x69\x6E\x67","\x6C\x61\x73\x74\x73\x74\x61\x74\x75\x73","\x75\x73\x65\x72\x65\x76\x65\x6E\x74","\x46\x61\x78","\x53\x45\x4E\x44\x49\x4E\x47","\x75\x75\x69\x64","\x46\x41\x58\x53\x74\x61\x74\x75\x73\x3A\x20","\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x61\x6D\x69"];_0x6515[0];var _=require(_0x6515[1]);var uuidLib=require(_0x6515[2]);var ConvertTiff=require(_0x6515[3]);var exec=require(_0x6515[5])[_0x6515[4]];var fs=require(_0x6515[6]);var path=require(_0x6515[7]);var FaxMessage=require(_0x6515[9])[_0x6515[8]];var FaxRoom=require(_0x6515[9])[_0x6515[10]];var Contact=require(_0x6515[9])[_0x6515[11]];var Event=require(_0x6515[9])[_0x6515[12]];var config=require(_0x6515[13]);exports[_0x6515[14]]=function(_0x4a36xc){_0x4a36xc[_0x6515[50]](_0x6515[15],function(_0x4a36xd){FaxRoom[_0x6515[24]]({status:_0x6515[49],from:_0x4a36xd[_0x6515[27]],FaxAccountId:1})[_0x6515[45]](function(_0x4a36xf){_0x4a36xd[_0x6515[18]]=_0x6515[19];_0x4a36xd[_0x6515[20]]=_0x4a36xf[_0x6515[21]];FaxMessage[_0x6515[24]](_0x4a36xd)[_0x6515[45]](function(_0x4a36x10){Event[_0x6515[24]]({name:_0x6515[22],channel:_0x6515[23],FaxRoomId:_0x4a36xf[_0x6515[21]],FaxAccountId:1})[_0x6515[17]](function(_0x4a36xe){console[_0x6515[16]](_0x4a36xe)});Contact[_0x6515[28]]({where:{phone:_0x4a36xd[_0x6515[27]]},defaults:{phone:_0x4a36xd[_0x6515[27]],fullname:_0x4a36xd[_0x6515[27]]}})[_0x6515[26]](function(_0x4a36x11,_0x4a36x12){_0x4a36x10[_0x6515[25]](_0x4a36x11)});Contact[_0x6515[28]]({where:{phone:_0x4a36xd[_0x6515[30]]},defaults:{phone:_0x4a36xd[_0x6515[30]],fullname:_0x4a36xd[_0x6515[30]]}})[_0x6515[26]](function(_0x4a36x11,_0x4a36x12){_0x4a36x10[_0x6515[29]](_0x4a36x11)});var _0x4a36x13=uuidLib[_0x6515[31]]();var _0x4a36x14=_0x4a36xd[_0x6515[32]];var _0x4a36x15=path[_0x6515[39]](config[_0x6515[33]],_0x6515[34],_0x6515[35],_0x6515[36],_0x6515[37],_0x4a36x13+_0x6515[38]);var _0x4a36x16=_0x6515[40]+_0x4a36x14+_0x6515[41]+_0x4a36x15;fs[_0x6515[48]](_0x4a36x14,function(_0x4a36x17){if(_0x4a36x17){console[_0x6515[16]](_0x6515[42]+_0x4a36x14+_0x6515[43]);exec(_0x4a36x16,function(_0x4a36xe){if(_0x4a36xe){console[_0x6515[16]](_0x4a36xe)}else {_0x4a36x10[_0x6515[46]]({filenamePDF:_0x4a36x13+_0x6515[38]})[_0x6515[45]](function(){console[_0x6515[16]](_0x6515[42]+_0x4a36x14+_0x6515[44])})[_0x6515[17]](function(_0x4a36xe){console[_0x6515[16]](_0x4a36xe)})}})}else {console[_0x6515[16]](_0x6515[42]+_0x4a36x14+_0x6515[47])}})})[_0x6515[17]](function(_0x4a36xe){console[_0x6515[16]](_0x4a36xe)})})[_0x6515[17]](function(_0x4a36xe){console[_0x6515[16]](_0x4a36xe)})});_0x4a36xc[_0x6515[50]](_0x6515[51],function(_0x4a36xd){console[_0x6515[53]](_0x6515[52]);FaxMessage[_0x6515[55]]({where:{uniqueid:_0x4a36xd[_0x6515[54]]}})[_0x6515[45]](function(_0x4a36x10){if(_0x4a36x10){_0x4a36x10[_0x6515[46]](_0x4a36xd)}})[_0x6515[17]](function(_0x4a36xe){console[_0x6515[16]](_0x4a36xe)})});_0x4a36xc[_0x6515[50]](_0x6515[56],function(_0x4a36xd){if(_0x4a36xd[_0x6515[59]][_0x6515[58]](_0x6515[57])){FaxMessage[_0x6515[55]]({where:{uniqueid:_0x4a36xd[_0x6515[54]]}})[_0x6515[45]](function(_0x4a36x10){if(_0x4a36x10){console[_0x6515[53]](_0x6515[60],_0x6515[18],_0x4a36xd[_0x6515[61]]);_0x4a36x10[_0x6515[46]]({status:_0x4a36xd[_0x6515[61]]==_0x6515[62]?_0x6515[62]:_0x6515[63]})}})[_0x6515[17]](function(_0x4a36xe){console[_0x6515[16]](_0x4a36xe)})}else {if(_0x4a36xd[_0x6515[59]][_0x6515[58]](_0x6515[64])){FaxMessage[_0x6515[55]]({where:{uniqueid:_0x4a36xd[_0x6515[54]]}})[_0x6515[45]](function(_0x4a36x10){if(_0x4a36x10){console[_0x6515[53]](_0x6515[60],_0x6515[16],_0x4a36xd[_0x6515[61]]);_0x4a36x10[_0x6515[46]]({error:_0x4a36xd[_0x6515[61]]})}})[_0x6515[17]](function(_0x4a36xe){console[_0x6515[16]](_0x4a36xe)})}else {if(_0x4a36xd[_0x6515[59]][_0x6515[58]](_0x6515[65])){FaxMessage[_0x6515[55]]({where:{uniqueid:_0x4a36xd[_0x6515[54]]}})[_0x6515[45]](function(_0x4a36x10){if(_0x4a36x10){console[_0x6515[53]](_0x6515[60],_0x6515[66],_0x4a36xd[_0x6515[61]]);_0x4a36x10[_0x6515[46]]({laststatus:_0x4a36xd[_0x6515[61]]})}})[_0x6515[17]](function(_0x4a36xe){console[_0x6515[16]](_0x4a36xe)})}}}});_0x4a36xc[_0x6515[50]](_0x6515[67],function(_0x4a36xd){if(_0x4a36xd[_0x6515[67]]===_0x6515[68]){FaxMessage[_0x6515[55]]({where:{uuid:_0x4a36xd[_0x6515[70]]}})[_0x6515[45]](function(_0x4a36x10){if(_0x4a36x10){_0x4a36xd[_0x6515[18]]=_0x6515[69];_0x4a36x10[_0x6515[46]](_0x4a36xd)}})[_0x6515[17]](function(_0x4a36xe){console[_0x6515[16]](_0x4a36xe)})}});_0x4a36xc[_0x6515[50]](_0x6515[57],function(_0x4a36xd){FaxMessage[_0x6515[55]]({where:{uniqueid:_0x4a36xd[_0x6515[54]]}})[_0x6515[45]](function(_0x4a36x10){if(_0x4a36x10){console[_0x6515[53]](_0x6515[71],_0x4a36xd[_0x6515[54]],_0x4a36xd[_0x6515[18]]);_0x4a36x10[_0x6515[46]]({operation:_0x4a36xd[_0x6515[72]],laststatus:_0x4a36xd[_0x6515[18]]})}})[_0x6515[17]](function(_0x4a36xe){console[_0x6515[16]](_0x4a36xe)})});require(_0x6515[73])[_0x6515[14]](_0x4a36xc)}
\ No newline at end of file
+var _0x404b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6E\x6F\x64\x65\x2D\x75\x75\x69\x64","\x74\x69\x66\x66\x2D\x74\x6F\x2D\x70\x6E\x67","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x66\x73","\x70\x61\x74\x68","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x43\x6F\x6E\x74\x61\x63\x74","\x45\x76\x65\x6E\x74","\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x72\x65\x67\x69\x73\x74\x65\x72","\x72\x65\x63\x65\x69\x76\x65\x66\x61\x78","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x73\x74\x61\x74\x75\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64","\x69\x64","\x49\x4E\x43\x4F\x4D\x49\x4E\x47","\x46\x41\x58","\x63\x72\x65\x61\x74\x65","\x73\x65\x74\x46\x72\x6F\x6D","\x73\x70\x72\x65\x61\x64","\x72\x65\x6D\x6F\x74\x65\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x74\x54\x6F","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x76\x34","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x66\x61\x78","\x69\x6E\x62\x6F\x75\x6E\x64","\x2E\x70\x64\x66","\x6A\x6F\x69\x6E","\x63\x6F\x6E\x76\x65\x72\x74\x20","\x20","\x54\x68\x65\x20\x66\x69\x6C\x65\x20","\x20\x65\x78\x69\x74\x73","\x20\x77\x61\x73\x20\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x20\x69\x6E\x20\x50\x44\x46","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x74\x73","\x65\x78\x69\x73\x74\x73","\x4E\x45\x57","\x6F\x6E","\x73\x65\x6E\x64\x66\x61\x78","\x2A\x2A\x2A\x53\x65\x6E\x64\x46\x41\x58\x2A\x2A\x2A","\x6C\x6F\x67","\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x76\x61\x72\x73\x65\x74","\x66\x61\x78\x73\x74\x61\x74\x75\x73","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x76\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x53\x65\x74\x3A\x20","\x76\x61\x6C\x75\x65","\x46\x41\x49\x4C\x45\x44","\x53\x45\x4E\x54","\x66\x61\x78\x65\x72\x72\x6F\x72","\x66\x61\x78\x73\x74\x61\x74\x75\x73\x73\x74\x72\x69\x6E\x67","\x6C\x61\x73\x74\x73\x74\x61\x74\x75\x73","\x75\x73\x65\x72\x65\x76\x65\x6E\x74","\x46\x61\x78","\x53\x45\x4E\x44\x49\x4E\x47","\x75\x75\x69\x64","\x46\x41\x58\x53\x74\x61\x74\x75\x73\x3A\x20","\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x61\x6D\x69"];_0x404b[0];var _=require(_0x404b[1]);var uuidLib=require(_0x404b[2]);var ConvertTiff=require(_0x404b[3]);var exec=require(_0x404b[5])[_0x404b[4]];var fs=require(_0x404b[6]);var path=require(_0x404b[7]);var FaxMessage=require(_0x404b[9])[_0x404b[8]];var FaxRoom=require(_0x404b[9])[_0x404b[10]];var Contact=require(_0x404b[9])[_0x404b[11]];var Event=require(_0x404b[9])[_0x404b[12]];var config=require(_0x404b[13]);exports[_0x404b[14]]= function(_0xaa96xc){_0xaa96xc[_0x404b[50]](_0x404b[15],function(_0xaa96xd){FaxRoom[_0x404b[24]]({status:_0x404b[49],from:_0xaa96xd[_0x404b[27]],FaxAccountId:1})[_0x404b[45]](function(_0xaa96xf){_0xaa96xd[_0x404b[18]]= _0x404b[19];_0xaa96xd[_0x404b[20]]= _0xaa96xf[_0x404b[21]];FaxMessage[_0x404b[24]](_0xaa96xd)[_0x404b[45]](function(_0xaa96x10){Event[_0x404b[24]]({name:_0x404b[22],channel:_0x404b[23],FaxRoomId:_0xaa96xf[_0x404b[21]],FaxAccountId:1})[_0x404b[17]](function(_0xaa96xe){console[_0x404b[16]](_0xaa96xe)});Contact[_0x404b[28]]({where:{phone:_0xaa96xd[_0x404b[27]]},defaults:{phone:_0xaa96xd[_0x404b[27]],fullname:_0xaa96xd[_0x404b[27]]}})[_0x404b[26]](function(_0xaa96x11,_0xaa96x12){_0xaa96x10[_0x404b[25]](_0xaa96x11)});Contact[_0x404b[28]]({where:{phone:_0xaa96xd[_0x404b[30]]},defaults:{phone:_0xaa96xd[_0x404b[30]],fullname:_0xaa96xd[_0x404b[30]]}})[_0x404b[26]](function(_0xaa96x11,_0xaa96x12){_0xaa96x10[_0x404b[29]](_0xaa96x11)});var _0xaa96x13=uuidLib[_0x404b[31]]();var _0xaa96x14=_0xaa96xd[_0x404b[32]];var _0xaa96x15=path[_0x404b[39]](config[_0x404b[33]],_0x404b[34],_0x404b[35],_0x404b[36],_0x404b[37],_0xaa96x13+ _0x404b[38]);var _0xaa96x16=_0x404b[40]+ _0xaa96x14+ _0x404b[41]+ _0xaa96x15;fs[_0x404b[48]](_0xaa96x14,function(_0xaa96x17){if(_0xaa96x17){console[_0x404b[16]](_0x404b[42]+ _0xaa96x14+ _0x404b[43]);exec(_0xaa96x16,function(_0xaa96xe){if(_0xaa96xe){console[_0x404b[16]](_0xaa96xe)}else {_0xaa96x10[_0x404b[46]]({filenamePDF:_0xaa96x13+ _0x404b[38]})[_0x404b[45]](function(){console[_0x404b[16]](_0x404b[42]+ _0xaa96x14+ _0x404b[44])})[_0x404b[17]](function(_0xaa96xe){console[_0x404b[16]](_0xaa96xe)})}})}else {console[_0x404b[16]](_0x404b[42]+ _0xaa96x14+ _0x404b[47])}})})[_0x404b[17]](function(_0xaa96xe){console[_0x404b[16]](_0xaa96xe)})})[_0x404b[17]](function(_0xaa96xe){console[_0x404b[16]](_0xaa96xe)})});_0xaa96xc[_0x404b[50]](_0x404b[51],function(_0xaa96xd){console[_0x404b[53]](_0x404b[52]);FaxMessage[_0x404b[55]]({where:{uniqueid:_0xaa96xd[_0x404b[54]]}})[_0x404b[45]](function(_0xaa96x10){if(_0xaa96x10){_0xaa96x10[_0x404b[46]](_0xaa96xd)}})[_0x404b[17]](function(_0xaa96xe){console[_0x404b[16]](_0xaa96xe)})});_0xaa96xc[_0x404b[50]](_0x404b[56],function(_0xaa96xd){if(_0xaa96xd[_0x404b[59]][_0x404b[58]](_0x404b[57])){FaxMessage[_0x404b[55]]({where:{uniqueid:_0xaa96xd[_0x404b[54]]}})[_0x404b[45]](function(_0xaa96x10){if(_0xaa96x10){console[_0x404b[53]](_0x404b[60],_0x404b[18],_0xaa96xd[_0x404b[61]]);_0xaa96x10[_0x404b[46]]({status:_0xaa96xd[_0x404b[61]]== _0x404b[62]?_0x404b[62]:_0x404b[63]})}})[_0x404b[17]](function(_0xaa96xe){console[_0x404b[16]](_0xaa96xe)})}else {if(_0xaa96xd[_0x404b[59]][_0x404b[58]](_0x404b[64])){FaxMessage[_0x404b[55]]({where:{uniqueid:_0xaa96xd[_0x404b[54]]}})[_0x404b[45]](function(_0xaa96x10){if(_0xaa96x10){console[_0x404b[53]](_0x404b[60],_0x404b[16],_0xaa96xd[_0x404b[61]]);_0xaa96x10[_0x404b[46]]({error:_0xaa96xd[_0x404b[61]]})}})[_0x404b[17]](function(_0xaa96xe){console[_0x404b[16]](_0xaa96xe)})}else {if(_0xaa96xd[_0x404b[59]][_0x404b[58]](_0x404b[65])){FaxMessage[_0x404b[55]]({where:{uniqueid:_0xaa96xd[_0x404b[54]]}})[_0x404b[45]](function(_0xaa96x10){if(_0xaa96x10){console[_0x404b[53]](_0x404b[60],_0x404b[66],_0xaa96xd[_0x404b[61]]);_0xaa96x10[_0x404b[46]]({laststatus:_0xaa96xd[_0x404b[61]]})}})[_0x404b[17]](function(_0xaa96xe){console[_0x404b[16]](_0xaa96xe)})}}}});_0xaa96xc[_0x404b[50]](_0x404b[67],function(_0xaa96xd){if(_0xaa96xd[_0x404b[67]]=== _0x404b[68]){FaxMessage[_0x404b[55]]({where:{uuid:_0xaa96xd[_0x404b[70]]}})[_0x404b[45]](function(_0xaa96x10){if(_0xaa96x10){_0xaa96xd[_0x404b[18]]= _0x404b[69];_0xaa96x10[_0x404b[46]](_0xaa96xd)}})[_0x404b[17]](function(_0xaa96xe){console[_0x404b[16]](_0xaa96xe)})}});_0xaa96xc[_0x404b[50]](_0x404b[57],function(_0xaa96xd){FaxMessage[_0x404b[55]]({where:{uniqueid:_0xaa96xd[_0x404b[54]]}})[_0x404b[45]](function(_0xaa96x10){if(_0xaa96x10){console[_0x404b[53]](_0x404b[71],_0xaa96xd[_0x404b[54]],_0xaa96xd[_0x404b[18]]);_0xaa96x10[_0x404b[46]]({operation:_0xaa96xd[_0x404b[72]],laststatus:_0xaa96xd[_0x404b[18]]})}})[_0x404b[17]](function(_0xaa96xe){console[_0x404b[16]](_0xaa96xe)})});require(_0x404b[73])[_0x404b[14]](_0xaa96xc)}
\ No newline at end of file