[Freeswitch-dev] json cdr

Tamas Cseke cstomi.levlist at gmail.com
Thu Feb 18 08:22:46 PST 2010


We would like to develop a json cdr module.
It would be very similar like the mod_xml_cdr module, we'd like to post 
the cdr to an url.
The only difference would be the format. The reason is that cdrs would 
be smaller.
Maybe the parsing would be faster too.

I made the same format as xml has, but we are not satisfied with this 
solution yet.

We can't decide wheater we should create a new module (in this case we 
need to copy bunch of code from mod_xml_cdr like.: config, curl posts, 
file handling so we don't like this idea) or add it to mod_xml_cdr

For prototype I hacked this into mod_xml_cdr

svn diff -r 16686:16687 

I added the functions to generate the cdrs into the module instead of 
creating core functions like the xml functions, because I think linking 
json to the core is not a good idea (?)
The disadvantage of this version is that xml_cdr module creating json 
cdrs would be ridiculous :) Maybe could we make a single module with 
optional formats like:
<param name="format" value="xml|json"/> with xml default?

So I would like to ask advices how to do it properly.
we would be happy if it could get into the trunk, but for this we have 
to work more on this.

Thanks in advance,

More information about the FreeSWITCH-dev mailing list