|
|
@@ -86,7 +86,6 @@ func processPacket(packet []byte) {
|
|
|
|
|
|
case 0x02: // STN
|
|
|
if priority.CheckPriority("STN") {
|
|
|
- //action.HangupICP()
|
|
|
action.HangupRunningTask("STN") //STN interrupt other
|
|
|
StationAnn(packet)
|
|
|
} else {
|
|
|
@@ -95,7 +94,6 @@ func processPacket(packet []byte) {
|
|
|
|
|
|
case 0x05: // SPC
|
|
|
if priority.CheckPriority("SPC") {
|
|
|
- //action.HangupICP()
|
|
|
action.HangupRunningTask("SPC") //SPC interrupt other
|
|
|
SpecialAnn(packet)
|
|
|
} else {
|
|
|
@@ -104,7 +102,6 @@ func processPacket(packet []byte) {
|
|
|
|
|
|
case 0x06: // EMG
|
|
|
if priority.CheckPriority("EMG") {
|
|
|
- //action.HangupICP()
|
|
|
action.HangupRunningTask("EMG") //EMG interrupt other
|
|
|
EmgMsg(packet)
|
|
|
} else {
|
|
|
@@ -115,7 +112,6 @@ func processPacket(packet []byte) {
|
|
|
|
|
|
case 0x08: // DCS
|
|
|
if priority.CheckPriority("DCS") {
|
|
|
- //action.HangupICP()
|
|
|
action.HangupRunningTask("DCS") //DCS interrupt other
|
|
|
DcsAnn(packet)
|
|
|
} else {
|
|
|
@@ -124,7 +120,6 @@ func processPacket(packet []byte) {
|
|
|
|
|
|
case 0x09: // SELF CHECK
|
|
|
if priority.CheckPriority("CHK") {
|
|
|
- //action.HangupICP()
|
|
|
action.HangupRunningTask("CHK") //CHK interrupt other
|
|
|
SelfCheck(packet)
|
|
|
} else {
|
|
|
@@ -133,7 +128,6 @@ func processPacket(packet []byte) {
|
|
|
|
|
|
case 0x10: // VOLUME Adjust
|
|
|
if priority.CheckPriority("VOL") {
|
|
|
- //action.HangupICP()
|
|
|
action.HangupRunningTask("VOL") //VOL interrupt other
|
|
|
VolumeAdjust(packet)
|
|
|
} else {
|
|
|
@@ -142,8 +136,6 @@ func processPacket(packet []byte) {
|
|
|
|
|
|
case 0x0a: //TMS answer PAD
|
|
|
if priority.CheckPriority("PAD-TMS") {
|
|
|
-
|
|
|
- //action.HangupICP()
|
|
|
action.HangupRunningTask("PAD-TMS") //PAD-TMS interrupt other
|
|
|
AlarmHandleICP(packet) //for test
|
|
|
//AlarmHandleTMS(packet)
|
|
|
@@ -159,7 +151,7 @@ func processPacket(packet []byte) {
|
|
|
|
|
|
case 0x0d: // ICP answer PAD
|
|
|
if priority.CheckPriority("PAD-ICP") {
|
|
|
- //action.HangupICP()
|
|
|
+
|
|
|
action.HangupRunningTask("PAD-ICP") //PAD-ICP interrupt other
|
|
|
AlarmHandleICP(packet) //
|
|
|
} else {
|
|
|
@@ -400,21 +392,14 @@ func AlarmHandleICP(data []byte) {
|
|
|
if err != nil {
|
|
|
lfshook.NewLogger().Info(err)
|
|
|
}
|
|
|
- //action.HangupICP()
|
|
|
- if priority.RunningType == "PAD-ICP" {
|
|
|
- action.HangupRunningTask("") //STOP PAD-ICP
|
|
|
- //priority.CleanPriorityTag()
|
|
|
- }
|
|
|
+ action.HangupAllLocalChan()
|
|
|
|
|
|
case 0x03: //hangup
|
|
|
//NotifyPaiu(exten, "hangup")
|
|
|
- //action.Hangup(exten) //Pad
|
|
|
- if priority.RunningType == "PAD-ICP" {
|
|
|
- action.HangupRunningTask("") //STOP PAD-ICP
|
|
|
- //priority.CleanPriorityTag()
|
|
|
- }
|
|
|
- //action.HangupICP()
|
|
|
-
|
|
|
+ action.Hangup(exten) //Pad
|
|
|
+ action.HangupAllLocalChan()
|
|
|
+ action.HangupICP()
|
|
|
+ priority.CleanPriorityTag()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -470,22 +455,14 @@ func AlarmHandleTMS(data []byte) {
|
|
|
if err != nil {
|
|
|
lfshook.NewLogger().Info(err)
|
|
|
}
|
|
|
- if priority.RunningType == "PAD-TMS" {
|
|
|
- action.HangupRunningTask("") //STOP PAD-TMS
|
|
|
- //priority.CleanPriorityTag()
|
|
|
- }
|
|
|
- //action.Hangup("2311") //1 车接听
|
|
|
- //action.Hangup("2381") //8 车接听
|
|
|
+ action.HangupAllLocalChan()
|
|
|
|
|
|
case 0x03: //hangup
|
|
|
//NotifyPaiu(exten, "hangup")
|
|
|
- //action.Hangup(exten) //PAD
|
|
|
- //action.Hangup("2311") //1 车接听
|
|
|
- //action.Hangup("2381") //8 车接听
|
|
|
- if priority.RunningType == "PAD-TMS" {
|
|
|
- action.HangupRunningTask("") //STOP PAD-TMS
|
|
|
- //priority.CleanPriorityTag()
|
|
|
- }
|
|
|
+ action.Hangup(exten) //Pad
|
|
|
+ action.HangupAllLocalChan()
|
|
|
+ action.HangupICP()
|
|
|
+ priority.CleanPriorityTag()
|
|
|
}
|
|
|
}
|
|
|
|