NetCallerID for 2 phone lines.

Joe W

Member
I've been using the NetCallerID box for a few months now. Very high WAF. Since I have two phone lines (one POTS, the other is VoIP) I got a second NetCallerID for Christmas. I planned on putting it on the VoIP line.

I'm currently using Stevech's CallerID scripts/package. Unfortunately, it only supports 1 NetCallerIDbox/phone line. Some other' people expressed interest in a second line but I don't think Stevech will make the necessay adjustments.

His package includes VB source code but quite frankly, I will never learn VB and do not have the develpment environment , even if I wanted to.

Anyhow, would anyone care to make a second version of his code to support line 2?

Or possibly someone has some other way to support 2 lines already?
 
I would give it a shot, but I don't have one of these devices. I assume you are talking about a plugin, not a script? I thought smee or someone else recently posted some code?
 
I feel a bit dumb about this.

BruceL: Referring to the other thread, I assume that you call your script in the startup script to grab the com ports. Do I really need to supply a trigger (as you suggested in the other thread? or will your script fire based on the presence of data on the serial line(s)? Also, if I were to use HSP (I currently am not), how do you tell HSP that the other line is ringing if HSP only supports 1 line? What I'm getting at is I don't know how HSP interacts with your script. Do you call a HSP event based on what your script detects or does HSP detect the call and then fire off your script? (Which came first, the chicken or the egg). What's the setup for HSP ?

See, I told you I was a bit dumb on this.

I'm going to lurk a bit more on the HS site to see what other options people have provided (re: smee's solution)

TIA
 
I usually chime in and say that it's really easy to write a script to work with the NetCallerID box. So, this is me chiming in to say it again. ;)

I've never "published" my basic script that handles incoming calls - just utility routines that use the data. But, it's really, really easy to write. I've never used HSP so I don't know how to get them to work together.

If you write your own script or get a script from someone else, you can easily work with as many phone lines as you want - as long as you have a serial port available for each one.
 
Joe:

The init & close routines are called from startup script and shutdown script - respectivley.

My script gets called when HS detects the CR (carriage return character) on the serial port, the script entry point is CallBack_Line1 or CallBack_Line2, depending on which serial port received the data.

HSP gets notified that CID is available from the line
hsp.LINESetCIDInfo 1,sName,sNum

I have a HS trigger for "On Caller ID available" and I handle all the announcements in that event. You can easily add code to handle the CID announcements at the call to hsp.LINESetCIDInfo. You could even call a different script from there.

I handle multiple lines by having the CID always given to HSP on Line 1 - check the HSP funcition call, the 1st parameter is the phone line the CID is from.
 
I'm reposting this. Yesturday's was lost.

smee -
Although I do like to fiddle around with code I have almost no programming skills so even adjusting others' scripts is a very labor intensive operation for me.

Bruce L -
I kow it's something I'm doing wrong as Ijust don't know how all this stuff is supposed to behave. My only reference is using CallerIDMonitor code from Stevech which works on either line.

I tried using your script. Added the Init and Close references in HS, changed your code for my com ports and commented out the reference to HSP. No go. It will not execute when a call comes in on either line although the NetCallerID boxes record the calls comming in. No sure if this is relavent but I'm using a Edgeport USB converter with com 4-7. Your script should fire whenever it sees the termination string on the com ports, correct?

What are the resource numbers? Are the Interrupts? I have them set for the same number as the com port since that is what you seemed to do. Is this right?
 
Success!

OK, I fiddled som more and got it working. Here's what I did. I took out the "if" statement on the check for the second line, I manually set the com ports to the correct baud rate, I assumed that the resource numbers were Interrupts and set them to unused ones - and re-plugged in all the cables and telephone connections. Now it recognizes and speaks caller ID info from both lines - one POTS and the other VoIP.

This is very cool.

Thanks for the script and support.

This made my day.
 
The resource numbers don't have anything to do with interrupts, hardware, etc.

They are an artificial construct created by HST. HomeSeer (at least v1.x) can only handle 8 serial ports through scripts. There are 8 "resources" available for ports. If you use the original OpenComPort, you can connect to com1 through com8. However, you can't connect to anything above com8. If your computer has more than 8 ports (or at least has a port with a number higher than 8), in order to use those ports you need to use OpenComPortEx and specify a resource (1 through 8) that HS should use internally for that port. The resources are assigned automatically with OpenComPort.

As far as I know, there is nothing that will tell you which resources are already in use. They do not correspond to the port numbers. When you use OpenComPortEx, you basically need to use trial-and-error to select a resource number that isn't in use. If you change your configuration later, this number may become invalid. I assume, but do not know for sure, that they are allocated in order as ports are opened.

Note that these resources only matter when ports are opened from scripts. Plugins generally do not use HS to open their ports and do not use any resources. So plugins usually do not count against your 8 allowed resources.

I hope that HS 2.0 removes this limitation.
 
Back
Top