aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/osmo_bsc_mgcp.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-12-27 18:42:27 +0100
committerHarald Welte <laforge@gnumonks.org>2017-12-27 19:08:25 +0100
commit485138706dec1172dc04277085740b1edeb5fa8a (patch)
tree93954eff13547967f131a573bf0d8e91fe5d0e8a /src/osmo-bsc/osmo_bsc_mgcp.c
parent9f7b1955d15c84e60cbc2c05cddc083993b140f3 (diff)
MGCP: Force-send a DLCX to all connections of before any new CRCXlaforge/dlcx
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
Diffstat (limited to 'src/osmo-bsc/osmo_bsc_mgcp.c')
-rw-r--r--src/osmo-bsc/osmo_bsc_mgcp.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c
index 8ea6415da..936443970 100644
--- a/src/osmo-bsc/osmo_bsc_mgcp.c
+++ b/src/osmo-bsc/osmo_bsc_mgcp.c
@@ -168,6 +168,24 @@ static void fsm_crcx_bts_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data
/* 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,
.presence = (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID | MGCP_MSG_PRESENCE_CONN_MODE),
.call_id = conn->conn_id,