Pre-payed application


#1

A am wirking on my own pre-payed application (i don’t found anythink than suit my needs). I want to do this line that:

  • user pre-pay credit (by bank transfer, credit card…)
  • user can read call list… in web application

I can do this all relative easily by PHP+MySQL+ some AGI scripts but i don’t know how to terminate call if caller have zero credit (i can determine max call length from called number, current user credit and tarif information) but i don’t know how to terminate call when user is out of credit (e.g. at call start set timeout for call).
I guess i can’t user AbsolutTimeout because it measure ALL time = when phone ringing…

Can anyone help me ?

Thanks, Roman


#2

You can pass a variable to the dial string for this.

On the cli, type: show application dial


#3

Hi,

you can always use GotoIf to check user credit. If zero land it on hangup other dial.


#4

[quote=“rsaf”]A am wirking on my own pre-payed application (i don’t found anythink than suit my needs). I want to do this line that:

  • user pre-pay credit (by bank transfer, credit card…)
  • user can read call list… in web application

I can do this all relative easily by PHP+MySQL+ some AGI scripts but i don’t know how to terminate call if caller have zero credit (i can determine max call length from called number, current user credit and tarif information) but i don’t know how to terminate call when user is out of credit (e.g. at call start set timeout for call).
I guess i can’t user AbsolutTimeout because it measure ALL time = when phone ringing…

Can anyone help me ?

Thanks, Roman[/quote]

There is a s[ia]mple phone card application here:

http://www.voip-info.org/wiki-Asterisk+AGI

-RFH