__cpl-c_ module implements a CPL (Call Processing Language – RFC3880) interpreter. It has support for uploading/downloading/removing scripts via SIP REGISTER method.
CPL is a powerful and flexible XML scripting language that allows each user to develop its call routing. Some common features like redirection, forward, speed-dial, call/black lists … can be implemented via CPL. Since XML processing is quite resource consuming, all scripts are loaded via the OpenSER daemon which converts them to a binary format for use in call processing. Some of the common features can be implemented via other OpenSER modules — see speeddial, avpops.
Example CPL script – reject anonymous calls:
<?xml version="1.0" encoding="UTF-8"?>
<cpl>
<incoming>
<address-switch field="origin" subfield="user">
<address is="anonymous">
<reject status="reject" reason="I reject anonymous calls"/>
</address>
</address-switch>
</incoming>
</cpl>