|
|
@@ -25,6 +25,7 @@ func HandleAMI(event map[string]string) {
|
|
|
switch event["Event"] {
|
|
|
|
|
|
case "DTMFBegin": //ICP interrupt PAD
|
|
|
+
|
|
|
if utils.IsICP(event["CallerIDNum"]) {
|
|
|
exten := strings.Split(strings.Split(event["Channel"], "/")[1], "-")[0] //get ICP exten number
|
|
|
if utils.IsICP(exten) {
|
|
|
@@ -145,8 +146,10 @@ func HandleAMI(event map[string]string) {
|
|
|
}
|
|
|
|
|
|
if PADChan != "" {
|
|
|
- alstatus.AlarmStatus(strings.Split(strings.Split(res.Entrys[0].Channel, "/")[1], "-")[0], "connect")
|
|
|
- go RedirectInQueue(PADChan, "1411", "pad-page-occ-icp", "1") //PAD Page(OCC+ICPs)
|
|
|
+ Ext := strings.Split(strings.Split(res.Entrys[0].Channel, "/")[1], "-")[0]
|
|
|
+
|
|
|
+ alstatus.AlarmStatus(Ext, "connect")
|
|
|
+ go RedirectInQueue(PADChan, "1411", "pad-page-occ-icp", Ext) //PAD Page(OCC+ICPs)
|
|
|
|
|
|
go Dial("0401", "0512", "pad-rule-pacus-occ", "ano1", "ano1", "1") // PACUs dial OCC1
|
|
|
} else {
|
|
|
@@ -165,8 +168,10 @@ func HandleAMI(event map[string]string) {
|
|
|
}
|
|
|
|
|
|
if PADChan != "" {
|
|
|
- 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)
|
|
|
+ Ext := strings.Split(strings.Split(res.Entrys[0].Channel, "/")[1], "-")[0]
|
|
|
+
|
|
|
+ alstatus.AlarmStatus(Ext, "connect")
|
|
|
+ go RedirectInQueue(PADChan, "1481", "pad-page-occ-icp", Ext) //PAD Page(OCC+ICPs)
|
|
|
|
|
|
go Dial("0401", "0512", "pad-rule-pacus-occ", "ano8", "ano8", "8") // PACUs dial OCC1
|
|
|
} else {
|
|
|
@@ -270,8 +275,8 @@ func HandleAMI(event map[string]string) {
|
|
|
}*/
|
|
|
|
|
|
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", "ano1", "ano1", "1") // PACUs dial OCC1
|
|
|
+ go RedirectInQueue(event["Channel"], "1411", "pad-page-occ-icp", event["CallerIDNum"]) //PAD Page(OCC+ICPs)
|
|
|
+ go Dial("0401", "0512", "pad-rule-pacus-occ", "ano1", "ano1", "1") // PACUs dial OCC1
|
|
|
|
|
|
} else if active.ActivedCab == "8" /*&& ExtenStatus("1481") == "Idle" */ {
|
|
|
/*if priority.PADOccStart == 0 {
|
|
|
@@ -284,8 +289,8 @@ func HandleAMI(event map[string]string) {
|
|
|
}*/
|
|
|
|
|
|
alstatus.AlarmStatus(event["CallerIDNum"], "connect")
|
|
|
- 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 OCC8
|
|
|
+ go RedirectInQueue(event["Channel"], "1481", "pad-page-occ-icp", event["CallerIDNum"]) //PAD Page(OCC+ICPs)
|
|
|
+ go Dial("0401", "0512", "pad-rule-pacus-occ", "ano8", "ano8", "8") // PACUs dial OCC8
|
|
|
}
|
|
|
} else {
|
|
|
lfshook.NewLogger().Infof("====PAD-OCC Priority false===")
|