summaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-03-17 12:40:07 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2014-06-05 14:00:46 +0200
commit168ca00b02685edea650aa2a4c62481a75926125 (patch)
treebd7f44da98982b765d5b40aeaa94be206dcf0029 /openbsc/include/openbsc
parent845d0054b45dff5f5606b38dcacd9bf06a605f07 (diff)
mgcp: Add a function to get media info for MGCP responses
This patch adds the get_net_downlink_format_cb() callback to provide payload_type, subtype_name, and fmtp_extra suitable for use in a MGCP response sent to the network. Per default, the BTS side values are returned since these must be honoured by the net peer when sending audio to the media gateway (unless transcoding is done). Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/include/openbsc')
-rw-r--r--openbsc/include/openbsc/mgcp.h8
-rw-r--r--openbsc/include/openbsc/mgcp_internal.h5
2 files changed, 13 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/mgcp.h b/openbsc/include/openbsc/mgcp.h
index 34eb42955..002dd7c6e 100644
--- a/openbsc/include/openbsc/mgcp.h
+++ b/openbsc/include/openbsc/mgcp.h
@@ -92,6 +92,12 @@ typedef int (*mgcp_processing)(struct mgcp_rtp_end *dst_end,
typedef int (*mgcp_processing_setup)(struct mgcp_endpoint *endp,
struct mgcp_rtp_end *dst_end,
struct mgcp_rtp_end *src_end);
+
+typedef void (*mgcp_get_format)(struct mgcp_endpoint *endp,
+ int *payload_type,
+ const char**subtype_name,
+ const char**fmtp_extra);
+
#define PORT_ALLOC_STATIC 0
#define PORT_ALLOC_DYNAMIC 1
@@ -166,6 +172,8 @@ struct mgcp_config {
mgcp_processing rtp_processing_cb;
mgcp_processing_setup setup_rtp_processing_cb;
+ mgcp_get_format get_net_downlink_format_cb;
+
struct osmo_wqueue gw_fd;
struct mgcp_port_range bts_ports;
diff --git a/openbsc/include/openbsc/mgcp_internal.h b/openbsc/include/openbsc/mgcp_internal.h
index dbdc1d9d9..ac136a377 100644
--- a/openbsc/include/openbsc/mgcp_internal.h
+++ b/openbsc/include/openbsc/mgcp_internal.h
@@ -217,6 +217,11 @@ int mgcp_setup_rtp_processing_default(struct mgcp_endpoint *endp,
struct mgcp_rtp_end *dst_end,
struct mgcp_rtp_end *src_end);
+void mgcp_get_net_downlink_format_default(struct mgcp_endpoint *endp,
+ int *payload_type,
+ const char**subtype_name,
+ const char**fmtp_extra);
+
enum {
MGCP_DEST_NET = 0,
MGCP_DEST_BTS,