Osmocom Media Gateway (RTP proxy and RTP/E1 gateway)
https://osmocom.org/projects/osmo-mgw
Neels Hofmeyr
cc2f7937ed
codecs[] is an array of enum osmo_mgcp_codecs. ptmap[] is an array of { enum osmo_mgcp_codecs, unsigned int ptmap }. MGCP lists first a bunch of payload type numbers and then specifies them again for details, like the numbers 112, 96, 3 in this example: m=audio <port> RTP/AVP 112 96 3 a=rtpmap:112 AMR/8000 a=rtpmap:96 VND.3GPP.IUFP/16000 a=rtpmap:3 GSM-FR/8000 So far we keep these lists in two separate arrays: - codecs[], codecs_len stores the 'm=audio' list - ptmap[], ptmap_len stores the 'a=rtpmap' list (and may omit some elements present in codecs[]) This applies to both struct mgcp_response and struct mgcp_msg. These are semantically identical, and the separation leads to checks, conversions and dear hopes of correct ordering. So let's keep only one list with both codec and payload type number in it. The 'm=audio' list establishes the order of the pt numbers, and the 'a=rtpmap' list adds codec information to the established entries. In the internal API structs mgcp_msg and mgcp_response, just drop the codecs[] entirely. In public API struct mgcp_conn_peer, keep the codecs[] array, mark it deprecated, and provide a backwards compat conversion: if any caller invokes mgcp_conn_create() or mgcp_conn_modify() with codecs[] still present in the verb_info arg, then move codecs[] entries over to the ptmap[] array in a sensible way. (BTW, even mgcp_conn_create() and mgcp_conn_modify() are never called from outside of libosmo-mgcp-client in any of our osmo-cni programs; users call osmo_mgcpc_ep_ci_add() and osmo_mgcpc_ep_ci_request(), which in turn may pass user-provided codecs[] lists on to mgcp_conn_create() or mgcp_conn_modify().) Tests for parsing the MGCP response are mostly missing. They will be added in upcoming patch I842ce65a9a70f313570857b7df53727cc572b9e6, because they will be using only the new ptmap API. Related: OS#6171 Change-Id: I798e02c6663376d3d52f4a74fc4b32411ce95bed |
||
---|---|---|
contrib | ||
debian | ||
doc | ||
include | ||
m4 | ||
src | ||
tests | ||
.clang-format | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
AUTHORS | ||
COPYING | ||
Makefile.am | ||
README | ||
README.vty-tests | ||
TODO-RELEASE | ||
configure.ac | ||
git-version-gen | ||
libosmo-mgcp-client.pc.in | ||
osmoappdesc.py |
README
About OsmoMGW ============= OsmoMGW originated from the OpenBSC project, which started as a minimalistic all-in-one implementation of the GSM Network. In 2017, OpenBSC had reached maturity and diversity (including M3UA SIGTRAN and 3G support in the form of IuCS and IuPS interfaces) that naturally lead to a separation of the all-in-one approach to fully independent separate programs as in typical GSM networks. OsmoMGW was one of the parts split off from the old openbsc.git. It originated as a solution to merely navigate RTP streams through a NAT, but has since matured to a Media Gateway implementation that is capable of streaming RTP for 2G (AoIP) and 3G (IuCS) GSM networks as well as (still not implemented at time of writing) transcoding between TRAU, various RTP payloads and IuUP. The OsmoMGW program exposes an MGCP interface towards clients like OsmoMSC and OsmoBSC, and receives and sends RTP streams as configured via MGCP. The libosmo-mgcp-client library exposes utilities used by e.g. OsmoMSC (found in osmo-msc.git) to instruct OsmoMGW via its MGCP service. Find OsmoMGW issue tracker and wiki online at https://osmocom.org/projects/osmo-mgw https://osmocom.org/projects/osmo-mgw/wiki