MGCP: Force-send a DLCX to all connections of before any new CRCX

There are some situations in which osmo-bsc releases a call without
sending a DLCX to the media gateway.  The 'laforge/fsm' has a more
proper solution to the problem, this is an interim hack which just
sends an unsolicited DLCX before the CRCX.

Change-Id: I1a78721d3d0a2f4a99cfddade2d06732f0388c30
This commit is contained in:
Harald Welte 2017-12-27 18:42:27 +01:00
parent 9f7b1955d1
commit 485138706d
1 changed files with 18 additions and 0 deletions

View File

@ -166,6 +166,24 @@ static void fsm_crcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data
LOGPFSML(fi, LOGL_DEBUG,
"CRCX/BTS: creating connection for the BTS side on MGW endpoint:0x%x...\n", rtp_endpoint);
/* Generate MGCP message string */
mgcp_msg = (struct mgcp_msg) {
.verb = MGCP_VERB_DLCX,
.presence = (MGCP_MSG_PRESENCE_ENDPOINT),
};
if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, MGCP_ENDPOINT_FORMAT, rtp_endpoint) >=
MGCP_ENDPOINT_MAXLEN) {
handle_error(mgcp_ctx, MGCP_ERR_NOMEM);
return;
}
msg = mgcp_msg_gen(mgcp, &mgcp_msg);
OSMO_ASSERT(msg);
/* Transmit MGCP message to MGW */
mgcp_ctx->mgw_pending_trans = mgcp_msg_trans_id(msg);
rc = mgcp_client_tx(mgcp, msg, NULL, NULL);
/* Generate MGCP message string */
mgcp_msg = (struct mgcp_msg) {
.verb = MGCP_VERB_CRCX,