pjsua_acc_add method
- Pointer<
pjsua_acc_config> acc_cfg, - int is_default,
- Pointer<
pjsua_acc_id> p_acc_id
Add a new account to pjsua. PJSUA must have been initialized (with #pjsua_init()) before calling this function. If registration is configured for this account, this function would also start the SIP registration session with the SIP registrar server. This SIP registration session will be maintained internally by the library, and application doesn't need to do anything to maintain the registration session.
@param acc_cfg Account configuration. @param is_default If non-zero, this account will be set as the default account. The default account will be used when sending outgoing requests (e.g. making call) when no account is specified, and when receiving incoming requests when the request does not match any accounts. It is recommended that default account is set to local/LAN account. @param p_acc_id Pointer to receive account ID of the new account.
@return PJ_SUCCESS on success, or the appropriate error code.
Implementation
int pjsua_acc_add(
ffi.Pointer<pjsua_acc_config> acc_cfg,
int is_default,
ffi.Pointer<pjsua_acc_id> p_acc_id,
) {
return _pjsua_acc_add(
acc_cfg,
is_default,
p_acc_id,
);
}