OsipCallLeg public API
Name
OsipCallLeg public API --
Details
struct OsipDialog
struct OsipDialog
{
from_t *from;
// to_t *to;
// call_id_t *callid;
// int local_cseq;
// int remote_cseq;
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.
*/
/* AMD: this can be acheived by the dialog.h API in oSIP */
dialog_t *dialog;
/* transactions associated with call-leg */
transaction_t *inc_invite_tr;
transaction_t *out_invite_tr;
transaction_t *inc_bye_tr;
transaction_t *out_bye_tr;
transaction_t *inc_cancel_tr;
transaction_t *out_cancel_tr;
transaction_t *out_register_tr;
/* list_t incoming_transactions; */
/* list_t outgoing_transactions; */
struct _RegistrationCtxt *reg_context; /* the registration context if a registration is occuring */
int inv_auth_count;
int reg_auth_count;
int resp180_count;
unsigned int tag_set:1;
unsigned int padding:31;
struct _OsipUA *ua; /* the ua object that manages the call */
list_t body_contexts; /* the active body contexts */
void *data;
}; |
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 cseq_number;
char *callid_number;
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_dialog_new ()
Creates a new OsipDialog object managed by the user agent ua.
osip_dialog_invite ()
int osip_dialog_invite (OsipDialog *call_leg,
char *callee,
char *body_mime); |
Sends an invite to callee.
osip_dialog_accept_invite ()
void osip_dialog_accept_invite (OsipDialog *call_leg,
transaction_t *trn); |
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_dialog_bye().
osip_dialog_bye ()
Sends a bye and ends the call-leg.
osip_dialog_register ()
Sends a REGISTER request to a registrar.
osip_dialog_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_dialog_release ()
Release a dialog. 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.