Skip to main content

Update a Call

PUT 

/calls

To update an existing Call, you send a PUT request to the Call resource with a payload including an update command and additional nested params.

Request

Body

required

    commandstringrequired

    Possible values: [update]

    params

    object

    required

    oneOf

    urlstringrequired

    The URL to handle the call. This parameter allows you to specify a webhook or different route in your code containing SWML instructions for handling the call. Either url or swml must be included for a new call.

    Example: https://example.com/swml
    idstringrequired

    The id of an existing call.

    Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
    fallback_urlstring

    The Fallback URL to handle the call. This parameter allows you to specify a backup webhook or different route in your code containing SWML instructions for handling the call.

    Example: https://example.com/fallback
    statusstring

    Either canceled (to cancel a not yet connected call) or completed (to end a call that is in progress).

    Possible values: [canceled, completed]

    Example: canceled

Responses

The request has succeeded.

Schema

    idstringrequired

    The unique identifier of the call on SignalWire. This can be used to update the call programmatically.

    Example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
    fromstringrequired

    The origin number or address.

    Example: sip:from-sip@example-112233445566.sip.signalwire.com
    tostringrequired

    The destination number or address.

    Example: sip:from-sip@example-112233445567.sip.signalwire.com
    directionstringrequired

    The direction of the call.

    Possible values: [outbound-api]

    Example: outbound-api
    statusstringrequired

    The status of the call.

    Possible values: [answered, queued, initiated, ringing, ending, ended]

    Example: queued
    durationintegerrequired

    The duration of the call in seconds.

    Example: 60
    duration_msintegerrequired

    The duration of the call in milliseconds.

    Example: 60000
    billable_durationintegerrequired

    The billable duration of the call in seconds.

    Example: 60
    sourcestringrequired

    Source of this call.

    Possible values: [realtime_api]

    Example: realtime_api
    typestringrequired

    Type of this call.

    Possible values: [relay_pstn_call, relay_sip_call, relay_webrtc_call]

    Example: relay_sip_call

    charge

    object[]

    required

    Details on charges associated with this call.

  • Array [

  • descriptionstringrequired

    Description for this charge.

    amountintegerrequired

    Charged amount.

  • ]