I’m trying to use odbc for cdr logging, but it isn’t working.
It connects but it does not insert into row in database.Any ideia what can it be?
No error in asterisk CLI
[asterisk]
Description = MySQL connection to database
Driver = MySQL
Database = asterisk
Server = localhost
User = asterisk
Password = asterisk
Port = 3306
Socket = /var/run/mysqld/mysqld.sock
Yes, i’ll change after completing the build, don’t worry
And yes, asterisk is connecting to dabase as i can see on Mysql Workbench: Print:
About the CDR related configuration what could i be missing?
[Edit]
I enabled mysql logs and asterisk did not tried to insert data. [Print]
Try changing that to [odbc] in your cdr.conf. Asterisk does not see your MySQL backend directly; it only talks to the ODBC layer, which in turn talks to MySQL.
Probably, this was wrong too, but it still didn’t work.
I don’t think if it helps but i turn CDR log on, and it return log this:
0x7f08c4015750 - Created CDR for channel SIP/7-1-00000143
0x7f08c4015750 - Transitioning CDR for SIP/7-1-00000143 from state NONE to Single
Dial Begin message for SIP/1-00000142, SIP/7-1-00000143: 1568669014.00026161
0x7f08c4005fc0 - Processing Dial Begin message for channel SIP/1-00000142, peer SIP/7-1-00000143
0x7f08c4005fc0 - Updated Party A SIP/1-00000142 snapshot
0x7f08c4005fc0 - Updated Party B SIP/7-1-00000143 snapshot
0x7f08c4005fc0 - Transitioning CDR for SIP/1-00000142 from state Single to Dial
Dial End message for SIP/1-00000142, SIP/7-1-00000143: 1568669014.00077881
0x7f08c4015750 - Set answered time to 1568669017.187680
Dial End message for SIP/1-00000142, SIP/7-1-00000143: 1568669017.00187911
0x7f08c4005fc0 - Processing Dial End message for channel SIP/1-00000142, peer SIP/7-1-00000143
0x7f08c4005fc0 - Transitioning CDR for SIP/1-00000142 from state Dial to DialedPending
0x7f08c4005fc0 - Set answered time to 1568669017.747876
Bridge Enter message for channel SIP/7-1-00000143: 1568669017.00748358
0x7f08c4015750 - Updating Party A SIP/7-1-00000143 snapshot
0x7f08c4015750 - Processing bridge enter for SIP/7-1-00000143
0x7f08c4015750 - Transitioning CDR for SIP/7-1-00000143 from state Single to Bridged
Bridge Enter message for channel SIP/1-00000142: 1568669017.00748455
0x7f08c4005fc0 - Updating Party A SIP/1-00000142 snapshot
0x7f08c4005fc0 - Processing bridge enter for SIP/1-00000142
0x7f08c4005fc0 - Transitioning CDR for SIP/1-00000142 from state DialedPending to Dial
0x7f08c4005fc0 - Transitioning CDR for SIP/1-00000142 from state Dial to Bridged
Bridge Leave message for SIP/7-1-00000143: 1568669020.00065460
0x7f08c4015750 - Processing Bridge Leave for SIP/7-1-00000143
0x7f08c4015750 - Transitioning CDR for SIP/7-1-00000143 from state Bridged to Finalized
Bridge Leave message for SIP/1-00000142: 1568669020.00065521
0x7f08c4005fc0 - Processing Bridge Leave for SIP/1-00000142
0x7f08c4005fc0 - Transitioning CDR for SIP/1-00000142 from state Bridged to Finalized
If it is a connection error asterisk was not supposed to throw an error?