This web application is built up using Spring boot.
- Java - 11
- Ngrok
- A Twilio account signed up
This is an completed Twilio client spring boot project. Before run the project you should have to gather following properties.
Config Value | Description |
---|---|
twilio.account_sid |
Your primary Twilio account identifier - find this in the console here. |
twilio.twiml.app.sid |
The TwiML application with a voice URL configured to access your server running this app - create one in the console here. Also, you will need to configure the Voice "REQUEST URL" on the TwiML app once you've got your server up and running. |
twilio.trial_number |
A Twilio phone number in E.164 format - you can get one here |
twilio.api.key / twilio.api.secret |
Your REST API Key information needed to create an Access Token - create one here. |
- When after you gather above details, you should have to update application.properties file with gatherd keys.
- Then open the cmd or terminal and go to root directry (where the application.properties file available) then run
mvn spring-boot:run
command. - Then navigate to http://localhost:8080 - Here you can see the application is working fine.
- You should have to run it with ngork to locally check it. So to that open the terminal and run
ngrok http 8080
command. So the terminal will display ngrok forwarded URL. Copy it and navigate to it from the browser. - This is the final step. All the application side changes are alomost over. Now you should have to setup the twilio configurations. Go to the TWIML application and click on the application you created. And update the voice URL with
ngrok forwaded URL + /call/voice
and keep the method type as default (HTTP Post). Ex: https://71da93bcb0b9.ngrok.io/call/voice And finally update the phone voice URL so you are ok to test the application. To update the phone voice URL navigate to the phone numbers . Click on a phone number and then update the voice URL withngrok forwaded URL + /call/direct-client
and keep the method type as default (HTTP Post). Ex: https://71da93bcb0b9.ngrok.io/call/direct-client
Hopefully, Now your application is running without issue. If you faced any issue post those in issues section.