Hosted SIM API

Calls

Calls go out from, and come in to, the dongle that holds your line's SIM.

One call at a time

Your line is one SIM in one dongle, so it holds one call at a time, across the API and its SIP login. A second call is answered 700001 at once; calls are never queued.

Place a call

POST /Accounts/{AccountSid}/Calls.json with To, From (your line's number) and exactly one of Url or Twiml. Everything we can refuse comes back on that request, never as a queued call that fails later:

Refusal Code
the line has a call up 700001
the line can't call just now: its dongle is offline, the line is suspended, or it's briefly unavailable (with why_not) 700002
a premium, short-code or international number 700003
an emergency number 700004
the line has no calling dongle: it's texts only, and that doesn't change by retrying 700005
the line's call limit 700006
the dongle is busy for a moment: try again after Retry-After 700007
a parameter v1 doesn't support (it names it in parameter) 700008
not exactly one of Url or Twiml 700011
a value that's invalid or out of range, e.g. Twiml over 4000 characters, or Timeout outside 5-60 (it names it) 700012

Only what happens after dialling (busy, no-answer, failed) comes later, as a status callback.

Numbers you can call

AU mobiles and landlines, and 13, 1300 and 1800 numbers. Premium 19xx numbers, short codes and international numbers are refused unless your line is set up for them. Emergency numbers are always refused: call 000 from a phone.

Change or end a live call

POST /Accounts/{AccountSid}/Calls/{CallSid}.json with exactly one of a new Url, a new Twiml (to redirect it) or Status: canceled (not answered yet) or completed (hang up). More than one of them, or none, is 700011. On a call that has ended, or canceling one that's been answered: 21220.

DELETE /Accounts/{AccountSid}/Calls/{CallSid}.json deletes a call's record. While the call is live it's refused: 409, 21220. Call records are kept for 3 months (90 days), then deleted.

Incoming calls

Set your line's VoiceUrl. See Webhooks for the 8-second answer window and what happens when your server doesn't answer.