[Home]

Summary:ASTERISK-03207: [PATCH] ASTCC Expiration Bounty
Reporter:scubasteve (scubasteve)Labels:
Date Opened:2005-01-07 18:47:52.000-0600Date Closed:2005-03-17 08:38:24.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/NewFeature
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) astcc-expiration_after_first_use_BOUNTY.patch
Description:This patch should satisfy the requirements of the ASTCC Expiration Bounty outlined at

http://www.voip-info.org/tiki-index.php?page=ASTCC+Expiration+Bounty

This patch brings expiration checking under all circumstances (I was surprised to see that feature was missing).  It also populates the existing firstuse column under all circumstances (again, the schema supported this, but it was unimplemented in the app).

If the astcc-config.conf file has expirationdaysafteruse set, it will override the existing expiration information for that card and set it based on the configuration directive.

For example, setting expirationdaysafteruse = 30 will cause the expiration date to be set for 30 days after the card is first used.

****** ADDITIONAL INFORMATION ******

Disclaimer faxed moments ago.  Please be gentle, this is my first contribution.
Comments:By: scubasteve (scubasteve) 2005-01-08 05:32:24.000-0600

Installation:

Place the patch file in the /usr/src/astcc directory.  Run the following:

patch -p1 < astcc-expiration_after_first_use_BOUNTY.patch

... then install ASTCC normally.

By: kegrif (kegrif) 2005-01-08 07:54:33.000-0600

Can't find anywhere to configure length in astcc-admin.cgi

By: scubasteve (scubasteve) 2005-01-08 08:21:42.000-0600

Kegrif,

 
Add:

expirationdaysafteruse = 30

in the file astcc-config.conf (most likely located in /var/lib/astcc).

This will give you 30 days from the card's first use before expiration.

Also, remember the expiration is set AT FIRST USE.  If you tested this without the configuration file change, it set the first use column but didn't touch the expiration.  You'll need to wipe out the first use column for that card or use a different card.   :)

-Steve

edited on: 01-08-05 08:22

edited on: 01-08-05 09:37

By: kegrif (kegrif) 2005-01-08 10:17:39.000-0600

This configuration has been confirmed.  

It would be nice to add this configuration variable to the web GUI.  It is not part of the bounty, but would be easier for most people.  It should be configurable by card type.

Thanks.

By: kegrif (kegrif) 2005-01-08 10:19:24.000-0600

Reminder sent to scubasteve

Please forward your PayPal ID so I may forward the funds.

By: scubasteve (scubasteve) 2005-01-08 10:41:19.000-0600

Kegrif,

  Please explain "configurable by card type".   I have some cycles tomorrow which I can dedicate to it.  Please contact me by email - steve [at] asterisktechnologies [dot] com.

  The PayPal address is paypal@asterisktechnologies.com.

  Thank you!

-Steve

By: Darren Wiebe (darren) 2005-01-08 20:39:14.000-0600

Once this gets into CVS I will modify it to allow you to specify how many days the cards are good for by brand.  If that is supported.  I was working on expiration but I see this is done so I won't put any more time into it. :-)  I have the expiration tied into the web interface in the stuff I'm working on.  As soon as the ASTCC patch for pins gets in, I'll clean everything up and put it in.

By: kafagy (kafagy) 2005-01-19 14:50:05.000-0600

scubasteve,
I moved the call of &setfirstuse() to under the 'ANSWER' desposition to ensure that the  clock on expiration is only happening after an answered call.

astcc.agi.patch attached.

edited on: 01-19-05 14:53

By: Mark Spencer (markster) 2005-02-04 00:27:23.000-0600

Does this not require any table changes?

By: scubasteve (scubasteve) 2005-02-04 06:33:57.000-0600

Hi Mark.

Correct, there are no database changes involved for this patch (see initial description) as everything I needed was in place, but not in use.

At the time this was written, I was unaware the astcc-config.conf file was maintained by the program.  The astcc-config.conf file must be manipulated by hand to enable this feature.

If this is a CVS candidate, I'd be happy to submit a patch to make ASTCC be able to manipulate the configuration directive.

-Steve

By: Clod Patry (junky) 2005-03-08 22:55:23.000-0600

kafagy: i never saw an astcc.agi.patch attached.
You forgot to attach it?

By: Mark Spencer (markster) 2005-03-12 00:56:32.000-0600

Added to CVS, thanks!