pjsua_pres_notify method

int pjsua_pres_notify(
  1. int acc_id,
  2. Pointer<pjsua_srv_pres> srv_pres,
  3. int state,
  4. Pointer<pj_str_t> state_str,
  5. Pointer<pj_str_t> reason,
  6. int with_body,
  7. Pointer<pjsua_msg_data> msg_data,
)

Send NOTIFY to inform account presence status or to terminate server side presence subscription. If application wants to reject the incoming request, it should set the \a state to PJSIP_EVSUB_STATE_TERMINATED.

@param acc_id Account ID. @param srv_pres Server presence subscription instance. @param state New state to set. @param state_str Optionally specify the state string name, if state is not "active", "pending", or "terminated". @param reason If the new state is PJSIP_EVSUB_STATE_TERMINATED, optionally specify the termination reason. @param with_body If the new state is PJSIP_EVSUB_STATE_TERMINATED, this specifies whether the NOTIFY request should contain message body containing account's presence information. @param msg_data Optional list of headers to be sent with the NOTIFY request.

@return PJ_SUCCESS on success.

Implementation

int pjsua_pres_notify(
  int acc_id,
  ffi.Pointer<pjsua_srv_pres> srv_pres,
  int state,
  ffi.Pointer<pj_str_t> state_str,
  ffi.Pointer<pj_str_t> reason,
  int with_body,
  ffi.Pointer<pjsua_msg_data> msg_data,
) {
  return _pjsua_pres_notify(
    acc_id,
    srv_pres,
    state,
    state_str,
    reason,
    with_body,
    msg_data,
  );
}