Sinch Voice API: Choosing between v1 and v2
For all new projects, please use Voice API v2. This is especially important for projects involving:
- AI capabilities like Streams and Voice Relay
- Voice campaigns like Batch calling
You should only use the older Voice API v1 if one of the following is a strict requirement:
- The project must be in General Availability (GA).
- The project requires In-App voice or Conferencing (until these features are available in v2).
We've put together a repository of helpful Java SDK applications that our developers have coded and extensively tested and that's the basis of this tutorial. In this case, the application is a light-weight Springboot web server used to listen to incoming callback events from the Sinch servers. This application also has a console component so that you can enter a phone number to get the process started.
Normally you wouldn't have a console application as part of a server, but to streamline this tutorial we combined them. In a production scenario there would be some other mechanism that would enter the phone numbers to make the callouts, such as reading from a database or a CSV file.
The code is already written and all you need to do is clone the repo and enter your credentials.
- If you haven't already, clone the Java SDK repository located on GitHub. The qualify leads application is located in the
examples/tutorials/voice/capture-leads-appfolder. - Once the repository is cloned, navigate to the
tutorials/voice/capture-leads-app/src/main/resourcesfolder and open theapplication.yamlfile. - In the
credentialssection of the file, you'll need to enter the application key and application secret for your Voice app. These are found on your Sinch Build Dashboard. - For the
sinch-numberparameter, you'll need to enter a Sinch number you own and that is assigned to your Voice app. - For the
sip-addressparameter, if you have a SIP infrastructure and you want to test this application with it, this is where you will enter your SIP address. If you don't have a SIP infrastructure or don't want to use it, you can leave this parameter empty. - Once you've filled in your credentials and the necessary values, make sure you save the file.
Now let's move on to learning about how to make a custom callout and configure it to enable Answering Machine Detection!



