Commit b6d23624ab5093f53f9911c4f1317d77e6916635

Authored by Adhidarma Hadiwinoto
1 parent 6f29a7ff5b
Exists in master

ModemData.reportPathSms

Showing 3 changed files with 4 additions and 1 deletions Side-by-side Diff

lib/apiserver/index.js
... ... @@ -60,6 +60,7 @@ function onIncomingSms(req, res) {
60 60 reportIp: req.query.report_ip || req.ip,
61 61 reportPort: req.query.report_port,
62 62 reportApikey: req.query.report_apikey,
  63 + reportPathSms: req.query.report_path_sms || '/sms',
63 64 });
64 65  
65 66 logger.info('APISERVER: Incoming SMS', { modem: req.query.modem, from: req.query.number, from_with_suffix: numberWithSuffix, msg: req.query.msg });
... ... @@ -16,6 +16,7 @@ const modemList = {
16 16 * @property {string} reportIp - IP modem
17 17 * @property {number} reportPort - TCP port modem
18 18 * @property {string} reportApikey - APIKEY modem
  19 + * @property {string} reportPathSms - url path untuk pengiriman SMS
19 20 */
20 21  
21 22 /**
... ... @@ -55,12 +55,13 @@ function _send(destinationNumber, msg, handlerName) {
55 55 protocol: 'http',
56 56 hostname: modem.reportIp,
57 57 port: modem.reportPort,
  58 + pathname: modem.reportPathSms,
58 59 }),
59 60 qs: {
60 61 msg: msg,
61 62 number: destinationNumber,
62 63 reqid: reqId,
63   - apikey: modem.reportApikey
  64 + apikey: modem.reportApikey,
64 65 }
65 66 }
66 67