libosip
5.3.0
|
Classes | |
struct | osip_dialog |
Macros | |
#define | osip_dialog_set_instance(dialog, instance) (dialog)->your_instance = (void *) (instance) |
#define | osip_dialog_get_instance(dialog) (dialog)->your_instance |
Typedefs | |
typedef struct osip_dialog | osip_dialog_t |
#define osip_dialog_get_instance | ( | dialog | ) | (dialog)->your_instance |
Retrieve application instance from dialog
dialog | The osip dialog |
#define osip_dialog_set_instance | ( | dialog, | |
instance | |||
) | (dialog)->your_instance = (void *) (instance) |
Link osip dialog to application
dialog | The osip dialog |
instance | The application instance |
Structure for referencing a dialog.
void osip_dialog_free | ( | osip_dialog_t * | dialog | ) |
Free all resource in a osip_dialog_t element.
dialog | The element to free. |
References osip_dialog::call_id, osip_dialog::line_param, osip_dialog::local_tag, osip_dialog::local_uri, osip_contact_free(), osip_from_free(), osip_list_special_free(), osip_record_route_free(), osip_to_free(), osip_dialog::remote_contact_uri, osip_dialog::remote_tag, osip_dialog::remote_uri, and osip_dialog::route_set.
int osip_dialog_init_as_uac | ( | osip_dialog_t ** | dialog, |
osip_message_t * | response | ||
) |
Allocate a osip_dialog_t element as a UAC. NOTE1: The dialog should be created when the first response is received. (except for a 100 Trying) NOTE2: Remote UA should be compliant! If not (not tag in the to header?) the old mechanism is used to match the request but if 2 uncompliant UA both answer 200 OK for the same transaction, they won't be detected. This is a major BUG in the old rfc.
dialog | The element to allocate. |
response | The response containing the informations. |
References osip_message::from, osip_message::to, and osip_dialog::type.
int osip_dialog_init_as_uac_with_remote_request | ( | osip_dialog_t ** | dialog, |
osip_message_t * | next_request, | ||
int | local_cseq | ||
) |
Allocate a osip_dialog_t element as a UAC.
dialog | The element to allocate. |
next_request | The response containing the informations. |
local_cseq | The local cseq |
References osip_message::cseq, osip_message::from, osip_cseq::number, osip_message::to, and osip_dialog::type.
int osip_dialog_init_as_uas | ( | osip_dialog_t ** | dialog, |
osip_message_t * | invite, | ||
osip_message_t * | response | ||
) |
Allocate a osip_dialog_t element as a UAS. NOTE1: The dialog should be created when the first response is sent. (except for a 100 Trying)
dialog | The element to allocate. |
invite | The INVITE request containing some informations. |
response | The response containing other informations. |
References osip_message::cseq, osip_message::from, osip_cseq::number, osip_message::to, and osip_dialog::type.
int osip_dialog_is_callee | ( | osip_dialog_t * | dialog | ) |
Is dialog initiated by as CALLEE
dialog | The element to work on. |
int osip_dialog_is_originator | ( | osip_dialog_t * | dialog | ) |
Is dialog initiated by as CALLER
dialog | The element to work on. |
int osip_dialog_match_as_uac | ( | osip_dialog_t * | dialog, |
osip_message_t * | response | ||
) |
Match a response received with a dialog.
dialog | The element to work on. |
response | The response received. |
References osip_dialog::call_id, osip_message::call_id, osip_message::from, osip_uri_param::gvalue, osip_dialog::local_tag, osip_dialog::local_uri, osip_call_id_to_str(), osip_from_get_tag, osip_to_get_tag, osip_dialog::remote_tag, osip_dialog::remote_uri, and osip_message::to.
int osip_dialog_match_as_uas | ( | osip_dialog_t * | dialog, |
osip_message_t * | request | ||
) |
Match a request (response sent?) received with a dialog.
dialog | The element to work on. |
request | The request received. |
References osip_dialog::call_id, osip_message::call_id, osip_message::from, osip_uri_param::gvalue, osip_dialog::line_param, osip_dialog::local_tag, osip_dialog::local_uri, osip_call_id_to_str(), osip_from_get_tag, osip_uri_param_get_byname(), osip_dialog::remote_tag, osip_dialog::remote_uri, osip_message::req_uri, osip_message::to, and osip_uri::url_params.
Referenced by osip_stop_200ok_retransmissions().
void osip_dialog_set_state | ( | osip_dialog_t * | dialog, |
state_t | type | ||
) |
Set the state of the dialog. This is useful to keep information on who is the initiator of the call.
dialog | The element to work on. |
type | The type of dialog (CALLEE or CALLER). |
References osip_dialog::state.
int osip_dialog_update_osip_cseq_as_uas | ( | osip_dialog_t * | dialog, |
osip_message_t * | request | ||
) |
Update the CSeq (remote cseq) during a UAS transaction of a dialog. NOTE: All INCOMING transactions MUST update the remote CSeq.
dialog | The element to work on. |
request | The request received. |
References osip_message::cseq, osip_cseq::number, and osip_dialog::remote_cseq.
int osip_dialog_update_route_set_as_uac | ( | osip_dialog_t * | dialog, |
osip_message_t * | response | ||
) |
Update the Route-Set as UAC of a dialog. NOTE: bis-09 says that only INVITE transactions can update the route-set. NOTE: bis-09 says that updating the route-set means: update the contact field only (AND NOT THE ROUTE-SET). This method follow this behaviour. NOTE: This method should be called for each request (except 100 Trying) received for a dialog.
dialog | The element to work on. |
response | The response received. |
References osip_message::contacts, MSG_IS_STATUS_2XX, osip_contact_clone(), osip_contact_free(), osip_list_add(), osip_list_eol(), osip_list_get(), osip_list_init(), osip_list_size(), osip_list_special_free(), osip_record_route_clone, osip_record_route_free(), osip_message::record_routes, osip_dialog::remote_contact_uri, osip_dialog::route_set, and osip_dialog::state.
int osip_dialog_update_route_set_as_uas | ( | osip_dialog_t * | dialog, |
osip_message_t * | invite | ||
) |
Update the Route-Set as UAS of a dialog. NOTE: bis-09 says that only INVITE transactions can update the route-set. NOTE: bis-09 says that updating the route-set means: update the contact field only (AND NOT THE ROUTE-SET). This method follow this behaviour. NOTE: This method should be called for each request received for a dialog.
dialog | The element to work on. |
invite | The invite received. |
References osip_message::contacts, osip_contact_clone(), osip_contact_free(), osip_list_eol(), osip_list_get(), and osip_dialog::remote_contact_uri.
int osip_dialog_update_tag_as_uac | ( | osip_dialog_t * | dialog, |
osip_message_t * | response | ||
) |
Update the tag as UAC of a dialog?. (this could be needed if the 180 does not contains any tag, but the 200 contains one.
dialog | The element to work on. |
response | The response received. |
References osip_uri_param::gvalue, osip_to_get_tag, osip_dialog::remote_tag, and osip_message::to.