[cisco-voip] DestIPAddr field in CDR record
Pete Fabian
pfabian at telesphere.com
Wed Aug 1 10:35:18 EDT 2007
To convert the signed decimal value to an IP address
Step 1 Convert the database display (-1139627840) to a hex value.
The hex value equals 0xBC12A8C0.
Step 2 Reverse the hex bytes, as shown below:
CO A8 12 BC
Step 3 Convert the bytes from hex to decimal, as shown below:
192 168 18 188
Step 4 The IP address displays in the following format:
192.168.18.188
_____
From: cisco-voip-bounces at puck.nether.net
[mailto:cisco-voip-bounces at puck.nether.net] On Behalf Of Wes Sisk
Sent: Wednesday, August 01, 2007 7:16 AM
To: CarlosOrtiz at bayviewfinancial.com
Cc: cisco-voip at puck.nether.net
Subject: Re: [cisco-voip] DestIPAddr field in CDR record
documentation on how the number is stored:
http://www.cisco.com/en/US/customer/products/sw/voicesw/ps556/products_progr
amming_usage_guide09186a00806ed410.html#wp29039
i think this has octets out of order, but it's easy enuf to mod to your
needs:
#!/usr/bin/perl
my $raw = -1139627840;
my @addr = unpack('C4', pack('i', $raw));
my $ip = join('.', @addr);
print $ip, "\n";
/Wes
CarlosOrtiz at bayviewfinancial.com wrote:
When viewing the DestIPAddr for a call in the CDR database of the
calldetailrecord table a numeric number is shown. Anyone know how to
convert this to IP address format?
Carlos
_____
_______________________________________________
cisco-voip mailing list
cisco-voip at puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-voip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://puck.nether.net/pipermail/cisco-voip/attachments/20070801/02dee8bb/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 5675 bytes
Desc: not available
Url : https://puck.nether.net/pipermail/cisco-voip/attachments/20070801/02dee8bb/attachment.jpe
More information about the cisco-voip
mailing list