Name
OsipCallLeg private API -- This is the OsipCallLeg api that is used inside the osipua library.
This part of documentation should only concern osipua developpers.
Details
osip_call_leg_new_from_incoming_trn ()
OsipCallLeg* osip_call_leg_new_from_incoming_trn
(transaction_t *trn); |
Create a new call-leg from an initial incoming request. The function
assumes that there is no existing call-leg that match the new request.
You should use #osip_call_leg_find() to check this.
osip_call_leg_compose_request ()
sip_t* osip_call_leg_compose_request (OsipCallLeg *call_leg,
int msgtype,
char *sdpbody); |
Creates a sip request of type msgtype according to the context of
the call-leg call_leg. The request is not sent.
osip_call_leg_send_request ()
int osip_call_leg_send_request (OsipCallLeg *call_leg,
sip_t *sipmsg); |
Sends a sip request. The transaction is created to wrap the request and
to the list of transaction of call-leg call_leg.
osip_call_leg_ack ()
void osip_call_leg_ack (OsipCallLeg *call,
transaction_t *trn); |
This function generates and sends an ACK request that will end the
transaction trn.
osip_call_leg_send_response ()
void osip_call_leg_send_response (OsipCallLeg *call,
transaction_t *trn,
sip_t *resp); |
Sends the response resp that will be part of the transaction trn,
trn being part of the call-leg call.
osip_call_leg_respond ()
void osip_call_leg_respond (OsipCallLeg *call,
int code,
char *body); |
This function creates a sip response in the context of the call-leg call
for the last transaction and sends it automatically.
A sdp body can be optionnaly appended to the response.
osip_call_leg_update_from_response ()
void osip_call_leg_update_from_response
(OsipCallLeg *call,
sip_t *resp); |
This function should be called each time a new response is received with
a call-leg. It updates the context of the call-leg according to the
response.
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.
osip_call_leg_destroy ()
Destroy a call-leg and all data associated with it.
BUT: this function should not be called directly. You should use
osip_call_leg_release instead to schedule the destruction of the call
leg.