00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _DIALOG_H_
00021 #define _DIALOG_H_
00022
00023 #include <osip2/osip.h>
00024
00036 #ifdef __cplusplus
00037 extern "C"
00038 {
00039 #endif
00040
00041
00042 #ifndef DOXYGEN
00043 typedef enum _osip_dialog_type_t
00044 {
00045 CALLER,
00046 CALLEE
00047 }
00048 osip_dialog_type_t;
00049 #endif
00050
00051
00056 typedef struct osip_dialog osip_dialog_t;
00057
00058
00063 struct osip_dialog
00064 {
00065 char *call_id;
00066 char *local_tag;
00067 char *remote_tag;
00068 osip_list_t *route_set;
00069 int local_cseq;
00070 int remote_cseq;
00071 osip_to_t *remote_uri;
00072 osip_from_t *local_uri;
00073 osip_contact_t *remote_contact_uri;
00074 int secure;
00076 osip_dialog_type_t type;
00077 state_t state;
00078 void *your_instance;
00079 };
00080
00086 #define osip_dialog_set_instance(dialog,instance) (dialog)->your_instance = (void*)(instance)
00087
00093 #define osip_dialog_get_instance(dialog) (dialog)->your_instance
00094
00106 int osip_dialog_init_as_uac (osip_dialog_t ** dialog,
00107 osip_message_t * response);
00116 int osip_dialog_init_as_uac_with_remote_request (osip_dialog_t ** dialog,
00117 osip_message_t *next_request,
00118 int local_cseq);
00119
00128 int osip_dialog_init_as_uas (osip_dialog_t ** dialog,
00129 osip_message_t * invite,
00130 osip_message_t * response);
00135 void osip_dialog_free (osip_dialog_t * dialog);
00142 void osip_dialog_set_state (osip_dialog_t * dialog, state_t type);
00153 int osip_dialog_update_route_set_as_uas (osip_dialog_t * dialog,
00154 osip_message_t * invite);
00161 int osip_dialog_update_osip_cseq_as_uas (osip_dialog_t * dialog,
00162 osip_message_t * request);
00163
00169 int osip_dialog_match_as_uac (osip_dialog_t * dialog,
00170 osip_message_t * response);
00177 int osip_dialog_update_tag_as_uac (osip_dialog_t * dialog,
00178 osip_message_t * response);
00189 int osip_dialog_update_route_set_as_uac (osip_dialog_t * dialog,
00190 osip_message_t * response);
00191
00197 int osip_dialog_match_as_uas (osip_dialog_t * dialog,
00198 osip_message_t * request);
00199
00205 int osip_dialog_is_originator (osip_dialog_t * dialog);
00211 int osip_dialog_is_callee (osip_dialog_t * dialog);
00212
00213
00214 #ifdef __cplusplus
00215 }
00216 #endif
00217
00221 #endif