Siprec
The <Siprec> instruction starts the SIPREC session on the given call.
Attributes 
| ATTRIBUTE | DESCRIPTION | OPTIONS | DEFAULT | 
|---|---|---|---|
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, POST | POST | 
track | Specifies which track should be forwarded to SRS. | inbound_track, outbound_track, both_tracks | both_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 - 14440 | 1800 | 
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 
siprec-started
{
    "SiprecEvent": "siprec-started",
    "CallSid": "v2:7V3r4VFCGLTzKLOveE0-7vM9dX17-NRQgU1byo-uuOIX9JcDadLLKw",
    "Timestamp": "2023-09-06T09:05:14.080710Z",
    "SiprecName":"Session_name", 
    "AccountSid": "19a75cea-02c6-4b9a-84fa-c9bc8341feb8",
    "SiprecSid": "efgcfbbc-eb00-41af-a3f3-0d7b32009e4"
}
siprec-stopped
{
    "SiprecEvent": "siprec-stopped",
    "CallSid": "v2:7V3r4VFCGLTzKLOveE0-7vM9dX17-NRQgU1byo-uuOIX9JcDadLLKw",
    "Timestamp": "2023-09-06T09:05:14.080710Z",
    "SiprecName":"Session_name", 
    "AccountSid": "19a75cea-02c6-4b9a-84fa-c9bc8341feb8",
    "SiprecSid": "efgcfbbc-eb00-41af-a3f3-0d7b32009e4"
}
siprec-failed
{
    "SiprecEvent": "siprec-failed",
    "CallSid": "v2:7V3r4VFCGLTzKLOveE0-7vM9dX17-NRQgU1byo-uuOIX9JcDadLLKw",
    "Timestamp": "2023-09-06T09:05:14.080710Z",
    "SiprecName":"Session_name", 
    "AccountSid": "19a75cea-02c6-4b9a-84fa-c9bc8341feb8",
    "SiprecSid": "efgcfbbc-eb00-41af-a3f3-0d7b32009e4",
    "SiprecError": "no_answer"
}
Status callback attributes 
| ATTRIBUTE | DESCRIPTION | 
SiprecEvent | Type of the event. Possible values: siprec-started, siprec-stopped, siprec-failed | 
AccountSid | A unique identifier for the account generating this call. | 
CallSid | A unique identifier for this call, generated by Telnyx. | 
Timestamp | The timestamp when the event was fired, given as UTC in RFC 2822 format. | 
SiprecSid | A unique identifier for the Siprec session, generated by Telnyx. | 
SiprecError | Type of the error. Possible values: no-answer | 
SiprecName | The name of the session that can be used to stop the session |