aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-01-16 09:29:28 +0100
committerIvan Kluchnikov <kluchnikovi@gmail.com>2015-05-26 15:55:12 +0300
commitbc1aaacf7412e7a042e28be75139a72de3324c93 (patch)
tree5fad78b6169cf2f0efaf9786429f6f6df17d861d /openbsc/include
parent4c8e8f990a24fc5ecb24c5c21c944d8ab4dc7c1e (diff)
Add traffic forwarding via RTP to remote application
Instead of forwarding traffic through MNCC interface, traffic can be forwarded to a given RTP peer directly. A special MNCC message is used to control the peer's destination. The traffic can still be forwarded through MNCC interface when this special MNCC message is not used. It also works with E1 based BTSs. In conjunction with LCR's "rtp-bridge" feature, the RTP traffic can be directly exchanged with a remote SIP endpoint, so that the traffic is not forwarded by LCR itself. This way the performance of handling traffic only depends on OpenBSC and the remote SIP endpoint. Also the traffic is exchanged with the SIP endpoint without transcoding, to have maximum performance. Increment MNCC version to 5. Conflicts: openbsc/tests/gbproxy/gbproxy_test.c
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/gsm_04_08.h3
-rw-r--r--openbsc/include/openbsc/mncc.h12
-rw-r--r--openbsc/include/openbsc/rtp_proxy.h5
-rw-r--r--openbsc/include/openbsc/transaction.h2
4 files changed, 19 insertions, 3 deletions
diff --git a/openbsc/include/openbsc/gsm_04_08.h b/openbsc/include/openbsc/gsm_04_08.h
index 8df7b735f..93348d1a8 100644
--- a/openbsc/include/openbsc/gsm_04_08.h
+++ b/openbsc/include/openbsc/gsm_04_08.h
@@ -6,6 +6,7 @@
#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <openbsc/meas_rep.h>
+#include <openbsc/mncc.h>
struct msgb;
struct gsm_bts;
@@ -75,4 +76,6 @@ void gsm48_lchan2chan_desc(struct gsm48_chan_desc *cd,
void release_security_operation(struct gsm_subscriber_connection *conn);
void allocate_security_operation(struct gsm_subscriber_connection *conn);
+int tch_frame_down(struct gsm_network *net, uint32_t callref, struct gsm_data_frame *data);
+
#endif
diff --git a/openbsc/include/openbsc/mncc.h b/openbsc/include/openbsc/mncc.h
index ffac7fd6f..32a60e9e9 100644
--- a/openbsc/include/openbsc/mncc.h
+++ b/openbsc/include/openbsc/mncc.h
@@ -92,6 +92,9 @@ struct gsm_call {
#define MNCC_FRAME_RECV 0x0201
#define MNCC_FRAME_DROP 0x0202
#define MNCC_LCHAN_MODIFY 0x0203
+#define MNCC_RTP_CREATE 0x0204
+#define MNCC_RTP_CONNECT 0x0205
+#define MNCC_RTP_FREE 0x0206
#define GSM_TCHF_FRAME 0x0300
#define GSM_TCHF_FRAME_EFR 0x0301
@@ -163,7 +166,7 @@ struct gsm_data_frame {
unsigned char data[0];
};
-#define MNCC_SOCK_VERSION 4
+#define MNCC_SOCK_VERSION 5
struct gsm_mncc_hello {
uint32_t msg_type;
uint32_t version;
@@ -179,6 +182,13 @@ struct gsm_mncc_hello {
uint32_t lchan_type_offset;
};
+struct gsm_mncc_rtp {
+ uint32_t msg_type;
+ uint32_t callref;
+ uint32_t ip;
+ uint16_t port;
+};
+
char *get_mncc_name(int value);
void mncc_set_cause(struct gsm_mncc *data, int loc, int val);
void cc_tx_to_mncc(struct gsm_network *net, struct msgb *msg);
diff --git a/openbsc/include/openbsc/rtp_proxy.h b/openbsc/include/openbsc/rtp_proxy.h
index 52ffefd27..a5f6a2bea 100644
--- a/openbsc/include/openbsc/rtp_proxy.h
+++ b/openbsc/include/openbsc/rtp_proxy.h
@@ -40,8 +40,9 @@
enum rtp_rx_action {
RTP_NONE,
- RTP_PROXY,
- RTP_RECV_UPSTREAM,
+ RTP_PROXY, /* forward from BTS to BTS */
+ RTP_RECV_UPSTREAM, /* forward to application */
+ RTP_RECV_APP, /* receive RTP frames from application */
};
enum rtp_tx_action {
diff --git a/openbsc/include/openbsc/transaction.h b/openbsc/include/openbsc/transaction.h
index 6ef1612a9..f1b6d111d 100644
--- a/openbsc/include/openbsc/transaction.h
+++ b/openbsc/include/openbsc/transaction.h
@@ -31,6 +31,7 @@ struct gsm_trans {
/* reference from MNCC or other application */
uint32_t callref;
+ uint32_t callref_keep; /* to remember callref, even if it is removed */
/* if traffic channel receive was requested */
int tch_recv;
@@ -49,6 +50,7 @@ struct gsm_trans {
int T308_second; /* used to send release again */
struct osmo_timer_list timer;
struct gsm_mncc msg; /* stores setup/disconnect/release message */
+ struct rtp_socket *rs; /* application traffic via RTP */
} cc;
struct {
struct gsm411_smc_inst smc_inst;