Name
OsipCallLeg public API --
Details
struct OsipCallLeg
struct OsipCallLeg
{
from_t *from;
to_t *to;
call_id_t *callid;
int cseq_number;
int status;
url_t *registrar;
/*
* GRS
* from and to are not enough if (for example) the far end proxy server < * gets out of the loop and you end up communicating directly with the
* end system. Your from and to remain constant, but you need to
* know who the "real" peer is for request URIs and to send the UDP
* packets to the right place.
*
* this could be handled in one of two ways - the "peer" field could
* stay null unless its valid, or we could always initialize it to
* be the same as the to field. Simon, I'll leave that up to you.
*/
contact_t *peer;
/* transactions associated with call-leg */
list_t incoming_transactions;
list_t outgoing_transactions;
int last_tid; /* the id of the last transaction*/
struct _RegistrationCtxt *reg_context; /* the registration context if a registration is occuring */
unsigned int tag_set:1;
unsigned int padding:31;
/* all events for this transaction arrive here */
//fifo_t *calllegff;
struct _OsipUA *ua; /* the ua object that manages the call*/
/* BKO: list of routes to pass requests through, set after
first INVITE */
list_t route_list;
/*sdp only parameters*/
sdp_t *remote_sdp;
int sdp_sessid;
char* sdp_caddr; /* the address in the c field*/
/* list of used streams with their properties*/
list_t *media_list;
}; |
struct RegistrationCtxt
struct RegistrationCtxt
{
char *registrar; /* name or address of the registrar */
char *address_of_record; /* can be NULL, in which case calleg->from is used */
char *password;
int expires;
int action; /* perhaps deprecated ...*/
#define REGISTER_ACTION_PROXY 0
#define REGISTER_ACTION_REDIRECT 1
#define REGISTER_ACTION_ANY 2
int ref_count; /* private, don 't touch it ! */
} ; |
osip_call_leg_new ()
Creates a new OsipCallLeg object managed by the user agent ua.
osip_call_leg_invite ()
int osip_call_leg_invite (OsipCallLeg *call_leg,
char *callee); |
Sends an invite to callee.
osip_call_leg_accept_invite ()
list_t* osip_call_leg_accept_invite (OsipCallLeg *call_leg); |
On reception of the 200 Ok for invite, then the osipua library calls
the "INVITE" signal handler. Then the user can choose to accept the call
using this function.
If the user wants to reject the call, then it should call
osip_call_leg_bye
osip_call_leg_get_streams ()
list_t* osip_call_leg_get_streams (OsipCallLeg *call_leg); |
After a successfull invite (means that the application received the
"INVITE_ACCEPTED" signal, then this function can be call to get
a list of media descriptors of the media streams that have been choosen
during the sdp negociation.
osip_call_leg_bye ()
Sends a bye and ends the call-leg.
osip_call_leg_register ()
Sends a REGISTER request to a registrar.
osip_call_leg_unregister ()
Sends a REGISTER request to a registrar with a expire=0, so that
the registration is cancelled.
Warning: the ctxt structure may be changed. Do not rely on it to make a new registration.
osip_call_leg_release()
#define osip_call_leg_release(call) osip_call_leg_set_state(call,CALL_TERMINATED); |
Release a call-leg. You can't use it anymore, and the object will be
destroyed by the stack when the last transaction of the call-leg
will terminate, either by successfull completion or timeout.