On Friday 15 December 2006 20:09, Andreas Granig wrote:
Dan Pascu wrote:
The point of that duplicated code there is to not have to load both modules at the same time.
Besides that, they don't do _exactly_ the same thing at all.
Ok, but why not merging the advantages of the two versions into one module? That way, people don't have to wonder which of the functions to use.
And I'd also vote for splitting it up into three modules, like Ovidiu Sas proposed in another mail, namely an rtpproxy and mediaproxy controller module and a separate nathelper module.
And how would you mediate the fact that mediaproxy recognizes and handles asymmetric clients (for both SIP and RTP) while nathelper does not?
There are 2 configuration files to describe such clients and they are used for both media relaying as well as contact fixing. With your proposal there will be 2 modules that need to have the same files specified as module parameters and there will be 2 modules periodically checking if the asymmetric config files have changed and need to be reloaded instead of keeping that into only 1 module.
I find this splitting to be unnatural since both operations belong to a single logical entity and the issues it raises outweight the mere fact that it cleans up the function list a bit.
If you are so keen to rip some things apart, why don't you rip off the contact handling stuff from nathelper? The functions from mediaproxy offer a superset of the nathelper functionality anyway, so I see no point in removing the more advanced stuff.