[Asterisk-Users] Re: billing realtime

Tony Mountifield tony at softins.clara.co.uk
Wed Apr 26 07:08:18 MST 2006


In article <444F765F.3090108 at bctech.co.uk>,
Jon Farmer <jon at bctech.co.uk> wrote:
> Tony Mountifield wrote:
> 
> > The other situation to take account of is when the caller somehow adds
> > to his prepaid balance while he has one or more calls in progress, in
> > order to avoid being cut off during the call.
> 
> Yes, this is a issue that needs to be considered. Also each call might
> be on a different cost per minute depending on the number called e.g. in
> the UK geographic calls are costed lower then mobile calls.
> 
> The only solution I can think of at the moment is to write a daemon that
> uses the manager interface to hold all calls in memory and manages the
> current call credit available at the current time per account. If the
> credit expires for that account it hangs up all channels for that
> account. The only problem at the moment is I can't figure away to
> dynamically play a warning to the callers.

Instead of hanging up the channel, transfer it (Action: Redirect) to
an extension that does Playback(warning) followed by Hangup.

You can send both caller and callee there if you use the ExtraChannel
parameter to Redirect. Otherwise transferring one drops the other.

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-users mailing list