BotSharp/src/Plugins/BotSharp.Plugin.Twilio/OutboundPhoneCallHandler/Hooks/OutboundPhoneCallHandlerUtilityHook.cs

22 lines
656 B
C#
Raw Normal View History

2024-11-21 06:50:55 +00:00
using BotSharp.Abstraction.Agents.Models;
2024-11-19 19:05:12 +00:00
using BotSharp.Plugin.Twilio.OutboundPhoneCallHandler.Enums;
2024-11-21 06:50:55 +00:00
namespace BotSharp.Plugin.Twilio.OutboundPhoneCallHandler.Hooks;
public class OutboundPhoneCallHandlerUtilityHook : IAgentUtilityHook
2024-11-19 19:05:12 +00:00
{
2024-11-21 06:50:55 +00:00
private static string OUTBOUND_PHONE_CALL_FN = "twilio_outbound_phone_call";
public void AddUtilities(List<AgentUtility> utilities)
2024-11-19 19:05:12 +00:00
{
2024-11-21 06:50:55 +00:00
var utility = new AgentUtility
2024-11-19 19:05:12 +00:00
{
2024-11-21 06:50:55 +00:00
Name = UtilityName.OutboundPhoneCall,
Functions = [new(OUTBOUND_PHONE_CALL_FN)],
Templates = [new($"{OUTBOUND_PHONE_CALL_FN}.fn")]
};
utilities.Add(utility);
2024-11-19 19:05:12 +00:00
}
}