#include <glib.h>
#include <stdio.h>
+#include <epan/address.h>
/****************************************************************************/
/* defines voip call state */
typedef enum _voip_call_state {
VOIP_CALL_SETUP,
+ VOIP_RINGING,
VOIP_IN_CALL,
VOIP_CANCELLED,
VOIP_COMPLETED,
VOIP_UNKNOWN
} voip_call_state;
-extern char *voip_call_state_name[6];
+extern char *voip_call_state_name[7];
typedef enum _voip_call_active_state {
VOIP_ACTIVE,
typedef enum _voip_protocol {
VOIP_SIP,
VOIP_ISUP,
- VOIP_H323
+ VOIP_H323,
+ VOIP_MGCP
} voip_protocol;
-extern char *voip_protocol_name[3];
+extern char *voip_protocol_name[4];
/* defines specific SIP data */
} sip_calls_info_t;
/* defines specific ISUP data */
-
typedef struct _isup_calls_info {
guint16 cic;
guint32 opc, dpc;
guint8 ni;
} isup_calls_info_t;
+/* defines specific H245 data */
typedef struct _h245_address {
- guint32 h245_address;
+ address h245_address;
guint16 h245_port;
} h245_address_t;
typedef struct _h323_calls_info {
guint8 *guid; /* Call ID to identify a H225 */
GList* h245_list; /* list of H245 Address and ports for tunneling off calls*/
- guint32 h225SetupAddr; /* we use the SETUP H225 IP to determine if packets are forward or reverse */
+ address h225SetupAddr; /* we use the SETUP H225 IP to determine if packets are forward or reverse */
gboolean is_h245;
gboolean is_faststart_Setup; /* if faststart field is included in Setup*/
gboolean is_faststart_Proc; /* if faststart field is included in Proce, Alerting, Progress or Connect*/
gboolean is_h245Tunneling;
gint32 q931_crv;
gint32 q931_crv2;
+ guint requestSeqNum;
} h323_calls_info_t;
+/* defines specific MGCP data */
+typedef struct _mgcp_calls_info {
+ gchar *endpointId;
+ gboolean fromEndpoint; /* true if the call was originated from the Endpoint, false for calls from MGC */
+} mgcp_calls_info_t;
+
+
/* defines a voip call */
typedef struct _voip_calls_info {
voip_call_state call_state;
gchar *from_identity;
gchar *to_identity;
gpointer prot_info;
- guint32 initial_speaker;
+ address initial_speaker;
guint32 npackets;
guint32 first_frame_num; /* frame number of first frame */
guint32 last_frame_num;
/* struct holding all information of the tap */
typedef struct _voip_calls_tapinfo {
- int ncalls; /* number of calls in the list */
+ int ncalls; /* number of call */
GList* strinfo_list; /* list with all calls */
int npackets; /* total number of packets of all calls */
voip_calls_info_t* filter_calls_fwd; /* used as filter in some tap modes */
int mtp3_dummy;
int isup_dummy;
int q931_dummy;
+ int mgcp_dummy;
} voip_calls_tapinfo_t;
+/* defines a RTP stream */
+typedef struct _voip_rtp_stream_info {
+ address src_addr;
+ guint16 src_port;
+ address dest_addr;
+ guint16 dest_port;
+ guint32 ssrc;
+ guint8 pt;
+ guint32 npackets;
+ gboolean end_stream;
+
+ guint32 first_frame_num; /* frame number of first frame */
+ guint32 setup_frame_number; /* frame number of setup message */
+ /* start of recording (GMT) of this stream */
+ guint32 start_rel_sec; /* start stream rel seconds */
+ guint32 start_rel_usec; /* start stream rel microseconds */
+ guint32 stop_rel_sec; /* stop stream rel seconds */
+ guint32 stop_rel_usec; /* stop stream rel microseconds */
+ gint32 rtp_event;
+} voip_rtp_stream_info_t;
+
+/* structure that holds the information about all RTP streams associated with the calls */
+/* struct holding all information of the RTP tap */
+typedef struct _voip_rtp_tapinfo {
+ int nstreams; /* number of rtp streams */
+ GList* list; /* list with the rtp streams */
+ int rtp_dummy;
+ int rtp_event_dummy;
+} voip_rtp_tapinfo_t;
+
/****************************************************************************/
/* INTERFACE */
void h245dg_calls_init_tap(void);
void q931_calls_init_tap(void);
void sdp_calls_init_tap(void);
+void rtp_init_tap(void);
+void rtp_event_init_tap(void);
+void rtp_init_tap_event(void);
+void mgcp_calls_init_tap(void);
/*
void remove_tap_listener_h245dg_calls(void);
void remove_tap_listener_q931_calls(void);
void remove_tap_listener_sdp_calls(void);
+void remove_tap_listener_rtp(void);
+void remove_tap_listener_rtp_event(void);
+void remove_tap_listener_mgcp_calls(void);
/*
* Retrieves a constant reference to the unique info structure of the voip_calls tap listener.
void graph_analysis_data_init(void);
-void add_rtp_streams_graph(void);
-
#endif /*VOIP_CALLS_H_INCLUDED*/