Alternate to FreePBX blacklist

Here’s the situation. The latest distro of Ubuntu (9.10 karmic) has a known bug where zaptel won’t compile. Every patch or fix has been unsuccessful that I’ve tried.

bug https://launchpad.net/ubuntu/karmic/+source/zaptel/1:1.4.11~dfsg-3ubuntu2

So, my question is this. If were to download a SIT .wav file from the internet how difficult would it be write a task to do:

  1. Check FreePBX black list

  2. If in the FreePBX black list, play the custom SIT tone, if not move on and ring through.

  3. If the call is forced to the SIT tone, when the tone is finished, disconnect the call.

I’m assuming this new dialplan would go in extensions_custom.conf??