aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmgcp/mgcp_network.c
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/src/libmgcp/mgcp_network.c
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/src/libmgcp/mgcp_network.c')
-rw-r--r--openbsc/src/libmgcp/mgcp_network.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/openbsc/src/libmgcp/mgcp_network.c b/openbsc/src/libmgcp/mgcp_network.c
index 393a9e52..05c3e774 100644
--- a/openbsc/src/libmgcp/mgcp_network.c
+++ b/openbsc/src/libmgcp/mgcp_network.c
@@ -353,6 +353,19 @@ int mgcp_setup_rtp_processing_default(struct mgcp_endpoint *endp,
return 0;
}
+void mgcp_get_net_downlink_format_default(struct mgcp_endpoint *endp,
+ int *payload_type,
+ const char**audio_name,
+ const char**fmtp_extra)
+{
+ /* Use the BTS side parameters when passing the SDP data (for
+ * downlink) to the net peer.
+ */
+ *payload_type = endp->bts_end.payload_type;
+ *audio_name = endp->bts_end.audio_name;
+ *fmtp_extra = endp->bts_end.fmtp_extra;
+}
+
/**
* The RFC 3550 Appendix A assumes there are multiple sources but
* some of the supported endpoints (e.g. the nanoBTS) can only handle