From 260d6ed02c12ccde6d8eec5a34118b71207757b6 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 6 Aug 2010 01:12:21 +0800 Subject: mgcp: Add a call tap feature to forward audio to another forward port For debugging it is useful to forward (tee) UDP packets to another system and use gstreamer to inspect the rtp stream. This is untested code and might contain bugs.... and of course only tap your own calls. --- openbsc/include/openbsc/mgcp_internal.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'openbsc/include') diff --git a/openbsc/include/openbsc/mgcp_internal.h b/openbsc/include/openbsc/mgcp_internal.h index bdcd03030..19e8e3f2b 100644 --- a/openbsc/include/openbsc/mgcp_internal.h +++ b/openbsc/include/openbsc/mgcp_internal.h @@ -69,6 +69,21 @@ struct mgcp_rtp_end { int local_alloc; }; +enum { + MGCP_TAP_BTS_IN, + MGCP_TAP_BTS_OUT, + MGCP_TAP_NET_IN, + MGCP_TAP_NET_OUT, + + /* last element */ + MGCP_TAP_COUNT +}; + +struct mgcp_rtp_tap { + int enabled; + struct sockaddr_in forward; +}; + struct mgcp_endpoint { int ci; char *callid; @@ -89,6 +104,9 @@ struct mgcp_endpoint { /* SSRC/seq/ts patching for loop */ int allow_patch; + + /* tap for the endpoint */ + struct mgcp_rtp_tap taps[MGCP_TAP_COUNT]; }; #define ENDPOINT_NUMBER(endp) abs(endp - endp->cfg->endpoints) -- cgit v1.2.3