add: support alarm forward by sms

This commit is contained in:
2024-04-19 18:30:38 +08:00
parent e05c2a6a51
commit f7aa7a5c30
5 changed files with 19 additions and 13 deletions

View File

@@ -111,9 +111,9 @@ func AlarmForwardBySMPP(alarmData *Alarm) error {
auth := gosmpp.Auth{
SMSC: config.GetYamlConfig().Alarm.SMSC.Addr,
SystemID: config.GetYamlConfig().Alarm.SMSC.UserName,
SystemID: config.GetYamlConfig().Alarm.SMSC.SystemID,
Password: config.GetYamlConfig().Alarm.SMSC.Password,
SystemType: "",
SystemType: config.GetYamlConfig().Alarm.SMSC.SystemType,
}
// conn, err := gosmpp.NonTLSDialer(auth.SMSC)
@@ -141,7 +141,7 @@ func AlarmForwardBySMPP(alarmData *Alarm) error {
},
}, -1)
if err != nil {
log.Error(err)
log.Error("Failed to create SMPP new session:", err)
return err
}
defer func() {