Transmitly.ChannelProvider.Twilio is the convenience package for using Transmitly with Twilio for SMS and voice calls.
This is the package most applications should install. It wires together:
Transmitly.ChannelProvider.Twilio.ConfigurationTransmitly.ChannelProvider.Twilio.Sdk
Supported channels:
SmsVoice
dotnet add package Transmitly.ChannelProvider.Twiliousing Transmitly;
ICommunicationsClient client = new CommunicationsClientBuilder()
.AddTwilioSupport(options =>
{
options.AccountSid = "your-account-sid";
options.AuthToken = "your-auth-token";
})
.AddPipeline("sms-alert", pipeline =>
{
pipeline.AddSms("+15550001111".AsIdentityAddress(), sms =>
{
sms.Message.AddStringTemplate("There is an update on your account.");
});
})
.BuildClient();
var result = await client.DispatchAsync(
"sms-alert",
"+15551234567".AsIdentityAddress(),
new { });AddTwilioSupport(options => ...) accepts TwilioClientOptions.
Common settings:
AccountSid: your Twilio account SID.AuthToken: your Twilio auth token.WebProxy: optional outbound proxy.Edge: defaults toashburn.Region: defaults tous1.
This package registers Twilio extensions for both SMS and voice channels.
SMS features are available through sms.Twilio():
MessagingServiceSidStatusCallbackUrlStatusCallbackUrlResolverStatusCallbackMethod
Voice features are available through voice.Twilio():
StatusCallbackUrlandStatusCallbackUrlResolverUrlandUrlResolverfor TwiML hostingTimeoutMachineDetectionOnStoreMessageForRetrievalAsync
The voice dispatcher can send inline TwiML when the generated TwiML is short enough. If the generated TwiML is too large, you must provide a Url or UrlResolver so Twilio can retrieve the call instructions.
This package registers Twilio SMS and voice delivery-report request adaptors and the Twilio delivery-report extended properties adaptor, which makes report.Twilio() available for provider-specific webhook data.
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.