cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1166
Views
5
Helpful
7
Replies

cdr record format

pvarenholt
Level 5
Level 5

running CUCM 10.6.

understand that originating IP and destination IP is in there however, wondering if it needs to be converted?

Thanks,

Paul.

7 Replies 7

Can you explain your question in more detail? Converted to what? For compatibility with what?

Are you asking about CDR records themselves, or are you asking about CDRs that include call recording?

Maren

Only interested in the origipaddress and destinationipaddress fields.
How does one convert them from integrer to an actual ip address or are they already formatted as such and simply need the dot inserted?
Thanks,
Paul.

CDRs as generated by CUCM (as can be seen in the CAR tool) have the origIpAddr  and destIpAddr in dotted-decimal format. This leads me to ask how/where you are looking at the CDRs. Is it in the CAR Tool, CUCM CLI, or another system?

Regardless, you should be able to determine if the IPs are in some kind of encoding or are integers-without-the-dots by looking at the numbers in the string and comparing that to your gear. They will either match or they won't.

Maren

Yes, they need to be converted, a quick google search on origipaddress will get you the info you need.

HTH

java

if this helps, please rate

Ah, you're talking about the raw exported records. Yes, they are encoded. From the CDR Admin guide:

https://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucm/service/12_5_1/cdrdef/cucm_b_cdr-admin-guide-1251/cucm_b_cdr-admin-guide-1251_chapter_011.html 

 

Convert Signed Decimal Value to IP Address

The system stores IP addresses as unsigned integers. The CDR file displays IP addresses as signed integers. To convert the signed decimal value to an IP address, first convert the value to a hex number, taking into consideration that it is really an unsigned number. The 32-bit hex value represents four bytes in reverse order (Intel standard). To determine the IP address, reverse the order of the bytes and convert each byte to a decimal number. The resulting four bytes represent the four-byte fields of the IP address in dotted decimal notation.

For example, the IP address 192.168.18.188 displays as -1139627840. To convert this IP address, perform the following procedure:

  1. Convert the database display (-1139627840) to a hex value. The hex value equals 0xBC12A8C0.
  2. Reverse the order of the hex bytes, as shown: CO A8 12 BC
  3. Convert the four bytes from hex to decimal, as shown: 192 168 18 18
  4. The IP address displays in the dotted decimal format: 192.168.18.188

 

This excel function should do the conversion for you.  In this code, it will convert cell H3 to a dotted IP format

 

=IF(LEN(DEC2HEX(H3))=8,HEX2DEC(MID(DEC2HEX(H3),7,2))&"."& HEX2DEC(MID(DEC2HEX(H3),5,2))&"."&HEX2DEC(MID(DEC2HEX(H3),3,2))&"."&HEX2DEC(MID(DEC2HEX(H3),1,2)),HEX2DEC(MID(DEC2HEX(H3),9,2))&"."& HEX2DEC(MID(DEC2HEX(H3),7,2))&"."&HEX2DEC(MID(DEC2HEX(H3),5,2))&"."&HEX2DEC(MID(DEC2HEX(H3),3,2)))

I've written an article that goes into a bit more depth on importing CDRs into Excel if you're interested.

Thanks very much.