sms host change

This commit is contained in:
pringgosutono
2026-05-26 18:44:31 +09:00
parent 42924d1d50
commit 9217573f9c

View File

@ -372,14 +372,14 @@ async function commitMessage(now, logDevice) {
const rawMsg = `${nopol} | OVERSPEED | ${time} | ${logDevice.speed} km/h | ${address}`.substring(0, 150).trim()
// const rawMsg = `${nopol} | OVERSPEED | ${time} | ${logDevice.speed} km/h`.trim()
const countryCode = process.env.SMS_COUNTRY_CODE ?? "670"
const smsHost = process.env.SMS_HOST ?? "http://192.168.40.2:8181"
const smsHost = process.env.SMS_HOST ?? "http://192.168.40.2:8181/submitsm/ka"
await Promise.allSettled(
users
.filter(u => u.phone)
.map(async (user) => {
try {
await axios.get(`${smsHost}/mobicents/sendSms`, {
await axios.get(`${smsHost}`, {
params: { to: `${countryCode}${user.phone}`, msg: rawMsg, sender: "Overspeed FROTA" },
})
} catch (smsErr) {