ast_mongo
ast_mongo copied to clipboard
cdr custom field, is it possible?
Hello. I'm testing this and once built, configuration seems simple.
However I would like to add some cdr custom fields the same way I've been doing with sql/odbc
Basically, in teh dialplan I use something like: Set(CDR(recording)=/path/to/recording.gsm); and the column 'recording' on the database gets populated with /path/to/recording
I tried adding a custom field but it is not in the cdr collection.
Is there a way to do this?
I was just reading through: https://github.com/minoruta/ast_mongo/blob/1d7f21d52bd8a724d2b8722a1cbba4dcadfa6613/src/cdr_mongodb.c
Seems like the fields are static - hardcoded. Could it be changed to loop for every set cdr->variable ? Other backends support this...
The custom fields is not supported now. However, let me look into the code.
The custom fields is not supported now. However, let me look into the code.
Thanks. It would be nice to have this functionality in the future, like other backends
Thanks.
I couldn't get any good idea from ./cdr/cdr_odbc.c, need more studying.
Currently we use cdr adaptative odbc to use MS SQL Server as a backend. It supports this. MySQL also supports this as we have used it in the past
We need to change the table and add column X, in the dialplan set CDR(X)=value and reload the cdr odbc/mysql module
Perhaps looking at cdr_adaptive_odbc.c ?
Yes, thanks, it's helpful.
Can I see your cdr_adaptive_odbc.conf for Set(CDR(recording)=/path/to/recording.gsm); for example.
As stated, we do not specify custom columns in the conf.
Currently our conf has: [mssql] connection=perfpbx loguniqueid = yes alias end => ended
We add the column "recording" to the table. Then in the dialplan Set(CDR(recording)=/path/to/recording.gsm);
Wow, it's what I want to know;
We add the column "recording" to the table.
Thanks a lot.
Wow, it's what I want to know;
We add the column "recording" to the table.
Thanks a lot.
Worth mentioning that I need to reload the module for asterisk to recognise the new column.
I thank you, for looking into this!