Serial (rs-232) experimentation

Hey guys, I am hoping anyone of you can give me some ideas…

I am trying to develop an app that should read the call detail records from a pbx. (In case you don’t know, that is the information provided by a telephone network server) and parse it in order to apply the right charges to the rooms in a hotel.

Most of the pbx’s boxes (panasonic, LG, Goldstar, etc) have a serial port that outputs the data.

But I don’t have a pbx, so I don’t where to start, because I can’t test nor experiment.
It’s the first time I try to write code that talks to ext hardware that I don’t have… and I don’t even know where to start…

Thanks for your input.
R

Buy an Arduino & practice on that.

Not sure… I think it’s a too steep learning curve to me… but, suppose I buy it (not cheap, though… it costs about U$200)… and then ?

I need a device that will output the same serial data a PBX would… how do I get that with arduino ?

You can use the Arduino to emulate the output from the pbx. You can probably use a Pi2 or 3 as the emulator if that is more cost effective.

I do not think you can reliably develop anything without having a connection to the actual PBX and the full protocol of the device, at least to experiment. Maybe you can get a used PBX box to play with ?

In the ancient times what I did was to use a communication program with an RS-232 interface, plug that into whatever you want to get to, and see what it says. Of course you do need the manual of the PBX to understand what is going on and what you need to send to get the data you need. There are RS-232 adapters that plug in the USB port. I am not too familiar with them, though.

http://www.amazon.com/s/ref=nb_sb_noss_1?url=search-alias%3Dcomputers&field-keywords=rs-232+adapter&rh=n%3A541966%2Ck%3Ars-232+adapter

http://www.ebay.com/sch/i.html?_from=R40&_trksid=p2050601.m570.l1311.R6.TR12.TRC2.A0.H1.Xpbx.TRS0&_nkw=pbx+telephone+system&_sacat=0

Before you get your hands on the actual device, I would advise you try to get your hands on the specs of communication command codes for a given PBX. It is not sure they all the same BTW.

I think Chris’s answer sounds closer to my actual possibilities… but still I wouldn’t know what to expect from a PBX… that is the problem… I think it’s like a burst of data (could even be human readable) every time a phone call is finished…

Michael, you mean I couldo check in a hyperterminal window the output of the pbx ? I would still need to get my hands in one of those things…

Is it possible to simply save in a text file the RAW input of a serial port connection ?

Exactly what I mean. That is IMHO the only way you will get anywhere.

That will require you send a command to the PBX, such as what is described here :
http://pbxinaflash.com/docs/PBX-Administrators-Guide.pdf

Not even sure it contains what is required, but basically you need to know what the PBX will be expecting through the RS-232 in order to deliver what you are looking for.

This should not be too difficult, IF you know which box you are talking to, and IF you know how to work with Serial protocols and hardware. Each box may have a slightly different protocol. If you’ve never done this, and have zero experience with serial protocols and hardware it may be a challenge (good challenge though).

google: how to read pbx serial output
google: smdr software

I wasted my keyboard’s keys labels typing “Google” “PBX” and “SMDR”.

I am definitely wanting to achieve this… SO I will put some effort on it…

Is it absolutely always required a command for the device to output some data ? I’ve had the idea that the PBX would simply output a certain amount of data everytime it was available (like after a call has been finished)

Actually I see some of these SMDR apps are simply terminal windows that have an extra parsing functinality to process the text data, but looks like the PBX outputs the data in a very neat and readable way…

I think I just need a logger that will write a txt file from that output, and I will write code in XOJO to read and parse that file… maybe hyperterminal works… Is not the most integrated or elegant way… but It might work… wouldn’t ?

geez… no one ever has developed a PBX emultor ??? :slight_smile:

https://sourceforge.net/projects/simplesmdr/
http://stackoverflow.com/search?q=smdr+pbx

Maybe these helps some. i’ve never worked with it, so i can’t really offer much help, but i’ve done plenty of internal loggers and parsers for proprietary hardware we develop,and this pbx stuff looks very similar.

thanks! I’ll see what I can achieve…

[quote=258764:@Roman Varas]I think Chris’s answer sounds closer to my actual possibilities… but still I wouldn’t know what to expect from a PBX… that is the problem… I think it’s like a burst of data (could even be human readable) every time a phone call is finished…

Michael, you mean I couldo check in a hyperterminal window the output of the pbx ? I would still need to get my hands in one of those things…[/quote]
A long time ago before my company switched to VOIP we had a AT&T PBX with such a serial port that was meant to be connected to a printer. We bought a serial to syslog over ethernet tool that sent the serial communications to a syslog server we had running. A program periodically read the file (it was plain text) and posted it to a database.

UPDATE… I made some progress…

  1. Installed “Null-modem emulator” (open source kernel-mode virtual serial port driver)
    http://com0com.sourceforge.net/

  2. Found and installed this little app “PS2 Config” (utility to make PortStore2 PL configuration more easy. PBX emulator on local serial port included)
    http://www.hw-group.com/download/sw/PS2_Config.zip

PS2_Config is a utility made to configure and test a hardware unit that logs serial connection over ethernet. Comes bundled with a simple PBX emulator. Now I can automatically send messages to a virtual COM port like a real PBX would.

Things are getting better…