Skip to content
Success

Changes

Summary

  1. mgw: Split mgcp_rtp_end to its own file (details)
  2. mgw: Introduce mgcp_rtp_end_init() (details)
  3. mgw: Introduce struct mgcp_codecset struct (details)
  4. mgw: Cleanup rtp_endp fields in its own function (details)
  5. mgw: Move force_ptime logic outside of main CRCX func handler (details)
  6. mgw: Move several params setting to mgcp_rtp_end_init() (details)
  7. mgw: Simplify and redo code around ssrc patch feature (details)
Commit b3457cd250cdc2143fb0dedd0dd7cc7da7925862 by Pau Espin Pedrol
mgw: Split mgcp_rtp_end to its own file

Preparation path to add an init function and start untangling related
code.

While at it, move definition of struct mgcp_rtp_codec to the mgcp_codec.h where it belongs.

Change-Id: Id1b6cab57e44ad4859bde8212d0ac9f7146d7198
The file was addedinclude/osmocom/mgcp/mgcp_rtp_end.h
The file was modifiedinclude/osmocom/mgcp/mgcp_conn.h
The file was modifiedinclude/osmocom/mgcp/mgcp_codec.h
The file was addedsrc/libosmo-mgcp/mgcp_rtp_end.c
The file was modifiedsrc/libosmo-mgcp/Makefile.am
The file was modifiedinclude/osmocom/mgcp/mgcp_network.h
The file was modifiedsrc/libosmo-mgcp/mgcp_network.c
The file was modifiedinclude/osmocom/mgcp/Makefile.am
Commit 345c37a5438b6faa6e3f363e8b50d9e94895a96f by Pau Espin Pedrol
mgw: Introduce mgcp_rtp_end_init()

Change-Id: I29f57dfde60e3134f1db422dc63e7c58d3db7d54
The file was modifiedinclude/osmocom/mgcp/mgcp_rtp_end.h
The file was modifiedsrc/libosmo-mgcp/mgcp_rtp_end.c
The file was modifiedsrc/libosmo-mgcp/mgcp_conn.c
Commit ba812f7e86e8bb1cb9cabad1546eacd5d3809cc0 by Pau Espin Pedrol
mgw: Introduce struct mgcp_codecset struct

We do tons of operations on 3 fields (array of codecs, len of array,
selected code) which can be isolated.
Right now, we are using APIs which somehow require structs 2-3 levels of
encapsulation above the ones really required, which makes all code
totally entangled, difficult to understand and prone to errors when
changing stuff in deeply nested structs.
A prove of this is how this patch affects a lot of lines in lots of
places.

Change-Id: Id7db7ab01d56b7fa2415123b604375e48c82ab25
The file was modifiedsrc/libosmo-mgcp/mgcp_protocol.c
The file was modifiedsrc/libosmo-mgcp/mgcp_sdp.c
The file was modifiedsrc/libosmo-mgcp/mgcp_osmux.c
The file was modifiedsrc/libosmo-mgcp/mgcp_vty.c
The file was modifiedsrc/libosmo-mgcp/mgcp_network.c
The file was modifiedinclude/osmocom/mgcp/mgcp_codec.h
The file was modifiedsrc/libosmo-mgcp/mgcp_codec.c
The file was modifiedsrc/libosmo-mgcp/mgcp_iuup.c
The file was modifiedinclude/osmocom/mgcp/mgcp_rtp_end.h
The file was modifiedsrc/libosmo-mgcp/mgcp_conn.c
The file was modifiedsrc/libosmo-mgcp/mgcp_e1.c
The file was modifiedtests/mgcp/mgcp_test.c
Commit 80a5abbbe31274b2b71898ae3a30bdefbb1c2128 by Pau Espin Pedrol
mgw: Cleanup rtp_endp fields in its own function

Change-Id: I0b2ccb94129dc7aed6fe13bb20f9910a53d8a41e
The file was modifiedsrc/libosmo-mgcp/mgcp_conn.c
The file was modifiedinclude/osmocom/mgcp/mgcp_rtp_end.h
The file was modifiedsrc/libosmo-mgcp/mgcp_rtp_end.c
Commit 71f313749e4cf7ed4300ea6f72d9491d0431b818 by Pau Espin Pedrol
mgw: Move force_ptime logic outside of main CRCX func handler

Apply the forced value automatically during init, and then only
override it based on received input from MGCP when it has not been
forced by VTY config.

Change-Id: I02a92a090887caa8e05917a44c8b2351fa7b9b50
The file was modifiedsrc/libosmo-mgcp/mgcp_rtp_end.c
The file was modifiedsrc/libosmo-mgcp/mgcp_protocol.c
The file was modifiedinclude/osmocom/mgcp/mgcp_rtp_end.h
The file was modifiedsrc/libosmo-mgcp/mgcp_sdp.c
The file was modifiedsrc/libosmo-mgcp/mgcp_conn.c
Commit 46ddc65626b4a42a380556be2a5bbc0134e80779 by Pau Espin Pedrol
mgw: Move several params setting to mgcp_rtp_end_init()

There's no need to set those 2 params later on, simply set them during
init() to simplify code.

Change-Id: I38e2cfbe03c1e2de48e48f30a04af746bc2368a4
The file was modifiedsrc/libosmo-mgcp/mgcp_protocol.c
The file was modifiedsrc/libosmo-mgcp/mgcp_rtp_end.c
Commit 3ea3a69821c6701984f22b8e97fd1fafb1e47792 by Pau Espin Pedrol
mgw: Simplify and redo code around ssrc patch feature

The previous logic to configure SSRC patching was over complex and
confusing, with even some broken logic like "patch only once", which is
not really needed. Hence, simplify the internal logic to either patch
SSRC always or don't do it, based on VTY configuration.

The "force SSRC" feature was added in
db2d431697609d473de433b7028f81ce499a02c0 and further changed in
e2292f3aa1e9ae1faf5521a9cb108775f1ac0540, due to the need for nanoBTS to
always keep the same SSRC on received packets. However, it makes no
sense that is actually needed only once: if remote end changed several
times, then we should keep patching in that case.

This change allows getting rid of confusing applying of settings at a
later time through mgcp_rtp_end_config(), which is no longer needed and
can be dropped, simplifying steps during CRCX/MDCX/DLCX.

Change-Id: Ib7216a775f4ad126e62b9e99aff381fd45015819
The file was modifiedinclude/osmocom/mgcp/mgcp_rtp_end.h
The file was modifiedsrc/libosmo-mgcp/mgcp_network.c
The file was modifiedinclude/osmocom/mgcp/mgcp_trunk.h
The file was modifiedsrc/libosmo-mgcp/mgcp_vty.c
The file was modifiedsrc/libosmo-mgcp/mgcp_rtp_end.c
The file was modifiedsrc/libosmo-mgcp/mgcp_protocol.c
The file was modifiedtests/mgcp/mgcp_test.c
The file was modifiedinclude/osmocom/mgcp/mgcp_protocol.h