aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-03-13 14:25:51 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2014-06-05 14:00:47 +0200
commit239a853f40879a68487057fbcd0a09a8d3625185 (patch)
treeff98225979a195ae8d668eb3c552454cb633199a /openbsc/src/osmo-bsc_mgcp/mgcp_main.c
parent997e1e8e9da0b82cc3755e50bb071c12975ff6ba (diff)
mgcp: Add RTP audio transcoding
This patch implements audio transcoding between the formats GSM, PCMA, L16, and optionally G.729. The feature needs to be enabled by using the autoconf option '--enable-mgcp-transcoding'. In this case mgcp_transcode.c will be compiled and linked to osmo-bsc_mgcp, and the transcoding functions provided will be registered as processing callbacks. If G.729 support is required, libcg729 needs to be installed and '--with-g729' must be passed to ./configure. Ticket: OW#1111 Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src/osmo-bsc_mgcp/mgcp_main.c')
-rw-r--r--openbsc/src/osmo-bsc_mgcp/mgcp_main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc_mgcp/mgcp_main.c b/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
index 14ec22143..6b7296591 100644
--- a/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
+++ b/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
@@ -49,6 +49,10 @@
#include "../../bscconfig.h"
+#ifdef BUILD_MGCP_TRANSCODING
+#include "mgcp_transcode.h"
+#endif
+
/* this is here for the vty... it will never be called */
void subscr_put() { abort(); }
@@ -207,6 +211,12 @@ int main(int argc, char **argv)
if (!cfg)
return -1;
+#ifdef BUILD_MGCP_TRANSCODING
+ cfg->setup_rtp_processing_cb = &mgcp_transcoding_setup;
+ cfg->rtp_processing_cb = &mgcp_transcoding_process_rtp;
+ cfg->get_net_downlink_format_cb = &mgcp_transcoding_net_downlink_format;
+#endif
+
vty_info.copyright = openbsc_copyright;
vty_init(&vty_info);
logging_vty_add_cmds(&log_info);