v17

latestOpenAPI 3.0.0MITraw.githubusercontent.com2026-07-0210730.9 KB
Calls

create a call

post/Accounts/{AccountSid}/Calls

Path parameters

AccountSidstring required

Request body

application_sidstring uuid

The application to use to control this call. Either application_sid or call_hook is required.

answerOnBridgeboolean

If set to true, the inbound call will ring until the number that was dialed answers the call, and at that point a 200 OK will be sent on the inbound leg. If false, the inbound call will be answered immediately as the outbound call is placed.

fromstring required

The calling party number

fromHoststring

The hostname to put in the SIP From header of the INVITE

timeoutinteger

The number of seconds to wait for call to be answered. Defaults to 60.

timeLimitinteger

The max length of call in seconds

tagobject

Initial set of customer-supplied metadata to associate with the call (see jambonz 'tag' verb)

headersobject

The customer SIP headers to associate with the call

sipRequestWithinDialogHookstring

The sip indialog hook to receive session messages

speech_synthesis_vendorstring

The vendor for Text to Speech (required if application_sid is not used)

speech_synthesis_languagestring

The language for Text to Speech (required if application_sid is not used)

speech_synthesis_voicestring

The voice for Text to Speech (required if application_sid is not used)

speech_recognizer_vendorstring

The vendor for Speech to Text (required if application_sid is not used)

speech_recognizer_languagestring

The language for Speech to Text (required if application_sid is not used)

dual_streamsboolean

If set to true, jambonz generates an outbound INVITE whose SDP offer contains two audio media streams (two m=audio lines) instead of one. This is useful when the far end (for example a carrier or recording system) requires the inbound and outbound audio to be delivered on separate RTP streams. Defaults to false. Supported only when creating a call via the REST API (i.e. not available from the dial verb).

Example request

{
  "call_hook": {
    "url": "https://acme.com",
    "method": "POST"
  },
  "call_status_hook": {
    "url": "https://acme.com",
    "method": "POST"
  },
  "from": "16175551212",
  "fromHost": "sip.example.com",
  "timeout": 30,
  "timeLimit": 60,
  "tag": {
    "callCount": 10
  },
  "to": {
    "type": "phone",
    "number": "+16172375080"
  },
  "headers": {
    "X-Custom-Header": "Hello"
  },
  "sipRequestWithinDialogHook": "/customHook",
  "speech_synthesis_vendor": "google",
  "speech_synthesis_language": "en-US",
  "speech_synthesis_voice": "Wavenet-A",
  "speech_recognizer_vendor": "google",
  "speech_recognizer_language": "en-US"
}

Response

call successfully created

sidstring uuid required

Example response

{
  "sid": "2531329f-fb09-4ef7-887e-84e648214436"
}