-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I have 2 outgoing calling companies. Say A and B. With A company, I'm given 250 Minutes free per month. I would like to start off by using A company until 250 minutes were depleted for that month then use B and of course switch back to A once the next month turns up. How would I do this? - -- ================================Joshua Abbott, Support Technician http://www.successfulhosting.com/ Direct Line: PENDING Phone: (866) 494-5096 x1207 E-Fax: (419) 858-3241 Alt E-Fax: (801) 217-1123 jabbott@SuccessfulHosting.com ================================The Success behind your web site! ================================-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDCY25eYokiwGEZc4RAi1gAJsGcBNPSKN5VuXOhfOVJO37E5VOugCeLO4s zr+zYObCCn42sC7QOd86sw8=WmCA -----END PGP SIGNATURE----- -------------- next part -------------- A non-text attachment was scrubbed... Name: jabbott.vcf Type: text/x-vcard Size: 416 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20050822/c26768b3/jabbott.vcf
Joshua Abbott wrote:> Hello, > I have 2 outgoing calling companies. Say A and B. > With A company, I'm given 250 Minutes free per month. > I would like to start off by using A company until 250 minutes were > depleted for that month then use B and of course switch back to A once > the next month turns up. > > How would I do this?Include it in your LCR dialling AGI. I.E. Grab an agi file for Least Cost Routing, then add another field which allows you to weight providers and another one to stole credit amount. In each call decrease the credit amount and always select the highest weight provider unless they have no credit remaining. I.E. Pseudo SQL: SELECT costPerMinute, iaxDialString FROM rate_table WHERE dest='0039' AND credit>0 ORDER BY weight LIMIT 1 -- Cheers, Matt Riddell _______________________________________________ http://www.sineapps.com/news.php (Daily Asterisk News - html) http://www.sineapps.com/rssfeed.php (Daily Asterisk News - rss)