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) _______________________________________________ Asterisk-Users mailing list [email protected] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
