my cdr is correct check on db_phone_config.sh
if look like that
LINESSQL="$LINESSQL INSERT INTO $DB_Extensions_Table (context,exten,priority,app,appdata) VALUES
('$context','$phonenumber','1','Set','__FROM_DID=\${EXTEN}'),
('$context','$phonenumber','2','Set','PAI=\${SIP_HEADER(P-Asserted-Identity)}'),
('$context','$phonenumber','3','Set','PAF=\${SIP_HEADER(FROM)}'),
('$context','$phonenumber','4','Set','CURRENT_PAI_LENGTH=\${LEN(\${PAI})}'),
('$context','$phonenumber','5','Set','CURRENT_PAF_LENGTH=\${LEN(\${PAF})}'),
('$context','$phonenumber','6','gotoif','\$[\${CURRENT_PAI_LENGTH} > 0] ? 11'),
('$context','$phonenumber','7','gotoif','\$[\${CURRENT_PAF_LENGTH} > 0] ? 19'),
('$context','$phonenumber','8','Noop','Incoming call from \${CALLERID(num)}'),
('$context','$phonenumber','9','Set','FAX_RX='),
('$context','$phonenumber','10','Goto','custom-linuxmce,$line,1'),
('$context','$phonenumber','11','noop','config p asserted id ${PAI}'),
('$context','$phonenumber','12','set','tmpcid=\${CUT(PAI,:,2)}'),
('$context','$phonenumber','13','Set','tmpcid=\${CUT(tmpcid,@,1)}'),
('$context','$phonenumber','14','Set','CALLERID(num)=\${tmpcid}'),
('$context','$phonenumber','15','Noop','Incoming call from \${CALLERID(num)}'),
('$context','$phonenumber','16','Set','FAX_RX='),
('$context','$phonenumber','17','Set','CALLERID(ani)='),
('$context','$phonenumber','18','Goto','custom-linuxmce,$line,1'),
('$context','$phonenumber','19','noop','config SIP Header From ${PAF}'),
('$context','$phonenumber','20','set','tmpcid=\${CUT(PAF,:,2)}'),
('$context','$phonenumber','21','Set','tmpcid=\${CUT(tmpcid,@,1)}'),
('$context','$phonenumber','22','Set','CALLERID(num)=\${tmpcid}'),
('$context','$phonenumber','23','Noop','Incoming call from \${CALLERID(num)}'),
('$context','$phonenumber','24','Set','FAX_RX='),
('$context','$phonenumber','25','Set','CALLERID(ani)='),
('$context','$phonenumber','26','Goto','custom-linuxmce,$line,1');"
| calldate | clid | src | dst | dcontext | channel | dstchannel | lastapp | lastdata | duration | billsec | disposition | amaflags | accountcode | userfield | uniqueid |
+---------------------+----------------+----------------+-----+-------------------+----------------------+------------+------------+----------+----------+---------+-------------+----------+-------------+-----------+----------------+
| 2013-02-25 12:28:52 | 18021382320001 | 18021382320001 | s | from-sip-external | SIP/0.0.0.0-00000060 | | Congestion | 5 | 13 | 13 | ANSWERED | 3 | | | 1361806132.367 |
| 2013-02-25 12:18:53 | 13021382320001 | 13021382320001 | s | from-sip-external | SIP/0.0.0.0-0000005f | | Congestion | 5 | 13 | 13 | ANSWERED | 3 | | | 1361805533.366 |
| 2013-02-25 12:08:54 | 15021382320001 | 15021382320001 | s | from-sip-external | SIP/0.0.0.0-0000005e | | Congestion | 5 | 13 | 13 | ANSWERED | 3 | | | 1361804934.365 |
+---------------------+----------------+----------------+-----+-------------------+----------------------+------------+------------+----------+----------+---------+-------------+----------+-------------+-----------+----------------+