Group PJSIP_SIPREC
- group PJSIP_SIPREC
SIP Session Recording Protocol support (RFC 7866 - Session Recording Protocol in SIP)
support (RFC 7866 - Session Recording Protocol in SIP)
References
References:
Functions
-
pj_status_t pjsip_siprec_init_module(pjsip_endpoint *endpt)
Initialize siprec module. This function must be called once during application initialization, to register siprec module to SIP endpoint.
- Parameters:
endpt – The SIP endpoint instance.
- Returns:
PJ_SUCCESS if module is successfully initialized.
-
pj_status_t pjsip_siprec_verify_require_hdr(pjsip_require_hdr *req_hdr)
Check if the value of Require header is equal to siprec.
- Parameters:
req_hdr – Require header.
- Returns:
PJ_TRUE if value of Require header is equal to siprec.
-
pj_status_t pjsip_siprec_verify_request(pjsip_rx_data *rdata, pj_str_t *metadata, pjmedia_sdp_session *sdp_offer, unsigned *options, pjsip_dialog *dlg, pjsip_endpoint *endpt, pjsip_tx_data **p_tdata)
Verifies that the incoming request has the siprec value in the Require header and “+sip.src” parameter exist in the Contact header. If both conditions are met, according to RFC 7866, the INVITE request is a siprec. Otherwise, no changes are made to the request. if INVITE request is a siprec must have media attribute label exist in the SDP
- Parameters:
rdata – The incoming request to be verified.
metadata – The siprec metadata information
sdp_offer – The SDP media.
options – The options argument is bitmask combination of SIP features in pjsip_inv_option enumeration
dlg – The dialog instance.
endpt – Media endpoint instance.
p_tdata – Upon error, it will be filled with the final response to be sent to the request sender.
- Returns:
The function returns the following:
If the request includes the value siprec in the Require header and also includes “+sip.src” in the Contact header. PJ_SUCCESS and set PJSIP_INV_REQUIRE_SIPREC to options
Upon error condition (as described by RFC 7866), the function returns non-PJ_SUCCESS, and p_tdata parameter SHOULD be set with a final response message to be sent to the sender of the request.
-
pj_status_t pjsip_siprec_get_metadata(pj_pool_t *pool, pjsip_msg_body *body, pj_str_t *metadata)
Find siprec metadata information from the message body with “rs-metadata” Content-Type.
- Parameters:
pool – Pool to allocate memory.
body – The message body.
metadata – If metadata is found, this variable will be populated with the extracted data.
- Returns:
Return PJ_SUCCESS if metadata is found, otherwise return PJ_ENOTFOUND.
-
pj_status_t pjsip_siprec_init_module(pjsip_endpoint *endpt)