diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libmsc/a_iface.c | 11 | ||||
-rw-r--r-- | src/libmsc/osmo_msc.c | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index 2a28803dd..b16936f50 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -405,6 +405,17 @@ int a_iface_tx_assignment(const struct gsm_trans *trans) return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg); } +/* Send clear command via A-interface */ +int a_iface_tx_clear_cmd(struct gsm_subscriber_connection *conn) +{ + struct msgb *msg; + + LOGP(DMSC, LOGL_NOTICE, "Sendig clear command to BSC (conn_id=%u)\n", conn->a.conn_id); + + msg = gsm0808_create_clear_command(GSM0808_CAUSE_CALL_CONTROL); + return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg); +} + /* Callback function: Close all open connections */ static void a_reset_cb(const void *priv) { diff --git a/src/libmsc/osmo_msc.c b/src/libmsc/osmo_msc.c index 3eedd8257..db6a6ca72 100644 --- a/src/libmsc/osmo_msc.c +++ b/src/libmsc/osmo_msc.c @@ -29,6 +29,7 @@ #include <openbsc/vlr.h> #include <openbsc/osmo_msc.h> #include <openbsc/iu.h> +#include <openbsc/a_iface.h> #include <openbsc/gsm_04_11.h> @@ -219,6 +220,7 @@ void msc_subscr_con_cleanup(struct gsm_subscriber_connection *conn) return; if (conn->vsub) { + a_iface_tx_clear_cmd(conn); DEBUGP(DRLL, "subscr %s: Freeing subscriber connection\n", vlr_subscr_name(conn->vsub)); msc_subscr_cleanup(conn->vsub); |