|
|
@@ -112,11 +112,11 @@ func CallNotify(event map[string]string) {
|
|
|
// if event["Event"] == "DialBegin" && strings.Compare(event["Context"], "macro-stdexten") == 0 {
|
|
|
if event["Event"] == "DialBegin" {
|
|
|
lfshook.NewLogger().Error(event)
|
|
|
- if TimetimesList[event["Linkedid"]] != 0 {
|
|
|
- TimetimesList[event["Linkedid"]] = TimetimesList[event["Linkedid"]] + 1
|
|
|
- } else {
|
|
|
- TimetimesList[event["Linkedid"]] = 1
|
|
|
- }
|
|
|
+ // if TimetimesList[event["Linkedid"]] != 0 {
|
|
|
+ // TimetimesList[event["Linkedid"]] = TimetimesList[event["Linkedid"]] + 1
|
|
|
+ // } else {
|
|
|
+ // TimetimesList[event["Linkedid"]] = 1
|
|
|
+ // }
|
|
|
|
|
|
Channel := strings.Split(event["Channel"], "/")
|
|
|
fmt.Println("Channel[0] = ", Channel[0])
|
|
|
@@ -154,6 +154,7 @@ func CallNotify(event map[string]string) {
|
|
|
go httpclient.ZohoGet(getURL)
|
|
|
|
|
|
} else if (strings.HasPrefix(event["Context"], "department") || strings.HasSuffix(event["Context"], "queue")) && slices.Contains(ZohoExtenList, event["DestCallerIDNum"]) {
|
|
|
+ TimetimesList[event["Linkedid"]] = TimetimesList[event["Linkedid"]] + 1
|
|
|
StartTimeList[event["Linkedid"]] = time.Now().Add(-8 * time.Hour)
|
|
|
getURL := fmt.Sprintf("%s/phonebridge/v3/callnotify?type=received&state=ringing&id=%s&from=%s&to=%s", ZOHO_URL, event["Linkedid"], event["CallerIDNum"], event["DestCallerIDNum"])
|
|
|
// if zohoUser != "" {
|