An example application implementing an automated phone line using Twilio.
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/ivr-phone-tree-csharp.git cd ivr-phone-tree-csharp
-
Build the solution.
-
Expose your application to the wider internet using ngrok. This step is important because the application won't work as expected if you run it through localhost.
To start using ngrok
in our project you'll have execute to the following line in the command prompt.
ngrok http 1112 -host-header="localhost:1112"
Keep in mind that our endpoint is:
http://<your-ngrok-subdomain>.ngrok.io/ivr/welcome
Remember to update the Local.config file with the generated ngrok subdomain.
- Configure Twilio to call your webhooks.
You will also need to configure Twilio to call your application when calls are received in your Twilio Number. The voice url should look something like this:
http://<your-ngrok-subdomain>.ngrok.io/ivr/welcome
Learn how to configure your Twilio phone number for Programmable Voice.
To run the unit tests within Visual Studio, install the NUnit 3 Test Adapter: https://marketplace.visualstudio.com/items?itemName=NUnitDevelopers.NUnit3TestAdapter
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.