Eckhard Jokisch
2009-Nov-24 12:07 UTC
[asterisk-users] distribute free call minutes over different channels
Hi, I have 4 ISDN channels (2 lines) and each line may do calls of up to 360 minutes/month for free. As I understand asterisk will pick the first available line so the probability is big that the other lines will not use their free minutes and the firs line will exceed the free minutes. How can I configure asterisk in a way that it looks up in the CDR which ISDN line has lest calling time in the present month and chosse this? Kind regards Eckhard
Matt Desbiens
2009-Nov-24 12:23 UTC
[asterisk-users] distribute free call minutes over different channels
Couldnt you do this by calling MySql? Compare who has the least minutes used and then send it out the appropriate channel? --Matt On Tue, Nov 24, 2009 at 7:07 AM, Eckhard Jokisch <e.jokisch at orange-moon.de>wrote:> Hi, > I have 4 ISDN channels (2 lines) and each line may do calls of up to 360 > minutes/month for free. > As I understand asterisk will pick the first available line so the > probability > is big that the other lines will not use their free minutes and the firs > line > will exceed the free minutes. > How can I configure asterisk in a way that it looks up in the CDR which > ISDN > line has lest calling time in the present month and chosse this? > > Kind regards > Eckhard > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-- Matthew Desbiens 603.581.3160 //* EOF *// -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20091124/f46c586a/attachment.htm
Tzafrir Cohen
2009-Nov-24 13:10 UTC
[asterisk-users] distribute free call minutes over different channels
On Tue, Nov 24, 2009 at 01:07:28PM +0100, Eckhard Jokisch wrote:> Hi, > I have 4 ISDN channels (2 lines) and each line may do calls of up to 360 > minutes/month for free. > As I understand asterisk will pick the first available line so the probability > is big that the other lines will not use their free minutes and the firs line > will exceed the free minutes.If you use chan_zap or chan_dahdi, you can use r/R instead of g/G to go round-robin through the channels rather than start from the first/last (respectively). This would give you a rather even spreading of the outgoing calls. -- Tzafrir Cohen icq#16849755 jabber:tzafrir.cohen at xorcom.com +972-50-7952406 mailto:tzafrir.cohen at xorcom.com http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
Eckhard Jokisch
2009-Dec-14 19:05 UTC
[asterisk-users] distribute free call minutes over different channels
On Tuesday 24 November 2009 13:10:43 Tzafrir Cohen wrote:> On Tue, Nov 24, 2009 at 01:07:28PM +0100, Eckhard Jokisch wrote: > > Hi, > > I have 4 ISDN channels (2 lines) and each line may do calls of up to 360 > > minutes/month for free. > > As I understand asterisk will pick the first available line so the > > probability is big that the other lines will not use their free minutes > > and the firs line will exceed the free minutes. > > If you use chan_zap or chan_dahdi, you can use r/R instead of g/G to go > round-robin through the channels rather than start from the first/last > (respectively). This would give you a rather even spreading of the > outgoing calls. >I tried like this: exten => _0.,1,Dial(msidn/r:extern/${EXTEN}:1) where "extern" is the chapter in the misdn.conf that looks like [extern] ports=1,2,3,4 context=isdn msns=* But this does not work at all. Asterisk can not setup a channel. What would be the right syntax to invoke round robin in Dial command? BR Eckhard