on_call_rx_reinvite property

Pointer<NativeFunction<Void Function(pjsua_call_id call_id, Pointer<pjmedia_sdp_session> offer, Pointer<pjsip_rx_data> rdata, Pointer<Void> reserved, Pointer<pj_bool_t> async1, Pointer<Int32> code, Pointer<pjsua_call_setting> opt)>> on_call_rx_reinvite
getter/setter pair

Notify application when call has received a re-INVITE with offer from the peer. It allows more fine-grained control over the response to a re-INVITE. If application sets async to PJ_TRUE, it can send the reply manually using the function #pjsua_call_answer_with_sdp(). Otherwise, by default the re-INVITE will be answered automatically after the callback returns.

Currently, this callback is only called for re-INVITE with SDP, but app should be prepared to handle the case of re-INVITE without SDP.

Remarks: If manually answering at a later timing, application may need to monitor on_call_tsx_state() callback to check whether the re-INVITE is already answered automatically with 487 due to being cancelled.

Note: on_call_rx_offer() will still be called after this callback, but only if async is PJ_FALSE and code is 200.

@param call_id The call index. @param offer Remote offer. @param rdata The received re-INVITE request. @param reserved Reserved param, currently not used. @param async On input, it is PJ_FALSE. Set to PJ_TRUE if app wants to manually answer the re-INVITE. @param code Status code to be returned for answering the offer. On input, it contains status code 200. Currently, valid values are only 200 and 488. @param opt The current call setting, application can update this setting for answering the offer.

Implementation

external ffi.Pointer<
    ffi.NativeFunction<
        ffi.Void Function(
            pjsua_call_id call_id,
            ffi.Pointer<pjmedia_sdp_session> offer,
            ffi.Pointer<pjsip_rx_data> rdata,
            ffi.Pointer<ffi.Void> reserved,
            ffi.Pointer<pj_bool_t> async1,
            ffi.Pointer<ffi.Int32> code,
            ffi.Pointer<pjsua_call_setting> opt)>> on_call_rx_reinvite;