SIP API

헤더 파일

OasisSIP.h

SipRegisterDelegate 인터페이스

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 onRegistering ( const char * user_profile_uri )
OasisSIP.h
매개변수
user_profile_uri 
void onRegistrationDone ( const char * user_profile_uri , int32_t expiry_time )
OasisSIP.h
매개변수
user_profile_uri 
expiry_time 
void onRegistrationFailed ( const char * user_profile_uri , int32_t error_code , const char * error_msg )
OasisSIP.h
매개변수
user_profile_uri 
error_code 
error_msg 

SipEventDelegate 인터페이스

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 onCallBusy ( const SipCallRef & call )
OasisSIP.h
매개변수
call 
void onCallChangeFailed ( const SipCallRef & call , int32_t error_code , const char * error_msg )
OasisSIP.h
매개변수
call 
error_code 
error_msg 
void onCallEnded ( const SipCallRef & call )
OasisSIP.h
매개변수
call 
void onCallEstablished ( const SipCallRef & call )
OasisSIP.h
매개변수
call 
void onCalling ( const SipCallRef & call )
OasisSIP.h
매개변수
call 
void onError ( const SipCallRef & call , int32_t error_code , const char * error_msg )
OasisSIP.h
매개변수
call 
error_code 
error_msg 
void onRinging ( const SipCallRef & call , const SipUserURI & caller )
OasisSIP.h
매개변수
call 
caller 
void onRingingBack ( const SipCallRef & call )
OasisSIP.h
매개변수
call 

함수

SipRef sipCreate ( key_value_map_t & parameters , key_value_map_t & session_parameters , const std::shared_ptr<SipEventDelegate> & delegate )
OasisSIP.h
매개변수
parameters 
session_parameters 
delegate 
리턴값
int32_t sipDestroy ( SipRef & sip )
OasisSIP.h
매개변수
sip 
리턴값
  • 0: 성공
  • -1: 실패
SipUserProfileRef sipMakeUserProfile ( const SipRef & sip , key_value_map_t & parameters )
OasisSIP.h
매개변수
sip 
parameters 
리턴값
int32_t sipSetUserProfileRegisterDelegate ( const SipUserProfileRef & sip_user , const std::shared_ptr<SipRegisterDelegate> & delegate )
OasisSIP.h
매개변수
sip_user 
delegate 
리턴값
  • 0: 성공
  • -1: 실패
int32_t sipRegisterUserProfile ( const SipUserProfileRef & sip_user , int32_t duration /* seconds * / )
OasisSIP.h
매개변수
sip_user 
/ 
리턴값
  • 0: 성공
  • -1: 실패
int32_t sipDeregisterUserProfile ( const SipUserProfileRef & sip_user )
OasisSIP.h
매개변수
sip_user 
리턴값
  • 0: 성공
  • -1: 실패
int32_t sipEndUserProfile ( SipUserProfileRef & sip_user )
OasisSIP.h
매개변수
sip_user 
리턴값
  • 0: 성공
  • -1: 실패
SipCallRef sipMakeCall ( const SipUserProfileRef & sip_user , const char * to_aor )
OasisSIP.h
매개변수
sip_user 
to_aor 
리턴값
int32_t sipRejectCall ( const SipCallRef & call , sip_reject_call_reason_t answer )
OasisSIP.h
매개변수
call 
answer 
리턴값
  • 0: 성공
  • -1: 실패
int32_t sipEndCall ( const SipCallRef & call )
OasisSIP.h
매개변수
call 
리턴값
  • 0: 성공
  • -1: 실패
int32_t sipHoldCall ( const SipCallRef & call )
OasisSIP.h
매개변수
call 
리턴값
  • 0: 성공
  • -1: 실패
int32_t sipTransferCall ( const SipCallRef & call )
OasisSIP.h
매개변수
call 
리턴값
  • 0: 성공
  • -1: 실패
int32_t sipJoinCall ( const SipCallRef & call )
OasisSIP.h
매개변수
call 
리턴값
  • 0: 성공
  • -1: 실패
SipPresentationRef sipMakePresentation ( const SipUserProfileRef & sip_user )
OasisSIP.h
매개변수
sip_user 
리턴값
int32_t sipEndPresentation ( const SipPresentationRef & presentation )
OasisSIP.h
매개변수
presentation 
리턴값
  • 0: 성공
  • -1: 실패
SipMessageRef sipMakeMessage ( const SipUserProfileRef & sip_user )
OasisSIP.h
매개변수
sip_user 
리턴값
int32_t sipSendMessage ( const SipMessageRef & message )
OasisSIP.h
매개변수
message 
리턴값
  • 0: 성공
  • -1: 실패
int32_t sipEndMessage ( const SipMessageRef & message )
OasisSIP.h
매개변수
message 
리턴값
  • 0: 성공
  • -1: 실패

예제