G'day all, I'm trying to come up with a quick, easy solution to have a static inbound number in my dialplan, rotate calling 2 numbers. Example: 1st call into asterisk exten => 1234,1,Dial(sip/1111,10) exten => 1234,n,Dial(sip/2222,10) 2nd call into asterisk exten => 1234,1,Dial(sip/2222,10) exten => 1234,n,Dial(sip/1111,10) We're kind off looking to do load balancing via the dial plan. But I'm having a little trouble getting the logic to trace 1st call in, 2nd call in, 1st call in, 2nd call in, etc. Any help? Thanks again, PB
On Thu, 2008-05-08 at 11:46 -0400, Paul Belanger wrote:> G'day all, > > I'm trying to come up with a quick, easy solution to have a static > inbound number in my dialplan, rotate calling 2 numbers. Example: > > > 1st call into asterisk > > exten => 1234,1,Dial(sip/1111,10) > exten => 1234,n,Dial(sip/2222,10) > > 2nd call into asterisk > > exten => 1234,1,Dial(sip/2222,10) > exten => 1234,n,Dial(sip/1111,10)explore the use of set(DB) it stores values on a persistent astDB so you can use it to toggle where the next call dials> > We're kind off looking to do load balancing via the dial plan. > > But I'm having a little trouble getting the logic to trace 1st call > in, 2nd call in, 1st call in, 2nd call in, etc. > > Any help? > > Thanks again, > PB > > _______________________________________________ > -- 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-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080508/1b564fc7/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 5537 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20080508/1b564fc7/attachment.bin
Paul Belanger schrieb:> I'm trying to come up with a quick, easy solution to have a static > inbound number in my dialplan, rotate calling 2 numbers. Example: > > > 1st call into asterisk > > exten => 1234,1,Dial(sip/1111,10) > exten => 1234,n,Dial(sip/2222,10) > > 2nd call into asterisk > > exten => 1234,1,Dial(sip/2222,10) > exten => 1234,n,Dial(sip/1111,10) > > We're kind off looking to do load balancing via the dial plan. > > But I'm having a little trouble getting the logic to trace 1st call > in, 2nd call in, 1st call in, 2nd call in, etc.I don't quite understand why you would want to that in the first place but you could use a global variable. Set(GLOBAL(somevar)=0) Set(GLOBAL(somevar)=1) Set(GLOBAL(somevar)=0) ... Whenever a call comes in, use somevar to decide what to do. show application GotoIf Gr??e, Philipp Kempgen -- Asterisk-Tag.org 2008, 26.-27. Mai -> http://www.asterisk-tag.org amooma GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de Gesch?ftsf?hrer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
info at tripple-o.nl
2008-May-08 17:53 UTC
[asterisk-users] help with rotating number plan
An option to rotate between numbers is to add a queue to the system and add 1111 and 2222 as agents and pick the proper strategy (rrmemory or leastrecent). This has some advantages: - the calls are devided as you have in mind - when there are more calls coming in they are queued instead of a busy tone - you can scale by just adding an agent to the queue see http://www.voip-info.org/wiki-Asterisk+call+queues for further info Erik de Wild Tripple-o Your Asterisk migration partner> I'm trying to come up with a quick, easy solution to have a static > inbound number in my dialplan, rotate calling 2 numbers. Example: > > > 1st call into asterisk > > exten => 1234,1,Dial(sip/1111,10) > exten => 1234,n,Dial(sip/2222,10) > > 2nd call into asterisk > > exten => 1234,1,Dial(sip/2222,10) > exten => 1234,n,Dial(sip/1111,10) > > We're kind off looking to do load balancing via the dial plan. > > But I'm having a little trouble getting the logic to trace 1st call > in, 2nd call in, 1st call in, 2nd call in, etc.-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080508/f060ae8a/attachment.htm