Use Twilio to track the effectiveness of your different marketing campaigns. Learn how call tracking helps organizations in these Twilio customer stories.
This project is configured to use a TwiML App, which allows us to easily set the voice URLs for all Twilio phone numbers we purchase in this app.
Create a new TwiML app at https://www.twilio.com/console/phone-numbers/runtime/twiml-apps and use
its Sid
as the TWIML_APPLICATION_SID
environment variable wherever you run
this app.
You can learn more about TwiML apps here: https://www.twilio.com/help/faq/twilio-client/how-do-i-create-a-twiml-app
This project is built using the ASP.NET MVC web framework.
-
First clone this repository and
cd
into its directory:git clone git@github.com:TwilioDevEd/call-tracking-csharp.git cd call-tracking-csharp
-
Create a copy of
CallTracking.Web/Local.config.sample
and rename it toCallTracking.Web/Local.config
. -
Open
CallTracking.Web/Local.config
and update the following keys:<appSettings> <add key="TwilioAccountSid" value="TWILIO_ACCOUNT_SID"/> <add key="TwilioAuthToken" value="TWILIO_AUTH_TOKEN"/> <add key="TwiMLApplicationSid" value="TWIML_APPLICATION_SID"/> </appSettings>
-
Build the solution.
-
Make sure you have SQL Server Express 2019 with LocalDB support
-
Run
Update-Database
to execute the migrations.(Be sure to check that your database server name matches the one from the connection string on
Web.config
. For reference, default values where used upon SQLServer installation)Running the command Update-Database will run the migrations and run the Seed method, if you want to inspect this you can use SQL Server Object Explorer.
That's it!