I have TELNETed into our phone server at work to port 4001 and it allows me
to output the call logs to a txt file in this format.....

27/07/2006 12:15,Catherine Bradley,Modules.CallServer 00
-07-d9-00-1c-6b.PRI,Catherine
Bradley,2180,,,07813922167,63390,26830,,,1,,,Cathe
rine
Bradley,d40d0300-e4a6-c814-927e-0007d9001fc7,0,,10,30890,20970,27/07/2006 1
1:15:46.513,,1,Catherine Bradley,,,0,
27/07/2006 12:16,Cheryl Rainey,Modules.CallServer
00-07-d9-00-1c-6b.PRI,Cheryl R
ainey,2022,,,00353749156837,36620,14250,,,1,,,Cheryl
Rainey,d4200a00-4ca5-c814-b
868-0007d90019a1,0,,10,20250,16170,27/07/2006 11:16:06.274,,1,Cheryl
Rainey,,,0,
27/07/2006 12:16,McCambridge Duffy Customer Care one,,,07775911808,Theresa
Gilli
spie,McCambridge Duffy Customer Care
one,8001,115180,112730,,,1,Modules.CallServ
er 00-07-d9-00-1c-6b.PRI,2000,McCambridge Duffy Customer Care
one,47f50700-04a0-
c814-b011-0007d9001c6b,0,6c350d00-6aa1-c814-8770-0007d9001aa2,110,2340,2240,27/0
7/2006 11:16:07.735,,1,McCambridge Duffy Customer Care one,,,0,
27/07/2006 12:16,Theresa Gillispie,,Theresa Gillispie,2000,Danielle mc
conway,Da
nielle mc conway,2168,42580,24620,,,1,,2168,Theresa
Gillispie,6c350d00-6aa1-c814
-8770-0007d9001aa2,1,47f50700-04a0-c814-b011-0007d9001c6b,0,3220,3190,27/07/2006
 11:16:07.736,,1,Theresa Gillispie,,,0,
27/07/2006 12:16,Racheal McCahon ,,Racheal McCahon
,2119,,,,39380,0,,,0,,,Rachea
l McCahon ,b64e0900-c1a6-c814-8d22-0007d9001977,0,,0,0,0,27/07/2006
11:16:11.632
,,0,,,,0,
27/07/2006 12:16,Leanne Parke,,Leanne Parke,2156,,,,3960,0,,,0,,,Leanne
Parke,45
cc0500-4ca7-c814-927e-0007d9001fc7,0,,0,0,0,27/07/2006 11:16:31.227,,0,,,,0,
27/07/2006 12:16,Lilian Robinson,Modules.CallServer
00-07-d9-00-1c-6b.PRI,Lilian
 Robinson,2054,,,07919157058,77220,40330,,,1,,,Lilian
Robinson,33050f00-519d-c81
4-a60e-0007d9001987,0,,10,24630,17110,27/07/2006 11:16:36.645,,1,Lilian
Robinson
,,,0,
27/07/2006 12:16,Andrew Brown,,Andrew Brown,2057,Marty Parke,Marty
Parke,2077,10
4440,99570,,,1,,2077,Andrew
Brown,89620500-419d-c814-a60e-0007d9001987,0,,10,334
0,3310,27/07/2006 11:16:47.246,,1,Andrew Brown,,,0,
27/07/2006 12:16,Andrew Brown,,Andrew Brown,2057,,,,810,0,,,0,,,Andrew
Brown,2b4
80100-aa9d-c814-a60e-0007d9001987,0,,0,0,0,27/07/2006 11:16:48.331,,0,,,,0,
27/07/2006 12:16,Ashleen Kelly,,Ashleen Kelly,2071,,,**,2140,0,,,0,,,Ashleen
Kel
ly,2b740a00-09a6-c814-bf9f-0007d9001996,0,,0,0,0,27/07/2006
11:16:52.316,,0,,,,0
,


As you can see, maximum line length is 80 characters and each record ouput
starts with a date and time and not all records are the same length due to
some fields being ommitted depending on the type of call. i.e internal or
external from what I can gather.

My problem(s) are this.
I need to read this file in, one record at a time, so that I can convert it
to a CSV file or better still, import it directly into my DBF file.

What is the best way of reading in this file one record at a time.( Would
really like to know how to properly read in and manipulate text files)

Also,  I was wondering, could I use a Telnet component in my Delphi App. to
directly access the 4001 port and pull the data directly into my database.

This option would be preferred.

For the record, Using Delphi v5, Indy 9, and Topaz Database Components.



Many thanks in advance..



Jerry


_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to