Hello naif,
There is an open source project here: https://github.com/co-cell/ccm that attempts to provide a system for doing the kind of coordination between independent community networks. It is based on Osmocom under the hood, but uses the older osmo-nitb stack (before components were split). The networks are able to operate independently offline, and use a combination of sip call routing as suggested by Neels above, SMPP, and a web api to synchronize usage when connected to the cloud for centralized billing and to interconnect through the cloud for community to community, or community to public voip network communication. The project was originally run by the Telecom Infra Project, but was abandoned by them last year after they moved to a new (unfortunately private) internal tool https://github.com/facebookarchive/CommunityCellularManager . CCM is still actively used by the PCARI Vbts project (https://www.up.edu.ph/index.php/up-globe-sign-moa-for-village-base-station-project/) with a number of local communities in the Philippines, and they run and maintain their own instance of the CCM cloud. It might be something to look at as a potential starting point, or something to learn from if you want to make different architectural decisions when connecting the networks!
Regards,
-Matt J.

On Wed, Oct 17, 2018 at 6:06 AM Neels Hofmeyr <nhofmeyr@sysmocom.de> wrote:
Hi naif,

your requirements sound a lot alike those that Rhizomatica are solving in
Oaxaca.

Running independent GSM networks is the easy part, the hard part is to connect
them to each other in a failure-tolerant way.

The basic concept is, usually you would have one MSC+HLR for all of your cells,
and calls would easily get routed between the different cells. But if the
connection to the MSC fails, then all is lost. So you want completely separate
network infrastructure for each location. I'm not closely familiar with this
aspect, but I imagine using SIP call routing between the otherwise independent
networks is one solution (think osmo-sip-connector and an external call router
program). The other problem space is that if you want to manage a common
subscriber database (HLR), so that e.g. one SIM (phone) can travel freely
around and use any of the network cells and always be reachable by the same
number wherever it happens to be, then you need some synchronization of the HLR
databases. To illustrate, if I want to be reachable by one given phone number
in all the cells, something has to know which cell to route that number to. If
I show up in a cell, we need to tell the previous cell that I am now over here
instead...  You would have an easier time if each network is managed separately
with its own HLR on-location, in the sense that a SIM card can have a different
phone number in each of them.

I'm making this up as I go, I hope Rhizomatica folks can flesh out some more
details.

Note, we're currently working on improving the network setup for Rhizomatica,
and you're likely to benefit from that, sooner or later.

Either way it would be excellent if you stay in touch and contribute
documentation and/or patches back to Osmocom. Also possible would be to book
support hours from a professional support vendor, if you have some grant that
allows you to, so that your specific needs can be addressed with higher
priority than volunteer work can provide (which would also benefit Osmocom at
large, to pay for maintenance etc.). None of this is required, of course, but
Free Software lives by contribution. All kinds of contribution are welcome.

Looking forward to hearing more about your progress!

~N