|
|
@@ -333,8 +333,9 @@ func HandleAMI(event map[string]string) {
|
|
|
//alstatus.AlarmStatus(strings.Split(strings.Split(res.Entrys[0].Channel, "/")[1], "-")[0], "connect")
|
|
|
//go RedirectInQueue(PADChan, "1481", "pad-page-occ-icp", "8") //PAD Page(OCC+ICPs);goto confbrdigeIoin
|
|
|
alstatus.AlarmStatus(event["CallerIDNum"], "connect")
|
|
|
- go RedirectInQueue(event["Channel"], "1411", "pad-page-occ-icp", "1") //PAD Page(OCC+ICPs)
|
|
|
- go Dial("0401", "0512", "pad-rule-pacus-occ", "ano8", "ano8", "8") // PACUs dial OCC1
|
|
|
+ go RedirectInQueue(event["Channel"], "1481", "pad-page-occ-icp", "1") //PAD Page(OCC+ICPs)
|
|
|
+
|
|
|
+ go Dial("0401", "0512", "pad-rule-pacus-occ", "ano8", "ano8", "8") // PACUs dial OCC1
|
|
|
//} else {
|
|
|
// lfshook.NewLogger().Infof("===OCC-QueueStatus==PADCchan NULL")
|
|
|
//}
|
|
|
@@ -434,8 +435,9 @@ func HandleAMI(event map[string]string) {
|
|
|
priority.RunningTypePriority, _ = strconv.Atoi(priority.Priority.PADICP)
|
|
|
go RedirectInQueue(event["ConnectedLineName"], "2311", "chanspy-rule-whisper", event["ConnectedLineName"]) //PAD chanspy(EqW) ICP1
|
|
|
|
|
|
- go Dial("0402", event["ConnectedLineName"], "call-pad-rule", event["ConnectedLineName"], event["ConnectedLineName"], "8") // PAD call ICP8
|
|
|
-
|
|
|
+ if ExtenStatus("2381") == "Idle" {
|
|
|
+ go Dial("0402", event["ConnectedLineName"], "call-pad-rule", event["ConnectedLineName"], event["ConnectedLineName"], "8") // PAD call ICP8
|
|
|
+ }
|
|
|
}
|
|
|
if event["ConnectedLineNum"] == "ani8" && event["Exten"] == "0511" { //PAD ansered by ICP8; PACUs connected ICP8
|
|
|
lfshook.NewLogger().Infof("====PAD answered by ICP8:%s=====", event["ConnectedLineName"])
|
|
|
@@ -445,9 +447,9 @@ func HandleAMI(event map[string]string) {
|
|
|
priority.RunningType = "PAD-ICP"
|
|
|
priority.RunningTypePriority, _ = strconv.Atoi(priority.Priority.PADICP)
|
|
|
go RedirectInQueue(event["ConnectedLineName"], "2381", "chanspy-rule-whisper", event["ConnectedLineName"]) //PAD chanspy(EqW) ICP8
|
|
|
-
|
|
|
- go Dial("0402", event["ConnectedLineName"], "call-pad-rule", event["ConnectedLineName"], event["ConnectedLineName"], "1") // PAD call ICP2
|
|
|
-
|
|
|
+ if ExtenStatus("2311") == "Idle" {
|
|
|
+ go Dial("0402", event["ConnectedLineName"], "call-pad-rule", event["ConnectedLineName"], event["ConnectedLineName"], "1") // PAD call ICP1
|
|
|
+ }
|
|
|
break
|
|
|
}
|
|
|
|
|
|
@@ -567,10 +569,10 @@ func HandleAMI(event map[string]string) {
|
|
|
priority.RunningTypePriority, _ = strconv.Atoi(priority.Priority.PADTMS)
|
|
|
if active.ActivedCab == "1" {
|
|
|
go RedirectInQueue(event["CallerIDName"], "2311", "chanspy-rule-whisper", "") //PAD chanspy(EqW) ICP1
|
|
|
- go Dial("0403", event["CallerIDName"], "call-pad-rule", "2381", "2381", "8") //ICP8---call----PAD
|
|
|
+ go Dial("0403", event["CallerIDName"], "call-pad-rule", "2381", "2381", "8") //ICP8---call----PAD
|
|
|
} else if active.ActivedCab == "8" {
|
|
|
go RedirectInQueue(event["CallerIDName"], "2381", "chanspy-rule-whisper", "") //PAD chanspy(EqW) ICP8
|
|
|
- go Dial("0403", event["CallerIDName"], "call-pad-rule", "2311", "2311", "1") //ICP1---call----PAD
|
|
|
+ go Dial("0403", event["CallerIDName"], "call-pad-rule", "2311", "2311", "1") //ICP1---call----PAD
|
|
|
}
|
|
|
} else if utils.IsPAIU(event["CallerIDNum"]) && event["Exten"] == "0405" { // PAD connect ICP-TMS;PACU not available
|
|
|
|