Update an existing call

This example shows you how to update an existing call on a account. This will return the call legs, direction (inbound or outbound) and status for every call.

Replace the following placeholder values in the sample code:

KeyDescription
bearer_tokenYour OAuth token. Read more about OAuth tokens
account_idThe Vonage Business Communications account ID.
call_idThe call id for the call you would like to update.
from_typeThe type of destination. Can be one of three values extension , device, or pstn.
from_destinationThe from destination. If from_type is extension, then the from_destination must be an extension. If from_type is device, then the from_destination must be a valid device ID. If from_type is pstn, then the from_destination must be a valid phone number.
to_typeThe type of destination. Can be one of three values extension , device, or pstn.
to_destinationThe to destination. If from_type is extension, then the to_destination must be an extension. If from_type is device, then the to_destination must be a valid device ID. If from_type is pstn, then the to_destination must be a valid phone number.
to_typeShould be one of click2dial, click2dialme, odr or default.
stateThis will change the state of the call. Set to active to answer a call. To transfer a call, state should not be specified. Set to parked to park a call.
curl -X PUT 'https://api.vonage.com/t/vbc.prod/telephony/v3/cc/accounts/$account_id/calls/$call_id'--header 'Content-Type: application/json' \--header 'Authorization: Bearer $bearer_token' \--data-raw '{ "from": { "type": "$from_type", "destination": "$from_destination" }, "state": "$state", "to": { "type": "$to_type", "destination": "$to_destination" } }