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

23 lines
721 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-12-04 22:12:02 +00:00
private static string PREFIX = "util-twilio-";
private static string OUTBOUND_PHONE_CALL_FN = $"{PREFIX}twilio_outbound_phone_call";
2024-11-21 06:50:55 +00:00
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,
2024-12-04 22:12:02 +00:00
Functions = [new($"{OUTBOUND_PHONE_CALL_FN}")],
2024-11-21 06:50:55 +00:00
Templates = [new($"{OUTBOUND_PHONE_CALL_FN}.fn")]
};
utilities.Add(utility);
2024-11-19 19:05:12 +00:00
}
}