aboutsummaryrefslogtreecommitdiffstats
path: root/include/mgcp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-08-04 06:11:27 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-08-04 06:11:27 +0800
commitd86208d1ed35213be59db482439fbed0d9a9eccc (patch)
tree7a8514bb88d3068168cbf50bd5f21a66c4c2f618 /include/mgcp
parent73cdc5fd975de0a06fe3b244ea41a789f126c17c (diff)
mgcp: Update to the latest code drop.
Diffstat (limited to 'include/mgcp')
-rw-r--r--include/mgcp/mgcp.h15
-rw-r--r--include/mgcp/mgcp_internal.h19
2 files changed, 24 insertions, 10 deletions
diff --git a/include/mgcp/mgcp.h b/include/mgcp/mgcp.h
index 9bbf554..ef0a920 100644
--- a/include/mgcp/mgcp.h
+++ b/include/mgcp/mgcp.h
@@ -29,6 +29,7 @@
#include <arpa/inet.h>
#define RTP_PORT_DEFAULT 4000
+
/**
* Calculate the RTP audio port for the given multiplex
* and the direction. This allows a semi static endpoint
@@ -79,14 +80,13 @@ typedef int (*mgcp_policy)(struct mgcp_config *cfg, int endpoint, int state, con
typedef int (*mgcp_reset)(struct mgcp_config *cfg);
struct mgcp_config {
- /* common configuration */
int source_port;
char *local_ip;
char *source_addr;
+ unsigned int number_endpoints;
char *bts_ip;
char *call_agent_addr;
- /* default endpoint data */
struct in_addr bts_in;
char *audio_name;
int audio_payload;
@@ -95,24 +95,19 @@ struct mgcp_config {
int rtp_base_port;
int endp_dscp;
- /* only used in forward mode */
char *forward_ip;
int forward_port;
- unsigned int last_call_id;
-
- /* endpoint configuration */
- unsigned int number_endpoints;
- struct mgcp_endpoint *endpoints;
-
/* spec handling */
int force_realloc;
- /* callback functionality */
mgcp_change change_cb;
mgcp_policy policy_cb;
mgcp_reset reset_cb;
void *data;
+
+ struct mgcp_endpoint *endpoints;
+ unsigned int last_call_id;
};
/* config management */
diff --git a/include/mgcp/mgcp_internal.h b/include/mgcp/mgcp_internal.h
index ab6217d..2d9629a 100644
--- a/include/mgcp/mgcp_internal.h
+++ b/include/mgcp/mgcp_internal.h
@@ -33,6 +33,20 @@ enum mgcp_connection_mode {
MGCP_CONN_RECV_ONLY = 1,
MGCP_CONN_SEND_ONLY = 2,
MGCP_CONN_RECV_SEND = MGCP_CONN_RECV_ONLY | MGCP_CONN_SEND_ONLY,
+ MGCP_CONN_LOOPBACK = 4,
+};
+
+struct mgcp_rtp_state {
+ int initialized;
+ int patch;
+
+ uint32_t orig_ssrc;
+ uint32_t ssrc;
+ uint16_t seq_no;
+ int lost_no;
+ int seq_offset;
+ uint32_t last_timestamp;
+ int32_t timestamp_offset;
};
struct mgcp_endpoint {
@@ -40,6 +54,7 @@ struct mgcp_endpoint {
char *callid;
char *local_options;
int conn_mode;
+ int orig_mode;
int bts_payload_type;
int net_payload_type;
@@ -68,6 +83,10 @@ struct mgcp_endpoint {
/* statistics */
unsigned int in_bts;
unsigned int in_remote;
+
+ /* sequence bits */
+ struct mgcp_rtp_state net_state;
+ struct mgcp_rtp_state bts_state;
};
#define ENDPOINT_NUMBER(endp) abs(endp - endp->cfg->endpoints)