pjsua_acc_modify method

int pjsua_acc_modify(
  1. int acc_id,
  2. Pointer<pjsua_acc_config> acc_cfg
)

Modify account configuration setting. This function may trigger unregistration (of old account setting) and re-registration (of the new account setting), e.g: changing account ID, credential, registar, or proxy setting.

Note:

  • when the new config triggers unregistration, the pjsua callback on_reg_state()/on_reg_state2() for the unregistration will not be called and any failure in the unregistration will be ignored, so if application needs to be sure about the unregistration status, it should unregister manually and wait for the callback before calling this function
  • when the new config triggers re-registration and the re-registration fails, the account setting will not be reverted back to the old setting and the account will be in unregistered state.

@param acc_id Id of the account to be modified. @param acc_cfg New account configuration.

@return PJ_SUCCESS on success, or the appropriate error code.

Implementation

int pjsua_acc_modify(
  int acc_id,
  ffi.Pointer<pjsua_acc_config> acc_cfg,
) {
  return _pjsua_acc_modify(
    acc_id,
    acc_cfg,
  );
}