Calls
Place, read, redirect, end and delete calls on your line's dongle. It's one SIM in one dongle, so it's one call at a time, across the API and the line's SIP login.
GET /Accounts/{AccountSid}/Calls.json
List calls.
Lists the account's calls, newest first, one page at a time. A filter value that isn't valid, or a query parameter not listed here, answers 400 with code 790005.
Parameters
| Name | In | Required | Description |
|---|---|---|---|
To | query | Only calls to this number (E.164). | |
From | query | Only calls from this number (E.164). | |
Status | query | Only calls with this status. | |
StartTime | query | Only calls that started on this date ( | |
StartTime< | query | Only calls that started on or before this date ( | |
StartTime> | query | Only calls that started on or after this date ( | |
PageSize | query | Items per page, ≤ 1000, default 50. List pages with | |
Page | query | The page number, from 0. Use the | |
PageToken | query | An opaque paging token. It comes inside |
Responses
| Status | Meaning |
|---|---|
200 | One page of calls. |
400 | A list filter value that isn't valid, or a query parameter the list doesn't take (790005, naming it in |
401 | Authentication failed (20003), or the account isn't active (20005). This comes before any lookup. |
429 | Over a rate (20429, with |
500 | An internal error (799999). |
Response fields
| Field | Type | Always there | Description |
|---|---|---|---|
page | integer | The page number, from 0. | |
page_size | integer | ||
uri | string | ||
first_page_uri | string | ||
next_page_uri | string or null | The next page, or null. | |
previous_page_uri | string or null | The previous page, or null. | |
calls | array of object | The calls on this page. | |
calls[].sid | string | required | CA + 32 hex. |
calls[].account_sid | string | required | |
calls[].to | string | required | E.164. |
calls[].to_formatted | string | required | The national format, e.g. "0491 570 156". |
calls[].from | string | required | E.164. On an outbound call it's always the line's own number. |
calls[].from_formatted | string | required | The national format. |
calls[].phone_number_sid | string | required | The line's Sid. |
calls[].status | string: queued, ringing, in-progress, completed, busy, failed, no-answer, canceled | required | There's no answering-machine detection, so a call answered by voicemail reads |
calls[].direction | string: outbound-api, inbound | required | |
calls[].start_time | string or null | required | RFC 2822. |
calls[].end_time | string or null | required | RFC 2822. |
calls[].duration | string or null | required | Seconds, as a string. |
calls[].answered_by | null | required | Always null: there's no answering-machine detection in v1. |
calls[].price | null | required | Always null: billing is in the console. |
calls[].price_unit | null | required | Always null: billing is in the console. |
calls[].date_created | string | required | RFC 2822. |
calls[].date_updated | string | required | RFC 2822. |
calls[].api_version | string | required | |
calls[].uri | string | required | |
calls[].subresource_uris | object | required | Always |
Example request
curl -X GET "https://api.dongleswithwings.com/2010-04-01/Accounts/{AccountSid}/Calls.json" \
-u "$ACCOUNT_SID:$AUTH_TOKEN"
Example response
{
"page": 0,
"page_size": 2,
"uri": "/2010-04-01/Accounts/ACa61cd972830fc5bc41386edc0a9f8463/Calls.json?Status=completed&StartTime%3E=2026-11-01&PageSize=2&Page=0",
"first_page_uri": "/2010-04-01/Accounts/ACa61cd972830fc5bc41386edc0a9f8463/Calls.json?Status=completed&StartTime%3E=2026-11-01&PageSize=2&Page=0",
"next_page_uri": "/2010-04-01/Accounts/ACa61cd972830fc5bc41386edc0a9f8463/Calls.json?Status=completed&StartTime%3E=2026-11-01&PageSize=2&Page=1&PageToken=0gkLSzoORuxO9vqu",
"previous_page_uri": null,
"calls": [
{
"sid": "CA126a665f07bdfabf149e1a4230e7494e",
"account_sid": "ACa61cd972830fc5bc41386edc0a9f8463",
"to": "+61491570156",
"to_formatted": "0491 570 156",
"from": "+61491570158",
"from_formatted": "0491 570 158",
"phone_number_sid": "PN3e18acd0169a00c48635e530c42a01ca",
"status": "completed",
"direction": "inbound",
"start_time": "Mon, 02 Nov 2026 04:10:05 +0000",
"end_time": "Mon, 02 Nov 2026 04:12:47 +0000",
"duration": "162",
"answered_by": null,
"price": null,
"price_unit": null,
"date_created": "Mon, 02 Nov 2026 04:10:02 +0000",
"date_updated": "Mon, 02 Nov 2026 04:12:47 +0000",
"api_version": "2010-04-01",
"uri": "/2010-04-01/Accounts/ACa61cd972830fc5bc41386edc0a9f8463/Calls/CA126a665f07bdfabf149e1a4230e7494e.json",
"subresource_uris": {}
},
{
"sid": "CAfac674904129191c9bee9f6d819b1c21",
"account_sid": "ACa61cd972830fc5bc41386edc0a9f8463",
"to": "+61255501234",
"to_formatted": "02 5550 1234",
"from": "+61491570156",
"from_formatted": "0491 570 156",
"phone_number_sid": "PN3e18acd0169a00c48635e530c42a01ca",
"status": "completed",
"direction": "outbound-api",
"start_time": "Mon, 02 Nov 2026 03:04:09 +0000",
"end_time": "Mon, 02 Nov 2026 03:06:14 +0000",
"duration": "125",
"answered_by": null,
"price": null,
"price_unit": null,
"date_created": "Mon, 02 Nov 2026 03:04:05 +0000",
"date_updated": "Mon, 02 Nov 2026 03:06:14 +0000",
"api_version": "2010-04-01",
"uri": "/2010-04-01/Accounts/ACa61cd972830fc5bc41386edc0a9f8463/Calls/CAfac674904129191c9bee9f6d819b1c21.json",
"subresource_uris": {}
}
]
}
POST /Accounts/{AccountSid}/Calls.json
Place a call from your line.
One call at a time per dongle, never queued. From must be the line's own number. No answering-machine detection or recording. The first ~1.4 s after the answer has no audio.
Places a call from your line's dongle. The answer is 201 with the Call, status queued.
- Exactly one of
Url(+Method, default POST) orTwiml(≤ 4000 characters); otherwise 700011. When the call is answered, the gateway fetchesUrl(theoutboundCallwebhook: 10 s, no retry, thenFallbackUrlonce). - One call per dongle, across the API and SIP: if the line already has a call up (API or SIP), the answer is 409 with code 700001. A call is never queued.
- Synchronous refusals: line busy, not callable, the number type, emergency, the line's limits and a moment's unavailability all come back on this POST, never as a 201 that fails later. Only outcomes after dialling (busy, no-answer, failed) arrive as status callbacks.
- A line with no calling dongle answers 700005 (400): it's a permanent property of the line. 700002 (409)
is only for the passing reasons,
dongle_offline,line_suspendedandtemporarily_unavailable. - Per-line limits: one call at a time per dongle; calls per hour, minutes per day and the longest call (the default limits unless the console sets them), enforced by your dongle. Past one of these limits the answer is 700006.
- Refused parameters (each gives 400, code 700008, naming it in
parameter):ApplicationSid, the AMD family, the recording family,Trim,CallerId,SipAuthUsername,SipAuthPassword,Byoc,CallReason,Transcribe, and any parameter not listed here, e.g.TimeLimitorCallToken.
Request body
Form-encoded (application/x-www-form-urlencoded).
| Field | Type | Required | Description |
|---|---|---|---|
To | string | required | The number to call, in E.164 (our number policy). Allowed: AU mobiles and landlines, plus
|
From | string | required | The line's own number. A number that isn't one of your lines gives 21606; an invalid number gives 21212. |
Url | string | Where to fetch the call's TwiML when it's answered (the | |
Method | string: GET, POST | The method for Errors: 700012 | |
Twiml | string | Inline TwiML, ≤ 4000 characters (longer gives 700012). Unsupported or invalid TwiML is refused here (720001 / 720002). | |
FallbackUrl | string | Fetched once if | |
FallbackMethod | string: GET, POST | Errors: 700012 | |
StatusCallback | string | Where the | |
StatusCallbackMethod | string: GET, POST | Errors: 700012 | |
StatusCallbackEvent | one of array of string: initiated, ringing, answered, completed, string | Which events to send: Errors: 700012 | |
Timeout | integer | Seconds to ring before giving up, 5-60 (default 60). Out of range gives 700012. Errors: 700012 | |
SendDigits | string | DTMF to send after the answer: Errors: 700012 | |
ApplicationSid not in v1 (700008) | Refused in v1 (700008). | ||
MachineDetection not in v1 (700008) | The AMD family, refused in v1 (700008). There's no answering-machine detection. | ||
MachineDetectionTimeout not in v1 (700008) | The AMD family, refused in v1 (700008). | ||
MachineDetectionSpeechThreshold not in v1 (700008) | The AMD family, refused in v1 (700008). | ||
MachineDetectionSpeechEndThreshold not in v1 (700008) | The AMD family, refused in v1 (700008). | ||
MachineDetectionSilenceTimeout not in v1 (700008) | The AMD family, refused in v1 (700008). | ||
AsyncAmd not in v1 (700008) | The AMD family, refused in v1 (700008). | ||
AsyncAmdStatusCallback not in v1 (700008) | The AMD family, refused in v1 (700008). | ||
AsyncAmdStatusCallbackMethod not in v1 (700008) | The AMD family, refused in v1 (700008). | ||
Record not in v1 (700008) | The recording family, refused in v1 (700008). There's no recording in v1. | ||
RecordingChannels not in v1 (700008) | The recording family, refused in v1 (700008). | ||
RecordingStatusCallback not in v1 (700008) | The recording family, refused in v1 (700008). | ||
RecordingStatusCallbackMethod not in v1 (700008) | The recording family, refused in v1 (700008). | ||
RecordingStatusCallbackEvent not in v1 (700008) | The recording family, refused in v1 (700008). | ||
RecordingTrack not in v1 (700008) | The recording family, refused in v1 (700008). | ||
Trim not in v1 (700008) | Refused in v1 (700008). | ||
CallerId not in v1 (700008) | Refused in v1 (700008). | ||
SipAuthUsername not in v1 (700008) | Refused in v1 (700008). | ||
SipAuthPassword not in v1 (700008) | Refused in v1 (700008). | ||
Byoc not in v1 (700008) | Refused in v1 (700008). | ||
CallReason not in v1 (700008) | Refused in v1 (700008). | ||
Transcribe not in v1 (700008) | Refused in v1 (700008). |
Refused (700008), the whole AMD family: MachineDetection, MachineDetectionTimeout, MachineDetectionSpeechThreshold, MachineDetectionSpeechEndThreshold, MachineDetectionSilenceTimeout, AsyncAmd, AsyncAmdStatusCallback, AsyncAmdStatusCallbackMethod.
Refused (700008), the whole recording family: Record, RecordingChannels, RecordingStatusCallback, RecordingStatusCallbackMethod, RecordingStatusCallbackEvent, RecordingTrack.
Any parameter not listed here is refused with 700008, naming it in parameter: v1 never ignores one.
Errors for the body as a whole: 700011
Responses
| Status | Meaning |
|---|---|
201 | The call is placed, and |
400 | A parameter or the number was refused: 21205, 21211, 21212, 21606, 700003, 700004, 700005, 700008, 700011, 700012, 720001, 720002 or 790001. |
401 | Authentication failed (20003), or the account isn't active (20005). This comes before any lookup. |
409 | The line can't take a call now: 700001 (a call is up) or 700002 (a passing reason, in why_not). |
413 | The request body is over 64 KiB (790006). It's refused before parsing. |
429 | Too many requests (20429), or the line's call limit is reached (700006). |
500 | An internal error (799999). |
503 | The dongle is busy for a moment (700007). Retry after |
Response fields
| Field | Type | Always there | Description |
|---|---|---|---|
sid | string | CA + 32 hex. | |
account_sid | string | ||
to | string | E.164. | |
to_formatted | string | The national format, e.g. "0491 570 156". | |
from | string | E.164. On an outbound call it's always the line's own number. | |
from_formatted | string | The national format. | |
phone_number_sid | string | The line's Sid. | |
status | string: queued, ringing, in-progress, completed, busy, failed, no-answer, canceled | There's no answering-machine detection, so a call answered by voicemail reads | |
direction | string: outbound-api, inbound | ||
start_time | string or null | RFC 2822. | |
end_time | string or null | RFC 2822. | |
duration | string or null | Seconds, as a string. | |
answered_by | null | Always null: there's no answering-machine detection in v1. | |
price | null | Always null: billing is in the console. | |
price_unit | null | Always null: billing is in the console. | |
date_created | string | RFC 2822. | |
date_updated | string | RFC 2822. | |
api_version | string | ||
uri | string | ||
subresource_uris | object | Always |
Example request
curl -X POST "https://api.dongleswithwings.com/2010-04-01/Accounts/{AccountSid}/Calls.json" \
--data-urlencode "To=+61255501234" \
--data-urlencode "From=+61491570156" \
--data-urlencode "Url=https://hooks.example.com/voice/outbound" \
--data-urlencode "Method=POST" \
--data-urlencode "StatusCallback=https://hooks.example.com/status" \
--data-urlencode "StatusCallbackMethod=POST" \
--data-urlencode "StatusCallbackEvent=initiated" \
--data-urlencode "StatusCallbackEvent=ringing" \
--data-urlencode "StatusCallbackEvent=answered" \
--data-urlencode "StatusCallbackEvent=completed" \
--data-urlencode "Timeout=30" \
-u "$ACCOUNT_SID:$AUTH_TOKEN"
Example response
{
"sid": "CAfac674904129191c9bee9f6d819b1c21",
"account_sid": "ACa61cd972830fc5bc41386edc0a9f8463",
"to": "+61255501234",
"to_formatted": "02 5550 1234",
"from": "+61491570156",
"from_formatted": "0491 570 156",
"phone_number_sid": "PN3e18acd0169a00c48635e530c42a01ca",
"status": "queued",
"direction": "outbound-api",
"start_time": null,
"end_time": null,
"duration": null,
"answered_by": null,
"price": null,
"price_unit": null,
"date_created": "Mon, 02 Nov 2026 03:04:05 +0000",
"date_updated": "Mon, 02 Nov 2026 03:04:05 +0000",
"api_version": "2010-04-01",
"uri": "/2010-04-01/Accounts/ACa61cd972830fc5bc41386edc0a9f8463/Calls/CAfac674904129191c9bee9f6d819b1c21.json",
"subresource_uris": {}
}
GET /Accounts/{AccountSid}/Calls/{CallSid}.json
Read one call.
Returns one call. A Sid that isn't on this account gives 404 (code 20404).
Responses
| Status | Meaning |
|---|---|
200 | The call. |
401 | Authentication failed (20003), or the account isn't active (20005). This comes before any lookup. |
404 | Not found (20404). That includes a Sid that isn't on the path's account; the answer never hints at another tenant. |
429 | Over a rate (20429, with |
500 | An internal error (799999). |
Response fields
| Field | Type | Always there | Description |
|---|---|---|---|
sid | string | CA + 32 hex. | |
account_sid | string | ||
to | string | E.164. | |
to_formatted | string | The national format, e.g. "0491 570 156". | |
from | string | E.164. On an outbound call it's always the line's own number. | |
from_formatted | string | The national format. | |
phone_number_sid | string | The line's Sid. | |
status | string: queued, ringing, in-progress, completed, busy, failed, no-answer, canceled | There's no answering-machine detection, so a call answered by voicemail reads | |
direction | string: outbound-api, inbound | ||
start_time | string or null | RFC 2822. | |
end_time | string or null | RFC 2822. | |
duration | string or null | Seconds, as a string. | |
answered_by | null | Always null: there's no answering-machine detection in v1. | |
price | null | Always null: billing is in the console. | |
price_unit | null | Always null: billing is in the console. | |
date_created | string | RFC 2822. | |
date_updated | string | RFC 2822. | |
api_version | string | ||
uri | string | ||
subresource_uris | object | Always |
Example request
curl -X GET "https://api.dongleswithwings.com/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}.json" \
-u "$ACCOUNT_SID:$AUTH_TOKEN"
Example response
{
"sid": "CAfac674904129191c9bee9f6d819b1c21",
"account_sid": "ACa61cd972830fc5bc41386edc0a9f8463",
"to": "+61255501234",
"to_formatted": "02 5550 1234",
"from": "+61491570156",
"from_formatted": "0491 570 156",
"phone_number_sid": "PN3e18acd0169a00c48635e530c42a01ca",
"status": "completed",
"direction": "outbound-api",
"start_time": "Mon, 02 Nov 2026 03:04:09 +0000",
"end_time": "Mon, 02 Nov 2026 03:06:14 +0000",
"duration": "125",
"answered_by": null,
"price": null,
"price_unit": null,
"date_created": "Mon, 02 Nov 2026 03:04:05 +0000",
"date_updated": "Mon, 02 Nov 2026 03:06:14 +0000",
"api_version": "2010-04-01",
"uri": "/2010-04-01/Accounts/ACa61cd972830fc5bc41386edc0a9f8463/Calls/CAfac674904129191c9bee9f6d819b1c21.json",
"subresource_uris": {}
}
POST /Accounts/{AccountSid}/Calls/{CallSid}.json
Redirect, cancel or hang up a call.
Changes a live call. Send exactly one of these:
- Url + Method, or Twiml: redirect the call to new TwiML now;
- Status=canceled: cancel a call that hasn't been answered yet;
- Status=completed: hang up.
If the call has already ended, or Status=canceled is sent for a call that's already answered, the answer is
400 with code 21220. Both Url and Twiml, or none of Url, Twiml and Status, gives 700011. Any
parameter not listed here is refused with code 700008, which names it.
Request body
Form-encoded (application/x-www-form-urlencoded).
| Field | Type | Required | Description |
|---|---|---|---|
Url | string | Redirect the call to the TwiML at this URL now. | |
Method | string: GET, POST | Errors: 700012 | |
Twiml | string | Replace the running TwiML now, ≤ 4000 characters (longer gives 700012). | |
Status | string: canceled, completed |
|
Any parameter not listed here is refused with 700008, naming it in parameter: v1 never ignores one.
Errors for the body as a whole: 700011
Responses
| Status | Meaning |
|---|---|
200 | The call after the change. |
400 | The change was refused: 21205, 21220, 700008, 700011, 700012, 720001, 720002 or 790001. |
401 | Authentication failed (20003), or the account isn't active (20005). This comes before any lookup. |
404 | Not found (20404). That includes a Sid that isn't on the path's account; the answer never hints at another tenant. |
413 | The request body is over 64 KiB (790006). It's refused before parsing. |
429 | Over a rate (20429, with |
500 | An internal error (799999). |
Response fields
| Field | Type | Always there | Description |
|---|---|---|---|
sid | string | CA + 32 hex. | |
account_sid | string | ||
to | string | E.164. | |
to_formatted | string | The national format, e.g. "0491 570 156". | |
from | string | E.164. On an outbound call it's always the line's own number. | |
from_formatted | string | The national format. | |
phone_number_sid | string | The line's Sid. | |
status | string: queued, ringing, in-progress, completed, busy, failed, no-answer, canceled | There's no answering-machine detection, so a call answered by voicemail reads | |
direction | string: outbound-api, inbound | ||
start_time | string or null | RFC 2822. | |
end_time | string or null | RFC 2822. | |
duration | string or null | Seconds, as a string. | |
answered_by | null | Always null: there's no answering-machine detection in v1. | |
price | null | Always null: billing is in the console. | |
price_unit | null | Always null: billing is in the console. | |
date_created | string | RFC 2822. | |
date_updated | string | RFC 2822. | |
api_version | string | ||
uri | string | ||
subresource_uris | object | Always |
Example request
curl -X POST "https://api.dongleswithwings.com/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}.json" \
--data-urlencode "Status=completed" \
-u "$ACCOUNT_SID:$AUTH_TOKEN"
Example response
{
"sid": "CA5c12c4724128e0975b3fcc18dd14465e",
"account_sid": "ACa61cd972830fc5bc41386edc0a9f8463",
"to": "+61370101234",
"to_formatted": "03 7010 1234",
"from": "+61491570156",
"from_formatted": "0491 570 156",
"phone_number_sid": "PN3e18acd0169a00c48635e530c42a01ca",
"status": "completed",
"direction": "outbound-api",
"start_time": "Mon, 02 Nov 2026 06:00:04 +0000",
"end_time": "Mon, 02 Nov 2026 06:01:31 +0000",
"duration": "87",
"answered_by": null,
"price": null,
"price_unit": null,
"date_created": "Mon, 02 Nov 2026 06:00:00 +0000",
"date_updated": "Mon, 02 Nov 2026 06:01:31 +0000",
"api_version": "2010-04-01",
"uri": "/2010-04-01/Accounts/ACa61cd972830fc5bc41386edc0a9f8463/Calls/CA5c12c4724128e0975b3fcc18dd14465e.json",
"subresource_uris": {}
}
DELETE /Accounts/{AccountSid}/Calls/{CallSid}.json
Delete a call's record.
Deletes the call's record. While the call is live, the answer is 409 with code 21220. Records are kept for 3 months (90 days), then deleted.
Responses
| Status | Meaning |
|---|---|
204 | Deleted. The body is empty. |
401 | Authentication failed (20003), or the account isn't active (20005). This comes before any lookup. |
404 | Not found (20404). That includes a Sid that isn't on the path's account; the answer never hints at another tenant. |
409 | The call is live, so its record can't be deleted yet (21220). |
429 | Over a rate (20429, with |
500 | An internal error (799999). |
Example request
curl -X DELETE "https://api.dongleswithwings.com/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}.json" \
-u "$ACCOUNT_SID:$AUTH_TOKEN"
Example response
HTTP/1.1 204 No Content (empty body)