How to Develop a Feature

To develop a feature using the CPL FS, write the feature as a CPL script. If the desired node and outputs are not available, you may extend CPL and the FS. The next section provides an example of adding some new CPL tags.

Desired CPL

As a tutorial lesson, let’s add new CPL functionality.

The first functionality is:

    <im source="somebody@somewhere.com" msg="Come quick. I need you." >

This is the instant messaging functionality. Using this CPL node tag instructs the Feature server to send an instant message to the source with the specified message. <im> has no outputs.

The second functionality is:

<addressBkLookup name="Alan Smith" book="company.db" timeout="10" >
     <found> ....
    <not-found> ...

This tag instructs the Feature server to query a database file for user information. The Feature server waits for a configured maximum time to hear from the database. Depending on the success or failure of the database search, the CPL script can create different outputs.

Sample CPL Scripts

The following represents a sample of the CPL scripts used to create the features provided with the VOCAL system. Some of these scripts have adjustable values; others include custom tags or custom uses of tags and attributes that are not compliant with the current CPL standard. These are called VOCAL keywords . The text following each example provides more information.

Example 1: Call Blocking

The phone number prefixes, highlighted in bold italics, can be changed to match your requirements. ...

Get Practical VoIP Using VOCAL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.