[ale] Weird problem looking at some data capture
Christopher Fowler
cfowler at outpostsentinel.com
Tue Nov 20 14:08:37 EST 2007
Solved
The problem was the PBX was sending me 7-bit ascii. Every 8th bit of
data was high (1) and so I was treating it as 8 bits. Somehow od knew
this and did the conversion on the fly. I never told it to convert to
7-bit ASCII. In my perl program that is gathering data I created a
conversion function
sub toascii {
my $v = shift;
my $ascii = undef;
for(my $x =0; $x < length($v); $x++) {
my $c = substr($v,$x,1);
$ascii .= chr(ord($c) & 0x7F);
}
return $ascii;
}
This effectively converts the 8-bits into 7-bit ascii. I think ascii2uni
does the same thing but i need to do this in perl myself. This program
will run for a month just sucking down data.
On Tue, 2007-11-20 at 10:11 -0500, Asif E. wrote:
> Chris,
>
> I do see the phone number in that chunk of data, highlighted below.
> Is that what you are looking for?
>
> Asif
>
>
> On 11/20/07, Christopher Fowler <cfowler at outpostsentinel.com> wrote:
> I have a device connected serially to a Meridian PBX trying to
> capture
> CDR data.
>
> >From my END I see nothing but garbage. The guy I'm working
> on is
> connected to the device via Procomm plus. He says he can see
> phone
> numbers and data just fine. I can't and I'm in Linux.
>
> I did an od -a on the capture and I see the following:
>
> 0016120 g sp d o w n sp -
> - ] cr nl cr cr cr nl
> 0016140 N sp 0 3 8 sp 0 0 sp A 0 0 1
> nul 0 0
> 0016160 4 sp 4 2 3 0 sp sp sp sp 1 1 /
> 2 0 sp
> 0016200 0 9 : 4 8 : 4 9 sp 0 0 : 0
> 7 : 3
> 0016220 4 nul .
> 0 sp sp sp sp sp sp sp sp sp sp sp sp
> 0016240 sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp
> 0016260 sp sp sp sp sp sp sp sp sp cr nl sp &
> 3 1 4
> 0016300 7 8 7 1 8 0 0 X X X X X
> X sp sp sp
> 0016320 sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp
>
> I see some numbers that appear to be a phone number in that
> file.
>
> When I look at this file in VI I do not see 3147871800 I als
> grep this
> file and come up empty handed there. What am I doing wrong?
>
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>
More information about the Ale
mailing list