dss 2 years ago
parent
commit
af1d642a6b

+ 1 - 1
src/CallCenter.Api/appsettings.Development.json

@@ -37,7 +37,7 @@
   },
   "AllowedHosts": "*",
   "DeviceConfigs": {
-    "Address": "http://192.168.100.100/xml",
+    "Address": "http://192.168.100.101/xml",
     "Authorize": true,
     "ReceiveKey": "E1BBD1BB-A269-44",
     "SendKey": "2A-BA92-160A3B1D",

+ 1 - 1
src/CallCenter.Api/appsettings.json

@@ -37,7 +37,7 @@
   },
   "AllowedHosts": "*",
   "DeviceConfigs": {
-    "Address": "http://192.168.100.100/xml",
+    "Address": "http://192.168.100.101/xml",
     "Authorize": true,
     "ReceiveKey": "E1BBD1BB-A269-44",
     "SendKey": "2A-BA92-160A3B1D",

+ 11 - 4
src/CallCenter.Application/Handlers/FlowControl/ByeVisitorAndExtNotificationHandler.cs

@@ -51,12 +51,19 @@ namespace CallCenter.Application.Handlers
                 //处理队列记录
                 _callCacheManager.RemoveCallCache(model.Id);
 
-                //调用业务通知 通知前端
-                var workModel = _userCacheManager.GetWorkByTel(notification.TelNo);
-                if (workModel!=null)
+                //查询应答分机分机号
+                var callDetailAnswer = await _callDetailRepository.GetAsync(x => x.CallId == model.Id && x.EventName == "ANSWER");
+                if (callDetailAnswer != null)
                 {
-                    await _realtimeService.ByeAsync(workModel.UserId, new ByeDto() { Id = model.Id }, cancellationToken);
+                    //调用业务通知 通知前端
+                    var workModel = _userCacheManager.GetWorkByTel(callDetailAnswer.AnswerNo);
+                    if (workModel != null)
+                    {
+                        await _realtimeService.ByeAsync(workModel.UserId, new ByeDto() { Id = model.Id }, cancellationToken);
+                    }
                 }
+
+                
             }
         }
     }