Dial Rule for Cost Recovery


Please, if this is not in the appropriate location, feel free to direct me.

I have what I believe to be a fairly unique situation and I’m sure there is a solution I’m just missing.

We’re a large law firm, and what we have recently implemented is a cost-recovery system. For the phone side of it, I simply wrote a cron job to copy the asterisk cdr table every day to an FTP site which is queried by the cost recovery system. I thought this was a pretty nifty approach (if you want that job, let me know and I’ll happily share it).

Now that we are able to get at every day’s logs, we need to have a way to optionally “tell” the cost recovery system how to bill the phone call. The way other offices within the firm do this (who aren’t using Trixbox) is they created a custom dial plan and feature code: #6 followed by 11 numbers (which correspond to a 6-digit client number and a 5-digit matter number) and then the number.

I’m sure some combination of a custom feature code, an Outbound dial pattern, and a dial rule on a trunk will accomplish this. Unfortunately, I’m not 100% familiar with how all that works together, and nothing is jumping out at me on the admin console to create a feature code like that…

Basically, we want the option to include the 11 digit client/matter number (by pressing #6) with the number being dialed so it shows up in the cdr so the cost recovery system and pull it in.

Any help would be GREATLY appreciated.


perhaps simply in your new [macro-dialout-trunk-predial-hook] call the authenticate() app with the a option


Would that require “authentication” for every call?

That would not be desirable as not every call will be billable nor would you necessarily always want to enter client/matter info before you dial.

I’m finding out from the vendor that this isn’t necessarily required in order to proceed, so we may do without.


If you read the link I sent you you will see that you can terminate the application by dialing #, you can also be as creative as you want in your new macro as to playing instructions, or bypassing the application under any other condition myou choose.