TeXML REST Commands

Request siprec session for a call

Changed on

Starts siprec session with specified parameters for call idientified by call_sid.

post/texml/Accounts/{account_sid}/Calls/{call_sid}/Siprec.json

Request

  • Base URL: https://api.telnyx.com/v2
  • URL: https://api.telnyx.com/v2/texml/Accounts/{account_sid}/Calls/{call_sid}/Siprec.json
  • Auth: HTTP bearer

Path parameters

account_sidstring required
Example:f5586561-8ff0-4291-a51b-c7dfe4139ff9

The UUID of the Telnyx account that owns the resource, for example f5586561-8ff0-4291-a51b-c7dfe4139ff9. The account_sid path segment is kept for Twilio API compatibility, but the value is a Telnyx account UUID, not a Twilio AC... SID. It must match the account that owns the API key used to authenticate the request, otherwise the endpoint returns 404. The same value is sent as AccountSid in TeXML webhooks.

call_sidstring required

The CallSid that identifies the call to update.

Request body application/x-www-form-urlencoded

ConnectorNamestring

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

Namestring

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

Track'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.

IncludeMetadataCustomHeaderstrue | false

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

Securetrue | 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.

SessionTimeoutSecsinteger

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.

SipTransport'udp' | 'tcp' | 'tls'

Specifies SIP transport protocol.

StatusCallbackstring

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

StatusCallbackMethod'GET' | 'POST'

HTTP request type used for StatusCallback.

Example request

{
  "ConnectorName": "my_connector",
  "Name": "my_siprec_session",
  "Track": "both_tracks",
  "IncludeMetadataCustomHeaders": true,
  "Secure": true,
  "SessionTimeoutSecs": 900,
  "SipTransport": "tcp",
  "StatusCallback": "https://www.example.com/callback",
  "StatusCallbackMethod": "GET"
}

Response

Successful SIPREC session create response

account_sidstring

The id of the account the resource belongs to.

call_sidstring

The id of the call the resource belongs to.

sidstring

The SID of the siprec session.

date_createdstring

The date and time the siprec session was created.

date_updatedstring

The date and time the siprec session was last updated.

start_timestring

The date and time the siprec session was started.

status'in-progress' | 'stopped'

The status of the siprec session.

track'both_tracks' | 'inbound_track' | 'outbound_track'

The track used for the siprec session.

uristring

The URI of the siprec session.

error_codestring

The error code of the siprec session.

Example response

{
  "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"
}

Changes

    • breaking

      removed the enum value false of the request property

    • breaking

      removed the enum value false of the request property

    • breaking

      removed the enum value true of the request property

    • breaking

      removed the enum value true of the request property

    • info

      the request property default value changed from 1800 to 1800

    • info

      added the new false enum value to the request property

    • info

      added the new false enum value to the request property

    • info

      added the new true enum value to the request property

    • info

      added the new true enum value to the request property

    • breaking

      removed the enum value false of the request property

    • breaking

      removed the enum value false of the request property

    • breaking

      removed the enum value true of the request property

    • breaking

      removed the enum value true of the request property

    • info

      the request property default value changed from 1800 to 1800

    • info

      added the new false enum value to the request property

    • info

      added the new false enum value to the request property

    • info

      added the new true enum value to the request property

    • info

      added the new true enum value to the request property