[asterisk-bugs] [JIRA] (ASTERISK-23162) SQLite3 CDRs are not being populated with CDR variables
Matt Jordan (JIRA)
noreply at issues.asterisk.org
Mon Jan 20 10:37:04 CST 2014
[ https://issues.asterisk.org/jira/browse/ASTERISK-23162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=214215#comment-214215 ]
Matt Jordan commented on ASTERISK-23162:
----------------------------------------
Hm... I think it may actually be your config.
I ran with the standard config file, plus a few extra fields:
{noformat}
[master]
table => cdr
columns => calldate, clid, dcontext, channel, dstchannel, lastapp, lastdata, duration, billsec, disposition, amaflags, accountcode, uniqueid, userfield, test_caller, test_callee
values => '${CDR(start)}','${CDR(clid)}','${CDR(dcontext)}','${CDR(channel)}','${CDR(dstchannel)}','${CDR(lastapp)}','${CDR(lastdata)}','${CDR(duration)}','${CDR(billsec)}','${CDR(disposition)}','${CDR(amaflags)}','${CDR(accountcode)}','${CDR(uniqueid)}','${CDR(userfield)}','${CDR(test_caller)}','${CDR(test_callee)}'
{noformat}
This correctly inserts the values:
{noformat}
sqlite> select * from cdr;
1|2014-01-20 10:29:49|"Alice" <555-5555>|default|Local/target at default-00000001;2||NoOp||5|5|ANSWERED|DOCUMENTATION|foobar|1390235389.8|||
2|2014-01-20 10:29:49|"Alice" <555-5555>|default|Local/1000 at default-00000000;2|Local/target at default-00000001;1|Dial|Local/target,,b(pre_dial^callee^1)B(pre_dial^caller^1)|5|5|ANSWERED|BILLING|foobar|1390235389.2|caller_userfield;callee_userfield|caller_value|callee_value
3|2014-01-20 10:29:54|"Alice" <555-5555>|default|Local/1000 at default-00000000;2||NoOp||0|0|ANSWERED|BILLING|foobar|1390235389.2|caller_userfield|caller_value|
4|2014-01-20 10:29:49|"" <>|default|Local/1000 at default-00000000;1||Echo||5|5|ANSWERED|BILLING|foobar|1390235389.0|||
sqlite>
{noformat}
Did you actually escape the paranthesis in your {{values}} field? If so, you shouldn't do that; it breaks the variable substitution, which would explain why you don't have any values showing up in your CDR.
> SQLite3 CDRs are not being populated with CDR variables
> -------------------------------------------------------
>
> Key: ASTERISK-23162
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-23162
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: CDR/cdr_sqlite3_custom
> Affects Versions: 12.0.0
> Environment: CentOS 6
> Reporter: Pavel Basov
> Severity: Minor
>
> cdr_sqlite3_custom.conf (deliberately simplified):
> {noformat}
> [master]
> table=>cdr
> columns=>calldate, clid, test
> values=>'$\{CDR(start)\}','$\{CDR(clid)\}','test'
> {noformat}
> Resulting in database lacking CDR values:
> {noformat}
> sqlite> select * from cdr;
> AcctId|calldate|clid|test
> 1|||test
> 2|||test
> 3|||test
> 4|||test
> {noformat}
> IDs are incementing, test value is there, but it doesn't want to grab CDR variables from
> values=>'$\{CDR(start)\}','$\{CDR(clid)\}','test'
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the asterisk-bugs
mailing list