From 1dde661dd6653f21ddb003f203f8a23f201d68c9 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 27 Jan 2012 14:20:24 +0100 Subject: osmo-bsc: Add configurable option to spawn + respawn osmo-bsc_mgcp If it is configured in the config file or on the VTY, osmo-bsc will fork+exec osmo-bsc_mgcp. Furthermore, if osmo-bsc_mgcp dies, osmo-bsc will re-spawn it. This also means that we can now send a SIGHUP to osmo-bsc_mgcp in the event of a Msc (re)connect, causing it to send RSIP, which in turn is required by certain call agents that forget to send a AUEP on startup to determine the endpoint state of the media gateway[s]. --- openbsc/src/osmo-bsc/osmo_bsc_msc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'openbsc/src/osmo-bsc/osmo_bsc_msc.c') diff --git a/openbsc/src/osmo-bsc/osmo_bsc_msc.c b/openbsc/src/osmo-bsc/osmo_bsc_msc.c index 04cfb997d..68c469946 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_msc.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_msc.c @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -342,6 +343,10 @@ static void msc_connection_connected(struct bsc_msc_connection *con) data = (struct osmo_msc_data *) con->write_queue.bfd.data; msc_ping_timeout_cb(data); + /* notify bsc_mgcp to reset all end-points */ + if (data->bsc_mgcp.pid) + kill(data->bsc_mgcp.pid, SIGHUP); + sig.data = data; osmo_signal_dispatch(SS_MSC, S_MSC_CONNECTED, &sig); } -- cgit v1.2.3