This repository is archived and no longer maintained. Check out the Twilio Voice docs for links to other tutorials.
- .NET Framework
- A Twilio account - sign up
- ngrok
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:
Config Value | Description |
---|---|
Account Sid | Your primary Twilio account identifier - find this in the Console. |
Auth Token | Used to authenticate - just like the above, you'll find this here. |
Phone number | A Twilio phone number in E.164 format - you can get one here |
After the above requirements have been met:
- Clone this repository and
cd
into it
git clone https://github.com/TwilioDevEd/clicktocall-csharp.git
cd clicktocall-csharp
- Set your configuration variables
copy ClickToCall.Web/Local.config.example ClickToCall.Web/Local.config
See Twilio Account Settings to locate the necessary environment variables.
-
Endpoints like
https://<your-ngrok-subdomain>.ngrok.io/Call/Connect
needs to be publicly accessible. We recommend using ngrok to solve this problem. Set up and run ngrok:ngrok http 1430 host-header="localhost:1430"
(or use the ngrok Visual Studio extension) -
Be sure to update the "PublicUrl" AppSetting in
ClickToCall.Web/Local.config
to match your ngrok URL (without a trailing slash). -
Build the solution
-
Run the application
-
Navigate to
https://<your-ngrok-subdomain>.ngrok.io
That's it!
- The CodeExchange repository can be found here.
No warranty expressed or implied. Software is as is.