HACK: rename 'struct rtp_socket' to 'struct osmo_rtp_socket'

this is just a hack to make osmo-bts compile.  Instead of this hack,
openbsc needs to be properly ported over to libosmo-trau (osmo_rtp_*)
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index ca88fed..2800461 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -77,7 +77,7 @@
 struct gsm_lchan;
 struct gsm_subscriber;
 struct gsm_mncc;
-struct rtp_socket;
+struct osmo_rtp_socket;
 struct bsc_api;
 
 /* Network Management State */
@@ -176,7 +176,7 @@
 		uint8_t rtp_payload;
 		uint8_t rtp_payload2;
 		uint8_t speech_mode;
-		struct rtp_socket *rtp_socket;
+		struct osmo_rtp_socket *rtp_socket;
 	} abis_ip;
 
 	uint8_t rqd_ta;
@@ -225,6 +225,7 @@
 			uint8_t rxqual_sub;
 		} res;
 	} meas;
+	struct llist_head dl_tch_queue;
 #endif
 };
 
diff --git a/openbsc/include/openbsc/rtp_proxy.h b/openbsc/include/openbsc/rtp_proxy.h
index 26cac0d..90cfe32 100644
--- a/openbsc/include/openbsc/rtp_proxy.h
+++ b/openbsc/include/openbsc/rtp_proxy.h
@@ -54,7 +54,7 @@
 	struct llist_head tx_queue;
 };
 
-struct rtp_socket {
+struct osmo_rtp_socket {
 	struct llist_head list;
 
 	struct rtp_sub_socket rtp;
@@ -64,7 +64,7 @@
 	enum rtp_rx_action rx_action;
 	union {
 		struct {
-			struct rtp_socket *other_sock;
+			struct osmo_rtp_socket *other_sock;
 		} proxy;
 		struct {
 			struct gsm_network *net;
@@ -80,12 +80,12 @@
 	} transmit;
 };
 
-struct rtp_socket *rtp_socket_create(void);
-int rtp_socket_bind(struct rtp_socket *rs, uint32_t ip);
-int rtp_socket_connect(struct rtp_socket *rs, uint32_t ip, uint16_t port);
-int rtp_socket_proxy(struct rtp_socket *this, struct rtp_socket *other);
-int rtp_socket_upstream(struct rtp_socket *this, struct gsm_network *net, uint32_t callref);
-int rtp_socket_free(struct rtp_socket *rs);
-int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame);
+struct osmo_rtp_socket *rtp_socket_create(void);
+int rtp_socket_bind(struct osmo_rtp_socket *rs, uint32_t ip);
+int rtp_socket_connect(struct osmo_rtp_socket *rs, uint32_t ip, uint16_t port);
+int rtp_socket_proxy(struct osmo_rtp_socket *this, struct osmo_rtp_socket *other);
+int rtp_socket_upstream(struct osmo_rtp_socket *this, struct gsm_network *net, uint32_t callref);
+int rtp_socket_free(struct osmo_rtp_socket *rs);
+int rtp_send_frame(struct osmo_rtp_socket *rs, struct gsm_data_frame *frame);
 
 #endif /* _RTP_PROXY_H */
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index c8bfbb6..ffa7bc9 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -1740,7 +1740,7 @@
 /* tell BTS to connect RTP stream to our local RTP socket */
 int rsl_ipacc_mdcx_to_rtpsock(struct gsm_lchan *lchan)
 {
-	struct rtp_socket *rs = lchan->abis_ip.rtp_socket;
+	struct osmo_rtp_socket *rs = lchan->abis_ip.rtp_socket;
 	int rc;
 
 	rc = rsl_ipacc_mdcx(lchan, ntohl(rs->rtp.sin_local.sin_addr.s_addr),
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index dcb6e11..bca7c38 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -98,6 +98,12 @@
 		struct e1inp_sign_link *sign_link =
 				msg->lchan->ts->trx->rsl_link;
 
+		if (!sign_link) {
+			LOGP(DCC, LOGL_NOTICE, "gsm48_conn_sendmsg() "
+				"for non-existant sign_link\n");
+			msgb_free(msg);
+			return -EIO;
+		}
 		msg->dst = sign_link;
 		if ((gh->proto_discr & GSM48_PDISC_MASK) == GSM48_PDISC_CC)
 			DEBUGP(DCC, "(bts %d trx %d ts %d ti %02x) "
@@ -1488,7 +1494,7 @@
 static int handle_ho_signal(unsigned int subsys, unsigned int signal,
 			    void *handler_data, void *signal_data)
 {
-	struct rtp_socket *old_rs, *new_rs, *other_rs;
+	struct osmo_rtp_socket *old_rs, *new_rs, *other_rs;
 	struct ho_signal_data *sig = signal_data;
 
 	if (subsys != SS_HO || signal != S_HANDOVER_ACK)
diff --git a/openbsc/src/libmsc/mncc_builtin.c b/openbsc/src/libmsc/mncc_builtin.c
index 105f1dd..00503d7 100644
--- a/openbsc/src/libmsc/mncc_builtin.c
+++ b/openbsc/src/libmsc/mncc_builtin.c
@@ -112,7 +112,7 @@
 	/* modify mode */
 	memset(&mncc, 0, sizeof(struct gsm_mncc));
 	mncc.callref = call->callref;
-	mncc.lchan_mode = GSM48_CMODE_SPEECH_EFR;
+	mncc.lchan_mode = GSM48_CMODE_SPEECH_V1;
 	DEBUGP(DMNCC, "(call %x) Modify channel mode.\n", call->callref);
 	mncc_tx_to_cc(call->net, MNCC_LCHAN_MODIFY, &mncc);
 
@@ -346,7 +346,7 @@
 		break;
 	case MNCC_CALL_CONF_IND:
 		/* we now need to MODIFY the channel */
-		data->lchan_mode = GSM48_CMODE_SPEECH_EFR;
+		data->lchan_mode = GSM48_CMODE_SPEECH_V1;
 		mncc_tx_to_cc(call->net, MNCC_LCHAN_MODIFY, data);
 		break;
 	case MNCC_ALERT_IND:
diff --git a/openbsc/src/libtrau/rtp_proxy.c b/openbsc/src/libtrau/rtp_proxy.c
index 2aa3a1e..95e6a94 100644
--- a/openbsc/src/libtrau/rtp_proxy.c
+++ b/openbsc/src/libtrau/rtp_proxy.c
@@ -206,7 +206,7 @@
 }
 
 /* encode and send a rtp frame */
-int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame)
+int rtp_send_frame(struct osmo_rtp_socket *rs, struct gsm_data_frame *frame)
 {
 	struct rtp_sub_socket *rss = &rs->rtp;
 	struct msgb *msg;
@@ -339,7 +339,7 @@
 	return 0;
 }
 
-static int rtcp_mangle(struct msgb *msg, struct rtp_socket *rs)
+static int rtcp_mangle(struct msgb *msg, struct osmo_rtp_socket *rs)
 {
 	struct rtp_sub_socket *rss = &rs->rtcp;
 	struct rtcp_hdr *rtph;
@@ -376,7 +376,7 @@
 }
 
 /* read from incoming RTP/RTCP socket */
-static int rtp_socket_read(struct rtp_socket *rs, struct rtp_sub_socket *rss)
+static int rtp_socket_read(struct osmo_rtp_socket *rs, struct rtp_sub_socket *rss)
 {
 	int rc;
 	struct msgb *msg = msgb_alloc(RTP_ALLOC_SIZE, "RTP/RTCP");
@@ -458,7 +458,7 @@
 }
 
 /* write from tx_queue to RTP/RTCP socket */
-static int rtp_socket_write(struct rtp_socket *rs, struct rtp_sub_socket *rss)
+static int rtp_socket_write(struct osmo_rtp_socket *rs, struct rtp_sub_socket *rss)
 {
 	struct msgb *msg;
 	int written;
@@ -485,7 +485,7 @@
 /* callback for the select.c:bfd_* layer */
 static int rtp_bfd_cb(struct osmo_fd *bfd, unsigned int flags)
 {
-	struct rtp_socket *rs = bfd->data;
+	struct osmo_rtp_socket *rs = bfd->data;
 	struct rtp_sub_socket *rss;
 
 	switch (bfd->priv_nr) {
@@ -509,7 +509,7 @@
 }
 
 static void init_rss(struct rtp_sub_socket *rss,
-		     struct rtp_socket *rs, int fd, int priv_nr)
+		     struct osmo_rtp_socket *rs, int fd, int priv_nr)
 {
 	/* initialize bfd */
 	rss->bfd.fd = fd;
@@ -518,14 +518,14 @@
 	rss->bfd.cb = rtp_bfd_cb;
 }
 
-struct rtp_socket *rtp_socket_create(void)
+struct osmo_rtp_socket *rtp_socket_create(void)
 {
 	int rc;
-	struct rtp_socket *rs;
+	struct osmo_rtp_socket *rs;
 
 	DEBUGP(DLMUX, "rtp_socket_create(): ");
 
-	rs = talloc_zero(tall_bsc_ctx, struct rtp_socket);
+	rs = talloc_zero(tall_bsc_ctx, struct osmo_rtp_socket);
 	if (!rs)
 		return NULL;
 
@@ -598,7 +598,7 @@
 static unsigned int next_udp_port = RTP_PORT_BASE;
 
 /* bind a RTP socket to a local address */
-int rtp_socket_bind(struct rtp_socket *rs, uint32_t ip)
+int rtp_socket_bind(struct osmo_rtp_socket *rs, uint32_t ip)
 {
 	int rc = -EIO;
 	struct in_addr ia;
@@ -649,7 +649,7 @@
 }
 
 /* 'connect' a RTP socket to a remote peer */
-int rtp_socket_connect(struct rtp_socket *rs, uint32_t ip, uint16_t port)
+int rtp_socket_connect(struct osmo_rtp_socket *rs, uint32_t ip, uint16_t port)
 {
 	int rc;
 	struct in_addr ia;
@@ -666,7 +666,7 @@
 }
 
 /* bind two RTP/RTCP sockets together */
-int rtp_socket_proxy(struct rtp_socket *this, struct rtp_socket *other)
+int rtp_socket_proxy(struct osmo_rtp_socket *this, struct osmo_rtp_socket *other)
 {
 	DEBUGP(DLMUX, "rtp_socket_proxy(this=%p, other=%p)\n",
 		this, other);
@@ -681,7 +681,7 @@
 }
 
 /* bind RTP/RTCP socket to application */
-int rtp_socket_upstream(struct rtp_socket *this, struct gsm_network *net,
+int rtp_socket_upstream(struct osmo_rtp_socket *this, struct gsm_network *net,
 			uint32_t callref)
 {
 	DEBUGP(DLMUX, "rtp_socket_proxy(this=%p, callref=%u)\n",
@@ -705,7 +705,7 @@
 		msgb_free(msg);
 }
 
-int rtp_socket_free(struct rtp_socket *rs)
+int rtp_socket_free(struct osmo_rtp_socket *rs)
 {
 	DEBUGP(DLMUX, "rtp_socket_free(rs=%p)\n", rs);