SIP Refer a call
POST/calls/:call_control_id/actions/refer
Initiate a SIP Refer on a Call Control call. You can initiate a SIP Refer at any point in the duration of a call.
Expected Webhooks (see callback schema below):
call.refer.started
call.refer.completed
call.refer.failed
Request
Path Parameters
Unique identifier and token for controlling the call
- application/json
Body
required
Refer request
Array [
]
Array [
]
The SIP URI to which the call will be referred to.
Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.
Use this field to avoid execution of duplicate commands. Telnyx will ignore subsequent commands with the same command_id
as one that has already been executed.
custom_headers
object[]
Custom headers to be added to the SIP INVITE.
The name of the header to add.
The value of the header.
Custom headers to be added to the SIP INVITE.
SIP Authentication username used for SIP challenges.
SIP Authentication password used for SIP challenges.
sip_headers
object[]
SIP headers to be added to the request. Currently only User-to-User header is supported.
Possible values: [User-to-User
]
The name of the header to add.
The value of the header.
SIP headers to be added to the request. Currently only User-to-User header is supported.
Responses
200: Successful response upon making a call control command.
- application/json
default: Unexpected error
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/calls/:call_control_id/actions/refer' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"sip_address": "sip:username@sip.non-telnyx-address.com"
}'
Response samples
{
"data": {
"result": "ok"
}
}
{
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}