Recent

Author Topic: Reading Serial port data from Nortel/Meridian PBX how to decode?  (Read 48080 times)

snorkel

  • Hero Member
  • *****
  • Posts: 817
Reading Serial port data from Nortel/Meridian PBX how to decode?
« on: November 06, 2013, 05:20:49 pm »
Hi,
Just wondering if anyone has done something like this.

We have a Nortel/Meridian PBX and we have a PC connected to it via a serial connection.  Currently procomm plus sits there and reads data (call detail records) every hour that the pbx spits out on the serial port.

I was able to use the Synapse library to read the data no problem, but it's unusable in it's raw form.  The procomm program is able to decode it and from what I can tell it's VT100.

Is there anyway to decode this data from the PBX with Free Pascal?  The OS it's running on is currently windows XP, but we could use a Linux PC instead.

Thanks,


Snorkel
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12901
  • FPC developer.
Re: Reading Serial port data from Nortel/Meridian PBX how to decode?
« Reply #1 on: November 06, 2013, 07:55:05 pm »
IIRC the TCP/IP suite ICS has a VT terminal emulation.

ttomas

  • Sr. Member
  • ****
  • Posts: 251
Re: Reading Serial port data from Nortel/Meridian PBX how to decode?
« Reply #2 on: November 06, 2013, 10:59:27 pm »
You don't need any decoding. All PBX serial CDR outputs can be printed with simple serial text printer. Just set correct serial params. For every call PBX send one line of CDR data and CRLF. With any pascal serail component you can read this data and parse CDR text. In PBX documentation you can find description of all data and position in line.

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Reading Serial port data from Nortel/Meridian PBX how to decode?
« Reply #3 on: November 07, 2013, 04:02:58 pm »
I thought it was all just plain text, but when I read it with synapse and even other apps like Hyper terminal the data was all messed up looking and I used the same settings in procomm plus.
Procomm plus was the only app I could get the data to display in the terminal properly.

I will have to give it another go with synapse.
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Reading Serial port data from Nortel/Meridian PBX how to decode?
« Reply #4 on: November 07, 2013, 04:37:38 pm »
It's been a few years since we tried to get rid of procomm and it was a pain because we could not
play around with it until after 5pm because we could not mess with their call logs during the day.

I think we will try to use a port splitter so procomm can continue to run and then I can read the duplicate data from a virtual com port.

The other issue is it's a corporate pbx and they don't want us messing with it and it sends data over the connection once per hour :-(

***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Reading Serial port data from Nortel/Meridian PBX how to decode?
« Reply #5 on: November 07, 2013, 05:38:25 pm »
try the following, save the incoming data as the y come in to a file and open it from a console using the all powerful edit (dos era text editor). If everything shows correctly you need to run an OEMtoansi conversion on the data received. If not please provide a sample file and a screen shot on what it should look like.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

ttomas

  • Sr. Member
  • ****
  • Posts: 251
Re: Reading Serial port data from Nortel/Meridian PBX how to decode?
« Reply #6 on: November 07, 2013, 08:26:16 pm »
Check your serial port settings again.
Look like missconfigured port or maybe some propriety scrambled protocol.
Check all combination of settings 7-8 bit data, stop bit, parity etc. with Hyper terminal. With any new PBX first I save log with Hyper terminal then I configure my application.

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Reading Serial port data from Nortel/Meridian PBX how to decode?
« Reply #7 on: November 07, 2013, 08:52:32 pm »
Thanks for the tips guys.

I will post a screen shot of what the data looks like in the procomm terminal, it shows in the terminal all nice and formatted, which is kind of why I thought it might be vt100.  When we get the serial port split to two virtual com ports I will also post the data received via Synapse or whatever serial port lib I use.

UPDATE, I should have a screen shot in a few minutes.

« Last Edit: November 07, 2013, 08:58:37 pm by snorkel »
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Reading Serial port data from Nortel/Meridian PBX how to decode?
« Reply #8 on: November 07, 2013, 09:23:12 pm »
screen shot of the procomm plus terminal.

The users then save the buffer to a file manually and they also have a macro express (yuck) script that runs right after the data comes in every hour.

Ideally I would like to capture this data with a Lazarus app instead :-)
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Reading Serial port data from Nortel/Meridian PBX how to decode?
« Reply #9 on: November 07, 2013, 09:25:41 pm »
... a PC connected to it via a serial connection ... serial port.

Just set correct serial params.

I used the same settings in procomm plus.

Check your serial port settings again.

Just to make sure you know what settings you need to change:

Bits per second: it takes values like 9600
Data bits: usually between 5 and 8
Parity: Even, Odd, Mark, Space, None... etc.
Stop Bits: 1, 1.5, or 2
Flow Control: Xon/Xoff, Harware, or None.

What you really need to post here is a screen shot of the settings used in ProComm, and another screen shot for the settings you are using.

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Reading Serial port data from Nortel/Meridian PBX how to decode?
« Reply #10 on: November 07, 2013, 09:32:35 pm »
I am getting screen shots of the settings as well.
In the past I was able to read the data using delphi and synapse but it looked like complete garbage, i.e. like a file full of wing ding fonts :-)
I never really messed with serial ports before, so at the time I just gave up.
Now we have to move the app to a new PC with windows 7 and they don't make a version of procom that works on windows 7.
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Reading Serial port data from Nortel/Meridian PBX how to decode?
« Reply #11 on: November 07, 2013, 09:42:02 pm »
By the way, which com ProComm is using?

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Reading Serial port data from Nortel/Meridian PBX how to decode?
« Reply #12 on: November 07, 2013, 09:42:30 pm »
ok, here are the current procomm settings:

using COM1

Baud rate: 9600
Parity: none
data bits: 8
stop bits: 1

Use hardware flow control is unchecked
use software flow control is unchecked
drop DTR to hangup is unchecked.

Current terminal VT-100
terminal update: fast
terminal scroll method: normal
terminal keyboard file: vt100
Enquiry type CIS B+
scroll back pages 18
terminal size 24 rows, 80 columns
keep cursor in view is checked
line wrap is checked
screen scroll is checked
strip bit 8 is checked
block cursor is checked.
tab stops every 8 positions.
« Last Edit: November 07, 2013, 09:46:48 pm by snorkel »
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Reading Serial port data from Nortel/Meridian PBX how to decode?
« Reply #13 on: November 07, 2013, 09:45:42 pm »
 :) You are *not* using the same settings.

Edit:
Start with Windows XP HyperTerminal, it has the same wordings for these setting. Strip bit 8, for instance, should *not* be checked.
« Last Edit: November 07, 2013, 09:54:22 pm by engkin »

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Reading Serial port data from Nortel/Meridian PBX how to decode?
« Reply #14 on: November 07, 2013, 09:56:08 pm »
The last time I tried this (and failed) was 3 years ago, and I used the exact same modem settings with  SynaSer.  I had a blocking loop in a thread and whenever data was available I would add it to a tmemo and it always looked like the data was corrupt, it never looked anything like the data in the procomm terminal window.

is there a particular serial lib that you guys would recommend and should I be doing any type of conversion on this data?
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

 

TinyPortal © 2005-2018