- Manage Call with `callLeg`
This method is used to manage ongoing, connected calls. This method is only used when using the PlayFiles and Say instructions in the request body. This method uses SVAML in the request body to perform various tasks related to the call. For more information about SVAML, see the Callback API documentation.
Note: You can only use this method for calls that originate from or terminate to PSTN or SIP networks.
Specifies which part of the call will be managed. This option is used only by the PlayFiles and Say instructions to indicate which channel the sound will be played on. Valid options are caller, callee or both. If not specified, the default value is caller.callLeg identifier is ignored for calls that are part of a conference and calls initiated using the Callout API.
| Enum Value | Description |
|---|---|
| caller | The outgoing call line. |
| callee | The receiving call line. |
| both | Both lines. |
- redirected by Sinch to an appropriate regionhttps://calling.api.sinch.com/calling/v1/calls/id/{callId}/leg/{callLeg}
- United Stateshttps://calling-use1.api.sinch.com/calling/v1/calls/id/{callId}/leg/{callLeg}
- Europehttps://calling-euc1.api.sinch.com/calling/v1/calls/id/{callId}/leg/{callLeg}
- South Americahttps://calling-sae1.api.sinch.com/calling/v1/calls/id/{callId}/leg/{callLeg}
- Southeast Asia 1https://calling-apse1.api.sinch.com/calling/v1/calls/id/{callId}/leg/{callLeg}
- Southeast Asia 2https://calling-apse2.api.sinch.com/calling/v1/calls/id/{callId}/leg/{callLeg}
curl -i -X PATCH \
-u '<username>:<password>' \
https://calling.api.sinch.com/calling/v1/calls/id/4398599d1ba84ef3bde0a82dfb61abed/leg/caller \
-H 'Content-Type: application/json' \
-d '{
"instructions": [
{
"name": "say",
"text": "Hello, the call is over, hanging up now. Goodbye",
"locale": "en-US"
}
],
"action": {
"name": "hangup"
}
}'A success response, or an Error.
{ "content": "200 Successful response" }