Request siprec session for a call
POST/texml/Accounts/:account_sid/Calls/:call_sid/Siprec.json
Starts siprec session with specified parameters for call idientified by call_sid.
Request
Path Parameters
The id of the account the resource belongs to.
The CallSid that identifies the call to update.
- application/x-www-form-urlencoded
Body
Starts a SIPREC session.
The name of the connector to use for the SIPREC session.
Name of the SIPREC session. May be used to stop the SIPREC session from TeXML instruction.
Possible values: [both_tracks
, inbound_track
, outbound_track
]
The track to be used for siprec session. Can be both_tracks
, inbound_track
or outbound_track
. Defaults to both_tracks
.
Possible values: [true
, false
]
When set, custom parameters will be added as metadata (recording.session.ExtensionParameters). Otherwise, they’ll be added to sip headers.
Possible values: [true
, false
]
Controls whether to encrypt media sent to your SRS using SRTP and TLS. When set you need to configure SRS port in your connector to 5061.
Default value: 1800
Sets Session-Expires
header to the INVITE. A reinvite is sent every half the value set. Usefull for session keep alive. Minimum value is 90, set to 0 to disable.
Possible values: [udp
, tcp
, tls
]
Default value: udp
Specifies SIP transport protocol.
URL destination for Telnyx to send status callback events to for the siprec session.
Possible values: [GET
, POST
]
HTTP request type used for StatusCallback
.
Responses
200: Successful SIPREC session create response
- application/json
404: Resource not found
- application/json
Request samples
curl -L -X POST 'https://api.telnyx.com/v2/texml/Accounts/:account_sid/Calls/:call_sid/Siprec.json' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
Response samples
{
"account_sid": "61bf923e-5e4d-4595-a110-56190ea18a1b",
"call_sid": "v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ",
"sid": "61bf923e-5e4d-4595-a110-56190ea18123",
"date_created": "Fri, 11 Aug 2023 19:12:11 +0000",
"date_updated": "Fri, 11 Aug 2023 19:12:11 +0000",
"start_time": "Fri, 11 Aug 2023 19:12:11 +0000",
"status": "in-progress",
"track": "both_tracks",
"uri": "https://api.telnyx.com/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18123/Calls/v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-ai/Siprec/61bf923e-5e4d-4595-a110-56190ea18123",
"error_code": null
}
{
"errors": [
{
"detail": "Resource not found"
}
]
}