|
Home > Archive > Voice over IP Cisco > September 2006 > CDR IP Address Conversion
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
CDR IP Address Conversion
|
|
| STEVEN CASPER 2006-09-27, 7:12 pm |
|
Does anyone have a tool or formula they could share that can be used to
convert the signed decimal value in the CDR database to an IP address?
Thanks!
Steve
Steve Casper
Voice Technologies
M&T Bank
(410) 347-6026
| |
| Lelio Fulgenzi 2006-09-27, 7:12 pm |
| found this using google...
http://www.cisco.com/en/US/products....html#wp1003527
----- Original Message -----
From: STEVEN CASPER
To: cisco-voip@puck.nether.net
Sent: Wednesday, September 27, 2006 7:55 PM
Subject: [cisco-voip] CDR IP Address Conversion
Does anyone have a tool or formula they could share that can be used to
convert the signed decimal value in the CDR database to an IP address?
Thanks!
Steve
Steve Casper
Voice Technologies
M&T Bank
(410) 347-6026
________________________________________
_______
cisco-voip mailing list
cisco-voip@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-voip
| |
| Andrius Kislas 2006-09-28, 7:11 am |
| perl version:
sub fromDecToIP {
my $dec = $_[0];
$dec = unpack('I', pack('i', $dec));
if (!defined($dec) || ($dec==0) || $dec eq '') {
return '';
}
if ($dec == 0){
return '';
}
my $hex = sprintf("%X", $dec);
if (length($hex) != 8) {
$hex = "0$hex";
}
#print "hex=$hex\n";
my $D = substr($hex, 0, 2);
my $C = substr($hex, 2, 2);
my $B = substr($hex, 4, 2);
my $A = substr($hex, 6, 2);
#print "$A $B $C $D\n";
#print sprintf("%d", hex($A)) . "." . sprintf("%d", hex($B)) . "." .
sprintf("%d", hex($C)) . "." . sprintf("%d", hex($D));
return sprintf("%d", hex($A)) . "." . sprintf("%d", hex($B)) . "." .
sprintf("%d", hex($C)) . "." . sprintf("%d", hex($D));
}
STEVEN CASPER wrote:
> Does anyone have a tool or formula they could share that can be used to
> convert the signed decimal value in the CDR database to an IP address?
>
> Thanks!
> Steve
>
>
>
>
> Steve Casper
> Voice Technologies
> M&T Bank
> (410) 347-6026
>
> ________________________________________
_______
> cisco-voip mailing list
> cisco-voip@puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-voip
>
| |
| Mike Lay \(milay\) 2006-09-28, 1:11 pm |
| The time is stored as EPOCH time.:
http://www.perlservices.net/en/prog...poch_converter.
html
Mike
-----Original Message-----
From: cisco-voip-bounces@puck.nether.net
[mailto:cisco-voip-bounces@puck.nether.net] On Behalf Of STEVEN CASPER
Sent: Wednesday, September 27, 2006 6:56 PM
To: cisco-voip@puck.nether.net
Subject: [cisco-voip] CDR IP Address Conversion
Does anyone have a tool or formula they could share that can be used to
convert the signed decimal value in the CDR database to an IP address?
Thanks!
Steve
Steve Casper
Voice Technologies
M&T Bank
(410) 347-6026
________________________________________
_______
cisco-voip mailing list
cisco-voip@puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-voip
|
|
|
|
|