libosip  5.3.0
osip_dialog.h
Go to the documentation of this file.
1 /*
2  The oSIP library implements the Session Initiation Protocol (SIP -rfc3261-)
3  Copyright (C) 2001-2020 Aymeric MOIZARD amoizard@antisip.com
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 
20 #ifndef _DIALOG_H_
21 #define _DIALOG_H_
22 
23 #include <osip2/osip.h>
24 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 #ifndef DOXYGEN
41 typedef enum _osip_dialog_type_t { CALLER, CALLEE } osip_dialog_type_t;
42 #endif
43 
48 typedef struct osip_dialog osip_dialog_t;
49 
54 struct osip_dialog {
55  char *call_id;
56  char *local_tag;
57  char *remote_tag;
58  char *line_param;
60  int local_cseq;
66  int secure;
68  osip_dialog_type_t type;
70  void *your_instance;
71 };
72 
78 #define osip_dialog_set_instance(dialog, instance) (dialog)->your_instance = (void *) (instance)
79 
85 #define osip_dialog_get_instance(dialog) (dialog)->your_instance
86 
107 int osip_dialog_init_as_uac_with_remote_request(osip_dialog_t **dialog, osip_message_t *next_request, int local_cseq);
108 
117 int osip_dialog_init_as_uas(osip_dialog_t **dialog, osip_message_t *invite, osip_message_t *response);
122 void osip_dialog_free(osip_dialog_t *dialog);
129 void osip_dialog_set_state(osip_dialog_t *dialog, state_t type);
148 
173 
180 
191 
192 #ifdef __cplusplus
193 }
194 #endif
196 #endif
int osip_dialog_update_route_set_as_uac(osip_dialog_t *dialog, osip_message_t *response)
Definition: osip_dialog.c:73
int osip_dialog_update_route_set_as_uas(osip_dialog_t *dialog, osip_message_t *invite)
Definition: osip_dialog.c:33
int osip_dialog_init_as_uac(osip_dialog_t **dialog, osip_message_t *response)
Definition: osip_dialog.c:455
void osip_dialog_free(osip_dialog_t *dialog)
Definition: osip_dialog.c:517
int osip_dialog_match_as_uac(osip_dialog_t *dialog, osip_message_t *response)
Definition: osip_dialog.c:158
int osip_dialog_match_as_uas(osip_dialog_t *dialog, osip_message_t *request)
Definition: osip_dialog.c:242
void osip_dialog_set_state(osip_dialog_t *dialog, state_t type)
Definition: osip_dialog.c:26
int osip_dialog_is_callee(osip_dialog_t *dialog)
int osip_dialog_init_as_uas(osip_dialog_t **dialog, osip_message_t *invite, osip_message_t *response)
Definition: osip_dialog.c:496
int osip_dialog_init_as_uac_with_remote_request(osip_dialog_t **dialog, osip_message_t *next_request, int local_cseq)
Definition: osip_dialog.c:472
int osip_dialog_is_originator(osip_dialog_t *dialog)
int osip_dialog_update_tag_as_uac(osip_dialog_t *dialog, osip_message_t *response)
Definition: osip_dialog.c:131
int osip_dialog_update_osip_cseq_as_uas(osip_dialog_t *dialog, osip_message_t *request)
Definition: osip_dialog.c:62
enum _state_t state_t
oSIP fsm Routines
Definition: osip_dialog.h:54
osip_list_t route_set
Definition: osip_dialog.h:59
char * local_tag
Definition: osip_dialog.h:56
osip_dialog_type_t type
Definition: osip_dialog.h:68
char * remote_tag
Definition: osip_dialog.h:57
char * call_id
Definition: osip_dialog.h:55
osip_to_t * remote_uri
Definition: osip_dialog.h:62
int local_cseq
Definition: osip_dialog.h:60
char * line_param
Definition: osip_dialog.h:58
int remote_cseq
Definition: osip_dialog.h:61
state_t state
Definition: osip_dialog.h:69
osip_contact_t * remote_contact_uri
Definition: osip_dialog.h:64
int secure
Definition: osip_dialog.h:66
osip_from_t * local_uri
Definition: osip_dialog.h:63
void * your_instance
Definition: osip_dialog.h:70
Definition: osip_from.h:47
Definition: osip_list.h:87
Definition: osip_message.h:54