Hi all,

I've done some work on FGCom and I'm now able to have a realistic voice communication system which is less far than the reality.
As a featuring :
- Record ATIS message from FGCom into Asterisk
- Playback an ATIS message into FlightGear via FGCom
- Listen a _real_ morse code for VOR/DME into FlightGear via FGCom
- Use 25KHz step frequencies (118.175, 124.225...)
- Use COM1 & NAV1 via FGCom

If you want to test, you can use my clone ( https://gitorious.org/~f-jjth/fg/f-jjths-flightgear ) and checkout on topics/fgcom branch, then use the fgcom executable (newly) available in fgfs/bin/
./fgcom -Sclemaez.dyndns.org -f_atis_frequency_ -a_icao_for_atis_frequency_  => in order to record a message (ATC mode)
./fgcom -Sclemaez.dyndns.org -p16661 => in order to use fgcom normally (FG mode)

For a concrete example:
./fgcom -Sclemaez.dyndns.org -f120.825 -aLFMV => At the end of your message, quitting (Ctrl+c) save the record on the server (I've already recorded a message on this frequency, but you can override it)
[You must start FlightGear near of LFMV (LFNH, LFMO... or even LFMV)]
./fgcom -Sclemaez.dyndns.org -p16661
In Radio panel (F12) switch to 120.825, now you can heard your ATIS message like it's done in real life

After this (demonstrative) introduction I would look deeply into a voice communication architecture. My experiments with FGCom show me that we can easily have a realistic voice communication system. IMO FlightGear is a _simulator_, a simulator want to simulate the reality. In real life radio communication is the base of the airspace control. That's why I think that voice communication must be as important than FDM, graphism or whatever. Without voice communication we can't consider that we simulate the reality.

So I've looked deeply what is existing, what we have, what others have... Looking at X-Plane, it seems that there is no integrated voice communication system. For FSX it's the same. Both leave this part to independant organizations like VATSIM/IVAO. So looking at IVAO he use external software like TeamSpeak and VATSIM use its own communication system included in [X]SqwakBox.
Teamspeak being closed source we can forget it. IVAO is also closed source and X-Plane/FSX doesn't provide voice communication.

In conclusion, we can't base our work on experience from other, we must do our own choice and the cross compatibility between system still not possible. Finally we are back to our good old IAX(fgcom)/Asterisk architecture and to be honest I think this choice is the better one because he is open source and license compliant making it accessible to every X-Plane/FSX/IVAO/VATSIM (they just need to create an external client like our FGCom)... Clearly we can't adapt our source code to match their _closed_ system but they can easily adapt their _closed_ source code for our _open_ system. They are greatly invited to switch to IAX/Asterisk system. But that's another thing where we don't care.

Now that I talked about others and demonstrated their experience can't help us, I will talk about our dear FlightGear and available technical solution.
For now we use an external software (FGCom) who is an IAX client receiving information from FlightGear (frequency, sqwak, ptt, position...) then transmit/receive voice to an Asterisk server. IMO it's not a bad choice and it works. Asterisk is really a perfect choice for this usage and I guess real ATC system use it for their ATIS/closed airspace message. But I heard that IAX protocol was not expected by some devs, so I looked at different protocols.
Asterisk is a powerful software who support a lot of protocol like H.323, MGCP, SCCP, SIP and finally IAX. Two last are commonly knows and I admit that I know nothing about others. So it still SIP and IAX.
SIP protocol seems to be more recent than IAX and more and more used. Main convenient : he use multiple port will IAX use only 1 port. But this is not the main aspect for a choice. The main aspect is the library, indeed, if there is no doc/C++ source/license compliant we can't use the protocol.
Looking at SIP, I've only found 2 libraries compatible with our project : oSIP2 and eXoSIP2 (eXoSIP being an higher layer for oSIP... a kind of library of a library...)
Looking at IAX, the only choice is IAXclient already used by FGCom.

Finally we have the choice about protocols and libraries ! But a really little choice... oSIP2/eXoSIP2 for SIP protocol or IAXclient for IAX protocol.

IMO, IAXclient library works fine since many years with FGCom, the only need is to update the library version in order to use the last one. IAXclient is licensed under LGPL who make him a perfect choice for SimGear integration, while oSIP2/eXoSIP2 is GPL.

Now that we know all technical solution, it's the moment to write a plan. What do we want for the future of voice communication in FlightGear ? What is your opinion ? Here is mine :
- Integrate an IAX library into SimGear (1)
- Integrate an IAX client into FlightGear with new features (see my introduction) (2)
- Update (rewrite?) FGCom client with the last IAXclient version with new features (see my introduction) (3)

(1) IAXclient could be a sufficient choice, the library is existing and working, but if someone love to reinvent the wheel we can create our own IAX library. Personally I'm not interested into reinventing the wheel again :D
(2) It's simply a similar choice as TerraSync one
(3) Keeping a standalone client is essential for external uses (OpenRadar) also this external client can be used by others (VATSIM/IVAO/X-Plane...) they just need to implement an output protocol in their software and that's done ! We can easily release a "Howto: communicate with FGCom" paper with all technical specification (protocol, headers, format...) I've noticed a remark from Martin who said << carry the risk of FGCom-in-FG diverge from standalone FGCom >> It's a good hint, but I think we had a good demonstration that it's not an important risk because FGCom is clearly no longer in active development. Once the update (rewrite) will be done we will back to a "normal" period where FGCom is simply not developed. Even if there is few development somewhere we are just advised to reproduce these change on both side, I don't think it's a hard stuff seeing the few change over the years.

I hope to have interested some of you, and create an interest for this project (my demo is here to make it exciting and interesting to join this project). I know James has it in his long term todolist and talking on IRC reveal that others people are interested by this. ATC will be also happy to have a realistic voice communication system and easier accessible to common user.

I'm expecting opinion, comments, contributions and even join to this effort. I can't do all this alone because I haven't enough C++ skills (integrate an IAX library in SimGear is impossible for me). I think we need 1 or 2 person who works on the SG/FG side and 1 or 2 on FGCom side. I'm ready to work on the FGCom side (rewrite) with help.

Leaving the frequency,