|
|
@@ -363,15 +363,15 @@ func AlarmHandle(data []byte) {
|
|
|
lfshook.NewLogger().Logger.Infof("================ICP Answer PAD================:%s ", exten)
|
|
|
if infoExt.Status == "Idle" {
|
|
|
if active.CabNum == "1" && active.Actived {
|
|
|
- action.Dial("0402", PacuNum, "default", PacuNum, exten, "1") // PACU dial ICP
|
|
|
+ action.Dial("0402", PacuNum, "default", PacuNum, exten, "1") // PACU dial ICP MC1
|
|
|
} else if active.CabNum == "8" && active.Actived {
|
|
|
- action.Dial("0402", PacuNum, "default", PacuNum, exten, "8") // PACU dial ICP
|
|
|
+ action.Dial("0402", PacuNum, "default", PacuNum, exten, "8") // PACU dial ICP MC8
|
|
|
}
|
|
|
} else {
|
|
|
if active.CabNum == "1" && active.Actived {
|
|
|
- action.RedirectInQueue(exten, "0402", "default", "1") // PACU dial ICP
|
|
|
+ action.RedirectInQueue(exten, "0402", "default", "1") // PAD dial ICP MC1
|
|
|
} else if active.CabNum == "8" && active.Actived {
|
|
|
- action.RedirectInQueue(exten, "0402", "default", "8") // PACU dial ICP
|
|
|
+ action.RedirectInQueue(exten, "0402", "default", "8") // PAD dial ICP MC8
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -435,7 +435,7 @@ func AlarmResetAll() {
|
|
|
|
|
|
var AlarmExts []model.Extension
|
|
|
|
|
|
- er := mysql.DBOrmInstance.Where("dev_type = ?", "PAIU").Find(&AlarmExts)
|
|
|
+ er := mysql.DBOrmInstance.Where("dev_type = ? and status != ?", "PAIU", "Idle").Find(&AlarmExts)
|
|
|
if er != nil {
|
|
|
lfshook.NewLogger().Logger.Infof("update special voice to exten err : %+v", er.Error())
|
|
|
}
|
|
|
@@ -444,25 +444,26 @@ func AlarmResetAll() {
|
|
|
action.Hangup(ext.Extension)
|
|
|
}
|
|
|
|
|
|
- action.Hangup("2311")
|
|
|
+ if active.CabNum == "1" && active.Actived {
|
|
|
+ action.Hangup("2311") //1 车接听
|
|
|
+ } else if active.CabNum == "8" && active.Actived {
|
|
|
+ action.Hangup("2381") //8 车接听
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
func RecordStorageConf(data []byte) {
|
|
|
- padRcdEnable := data[0]
|
|
|
- padRcdStorageDays := data[1]
|
|
|
- paRcdStorageDays := data[2]
|
|
|
- cpaRcdStorageDays := data[3]
|
|
|
-
|
|
|
- //padRcdDelDays := data[4]
|
|
|
- //PaRcdDelDays := data[5]
|
|
|
- //cpaRcdDelDays := data[6]
|
|
|
|
|
|
var info model.RcdConf
|
|
|
|
|
|
- info.PadRcdEnable = int(padRcdEnable)
|
|
|
- info.PadRcdStorageDays = int(padRcdStorageDays)
|
|
|
- info.CpaRcdStorageDays = int(cpaRcdStorageDays)
|
|
|
- info.PaRcdStorageDays = int(paRcdStorageDays)
|
|
|
+ info.PadRcdEnable = int(data[0])
|
|
|
+ info.PadRcdStorageDays = int(data[1])
|
|
|
+ info.PaRcdStorageDays = int(data[2])
|
|
|
+ info.CpaRcdStorageDays = int(data[3])
|
|
|
+
|
|
|
+ info.PadRcdDelDays = int(data[4])
|
|
|
+ info.PaRcdDelDays = int(data[5])
|
|
|
+ info.CpaRcdDelDays = int(data[6])
|
|
|
+ info.OpaRcdDelDays = int(data[7])
|
|
|
|
|
|
//update record config
|
|
|
_, er := mysql.DBOrmInstance.Update(&info)
|