[Asterisk-Dev] Is ast_channel_setwhentohangup() good for Prepaid Service?

Begumisa Gerald M beg_g at eahd.or.ug
Thu Sep 16 05:51:03 MST 2004


    > The first parameter to app dial is the ring timeout, so yes it is as you
    > mentioned above. So speciy the max time as S(n) where n is the max number of
    > seconds the call should last.

Thanks again.  I'll be sure to try this out.

    > I am not a C programmer so probably got the syntax totally wrong,
    > however hope it makes sense to you.
    >
    > When I did my app, I did it as a Pascal application running as an
    > AGI script. There are lots of issues to be considered, and I am
    > happy to have further discussions on this topic.

Yes, I'd be interested in looking through these issues too.  I'm going to
implement the idea you gave and see what comes up.

    > Also are you in the position to share your code ?

Yes, its pretty basic, it just reads rates from a config file and bases on
these to calculate the timeouts etc... Find my code here:

http://pop.eahd.or.ug/~beg_g/asterisk/app_gprepaid.c

Lemme know if you have any questions.  Its still an old version with the
"setwhentohangup" stuff.


Cheers!
Gerald.



More information about the asterisk-dev mailing list