Twilio SDK-based SMS and voice dispatcher implementation for Transmitly.
Most users should use the convenience package instead:
That package registers this SDK implementation for you.
TwilioSmsChannelProviderDispatcherfor theSmschannel.TwilioVoiceChannelProviderDispatcherfor theVoicechannel.- SMS and voice delivery-report request adaptors for Twilio webhooks.
- Concrete SMS, voice, and delivery-report extended property adaptors.
using Transmitly;
using Transmitly.ChannelProvider.Twilio.Configuration;
using Transmitly.ChannelProvider.Twilio.Sdk;
using Transmitly.ChannelProvider.Twilio.Sdk.Sms;
using Transmitly.ChannelProvider.Twilio.Sdk.Voice;
var builder = new CommunicationsClientBuilder();
var options = new TwilioClientOptions
{
AccountSid = "your-account-sid",
AuthToken = "your-auth-token"
};
builder.ChannelProvider
.Build(Id.ChannelProvider.Twilio(), options)
.AddDispatcher<TwilioSmsChannelProviderDispatcher, ISms>(Id.Channel.Sms())
.AddDispatcher<TwilioVoiceChannelProviderDispatcher, IVoice>(Id.Channel.Voice())
.AddDeliveryReportRequestAdaptor<TwilioSmsDeliveryStatusReportAdaptor>()
.AddDeliveryReportRequestAdaptor<TwilioVoiceDeliveryStatusReportAdaptor>()
.AddDeliveryReportExtendedProprtiesAdaptor<DeliveryReportExtendedProperties>()
.AddSmsExtendedPropertiesAdaptor<ExtendedSmsChannelProperties>()
.AddVoiceExtendedPropertiesAdaptor<ExtendedVoiceChannelProperties>()
.Register();Copyright (c) Code Impressions, LLC. This open-source project is sponsored and maintained by Code Impressions and is licensed under the Apache License, Version 2.0.