sarond, our live device is the CX, the snippet is from that controller.
The MXeIII has been sitting on the floor of the workshop because: a) I know sweet FA about VoIP, and b) I have been busy with development and network admin stuff.
As for the script, sure I will attach it.
It is a PowerShell script and it seems to work reasonably well, though it does have a few shortcomings.
What it does:
- polls port 1752 of the controller
- grabs the output as a string and passes it to the configured database (in this case a Firebird DB) calling a stored procedure with the string as a parameter.
- the stored procedure examines the string, separating it into its columns (the ones I am interested in) and writes the record.
When I was looking for something similar, they all seemed to be specific to a controller or brand and they output the data in their own way and didn't seem very flexible.
I did it this way so all the script has to do is pump the string into a database, it doesn't care about the format, only the length. I can then get my stored procedure to interrogate the string and write it in whatever format I want.
Shortcomings:
- it doesn't start as a service, I have to start it manually.
- if the network loses connectivity I have to stop/start the script (very rare), I would like it to be able to stop/start itself if connectivity stutters.
- if connectivity is lost, and I stop/start the script again, it grabs all output and doesn't distinguish between records and generates an error. I have to get it to recognize the EOL characters. This also happens if 2 calls are terminated at the same time (and output for both is at the same time) though here with only 15 users it is rare.
If you (anyone) uses this script, you will need to write your own stored procedure for the DB you are using. I have attached my Stored Procedure for Firebird for reference.
I hope the script helps.