I'm running freePBX/Asterisk for a small office and would like to set up accounting codes per call. Essentially, whenever you dial a long distance (ie. any number more than 7 digits excluding certain local area codes), you will get a tone until you enter a 2 or 3 digit accounting code.
On the backend, there will be some simple gui or query that would create a report in .csv or similar format by accounting code. the report would list accounting code, from/channel, destination, duration, etc.