Skip to main content
POST
/
texml
/
Accounts
/
{account_sid}
/
Calls
/
{call_sid}
/
Siprec.json
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const response = await client.texml.accounts.calls.siprecJson('call_sid', { account_sid: 'account_sid' });

console.log(response.account_sid);
{
  "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
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

account_sid
string
required

The id of the account the resource belongs to.

call_sid
string
required

The CallSid that identifies the call to update.

Body

application/x-www-form-urlencoded

Starts a SIPREC session.

ConnectorName
string

The name of the connector to use for the SIPREC session.

Example:

"my_connector"

Name
string

Name of the SIPREC session. May be used to stop the SIPREC session from TeXML instruction.

Example:

"my_siprec_session"

Track
enum<string>

The track to be used for siprec session. Can be both_tracks, inbound_track or outbound_track. Defaults to both_tracks.

Available options:
both_tracks,
inbound_track,
outbound_track
Example:

"both_tracks"

IncludeMetadataCustomHeaders
boolean

When set, custom parameters will be added as metadata (recording.session.ExtensionParameters). Otherwise, they’ll be added to sip headers.

Example:

true

Secure
boolean

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.

Example:

true

SessionTimeoutSecs
integer
default: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.

Example:

900

SipTransport
enum<string>
default:udp

Specifies SIP transport protocol.

Available options:
udp,
tcp,
tls
Example:

"tcp"

StatusCallback
string

URL destination for Telnyx to send status callback events to for the siprec session.

Example:

"https://www.example.com/callback"

StatusCallbackMethod
enum<string>

HTTP request type used for StatusCallback.

Available options:
GET,
POST
Example:

"GET"

Response

Successful SIPREC session create response

account_sid
string

The id of the account the resource belongs to.

Example:

"61bf923e-5e4d-4595-a110-56190ea18a1b"

call_sid
string

The id of the call the resource belongs to.

Example:

"v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ"

sid
string

The SID of the siprec session.

Example:

"61bf923e-5e4d-4595-a110-56190ea18123"

date_created
string

The date and time the siprec session was created.

Example:

"Fri, 11 Aug 2023 19:12:11 +0000"

date_updated
string

The date and time the siprec session was last updated.

Example:

"Fri, 11 Aug 2023 19:12:11 +0000"

start_time
string

The date and time the siprec session was started.

Example:

"Fri, 11 Aug 2023 19:12:11 +0000"

status
enum<string>

The status of the siprec session.

Available options:
in-progress,
stopped
Example:

"in-progress"

track
enum<string>

The track used for the siprec session.

Available options:
both_tracks,
inbound_track,
outbound_track
Example:

"both_tracks"

uri
string

The URI of the siprec session.

Example:

"https://api.telnyx.com/v2/texml/Accounts/61bf923e-5e4d-4595-a110-56190ea18123/Calls/v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-ai/Siprec/61bf923e-5e4d-4595-a110-56190ea18123"

error_code
string

The error code of the siprec session.

Example:

null