[Asterisk-Users] pre-paid (new to asterisk, pls don't shoot on me)

Joe Hughes JoeHughes at Manx.net
Tue Mar 30 01:20:41 MST 2004


On this subject - has anybody managed to implement a method
of warning the caller that their call will expire? I've
written a similar PrePaid test app in PHP/mySQL, I can
calculate the timeout for the call and set the timeout etc -
but I'd like to warn the user with beeps 15seconds before
the call is disconnected.

I've tried modifying the source so a flag is set "whentowarn
= (whentohangup - 15 seconds)", this gives me the ability to
execute a line in the main call loop.  If I execute
"ast_streamfile c, beep, c->language" the call bombs out. (I
don't have the error to hand)

Two questions; 

Has anybody successfully implemented this, either by way of
source changes or by using the T extension (possibly
something obvious I've missed?)

Is it possible to interrupt a call with ast_streamfile, if
so what is the correct sequence of code to do this
(waitstream, stopstream etc?)




----- Original Message Follows -----
From: "Alexander Romanov" <alex at rnsinternational.com.au>
To: <asterisk-users at lists.digium.com>
Subject: RE: [Asterisk-Users] pre-paid (new to asterisk, pls
don't shoot on me)
Date: Tue, 30 Mar 2004 10:06:50 +1000
> 
> Check out app_prepaid.c
> (http://www.voip-info.org/tiki-index.php?page=Asterisk%20c
> allingcard) It needs a finish but it's a good start
> 
> Cheers
> Alex.
> -----Original Message-----
> From: asterisk-users-admin at lists.digium.com
> [mailto:asterisk-users-admin at lists.digium.com] On Behalf
> Of Brent Franks Sent: Tuesday, 30 March 2004 2:35 AM
> To: asterisk-users at lists.digium.com
> Subject: RE: [Asterisk-Users] pre-paid (new to asterisk,
> pls don't shoot on me)
> 
> 
> Google: Asterisk Calling Card
> 
> - Brent
> 
> > -----Original Message-----
> > From: asterisk-users-admin at lists.digium.com
> > [mailto:asterisk-users-  admin at lists.digium.com] On
> > Behalf Of cubaz at cubaz.org Sent: Monday, March 29, 2004
> > 11:23 AM To: asterisk-users at lists.digium.com
> > Subject: [Asterisk-Users] pre-paid (new to asterisk, pls
> don't shoot on
> > me)
> > 
> > Hi everybody =)
> > 
> > new to asterisk, i'm trying to understand if it supports
> pre-paid cards
> > with
> > pin number, or if any software to manage pre-paid cards
> & pins (better if
> > open source) may be linked to asterisk.
> > Or may be asterisk linked to a mysql/postgre/others
> database to update &
> > check credit expiration, shutting down the current call
> > on credit  expiration ?
> > 
> > thanks,
> > luca f. perozzo
> > 
> > 
> > _______________________________________________
> > Asterisk-Users mailing list
> > Asterisk-Users at lists.digium.com 
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> > To UNSUBSCRIBE or update options visit:
> >   
> http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users





More information about the asterisk-users mailing list