FGCOM is a client but in the background you need a server which serves Asterisk. Take a look at the schematic picture how it works.
The client reads its data from a local network connection which uses the famous external protocol option of FlightGear and the FlightGear-Property-System. For this you have to install the protocol (fgcom.xml - this one is part of the developers version of FlightGear) specification as described in the installation manual.
First of all the client connects to Asterisk. Than the client gets the following parameters 10 times a second via the fgcom-protocol:
This data is send from FlightGear ten times a second. The client calculates every 15 seconds (or whatever you define in the source code) which radio stations (taken from Airports/apt.dat.gz) are inside a specified radius. If it finds one in range it places a VoIP call to the following destination:
For example: KSFO 120.500 MHz Tower will be converted into the phone number 0175837079120500 01 - Code for Flightgear, maybe there are more different simulations around in the future) 75837079 - The ICAO-Code[1] in 2-digits-ASCII code (K=75, S=83, F=70, O=79) for the radio service (Tower, Ground, ...) in range 120500 - The frequency [MHz] of the radio multiplied by 1000
[1] ICAO-Code
If the client is inside a specific range towards the radio station (Tower, Ground, …) a VoIP-conference-room under this destination is dynamicly created (if such conference room already exists, the server does nothing) and the client connects to the conference-room under the specified destination.
There are some special frequencies which have no range limitations and work 'worldwide':
The corresponding ICAO string for this special frequencies is 'ZZZZ'. The corresponding destination strings are called '0190909090911000', '0190909090910000', '0190909090123450' or '0190909090122750'. The destinations are numbers because you can participate at a conference with a standard VoIP phone (soft- or hardware based). This only works with accounts of phones which are hard coded into the configuration. Perhaps this will be fixed soon. A VoIP Phonebook of the numbers and frequencies used is available.
If a client gets out of range of a an airport/frequency (currently hard coded to 50 km) it leaves the conference and if he was the only participant the conference room will be closed.
The server is a simple Asterisk VoIP-Server. The communication between the server and the client is based on the VoIP protocol IAX2.