Test a voice endpoint
POST/v1/profiles/{profile_id}/voice-endpoints/{endpoint_id}/test
- Scope
calls:write
Calls your SIP agent with a short test message. The outcome arrives as call.* events and on the call.
Parameters
Path
profile_idstringrequiredThe line (
prf_…).endpoint_idstringrequiredThe voice endpoint (
vep_…).
Response
201 CreatedThe test call.
idstringrequiredcal_…object"call"requiredprofile_idstringrequiredprf_…direction"inbound" | "outbound"requiredoriginstringrequiredpstn(an outside caller),browser,api,sip(your voice agent dialed out) ortest.fromstring or nullrequiredtostring or nullrequiredremote_numberstring or nullrequiredThe other party's number.
chat_idstring or nullrequiredThe chat with the same person, if there is one.
statusstringrequiredqueued,ringing,in_progress,completed,busy,no_answer,failedorcanceled.handled_bystring or nullrequireduser:usr_…,voice_ai:vep_…,number:+1…,voicemailorteam.endpoint_idstring or nullrequiredstarted_attimestamp or nullrequiredanswered_attimestamp or nullrequiredended_attimestamp or nullrequiredduration_secinteger or nullrequiredbillable_minutesinteger or nullrequiredRounded up per call.
voicemailobject or nullrequiredA voicemail left on the call:
GETitsurlwith your key for the audio.Fields of
voicemailurlstringrequiredduration_secinteger or nullrequiredtranscriptionstring or nullrequiredstoredbooleanrequired
transfersarray of objectrequiredFields of
transferstostringrequiredbystringrequiredatstringrequired
errorobject or nullrequiredFields of
errorcodestringrequiredmessagestring or nullrequired
created_attimestamprequired
Errors
| Status | Code | Means |
|---|---|---|
| 409 | calling_not_set_up | The line has no calling. |
| 400 | validation_failed | A field is missing or invalid. |
| 401 | unauthorized | The API key is missing, unknown or revoked. |
| 403 | insufficient_scope | The API key lacks the scope this needs. |
| 404 | not_found | No such object, or the key can't see it. |
Every error is { "error": { "code", "message" } }. All error codes.