[Asterisk-Dev] Callingcard (again, sorry!)
C. Maj
cmaj-SPAM at freedomcorpse.com
Wed May 19 09:19:55 MST 2004
On Wed, 19 May 2004, Terence Parker waxed:
> 2. If find that if a call is terminated in the middle of a script, the
> script will continue running. For example, currently my script reads out a
> bunch of stuff to the user (you are calling x country, your card balance is,
> you have x minutes for this call etc...) - if a user hangs up during that
> the PHP script has no way of knowing and will continue to the end -
> including adding a lock to the MySQL database and a timestamp. So upon
> running the script again, the user will find their account locked.
Why not just check to make sure that the lock timestamp is
farther back in time than the current timestamp less their
available balance ? Then clear the lock. Or move the lock
insertion to the start of the actual call, just after the
PHP script is done ?
--Chris
--
Chris Maj, Rochester
cmaj_at_freedomcorpse_dot_com
Pronunciation Guide: Maj == May
More information about the asterisk-dev
mailing list