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).
The Answering Machine Detection feature is used to detect if a call was answered by a machine/voicemail or by a human.
The AMD SETUP must happen before the call is answered by the CALLEE, allowing Sinch's AMD Algorithm to analyze the call initial interaction. This configuration is performed in the Initial Call Event - ICE, and in order to work, customer's must use Sinch CustomCallout method.
We offer 2 different methods of interactions between customers and our AMD engine:
This is the simplest method and it will only inform the user if the call was answered by a machine or a human, this information is relayed to customers as part of our standard Answered Call Event - ACE request. Customers can than decide how to react (hangup, connectConf... ) in a synchronous way.
This is a more complete method, and it can not only identify if the call was answered by a machine or a human, but it can also NOTIFY the customer when the beep is detected, so customers can know the right time to leave a message if the call was answered by a machine.
This method is considered asynchronous, due to the fact that an ACE request will be sent to Sinch customer's backend immediately after the call is answered, allowing the standard call flow to continue, while Sinch will send a different notification event if or when the machine beep signal is detected.
See Manage Call API PATCH - How to update a call in progress.
To enable the AMD feature, customers just need to setup their SVAML ICE Response with one of the following parameters:
Synchronous - No beep detection:
"amd": {"enabled": true},or
"amd": {"enabled": true, "async": false},Asynchronous - With beep detection:
"amd": {"enabled": true, "async": true},curl --location --request POST 'https://calling.api.sinch.com/calling/v1/callouts' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXX' \
--data '{
"method": "customCallout",
"customCallout": {
"ice": "{\\"action\\": {\\"name\\": \\"connectPstn\\",\\"number\\": \\"+XXXXXXXXXXX\\",\\"cli\\": \\"+YYYYYYYYYY\\",\\"maxDuration\\": 14400, \\"amd\\": {\\"enabled\\": true, \\"async\\": false}, \\"locale\\": \\"en-US\\" }}",
"enableAce": true,
"enableDice": true
}
}
'curl --location --request POST 'https://calling.api.sinch.com/calling/v1/callouts' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXX' \
--data '{
"method": "customCallout",
"customCallout": {
"ice": "{\\"action\\": {\\"name\\": \\"connectPstn\\",\\"number\\": \\"+XXXXXXXXXXX\\",\\"cli\\": \\"+YYYYYYYYYY\\",\\"maxDuration\\": 14400, \\"amd\\": {\\"enabled\\": true, \\"async\\": true}, \\"locale\\": \\"en-US\\" }}",
"enableAce": true,
"enableDice": true
}
}
'Machine/Human:
Body:
{
event: 'notify',
callid: 'edbc97b3-5aaf-4622-8291-b7f9c9792cc9',
version: 1,
type: 'amd',
amd: { status: 'machine', reason: 'n/a', duration: 3 }
}Beep:
Body:
{
event: 'notify',
callid: 'edbc97b3-5aaf-4622-8291-b7f9c9792cc9',
version: 1,
type: 'amd_beep',
amd: { status: 'machine', reason: 'beep', duration: 8 }
}NoBeep:
Body:
{
event: 'notify',
callid: 'edbc97b3-5aaf-4622-8291-b7f9c9792cc9',
version: 1,
type: 'amd_no_beep',
amd: { status: 'machine', reason: 'nobeep', duration: 12 }
}The accuracy of the Answering Machine Detection feature may vary due to the variety of voicemail messages lengths, audio quality and beep types.



