The internal callbook provides fast reliable lookups for resolving callsign location and is built from US and Canadian data sources directly. As such, the data can easily be kept up to date. The only cost is your time to download and assemble the data.
Building the callbook can be broken down into the following steps:
The only down side is the time needed to assemble and merge the data. For FCC data, two files must be copied into SQL tables and the result merged into the callbook table. The Canadian data is imported directly into the table.
As of this writing, there are approximately one million records (yes, you read that correctly) in the FCC database. Of that, only about 760,000 are active. Hence the reason for two tables. One contains the data we need, the other has the station status (active or not).
Updating the table involves downloading new database files and running the process again. When you build the database the first time, you will probably not be running the server. In that case, the 'normal' mode (CPU utilization at nearly 100%) would be appropriate. If other processes are running that are not responding well, then the 'background' mode should be employed. In the normal mode, the process will take approximately 30 minutes on a P4-2.4 GHz machine or 70 minutes on a P3-500 MHz box. The background mode will take almost three hours longer.
URL: http://wireless.fcc.gov/cgi-bin/wtb-datadump.pl
File: l_amat.zip
Comment: Link is in a table on the RH sideURL: http://www.rac.ca/calldown.htm
File: cdncaldb.zip
Comment: download link is at the top of the page
Files are updated on a weekly basis by both governments.
- Extract the downloaded files into any convenient directory using appropriate utilities.
- Move the following files to the PostgreSQL working directory. On a Fedora or RedHat build, this will be '/var/lib/pgsql'. If in doubt, do a 'su - postgres' and then type 'pwd' and note the path. This is where the files need to be copied.
File Source EN.dat FCC HD.dat FCC AMATEUR.RPT Canadian
Before proceeding with the following, it is assumed that you have executed './configure', 'make', 'make install' and 'make install-pg' successfully. If not, it must be done before proceeding below.
To create the callbook, execute the 'callbook' script in the PostgreSQL working directory. This will generate a temporary table named 'cbtemp', fill/merge it with data and finally replace the existing 'callbook' table (if it already exists) in the database. The script runs a set of SQL commands before and after the binary that extracts the data. It will stop if there is an error. Assuming you are logged in as root, here are the command sequences to be typed in. What you type is in boldface.
Normal mode (quickest execution, but CPU at near 100% utilzation):
[root@localhost] su - postgres
-bash-3.00$ callbook
Background mode (much slower, allows other processes to work normally):
[root@localhost] su - postgres
-bash-3.00$ callbook --background
You can safely ignore any errors that the SQL statements might return. As mentioned above, callbook will take quite awhile to execute. If the program fails it should give you an error message and hints at what might be wrong.
Type 'exit' at the command prompt to return to the root account.
Once this step is completed, proceed to configuration below.
The integrated callbook is turned on in the wxnaprd.conf file. There is but one parameter:
UseCallbook = y
Note that the default for this parameter is 'n' and must be explicity set to 'y'. Save the file and restart the daemon if it is running.
Field Description callsign The call of the station name Entity name. This can be an individual or organization. In the former case, it usually is listed as last_name, first_name, MI. city City of station location state State or province