Console Screenshot
root@Knoppix:/mnt/jc# ./jcblock jcblock Copyright (C) 2008 Walter S. Heath This program comes with absolutely no warranty. This is free software, distributed under terms of the GNU Public License described at: http://www.gnu.org/licenses/. sending ATZ command... got command OK sending AT+VCID=1 command... got command OK Waiting for a call... nbytes: 8, str: --RING-- nbytes: 71, str: --DATE = 062210--TIME = 1427--NMBR = 6035551212--NAME = Cell Phone NM-- blacklist entry matches: 6035551212 sending ATZ command... got command OK sending off hook got command OK sending on hook got command OK sending ATZ command... got command OK sending AT+VCID=1 command... got command OK
The above text shows the console output from the jcblock program when a call is received. After the first ring, a record is built from the caller ID data received. If any field in this record matches an entry in the blacklist.dat file, the modem is sent off-hook and on-hook commands, which terminates the call. In this case the match was to the calling number: 6035551212. CR and LF characters in the received data are replaced with '-' characters when constructing the record.