diff --git a/CallAutomationTests/Handlers/CallEventHandler.cs b/CallAutomationTests/Handlers/CallEventHandler.cs index 98ef14ad..eec06737 100644 --- a/CallAutomationTests/Handlers/CallEventHandler.cs +++ b/CallAutomationTests/Handlers/CallEventHandler.cs @@ -18,12 +18,9 @@ public class CallEventHandler : IEventCloudEventHandler, IEventCloudEventHandler, IEventCloudEventHandler, - IEventCloudEventHandler, - IEventCloudEventHandler, IEventCloudEventHandler, IEventCloudEventHandler, IEventCloudEventHandler, - IEventCloudEventHandler, IEventCloudEventHandler, IEventCloudEventHandler, IEventCloudEventHandler, @@ -123,25 +120,13 @@ public Task Handle(AddParticipantSucceeded addParticipantSucceeded, string calle if (operationContext == Constants.OperationContext.AgentJoining) { - _logger.LogInformation($"Attempting to stop hold music"); + //_logger.LogInformation($"Attempting to stop hold music"); var callConnectionId = addParticipantSucceeded.CallConnectionId; _callContextService.AddAgentAcsId(callConnectionId, addParticipantSucceeded.Participant.RawId); } - else if (operationContext == Constants.OperationContext.SupervisorJoining) - { - _logger.LogInformation($"Adding supervisor to call."); - var callConnectionId = addParticipantSucceeded.CallConnectionId; - var callConnection = _callAutomationService.GetCallConnection(callConnectionId); - callConnection.MuteParticipants(addParticipantSucceeded.Participant, operationContext); - - _callContextService.AddAgentAcsId(callConnectionId, addParticipantSucceeded.Participant.RawId); - } - else - { - _logger.LogWarning($"AddParticipantSucceeded for a non-agent. Call ID was '{addParticipantSucceeded.CorrelationId}'"); - } + return Task.CompletedTask; } @@ -162,11 +147,7 @@ public async Task Handle(CallConnected callConnected, string callerId) var operationContext = callConnected.OperationContext; - if (operationContext == Constants.OperationContext.AgentJoining || operationContext == Constants.OperationContext.SupervisorJoining) - { - _logger.LogCritical($"CallConnected was for an agent or supervisor, callerId was '{callerId}'. Set the allowlist to prevent accepting calls from the IVR."); - return; - } + var callId = callConnected.CorrelationId; var callConnectionId = callConnected.CallConnectionId; @@ -194,17 +175,7 @@ public async Task Handle(CallConnected callConnected, string callerId) var ivrConfig = _callAutomationService.GetIvrConfig(); var textToSpeechLocale = ivrConfig["TextToSpeechLocale"]; - // Recognized phone number - if (ivrConfig.GetValue("UseNlu") && ivrConfig.GetValue("UseAiPairing")) - { - _logger.LogInformation("Caller ID was recognized, sending to AI pairing immediately"); - //await PromptCustomerForAiPairing(callConnection, textToSpeechLocale, callerId); - } - else - { - _logger.LogInformation("Caller ID was recognized, sending to IVR immediately"); - await PlayMainMenu(callConnection, textToSpeechLocale, callerId, prerollText); - } + } } @@ -264,15 +235,7 @@ public async Task Handle(CallDisconnected callDisconnected, string callerId) } } - public Task Handle(CallTransferAccepted callTransferAccepted, string callerId) - { - throw new NotImplementedException(); - } - public Task Handle(CallTransferFailed callTransferFailed, string callerId) - { - throw new NotImplementedException(); - } public async Task Handle(ParticipantsUpdated participantsUpdated, string callerId) { @@ -416,15 +379,7 @@ public async Task Handle(PlayFailed playFailed, string callerId) } } - public Task Handle(PlayCanceled playCanceled, string callerId) - { - using (_logger.BeginScope(GetLogContext(playCanceled.CorrelationId, playCanceled.CallConnectionId, playCanceled.OperationContext))) - { - _logger.LogInformation($"PlayCanceled received for OperationContext: '{playCanceled.OperationContext}'"); - - return Task.CompletedTask; - } - } + public async Task Handle(RecognizeCompleted recognizeCompleted, string callerId) { diff --git a/CallAutomationTests/ServiceCollectionExtensions.cs b/CallAutomationTests/ServiceCollectionExtensions.cs index bc9e16c8..d15d2974 100644 --- a/CallAutomationTests/ServiceCollectionExtensions.cs +++ b/CallAutomationTests/ServiceCollectionExtensions.cs @@ -17,13 +17,11 @@ public static IServiceCollection AddAllEventGridEventHandlers(this IServiceColle services.AddSingleton, CallEventHandler>(); services.AddSingleton, CallEventHandler>(); services.AddSingleton, CallEventHandler>(); - services.AddSingleton, CallEventHandler>(); - services.AddSingleton, CallEventHandler>(); - services.AddSingleton, CallEventHandler>(); + services.AddSingleton, CallEventHandler>(); services.AddSingleton, CallEventHandler>(); services.AddSingleton, CallEventHandler>(); services.AddSingleton, CallEventHandler>(); - services.AddSingleton, CallEventHandler>(); + services.AddSingleton, CallEventHandler>(); services.AddSingleton, CallEventHandler>(); services.AddSingleton, CallEventHandler>(); diff --git a/CallAutomationTests/appsettings.json b/CallAutomationTests/appsettings.json index 13a6bf50..dddab56f 100644 --- a/CallAutomationTests/appsettings.json +++ b/CallAutomationTests/appsettings.json @@ -6,7 +6,7 @@ } }, "ConnectionStrings": { - "ACS": "%ACS%", + "ACS": "endpoint=https://acs-callautomation.communication.azure.com/;accesskey=cqfE3K8naankZhP+DKkPuz0V/IUqe7WqRzMm3WriAYhA7/oMHEVXiIxxRz7d5aPweiu1IZFsVsL3G551UhhlzA==", "StorageAccount": "" }, "IVRText": { @@ -38,7 +38,7 @@ "PairingCompleted": "Let me get you connected to someone in our {0} service department who can look into this.", "PairingCompletedOther": "Let me get you connected to someone who can look into this.", "CustomerQueryTimeout": "I'm sorry, I wasn't quite able to hear that.", - "PostCallSurvey": "Thank you for staying on the line. How would you rate your customer service experience during this call today? Press 1 for satisfied, 2 for neutral, or 3 for dissatisfied." + // "PostCallSurvey": "Thank you for staying on the line. How would you rate your customer service experience during this call today? Press 1 for satisfied, 2 for neutral, or 3 for dissatisfied." }, "Queues": { "AllAgentsQueue": { @@ -71,26 +71,13 @@ "UseAiPairing": false, "UseCustomPhraseRecognition": false, "PostCallSurvey": true, - "SpeechKey": "", - "SpeechRegion": "", - "SpeechRecognitionLanguage": "en-US", "CustomerQueryTimeout": 22, "MainMenuTimeout": 10, "AccountIdTimeout": 33, "PostCallSurveyTimeout": 20, - "AudioStreamBufferSize": 2048, - "SegmentationSilenceTimeoutMsForAccountId": 2000, - "SegmentationSilenceTimeoutMsForCustomerQuery": 2000, - "CloseCallOnHangup": false, - "AllowMenuInterrupt": false, - "AnnounceEstimatedWaitTime": true, - "AnnounceEstimatedWaitTimeThreshold": 5, "RecognizerInitialSilenceTimeout": 10, - "DtmfInterToneTimeout": 5, - "EndCallRecognizePhrases": [ "End Call", "Hang up", "Fourth", "Four", "4", "End the call" ], - "RecognizePhrasesYes": [ "Yes", "One" ], - "RecognizePhrasesNo": [ "No", "Two" ], - "OperatorRecognizePhrases": [ "Operator", "all agents", "any agent", "help" ] + "DtmfInterToneTimeout": 5 + }, "AllowedHosts": "*", "EventGridSecret": "abc123",