Skip to main content
The <Siprec> instruction starts the SIPREC session on the given call.

Attributes

ATTRIBUTEDESCRIPTIONOPTIONSDEFAULT
connectorName Specifies which pre-configured external connector shall be used for this request. -
statusCallback A URL for Telnyx to send webhook requests to on each event related to siprec session. -
statusCallbackMethod HTTP request type used for statusCallback. GET, POSTPOST
track Specifies which track should be forwarded to SRS. inbound_track, outbound_track, both_tracksboth_tracks
name Name of the SIPREC session. It can be used to stop the session. -
includeMetadataCustomHeaders Controls whether custom parameters are added as metadata, if false, they are added to sip headers. false
secure 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. false
sessionTimeoutSecs Sets Session-Expires header to the INVITE. A reinvite is sent every half the value set. Useful for session keep alive. Minimum value is 90, set to 0 to disable. 90 - 144401800

Examples

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Start>
    <Siprec name="siprec_session" track="both_tracks" connectorName="my-connector" statusCallback="https://example.com/siprec_callback" />
  </Start>
</Response>
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Stop>
    <Siprec name="siprec_session" />
  </Stop>
</Response>

Expected callbacks

If statusCallback is set, SIPREC status callbacks are sent for the following events:
  • siprec-started — SIPREC session has started
  • siprec-stopped — SIPREC session has stopped
  • siprec-failed — SIPREC session failed to start
See SIPREC Callback for the full payload reference.