# Using NCID on Two Phone Lines

After using Network Caller ID (NCID) for over a year, I decided to add it to my business phone line, as that line was beginning to get spam calls. Unfortunately, setting NCID up to auto-answer two modem-based phone lines is not possible without a lot of modification. It turned out that the easiest way to do this was to use a second Raspberry Pi and modem (see Stopping Rachel from Cardholder Services for links and instructions on setting up a first NCID server.) When you install a second NCID modem server, you will want to uncomment set lineid and put in the last four digits of the phone number so that you can tell which line was called:

 ############################ # Set the line indicator if you want it displayed for the modem. # or if you have more than one telephone line. The default value # for lineid is '-' and is not displayed. Setting it to any other # value will display it. # # You can set lineid to 'POTS' (Plain Old Telephone Service) to # have it displayed or the last 4 digits of your number if you # have more than one telephone line. # lineid default: - set lineid = 0123 

To configure NCID so that all calls were reported to the same server required some additional configuration for the ncid2ncid service.

## Configuring ncid2ncid for Consolidated Phone Log

Adding NCID protection for the second phone line was easy, but it took me a while to figure out how to consolidate the call log. The ncid2ncid service is the key to consolidating information from multiple NCID modem servers to a single NCID server for reporting purposes. The configuration information is cryptic, but straightforward. On the consolidating server, you will need to modify the ncid2ncid.conf file with information connecting the two servers:

 # ############################## # receiving NCID host and port # # ############################## # Set the receiving NCID host address # Default Address: 127.0.0.1 set tohost = 192.168.0.3 # Set the NCID port # Default Port: 3333 # set toport = 3334 # ############################################# # first sending NCID host and port (required) # # ############################################# # Set the sending NCID host address # Default Address: none set fromhost1 = 192.168.0.4 # Set the sending NCID port # Default Port: 3333 # set fromport1 = 3334 

It is easiest to set this up on the receiving server, but it could actually go anywhere on the network. To start the ncid2ncid service, use the command

 sudo service ncid2ncid restart 

## Setting up ncid2ncid for Autostart after Boot

ncid2ncid will not start automatically after boot unless you enable it. On the Raspberry Pi, use this command to add it to the startup list:

 sudo update-rc.d ncid2ncid defaults 

## Looking at Calls For Second Line

Having a consolidated server is great, but there are times when you will want to look only at calls from the second phone line. To do this, just start multiple NCID clients:

 ncid consolidated-server ncid second-line-server 

## Related Articles

For additional information, you may be interested in other articles on NCID and stopping phone spam: