|
|
@@ -213,7 +213,7 @@ func HandleAMI(event map[string]string) {
|
|
|
if event["ConnectedLineNum"] == "ani1" && event["Exten"] == "0511" { //PAD answered by ICP; PACUs connected ICP1
|
|
|
lfshook.NewLogger().Infof("====PAD answered by ICP1:%s=====", event["ConnectedLineName"])
|
|
|
alstatus.AlarmStatus(event["ConnectedLineName"], "connect")
|
|
|
- go Dial("0402", "2311", "chanspy-rule", "ani1", event["ConnectedLineName"], "8") //trigger ChanSpyStart ,ICP8 whisper ICP1
|
|
|
+ go Dial("0402", "2311", "chanspy-rule-whisper", "ani1", event["ConnectedLineName"], "8") //trigger ChanSpyStart ,ICP8 whisper ICP1
|
|
|
//goto event=ChanSpyStart; PAD whisper ICP8
|
|
|
break
|
|
|
}
|
|
|
@@ -221,7 +221,7 @@ func HandleAMI(event map[string]string) {
|
|
|
if event["ConnectedLineNum"] == "ani8" && event["Exten"] == "0511" { //PAD ansered by ICP8; PACUs connected ICP8
|
|
|
lfshook.NewLogger().Infof("====PAD answered by ICP8:%s=====", event["ConnectedLineName"])
|
|
|
alstatus.AlarmStatus(event["ConnectedLineName"], "connect")
|
|
|
- go Dial("0402", "2381", "chanspy-rule", "ani8", event["ConnectedLineName"], "1") //trigger ChanSpyStart ,ICP1 whisper ICP8
|
|
|
+ go Dial("0402", "2381", "chanspy-rule-whisper", "ani8", event["ConnectedLineName"], "1") //trigger ChanSpyStart ,ICP1 whisper ICP8
|
|
|
//goto event=ChanSpyStart; PAD whisper ICP1
|
|
|
break
|
|
|
}
|
|
|
@@ -230,7 +230,7 @@ func HandleAMI(event map[string]string) {
|
|
|
if event["ConnectedLineNum"] == "ano1" && event["Exten"] == "0512" { //PAD answered by OCC; PACUs connected IO1
|
|
|
lfshook.NewLogger().Infof("====PAD answered by OCC1:%s=====", event["ConnectedLineName"])
|
|
|
alstatus.AlarmStatus(event["ConnectedLineName"], "connect")
|
|
|
- go RedirectInQueue(event["ConnectedLineName"], "1411", "chanspy-rule", "") //PAD whisper IO1
|
|
|
+ go RedirectInQueue(event["ConnectedLineName"], "1411", "chanspy-rule-whisper", "") //PAD whisper IO1
|
|
|
//goto event=ChanSpyStart; ICPs spy PAD
|
|
|
break
|
|
|
}
|
|
|
@@ -238,7 +238,7 @@ func HandleAMI(event map[string]string) {
|
|
|
if event["ConnectedLineNum"] == "ano8" && event["Exten"] == "0512" { //PAD ansered by OCC8; PACUs connected IO8
|
|
|
lfshook.NewLogger().Infof("====PAD answered by OCC8:%s=====", event["ConnectedLineName"])
|
|
|
alstatus.AlarmStatus(event["ConnectedLineName"], "connect")
|
|
|
- go RedirectInQueue(event["ConnectedLineName"], "1481", "chanspy-rule", "") //PAD whisper IO8
|
|
|
+ go RedirectInQueue(event["ConnectedLineName"], "1481", "chanspy-rule-whisper", "") //PAD whisper IO8
|
|
|
//goto event=ChanSpyStart; ICPs spy PAD
|
|
|
break
|
|
|
}
|
|
|
@@ -248,19 +248,19 @@ func HandleAMI(event map[string]string) {
|
|
|
//PAD answered by ICP ; PAD whisper ICP
|
|
|
if event["SpyerConnectedLineName"] == "2381" && event["SpyerCallerIDNum"] == "2311" { //check if it is ICP8 whisper ICP1
|
|
|
lfshook.NewLogger().Infof("====PAD answered by ICP===;PAD whisper 2381=====")
|
|
|
- go RedirectInQueue(event["SpyeeConnectedLineName"], "2381", "chanspy-rule", "") //PAD whisper ICP8
|
|
|
+ go RedirectInQueue(event["SpyeeConnectedLineName"], "2381", "chanspy-rule-whisper", "") //PAD whisper ICP8
|
|
|
break
|
|
|
}
|
|
|
|
|
|
if event["SpyerConnectedLineName"] == "2311" && event["SpyerCallerIDNum"] == "2381" { //check if it is ICP1 whisper ICP8
|
|
|
lfshook.NewLogger().Infof("====PAD answered by ICP===;PAD whisper 2311=====")
|
|
|
- go RedirectInQueue(event["SpyeeConnectedLineName"], "2311", "chanspy-rule", "") //PAD whisper ICP1
|
|
|
+ go RedirectInQueue(event["SpyeeConnectedLineName"], "2311", "chanspy-rule-whisper", "") //PAD whisper ICP1
|
|
|
break
|
|
|
}
|
|
|
|
|
|
//PAD answered by OCC; ICPs chanspy PAD
|
|
|
if utils.IsPAIU(event["SpyeeConnectedLineName"]) && utils.IsIO(event["SpyerExten"]) { // check if it is PAD whisper IO
|
|
|
- Dial("0404", event["SpyeeConnectedLineName"], "chanspy-rule-icps", "ano", "ano", "") //ICPs chanspy PAD
|
|
|
+ go Dial("0404", event["SpyeeConnectedLineName"], "chanspy-rule", "ano", "ano", "") //ICPs chanspy PAD
|
|
|
}
|
|
|
|
|
|
case "ConfbridgeLeave":
|
|
|
@@ -312,12 +312,11 @@ func HandleAMI(event map[string]string) {
|
|
|
alstatus.AlarmStatus(event["CallerIDName"], "connect") // Alarm connected
|
|
|
|
|
|
if active.CabNum == "1" && active.Actived {
|
|
|
- go Dial("0403", "2311", "chanspy-rule", "ICP8-ICP1", "ICP8-ICP1", "8") // ICP8 whisper ICP1
|
|
|
- //goto ChanSpyStart, PAD whisper ICP8
|
|
|
+ go RedirectInQueue(event["CallerIDName"], "2311", "chanspy-rule-whisper", "") //PAD chanspy(EqW) ICP1
|
|
|
} else if active.CabNum == "8" && active.Actived {
|
|
|
- go Dial("0403", "2381", "chanspy-rule", "ICP8-ICP1", "ICP8-ICP1", "8") // ICP1 whisper ICP8
|
|
|
- //goto ChanSpyStart, PAD whisper ICP1
|
|
|
+ go RedirectInQueue(event["CallerIDName"], "2381", "chanspy-rule-whisper", "") //PAD chanspy(EqW) ICP8
|
|
|
}
|
|
|
+ //Goto ChanSpyStart; ICP spy PAD
|
|
|
} else if utils.IsPAIU(event["CallerIDNum"]) {
|
|
|
lfshook.NewLogger().Infof("====send pad status=====")
|
|
|
alstatus.AlarmStatus(event["CallerIDNum"], "connect") // PAD connect ICP-TMS
|
|
|
@@ -339,7 +338,7 @@ func StartAMI(connectOKCallBack func(), handleEvents []func(event map[string]str
|
|
|
// lfshook.NewLogger().Infof("ami event on %+v", payload[0])
|
|
|
event := payload[0].(map[string]string)
|
|
|
|
|
|
- HandleAMI(event)
|
|
|
+ go HandleAMI(event)
|
|
|
|
|
|
for _, handle := range handleEvents {
|
|
|
go handle(event)
|