[Asterisk-Dev] Is ast_channel_setwhentohangup() good for Prepaid
Service?
Begumisa Gerald M
beg_g at eahd.or.ug
Tue Sep 14 07:33:39 MST 2004
Hi,
I've been looking through the calling card sources and stripped it down to
a basic functionality (read rates from config file, read initial credit
from config file) - I'm working on a MySQL version on this - just for my
own use...
So when someone calls a given extension, it calculates the number of
minutes they can talk for and sets the channel timeout using
ast_channel_setwhentohangup() (as was in the original sources).
My question is that this timeout we set starts counting down from when we
make that ast_channel_setwhentohangup() "system call" and not from when
the actual callee picks up. In addition, I'm interested in finding out
the time the user spent on the call so I can update their credit (this
will not be in the config file tho ;-)).
Does anyone have a pointer or function I should look at that will tell me
when a user picks up so I can start counting (maybe one that takes
pointers to functions in my code which are called when they pick up /
hangup?)
I've searched the Asterisk-Dev archives from 1st Jan 1970 ;-) till now
according to http://lists.digium.com/pipermail/asterisk-dev/ and haven't
found much that's similar. I'd really appreciate any help.
Thanks!
Gerald.
More information about the asterisk-dev
mailing list