Hello,
I have a trouble with CEL logging.
Recently i tried to enable CEL logging to MySQL and got a problem with some variables/columns:
Namely my asterisk is not sending these parameters: cidmun, cidname, cidani, ciddnid.
Connection to the MySQL is working fine. CRD-s are being logged correctly.
I created cel table as i found in some documantaion:
CREATE TABLE `cel` (
`eventtype` varchar(30) NOT NULL ,
`eventtime` datetime NOT NULL ,
`cidname` varchar(80) NOT NULL ,
`cidnum` varchar(80) NOT NULL ,
`cidani` varchar(80) NOT NULL ,
`cidrdnis` varchar(80) NOT NULL ,
`ciddnid` varchar(80) NOT NULL ,
`exten` varchar(80) NOT NULL ,
`context` varchar(80) NOT NULL ,
`channame` varchar(80) NOT NULL ,
`appname` varchar(80) NOT NULL ,
`appdata` varchar(80) NOT NULL ,
`amaflags` int NOT NULL ,
`accountcode` varchar(20) NOT NULL ,
`uniqueid` varchar(32) NOT NULL ,
`peer` varchar(80) NOT NULL ,
`userfield` varchar(255) NOT NULL
) ;
And got error from asterisk " res_odbc.c:529 ast_odbc_print_errors: SQL Execute returned an error: HY000: [MySQL][ODBC 8.0(a) Driver][mysqld-5.6.51]Field ‘cidname’ doesn’t have a default value
".
For testing purposes i set problem columns to accept NULL and afterwards data got logged.
+------------+-------------------+-------+------+------+--------+-------+-----+-------+-----------------+-------+--------+--------+-----------+--------------+-----------------+---------+----+
|eventtype |eventtime |cidname|cidnum|cidani|cidrdnis|ciddnid|exten|context|channame |appname|appdata |amaflags|accountcode|uniqueid |peer |userfield|clid|
+------------+-------------------+-------+------+------+--------+-------+-----+-------+-----------------+-------+--------+--------+-----------+--------------+-----------------+---------+----+
|BRIDGE_ENTER|2023-11-08 15:48:20|null |null |null |null |null |1112 |1111 |SIP/1111-0000001a|Dial |Sip/1112|3 | |1699444090.154|SIP/1112-0000001b| |null|
+------------+-------------------+-------+------+------+--------+-------+-----+-------+-----------------+-------+--------+--------+-----------+--------------+-----------------+---------+----+
I am using Astersik 16. I cant figure out where are thes variable supposed to be set.
From the name cidname and cidnum, i think it shoud be same as Callerid(num) and Callerid(name) that cdr table uses.
Here is a dumpchan:
Dumping Info For Channel: SIP/1111-0000001e:
================================================================================
Info:
Name= SIP/1111-0000001e
Type= SIP
UniqueID= 1699444357.180
LinkedID= 1699444357.180
CallerIDNum= 1111
CallerIDName= 1111
ConnectedLineIDNum= (N/A)
ConnectedLineIDName=(N/A)
DNIDDigits= 1112
RDNIS= (N/A)
Parkinglot= default
Language= en
State= Ring (4)
Rings= 0
NativeFormat= (ulaw)
WriteFormat= ulaw
ReadFormat= ulaw
RawWriteFormat= ulaw
RawReadFormat= ulaw
WriteTranscode= No
ReadTranscode= No
1stFileDescriptor= 28
Framesin= 0
Framesout= 0
TimetoHangup= 0
ElapsedTime= 0h0m0s
BridgeID= (Not bridged)
Context= 1111
Extension= 1112
Priority= 3
CallGroup=
PickupGroup=
Application= DumpChan
Data= (Empty)
Blocking_in= (Not Blocking)