diff options
-rw-r--r-- | include/osmocom/msc/msc_mgcp.h | 1 | ||||
-rw-r--r-- | src/libmsc/msc_mgcp.c | 16 | ||||
-rw-r--r-- | src/libmsc/osmo_msc.c | 5 |
3 files changed, 21 insertions, 1 deletions
diff --git a/include/osmocom/msc/msc_mgcp.h b/include/osmocom/msc/msc_mgcp.h index f7cc93287..304e96706 100644 --- a/include/osmocom/msc/msc_mgcp.h +++ b/include/osmocom/msc/msc_mgcp.h @@ -60,5 +60,6 @@ struct mgcp_ctx { int msc_mgcp_try_call_assignment(struct gsm_trans *trans); int msc_mgcp_call_assignment(struct gsm_trans *trans); int msc_mgcp_ass_complete(struct ran_conn *conn, uint16_t port, char *addr); +int msc_mgcp_ass_fail(struct ran_conn *conn); int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr); int msc_mgcp_call_release(struct gsm_trans *trans); diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c index 4c177680a..46b8b0247 100644 --- a/src/libmsc/msc_mgcp.c +++ b/src/libmsc/msc_mgcp.c @@ -1094,6 +1094,22 @@ int msc_mgcp_ass_complete(struct ran_conn *conn, uint16_t port, char *addr) return 0; } +int msc_mgcp_ass_fail(struct ran_conn *conn) +{ + struct mgcp_ctx *mgcp_ctx; + + OSMO_ASSERT(conn); + + mgcp_ctx = conn->rtp.mgcp_ctx; + if (!mgcp_ctx) + return -EINVAL; + + LOGPFSMSL(conn->fi, DMGCP, LOGL_ERROR, "Assignment failed\n"); + + osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_TEARDOWN_ERROR, mgcp_ctx); + return 0; +} + /* Make the connection of a previously assigned call complete * Parameter: * trans: transaction context. diff --git a/src/libmsc/osmo_msc.c b/src/libmsc/osmo_msc.c index 37c1d15a4..1a1ba3ce4 100644 --- a/src/libmsc/osmo_msc.c +++ b/src/libmsc/osmo_msc.c @@ -28,6 +28,7 @@ #include <osmocom/msc/a_iface.h> #include <osmocom/msc/gsm_04_08.h> #include <osmocom/msc/gsm_04_11.h> +#include <osmocom/msc/msc_mgcp.h> #include "../../bscconfig.h" #ifdef BUILD_IU @@ -123,7 +124,9 @@ void msc_assign_compl(struct ran_conn *conn, /* Receive an ASSIGNMENT FAILURE from BSC */ void ran_conn_assign_fail(struct ran_conn *conn, uint8_t cause, uint8_t *rr_cause) { - LOGP(DRR, LOGL_DEBUG, "MSC assign failure (do nothing).\n"); + LOGPFSMSL(conn->fi, DRR, LOGL_ERROR, "Assignment Failure: cause=%u rr_cause=%u.\n", + cause, rr_cause ? *rr_cause : 0); + msc_mgcp_ass_fail(conn); } /* Receive a CLASSMARK CHANGE from BSC */ |