Open Source Media Gateway Controller

Powered by POCO


The project started around May of 2008 as proof of concept that with the support of a small subset of the MEGACO protocols calls are possible.

It started with the boost spirit Boost C++ Libraries library for the parsing of the MEGACO messages, but in the test several issues were encountered and after some time spent to overcome this issue, another parser were used. I won't give the impression that the spirit library is bad, only for my Application it didn't worked out and perhaps with more patient I could have overcome the issues.

This other parser is APG - an ABNF Parser Generator from Lowell D. Thomas. With that parser the project took off. The parsing were not without problems but this was more issues to understand how the parser worked.

Also it was from the start up clear that not everything I will develop myself but will also use other thirdparty libraries to develop the smallmgc application.

One of the used thirdparty libraries is the Poco library Poco C++ Libraries which provides me with a lot of standard functionality as configuration file support , logging support , network support thread communication support. Even with this there good framework some important issue were not addressed. One thing is that to support ISDN the SCTP and IUA must be implemented. SCTP for Linux is already in the Kernel, unfortunately the poco library doesn't support it so I had to call them directly. Another big drawback was the timer implementation because until 1.3.3 timer was thought that for every timer a thread is started and with my intention for several thousand subscriber. I will need also several thousand of timers, so the thread approach is not feasible. Therefore I tried implemented my own timer system with timer wheels. But there I the based on code was not free. So I looked for a free implementation and found in these days the embedded single timer wheel implementation in SourceForge . The integration in the SmallMGC application took only a few hours.

For IUA and the Q931 Stack I was again undecided if I could use some existing libraries or if I should implement it on my own. Something what I prefered not to do.

For IUA I looked deeply at the OpenSwitch implementation buf finally decided against to use this because the integration was not clear enough. Here I tried again the same approach as for MEGACO to implement only what is necessary and bring it up to full standard functionality later on. After calls are successful.

For ISDN I didn't go that way I looked at several open source implementation but the decision was not easy no available stack seemed easy to integrate. Finally I decided to use the mISDN Q931 Stack from Daniele Orlandi as base and adapt and integrate it in the SmallMGC application. At the moment the work is ongoing but it seems that this will be working.