aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/bsc
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-01-16 09:29:28 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2017-12-01 03:37:42 +0100
commit3948ede88b65e8d01131cd96b92101d82da1ba49 (patch)
treeb439c5d531a06e6e45c4f0a468b3c689de90b266 /include/osmocom/bsc
parent43c30d0e439053881070d5ceb70f46cfecf5c221 (diff)
Adding traffic forwarding via RTP to remote application
Instead of forwarding traffic through MNCC interface, traffic can now be forwarded to a given RTP destination. A special MNCC message is used for that. 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.
Diffstat (limited to 'include/osmocom/bsc')
-rw-r--r--include/osmocom/bsc/gsm_04_08.h3
-rw-r--r--include/osmocom/bsc/mncc.h11
-rw-r--r--include/osmocom/bsc/rtp_proxy.h5
-rw-r--r--include/osmocom/bsc/transaction.h2
4 files changed, 19 insertions, 2 deletions
diff --git a/include/osmocom/bsc/gsm_04_08.h b/include/osmocom/bsc/gsm_04_08.h
index 2f5aaa98c..068672059 100644
--- a/include/osmocom/bsc/gsm_04_08.h
+++ b/include/osmocom/bsc/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;
@@ -72,4 +73,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/include/osmocom/bsc/mncc.h b/include/osmocom/bsc/mncc.h
index 4a99bb11b..12a6ec833 100644
--- a/include/osmocom/bsc/mncc.h
+++ b/include/osmocom/bsc/mncc.h
@@ -92,9 +92,13 @@ 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
+#define GSM_TCHF_FRAME_HR 0x0302
#define MNCC_SOCKET_HELLO 0x0400
@@ -176,6 +180,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/include/osmocom/bsc/rtp_proxy.h b/include/osmocom/bsc/rtp_proxy.h
index 26cac0df4..a7d692c56 100644
--- a/include/osmocom/bsc/rtp_proxy.h
+++ b/include/osmocom/bsc/rtp_proxy.h
@@ -36,8 +36,9 @@
enum rtp_rx_action {
RTP_NONE,
- RTP_PROXY,
- RTP_RECV_UPSTREAM,
+ RTP_PROXY, /* forward from BTS to BTS */
+ RTP_RECV_UPSTREAM, /* forward to L4 application */
+ RTP_RECV_L4, /* receive RTP frames from L4 application */
};
enum rtp_tx_action {
diff --git a/include/osmocom/bsc/transaction.h b/include/osmocom/bsc/transaction.h
index b6c859c71..6f4258d10 100644
--- a/include/osmocom/bsc/transaction.h
+++ b/include/osmocom/bsc/transaction.h
@@ -28,6 +28,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;
@@ -46,6 +47,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; /* L4 traffic via RTP */
} cc;
struct {
struct gsm411_smc_inst smc_inst;