[Freeswitch-users] mod_cdr_mongodb follows json rfc4627?
Jose Fco. Irles Durá
josefu at gmail.com
Fri Nov 30 22:28:39 MSK 2012
Hello everybody, first of all, sorry for my english.
I have a test server with the mod_cdr_mongodb backend configured.
I'm trying to parse the cdrs with the mongodb driver for java, but i
have a trouble with a part of the json that freeswitch sends (mongo
saves the json document without errors). I haven't an API function to
extract some data. Firstly I thought that the problem was in the java
driver but I'm not sure.
The problem is in the "callflow" part, with the json standard[1], a
json document can't have two keys with the same name, but
mod_cdr_mongodb builds the json with a 'n' callflow objects.
Also it happends inside callflow object, with origination, originator
and originatee objects.
mod_cdr_mongodb saves the json with this format:
http://pastebin.com/VRz6s0eb
I modified the source of the backend adding json arrays around this
objects and now I can parse without problems.
The output with the modifications:
http://pastebin.com/v05FN9Ta
I'm in the correct way or I'm missing something?
[1] http://www.ietf.org/rfc/rfc4627.txt Section 2.2
Regards
--
Jose Fco. Irles Durá
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list