Skip to content

twilio-samples/add-mp3-to-phone-call

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

  • dotnet
  • A Twilio account - sign up
  • A Twilio Phone Number provisioned for voice
  • An MP3 (upload to a space that is available on the web, such as Twilio assets)

Twilio Account Settings

This application should give you a ready-made starting point for writing your own application. Before we begin, we need to collect all the config values we need to run the application:

  • Account SID
  • Auth Token
  • Twilio Phone Number
  • Incoming Phone Number

Local development

After the above requirements have been met:

  1. Clone this repository and cd into it
git clone git@github.com:twilio-samples/add-mp3-to-phone-call
cd add-mp3-to-phone-call
  1. Add necessary nuget packages
dotnet add package Twilio
dotnet add package Microsoft.Extensions.Configuration
dotnet add package Microsoft.Extensions.Configuration.UserSecrets

  1. Set necessary user secrets by getting the credentials from your Twilio dashboard:
dotnet user-secrets init
dotnet user-secrets set Twilio:AccountSid [TWILIO_ACCOUNT_SID]
dotnet user-secrets set Twilio:AuthToken [TWILIO_AUTH_TOKEN]
dotnet user-secrets set Twilio:PhoneNumber [TWILIO_PHONE_NUMBER]
dotnet user-secrets set ReceivingNumber [NUMBER_TO_CALL]
  1. Replace placeholder value ASSET_URL in the application with the URL of your MP3 Asset

  2. Build to install the dependencies

dotnet build
  1. Run the application
dotnet run

About

Demo for Twilio

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages