Billing

hello all,

is it possible to set asterisk to only start Billing when someone (handler) answers ie when someone calls he can listen to instructions (preemptive 1 for x and 2 for y etc)free and when handler picks system starts billing?

This is not a support forum.

If the billing is being done by the upstream system, it will need to support early media. It is unlikey that any upstream system that bills will do that, because of the ease with which it allows free calls.

If Asterisk itself is collecting the billing data, if the billing requirements are non-trivial, they should be done with channel event logging, not CDRs, in which case the post-processing software can choose when to start counting.

However, you can use ResetCDR to clear out the answered state that results from the Answer necessary to do the IVR without early media, in which case, I think you will get the answer time set when the called party answers.

thanx David

I think I got lost when u used term upstream system, I am new to voip and asterisk but I have so far managed to set it up since I have Linux knowledge.

anyway to give some more info; am setting up premium voice services and am running voice over copper cable using E1 from Telecom company using freepbx and digium single span pci card. can I archive what I want and if yes, then how.

I don’t want my users/clients to be billed for listening system instructions or prompts which am afraid may make my service unprofessional or be a burden.

regards

Upstream system means the Telecom company system. They will generally start billing when Asterisk sends ANSWER.

The following assumes you have full control of the dialplan, and GUIs may impose much more end user type restricttions.

If they treat you as another network operator, and therefore that you will not abuse the ability to make non-chargeable calls, they will allow you to provide early media, at least towards them. That is how voice call progress signals are sent. Asterisk can definitely send early media, although it is sometimes necessary to invoke the Progress application, and you will need to use special options on applications like Playback, to prevent them generating ANSWER (Queue will use early media by default, if the call isn’t answered).

What I’m not sure of is whether applications like Read force an ANSWER. It also assume you are running your own billing software.

If you are not trusted by the Telecom company the caller will probably hear ringback tone, rather than early media.

If you actually billing the customers directly, can’t use early media, and are happy with any current arrangement for the Telecom company to also charge them, you would appear to have non-trivial billing requirements, so should use channel event logging, which should then allow you to write billing software that chooses which event in the call represents the point at which to start charging. You might just be able to get away with using CDRs, if you call ResetCDR, after answering the incoming call. You can either output the partial CDR or not. The new CDR will be initialised as unanswered, so when the outgoing leg is answered, you will get a billable time from the outgoing answer.

However, you brought in FreePBX. That will severely constrain what you do, and it may well not allow you to any of the above. If FreePBX generates any billing reports, I would be fairly sure they are based on CDRs, not on CEL. If you must continue using FreePBX, please note that FreePBX is not supported on that board; you need to go to freepbx.org/forums.