🌐
English
SIP API#
Header File#
OasisSIP.h
SipRegisterDelegate Interface#
class SipRegisterDelegate : public std::enable_shared_from_this<SipRegisterDelegate>
{
public:
SipRegisterDelegate();
virtual ~SipRegisterDelegate();
public:
virtual void onRegistering(const char *user_profile_uri);
virtual void onRegistrationDone(const char *user_profile_uri, int32_t expiry_time);
virtual void onRegistrationFailed(const char *user_profile_uri, int32_t error_code, const char *error_msg);
};
void
onRegistrationDone
(
const char *
user_profile_uri
,
int32_t
expiry_time
)
OasisSIP.h
Parameters
user_profile_uri
expiry_time
void
onRegistrationFailed
(
const char *
user_profile_uri
,
int32_t
error_code
,
const char *
error_msg
)
OasisSIP.h
Parameters
user_profile_uri
error_code
error_msg
SipEventDelegate Interface#
class SipEventDelegate : public std::enable_shared_from_this<SipEventDelegate>
{
public:
SipEventDelegate();
virtual ~SipEventDelegate();
public:
//Called when the peer is busy during session initialization.
virtual void onCallBusy(const SipCallRef &call);
//Called when an error occurs during session modification negotiation.
virtual void onCallChangeFailed(const SipCallRef &call, int32_t error_code, const char *error_msg);
//Called when the session is terminated.
virtual void onCallEnded(const SipCallRef &call);
//Called when the session is established.
virtual void onCallEstablished(const SipCallRef &call);
//Called when an INVITE request is sent to initiate a new call.
virtual void onCalling(const SipCallRef &call);
//Called when an error occurs during session initialization and termination.
virtual void onError(const SipCallRef &call, int32_t error_code, const char *error_msg);
//Called when an INVITE request is received.
virtual void onRinging(const SipCallRef &call, const SipUserURI &caller);
//Called when a RINGING response is received for the INVITE request sent
virtual void onRingingBack(const SipCallRef &call);
};
void
onCallChangeFailed
(
const SipCallRef &
call
,
int32_t
error_code
,
const char *
error_msg
)
OasisSIP.h
Parameters
call
error_code
error_msg
void
onError
(
const SipCallRef &
call
,
int32_t
error_code
,
const char *
error_msg
)
OasisSIP.h
Parameters
call
error_code
error_msg
void
onRinging
(
const SipCallRef &
call
,
const SipUserURI &
caller
)
OasisSIP.h
Parameters
call
caller
Functions#
SipRef
sipCreate
(
key_value_map_t &
parameters
,
key_value_map_t &
session_parameters
,
const std::shared_ptr<SipEventDelegate> &
delegate
)
OasisSIP.h
Parameters
parameters
session_parameters
delegate
Return Value
SipUserProfileRef
sipMakeUserProfile
(
const SipRef &
sip
,
key_value_map_t &
parameters
)
OasisSIP.h
Parameters
sip
parameters
Return Value
int32_t
sipSetUserProfileRegisterDelegate
(
const SipUserProfileRef &
sip_user
,
const std::shared_ptr<SipRegisterDelegate> &
delegate
)
OasisSIP.h
Parameters
sip_user
delegate
Return Value
- 0: Success
- -1: Failure
int32_t
sipRegisterUserProfile
(
const SipUserProfileRef &
sip_user
,
int32_t duration /* seconds */
/
)
OasisSIP.h
Parameters
sip_user
/
Return Value
- 0: Success
- -1: Failure
int32_t
sipDeregisterUserProfile
(
const SipUserProfileRef &
sip_user
)
OasisSIP.h
Parameters
sip_user
Return Value
- 0: Success
- -1: Failure
int32_t
sipEndUserProfile
(
SipUserProfileRef &
sip_user
)
OasisSIP.h
Parameters
sip_user
Return Value
- 0: Success
- -1: Failure
SipCallRef
sipMakeCall
(
const SipUserProfileRef &
sip_user
,
const char *
to_aor
)
OasisSIP.h
Parameters
sip_user
to_aor
Return Value
int32_t
sipRejectCall
(
const SipCallRef &
call
,
sip_reject_call_reason_t
answer
)
OasisSIP.h
Parameters
call
answer
Return Value
- 0: Success
- -1: Failure
int32_t
sipEndCall
(
const SipCallRef &
call
)
OasisSIP.h
Parameters
call
Return Value
- 0: Success
- -1: Failure
int32_t
sipHoldCall
(
const SipCallRef &
call
)
OasisSIP.h
Parameters
call
Return Value
- 0: Success
- -1: Failure
int32_t
sipTransferCall
(
const SipCallRef &
call
)
OasisSIP.h
Parameters
call
Return Value
- 0: Success
- -1: Failure
int32_t
sipJoinCall
(
const SipCallRef &
call
)
OasisSIP.h
Parameters
call
Return Value
- 0: Success
- -1: Failure
SipPresentationRef
sipMakePresentation
(
const SipUserProfileRef &
sip_user
)
OasisSIP.h
Parameters
sip_user
Return Value
int32_t
sipEndPresentation
(
const SipPresentationRef &
presentation
)
OasisSIP.h
Parameters
presentation
Return Value
- 0: Success
- -1: Failure
SipMessageRef
sipMakeMessage
(
const SipUserProfileRef &
sip_user
)
OasisSIP.h
Parameters
sip_user
Return Value
int32_t
sipSendMessage
(
const SipMessageRef &
message
)
OasisSIP.h
Parameters
message
Return Value
- 0: Success
- -1: Failure
int32_t
sipEndMessage
(
const SipMessageRef &
message
)
OasisSIP.h
Parameters
message
Return Value
- 0: Success
- -1: Failure