osmo-mgw/src/libosmo-mgcp
Philipp Maier 8dc3597085 mgcp_protocol: refactor MGCP request handling
At the moment the MGCP request handling and message parsing is not
clearly separated. The function mgcp_parse_header() in mgcp_msg.c is
also responsible for resolving an endpoint. This leads to unclear layer
separation. We eventually end up in a situation where we can not execute
any request handler without beeing able to resolve an endpoint, however
this is necessary if we want to implement wildcarded DLCX resquests.

In the current situation a wildcarded DLCX is not possible to implement
as we always have to resolve a an to get to the trunk which we need to
iterate. However, we just can't resolve a free endpoint in a situation
where all endpoints on te trunk are in use.

We have to refactor the request handler so that the parsing in mgcp_msg
only extracts us the endpoint name. The resolving is then done in
mgcp_handle_message() in mgcp_protocol.c. Then we are able to decide
what to do if we are unable to resolve an endpoint but still be able to
resolve the trunk.

This patch does not change the behaviour of osmo-mgw yet, but it lays
the foundation for request handler implementations that can still
perform useful actions if no endpoint but a trunk has been resolved. A
wilcarded DLCX is such a case. It does not need an endpoint, just the
trunk.

Change-Id: I9f519d8a0ee8a513fa1e74acf3ee7dbc0991cdde
Related: SYS#5535
2021-07-20 17:00:09 +02:00
..
Makefile.am mgcp_e1: finish E1 support, add E1 support from libosmoabis 2020-08-10 22:56:59 +02:00
g711common.h create libosmo-mgcp and osmo-mgw by copying legacy code 2017-10-05 01:40:43 +00:00
mgcp_codec.c get rid of mgcp_internal.h 2020-08-10 22:56:59 +02:00
mgcp_conn.c Use new stat item/ctr getter APIs 2021-06-04 17:57:34 +02:00
mgcp_ctrl.c Add CTRL interface to osmo-mgw 2020-03-08 13:23:46 +01:00
mgcp_e1.c Use new stat item/ctr getter APIs 2021-06-04 17:57:34 +02:00
mgcp_endp.c mgcp_trunk: use unsigned int instead of int as trunk_nr 2021-07-20 16:34:50 +02:00
mgcp_msg.c mgcp_protocol: refactor MGCP request handling 2021-07-20 17:00:09 +02:00
mgcp_network.c check_rtp_destin(): clarify log msg 2021-07-09 11:52:04 +00:00
mgcp_osmux.c mgcp_network: refactor MGCP_DUMMY_LOAD 2021-06-07 20:14:35 +00:00
mgcp_protocol.c mgcp_protocol: refactor MGCP request handling 2021-07-20 17:00:09 +02:00
mgcp_ratectr.c mgcp_trunk: use unsigned int instead of int as trunk_nr 2021-07-20 16:34:50 +02:00
mgcp_sdp.c mgcp_protocol: refactor MGCP request handling 2021-07-20 17:00:09 +02:00
mgcp_stat.c Use new stat item/ctr getter APIs 2021-06-04 17:57:34 +02:00
mgcp_trunk.c mgcp_trunk: use unsigned int instead of int as trunk_nr 2021-07-20 16:34:50 +02:00
mgcp_vty.c mgcp_trunk: use unsigned int instead of int as trunk_nr 2021-07-20 16:34:50 +02:00