Answer call
Changed onAnswer an incoming call. You must issue this command before executing subsequent commands on an incoming call.
To answer with an AI assistant, include assistant.id and any per-call overrides in the assistant object. Telnyx attempts to warm up the assistant before answering the call, then starts the assistant automatically when the call is answered. Do not also send ai_assistant_start for this flow. The HTTP success response can arrive before the call is answered; use the call.answered webhook to track the answer. If warm-up fails, Telnyx falls back to starting the assistant after answering.
When assistant.id is supplied, obtain the conversation ID from data.payload.conversation_id in the call.conversation.created webhook and correlate it using data.payload.call_control_id. The answer HTTP response does not include conversation_id. The created event is emitted during assistant startup and does not indicate that the assistant is ready to speak.
Set the assistant voice with assistant.voice_settings.voice and speech-to-text settings with assistant.transcription. You can reuse one stored assistant with different per-call settings. Warm-up prepares assistant configuration and dependencies; it does not wait for the greeting audio to be ready or guarantee zero silence after answer. A plain answer followed by ai_assistant_start performs assistant startup after the call has already been answered.
Expected Webhooks:
- call.answered
- call.conversation.created when the requested assistant conversation is created
- call.hold and call.unhold if the call is held/unheld
- call.deepfake_detection.result if deepfake_detection was enabled
- call.deepfake_detection.error if deepfake_detection was enabled and an error occurred
- streaming.started, streaming.stopped or streaming.failed if stream_url was set
When the record parameter is set to record-from-answer, the response will include a recording_id field.
Request
- Base URL: https://api.telnyx.com/v2
- URL: https://api.telnyx.com/v2/calls/{call_control_id}/actions/answer
- Auth: HTTP bearer
Path parameters
Unique identifier and token for controlling the call
Request body
Example request
{
"assistant": {
"id": "asst_123"
},
"client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d",
"command_id": "891510ac-f3e4-11e8-af5b-de00688a4901",
"webhook_url": "https://www.example.com/server-b/",
"webhook_url_method": "POST",
"send_silence_when_idle": true,
"deepfake_detection": {
"enabled": true,
"timeout": 15,
"rtp_timeout": 30
}
}Response
Successful response upon making a call control command that includes recording_id.
Example response
{
"data": {
"result": "ok",
"recording_id": "d7e9c1d4-8b2a-4b8f-b3a7-9a671c9e9b0a"
}
}Changes
- info
added the new
arenum value to the request property/// - info
added the new
beenum value to the request property/// - info
added the new
bgenum value to the request property/// - info
added the new
bnenum value to the request property/// - info
added the new
caenum value to the request property/// - info
added the new
cmnenum value to the request property/// - info
added the new
cmn-Hansenum value to the request property/// - info
added the new
cmn-Hantenum value to the request property/// - info
added the new
csenum value to the request property/// - info
added the new
daenum value to the request property/// - info
added the new
deenum value to the request property/// - info
added the new
elenum value to the request property/// - info
added the new
en-AUenum value to the request property/// - info
added the new
en-GBenum value to the request property/// - info
added the new
en-USenum value to the request property/// - info
added the new
eoenum value to the request property/// - info
added the new
esenum value to the request property/// - info
added the new
etenum value to the request property/// - info
added the new
faenum value to the request property/// - info
added the new
fienum value to the request property/// - info
added the new
frenum value to the request property/// - info
added the new
heenum value to the request property/// - info
added the new
hienum value to the request property/// - info
added the new
hrenum value to the request property/// - info
added the new
huenum value to the request property/// - info
added the new
iaenum value to the request property/// - info
added the new
idenum value to the request property/// - info
added the new
itenum value to the request property/// - info
added the new
jaenum value to the request property/// - info
added the new
koenum value to the request property/// - info
added the new
ltenum value to the request property/// - info
added the new
lvenum value to the request property/// - info
added the new
mrenum value to the request property/// - info
added the new
msenum value to the request property/// - info
added the new
nlenum value to the request property/// - info
added the new
noenum value to the request property/// - info
added the new
plenum value to the request property/// - info
added the new
ptenum value to the request property/// - info
added the new
roenum value to the request property/// - info
added the new
ruenum value to the request property/// - info
added the new
skenum value to the request property/// - info
added the new
slenum value to the request property/// - info
added the new
speechmatics/linden-1enum value to the request property// - info
added the new
speechmatics/linden-1enum value to the request property/// - info
added the new
svenum value to the request property/// - info
added the new
taenum value to the request property/// - info
added the new
thenum value to the request property/// - info
added the new
trenum value to the request property/// - info
added the new
ukenum value to the request property/// - info
added the new
urenum value to the request property/// - info
added the new
vienum value to the request property/// - info
added the new
yueenum value to the request property///
- info
- info
added
deepgram/nova-2-medicaldeepgram/nova-2-phonecalldeepgram/nova-3-medicaldeepgram/fluxdeepgram/flux-multidiscriminator mapping keys to the/////request property - info
added to the
/////request propertyoneOflist
- info