Built motion from commit 67e5df37.|2.0.60
[motion2.git] / server / services / ami / server / index.js
1 var _0xe5ba=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x76\x61\x6C\x69\x64\x61\x74\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x70\x72\x6F\x70\x65\x72\x74\x69\x65\x73","\x2E\x2E\x2F\x61\x6D\x69","\x6C\x69\x73\x74\x65\x6E","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x74\x69\x6D\x65\x72\x73","\x74\x69\x6D\x65\x72","\x75\x70\x64\x61\x74\x65\x41\x63\x77","\x61\x67\x65\x6E\x74\x73","\x70\x61\x75\x73\x65","\x75\x70\x64\x61\x74\x65\x53\x74\x61\x74\x75\x73\x52\x65\x61\x6C\x74\x69\x6D\x65","\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x20","\x6A\x6F\x69\x6E","\x69\x70","\x61\x73\x74\x65\x72\x69\x73\x6B","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x61\x6D\x69\x20\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x65\x72\x72\x6F\x72","\x6D\x6F\x64\x75\x6C\x65","\x6B\x65\x79\x73","\x70\x69\x63\x6B","\x61\x63\x74\x69\x6F\x6E","\x52\x65\x6C\x6F\x61\x64","\x6D\x65\x73\x73\x61\x67\x65","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x63\x6F\x6D\x6D\x61\x6E\x64","\x43\x6F\x6D\x6D\x61\x6E\x64","\x63\x6F\x6E\x74\x65\x6E\x74","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x76\x61\x6C\x75\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x76\x6F\x69\x63\x65\x63\x68\x61\x6E\x6E\x65\x6C","\x2C\x20","\x6D\x61\x70","\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x69\x6E\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x25\x73\x2E\x25\x73","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x77\x61\x76","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x73","\x2F\x76\x61\x72\x2F\x73\x70\x6F\x6F\x6C\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x6D\x6F\x6E\x69\x74\x6F\x72\x2F","\x69\x73\x4E\x69\x6C","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72\x69\x64","\x72\x65\x63","\x70\x75\x73\x68","\x73\x74\x61\x74\x75\x73","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72\x20\x53\x75\x63\x63\x65\x73\x73","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x61\x69\x28\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72\x69\x64\x29","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x64\x6F\x65\x73\x6E\x27\x74\x20\x65\x78\x69\x73\x74","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72\x20\x53\x75\x63\x63\x65\x73\x73","\x73\x74\x6F\x70","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x72\x65\x73\x6F\x6C\x76\x65","\x71\x75\x65\x75\x65\x43\x68\x61\x6E\x6E\x65\x6C\x73","\x76\x6F\x69\x63\x65\x71\x75\x65\x75\x65\x63\x68\x61\x6E\x6E\x65\x6C","\x76\x6F\x69\x63\x65\x71\x75\x65\x75\x65\x63\x68\x61\x6E\x6E\x65\x6C\x68\x61\x6E\x67\x75\x70","\x48\x61\x6E\x67\x75\x70","\x76\x6F\x69\x63\x65\x71\x75\x65\x75\x65\x63\x68\x61\x6E\x6E\x65\x6C\x72\x65\x64\x69\x72\x65\x63\x74","\x52\x65\x64\x69\x72\x65\x63\x74","\x65\x78\x74\x65\x6E","\x63\x6F\x6E\x74\x65\x78\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x74\x72\x75\x6E\x6B\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","\x63\x61\x6D\x70\x61\x69\x67\x6E\x73","\x69\x64","\x72\x75\x6E","\x65\x76\x65\x6E\x74","\x45\x76\x65\x6E\x74\x20\x6E\x61\x6D\x65\x20\x6D\x61\x6E\x64\x61\x74\x6F\x72\x79","\x63\x75\x73\x74\x6F\x6D\x3A","\x65\x6D\x69\x74","\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x73","\x73\x65\x6E\x64","\x63\x68\x65\x63\x6B\x41\x66\x74\x65\x72\x53\x65\x6E\x64","\x68\x74\x74\x70","\x73\x65\x72\x76\x65\x72","\x6F\x6E","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31","\x41\x4D\x49\x20\x52\x50\x43\x20\x73\x65\x72\x76\x65\x72\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x3A\x25\x64\x21","\x6C\x6F\x67","\x52\x50\x43\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x70\x6F\x72\x74\x3A"];_0xe5ba[0];var _=require(_0xe5ba[1]);var util=require(_0xe5ba[2]);var jayson=require(_0xe5ba[3]);var schema=require(_0xe5ba[4]);var BPromise=require(_0xe5ba[5]);var moment=require(_0xe5ba[6]);var config=require(_0xe5ba[7]);var properties=require(_0xe5ba[8]);var ami=require(_0xe5ba[9]);exports[_0xe5ba[10]]= function(_0xa034xa,_0xa034xb,_0xa034xc){return  new BPromise(function(_0xa034xd,_0xa034xe){var _0xa034xf={QueuePause:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x11=util[_0xe5ba[14]](_0xe5ba[11],_0xe5ba[12],_0xa034x10[_0xe5ba[13]]);if(_0xa034xa[_0xe5ba[15]]&& _0xa034xa[_0xe5ba[15]][_0xa034x11]&& _0xa034xa[_0xe5ba[15]][_0xa034x11][_0xe5ba[16]]){_0xa034xa[_0xe5ba[15]][_0xa034x11][_0xe5ba[17]]()};if(_0xa034xa[_0xe5ba[18]][_0xa034x11]){_0xa034xa[_0xe5ba[18]][_0xa034x11][_0xe5ba[20]]({statePause:_0xa034x10[_0xe5ba[19]]?true:false})};_0xa034xd({code:200,message:_0xe5ba[21]})})},Reload:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){if(ami[_0xe5ba[22]]()== false){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,[config[_0xe5ba[26]][_0xe5ba[25]],config[_0xe5ba[26]][_0xe5ba[27]],_0xe5ba[28]][_0xe5ba[24]](_0xe5ba[23])))};_0xa034x10= _[_0xe5ba[32]](_0xa034x10,_[_0xe5ba[31]](properties[_0xe5ba[30]]));_0xa034x10[_0xe5ba[33]]= _0xe5ba[34];return ami.Action(_0xa034x10)[_0xe5ba[37]](function(_0xa034x14){_0xa034xd({code:200,message:_0xa034x14[_0xe5ba[35]]})})[_0xe5ba[36]](function(_0xa034x13){_0xa034xe(_0xa034x12[_0xe5ba[29]](501,_0xa034x13[_0xe5ba[35]]))})})},Command:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){if(ami[_0xe5ba[22]]()== false){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,[config[_0xe5ba[26]][_0xe5ba[25]],config[_0xe5ba[26]][_0xe5ba[27]],_0xe5ba[28]][_0xe5ba[24]](_0xe5ba[23])))};_0xa034x10= _[_0xe5ba[32]](_0xa034x10,_0xe5ba[38]);_0xa034x10[_0xe5ba[33]]= _0xe5ba[39];return ami.Action(_0xa034x10)[_0xe5ba[37]](function(_0xa034x14){_0xa034xd({code:200,message:_0xa034x14[_0xe5ba[40]]})})[_0xe5ba[36]](function(_0xa034x13){_0xa034xe(_0xa034x12[_0xe5ba[29]](501,_0xa034x13[_0xe5ba[35]]))})})},VoiceQueues:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x15=_[_0xe5ba[42]](_0xa034xa[_0xe5ba[41]]);_0xa034xd({count:_0xa034x15[_0xe5ba[43]],rows:_0xa034x15})})},VoiceChannels:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x15=_[_0xe5ba[42]](_0xa034xa[_0xe5ba[44]]);_0xa034xd({count:_0xa034x15[_0xe5ba[43]],rows:_0xa034x15})})},VoiceChannelMixMonitor:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){if(ami[_0xe5ba[22]]()== false){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,[config[_0xe5ba[26]][_0xe5ba[25]],config[_0xe5ba[26]][_0xe5ba[27]],_0xe5ba[28]][_0xe5ba[24]](_0xe5ba[23])))};var _0xa034x16=schema(properties[_0xe5ba[45]])[_0xe5ba[4]](_0xa034x10);if(_0xa034x16[_0xe5ba[43]]> 0){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,_[_0xe5ba[47]](_0xa034x16,_0xe5ba[35])[_0xe5ba[24]](_0xe5ba[46])))};var _0xa034x17=_[_0xe5ba[49]](_0xa034xa[_0xe5ba[44]],{uniqueid:_0xa034x10[_0xe5ba[48]]});if(_0xa034x17&& _0xa034x17[_0xe5ba[50]]){var _0xa034x18=util[_0xe5ba[14]](_0xe5ba[51],_0xa034x10[_0xe5ba[52]]|| _0xa034x10[_0xe5ba[48]],_0xa034x10[_0xe5ba[14]]|| _0xe5ba[53]);return ami.Action({action:_0xe5ba[64],channel:_0xa034x17[_0xe5ba[50]],file:_0xa034x18,options:_0xe5ba[65]})[_0xe5ba[37]](function(_0xa034x14){var _0xa034x19=_[_0xe5ba[49]](_0xa034x17[_0xe5ba[55]],{filename:_0xe5ba[56]+ _0xa034x18[_0xe5ba[54]]()});if(_[_0xe5ba[57]](_0xa034x19)){_0xa034x17[_0xe5ba[55]][_0xe5ba[61]]({filename:_0xe5ba[56]+ _0xa034x18[_0xe5ba[54]](),createdAt:moment()[_0xe5ba[14]](_0xe5ba[58]),mixmonitorid:_0xa034x14[_0xe5ba[59]],status:_0xe5ba[60]})}else {_0xa034x19[_0xe5ba[59]]= _0xa034x14[_0xe5ba[59]];_0xa034x19[_0xe5ba[62]]= _0xe5ba[60]};_0xa034xd({code:200,message:[_0xa034x10[_0xe5ba[48]],_0xe5ba[63],_0xa034x14[_0xe5ba[59]]][_0xe5ba[24]](_0xe5ba[23]),mixmonitorid:_0xa034x14[_0xe5ba[59]]})})[_0xe5ba[36]](function(_0xa034x13){_0xa034xe(_0xa034x12[_0xe5ba[29]](501,[_0xa034x10[_0xe5ba[48]],_0xa034x13[_0xe5ba[35]][_0xe5ba[54]]()][_0xe5ba[24]](_0xe5ba[23])))})}else {return _0xa034xe(_0xa034x12[_0xe5ba[29]](501,_0xe5ba[66]))}})},VoiceChannelStopMixMonitor:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){if(ami[_0xe5ba[22]]()== false){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,[config[_0xe5ba[26]][_0xe5ba[25]],config[_0xe5ba[26]][_0xe5ba[27]],_0xe5ba[28]][_0xe5ba[24]](_0xe5ba[23])))};var _0xa034x16=schema(properties[_0xe5ba[45]])[_0xe5ba[4]](_0xa034x10);if(_0xa034x16[_0xe5ba[43]]> 0){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,_[_0xe5ba[47]](_0xa034x16,_0xe5ba[35])[_0xe5ba[24]](_0xe5ba[46])))};var _0xa034x17=_[_0xe5ba[49]](_0xa034xa[_0xe5ba[44]],{uniqueid:_0xa034x10[_0xe5ba[48]]});if(_0xa034x17){return BPromise[_0xe5ba[71]]()[_0xe5ba[37]](function(){if(_0xa034x17[_0xe5ba[50]]){return ami.Action({action:_0xe5ba[70],channel:_0xa034x17[_0xe5ba[50]],mixmonitorid:_0xa034x10[_0xe5ba[59]]})[_0xe5ba[36]](function(_0xa034x13){})}})[_0xe5ba[37]](function(){if(_0xa034x17[_0xe5ba[69]]){return ami.Action({action:_0xe5ba[70],channel:_0xa034x17[_0xe5ba[69]],mixmonitorid:_0xa034x10[_0xe5ba[59]]})[_0xe5ba[36]](function(_0xa034x13){})}})[_0xe5ba[37]](function(_0xa034x14){var _0xa034x19=_[_0xe5ba[49]](_0xa034x17[_0xe5ba[55]],{mixmonitorid:_0xa034x10[_0xe5ba[59]]});if(_0xa034x19){_0xa034x19[_0xe5ba[62]]= _0xe5ba[68]}})[_0xe5ba[37]](function(){var _0xa034x18=util[_0xe5ba[14]](_0xe5ba[51],_0xa034x10[_0xe5ba[52]]|| _0xa034x10[_0xe5ba[48]],_0xa034x10[_0xe5ba[14]]|| _0xe5ba[53]);var _0xa034x19=_[_0xe5ba[49]](_0xa034x17[_0xe5ba[55]],{filename:_0xe5ba[56]+ _0xa034x18[_0xe5ba[54]]()});if(_0xa034x19){_0xa034x19[_0xe5ba[62]]= _0xe5ba[68]}})[_0xe5ba[37]](function(){_0xa034xd({code:200,message:[_0xa034x10[_0xe5ba[48]],_0xe5ba[67]][_0xe5ba[24]](_0xe5ba[23])})})[_0xe5ba[36]](function(_0xa034x13){_0xa034xe(_0xa034x12[_0xe5ba[29]](501,[_0xa034x10[_0xe5ba[48]],_0xa034x13[_0xe5ba[35]][_0xe5ba[54]]()][_0xe5ba[24]](_0xe5ba[23])))})}else {return _0xa034xe(_0xa034x12[_0xe5ba[29]](501,_0xe5ba[66]))}})},VoiceQueuesChannels:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x15=_[_0xe5ba[42]](_0xa034xa[_0xe5ba[72]]);_0xa034xd({count:_0xa034x15[_0xe5ba[43]],rows:_0xa034x15})})},VoiceQueuesChannel:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x16=schema(properties[_0xe5ba[73]])[_0xe5ba[4]](_0xa034x10);if(_0xa034x16[_0xe5ba[43]]> 0){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,_[_0xe5ba[47]](_0xa034x16,_0xe5ba[35])[_0xe5ba[24]](_0xe5ba[46])))};var _0xa034x17=_[_0xe5ba[49]](_0xa034xa[_0xe5ba[72]],{uniqueid:_0xa034x10[_0xe5ba[48]]});if(_0xa034x17){_0xa034xd(_0xa034x17)}else {return _0xa034xe(_0xa034x12[_0xe5ba[29]](501,_0xe5ba[66]))}})},VoiceQueuesChannelHangup:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){if(ami[_0xe5ba[22]]()== false){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,[config[_0xe5ba[26]][_0xe5ba[25]],config[_0xe5ba[26]][_0xe5ba[27]],_0xe5ba[28]][_0xe5ba[24]](_0xe5ba[23])))};var _0xa034x16=schema(properties[_0xe5ba[74]])[_0xe5ba[4]](_0xa034x10);if(_0xa034x16[_0xe5ba[43]]> 0){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,_[_0xe5ba[47]](_0xa034x16,_0xe5ba[35])[_0xe5ba[24]](_0xe5ba[46])))};var _0xa034x17=_[_0xe5ba[49]](_0xa034xa[_0xe5ba[72]],{uniqueid:_0xa034x10[_0xe5ba[48]]});if(_0xa034x17&& _0xa034x17[_0xe5ba[50]]){return ami.Action({action:_0xe5ba[75],channel:_0xa034x17[_0xe5ba[50]]})[_0xe5ba[37]](function(_0xa034x14){_0xa034xd({code:200,message:[_0xa034x10[_0xe5ba[48]],_0xa034x14[_0xe5ba[35]][_0xe5ba[54]]()][_0xe5ba[24]](_0xe5ba[23])})})[_0xe5ba[36]](function(_0xa034x13){_0xa034xe(_0xa034x12[_0xe5ba[29]](501,[_0xa034x10[_0xe5ba[48]],_0xa034x13[_0xe5ba[35]][_0xe5ba[54]]()][_0xe5ba[24]](_0xe5ba[23])))})}else {return _0xa034xe(_0xa034x12[_0xe5ba[29]](501,_0xe5ba[66]))}})},VoiceQueuesChannelRedirect:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){if(ami[_0xe5ba[22]]()== false){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,[config[_0xe5ba[26]][_0xe5ba[25]],config[_0xe5ba[26]][_0xe5ba[27]],_0xe5ba[28]][_0xe5ba[24]](_0xe5ba[23])))};var _0xa034x16=schema(properties[_0xe5ba[76]])[_0xe5ba[4]](_0xa034x10);if(_0xa034x16[_0xe5ba[43]]> 0){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,_[_0xe5ba[47]](_0xa034x16,_0xe5ba[35])[_0xe5ba[24]](_0xe5ba[46])))};var _0xa034x17=_[_0xe5ba[49]](_0xa034xa[_0xe5ba[72]],{uniqueid:_0xa034x10[_0xe5ba[48]]});if(_0xa034x17&& _0xa034x17[_0xe5ba[50]]){return ami.Action({action:_0xe5ba[77],channel:_0xa034x17[_0xe5ba[50]],exten:_0xa034x10[_0xe5ba[78]],context:_0xa034x17[_0xe5ba[79]],priority:1})[_0xe5ba[37]](function(_0xa034x14){_0xa034xd({code:200,message:[_0xa034x10[_0xe5ba[48]],_0xa034x14[_0xe5ba[35]][_0xe5ba[54]]()][_0xe5ba[24]](_0xe5ba[23])})})[_0xe5ba[36]](function(_0xa034x13){_0xa034xe(_0xa034x12[_0xe5ba[29]](501,[_0xa034x10[_0xe5ba[48]],_0xa034x13[_0xe5ba[35]][_0xe5ba[54]]()][_0xe5ba[24]](_0xe5ba[23])))})}else {return _0xa034xe(_0xa034x12[_0xe5ba[29]](501,_0xe5ba[66]))}})},Agents:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x15=_[_0xe5ba[42]](_0xa034xa[_0xe5ba[18]]);_0xa034xd({count:_0xa034x15[_0xe5ba[43]],rows:_0xa034x15})})},Telephones:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x15=_[_0xe5ba[42]](_0xa034xa[_0xe5ba[80]]);_0xa034xd({count:_0xa034x15[_0xe5ba[43]],rows:_0xa034x15})})},Trunks:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x15=_[_0xe5ba[42]](_0xa034xa[_0xe5ba[81]]);_0xa034xd({count:_0xa034x15[_0xe5ba[43]],rows:_0xa034x15})})},OutboundChannels:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x15=_[_0xe5ba[42]](_0xa034xa[_0xe5ba[82]]);_0xa034xd({count:_0xa034x15[_0xe5ba[43]],rows:_0xa034x15})})},Outbound:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){_0xa034xd(_0xa034xa[_0xe5ba[83]])})},Campaigns:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x15=_[_0xe5ba[42]](_0xa034xa[_0xe5ba[84]]);_0xa034xd({count:_0xa034x15[_0xe5ba[43]],rows:_0xa034x15})})},VoiceQueuesPreview:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){_0xa034xb[_0xe5ba[86]](_0xa034x10[_0xe5ba[85]])[_0xe5ba[37]](function(_0xa034x14){_0xa034xd({code:200,message:_0xa034x14[_0xe5ba[35]]})})[_0xe5ba[36]](function(_0xa034x13){_0xa034xe(_0xa034x12[_0xe5ba[29]](500,_0xa034x13[_0xe5ba[35]]))})})},EventManager:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){if(!_0xa034x10[_0xe5ba[87]]){return _0xa034xe(_0xa034x12[_0xe5ba[29]](500,_0xe5ba[88]))};ami[_0xe5ba[90]](_0xe5ba[89]+ _0xa034x10[_0xe5ba[87]],_0xa034x10[_0xe5ba[35]]);_0xa034xd({code:200,message:_0xa034x10})})},FaxAccounts:function(_0xa034x10){return  new Promise(function(_0xa034xd,_0xa034xe){var _0xa034x15=_[_0xe5ba[42]](_0xa034xa[_0xe5ba[91]]);_0xa034xd({count:_0xa034x15[_0xe5ba[43]],rows:_0xa034x15})})},SendFax:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){_0xa034xc[_0xe5ba[92]](_0xa034x10)[_0xe5ba[37]](function(_0xa034x14){_0xa034xd({code:200,message:_0xa034x14[_0xe5ba[35]]})})[_0xe5ba[36]](function(_0xa034x13){_0xa034xe(_0xa034x12[_0xe5ba[29]](500,_0xa034x13[_0xe5ba[35]]))})})},CheckAfterSend:function(_0xa034x10){var _0xa034x12=this;return  new Promise(function(_0xa034xd,_0xa034xe){_0xa034xc[_0xe5ba[93]](_0xa034x10)[_0xe5ba[37]](function(_0xa034x14){_0xa034xd({code:200,message:_0xa034x14[_0xe5ba[35]]})})[_0xe5ba[36]](function(_0xa034x13){_0xa034xe(_0xa034x12[_0xe5ba[29]](500,_0xa034x13[_0xe5ba[35]]))})})}};var _0xa034x1a=jayson[_0xe5ba[95]](_0xa034xf)[_0xe5ba[94]]();_0xa034x1a[_0xe5ba[96]](_0xe5ba[29],function(_0xa034x13){return _0xa034xe(_0xa034x13)});_0xa034x1a[_0xe5ba[10]](9002,_0xe5ba[97],function(){console[_0xe5ba[99]](_0xe5ba[98],9002);return _0xa034xd(_0xe5ba[100]+ 9002)})})}