Back Home
Call Center
Box Configuration
Click Here to swich to the FUNCTIONS menu

Join the official vocp-users mailing list! Logo

Amnesty International - Help us cast the light on huma rights violations around the world
Back Home Click here if you require assistance to install VOCPsystem or if you want us to develop something special to fit your needs. Take a look at some screenshots! Frequently Asked Questions... Download the latest VOCPsystem version! About VOCPsystem and psychogenic
VOCP and Caller ID

Caller ID information can be used to direct incoming calls to particular nodes within the VOCP system based on the call's point of origin. You can use the Call Center to view incoming call number information as they arrive. CID information is preserved when voice mail messages are saved.

Configure CallCenter Filtering Calls
Click here to see a screenshot/demo Download VOCPsystem Access this topic's printable version Contact our team

You can setup VOCP so that calls from a given number start at some arbitrary box and message, instead of the default root box (box 001).

To direct incoming calls to different boxes based on the caller ID (CID) information, you need to do two things. Edit /etc/vocp/vocp.conf and make sure the callid_filter parameter is uncommented (no '#' at the start of the line) and pointing to the correct file:

#### Caller ID Filter ####
# If you have caller id and your modem groks it and you'd like
# to shunt particular callers to specific boxes (instead of starting
# at the root, 001, box), uncomment this line and edit the file
# it points to
callid_filter /etc/vocp/cid-filter.conf

Now, fire up vi (or emacs, nedit or whatever) and edit /etc/vocp/cid-filter.conf

This file has a format similar to vocp.conf:

# Lines starting with '#' are ignored

REGEX is a regular expression that will be checked against caller id info.
WHITESPACE[S] is 1 or more (space or tab) characters
BOXNUM is a sequence of digits that indicates the box number to jump to if a match is made.

Replace REGEX on each line with some Perl magic - a regular expression that will match the incoming phone number. Here is a simple example regexp:


Regular Expressions

Q I get a 'this function has not been enabled' error when trying to transfer a call to VOCP from the Call Center.
A Because the Call Center must send a signal to the vgetty process, ...

Notice that stuff in the [square brackets]? If you're new to Perl and regular expressions, [\s\-]* simply means "0 or more spaces and/or dashes" (that '\-' isn't strictly required, you just could use '-' but it's a good habit to escape dashes unless you mean to use them for a range of values). So

555 1212

would all match this regex. If I know that my phone company always sends the caller id info in the same way, I can simplify the regex. For instance, to match '555-1212', I can just use:


Take note of the '\-' to match '-'; this is because the '-' character is special in regexland, so it must be escaped to actually mean "the '-' character".

Supposing I would like calls from this number to start off directly in box 300, the cid-filter.conf line would be:

555[\s\-]*1212		300

That's it. The hardest part is figuring out your regular expressions (and it's not that hard, really). The advantage of using regexes is that they can be very powerful. Here's one:

(^\s*9\d9|555[\s\-]*1234|555[\s\-]*9876)     700

This expressions says that all calls from:

and all calls from the 9X9 area codes (909, 919, 929, ...) shall be started in box 700. Take a look at this regex tutorial or do a perldoc perlfaq6 to learn more about regular expressions.

Notes on cid-filter.conf

The cid-filter.conf file is documented, so take a peek inside. The important points are:

  • Get your regexes right. They will depend on the format for numbers as reported by your telco.
  • Keep to the "REGEXP BOXNUM" format
  • Order your filters from most specific to least specific. This last point is important. If you have these lines in cid-filter.conf
    ^514 600 
    514[\s\-]*555[\s\-]*1212 200
    You are saying "All calls from the 514 area code go to 600, calls from 514-555-1212 go to 200" - this won't work, because calls from 514-555-1212 will match the "All calls from 514 area code" first and go straight to box 600. The correct config in this case would be:
    514[\s\-]*555[\s\-]*1212   200 
    ^514  600

Testing your filters

After you've set up a few filters, it's time to testtesttest. You won't need to ask everybody to call you up in order to test that your CID filters are working - just use VOCPLocal. See the box configuration testing page or the included vocplocal.txt file for details on using the local VOCP interface, which allows you to interact with your voice system using your keyboard and speakers. The important part, in our case, is that you can edit the /usr/local/vocp/bin/ file and set the $CALLER_ID variable to any value you like. Then you just launch to see if your filter is doing what you expect.


VOICE MAIL Phone - VOCPweb - xVOCP | WEB INTERFACE Overview | CALLER ID Configure - Call Center - Filter | TEXT-TO-SPEECH Configure - Email to voice mail - Program Output | FAXING Configure - Receive - Send - Dynamic | COMMAND SHELLS Overview | INSTALL Modems - vGETTY - VOCP | CONFIGURE vGETTY - VOCP - Boxes - Other | UPGRADE Overview

vGETTY Install - Test - Configure - Modems | VOCP Overview - Install - Configure - Upgrade - Boxes - Caller ID - Text-to-Speech - Command Shells - Coming Soon | xVOCP Configure - Use | VOCPhax Send - Receive | VOCPweb Install - Configure - Use | CALL CENTER Use - Caller ID | BOX CONFIGURATION Use - Test - Types


© 2000-2003 Psychogenic inc. All rights reserved.